Skip to content

Commit

Permalink
Replace BOOL -> bool, LPCSTR -> const char*.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kovalenko committed Oct 8, 2014
1 parent 16b05f0 commit 6f0cac6
Show file tree
Hide file tree
Showing 50 changed files with 141 additions and 141 deletions.
4 changes: 2 additions & 2 deletions src/xrEngine/Feel_Touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Touch::~Touch()
{
}

BOOL Touch::feel_touch_contact (CObject* O)
bool Touch::feel_touch_contact (CObject* O)
{
return TRUE;
return true;
}

void Touch::feel_touch_deny (CObject* O, DWORD T)
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/Feel_Touch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Feel
Touch ();
virtual ~Touch ();

virtual BOOL feel_touch_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);
virtual void feel_touch_update (Fvector& P, float R);
virtual void feel_touch_deny (CObject* O, DWORD T);
virtual void feel_touch_new (CObject* O) { };
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/Feel_Vision.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace Feel
VERIFY2 (0, "There is no such object in the potentially visible list" );
return Fvector().set(flt_max,flt_max,flt_max);
}
virtual BOOL feel_vision_isRelevant (CObject* O) = 0;
virtual bool feel_vision_isRelevant (CObject* O) = 0;
virtual float feel_vision_mtl_transp (CObject* O, u32 element) = 0;
};
};
4 changes: 2 additions & 2 deletions src/xrEngine/IGame_Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void __stdcall build_callback (Fvector* V, int Vcnt, CDB::TRI* T, int Tcn
g_pGameLevel->Load_GameSpecific_CFORM( T, Tcnt );
}

BOOL IGame_Level::Load (u32 dwNum)
bool IGame_Level::Load (u32 dwNum)
{
SECUROM_MARKER_PERFORMANCE_ON(10)

Expand Down Expand Up @@ -139,7 +139,7 @@ BOOL IGame_Level::Load (u32 dwNum)

SECUROM_MARKER_PERFORMANCE_OFF(10)

return TRUE;
return true;
}

#ifndef _EDITOR
Expand Down
14 changes: 7 additions & 7 deletions src/xrEngine/IGame_Level.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ class ENGINE_API IGame_Level :
virtual shared_str name () const = 0;
virtual void GetLevelInfo ( CServerInfo* si ) = 0;

virtual BOOL net_Start ( LPCSTR op_server, LPCSTR op_client) = 0;
virtual void net_Load ( LPCSTR name ) = 0;
virtual void net_Save ( LPCSTR name ) = 0;
virtual bool net_Start ( const char* op_server, const char* op_client) = 0;
virtual void net_Load ( const char* name ) = 0;
virtual void net_Save ( const char* name ) = 0;
virtual void net_Stop ( );
virtual void net_Update ( ) = 0;

virtual BOOL Load ( u32 dwNum );
virtual BOOL Load_GameSpecific_Before( ) { return TRUE; }; // before object loading
virtual BOOL Load_GameSpecific_After ( ) { return TRUE; }; // after object loading
virtual bool Load ( u32 dwNum );
virtual bool Load_GameSpecific_Before( ) { return TRUE; }; // before object loading
virtual bool Load_GameSpecific_After ( ) { return TRUE; }; // after object loading
virtual void Load_GameSpecific_CFORM ( CDB::TRI* T, u32 count ) = 0;

virtual void _BCL OnFrame ( void );
virtual void OnRender ( void );

virtual shared_str OpenDemoFile (LPCSTR demo_file_name) = 0;
virtual shared_str OpenDemoFile (const char* demo_file_name) = 0;
virtual void net_StartPlayDemo () = 0;

// Main interface
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ struct SDefNewsMsg{
public:
virtual void feel_touch_new (CObject* O);
virtual void feel_touch_delete (CObject* O);
virtual BOOL feel_touch_contact (CObject* O);
virtual BOOL feel_touch_on_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);
virtual bool feel_touch_on_contact (CObject* O);

