Skip to content

Commit d204b44

Browse files
committed
Rename macro to ENABLE_CONFIGURABLE_SHROUD
1 parent b8c0927 commit d204b44

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

Core/GameEngine/Include/Common/GameDefines.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#endif
3535

3636
// Originally the configurable shroud sat behind #if defined(RTS_DEBUG) || defined(RTS_INTERNAL)
37-
// Disable RTS_CONFIGURABLE_SHROUD to make shroud hacking a bit more difficult in Release game builds.
38-
// Enable RTS_CONFIGURABLE_SHROUD to properly draw the terrain in World Builder without RTS_DEBUG compiled in.
39-
#ifndef RTS_CONFIGURABLE_SHROUD
40-
#define RTS_CONFIGURABLE_SHROUD (1) // When enabled, the GlobalData contains a field to turn on/off the shroud, otherwise shroud is always enabled
37+
// Enable the configurable shroud to properly draw the terrain in World Builder without RTS_DEBUG compiled in.
38+
// Disable the configurable shroud to make shroud hacking a bit less accessible in Release game builds.
39+
#ifndef ENABLE_CONFIGURABLE_SHROUD
40+
#define ENABLE_CONFIGURABLE_SHROUD (1) // When enabled, the GlobalData contains a field to turn on/off the shroud, otherwise shroud is always enabled
4141
#endif

GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ class GlobalData : public SubsystemInterface
481481
Bool m_TiVOFastMode; ///< When true, the client speeds up the framerate... set by HOTKEY!
482482

483483

484-
#if RTS_CONFIGURABLE_SHROUD
484+
#if ENABLE_CONFIGURABLE_SHROUD
485485
Bool m_shroudOn;
486486
#endif
487487

GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ Int parseNoFX(char *args[], int)
723723
return 1;
724724
}
725725

