Skip to content

Commit

Permalink
xrGame: fix some warnings for cotire build
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Sep 18, 2018
1 parent d5da513 commit 71c3a08
Show file tree
Hide file tree
Showing 27 changed files with 48 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/xrAICore/Navigation/ai_object_location.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace LevelGraph
{
class CVertex;
};
}

class CAI_ObjectLocation
{
Expand Down
1 change: 0 additions & 1 deletion src/xrEngine/Rain.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "stdafx.h"
#pragma once

#include "Rain.h"
#include "IGame_Persistent.h"
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/CharacterPhysicsSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1362,10 +1362,10 @@ void CCharacterPhysicsSupport::on_destroy_anim_mov_ctrl()
anim_mov_state.active = false;
}

bool CCharacterPhysicsSupport::interactive_motion() { return is_imotion(m_interactive_motion); }
bool CCharacterPhysicsSupport::is_interactive_motion() { return is_imotion(m_interactive_motion); }
bool CCharacterPhysicsSupport::can_drop_active_weapon()
{
return !interactive_motion() && m_flags.test(fl_death_anim_on);
return !is_interactive_motion() && m_flags.test(fl_death_anim_on);
};

void CCharacterPhysicsSupport::in_Die()
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CharacterPhysicsSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class CCharacterPhysicsSupport : public CPHSkeleton, public CPHDestroyable
IC const CPHMovementControl* movement() const { return m_PhysicMovementControl; }
IC CPHSoundPlayer* ph_sound_player() { return &m_ph_sound_player; }
IC CIKLimbsController* ik_controller() { return m_ik_controller; }
bool interactive_motion();
bool is_interactive_motion();
bool can_drop_active_weapon();
void SetRemoved();
bool IsRemoved() { return m_eState == esRemoved; }
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ai/stalker/ai_stalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ void CAI_Stalker::aim_target(Fvector& result, const CGameObject* object)
BOOL CAI_Stalker::AlwaysTheCrow()
{
VERIFY(character_physics_support());
return (character_physics_support()->interactive_motion());
return (character_physics_support()->is_interactive_motion());
}

smart_cover::cover const* CAI_Stalker::get_current_smart_cover()
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ai_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CAI_Space : public AISpaceBase
IC const CALifeSimulator& alife() const;
IC const CALifeSimulator* get_alife() const;
IC const CCoverManager& cover_manager() const;
IC moving_objects& moving_objects() const;
IC moving_objects& get_moving_objects() const;
IC doors::manager& doors() const;
};

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ai_space_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ IC const CCoverManager& CAI_Space::cover_manager() const
return (*m_cover_manager);
}

IC moving_objects& CAI_Space::moving_objects() const
IC moving_objects& CAI_Space::get_moving_objects() const
{
VERIFY(m_moving_objects);
return (*m_moving_objects);
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/cover_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class id_predicate_less
{
VERIFY(lhs);
VERIFY(rhs);
return (lhs->object().cName()._get() < rhs->object().cName()._get());
return (lhs->get_object().cName()._get() < rhs->get_object().cName()._get());
}
IC bool operator()(Cover* cover, shared_str const& id)
{
VERIFY(cover);
return (cover->object().cName()._get() < id._get());
return (cover->get_object().cName()._get() < id._get());
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/dynamic_obstacles_avoider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

void dynamic_obstacles_avoider::query()
{
ai().moving_objects().query_action_dynamic(object().get_moving_object());
ai().get_moving_objects().query_action_dynamic(object().get_moving_object());

m_current_iteration.swap(object().get_moving_object()->dynamic_query());
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/game_location_selector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CBaseLocationSelector<CGameGraph, _VertexEvaluator, _vertex_id_type>
IC void init();
IC virtual void reinit(const _Graph* graph = 0);
IC void set_selection_type(const ESelectionType selection_type);
IC void selection_type() const;
IC ESelectionType selection_type() const;
IC bool actual(const _vertex_id_type start_vertex_id, bool path_completed);
IC void select_location(const _vertex_id_type start_vertex_id, _vertex_id_type& dest_vertex_id);
};
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/game_location_selector_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ IC void CGameLocationSelector::select_random_location(
}

TEMPLATE_SPECIALIZATION
IC void CGameLocationSelector::selection_type() const { return (m_selection_type); }
IC ESelectionType CGameLocationSelector::selection_type() const { return (m_selection_type); }
TEMPLATE_SPECIALIZATION
IC bool CGameLocationSelector::actual(const _vertex_id_type start_vertex_id, bool path_completed)
{
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/moving_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ moving_object::moving_object(const CEntityAlive* object)

update_position();

ai().moving_objects().register_object(this);
ai().get_moving_objects().register_object(this);
}

moving_object::~moving_object() { ai().moving_objects().unregister_object(this); }
void moving_object::on_object_move() { ai().moving_objects().on_object_move(this); }
moving_object::~moving_object() { ai().get_moving_objects().unregister_object(this); }
void moving_object::on_object_move() { ai().get_moving_objects().on_object_move(this); }
void moving_object::update_position() { m_position = m_object->Position(); }
Fvector moving_object::predict_position(const float& time_to_check) const
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/script_game_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ pcstr CScriptGameObject::get_smart_cover_description() const
LuaMessageType::Error, "smart_cover::object : cannot access class member get_smart_cover_description!");
return nullptr;
}
return smart_cover_object->cover().description()->table_id().c_str();
return smart_cover_object->get_cover().get_description()->table_id().c_str();
}

