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()

0 commit comments

Comments
 (0)