726-
#if RTS_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
726+
#if ENABLE_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
727727
Int parseNoShroud(char *args[], int)
728728
{
729729
TheWritableGlobalData->m_shroudOn = FALSE;
@@ -1245,7 +1245,7 @@ static CommandLineParam paramsForEngineInit[] =
12451245
{ "-ReplayCRCInterval", parseReplayCRCInterval },
12461246
#endif
12471247

1248-
#if RTS_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
1248+
#if ENABLE_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
12491249
{ "-noshroud", parseNoShroud },
12501250
#endif
12511251

GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
488488
{ "KeyboardCameraRotateSpeed", INI::parseReal, NULL, offsetof( GlobalData, m_keyboardCameraRotateSpeed ) },
489489
{ "PlayStats", INI::parseInt, NULL, offsetof( GlobalData, m_playStats ) },
490490

491-
#if RTS_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
491+
#if ENABLE_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
492492
{ "ShroudOn", INI::parseBool, NULL, offsetof( GlobalData, m_shroudOn ) },
493493
#endif
494494

@@ -551,7 +551,7 @@ GlobalData::GlobalData()
551551
#endif
552552
m_TiVOFastMode = FALSE;
553553

554-
#if RTS_CONFIGURABLE_SHROUD
554+
#if ENABLE_CONFIGURABLE_SHROUD
555555
m_shroudOn = TRUE;
556556
#endif
557557

GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void GameClient::update( void )
657657

658658
if (!freezeTime)
659659
{
660-
#if RTS_CONFIGURABLE_SHROUD
660+
#if ENABLE_CONFIGURABLE_SHROUD
661661
if (TheGlobalData->m_shroudOn)
662662
#else
663663
if (true)
@@ -688,7 +688,7 @@ void GameClient::update( void )
688688
while (draw)
689689
{ // update() could free the Drawable, so go ahead and grab 'next'
690690
Drawable* next = draw->getNextDrawable();
691-
#if RTS_CONFIGURABLE_SHROUD
691+
#if ENABLE_CONFIGURABLE_SHROUD
692692
if (TheGlobalData->m_shroudOn)
693693
#else
694694
if (true)

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ void InGameUI::createCommandHint( const GameMessage *msg )
25482548
{
25492549
const Object* obj = draw->getObject();
25502550
Int localPlayerIndex = ThePlayerList ? ThePlayerList->getLocalPlayer()->getPlayerIndex() : 0;
2551-
#if RTS_CONFIGURABLE_SHROUD
2551+
#if ENABLE_CONFIGURABLE_SHROUD
25522552
ObjectShroudStatus ss = (!obj || !TheGlobalData->m_shroudOn) ? OBJECTSHROUD_CLEAR : obj->getShroudedStatus(localPlayerIndex);
25532553
#else
25542554
ObjectShroudStatus ss = (!obj) ? OBJECTSHROUD_CLEAR : obj->getShroudedStatus(localPlayerIndex);

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ void W3DRadar::buildTerrainTexture( TerrainLogic *terrain )
12551255
//-------------------------------------------------------------------------------------------------
12561256
void W3DRadar::clearShroud()
12571257
{
1258-
#if RTS_CONFIGURABLE_SHROUD
1258+
#if ENABLE_CONFIGURABLE_SHROUD
12591259
if (!TheGlobalData->m_shroudOn)
12601260
return;
12611261
#endif
@@ -1275,7 +1275,7 @@ void W3DRadar::clearShroud()
12751275
//-------------------------------------------------------------------------------------------------
12761276
void W3DRadar::setShroudLevel(Int shroudX, Int shroudY, CellShroudStatus setting)
12771277
{
1278-
#if RTS_CONFIGURABLE_SHROUD
1278+
#if ENABLE_CONFIGURABLE_SHROUD
12791279
if (!TheGlobalData->m_shroudOn)
12801280
return;
12811281
#endif
@@ -1412,7 +1412,7 @@ void W3DRadar::draw( Int pixelX, Int pixelY, Int width, Int height )
14121412
TheDisplay->drawImage( m_overlayImage, ul.x, ul.y, lr.x, lr.y );
14131413

14141414
// draw the shroud image
1415-
#if RTS_CONFIGURABLE_SHROUD
1415+
#if ENABLE_CONFIGURABLE_SHROUD
14161416
if( TheGlobalData->m_shroudOn )
14171417
#else
14181418
if (true)

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/BaseHeightMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ BaseHeightMapRenderObjClass::BaseHeightMapRenderObjClass(void)
320320
#ifdef DO_ROADS
321321
m_roadBuffer = NEW W3DRoadBuffer;
322322
#endif
323-
#if RTS_CONFIGURABLE_SHROUD
323+
#if ENABLE_CONFIGURABLE_SHROUD
324324
if (TheGlobalData->m_shroudOn)
325325
m_shroud = NEW W3DShroud;
326326
#else

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ RTS3DScene::RTS3DScene()
105105
m_scratchLight = NEW_REF( LightClass, (LightClass::DIRECTIONAL) );
106106
// REF_PTR_SET(m_globalLight[lightIndex], pLight);
107107

108-
#if RTS_CONFIGURABLE_SHROUD
108+
#if ENABLE_CONFIGURABLE_SHROUD
109109
if (TheGlobalData->m_shroudOn)
110110
m_shroudMaterialPass = NEW_REF(W3DShroudMaterialPassClass,());
111111
else
@@ -796,7 +796,7 @@ void RTS3DScene::renderOneObject(RenderInfoClass &rinfo, RenderObjClass *robj, I
796796

797797
if (drawInfo)
798798
{
799-
#if RTS_CONFIGURABLE_SHROUD
799+
#if ENABLE_CONFIGURABLE_SHROUD
800800
if (!TheGlobalData->m_shroudOn)
801801
ss = OBJECTSHROUD_CLEAR;
802802
#endif

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ static void drawablePostDraw( Drawable *draw, void *userData )
994994

995995
Object* obj = draw->getObject();
996996
Int localPlayerIndex = ThePlayerList ? ThePlayerList->getLocalPlayer()->getPlayerIndex() : 0;
997-
#if RTS_CONFIGURABLE_SHROUD
997+
#if ENABLE_CONFIGURABLE_SHROUD
998998
ObjectShroudStatus ss = (!obj || !TheGlobalData->m_shroudOn) ? OBJECTSHROUD_CLEAR : obj->getShroudedStatus(localPlayerIndex);
999999
#else
10001000
ObjectShroudStatus ss = (!obj) ? OBJECTSHROUD_CLEAR : obj->getShroudedStatus(localPlayerIndex);

0 commit comments

Comments
 (0)