Skip to content

Commit

Permalink
Replace TRUE, FALSE with true, false
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Aug 5, 2017
1 parent 10c60c2 commit 62f56d7
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 58 deletions.
5 changes: 3 additions & 2 deletions src/Layers/xrRender/DetailManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ class ECORE_API CDetailManager
SlotItemVec items; // список кустиков
SlotItemVec r_items[3]; // список кустиков for render
};

enum SlotType
{
stReady = 0, // Ready to use
stPending, // Pending for decompression

stFORCEDWORD = 0xffffffff
};

struct Slot
{ // распакованый слот размером DETAIL_SLOT_SIZE
struct
Expand All @@ -84,6 +86,7 @@ class ECORE_API CDetailManager
vis.clear();
}
};

struct CacheSlot1
{
u32 empty;
Expand All @@ -101,10 +104,8 @@ class ECORE_API CDetailManager
typedef DetailVec::iterator DetailIt;
typedef poolSS<SlotItem, 4096> PSS;

public:
int dither[16][16];

public:
// swing values
struct SSwingValue
{
Expand Down
10 changes: 5 additions & 5 deletions src/Layers/xrRenderPC_R3/r3_rendertarget_enable_scissor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ void CRenderTarget::enable_dbt_bounds(light* L)
BOOL CRenderTarget::u_DBT_enable(float /*zMin*/, float /*zMax*/)
{
if (!RImplementation.o.nvdbt)
return FALSE;
return false;
if (!ps_r2_ls_flags.test(R2FLAG_USE_NVDBT))
return FALSE;
return false;

return FALSE;
return false;

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

// return TRUE;
// return true;
}

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

// Near plane intersection
BOOL near_intersect = FALSE;
bool near_intersect = false;
{
Fmatrix& M = Device.mFullTransform;
Fvector4 plane;
Expand Down
2 changes: 2 additions & 0 deletions src/utils/xrSE_Factory/script_properties_list_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ template <typename T>
struct CWrapHelper
{
typedef T result_type;

template <bool a>
static T* wrap_value(luabind::object object, LPCSTR name)
{
Expand All @@ -44,6 +45,7 @@ template <>
struct CWrapHelper<bool>
{
typedef BOOL result_type;

template <bool a>
static BOOL* wrap_value(luabind::object object, LPCSTR name)
{
Expand Down
10 changes: 5 additions & 5 deletions src/xrEngine/Device_destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ void CRenderDevice::Destroy()
if (!b_is_Ready)
return;
Log("Destroying Direct3D...");
ShowCursor(TRUE);
ShowCursor(true);
GlobalEnv.Render->ValidateHW();
GlobalEnv.DU->OnDeviceDestroy();
b_is_Ready = FALSE;
b_is_Ready = false;
Statistic->OnDeviceDestroy();
GlobalEnv.Render->destroy();
GlobalEnv.Render->OnDeviceDestroy(false);
Expand All @@ -38,11 +38,11 @@ void CRenderDevice::Reset(bool precache)
{
u32 dwWidth_before = dwWidth;
u32 dwHeight_before = dwHeight;
ShowCursor(TRUE);
ShowCursor(true);
u32 tm_start = TimerAsync();
GlobalEnv.Render->Reset(m_hWnd, dwWidth, dwHeight, fWidth_2, fHeight_2);
if (g_pGamePersistent)
g_pGamePersistent->Environment().bNeed_re_create_env = TRUE;
g_pGamePersistent->Environment().bNeed_re_create_env = true;
_SetupStates();
if (precache)
PreCache(20, true, false);
Expand All @@ -51,7 +51,7 @@ void CRenderDevice::Reset(bool precache)
// TODO: Remove this! It may hide crash
Memory.mem_compact();
#ifndef DEDICATED_SERVER
ShowCursor(FALSE);
ShowCursor(false);
#endif
seqDeviceReset.Process(rp_DeviceReset);
if (dwWidth_before != dwWidth || dwHeight_before != dwHeight)
Expand Down
15 changes: 7 additions & 8 deletions src/xrServerEntities/PropertiesListTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class PropItem
void AppendValue(PropValue* value)
{
if (!values.empty() && !value->Equal(values.front()))
m_Flags.set(flMixed, TRUE);
m_Flags.set(flMixed, true);
values.push_back(value);
}

Expand All @@ -206,7 +206,7 @@ class PropItem

void CheckMixed()
{
m_Flags.set(flMixed, FALSE);
m_Flags.set(flMixed, false);
if (values.size() > 1)
{
PropValueIt F = values.begin();
Expand All @@ -216,7 +216,7 @@ class PropItem
{
if (!(*it)->Equal(*F))
{
m_Flags.set(flMixed, TRUE);
m_Flags.set(flMixed, true);
break;
}
}
Expand Down Expand Up @@ -244,7 +244,7 @@ class PropItem
bool ApplyValue(const T2& val)
{
bool bChanged = false;
m_Flags.set(flMixed, FALSE);
m_Flags.set(flMixed, false);
for (PropValueIt it = values.begin(); values.end() != it; ++it)
{
T1* CV = smart_cast<T1*>(*it);
Expand All @@ -256,7 +256,7 @@ class PropItem
CV->OnChangeEvent(*it);
}
if (!CV->Equal(values.front()))
m_Flags.set(flMixed, TRUE);
m_Flags.set(flMixed, true);
}
return bChanged;
}
Expand Down Expand Up @@ -443,7 +443,6 @@ class CTextValue : public PropValue
public:
LPSTR value;

public:
typedef fastdelegate::FastDelegate2<PropValue*, xr_string&> TOnBeforeEditEvent;
typedef fastdelegate::FastDelegate2<PropValue*, xr_string&, bool> TOnAfterEditEvent;

Expand Down Expand Up @@ -798,7 +797,7 @@ class RListValue : public RTextValue
{
if (items != ((RListValue*)val)->items)
{
m_Owner->m_Flags.set(PropItem::flDisabled, TRUE);
m_Owner->m_Flags.set(PropItem::flDisabled, true);
return false;
}
return RTextValue::Equal(val);
Expand All @@ -815,7 +814,7 @@ class CListValue : public CTextValue
{
if (items != ((CListValue*)val)->items)
{
m_Owner->m_Flags.set(PropItem::flDisabled, TRUE);
m_Owner->m_Flags.set(PropItem::flDisabled, true);
return false;
}
return CTextValue::Equal(val);
Expand Down
8 changes: 4 additions & 4 deletions src/xrServerEntities/script_ini_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ LPCSTR CScriptIniFile::update(LPCSTR file_name)
return *shared_str(S1);
}

bool CScriptIniFile::line_exist(LPCSTR S, LPCSTR L) { return (!!inherited::line_exist(S, L)); }
bool CScriptIniFile::section_exist(LPCSTR S) { return (!!inherited::section_exist(S)); }
int CScriptIniFile::r_clsid(LPCSTR S, LPCSTR L) { return (object_factory().script_clsid(inherited::r_clsid(S, L))); }
bool CScriptIniFile::r_bool(LPCSTR S, LPCSTR L) { return (!!inherited::r_bool(S, L)); }
bool CScriptIniFile::line_exist(LPCSTR S, LPCSTR L) { return !!inherited::line_exist(S, L); }
bool CScriptIniFile::section_exist(LPCSTR S) { return !!inherited::section_exist(S); }
int CScriptIniFile::r_clsid(LPCSTR S, LPCSTR L) { return object_factory().script_clsid(inherited::r_clsid(S, L)); }
bool CScriptIniFile::r_bool(LPCSTR S, LPCSTR L) { return !!inherited::r_bool(S, L); }
int CScriptIniFile::r_token(LPCSTR S, LPCSTR L, const CScriptTokenList& token_list)
{
return inherited::r_token(S, L, &*token_list.tokens().begin());
Expand Down
12 changes: 6 additions & 6 deletions src/xrServerEntities/xrServer_Object_Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ CSE_Abstract::CSE_Abstract(LPCSTR caSection)

// m_spawn_probability = 1.f;
m_spawn_flags.zero();
m_spawn_flags.set(flSpawnEnabled, TRUE);
m_spawn_flags.set(flSpawnOnSurgeOnly, TRUE);
m_spawn_flags.set(flSpawnSingleItemOnly, TRUE);
m_spawn_flags.set(flSpawnIfDestroyedOnly, TRUE);
m_spawn_flags.set(flSpawnInfiniteCount, TRUE);
m_spawn_flags.set(flSpawnEnabled, true);
m_spawn_flags.set(flSpawnOnSurgeOnly, true);
m_spawn_flags.set(flSpawnSingleItemOnly, true);
m_spawn_flags.set(flSpawnIfDestroyedOnly, true);
m_spawn_flags.set(flSpawnInfiniteCount, true);
// m_max_spawn_count = 1;
// m_spawn_control = "";
// m_spawn_count = 0;
Expand Down Expand Up @@ -180,7 +180,7 @@ void CSE_Abstract::Spawn_Write(NET_Packet& tNetPacket, BOOL bLocal)
tNetPacket.w_u16(ID_Parent);
tNetPacket.w_u16(ID_Phantom);

s_flags.set(M_SPAWN_VERSION, TRUE);
s_flags.set(M_SPAWN_VERSION, true);
if (bLocal)
tNetPacket.w_u16(u16(s_flags.flags | M_SPAWN_OBJECT_LOCAL));
else
Expand Down
36 changes: 18 additions & 18 deletions src/xrServerEntities/xrServer_Objects_ALife.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ CSE_ALifeObject::CSE_ALifeObject(LPCSTR caSection) : CSE_Abstract(caSection)
#ifdef XRSE_FACTORY_EXPORTS
fp_data.inc();
#endif // XRSE_FACTORY_EXPORTS
m_flags.set(flOfflineNoMove, FALSE);
m_flags.set(flOfflineNoMove, false);
seed(u32(CPU::QPC() & 0xffffffff));
}

Expand Down Expand Up @@ -669,8 +669,8 @@ void CSE_ALifeDynamicObjectVisual::FillProps(LPCSTR pref, PropItemVec& items)
CSE_ALifePHSkeletonObject::CSE_ALifePHSkeletonObject(LPCSTR caSection)
: CSE_ALifeDynamicObjectVisual(caSection), CSE_PHSkeleton(caSection)
{
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
}

CSE_ALifePHSkeletonObject::~CSE_ALifePHSkeletonObject() {}
Expand Down Expand Up @@ -719,11 +719,11 @@ void CSE_ALifePHSkeletonObject::FillProps(LPCSTR pref, PropItemVec& items)
////////////////////////////////////////////////////////////////////////////
CSE_ALifeSpaceRestrictor::CSE_ALifeSpaceRestrictor(LPCSTR caSection) : CSE_ALifeDynamicObject(caSection)
{
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flUseSwitches, false);
m_space_restrictor_type = RestrictionSpace::eDefaultRestrictorTypeNone;
m_flags.set(flUsedAI_Locations, FALSE);
m_spawn_flags.set(flSpawnDestroyOnSpawn, FALSE);
m_flags.set(flCheckForSeparator, TRUE);
m_flags.set(flUsedAI_Locations, false);
m_spawn_flags.set(flSpawnDestroyOnSpawn, false);
m_flags.set(flCheckForSeparator, true);
}

CSE_ALifeSpaceRestrictor::~CSE_ALifeSpaceRestrictor() {}
Expand Down Expand Up @@ -1163,8 +1163,8 @@ CSE_ALifeObjectHangingLamp::CSE_ALifeObjectHangingLamp(LPCSTR caSection)
color = 0xffffffff;
brightness = 1.f;
m_health = 100.f;
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);

m_virtual_size = 0.1f;
m_ambient_radius = 10.f;
Expand Down Expand Up @@ -1446,8 +1446,8 @@ bool CSE_ALifeObjectHangingLamp::match_configuration() const throw()

CSE_ALifeObjectProjector::CSE_ALifeObjectProjector(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSection)
{
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
}

CSE_ALifeObjectProjector::~CSE_ALifeObjectProjector() {}
Expand Down Expand Up @@ -1518,9 +1518,9 @@ u32 CSE_ALifeSchedulable::ef_detector_type() const
CSE_ALifeHelicopter::CSE_ALifeHelicopter(LPCSTR caSection)
: CSE_ALifeDynamicObjectVisual(caSection), CSE_Motion(), CSE_PHSkeleton(caSection)
{
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flInteractive, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
m_flags.set(flInteractive, false);
}

CSE_ALifeHelicopter::~CSE_ALifeHelicopter() {}
Expand Down Expand Up @@ -1583,8 +1583,8 @@ CSE_ALifeCar::CSE_ALifeCar(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSe
{
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
set_visual(pSettings->r_string(caSection, "visual"));
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
health = 1.0f;
}

Expand Down Expand Up @@ -1711,8 +1711,8 @@ void CSE_ALifeCar::FillProps(LPCSTR pref, PropItemVec& values)
CSE_ALifeObjectBreakable::CSE_ALifeObjectBreakable(LPCSTR caSection) : CSE_ALifeDynamicObjectVisual(caSection)
{
m_health = 1.f;
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
}

CSE_ALifeObjectBreakable::~CSE_ALifeObjectBreakable() {}
Expand Down
6 changes: 3 additions & 3 deletions src/xrServerEntities/xrServer_Objects_ALife_Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ void CSE_ALifeItemWeaponMagazined::FillProps(LPCSTR pref, PropItemVec& items) {
CSE_ALifeItemWeaponMagazinedWGL::CSE_ALifeItemWeaponMagazinedWGL(LPCSTR caSection)
: CSE_ALifeItemWeaponMagazined(caSection)
{
m_bGrenadeMode = 0;
m_bGrenadeMode = false;
}

CSE_ALifeItemWeaponMagazinedWGL::~CSE_ALifeItemWeaponMagazinedWGL() {}
Expand Down Expand Up @@ -932,8 +932,8 @@ void CSE_ALifeItemExplosive::FillProps(LPCSTR pref, PropItemVec& items) { inheri
////////////////////////////////////////////////////////////////////////////
CSE_ALifeItemBolt::CSE_ALifeItemBolt(LPCSTR caSection) : CSE_ALifeItem(caSection)
{
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
m_ef_weapon_type = READ_IF_EXISTS(pSettings, r_u32, caSection, "ef_weapon_type", u32(-1));
}

Expand Down
14 changes: 7 additions & 7 deletions src/xrServerEntities/xrServer_Objects_ALife_Monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ CSE_ALifeTraderAbstract::CSE_ALifeTraderAbstract(LPCSTR caSection)
m_deadbody_closed = false;

m_trader_flags.zero();
m_trader_flags.set(eTraderFlagInfiniteAmmo, FALSE);
m_trader_flags.set(eTraderFlagInfiniteAmmo, false);
}

CSE_Abstract* CSE_ALifeTraderAbstract::init()
Expand Down Expand Up @@ -1375,8 +1375,8 @@ CSE_ALifeCreatureCrow::CSE_ALifeCreatureCrow(LPCSTR caSection) : CSE_ALifeCreatu
{
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
set_visual(pSettings->r_string(caSection, "visual"));
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
}

CSE_ALifeCreatureCrow::~CSE_ALifeCreatureCrow() {}
Expand Down Expand Up @@ -1405,8 +1405,8 @@ CSE_ALifeCreaturePhantom::CSE_ALifeCreaturePhantom(LPCSTR caSection) : CSE_ALife
{
if (pSettings->section_exist(caSection) && pSettings->line_exist(caSection, "visual"))
set_visual(pSettings->r_string(caSection, "visual"));
m_flags.set(flUseSwitches, FALSE);
m_flags.set(flSwitchOffline, FALSE);
m_flags.set(flUseSwitches, false);
m_flags.set(flSwitchOffline, false);
}

CSE_ALifeCreaturePhantom::~CSE_ALifeCreaturePhantom() {}
Expand Down Expand Up @@ -1803,7 +1803,7 @@ void CSE_ALifeHumanAbstract::FillProps(LPCSTR pref, PropItemVec& items)
CSE_ALifeHumanStalker::CSE_ALifeHumanStalker(LPCSTR caSection)
: CSE_ALifeHumanAbstract(caSection), CSE_PHSkeleton(caSection)
{
m_trader_flags.set(eTraderFlagInfiniteAmmo, TRUE);
m_trader_flags.set(eTraderFlagInfiniteAmmo, true);
m_start_dialog = "";
}

Expand Down Expand Up @@ -1874,7 +1874,7 @@ CSE_Abstract* CSE_ALifeOnlineOfflineGroup::init()
#endif

VERIFY(m_members.empty());
m_flags.set(flUsedAI_Locations, FALSE);
m_flags.set(flUsedAI_Locations, false);

return (this);
}
Expand Down

0 comments on commit 62f56d7

Please sign in to comment.