Skip to content

Commit c369e8e

Browse files
committed
Rename macro to ENABLE_CONFIGURABLE_SHROUD
1 parent 39fde6a commit c369e8e

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
@@ -459,7 +459,7 @@ class GlobalData : public SubsystemInterface
459459
Bool m_TiVOFastMode; ///< When true, the client speeds up the framerate... set by HOTKEY!
460460

461461

462-
#if RTS_CONFIGURABLE_SHROUD
462+
#if ENABLE_CONFIGURABLE_SHROUD
463463
Bool m_shroudOn;
464464
#endif
465465

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ Int parseNoFX(char *args[], int)
729729
return 1;
730730
}
731731

732-
#if RTS_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
732+
#if ENABLE_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
733733
Int parseNoShroud(char *args[], int)
734734
{
735735
if (TheWritableGlobalData)
@@ -1285,7 +1285,7 @@ static CommandLineParam params[] =
12851285
{ "-ReplayCRCInterval", parseReplayCRCInterval },
12861286
#endif
12871287

1288-
#if RTS_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
1288+
#if ENABLE_CONFIGURABLE_SHROUD && (defined(RTS_DEBUG) || defined(RTS_INTERNAL))
12891289
{ "-noshroud", parseNoShroud },
12901290
#endif
12911291

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
@@ -660,7 +660,7 @@ void GameClient::update( void )
660660

661661
if (!freezeTime)
662662
{
663-
#if RTS_CONFIGURABLE_SHROUD
663+
#if ENABLE_CONFIGURABLE_SHROUD
664664
if (TheGlobalData->m_shroudOn)
665665
#else
666666
if (true)
@@ -691,7 +691,7 @@ void GameClient::update( void )
691691
while (draw)
692692
{ // update() could free the Drawable, so go ahead and grab 'next'
693693
Drawable* next = draw->getNextDrawable();
694-
#if RTS_CONFIGURABLE_SHROUD
694+
#if ENABLE_CONFIGURABLE_SHROUD
695695
if (TheGlobalData->m_shroudOn)
696696
#else
697697
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
@@ -790,7 +790,7 @@ void RTS3DScene::renderOneObject(RenderInfoClass &rinfo, RenderObjClass *robj, I
790790

791791
if (drawInfo)
792792
{
793-
#if RTS_CONFIGURABLE_SHROUD
793+
#if ENABLE_CONFIGURABLE_SHROUD
794794
if (!TheGlobalData->m_shroudOn)
795795
ss = OBJECTSHROUD_CLEAR;
796796
#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);

GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ BOOL CWorldBuilderApp::InitInstance()
433433
DEBUG_ASSERTCRASH(!TheGlobalData->m_useHalfHeightMap, ("TheGlobalData->m_useHalfHeightMap : Don't use this setting in WB."));
434434
TheWritableGlobalData->m_useHalfHeightMap = false;
435435

436-
#if RTS_CONFIGURABLE_SHROUD
436+
#if ENABLE_CONFIGURABLE_SHROUD
437437
// WB never uses the shroud. With shroud, terrain is black.
438438
TheWritableGlobalData->m_shroudOn = FALSE;
439439
#endif

0 commit comments

Comments
 (0)