Skip to content

Commit

Permalink
WIP of xrAI and xrSE_Factory. Headers reorganization and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Jan 2, 2018
1 parent c108f5a commit 10d48b0
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/utils/xrAI/compiler.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "xrCDB/xrCDB.h"
#include "AIMapExport.h"
#include "utils/Shader_xrLC.h"
#include "xrAICore/Navigation/level_graph.h"
#include "editors/LevelEditor/Engine/communicate.h"
#include "Layers/xrRender/ETextureParams.h"
#include "AIMapExport.h"

// base patch used all the time up to merging
const u32 InvalidNode = (1 << 24) - 1;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xrAI/factory_api.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "xrServer_Object_Base.h"
#include "xrServerEntities/xrServer_Object_Base.h"

extern "C" {
typedef XR_IMPORT IServerEntity* __stdcall Factory_Create(LPCSTR section);
Expand Down
4 changes: 1 addition & 3 deletions src/utils/xrAI/game_graph_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#include "stdafx.h"
#include "game_graph_builder.h"
#include "xrAICore/Navigation/graph_abstract.h"
#include "xrAICore/Navigation/graph_engine.h"
#include "xrServer_Objects_ALife.h"
#include "xrServerEntities/xrServer_Objects_ALife.h"
#include "factory_api.h"
#include "guid_generator.h"

Expand Down
28 changes: 3 additions & 25 deletions src/utils/xrAI/game_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,14 @@

#pragma once

#include "Common/LevelStructure.hpp"
#include "alife_space.h"
#include <loki/EmptyType.h>

class CLevelGraph;
class CGameLevelCrossTable;

template
<
typename _data_type /*= Loki::EmptyType*/,
typename _edge_weight_type /*= float*/,
typename _vertex_id_type/* = u32*/,
typename _edge_data_type = Loki::EmptyType
>
class CGraphAbstract;

namespace GameGraph
{
struct CVertex;
};

class NET_Packet;

class CGraphEngine;
#include "xrAICore/Navigation/graph_abstract.h"
#include "xrAICore/Navigation/graph_engine.h"

class CGameGraphBuilder
{
private:
typedef GameGraph::CVertex vertex_type;
typedef CGraphAbstract<vertex_type, float, u32> graph_type;
typedef CGraphAbstract<vertex_type, float, u32, Loki::EmptyType> graph_type;
typedef xr_vector<xr_vector<u32>> DISTANCES;
typedef std::pair<u32, u32> PAIR;
typedef std::pair<float, PAIR> TRIPPLE;
Expand Down
3 changes: 1 addition & 2 deletions src/utils/xrAI/game_spawn_constructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

#include "stdafx.h"
#include "game_spawn_constructor.h"
#include "level_spawn_constructor.h"
#include "xrServer_Objects_ALife_All.h"
#include "xrAICore/Navigation/graph_engine.h"
#include "xrAICore/Navigation/PatrolPath/patrol_path_storage.h"
#include "level_spawn_constructor.h"
#include "xrAI.h"

extern LPCSTR GAME_CONFIG;
Expand Down
6 changes: 2 additions & 4 deletions src/utils/xrAI/game_spawn_constructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@

#pragma once

#include "alife_space.h"
#include "xr_graph_merge.h"
#include "xrAICore/Navigation/graph_abstract.h"
#include "xrServerEntities/alife_space.h"
#include "level_spawn_constructor.h"
#include "spawn_constructor_space.h"
#include "server_entity_wrapper.h"
#include "guid_generator.h"

class CSE_Abstract;
class CLevelSpawnConstructor;
class CSE_ALifeCreatureAbstract;
class CPatrolPathStorage;

class CGameSpawnConstructor
{
Expand Down
9 changes: 2 additions & 7 deletions src/utils/xrAI/level_spawn_constructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@

#include "stdafx.h"
#include "level_spawn_constructor.h"
#include "xrAICore/Navigation/graph_engine.h"
#include "xrAICore/Navigation/PatrolPath/patrol_path_storage.h"
#include "xrServer_Objects_ALife_All.h"
#include "xrServerEntities/restriction_space.h"
#include "xrServerEntities/clsid_game.h"
#include "factory_api.h"
#include "clsid_game.h"
#include "game_spawn_constructor.h"
#include "space_restrictor_wrapper.h"
#include "restriction_space.h"

#define IGNORE_ZERO_SPAWN_POSITIONS

Expand Down
15 changes: 3 additions & 12 deletions src/utils/xrAI/level_spawn_constructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,13 @@

#pragma once

#include "xrAICore/Navigation/PatrolPath/patrol_path_storage.h"
#include "utils/xrLCUtil/xrThread.hpp"
#include "spawn_constructor_space.h"
#include "space_restrictor_wrapper.h"
#include "game_spawn_constructor.h"

class CLevelGraph;
class CGameLevelCrossTable;
class CGameSpawnConstructor;
class CSE_ALifeCreatureActor;
class CGraphEngine;
class CSE_Abstract;
class CSE_ALifeObject;
class CSE_ALifeGraphPoint;
// class CSE_SpawnGroup;
class CSE_ALifeAnomalousZone;
class CSpaceRestrictorWrapper;
class CPatrolPathStorage;
class CSE_ALifeDynamicObject;

class CLevelSpawnConstructor : public CThread
{
Expand Down
4 changes: 2 additions & 2 deletions src/utils/xrAI/server_entity_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "stdafx.h"
#include "server_entity_wrapper.h"
#include "xrServer_Objects.h"
#include "xrmessages.h"
#include "xrServerEntities/xrServer_Objects.h"
#include "xrServerEntities/xrmessages.h"

#ifdef AI_COMPILER
#include "factory_api.h"
Expand Down
4 changes: 1 addition & 3 deletions src/utils/xrAI/server_entity_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#pragma once

#include "Common/object_interfaces.h"

class CSE_Abstract;
#include "xrServerEntities/xrServer_Object_Base.h"

class CServerEntityWrapper : public ISerializable
{
Expand Down
2 changes: 0 additions & 2 deletions src/utils/xrAI/space_restrictor_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include "stdafx.h"
#include "space_restrictor_wrapper.h"
#include "xrServer_Objects_ALife.h"
#include "xrAICore/Navigation/graph_engine.h"

IC Fvector construct_position(CLevelGraph& level_graph, u32 level_vertex_id, float x, float z)
{
Expand Down
9 changes: 4 additions & 5 deletions src/utils/xrAI/space_restrictor_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

#pragma once

#include "shapedata.h"

class CSE_ALifeSpaceRestrictor;
class CLevelGraph;
class CGraphEngine;
#include "xrAICore/Navigation/graph_abstract.h"
#include "xrAICore/Navigation/graph_engine.h"
#include "xrServerEntities/shapedata.h"
#include "xrServerEntities/xrServer_Objects_ALife.h"

class CSpaceRestrictorWrapper
{
Expand Down
3 changes: 1 addition & 2 deletions src/utils/xrAI/spawn_constructor_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#pragma once

#include "xrAICore/Navigation/game_graph.h"

class CSE_ALifeLevelChanger;
#include "xrServerEntities/xrServer_Objects_ALife_All.h"

namespace SpawnConstructorSpace
{
Expand Down
12 changes: 6 additions & 6 deletions src/utils/xrAI/xrAI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -105,7 +105,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -115,7 +115,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -125,7 +125,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -135,7 +135,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand All @@ -145,7 +145,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)xrServerEntities;$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(xrExternals)FreeMagic\Include;$(xrExternals)FreeImage\Dist\x32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>AI_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
Expand Down
4 changes: 0 additions & 4 deletions src/utils/xrAI/xr_graph_merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
#include "stdafx.h"
#include "xr_graph_merge.h"
#include "xrAI.h"
#include "xrServer_Objects_ALife_All.h"
#include "factory_api.h"
#include "Common/object_broker.h"
#include "xrAICore/Navigation/level_graph.h"
#include "spawn_constructor_space.h"
#include "guid_generator.h"
#include "game_graph_builder.h"
Expand All @@ -23,8 +21,6 @@ extern LPCSTR GAME_CONFIG;
using namespace SpawnConstructorSpace;
using namespace ALife;

class CLevelGameGraph;

typedef struct tagSConnectionVertex
{
LPSTR caConnectName;
Expand Down

0 comments on commit 10d48b0

Please sign in to comment.