Skip to content

Commit 6f0cac6

Browse files
author
Pavel Kovalenko
committed
Replace BOOL -> bool, LPCSTR -> const char*.
1 parent 16b05f0 commit 6f0cac6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+141
-141
lines changed

src/xrEngine/Feel_Touch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Touch::~Touch()
1212
{
1313
}
1414

15-
BOOL Touch::feel_touch_contact (CObject* O)
15+
bool Touch::feel_touch_contact (CObject* O)
1616
{
17-
return TRUE;
17+
return true;
1818
}
1919

2020
void Touch::feel_touch_deny (CObject* O, DWORD T)

src/xrEngine/Feel_Touch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Feel
2727
Touch ();
2828
virtual ~Touch ();
2929

30-
virtual BOOL feel_touch_contact (CObject* O);
30+
virtual bool feel_touch_contact (CObject* O);
3131
virtual void feel_touch_update (Fvector& P, float R);
3232
virtual void feel_touch_deny (CObject* O, DWORD T);
3333
virtual void feel_touch_new (CObject* O) { };

src/xrEngine/Feel_Vision.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace Feel
6363
VERIFY2 (0, "There is no such object in the potentially visible list" );
6464
return Fvector().set(flt_max,flt_max,flt_max);
6565
}
66-
virtual BOOL feel_vision_isRelevant (CObject* O) = 0;
66+
virtual bool feel_vision_isRelevant (CObject* O) = 0;
6767
virtual float feel_vision_mtl_transp (CObject* O, u32 element) = 0;
6868
};
6969
};

src/xrEngine/IGame_Level.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static void __stdcall build_callback (Fvector* V, int Vcnt, CDB::TRI* T, int Tcn
7979
g_pGameLevel->Load_GameSpecific_CFORM( T, Tcnt );
8080
}
8181

82-
BOOL IGame_Level::Load (u32 dwNum)
82+
bool IGame_Level::Load (u32 dwNum)
8383
{
8484
SECUROM_MARKER_PERFORMANCE_ON(10)
8585

@@ -139,7 +139,7 @@ BOOL IGame_Level::Load (u32 dwNum)
139139

140140
SECUROM_MARKER_PERFORMANCE_OFF(10)
141141

142-
return TRUE;
142+
return true;
143143
}
144144

145145
#ifndef _EDITOR

src/xrEngine/IGame_Level.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ class ENGINE_API IGame_Level :
8282
virtual shared_str name () const = 0;
8383
virtual void GetLevelInfo ( CServerInfo* si ) = 0;
8484

85-
virtual BOOL net_Start ( LPCSTR op_server, LPCSTR op_client) = 0;
86-
virtual void net_Load ( LPCSTR name ) = 0;
87-
virtual void net_Save ( LPCSTR name ) = 0;
85+
virtual bool net_Start ( const char* op_server, const char* op_client) = 0;
86+
virtual void net_Load ( const char* name ) = 0;
87+
virtual void net_Save ( const char* name ) = 0;
8888
virtual void net_Stop ( );
8989
virtual void net_Update ( ) = 0;
9090

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

9696
virtual void _BCL OnFrame ( void );
9797
virtual void OnRender ( void );
9898

99-
virtual shared_str OpenDemoFile (LPCSTR demo_file_name) = 0;
99+
virtual shared_str OpenDemoFile (const char* demo_file_name) = 0;
100100
virtual void net_StartPlayDemo () = 0;
101101

102102
// Main interface

src/xrGame/Actor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ struct SDefNewsMsg{
337337
public:
338338
virtual void feel_touch_new (CObject* O);
339339
virtual void feel_touch_delete (CObject* O);
340-
virtual BOOL feel_touch_contact (CObject* O);
341-
virtual BOOL feel_touch_on_contact (CObject* O);
340+
virtual bool feel_touch_contact (CObject* O);
341+
virtual bool feel_touch_on_contact (CObject* O);
342342

343343
CGameObject* ObjectWeLookingAt () {return m_pObjectWeLookingAt;}
344344
CInventoryOwner* PersonWeLookingAt () {return m_pPersonWeLookingAt;}

src/xrGame/Actor_Feel.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,37 @@ void CActor::feel_touch_delete (CObject* O)
3333
if(sh&&sh->character_physics_support()) m_feel_touch_characters--;
3434
}
3535

