Skip to content

[GEN][ZH] Fix VTune GameDataDebug.ini field parse error introduced by #1231 #1245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,8 @@ class GlobalData : public SubsystemInterface
Int m_playStats; ///< Int whether we want to log play stats or not, if <= 0 then we don't log

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


#if defined(RTS_PROFILE)
Bool m_vTune;
#endif

#if defined(RTS_DEBUG)
Bool m_wireframe;
Expand All @@ -485,6 +483,7 @@ class GlobalData : public SubsystemInterface
Bool m_disableMilitaryCaption; ///< if true, military briefings go fast
Int m_benchmarkTimer; ///< how long to play the game in benchmark mode?
Bool m_checkForLeaks;
Bool m_vTune;
Bool m_debugCamera; ///< Used to display Camera debug information
Bool m_debugVisibility; ///< Should we actively debug the visibility
Int m_debugVisibilityTileCount; ///< How many tiles we should show when debugging visibility
Expand Down
11 changes: 2 additions & 9 deletions Generals/Code/GameEngine/Source/Common/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,6 @@ Int parseLogAssets( char *args[], int num )
return 1;
}

#endif // defined(RTS_DEBUG)

#if defined(RTS_PROFILE)

/// begin stuff for VTUNE
Int parseVTune ( char *args[], int num )
{
Expand All @@ -710,7 +706,7 @@ Int parseVTune ( char *args[], int num )
}
/// end stuff for VTUNE

#endif // defined(RTS_PROFILE)
#endif // defined(RTS_DEBUG)

//=============================================================================
//=============================================================================
Expand Down Expand Up @@ -1278,6 +1274,7 @@ static CommandLineParam paramsForEngineInit[] =
{ "-DemoLoadScreen", parseDemoLoadScreen },
{ "-cameraDebug", parseCameraDebug },
{ "-logToCon", parseLogToConsole },
{ "-vTune", parseVTune },
{ "-selectTheUnselectable", parseSelectAll },
{ "-RunAhead", parseRunAhead },
{ "-noshroud", parseNoShroud },
Expand All @@ -1302,10 +1299,6 @@ static CommandLineParam paramsForEngineInit[] =

#endif

#if defined(RTS_PROFILE)
{ "-vTune", parseVTune },
#endif

#ifdef DEBUG_LOGGING
{ "-setDebugLevel", parseSetDebugLevel },
{ "-clearDebugLevel", parseClearDebugLevel },
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void GameEngine::init()


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

Expand Down
10 changes: 2 additions & 8 deletions Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,6 @@ GlobalData* GlobalData::m_theOriginal = NULL;
{ "KeyboardCameraRotateSpeed", INI::parseReal, NULL, offsetof( GlobalData, m_keyboardCameraRotateSpeed ) },
{ "PlayStats", INI::parseInt, NULL, offsetof( GlobalData, m_playStats ) },

#if defined(RTS_PROFILE)
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
#endif