void CScriptGameObject::set_visual_name(LPCSTR visual) { object().cNameVisual_set(visual); }
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/script_game_object_inventory_owner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ bool CScriptGameObject::suitable_smart_cover(CScriptGameObject* object)
return (false);
}

smart_cover::cover const& cover = smart_object->cover();
smart_cover::cover const& cover = smart_object->get_cover();
if (!cover.can_fire())
return (true);

Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/smart_cover.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class cover final : public CCoverPoint, private Noncopyable
luabind::adl::object const& loopholes);
~cover();
IC Loopholes const& loopholes() const;
IC object const& object() const;
IC object const& get_object() const;
IC Fvector fov_position(loophole const& loophole) const;
IC Fvector fov_direction(loophole const& loophole) const;
IC Fvector danger_fov_direction(loophole const& loophole) const;
Expand All @@ -66,7 +66,7 @@ class cover final : public CCoverPoint, private Noncopyable
u32 const& action_level_vertex_id(loophole const& loophole, shared_str const& action_id) const;
loophole* best_loophole(
Fvector const& position, float& value, bool const& use_default_behaviour, bool is_smart_cover_entered) const;
IC DescriptionPtr const& description() const;
IC DescriptionPtr const& get_description() const;
void evaluate_loophole(
Fvector const& position, loophole*& source, loophole*& result, float& value, bool is_smart_cover_entered) const;
IC shared_str const& id() const;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/smart_cover_description.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ description::~description()
delete_data(m_transitions);
}

loophole const* description::loophole(shared_str const& loophole_id) const
loophole const* description::get_loophole(shared_str const& loophole_id) const
{
class id_predicate
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/smart_cover_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class description final : private Noncopyable, public detail::intrusive_base_tim
IC shared_str const& table_id() const;
IC Loopholes const& loopholes() const;
IC TransitionGraph const& transitions() const;
loophole const* loophole(shared_str const& loophole_id) const;
loophole const* get_loophole(shared_str const& loophole_id) const;

private:
void load_loopholes(shared_str const& table_id);
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/smart_cover_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#define cover smart_cover::cover

IC smart_cover::object const& cover::object() const { return (m_object); }
IC smart_cover::object const& cover::get_object() const { return (m_object); }
IC cover::Loopholes const& cover::loopholes() const { return (m_loopholes); }
IC Fvector cover::fov_position(loophole const& loophole) const
{
Expand Down Expand Up @@ -50,7 +50,7 @@ IC Fvector cover::position(Fvector const& position) const
return (pos);
}

IC cover::DescriptionPtr const& cover::description() const { return (m_description); }
IC cover::DescriptionPtr const& cover::get_description() const { return (m_description); }
IC shared_str const& cover::id() const { return (m_id); }
IC bool cover::is_combat_cover() const { return (m_is_combat_cover); }
IC bool cover::can_fire() const { return (m_is_combat_cover || m_can_fire); }
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/smart_cover_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class object : public CGameObject

IC float const& enter_min_enemy_distance() const;
IC float const& exit_min_enemy_distance() const;
IC cover const& cover() const;
IC cover const& get_cover() const;
};

} // namespace smart_cover
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/smart_cover_object_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