36-
BOOL CActor::feel_touch_contact (CObject *O)
36+
bool CActor::feel_touch_contact (CObject *O)
3737
{
3838
CInventoryItem *item = smart_cast<CInventoryItem*>(O);
3939
CInventoryOwner *inventory_owner = smart_cast<CInventoryOwner*>(O);
4040

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

4444
if(inventory_owner && inventory_owner != smart_cast<CInventoryOwner*>(this))
4545
{
4646
//CPhysicsShellHolder* sh=smart_cast<CPhysicsShellHolder*>(O);
4747
//if(sh&&sh->character_physics_support()) m_feel_touch_characters++;
48-
return TRUE;
48+
return true;
4949
}
5050

51-
return (FALSE);
51+
return (false);
5252
}
5353

54-
BOOL CActor::feel_touch_on_contact (CObject *O)
54+
bool CActor::feel_touch_on_contact (CObject *O)
5555
{
5656
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
5757
if (!custom_zone)
58-
return (TRUE);
58+
return (true);
5959

6060
Fsphere sphere;
6161
Center (sphere.P);
6262
sphere.R = 0.1f;
6363
if (custom_zone->inside(sphere))
64-
return (TRUE);
64+
return (true);
6565

66-
return (FALSE);
66+
return (false);
6767
}
6868

6969
ICF static BOOL info_trace_callback(collide::rq_result& result, LPVOID params)

src/xrGame/BastArtifact.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,14 @@ void CBastArtefact::feel_touch_delete(CObject* O)
260260
}
261261
}
262262

263-
BOOL CBastArtefact::feel_touch_contact(CObject* O)
263+
bool CBastArtefact::feel_touch_contact(CObject* O)
264264
{
265265
CEntityAlive* pEntityAlive = smart_cast<CEntityAlive*>(O);
266266

267267
if(pEntityAlive && pEntityAlive->g_Alive())
268-
return TRUE;
268+
return true;
269269
else
270-
return FALSE;
270+
return false;
271271
}
272272

273273
void CBastArtefact::setup_physic_shell ()

src/xrGame/BastArtifact.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CBastArtefact : public CArtefact,
3737

3838
virtual void feel_touch_new (CObject* O);
3939
virtual void feel_touch_delete (CObject* O);
40-
virtual BOOL feel_touch_contact (CObject* O);
40+
virtual bool feel_touch_contact (CObject* O);
4141

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

src/xrGame/BlackGraviArtifact.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ void CBlackGraviArtefact::feel_touch_delete(CObject* O)
158158
}
159159
}
160160

161-
BOOL CBlackGraviArtefact::feel_touch_contact(CObject* O)
161+
bool CBlackGraviArtefact::feel_touch_contact(CObject* O)
162162
{
163163
CGameObject* pGameObject = static_cast<CGameObject*>(O);
164164

165165
if(pGameObject)
166-
return TRUE;
166+
return true;
167167
else
168-
return FALSE;
168+
return false;
169169
}
170170

171171
void CBlackGraviArtefact::GraviStrike()

src/xrGame/BlackGraviArtifact.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CBlackGraviArtefact: public CGraviArtefact,
3030

3131
virtual void feel_touch_new (CObject* O);
3232
virtual void feel_touch_delete (CObject* O);
33-
virtual BOOL feel_touch_contact (CObject* O);
33+
virtual bool feel_touch_contact (CObject* O);
3434

3535
protected:
3636
virtual void net_Relcase (CObject* O );

src/xrGame/CustomDetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void CCustomDetector::UpdateNightVisionMode(bool b_on)
339339
{
340340
}
341341

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

