1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00

rwengine: iwyu: reduce warnings in ai subdirectory

This commit is contained in:
Anonymous Maarten 2017-10-31 01:12:35 +01:00 committed by Daniel Evans
parent 29188f26f2
commit b6b53ffdad
14 changed files with 103 additions and 63 deletions

View File

@ -6,9 +6,13 @@
{ "include": [ "@<bits/std_abs\\.h>", "private", "<cstdlib>", "public"] },
# GLM:
{ "include": [ "@<glm/detail/.*>", "private", "<glm/glm.hpp>", "public"] },
{ "include": [ "@<glm/gtc/.*>", "private", "<glm/gtc/matrix_transform.hpp>", "public"] },
{ "include": [ "@<glm/gtc/quaternion.\\inl>", "private", "<glm/gtc/quaternion.hpp>", "public"] },
{ "include": [ "@<glm/gtc/matrix_transform.\\inl>", "private", "<glm/gtc/matrix_transform.hpp>", "public"] },
{ "include": [ "@<glm/gtx/norm\\.inl>", "private", "<glm/gtx/norm.hpp>", "public"] },
# Boost filesystem:
{ "include": [ "@<boost/filesystem/.*>", "private", "<boost/filesystem.hpp>", "public"] },
# Boost iterator:
{ "include": [ "@<boost/range/iterator_range_core\\.hpp>", "private", "<boost/range/iterator_range.hpp>", "public"] },
# Bullet:
{ "include": [ "@<BulletDynamics/Character/.*>", "public", "<btBulletDynamicsCommon.h>", "public"] },
]

View File