CGameObject* ObjectWeLookingAt () {return m_pObjectWeLookingAt;}
CInventoryOwner* PersonWeLookingAt () {return m_pPersonWeLookingAt;}
Expand Down
16 changes: 8 additions & 8 deletions src/xrGame/Actor_Feel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,37 @@ void CActor::feel_touch_delete (CObject* O)
if(sh&&sh->character_physics_support()) m_feel_touch_characters--;
}

BOOL CActor::feel_touch_contact (CObject *O)
bool CActor::feel_touch_contact (CObject *O)
{
CInventoryItem *item = smart_cast<CInventoryItem*>(O);
CInventoryOwner *inventory_owner = smart_cast<CInventoryOwner*>(O);

if (item && item->Useful() && !item->object().H_Parent())
return TRUE;
return true;

if(inventory_owner && inventory_owner != smart_cast<CInventoryOwner*>(this))
{
//CPhysicsShellHolder* sh=smart_cast<CPhysicsShellHolder*>(O);
//if(sh&&sh->character_physics_support()) m_feel_touch_characters++;
return TRUE;
return true;
}

return (FALSE);
return (false);
}

BOOL CActor::feel_touch_on_contact (CObject *O)
bool CActor::feel_touch_on_contact (CObject *O)
{
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
if (!custom_zone)
return (TRUE);
return (true);

Fsphere sphere;
Center (sphere.P);
sphere.R = 0.1f;
if (custom_zone->inside(sphere))
return (TRUE);
return (true);

return (FALSE);
return (false);
}

ICF static BOOL info_trace_callback(collide::rq_result& result, LPVOID params)
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/BastArtifact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ void CBastArtefact::feel_touch_delete(CObject* O)
}
}

BOOL CBastArtefact::feel_touch_contact(CObject* O)
bool CBastArtefact::feel_touch_contact(CObject* O)
{
CEntityAlive* pEntityAlive = smart_cast<CEntityAlive*>(O);

if(pEntityAlive && pEntityAlive->g_Alive())
return TRUE;
return true;
else
return FALSE;
return false;
}

void CBastArtefact::setup_physic_shell ()
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/BastArtifact.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CBastArtefact : public CArtefact,

virtual void feel_touch_new (CObject* O);
virtual void feel_touch_delete (CObject* O);
virtual BOOL feel_touch_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);

bool IsAttacking() {return NULL!=m_AttakingEntity;}

Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/BlackGraviArtifact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ void CBlackGraviArtefact::feel_touch_delete(CObject* O)
}
}

BOOL CBlackGraviArtefact::feel_touch_contact(CObject* O)
bool CBlackGraviArtefact::feel_touch_contact(CObject* O)
{
CGameObject* pGameObject = static_cast<CGameObject*>(O);

if(pGameObject)
return TRUE;
return true;
else
return FALSE;
return false;
}

void CBlackGraviArtefact::GraviStrike()
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/BlackGraviArtifact.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CBlackGraviArtefact: public CGraviArtefact,

virtual void feel_touch_new (CObject* O);
virtual void feel_touch_delete (CObject* O);
virtual BOOL feel_touch_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);

protected:
virtual void net_Relcase (CObject* O );
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CustomDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void CCustomDetector::UpdateNightVisionMode(bool b_on)
{
}

