Skip to content

Commit

Permalink
xrAICore: try fix linkage for CAI_ObjectLocation members
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Sep 21, 2018
1 parent 46ee695 commit 90c9087
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
15 changes: 8 additions & 7 deletions src/xrAICore/Navigation/ai_object_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include "xrAICore/Navigation/level_graph.h"
#include "xrGame/ai_space.h"

IC void CAI_ObjectLocation::init()

void CAI_ObjectLocation::init()
{
if (ai().get_level_graph())
ai().level_graph().set_invalid_vertex(m_level_vertex_id);
Expand All @@ -24,37 +25,37 @@ IC void CAI_ObjectLocation::init()
m_game_vertex_id = GameGraph::_GRAPH_ID(-1);
}

IC void CAI_ObjectLocation::game_vertex(CVertex const* game_vertex)
void CAI_ObjectLocation::game_vertex(CVertex const* game_vertex)
{
VERIFY(ai().game_graph().valid_vertex_id(ai().game_graph().vertex_id(game_vertex)));
m_game_vertex_id = ai().game_graph().vertex_id(game_vertex);
}

IC void CAI_ObjectLocation::game_vertex(_GRAPH_ID const& game_vertex_id)
void CAI_ObjectLocation::game_vertex(_GRAPH_ID const& game_vertex_id)
{
VERIFY(ai().game_graph().valid_vertex_id(game_vertex_id));
m_game_vertex_id = game_vertex_id;
}

IC const CGameGraph::CVertex* CAI_ObjectLocation::game_vertex() const
const CGameGraph::CVertex* CAI_ObjectLocation::game_vertex() const
{
VERIFY(ai().game_graph().valid_vertex_id(m_game_vertex_id));
return (ai().game_graph().vertex(m_game_vertex_id));
}

IC void CAI_ObjectLocation::level_vertex(CLevelVertex const* level_vertex)
void CAI_ObjectLocation::level_vertex(CLevelVertex const* level_vertex)
{
VERIFY(ai().level_graph().valid_vertex_id(ai().level_graph().vertex_id(level_vertex)));
m_level_vertex_id = ai().level_graph().vertex_id(level_vertex);
}

IC void CAI_ObjectLocation::level_vertex(u32 const& level_vertex_id)
void CAI_ObjectLocation::level_vertex(u32 const& level_vertex_id)
{
VERIFY(ai().level_graph().valid_vertex_id(level_vertex_id));
m_level_vertex_id = level_vertex_id;
}

IC const CLevelGraph::CVertex* CAI_ObjectLocation::level_vertex() const
const LevelGraph::CVertex* CAI_ObjectLocation::level_vertex() const
{
VERIFY(ai().level_graph().valid_vertex_id(m_level_vertex_id));
return (ai().level_graph().vertex(m_level_vertex_id));
Expand Down
26 changes: 11 additions & 15 deletions src/xrAICore/Navigation/ai_object_location.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@

#pragma once

#include "xrAICore/Navigation/game_graph_space.h"

namespace LevelGraph
{
class CVertex;
}
#include "xrAICore/Navigation/game_graph.h"
#include "xrAICore/Navigation/level_graph.h"

class CAI_ObjectLocation
{
public:
typedef GameGraph::_GRAPH_ID _GRAPH_ID;
typedef GameGraph::CVertex CVertex;
typedef LevelGraph::CVertex CLevelVertex;
using _GRAPH_ID = GameGraph::_GRAPH_ID ;
using CVertex = GameGraph::CVertex;
using CLevelVertex = LevelGraph::CVertex;

private:
u32 m_level_vertex_id;
Expand All @@ -30,13 +26,13 @@ class CAI_ObjectLocation
IC CAI_ObjectLocation();
void init();
IC void reinit();
IC void game_vertex(CVertex const* game_vertex);
IC void game_vertex(_GRAPH_ID const& game_vertex_id);
IC const CVertex* game_vertex() const;
void game_vertex(CVertex const* game_vertex);
void game_vertex(_GRAPH_ID const& game_vertex_id);
const CVertex* game_vertex() const;
IC const _GRAPH_ID game_vertex_id() const;
IC void level_vertex(CLevelVertex const* level_vertex);
IC void level_vertex(u32 const& level_vertex_id);
IC const CLevelVertex* level_vertex() const;
void level_vertex(CLevelVertex const* level_vertex);
void level_vertex(u32 const& level_vertex_id);
const LevelGraph::CVertex* level_vertex() const;
IC const u32 level_vertex_id() const;
};

Expand Down

0 comments on commit 90c9087

Please sign in to comment.