@ -1,8 +1,14 @@
#include "ai/AIGraph.hpp"
#include <ai/AIGraphNode.hpp>
#include <cstddef>
#include <glm/gtx/norm.hpp>
#include <iostream>
#include <objects/GameObject.hpp>
#include "ai/AIGraphNode.hpp"
#include "data/PathData.hpp"
#include <rw/defines.hpp>
#include <rw/types.hpp>
AIGraph::~AIGraph() {
for (auto n : nodes) {
@ -62,8 +68,8 @@ void AIGraph::createPathNodes(const glm::vec3& position,
if (gridcoord.x < 0 || gridcoord.y < 0 ||
gridcoord.x >= WORLD_GRID_WIDTH ||
gridcoord.y >= WORLD_GRID_WIDTH) {
std::cout << "Warning: Node outside of grid at coord "
<< gridcoord.x << " " << gridcoord.y << std::endl;
RW_MESSAGE("Warning: Node outside of grid at coord "
<< gridcoord.x << " " << gridcoord.y);
}
auto index = (gridcoord.x * WORLD_GRID_WIDTH) + gridcoord.y;
gridNodes[index].push_back(ainode);

View File

@ -1,13 +1,14 @@
#pragma once
#ifndef _AIGRAPH_HPP_
#define _AIGRAPH_HPP_
#ifndef _RWENGINE_AIGRAPH_HPP_
#define _RWENGINE_AIGRAPH_HPP_
#include <array>
#include <data/PathData.hpp>
#include <glm/gtc/quaternion.hpp>
#include <rw/types.hpp>
#include <vector>
#include <glm/glm.hpp>
#include <rw/types.hpp>
struct AIGraphNode;
struct PathData;
class AIGraph {
public:

View File

@ -1,6 +1,5 @@
#pragma once
#ifndef _AIGRAPHNODE_HPP_
#define _AIGRAPHNODE_HPP_
#ifndef _RWENGINE_AIGRAPHNODE_HPP_
#define _RWENGINE_AIGRAPHNODE_HPP_
#include <cstdint>
#include <glm/glm.hpp>
#include <vector>

View File

@ -1,14 +1,23 @@
#include <btBulletDynamicsCommon.h>
#include <ai/CharacterController.hpp>
#include <data/Clump.hpp>
#include <engine/Animator.hpp>
#include <engine/GameData.hpp>
#include <engine/GameWorld.hpp>
#include <items/Weapon.hpp>
#include <objects/CharacterObject.hpp>
#include <objects/VehicleObject.hpp>
#include "ai/CharacterController.hpp"
#include <cmath>
#include <limits>
#include <utility>
#include <glm/gtc/constants.hpp>
#include <glm/gtc/quaternion.hpp>
#include <LinearMath/btScalar.h>
#include <rw/defines.hpp>
#include "engine/Animator.hpp"
#include "engine/GameData.hpp"
#include "engine/GameWorld.hpp"
#include "items/Weapon.hpp"
#include "objects/CharacterObject.hpp"
#include "objects/VehicleObject.hpp"
constexpr float kCloseDoorIdleTime = 2.f;
CharacterController::CharacterController()

View File

@ -1,8 +1,6 @@
#pragma once
#ifndef _CHARACTERCONTROLLER_HPP_
#define _CHARACTERCONTROLLER_HPP_
#ifndef _RWENGINE_CHARACTERCONTROLLER_HPP_
#define _RWENGINE_CHARACTERCONTROLLER_HPP_
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <memory>
#include <string>

View File

@ -1,6 +1,15 @@
#include <ai/DefaultAIController.hpp>
#include <engine/GameWorld.hpp>
#include <objects/CharacterObject.hpp>
#include "ai/DefaultAIController.hpp"
#include <limits>
#include <memory>
#include <random>
#include "ai/AIGraph.hpp"
#include "ai/AIGraphNode.hpp"
#include "ai/CharacterController.hpp"
#include "engine/GameWorld.hpp"
#include "objects/CharacterObject.hpp"
glm::vec3 DefaultAIController::getTargetPosition() {
/*if(targetNode) {

View File

@ -1,10 +1,8 @@
#pragma once
#ifndef _DEFAULTAICONTROLLER_HPP_
#define _DEFAULTAICONTROLLER_HPP_
#ifndef _RWENGINE_DEFAULTAICONTROLLER_HPP_
#define _RWENGINE_DEFAULTAICONTROLLER_HPP_
#include <glm/glm.hpp>
#include <ai/CharacterController.hpp>
#include <random>
struct AIGraphNode;
class DefaultAIController : public CharacterController {
glm::vec3 gotoPos;

View File

@ -1,9 +1,13 @@
#include <ai/PlayerController.hpp>
#include <engine/Animator.hpp>
#include <engine/GameWorld.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <objects/CharacterObject.hpp>
#include <objects/VehicleObject.hpp>
#include "ai/PlayerController.hpp"
#include <memory>
#include <glm/gtc/quaternion.hpp>
#include "engine/GameWorld.hpp"
#include "objects/CharacterObject.hpp"
#include "objects/GameObject.hpp"
#include "objects/VehicleObject.hpp"
PlayerController::PlayerController()
: CharacterController()

View File

@ -1,6 +1,8 @@
#pragma once
#ifndef _PLAYERCONTROLLER_HPP_
#define _PLAYERCONTROLLER_HPP_
#ifndef _RWENGINE_PLAYERCONTROLLER_HPP_
#define _RWENGINE_PLAYERCONTROLLER_HPP_
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <ai/CharacterController.hpp>
class PlayerController : public CharacterController {

View File

@ -1,17 +1,22 @@
#include "ai/TrafficDirector.hpp"
#include <ai/AIGraphNode.hpp>
#include <ai/CharacterController.hpp>
#include <core/Logger.hpp>
#include <engine/GameData.hpp>
#include <engine/GameState.hpp>
#include <engine/GameWorld.hpp>
#include <objects/CharacterObject.hpp>
#include <objects/GameObject.hpp>
#include <objects/VehicleObject.hpp>
#include <render/ViewCamera.hpp>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <glm/glm.hpp>
#include "ai/AIGraph.hpp"
#include "ai/AIGraphNode.hpp"
#include "ai/CharacterController.hpp"
#include "engine/GameData.hpp"
#include "engine/GameState.hpp"
#include "engine/GameWorld.hpp"
#include "objects/GameObject.hpp"
#include "objects/VehicleObject.hpp"
#include "render/ViewCamera.hpp"
#include <glm/gtx/norm.hpp>
#include <glm/gtx/string_cast.hpp>
#ifdef RW_WINDOWS
#include <rw_mingw.hpp>
#endif

View File

@ -1,12 +1,11 @@
#pragma once
#ifndef _RWENGINE_TRAFFICDIRECTOR_HPP_
#define _RWENGINE_TRAFFICDIRECTOR_HPP_
#include <data/PathData.hpp>
#include "AIGraph.hpp"
#include "AIGraphNode.hpp"
#include <glm/glm.hpp>
#include <vector>
class AIGraph;
class GameObject;
class GameWorld;
class ViewCamera;
@ -43,3 +42,5 @@ private:
int maximumPedestrians;
int maximumCars;
};
#endif

View File

@ -1,13 +1,15 @@
#include "engine/GameWorld.hpp"
#include <data/Clump.hpp>
#include <engine/GameData.hpp>
#include <engine/GameState.hpp>
#include <engine/GameWorld.hpp>
#include <core/Logger.hpp>
#include <BulletCollision/CollisionDispatch/btGhostObject.h>
#include <ai/DefaultAIController.hpp>
#include <ai/TrafficDirector.hpp>
#include <data/Clump.hpp>
#include <data/WeaponData.hpp>
#include <loaders/LoaderIDE.hpp>
#include <loaders/LoaderIPL.hpp>

View File

@ -1,4 +1,3 @@
#pragma once
#ifndef _GAMEWORLD_HPP_
#define _GAMEWORLD_HPP_
@ -32,6 +31,9 @@ struct VehicleGenerator;
#include <data/Chase.hpp>
#include <glm/glm.hpp>
#include <data/Clump.hpp>
#include <btBulletCollisionCommon.h>
#include <btBulletDynamicsCommon.h>