BOOL CAfList::feel_touch_contact (CObject* O)
bool CAfList::feel_touch_contact (CObject* O)
{
TypesMapIt it = m_TypesMap.find(O->cNameSect());

Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/CustomDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class CDetectList : public Feel::Touch
class CAfList :public CDetectList<CArtefact>
{
protected:
virtual BOOL feel_touch_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);
public:
CAfList ():m_af_rank(0){}
int m_af_rank;
Expand Down Expand Up @@ -169,7 +169,7 @@ class CCustomDetector : public CHudItemObject
class CZoneList : public CDetectList<CCustomZone>
{
protected:
virtual BOOL feel_touch_contact( CObject* O );
virtual bool feel_touch_contact( CObject* O );
public:
CZoneList();
virtual ~CZoneList();
Expand Down
16 changes: 8 additions & 8 deletions src/xrGame/CustomMonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,34 +861,34 @@ void CCustomMonster::PitchCorrection()

}

BOOL CCustomMonster::feel_touch_on_contact (CObject *O)
bool CCustomMonster::feel_touch_on_contact (CObject *O)
{
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
if (!custom_zone)
return (TRUE);
return (true);

Fsphere sphere;
sphere.P = Position();
sphere.R = EPS_L;
if (custom_zone->inside(sphere))
return (TRUE);
return (true);

return (FALSE);
return (false);
}

BOOL CCustomMonster::feel_touch_contact (CObject *O)
bool CCustomMonster::feel_touch_contact (CObject *O)
{
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
if (!custom_zone)
return (TRUE);
return (true);

Fsphere sphere;
sphere.P = Position();
sphere.R = 0.f;
if (custom_zone->inside(sphere))
return (TRUE);
return (true);

return (FALSE);
return (false);
}

void CCustomMonster::set_ready_to_save ()
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/CustomMonster.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class CCustomMonster :
u32 NET_Time; // server time of last update
//------------------------------

virtual BOOL feel_touch_on_contact (CObject *);
virtual BOOL feel_touch_contact (CObject *);
virtual bool feel_touch_on_contact (CObject *);
virtual bool feel_touch_contact (CObject *);
// utils
void mk_orientation ( Fvector& dir, Fmatrix& mR );
void mk_rotation ( Fvector& dir, SRotation &R);
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/CustomZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ void CCustomZone::feel_touch_delete(CObject* O)
}
}

BOOL CCustomZone::feel_touch_contact(CObject* O)
bool CCustomZone::feel_touch_contact(CObject* O)
{
if (smart_cast<CCustomZone*>(O)) return FALSE;
if (smart_cast<CBreakableObject*>(O)) return FALSE;
Expand Down Expand Up @@ -1391,10 +1391,10 @@ void CCustomZone::GoEnabledState()
u_EventSend (P);
}

BOOL CCustomZone::feel_touch_on_contact (CObject *O)
bool CCustomZone::feel_touch_on_contact (CObject *O)
{
if ((spatial.type | STYPE_VISIBLEFORAI) != spatial.type)
return (FALSE);
return (false);

return (inherited::feel_touch_on_contact(O));
}
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/CustomZone.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class CCustomZone : public CSpaceRestrictor,
virtual void exit_Zone (SZoneObjectInfo& io);
virtual void feel_touch_new (CObject* O);
virtual void feel_touch_delete (CObject* O);
virtual BOOL feel_touch_contact (CObject* O);
virtual BOOL feel_touch_on_contact (CObject* O);
virtual bool feel_touch_contact (CObject* O);
virtual bool feel_touch_on_contact (CObject* O);

float effective_radius (float nearest_shape_radius);
virtual void net_Relcase (CObject* O);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/GameObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CGameObject :
virtual CBaseMonster* cast_base_monster () {return NULL;}

public:
virtual BOOL feel_touch_on_contact (CObject *) {return TRUE;}
virtual bool feel_touch_on_contact (CObject *) {return TRUE;}
virtual bool use (CGameObject* who_use) {return CUsableScriptObject::use(who_use);};

public:
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ int CLevel::get_RPID(LPCSTR /**name/**/)
return -1;
}

BOOL g_bDebugEvents = FALSE;
bool g_bDebugEvents = false;

void CLevel::cl_Process_Event(u16 dest, u16 type, NET_Packet& P)
{
Expand Down Expand Up @@ -1041,7 +1041,7 @@ CZoneList* CLevel::create_hud_zones_list()
return hud_zones_list;
}

BOOL CZoneList::feel_touch_contact(CObject* O)
bool CZoneList::feel_touch_contact(CObject* O)
{
TypesMapIt it = m_TypesMap.find(O->cNameSect());
bool res = (it != m_TypesMap.end());
Expand Down
Loading

0 comments on commit 6f0cac6

Please sign in to comment.