Skip to content

Commit 62f56d7

Browse files
committed
Replace TRUE, FALSE with true, false
1 parent 10c60c2 commit 62f56d7

10 files changed

+60
-58
lines changed

src/Layers/xrRender/DetailManager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ class ECORE_API CDetailManager
5656
SlotItemVec items; // список кустиков
5757
SlotItemVec r_items[3]; // список кустиков for render
5858
};
59+
5960
enum SlotType
6061
{
6162
stReady = 0, // Ready to use
6263
stPending, // Pending for decompression
6364

6465
stFORCEDWORD = 0xffffffff
6566
};
67+
6668
struct Slot
6769
{ // распакованый слот размером DETAIL_SLOT_SIZE
6870
struct
@@ -84,6 +86,7 @@ class ECORE_API CDetailManager
8486
vis.clear();
8587
}
8688
};
89+
8790
struct CacheSlot1
8891
{
8992
u32 empty;
@@ -101,10 +104,8 @@ class ECORE_API CDetailManager
101104
typedef DetailVec::iterator DetailIt;
102105
typedef poolSS<SlotItem, 4096> PSS;
103106

104-
public:
105107
int dither[16][16];
106108

107-
public:
108109
// swing values
109110
struct SSwingValue
110111
{

src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ void CRenderTarget::enable_dbt_bounds(light* L)
4444
BOOL CRenderTarget::u_DBT_enable(float /*zMin*/, float /*zMax*/)
4545
{
4646
if (!RImplementation.o.nvdbt)
47-
return FALSE;
47+
return false;
4848
if (!ps_r2_ls_flags.test(R2FLAG_USE_NVDBT))
49-
return FALSE;
49+
return false;
5050

51-
return FALSE;
51+
return false;
5252

5353
// TODO: DX10: Check if DX10 supports this feature
5454
// enable cheat
5555
// HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_X,MAKEFOURCC('N','V','D','B'));
5656
// HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_Z,*(DWORD*)&zMin);
5757
// HW.pDevice->SetRenderState(D3DRS_ADAPTIVETESS_W,*(DWORD*)&zMax);
5858

59-
// return TRUE;
59+
// return true;
6060
}
6161

6262
void CRenderTarget::u_DBT_disable()
@@ -71,7 +71,7 @@ BOOL CRenderTarget::enable_scissor(light* L) // true if intersects near plane
7171
// Msg ("%d: %x type(%d), pos(%f,%f,%f)",Device.dwFrame,u32(L),u32(L->flags.type),VPUSH(L->position));
7272

7373
// Near plane intersection
74-
BOOL near_intersect = FALSE;
74+
bool near_intersect = false;
7575
{
7676
Fmatrix& M = Device.mFullTransform;
7777
Fvector4 plane;

src/utils/xrSE_Factory/script_properties_list_helper.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ template <typename T>
2525
struct CWrapHelper
2626
{
2727
typedef T result_type;
28+
2829
template <bool a>
2930
static T* wrap_value(luabind::object object, LPCSTR name)
3031
{
@@ -44,6 +45,7 @@ template <>
4445
struct CWrapHelper<bool>
4546
{
4647
typedef BOOL result_type;
48+
4749
template <bool a>
4850
static BOOL* wrap_value(luabind::object object, LPCSTR name)
4951
{

src/xrEngine/Device_destroy.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ void CRenderDevice::Destroy()
99
if (!b_is_Ready)
1010
return;
1111
Log("Destroying Direct3D...");
12-
ShowCursor(TRUE);
12+
ShowCursor(true);
1313
GlobalEnv.Render->ValidateHW();
1414
GlobalEnv.DU->OnDeviceDestroy();
15-
b_is_Ready = FALSE;
15+
b_is_Ready = false;
1616
Statistic->OnDeviceDestroy();
1717
GlobalEnv.Render->destroy();
1818
GlobalEnv.Render->OnDeviceDestroy(false);
@@ -38,11 +38,11 @@ void CRenderDevice::Reset(bool precache)
3838
{
3939
u32 dwWidth_before = dwWidth;
4040
u32 dwHeight_before = dwHeight;
41-
ShowCursor(TRUE);
41+
ShowCursor(true);
4242
u32 tm_start = TimerAsync();
4343
GlobalEnv.Render->Reset(m_hWnd, dwWidth, dwHeight, fWidth_2, fHeight_2);
4444
if (g_pGamePersistent)
45-
g_pGamePersistent->Environment().bNeed_re_create_env = TRUE;
45+
g_pGamePersistent->Environment().bNeed_re_create_env = true;
4646
_SetupStates();
4747
if (precache)
4848
PreCache(20, true, false);
@@ -51,7 +51,7 @@ void CRenderDevice::Reset(bool precache)
5151
// TODO: Remove this! It may hide crash
5252
Memory.mem_compact();
5353
#ifndef DEDICATED_SERVER
54-
ShowCursor(FALSE);
54+
ShowCursor(false);
5555
#endif
5656
seqDeviceReset.Process(rp_DeviceReset);
5757
if (dwWidth_before != dwWidth || dwHeight_before != dwHeight)

src/xrServerEntities/PropertiesListTypes.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class PropItem
194194
void AppendValue(PropValue* value)
195195
{
196196
if (!values.empty() && !value->Equal(values.front()))
197-
m_Flags.set(flMixed, TRUE);
197+
m_Flags.set(flMixed, true);
198198
values.push_back(value);
199199
}
200200

@@ -206,7 +206,7 @@ class PropItem
206206

207207
void CheckMixed()
208208
{
209-
m_Flags.set(flMixed, FALSE);
209+
m_Flags.set(flMixed, false);
210210
if (values.size() > 1)
211211
{
212212
PropValueIt F = values.begin();
@@ -216,7 +216,7 @@ class PropItem
216216
{
217217
if (!(*it)->Equal(*F))
218218
{
219-
m_Flags.set(flMixed, TRUE);
219+
m_Flags.set(flMixed, true);
220220
break;
221221
}
222222
}
@@ -244,7 +244,7 @@ class PropItem
244244
bool ApplyValue(const T2& val)
245245
{
246246
bool bChanged = false;
247-
m_Flags.set(flMixed, FALSE);
247+
m_Flags.set(flMixed, false);
248248
for (PropValueIt it = values.begin(); values.end() != it; ++it)
249249
{
250250
T1* CV = smart_cast<T1*>(*it);
@@ -256,7 +256,7 @@ class PropItem
256256
CV->OnChangeEvent(*it);
257257
}
258258
if (!CV->Equal(values.front()))
259-
m_Flags.set(flMixed, TRUE);
259+
m_Flags.set(flMixed, true);
260260
}
261261
return bChanged;
262262
}
@@ -443,7 +443,6 @@ class CTextValue : public PropValue
443443
public:
444444
LPSTR value;
445445

446-
public:
447446
typedef fastdelegate::FastDelegate2<PropValue*, xr_string&> TOnBeforeEditEvent;
448447
typedef fastdelegate::FastDelegate2<PropValue*, xr_string&, bool> TOnAfterEditEvent;
449448

@@ -798,7 +797,7 @@ class RListValue : public RTextValue
798797
{
799798
if (items != ((RListValue*)val)->items)
800799
{
801-
m_Owner->m_Flags.set(PropItem::flDisabled, TRUE);
800+
m_Owner->m_Flags.set(PropItem::flDisabled, true);
802801
return false;
803802
}
804803
return RTextValue::Equal(val);
@@ -815,7 +814,7 @@ class CListValue : public CTextValue
815814
{
816815
if (items != ((CListValue*)val)->items)
817816
{
818-
m_Owner->m_Flags.set(PropItem::flDisabled, TRUE);
817+
m_Owner->m_Flags.set(PropItem::flDisabled, true);
819818
return false;
820819
}
821820
return CTextValue::Equal(val);

src/xrServerEntities/script_ini_file.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ LPCSTR CScriptIniFile::update(LPCSTR file_name)
2626
return *shared_str(S1);
2727
}
2828

29-
bool CScriptIniFile::line_exist(LPCSTR S, LPCSTR L) { return (!!inherited::line_exist(S, L)); }
30-
bool CScriptIniFile::section_exist(LPCSTR S) { return (!!inherited::section_exist(S)); }
31-
int CScriptIniFile::r_clsid(LPCSTR S, LPCSTR L) { return (object_factory().script_clsid(inherited::r_clsid(S, L))); }
32-
bool CScriptIniFile::r_bool(LPCSTR S, LPCSTR L) { return (!!inherited::r_bool(S, L)); }
29+
bool CScriptIniFile::line_exist(LPCSTR S, LPCSTR L) { return !!inherited::line_exist(S, L); }
30+
bool CScriptIniFile::section_exist(LPCSTR S) { return !!inherited::section_exist(S); }
31+
int CScriptIniFile::r_clsid(LPCSTR S, LPCSTR L) { return object_factory().script_clsid(inherited::r_clsid(S, L)); }
32+
bool CScriptIniFile::r_bool(LPCSTR S, LPCSTR L) { return !!inherited::r_bool(S, L); }
3333
int CScriptIniFile::r_token(LPCSTR S, LPCSTR L, const CScriptTokenList& token_list)
3434
{
3535
return inherited::r_token(S, L, &*token_list.tokens().begin());

src/xrServerEntities/xrServer_Object_Base.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ CSE_Abstract::CSE_Abstract(LPCSTR caSection)
9090

9191
// m_spawn_probability = 1.f;
9292
m_spawn_flags.zero();
93-
m_spawn_flags.set(flSpawnEnabled, TRUE);
94-
m_spawn_flags.set(flSpawnOnSurgeOnly, TRUE);
95-
m_spawn_flags.set(flSpawnSingleItemOnly, TRUE);
96-
m_spawn_flags.set(flSpawnIfDestroyedOnly, TRUE);
97-
m_spawn_flags.set(flSpawnInfiniteCount, TRUE);
93+
m_spawn_flags.set(flSpawnEnabled, true);
94+
m_spawn_flags.set(flSpawnOnSurgeOnly, true);
95+
m_spawn_flags.set(flSpawnSingleItemOnly, true);
96+
m_spawn_flags.set(flSpawnIfDestroyedOnly, true);
97+
m_spawn_flags.set(flSpawnInfiniteCount, true);
9898
// m_max_spawn_count = 1;
9999
// m_spawn_control = "";
100100
// m_spawn_count = 0;
@@ -180,7 +180,7 @@ void CSE_Abstract::Spawn_Write(NET_Packet& tNetPacket, BOOL bLocal)
180180
tNetPacket.w_u16(ID_Parent);
181181
tNetPacket.w_u16(ID_Phantom);
182182

183-
s_flags.set(M_SPAWN_VERSION, TRUE);
183+
s_flags.set(M_SPAWN_VERSION, true);
184184
if (bLocal)
185185
tNetPacket.w_u16(u16(s_flags.flags | M_SPAWN_OBJECT_LOCAL));
186186
else

src/xrServerEntities/xrServer_Objects_ALife.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ CSE_ALifeObject::CSE_ALifeObject(LPCSTR caSection) : CSE_Abstract(caSection)
382382
#ifdef XRSE_FACTORY_EXPORTS
383383
fp_data.inc();
384384
#endif // XRSE_FACTORY_EXPORTS
385-
m_flags.set(flOfflineNoMove, FALSE);
385+
m_flags.set(flOfflineNoMove, false);
386386
seed(u32(CPU::QPC() & 0xffffffff));
387387
}
388388

@@ -669,8 +669,8 @@ void CSE_ALifeDynamicObjectVisual::FillProps(LPCSTR pref, PropItemVec& items)
669669
CSE_ALifePHSkeletonObject::CSE_ALifePHSkeletonObject(LPCSTR caSection)
670670
: CSE_ALifeDynamicObjectVisual(caSection), CSE_PHSkeleton(caSection)
671671
{
672-
m_flags.set(flUseSwitches, FALSE);
673-
m_flags.set(flSwitchOffline, FALSE);
672+
m_flags.set(flUseSwitches, false);
673+
m_flags.set(flSwitchOffline, false);
674674
}
675675

676676
CSE_ALifePHSkeletonObject::~CSE_ALifePHSkeletonObject() {}
@@ -719,11 +719,11 @@ void CSE_ALifePHSkeletonObject::FillProps(LPCSTR pref, PropItemVec& items)
719719
////////////////////////////////////////////////////////////////////////////
720720
CSE_ALifeSpaceRestrictor::CSE_ALifeSpaceRestrictor(LPCSTR caSection) : CSE_ALifeDynamicObject(caSection)
721721
{
722-
m_flags.set(flUseSwitches, FALSE);
722+
m_flags.set(flUseSwitches, false);
723723
m_space_restrictor_type = RestrictionSpace::eDefaultRestrictorTypeNone;
724-
m_flags.set(flUsedAI_Locations, FALSE);
725-
m_spawn_flags.set(flSpawnDestroyOnSpawn, FALSE);
726-
m_flags.set(flCheckForSeparator, TRUE);
724+
m_flags.set(flUsedAI_Locations, false);
725+
m_spawn_flags.set(flSpawnDestroyOnSpawn, false);
726+
m_flags.set(flCheckForSeparator, true);
727727
}
728728

729729
CSE_ALifeSpaceRestrictor::~CSE_ALifeSpaceRestrictor() {}
@@ -1163,8 +1163,8 @@ CSE_ALifeObjectHangingLamp::CSE_ALifeObjectHangingLamp(LPCSTR caSection)
11631163
color = 0xffffffff;
11641164
brightness = 1.f;
11651165
m_health = 100.f;
1166-
m_flags.set(flUseSwitches, FALSE);
1167-
m_flags.set(flSwitchOffline, FALSE);
1166+
m_flags.set(flUseSwitches, false);
1167+
m_flags.set(flSwitchOffline, false);
11681168

11691169
m_virtual_size = 0.1f;
11701170
m_ambient_radius = 10.f;
@@ -1446,8 +1446,8 @@ bool CSE_ALifeObjectHangingLamp::match_configuration() const throw()
14461446

14471447
CSE_ALifeObjectProjector::CSE_ALifeObjectProjector(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSection)
14481448
{
1449-
m_flags.set(flUseSwitches, FALSE);
1450-
m_flags.set(flSwitchOffline, FALSE);
1449+
m_flags.set(flUseSwitches, false);
1450+
m_flags.set(flSwitchOffline, false);
14511451
}
14521452

14531453
CSE_ALifeObjectProjector::~CSE_ALifeObjectProjector() {}
@@ -1518,9 +1518,9 @@ u32 CSE_ALifeSchedulable::ef_detector_type() const
15181518
CSE_ALifeHelicopter::CSE_ALifeHelicopter(LPCSTR caSection)
15191519
: CSE_ALifeDynamicObjectVisual(caSection), CSE_Motion(), CSE_PHSkeleton(caSection)
15201520
{
1521-
m_flags.set(flUseSwitches, FALSE);
1522-
m_flags.set(flSwitchOffline, FALSE);
1523-
m_flags.set(flInteractive, FALSE);
1521+
m_flags.set(flUseSwitches, false);
1522+
m_flags.set(flSwitchOffline, false);
1523+
m_flags.set(flInteractive, false);
15241524
}
15251525

15261526
CSE_ALifeHelicopter::~CSE_ALifeHelicopter() {}
@@ -1583,8 +1583,8 @@ CSE_ALifeCar::CSE_ALifeCar(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSe
15831583
{
15841584
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
15851585
set_visual(pSettings->r_string(caSection, "visual"));
1586-
m_flags.set(flUseSwitches, FALSE);
1587-
m_flags.set(flSwitchOffline, FALSE);
1586+
m_flags.set(flUseSwitches, false);
1587+
m_flags.set(flSwitchOffline, false);
15881588
health = 1.0f;
15891589
}
15901590

@@ -1711,8 +1711,8 @@ void CSE_ALifeCar::FillProps(LPCSTR pref, PropItemVec& values)
17111711
CSE_ALifeObjectBreakable::CSE_ALifeObjectBreakable(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSection)
17121712
{
17131713
m_health = 1.f;
1714-
m_flags.set(flUseSwitches, FALSE);
1715-
m_flags.set(flSwitchOffline, FALSE);
1714+
m_flags.set(flUseSwitches, false);
1715+
m_flags.set(flSwitchOffline, false);
17161716
}
17171717

17181718
CSE_ALifeObjectBreakable::~CSE_ALifeObjectBreakable() {}

src/xrServerEntities/xrServer_Objects_ALife_Items.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ void CSE_ALifeItemWeaponMagazined::FillProps(LPCSTR pref, PropItemVec& items) {
683683
CSE_ALifeItemWeaponMagazinedWGL::CSE_ALifeItemWeaponMagazinedWGL(LPCSTR caSection)
684684
: CSE_ALifeItemWeaponMagazined(caSection)
685685
{
686-
m_bGrenadeMode = 0;
686+
m_bGrenadeMode = false;
687687
}
688688

689689
CSE_ALifeItemWeaponMagazinedWGL::~CSE_ALifeItemWeaponMagazinedWGL() {}
@@ -932,8 +932,8 @@ void CSE_ALifeItemExplosive::FillProps(LPCSTR pref, PropItemVec& items) { inheri
932932
////////////////////////////////////////////////////////////////////////////
933933
CSE_ALifeItemBolt::CSE_ALifeItemBolt(LPCSTR caSection) : CSE_ALifeItem(caSection)
934934
{
935-
m_flags.set(flUseSwitches, FALSE);
936-
m_flags.set(flSwitchOffline, FALSE);
935+
m_flags.set(flUseSwitches, false);
936+
m_flags.set(flSwitchOffline, false);
937937
m_ef_weapon_type = READ_IF_EXISTS(pSettings, r_u32, caSection, "ef_weapon_type", u32(-1));
938938
}
939939

src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ CSE_ALifeTraderAbstract::CSE_ALifeTraderAbstract(LPCSTR caSection)
140140
m_deadbody_closed = false;
141141

142142
m_trader_flags.zero();
143-
m_trader_flags.set(eTraderFlagInfiniteAmmo, FALSE);
143+
m_trader_flags.set(eTraderFlagInfiniteAmmo, false);
144144
}
145145

146146
CSE_Abstract* CSE_ALifeTraderAbstract::init()
@@ -1375,8 +1375,8 @@ CSE_ALifeCreatureCrow::CSE_ALifeCreatureCrow(LPCSTR caSection) : CSE_ALifeCreatu
13751375
{
13761376
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
13771377
set_visual(pSettings->r_string(caSection, "visual"));
1378-
m_flags.set(flUseSwitches, FALSE);
1379-
m_flags.set(flSwitchOffline, FALSE);
1378+
m_flags.set(flUseSwitches, false);
1379+
m_flags.set(flSwitchOffline, false);
13801380
}
13811381

13821382
CSE_ALifeCreatureCrow::~CSE_ALifeCreatureCrow() {}
@@ -1405,8 +1405,8 @@ CSE_ALifeCreaturePhantom::CSE_ALifeCreaturePhantom(LPCSTR caSection) : CSE_ALife
14051405
{
14061406
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
14071407
set_visual(pSettings->r_string(caSection, "visual"));
1408-
m_flags.set(flUseSwitches, FALSE);
1409-
m_flags.set(flSwitchOffline, FALSE);
1408+
m_flags.set(flUseSwitches, false);
1409+
m_flags.set(flSwitchOffline, false);
14101410
}
14111411

14121412
CSE_ALifeCreaturePhantom::~CSE_ALifeCreaturePhantom() {}
@@ -1803,7 +1803,7 @@ void CSE_ALifeHumanAbstract::FillProps(LPCSTR pref, PropItemVec& items)
18031803
CSE_ALifeHumanStalker::CSE_ALifeHumanStalker(LPCSTR caSection)
18041804
: CSE_ALifeHumanAbstract(caSection), CSE_PHSkeleton(caSection)
18051805
{
1806-
m_trader_flags.set(eTraderFlagInfiniteAmmo, TRUE);
1806+
m_trader_flags.set(eTraderFlagInfiniteAmmo, true);
18071807
m_start_dialog = "";
18081808
}
18091809

@@ -1874,7 +1874,7 @@ CSE_Abstract* CSE_ALifeOnlineOfflineGroup::init()
18741874
#endif
18751875

18761876
VERIFY(m_members.empty());
1877-
m_flags.set(flUsedAI_Locations, FALSE);
1877+
m_flags.set(flUsedAI_Locations, false);
18781878

18791879
return (this);
18801880
}

0 commit comments

Comments
 (0)