IC float const& smart_cover::object::enter_min_enemy_distance() const { return (m_enter_min_enemy_distance); }
IC float const& smart_cover::object::exit_min_enemy_distance() const { return (m_exit_min_enemy_distance); }
IC smart_cover::cover const& smart_cover::object::cover() const
IC smart_cover::cover const& smart_cover::object::get_cover() const
{
VERIFY(m_cover);
return (*m_cover);
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/stalker_movement_manager_smart_cover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void stalker_movement_manager_smart_cover::reach_enter_location(u32 const& time_
target_loophole.enterable() ? target_loophole : nearest_enterable_loophole();

Fvector position;
m_target.cover()->object().XFORM().transform_tiny(position, current_transition().animation().position());
m_target.cover()->get_object().XFORM().transform_tiny(position, current_transition().animation().position());

u32 level_vertex_id = ai().level_graph().vertex(u32(-1), position);
if (!accessible(level_vertex_id) || !accessible(position))
Expand Down Expand Up @@ -369,9 +369,9 @@ void stalker_movement_manager_smart_cover::loophole_path(smart_cover::cover cons
typedef GraphEngineSpace::CBaseParameters CBaseParameters;
CBaseParameters parameters(u32(-1), u32(-1), u32(-1));
path.clear();
R_ASSERT2(ai().graph_engine().search(cover.description()->transitions(), source, target, &path, parameters),
R_ASSERT2(ai().graph_engine().search(cover.get_description()->transitions(), source, target, &path, parameters),
make_string("cannot build path via loopholes [%s] -> [%s] (cover %s)", source_raw.c_str(), target_raw.c_str(),
cover.description()->table_id().c_str()));
cover.get_description()->table_id().c_str()));
}

bool stalker_movement_manager_smart_cover::exit_transition()
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/stalker_movement_manager_smart_cover_fov_range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool stalker_movement_manager_smart_cover::in_current_loophole_fov(Fvector const
smart_cover::cover const* cover = ai().cover_manager().smart_cover(m_enter_cover_id);
VERIFY(cover);

smart_cover::loophole const* loophole = cover->description()->loophole(m_enter_loophole_id);
smart_cover::loophole const* loophole = cover->get_description()->get_loophole(m_enter_loophole_id);
return (cover->is_position_in_fov(*loophole, position));
}

Expand All @@ -86,7 +86,7 @@ bool stalker_movement_manager_smart_cover::in_current_loophole_range(Fvector con
smart_cover::cover const* cover = ai().cover_manager().smart_cover(m_enter_cover_id);
VERIFY(cover);

smart_cover::loophole const* loophole = cover->description()->loophole(m_enter_loophole_id);
smart_cover::loophole const* loophole = cover->get_description()->get_loophole(m_enter_loophole_id);
return (cover->is_position_in_range(*loophole, position));
}

Expand Down
22 changes: 11 additions & 11 deletions src/xrGame/stalker_movement_manager_smart_cover_loopholes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ using MemorySpace::CMemoryInfo;
float stalker_movement_manager_smart_cover::enter_path(LoopholePath* result, Fvector const& position,
u32 const level_vertex_id, smart_cover::cover const& cover, shared_str const& target_loophole_id)
{
VERIFY(cover.description()->loophole(target_loophole_id));
VERIFY(cover.get_description()->loophole(target_loophole_id));

float value = flt_max;

typedef smart_cover::cover::Loopholes Loopholes;

Loopholes const& loopholes = cover.description()->loopholes();
Loopholes const& loopholes = cover.get_description()->loopholes();
Loopholes::const_iterator i = loopholes.begin();
Loopholes::const_iterator e = loopholes.end();
for (; i != e; ++i)
Expand Down Expand Up @@ -153,15 +153,15 @@ stalker_movement_manager_smart_cover::transition_action const& stalker_movement_
typedef smart_cover::description::ActionsList ActionsList;
typedef smart_cover::transitions::action action;

edge_type const* edge = cover.description()->transitions().edge(loophole_id0, loophole_id1);
edge_type const* edge = cover.get_description()->transitions().edge(loophole_id0, loophole_id1);
VERIFY(edge);
ActionsList const& actions = edge->data();

transition_action const* result = 0;
float min_distance_sqr = flt_max;

EBodyState result_body_state = eBodyStateDummy;
Fmatrix const& transform = cover.object().XFORM();
Fmatrix const& transform = cover.get_object().XFORM();
ActionsList::const_iterator i = actions.begin();
ActionsList::const_iterator e = actions.end();
for (; i != e; ++i)
Expand Down Expand Up @@ -227,7 +227,7 @@ stalker_movement_manager_smart_cover::transition_action const& stalker_movement_
typedef smart_cover::description::ActionsList ActionsList;
typedef smart_cover::transitions::action action;

edge_type const* edge = cover.description()->transitions().edge(loophole_id0, loophole_id1);
edge_type const* edge = cover.get_description()->transitions().edge(loophole_id0, loophole_id1);
VERIFY(edge);
ActionsList const& actions = edge->data();

Expand All @@ -254,7 +254,7 @@ void stalker_movement_manager_smart_cover::build_exit_path()
smart_cover::loophole const& cur_loophole = *m_current.cover_loophole();

typedef smart_cover::cover::Loopholes Loopholes;
Loopholes const& loopholes = cur_cover.description()->loopholes();
Loopholes const& loopholes = cur_cover.get_description()->loopholes();
Loopholes::const_iterator I = loopholes.begin();
Loopholes::const_iterator E = loopholes.end();
for (; I != E; ++I)
Expand All @@ -267,7 +267,7 @@ void stalker_movement_manager_smart_cover::build_exit_path()
VERIFY(!m_temp_loophole_path.empty());

float new_value = ai().graph_engine().m_string_algorithm->data_storage().get_best().g();
float exit_edge = cur_cover.description()
float exit_edge = cur_cover.get_description()
->transitions()
.edge(exitable_loophole_id, smart_cover::transform_vertex("", false))
->weight();
Expand Down Expand Up @@ -328,10 +328,10 @@ void stalker_movement_manager_smart_cover::build_exit_path_to_cover()
smart_cover::loophole const& target_loophole = *m_target.cover_loophole();

Fvector target_position;
target_cover.object().XFORM().transform_tiny(target_position, target_loophole.fov_position());
target_cover.get_object().XFORM().transform_tiny(target_position, target_loophole.fov_position());

typedef smart_cover::cover::Loopholes Loopholes;
Loopholes const& loopholes = current_cover.description()->loopholes();
Loopholes const& loopholes = current_cover.get_description()->loopholes();
Loopholes::const_iterator I = loopholes.begin();
Loopholes::const_iterator E = loopholes.end();
for (; I != E; ++I)
Expand All @@ -344,7 +344,7 @@ void stalker_movement_manager_smart_cover::build_exit_path_to_cover()
VERIFY(!m_temp_loophole_path.empty());

float new_value = ai().graph_engine().m_string_algorithm->data_storage().get_best().g();
float exit_edge = current_cover.description()
float exit_edge = current_cover.get_description()
->transitions()
.edge(exitable_loophole_id, smart_cover::transform_vertex("", false))
->weight();
Expand Down Expand Up @@ -624,7 +624,7 @@ loophole const& stalker_movement_manager_smart_cover::loophole(
smart_cover::cover const& cover, shared_str const& loophole_id) const
{
typedef smart_cover::cover::Loopholes Loopholes;
Loopholes const& loopholes = cover.description()->loopholes();
Loopholes const& loopholes = cover.get_description()->loopholes();
Loopholes::const_iterator i = std::find_if(loopholes.begin(), loopholes.end(), loophole_id_predicate(loophole_id));

VERIFY2(i != loopholes.end(),
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/stalker_movement_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void stalker_movement_params::cover_loophole_id(shared_str const& loophole_id)
VERIFY(m_cover);

typedef smart_cover::cover::Loopholes Loopholes;
Loopholes const& loopholes = m_cover->description()->loopholes();
Loopholes const& loopholes = m_cover->get_description()->loopholes();
Loopholes::const_iterator i = std::find_if(loopholes.begin(), loopholes.end(), loophole_id_predicate(loophole_id));

VERIFY2(i != loopholes.end(),
Expand All @@ -174,7 +174,7 @@ void stalker_movement_params::actualize_loophole() const
{
if (m_selected_loophole_actual)
{
if (!m_cover || !m_cover_selected_loophole || m_cover->description()->loophole(m_cover_selected_loophole->id()))
if (!m_cover || !m_cover_selected_loophole || m_cover->get_description()->get_loophole(m_cover_selected_loophole->id()))
{
if (m_last_selection_time + time_before_selection > Device.dwTimeGlobal)
return;
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/static_obstacles_avoider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
const CAI_Stalker& static_obstacles_avoider::object() const { return (movement_manager().object()); }
void static_obstacles_avoider::query(const Fvector& start_position, const Fvector& dest_position)
{
ai().moving_objects().query_action_static(object().get_moving_object(), start_position, dest_position);
ai().get_moving_objects().query_action_static(object().get_moving_object(), start_position, dest_position);

m_current_iteration.swap(object().get_moving_object()->static_query());
}

void static_obstacles_avoider::query()
{
ai().moving_objects().query_action_static(object().get_moving_object());
ai().get_moving_objects().query_action_static(object().get_moving_object());

m_current_iteration.swap(object().get_moving_object()->static_query());
}
Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/visual_memory_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include "visual_memory_params.h"
#include "memory_space.h"
#include "memory_space_impl.h"
#include "xrCommon/xr_vector.h"


class CCustomMonster;
class CAI_Stalker;
class vision_client;
Expand Down
1 change: 1 addition & 0 deletions src/xrServerEntities/PropertiesListTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "xrCore/_rect.h"
#include "xrCore/xr_trims.h"
#include "xrCore/xr_shortcut.h"
#include "xrCore/xr_token.h"
//#include "xrCore/xrCore.h"

#ifdef __BORLANDC__
Expand Down

0 comments on commit 71c3a08

Please sign in to comment.