#if defined(RTS_DEBUG)
{ "DisableCameraFade", INI::parseBool, NULL, offsetof( GlobalData, m_disableCameraFade ) },
{ "DisableScriptedInputDisabling", INI::parseBool, NULL, offsetof( GlobalData, m_disableScriptedInputDisabling ) },
Expand All @@ -518,6 +514,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
{ "MaxDebugThreatMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugThreat) },
{ "DebugCashValueMapTileDuration", INI::parseInt, NULL, offsetof( GlobalData, m_debugCashValueMapTileDuration) },
{ "MaxDebugCashValueMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugValue) },
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
{ "SaveStats", INI::parseBool, NULL, offsetof( GlobalData, m_saveStats ) },
{ "UseLocalMOTD", INI::parseBool, NULL, offsetof( GlobalData, m_useLocalMOTD ) },
{ "BaseStatsDir", INI::parseAsciiString,NULL, offsetof( GlobalData, m_baseStatsDir ) },
Expand Down Expand Up @@ -548,10 +545,6 @@ GlobalData::GlobalData()

m_TiVOFastMode = FALSE;

#if defined(RTS_PROFILE)
m_vTune = false;
#endif

#if defined(RTS_DEBUG)
m_wireframe = 0;
m_stateMachineDebug = FALSE;
Expand All @@ -576,6 +569,7 @@ GlobalData::GlobalData()
m_debugCashValueMap = FALSE;
m_maxDebugValue = 10000;
m_debugCashValueMapTileDuration = LOGICFRAMES_PER_SECOND; // Changed By Sadullah Nader
m_vTune = false;
m_checkForLeaks = TRUE;
m_benchmarkTimer = -1;
m_allowUnselectableSelection = FALSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Bool st_particleSystemNeedsStopping = FALSE; ///< Set along with st_particleSyst
#define FORMAT_STRING_LEADING_STRING "%s%.2f"
// That's it for particle editor

#if defined(RTS_PROFILE)
#if defined(RTS_DEBUG)
#define DO_VTUNE_STUFF
#endif

Expand Down
5 changes: 2 additions & 3 deletions GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,8 @@ class GlobalData : public SubsystemInterface
Bool m_specialPowerUsesDelay ;
#endif
Bool m_TiVOFastMode; ///< When true, the client speeds up the framerate... set by HOTKEY!


#if defined(RTS_PROFILE)
Bool m_vTune;
#endif

#if defined(RTS_DEBUG)
Bool m_wireframe;
Expand All @@ -499,6 +497,7 @@ class GlobalData : public SubsystemInterface
Bool m_disableMilitaryCaption; ///< if true, military briefings go fast
Int m_benchmarkTimer; ///< how long to play the game in benchmark mode?
Bool m_checkForLeaks;
Bool m_vTune;
Bool m_debugCamera; ///< Used to display Camera debug information
Bool m_debugVisibility; ///< Should we actively debug the visibility
Int m_debugVisibilityTileCount; ///< How many tiles we should show when debugging visibility
Expand Down
11 changes: 2 additions & 9 deletions GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,6 @@ Int parseLogAssets( char *args[], int num )
return 1;
}

#endif // defined(RTS_DEBUG)

#if defined(RTS_PROFILE)

/// begin stuff for VTUNE
Int parseVTune ( char *args[], int num )
{
Expand All @@ -710,7 +706,7 @@ Int parseVTune ( char *args[], int num )
}
/// end stuff for VTUNE

#endif // defined(RTS_PROFILE)
#endif // defined(RTS_DEBUG)

//=============================================================================
//=============================================================================
Expand Down Expand Up @@ -1278,6 +1274,7 @@ static CommandLineParam paramsForEngineInit[] =
{ "-DemoLoadScreen", parseDemoLoadScreen },
{ "-cameraDebug", parseCameraDebug },
{ "-logToCon", parseLogToConsole },
{ "-vTune", parseVTune },
{ "-selectTheUnselectable", parseSelectAll },
{ "-RunAhead", parseRunAhead },
{ "-noshroud", parseNoShroud },
Expand All @@ -1302,10 +1299,6 @@ static CommandLineParam paramsForEngineInit[] =

#endif

#if defined(RTS_PROFILE)
{ "-vTune", parseVTune },
#endif

#ifdef DEBUG_LOGGING
{ "-setDebugLevel", parseSetDebugLevel },
{ "-clearDebugLevel", parseClearDebugLevel },
Expand Down
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void GameEngine::init()


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

Expand Down
10 changes: 2 additions & 8 deletions GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,6 @@ GlobalData* GlobalData::m_theOriginal = NULL;
{ "KeyboardCameraRotateSpeed", INI::parseReal, NULL, offsetof( GlobalData, m_keyboardCameraRotateSpeed ) },
{ "PlayStats", INI::parseInt, NULL, offsetof( GlobalData, m_playStats ) },

#if defined(RTS_PROFILE)
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
#endif

#if defined(RTS_DEBUG)
{ "DisableCameraFade", INI::parseBool, NULL, offsetof( GlobalData, m_disableCameraFade ) },
{ "DisableScriptedInputDisabling", INI::parseBool, NULL, offsetof( GlobalData, m_disableScriptedInputDisabling ) },
Expand All @@ -518,6 +514,7 @@ GlobalData* GlobalData::m_theOriginal = NULL;
{ "MaxDebugThreatMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugThreat) },
{ "DebugCashValueMapTileDuration", INI::parseInt, NULL, offsetof( GlobalData, m_debugCashValueMapTileDuration) },
{ "MaxDebugCashValueMapValue", INI::parseUnsignedInt, NULL, offsetof( GlobalData, m_maxDebugValue) },
{ "VTune", INI::parseBool, NULL, offsetof( GlobalData, m_vTune ) },
{ "SaveStats", INI::parseBool, NULL, offsetof( GlobalData, m_saveStats ) },
{ "UseLocalMOTD", INI::parseBool, NULL, offsetof( GlobalData, m_useLocalMOTD ) },
{ "BaseStatsDir", INI::parseAsciiString,NULL, offsetof( GlobalData, m_baseStatsDir ) },
Expand Down Expand Up @@ -551,10 +548,6 @@ GlobalData::GlobalData()
#endif
m_TiVOFastMode = FALSE;

#if defined(RTS_PROFILE)
m_vTune = false;
#endif

#if defined(RTS_DEBUG)
m_wireframe = 0;
m_stateMachineDebug = FALSE;
Expand All @@ -578,6 +571,7 @@ GlobalData::GlobalData()
m_debugCashValueMap = FALSE;
m_maxDebugValue = 10000;
m_debugCashValueMapTileDuration = LOGICFRAMES_PER_SECOND; // Changed By Sadullah Nader
m_vTune = false;
m_checkForLeaks = TRUE;
m_benchmarkTimer = -1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Bool st_particleSystemNeedsStopping = FALSE; ///< Set along with st_particleSyst
#define FORMAT_STRING_LEADING_STRING "%s%.2f"
// That's it for particle editor

#if defined(RTS_PROFILE)
#if defined(RTS_DEBUG)
#define DO_VTUNE_STUFF
#endif

Expand Down
Loading