Skip to content

Commit 7909aee

Browse files
committed
[GEN][ZH] Remove or repurpose RTS_INTERNAL specific code (#1231)
1 parent b342328 commit 7909aee

File tree

34 files changed

+64
-126
lines changed

34 files changed

+64
-126
lines changed

Core/Libraries/Source/WWVegas/WW3D2/streakRender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ VertexFormatXYZUV1 *StreakRendererClass::getVertexBuffer(unsigned int number)
14091409
m_vertexBufferSize = numberToAlloc;
14101410
}
14111411

1412-
#ifdef RTS_INTERNAL
1412+
#ifdef RTS_DEBUG
14131413
for (unsigned i = 0; i < number; ++i)
14141414
{
14151415
m_vertexBuffer[i].x = m_vertexBuffer[i].y = m_vertexBuffer[i].z = m_vertexBuffer[i].u1 = m_vertexBuffer[i].v1 = (float)0xdeadbeef;

Core/Libraries/Source/debug/debug.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
/**
3636
\page lib_var Library variants
3737
38-
Generally speaking there are four different library variants:
39-
- Internal: all asserts/checks/logs, full optimizations (RTS_INTERNAL macro defined)
38+
Generally speaking there are three different library variants:
4039
- %Debug: all asserts/checks/logs, no optimizations (RTS_DEBUG macro defined)
4140
- Profile: all asserts/checks/logs, full optimizations, profiling active (RTS_PROFILE macro defined)
4241
- Release: no asserts/checks/logs, full optimizations
@@ -84,10 +83,6 @@
8483
- Release: XXX.lib
8584
*/
8685

87-
#if defined(RTS_DEBUG) && defined(RTS_INTERNAL)
88-
#error "Only either RTS_DEBUG or RTS_INTERNAL should ever be defined"
89-
#endif
90-
9186
// Define which libraries to use.
9287
#if defined(RTS_DEBUG) || defined(RTS_PROFILE)
9388
# define HAS_ASSERTS

Core/Libraries/Source/debug/debug_debug.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,9 +1437,7 @@ void Debug::WriteBuildInfo(void)
14371437
(*this) << " " << m_version;
14381438
if (*m_intVersion)
14391439
(*this) << " internal " << m_intVersion;
1440-
#if defined(RTS_INTERNAL)
1441-
operator<<(" internal");
1442-
#elif defined(RTS_DEBUG)
1440+
#if defined(RTS_DEBUG)
14431441
operator<<(" debug");
14441442
#elif defined(RTS_PROFILE)
14451443
operator<<(" profile");

Core/Libraries/Source/profile/profile.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
#ifndef PROFILE_H // Include guard
3333
#define PROFILE_H
3434

35-
#if defined(RTS_DEBUG) && defined(RTS_INTERNAL)
36-
#error "Only either RTS_DEBUG or RTS_INTERNAL should ever be defined"
37-
#endif
38-
3935
// include all our public header files (use double quotes here)
4036
#include "profile_doc.h"
4137
#include "profile_highlevel.h"

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050

5151
class AsciiString;
5252

53-
#if defined(RTS_DEBUG) && defined(RTS_INTERNAL)
54-
#error "Only one at a time of these should ever be defined"
55-
#endif
56-
5753
// These are stolen from the WW3D Debug file. REALLY useful. :-)
5854
#define STRING_IT(a) #a
5955
#define TOKEN_IT(a) STRING_IT(,##a)
@@ -120,13 +116,7 @@ class AsciiString;
120116
DEBUG_FLAG_LOG_TO_FILE = 0x01,
121117
DEBUG_FLAG_LOG_TO_CONSOLE = 0x02,
122118
DEBUG_FLAG_PREPEND_TIME = 0x04,
123-
#ifdef RTS_INTERNAL
124-
// by default, RTS_INTERNAL builds log to file, but not to console, in the interest
125-
// of speed. want console output? just change this line:
126-
DEBUG_FLAGS_DEFAULT = (DEBUG_FLAG_LOG_TO_FILE)
127-
#else
128-
DEBUG_FLAGS_DEFAULT = (DEBUG_FLAG_LOG_TO_FILE | DEBUG_FLAG_LOG_TO_CONSOLE)
129-
#endif
119+
DEBUG_FLAGS_DEFAULT = (DEBUG_FLAG_LOG_TO_FILE | DEBUG_FLAG_LOG_TO_CONSOLE),
130120
};
131121