src/xrGame/CustomDetector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class CDetectList : public Feel::Touch
103103
class CAfList :public CDetectList<CArtefact>
104104
{
105105
protected:
106-
virtual BOOL feel_touch_contact (CObject* O);
106+
virtual bool feel_touch_contact (CObject* O);
107107
public:
108108
CAfList ():m_af_rank(0){}
109109
int m_af_rank;
@@ -169,7 +169,7 @@ class CCustomDetector : public CHudItemObject
169169
class CZoneList : public CDetectList<CCustomZone>
170170
{
171171
protected:
172-
virtual BOOL feel_touch_contact( CObject* O );
172+
virtual bool feel_touch_contact( CObject* O );
173173
public:
174174
CZoneList();
175175
virtual ~CZoneList();

src/xrGame/CustomMonster.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -861,34 +861,34 @@ void CCustomMonster::PitchCorrection()
861861

862862
}
863863

864-
BOOL CCustomMonster::feel_touch_on_contact (CObject *O)
864+
bool CCustomMonster::feel_touch_on_contact (CObject *O)
865865
{
866866
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
867867
if (!custom_zone)
868-
return (TRUE);
868+
return (true);
869869

870870
Fsphere sphere;
871871
sphere.P = Position();
872872
sphere.R = EPS_L;
873873
if (custom_zone->inside(sphere))
874-
return (TRUE);
874+
return (true);
875875

876-
return (FALSE);
876+
return (false);
877877
}
878878

879-
BOOL CCustomMonster::feel_touch_contact (CObject *O)
879+
bool CCustomMonster::feel_touch_contact (CObject *O)
880880
{
881881
CCustomZone *custom_zone = smart_cast<CCustomZone*>(O);
882882
if (!custom_zone)
883-
return (TRUE);
883+
return (true);
884884

885885
Fsphere sphere;
886886
sphere.P = Position();
887887
sphere.R = 0.f;
888888
if (custom_zone->inside(sphere))
889-
return (TRUE);
889+
return (true);
890890

891-
return (FALSE);
891+
return (false);
892892
}
893893

894894
void CCustomMonster::set_ready_to_save ()

src/xrGame/CustomMonster.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ class CCustomMonster :
114114
u32 NET_Time; // server time of last update
115115
//------------------------------
116116

117-
virtual BOOL feel_touch_on_contact (CObject *);
118-
virtual BOOL feel_touch_contact (CObject *);
117+
virtual bool feel_touch_on_contact (CObject *);
118+
virtual bool feel_touch_contact (CObject *);
119119
// utils
120120
void mk_orientation ( Fvector& dir, Fmatrix& mR );
121121
void mk_rotation ( Fvector& dir, SRotation &R);

src/xrGame/CustomZone.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ void CCustomZone::feel_touch_delete(CObject* O)
620620
}
621621
}
622622

623-
BOOL CCustomZone::feel_touch_contact(CObject* O)
623+
bool CCustomZone::feel_touch_contact(CObject* O)
624624
{
625625
if (smart_cast<CCustomZone*>(O)) return FALSE;
626626
if (smart_cast<CBreakableObject*>(O)) return FALSE;
@@ -1391,10 +1391,10 @@ void CCustomZone::GoEnabledState()
13911391
u_EventSend (P);
13921392
}
13931393

1394-
BOOL CCustomZone::feel_touch_on_contact (CObject *O)
1394+
bool CCustomZone::feel_touch_on_contact (CObject *O)
13951395
{
13961396
if ((spatial.type | STYPE_VISIBLEFORAI) != spatial.type)
1397-
return (FALSE);
1397+
return (false);
13981398

13991399
return (inherited::feel_touch_on_contact(O));
14001400
}

src/xrGame/CustomZone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class CCustomZone : public CSpaceRestrictor,
5959
virtual void exit_Zone (SZoneObjectInfo& io);
6060
virtual void feel_touch_new (CObject* O);
6161
virtual void feel_touch_delete (CObject* O);
62-
virtual BOOL feel_touch_contact (CObject* O);
63-
virtual BOOL feel_touch_on_contact (CObject* O);
62+
virtual bool feel_touch_contact (CObject* O);
63+
virtual bool feel_touch_on_contact (CObject* O);
6464

6565
float effective_radius (float nearest_shape_radius);
6666
virtual void net_Relcase (CObject* O);

src/xrGame/GameObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CGameObject :
9090
virtual CBaseMonster* cast_base_monster () {return NULL;}
9191

9292
public:
93-
virtual BOOL feel_touch_on_contact (CObject *) {return TRUE;}
93+
virtual bool feel_touch_on_contact (CObject *) {return TRUE;}
9494
virtual bool use (CGameObject* who_use) {return CUsableScriptObject::use(who_use);};
9595

9696
public:

src/xrGame/Level.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ int CLevel::get_RPID(LPCSTR /**name/**/)
242242
return -1;
243243
}
244244

245-
BOOL g_bDebugEvents = FALSE;
245+
bool g_bDebugEvents = false;
246246

247247
void CLevel::cl_Process_Event(u16 dest, u16 type, NET_Packet& P)
248248
{
@@ -1041,7 +1041,7 @@ CZoneList* CLevel::create_hud_zones_list()
10411041
return hud_zones_list;
10421042
}
10431043

1044-
BOOL CZoneList::feel_touch_contact(CObject* O)
1044+
bool CZoneList::feel_touch_contact(CObject* O)
10451045
{
10461046
TypesMapIt it = m_TypesMap.find(O->cNameSect());
10471047
bool res = (it != m_TypesMap.end());

0 commit comments

Comments
 (0)