Skip to content

Commit a632526

Browse files
xezonCaball009
authored andcommitted
[GEN][ZH] Fix VTune GameDataDebug.ini field parse error introduced by TheSuperHackers#1231 (TheSuperHackers#1245)
1 parent b96ce9e commit a632526

File tree

10 files changed

+16
-44
lines changed

10 files changed

+16
-44
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,8 @@ class GlobalData : public SubsystemInterface
465465
Int m_playStats; ///< Int whether we want to log play stats or not, if <= 0 then we don't log
466466

467467
Bool m_TiVOFastMode; ///< When true, the client speeds up the framerate... set by HOTKEY!
468+
468469

469-
#if defined(RTS_PROFILE)
470-
Bool m_vTune;
471-
#endif
472470

473471
#if defined(RTS_DEBUG)
474472
Bool m_wireframe;
@@ -485,6 +483,7 @@ class GlobalData : public SubsystemInterface
485483
Bool m_disableMilitaryCaption; ///< if true, military briefings go fast
486484
Int m_benchmarkTimer; ///< how long to play the game in benchmark mode?
487485
Bool m_checkForLeaks;
486+
Bool m_vTune;
488487
Bool m_debugCamera; ///< Used to display Camera debug information
489488
Bool m_debugVisibility; ///< Should we actively debug the visibility
490489
Int m_debugVisibilityTileCount; ///< How many tiles we should show when debugging visibility

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,6 @@ Int parseLogAssets( char *args[], int num )
697697
return 1;
698698
}
699699

700-
#endif // defined(RTS_DEBUG)
701-
702-
#if defined(RTS_PROFILE)
703-
704700
/// begin stuff for VTUNE
705701
Int parseVTune ( char *args[], int num )
706702
{
@@ -710,7 +706,7 @@ Int parseVTune ( char *args[], int num )
710706
}
711707
/// end stuff for VTUNE
712708

713-
#endif // defined(RTS_PROFILE)
709+
#endif // defined(RTS_DEBUG)
714710

715711
//=============================================================================
716712
//=============================================================================
@@ -1278,6 +1274,7 @@ static CommandLineParam paramsForEngineInit[] =
12781274
{ "-DemoLoadScreen", parseDemoLoadScreen },
12791275
{ "-cameraDebug", parseCameraDebug },
12801276
{ "-logToCon", parseLogToConsole },
1277+
{ "-vTune", parseVTune },
12811278
{ "-selectTheUnselectable", parseSelectAll },
12821279
{ "-RunAhead", parseRunAhead },
12831280
{ "-noshroud", parseNoShroud },
@@ -1302,10 +1299,6 @@ static CommandLineParam paramsForEngineInit[] =
13021299

13031300
#endif
13041301

1305-
#if defined(RTS_PROFILE)
1306-
{ "-vTune", parseVTune },
1307-
#endif
1308-
13091302
#ifdef DEBUG_LOGGING
13101303
{ "-setDebugLevel", parseSetDebugLevel },
13111304
{ "-clearDebugLevel", parseClearDebugLevel },

Generals/Code/GameEngine/Source/Common/GameEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void GameEngine::init()
305305

306306

