Skip to content

Commit 8686b98

Browse files
OmniBladexezon
authored andcommitted
[GEN][ZH] Change _PROFILE macro to RTS_PROFILE (#780)
1 parent df06517 commit 8686b98

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ enum
101101

102102
static Bool raiseMessageBoxes = TRUE;
103103
static Bool campaignSelected = FALSE;
104-
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined _PROFILE
104+
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined RTS_PROFILE
105105
static NameKeyType campaignID = NAMEKEY_INVALID;
106106
static GameWindow *buttonCampaign = NULL;
107107
#ifdef TEST_COMPRESSION
@@ -554,7 +554,7 @@ void MainMenuInit( WindowLayout *layout, void *userData )
554554

555555
showSelectiveButtons(SHOW_NONE);
556556
// Set up the version number
557-
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined _PROFILE
557+
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined RTS_PROFILE
558558
WinInstanceData instData;
559559
#ifdef TEST_COMPRESSION
560560
instData.init();
@@ -1309,7 +1309,7 @@ WindowMsgHandledType MainMenuSystem( GameWindow *window, UnsignedInt msg,
13091309

13101310
if(buttonPushed)
13111311
break;
1312-
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined _PROFILE
1312+
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined RTS_PROFILE
13131313
if( control == buttonCampaign )
13141314
{
13151315
buttonPushed = TRUE;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void Shell::showShell( Bool runInit )
460460

461461
if (!TheGlobalData->m_shellMapOn && m_screenCount == 0)
462462
{
463-
#ifdef _PROFILE
463+
#ifdef RTS_PROFILE
464464
Profile::StopRange("init");
465465
#endif
466466
//else

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,11 +3600,11 @@ void GameLogic::update( void )
36003600
Total_Load_3D_Assets=0;
36013601
#endif
36023602

3603-
#ifdef _PROFILE
3603+
#ifdef RTS_PROFILE
36043604
Profile::StartRange("map_load");
36053605
#endif
36063606
startNewGame( FALSE );
3607-
#ifdef _PROFILE
3607+
#ifdef RTS_PROFILE
36083608
Profile::StopRange("map_load");
36093609
#endif
36103610
m_startNewGame = FALSE;

GeneralsMD/Code/Libraries/Source/debug/debug.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
Generally speaking there are four different library variants:
3939
- Internal: all asserts/checks/logs, full optimizations (RTS_INTERNAL macro defined)
4040
- %Debug: all asserts/checks/logs, no optimizations (RTS_DEBUG macro defined)
41-
- Profile: all asserts/checks/logs, full optimizations, profiling active (_PROFILE macro defined)
41+
- Profile: all asserts/checks/logs, full optimizations, profiling active (RTS_PROFILE macro defined)
4242
- Release: no asserts/checks/logs, full optimizations
4343
4444
These variants will be broken down into separate features which
@@ -89,7 +89,7 @@
8989
#endif
9090

9191
// Define which libraries to use.
92-
#if defined(RTS_INTERNAL) || defined(RTS_DEBUG) || defined(_PROFILE)
92+
#if defined(RTS_INTERNAL) || defined(RTS_DEBUG) || defined(RTS_PROFILE)
9393
# define HAS_ASSERTS
9494
# define HAS_LOGS
9595
#endif
@@ -98,7 +98,7 @@
9898
# define HAS_OPT
9999
#endif
100100

101-
#if defined(_PROFILE)
101+
#if defined(RTS_PROFILE)
102102
# define HAS_PROFILE
103103
#endif
104104

GeneralsMD/Code/Libraries/Source/debug/debug_debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ void Debug::WriteBuildInfo(void)
14411441
operator<<(" internal");
14421442
#elif defined(RTS_DEBUG)
14431443
operator<<(" debug");
1444-
#elif defined(_PROFILE)
1444+
#elif defined(RTS_PROFILE)
14451445
operator<<(" profile");
14461446
#else
14471447
operator<<(" release");

GeneralsMD/Code/Libraries/Source/profile/profile.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void Profile::StartRange(const char *range)
197197

198198
if (active)
199199
{
200-
#ifdef _PROFILE
200+
#ifdef RTS_PROFILE
201201
m_frameNames[k].funcIndex=ProfileFuncLevelTracer::FrameStart();
202202
DASSERT(m_frameNames[k].funcIndex>=0);
203203
#endif
@@ -248,7 +248,7 @@ void Profile::AppendRange(const char *range)
248248

249249
if (active)
250250
{
251-
#ifdef _PROFILE
251+
#ifdef RTS_PROFILE
252252
m_frameNames[k].funcIndex=ProfileFuncLevelTracer::FrameStart();
253253
DASSERT(m_frameNames[k].funcIndex>=0);
254254
#endif
@@ -279,7 +279,7 @@ void Profile::StopRange(const char *range)
279279
// stop recording
280280
m_frameNames[k].isRecording=false;
281281
if (
282-
#ifdef _PROFILE
282+
#ifdef RTS_PROFILE
283283
m_frameNames[k].funcIndex>=0 ||
284284
#endif
285285
m_frameNames[k].highIndex>=0
@@ -298,7 +298,7 @@ void Profile::StopRange(const char *range)
298298
}
299299
else
300300
atIndex=m_frameNames[k].lastGlobalIndex;
301-
#ifdef _PROFILE
301+
#ifdef RTS_PROFILE
302302
if (m_frameNames[k].funcIndex>=0)
303303
ProfileFuncLevelTracer::FrameEnd(m_frameNames[k].funcIndex,atIndex);
304304
if (m_frameNames[k].highIndex>=0)
@@ -327,7 +327,7 @@ const char *Profile::GetFrameName(unsigned frame)
327327

328328
void Profile::ClearTotals(void)
329329
{
330-
#ifdef _PROFILE
330+
#ifdef RTS_PROFILE
331331
ProfileFuncLevelTracer::ClearTotals();
332332
#endif
333333
ProfileId::ClearTotals();
@@ -370,7 +370,7 @@ bool Profile::SimpleMatch(const char *str, const char *pattern)
370370

371371
static void ProfileShutdown(void)
372372
{
373-
#ifdef _PROFILE
373+
#ifdef RTS_PROFILE
374374
ProfileFuncLevelTracer::Shutdown();
375375
#endif
376376
ProfileId::Shutdown();

GeneralsMD/Code/Main/WinMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
842842
{
843843
checkProtection();
844844

845-
#ifdef _PROFILE
845+
#ifdef RTS_PROFILE
846846
Profile::StartRange("init");
847847
#endif
848848

@@ -928,7 +928,7 @@ Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
928928

929929

930930
// Force "splash image" to be loaded from a file, not a resource so same exe can be used in different localizations.
931-
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined _PROFILE
931+
#if defined RTS_DEBUG || defined RTS_INTERNAL || defined RTS_PROFILE
932932

933933
// check both localized directory and root dir
934934
char filePath[_MAX_PATH];

cmake/config-build.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ else()
6969
target_compile_definitions(core_config INTERFACE RTS_INTERNAL)
7070
endif()
7171
if(RTS_BUILD_OPTION_PROFILE)
72-
target_compile_definitions(core_config INTERFACE _PROFILE)
72+
target_compile_definitions(core_config INTERFACE RTS_PROFILE)
7373
endif()
7474
endif()

0 commit comments

Comments
 (0)