132122
DEBUG_EXTERN_C void DebugInit(int flags);

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,12 @@ 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-
469468

469+
#if defined(RTS_PROFILE)
470+
Bool m_vTune;
471+
#endif
470472

471-
#if defined(RTS_DEBUG) || defined(RTS_INTERNAL)
473+
#if defined(RTS_DEBUG)
472474
Bool m_wireframe;
473475
Bool m_stateMachineDebug;
474476
Bool m_useCameraConstraints;
@@ -483,7 +485,6 @@ class GlobalData : public SubsystemInterface
483485
Bool m_disableMilitaryCaption; ///< if true, military briefings go fast
484486
Int m_benchmarkTimer; ///< how long to play the game in benchmark mode?
485487
Bool m_checkForLeaks;
486-
Bool m_vTune;
487488
Bool m_debugCamera; ///< Used to display Camera debug information
488489
Bool m_debugVisibility; ///< Should we actively debug the visibility
489490
Int m_debugVisibilityTileCount; ///< How many tiles we should show when debugging visibility

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ class Object;
5151
#if defined(RTS_DEBUG)
5252
#define STATE_MACHINE_DEBUG
5353
#endif
54-
#if defined(RTS_INTERNAL)
55-
#define STATE_MACHINE_DEBUG //uncomment to debug state machines in internal. jba.
56-
#endif
5754

5855
//-----------------------------------------------------------------------------
5956
//-----------------------------------------------------------------------------

Generals/Code/GameEngine/Include/GameLogic/ScriptEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Player;
5050
class PolygonTrigger;
5151
class ObjectTypes;
5252

53-
#ifdef RTS_INTERNAL
53+
#ifdef RTS_PROFILE
5454
#define SPECIAL_SCRIPT_PROFILING
5555
#endif
5656

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

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

700+
#endif // defined(RTS_DEBUG)
701+
702+
#if defined(RTS_PROFILE)
703+
700704
/// begin stuff for VTUNE
701705
Int parseVTune ( char *args[], int num )
702706
{
@@ -706,7 +710,7 @@ Int parseVTune ( char *args[], int num )
706710
}
707711
/// end stuff for VTUNE
708712

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

711715
//=============================================================================
712716
//=============================================================================
@@ -1274,7 +1278,6 @@ static CommandLineParam paramsForEngineInit[] =
12741278
{ "-DemoLoadScreen", parseDemoLoadScreen },
12751279
{ "-cameraDebug", parseCameraDebug },
12761280
{ "-logToCon", parseLogToConsole },
1277-
{ "-vTune", parseVTune },
12781281
{ "-selectTheUnselectable", parseSelectAll },
12791282
{ "-RunAhead", parseRunAhead },
12801283
{ "-noshroud", parseNoShroud },
@@ -1299,6 +1302,10 @@ static CommandLineParam paramsForEngineInit[] =
12991302

13001303
#endif
13011304

1305+
#if defined(RTS_PROFILE)
1306+
{ "-vTune", parseVTune },
1307+
#endif
1308+
13021309
#ifdef DEBUG_LOGGING
13031310
{ "-setDebugLevel", parseSetDebugLevel },
13041311
{ "-clearDebugLevel", parseClearDebugLevel },

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ void GameEngine::init()
257257
#ifdef DEBUG_LOGGING
258258
#if defined RTS_DEBUG
259259
const char *buildType = "Debug";
260-
#elif defined RTS_INTERNAL
261-
const char *buildType = "Internal";
262260
#else
263261
const char *buildType = "Release";
264262
#endif

0 commit comments

Comments
 (0)