307307
#if defined(RTS_DEBUG)
308-
// If we're in Debug or Internal, load the Debug info as well.
308+
// If we're in Debug, load the Debug settings as well.
309309
ini.load( AsciiString( "Data\\INI\\GameDataDebug.ini" ), INI_LOAD_OVERWRITE, NULL );
310310
#endif
311311

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,6 @@ 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 defined(RTS_PROFILE)
492-
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
493-
#endif
494-
495491
#if defined(RTS_DEBUG)
496492
{ "DisableCameraFade", INI::parseBool, NULL, offsetof( GlobalData, m_disableCameraFade ) },
497493
{ "DisableScriptedInputDisabling", INI::parseBool, NULL, offsetof( GlobalData, m_disableScriptedInputDisabling ) },
@@ -518,6 +514,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
518514
{ "MaxDebugThreatMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugThreat) },
519515
{ "DebugCashValueMapTileDuration", INI::parseInt, NULL, offsetof( GlobalData, m_debugCashValueMapTileDuration) },
520516
{ "MaxDebugCashValueMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugValue) },
517+
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
521518
{ "SaveStats", INI::parseBool, NULL, offsetof( GlobalData, m_saveStats ) },
522519
{ "UseLocalMOTD", INI::parseBool, NULL, offsetof( GlobalData, m_useLocalMOTD ) },
523520
{ "BaseStatsDir", INI::parseAsciiString,NULL, offsetof( GlobalData, m_baseStatsDir ) },
@@ -548,10 +545,6 @@ GlobalData::GlobalData()
548545

549546
m_TiVOFastMode = FALSE;
550547

551-
#if defined(RTS_PROFILE)
552-
m_vTune = false;
553-
#endif
554-
555548
#if defined(RTS_DEBUG)
556549
m_wireframe = 0;
557550
m_stateMachineDebug = FALSE;
@@ -576,6 +569,7 @@ GlobalData::GlobalData()
576569
m_debugCashValueMap = FALSE;
577570
m_maxDebugValue = 10000;
578571
m_debugCashValueMapTileDuration = LOGICFRAMES_PER_SECOND; // Changed By Sadullah Nader
572+
m_vTune = false;
579573
m_checkForLeaks = TRUE;
580574
m_benchmarkTimer = -1;
581575
m_allowUnselectableSelection = FALSE;

Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Bool st_particleSystemNeedsStopping = FALSE; ///< Set along with st_particleSyst
9999
#define FORMAT_STRING_LEADING_STRING "%s%.2f"
100100
// That's it for particle editor
101101

102-
#if defined(RTS_PROFILE)
102+
#if defined(RTS_DEBUG)
103103
#define DO_VTUNE_STUFF
104104
#endif
105105

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,8 @@ class GlobalData : public SubsystemInterface
480480
Bool m_specialPowerUsesDelay ;
481481
#endif
482482
Bool m_TiVOFastMode; ///< When true, the client speeds up the framerate... set by HOTKEY!
483+
483484

484-
#if defined(RTS_PROFILE)
485-
Bool m_vTune;
486-
#endif
487485

488486
#if defined(RTS_DEBUG)
489487
Bool m_wireframe;
@@ -499,6 +497,7 @@ class GlobalData : public SubsystemInterface
499497
Bool m_disableMilitaryCaption; ///< if true, military briefings go fast
500498
Int m_benchmarkTimer; ///< how long to play the game in benchmark mode?
501499
Bool m_checkForLeaks;
500+
Bool m_vTune;
502501
Bool m_debugCamera; ///< Used to display Camera debug information
503502
Bool m_debugVisibility; ///< Should we actively debug the visibility
504503
Int m_debugVisibilityTileCount; ///< How many tiles we should show when debugging visibility

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,6 @@ Int parseLogAssets( char *args[], int num )
697697
return 1;
698698
}
699699

700-
#endif // defined(RTS_DEBUG)
701-
702-
#if defined(RTS_PROFILE)
703-
704700
/// begin stuff for VTUNE
705701
Int parseVTune ( char *args[], int num )
706702
{
@@ -710,7 +706,7 @@ Int parseVTune ( char *args[], int num )
710706
}
711707
/// end stuff for VTUNE
712708

713-
#endif // defined(RTS_PROFILE)
709+
#endif // defined(RTS_DEBUG)
714710

715711
//=============================================================================
716712
//=============================================================================
@@ -1278,6 +1274,7 @@ static CommandLineParam paramsForEngineInit[] =
12781274
{ "-DemoLoadScreen", parseDemoLoadScreen },
12791275
{ "-cameraDebug", parseCameraDebug },
12801276
{ "-logToCon", parseLogToConsole },
1277+
{ "-vTune", parseVTune },
12811278
{ "-selectTheUnselectable", parseSelectAll },
12821279
{ "-RunAhead", parseRunAhead },
12831280
{ "-noshroud", parseNoShroud },
@@ -1302,10 +1299,6 @@ static CommandLineParam paramsForEngineInit[] =
13021299

13031300
#endif
13041301

1305-
#if defined(RTS_PROFILE)
1306-
{ "-vTune", parseVTune },
1307-
#endif
1308-
13091302
#ifdef DEBUG_LOGGING
13101303
{ "-setDebugLevel", parseSetDebugLevel },
13111304
{ "-clearDebugLevel", parseClearDebugLevel },

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void GameEngine::init()
376376

377377

378378
#if defined(RTS_DEBUG)
379-
// If we're in Debug or Internal, load the Debug info as well.
379+
// If we're in Debug, load the Debug settings as well.
380380
ini.load( AsciiString( "Data\\INI\\GameDataDebug.ini" ), INI_LOAD_OVERWRITE, NULL );
381381
#endif
382382

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,6 @@ 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 defined(RTS_PROFILE)
492-
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
493-
#endif
494-
495491
#if defined(RTS_DEBUG)
496492
{ "DisableCameraFade", INI::parseBool, NULL, offsetof( GlobalData, m_disableCameraFade ) },
497493
{ "DisableScriptedInputDisabling", INI::parseBool, NULL, offsetof( GlobalData, m_disableScriptedInputDisabling ) },
@@ -518,6 +514,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
518514
{ "MaxDebugThreatMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugThreat) },
519515
{ "DebugCashValueMapTileDuration", INI::parseInt, NULL, offsetof( GlobalData, m_debugCashValueMapTileDuration) },
520516
{ "MaxDebugCashValueMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugValue) },
517+
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
521518
{ "SaveStats", INI::parseBool, NULL, offsetof( GlobalData, m_saveStats ) },
522519
{ "UseLocalMOTD", INI::parseBool, NULL, offsetof( GlobalData, m_useLocalMOTD ) },
523520
{ "BaseStatsDir", INI::parseAsciiString,NULL, offsetof( GlobalData, m_baseStatsDir ) },
@@ -551,10 +548,6 @@ GlobalData::GlobalData()
551548
#endif
552549
m_TiVOFastMode = FALSE;
553550

554-
#if defined(RTS_PROFILE)
555-
m_vTune = false;
556-
#endif
557-
558551
#if defined(RTS_DEBUG)
559552
m_wireframe = 0;
560553
m_stateMachineDebug = FALSE;
@@ -578,6 +571,7 @@ GlobalData::GlobalData()
578571
m_debugCashValueMap = FALSE;
579572
m_maxDebugValue = 10000;
580573
m_debugCashValueMapTileDuration = LOGICFRAMES_PER_SECOND; // Changed By Sadullah Nader
574+
m_vTune = false;
581575
m_checkForLeaks = TRUE;
582576
m_benchmarkTimer = -1;
583577

GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Bool st_particleSystemNeedsStopping = FALSE; ///< Set along with st_particleSyst
100100
#define FORMAT_STRING_LEADING_STRING "%s%.2f"
101101
// That's it for particle editor
102102

103-
#if defined(RTS_PROFILE)
103+
#if defined(RTS_DEBUG)
104104
#define DO_VTUNE_STUFF
105105
#endif
106106

0 commit comments

Comments
 (0)