Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 8c1c5c9

Browse files
committed
Minor change to debug preprocessor directives to accommodate third debug configuration
# Conflicts: # System/RTEError.cpp Resolved manually
1 parent 9d56d98 commit 8c1c5c9

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Entities/Attachable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void Attachable::Detach()
300300
// Since it's no longer atteched it should belong to itself
301301
m_RootMOID = m_MOID;
302302

303-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
303+
#ifndef RELEASE_BUILD
304304
RTEAssert(m_RootMOID == g_NoMOID || (m_RootMOID >= 0 && m_RootMOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
305305
RTEAssert(m_MOID == g_NoMOID || (m_MOID >= 0 && m_MOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
306306
#endif

Entities/MOSRotating.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ void MOSRotating::PostTravel()
14971497
void MOSRotating::Update()
14981498
{
14991499

1500-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
1500+
#ifndef RELEASE_BUILD
15011501
RTEAssert(m_MOID == g_NoMOID || (m_MOID >= 0 && m_MOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
15021502
#endif
15031503

Managers/FrameMan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,15 +1269,15 @@ namespace RTE {
12691269
blit(m_NetworkBackBufferIntermediateGUI8[m_NetworkFrameCurrent][i], m_NetworkBackBufferFinalGUI8[m_NetworkFrameCurrent][i], 0, 0, 0, 0, m_NetworkBackBufferFinalGUI8[m_NetworkFrameCurrent][i]->w, m_NetworkBackBufferFinalGUI8[m_NetworkFrameCurrent][i]->h);
12701270
m_NetworkBitmapLock[i].unlock();
12711271

1272-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
1272+
#ifndef RELEASE_BUILD
12731273
// Draw all player's screen into one
12741274
if (g_UInputMan.KeyHeld(KEY_5)) {
12751275
stretch_blit(m_NetworkBackBufferFinal8[m_NetworkFrameCurrent][i], m_BackBuffer8, 0, 0, m_NetworkBackBufferFinal8[m_NetworkFrameReady][i]->w, m_NetworkBackBufferFinal8[m_NetworkFrameReady][i]->h, dx, dy, dw, dh);
12761276
}
12771277
#endif
12781278
}
12791279

1280-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
1280+
#ifndef RELEASE_BUILD
12811281
if (g_UInputMan.KeyHeld(KEY_1)) {
12821282
stretch_blit(m_NetworkBackBufferFinal8[0][0], m_BackBuffer8, 0, 0, m_NetworkBackBufferFinal8[m_NetworkFrameReady][0]->w, m_NetworkBackBufferFinal8[m_NetworkFrameReady][0]->h, 0, 0, m_BackBuffer8->w, m_BackBuffer8->h);
12831283
}

Managers/NetworkClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ namespace RTE {
391391
lineAddr += maxWidth;
392392
}
393393

394-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
394+
#ifndef RELEASE_BUILD
395395
if (g_UInputMan.KeyHeld(KEY_0)) { rect(bmp, bpx, bpy, bpx + maxWidth - 1, bpy + maxHeight - 1, g_BlackColor); }
396396
#endif
397397
}
@@ -984,7 +984,7 @@ namespace RTE {
984984
// Input is sent at whatever settings are set in inputs per second
985985
float inputSend = m_ClientInputFps;
986986

987-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
987+
#if !defined DEBUG_RELEASE_BUILD && !defined RELEASE_BUILD
988988
// Reduce input rate for debugging because it may overflow the input queue
989989
inputSend = 10;
990990
#endif

RTEA.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
114114
<Optimization>Disabled</Optimization>
115115
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)System;$(ProjectDir)Entities;$(ProjectDir)Activities;$(ProjectDir)Managers;$(ProjectDir)Menus;$(ProjectDir)GUI;$(ProjectDir)external\include;$(ProjectDir)external\include\boost-1_55_0;$(ProjectDir)external\include\RakNet;$(ProjectDir)external\include\LZ4;$(ProjectDir)external\include\fmod</AdditionalIncludeDirectories>
116-
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;MIN_DEBUG_BUILD;DEBUGMODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
116+
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;DEBUGMODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
117117
<MinimalRebuild>false</MinimalRebuild>
118118
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
119119
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -159,7 +159,7 @@
159159
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
160160
<WholeProgramOptimization>true</WholeProgramOptimization>
161161
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)System;$(ProjectDir)Entities;$(ProjectDir)Activities;$(ProjectDir)Managers;$(ProjectDir)Menus;$(ProjectDir)GUI;$(ProjectDir)external\include;$(ProjectDir)external\include\boost-1_55_0;$(ProjectDir)external\include\RakNet;$(ProjectDir)external\include\LZ4;$(ProjectDir)external\include\fmod</AdditionalIncludeDirectories>
162-
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
162+
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;DEBUG_RELEASE_BUILD;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
163163
<ExceptionHandling>Sync</ExceptionHandling>
164164
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
165165
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -213,7 +213,7 @@
213213
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
214214
<WholeProgramOptimization>true</WholeProgramOptimization>
215215
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)System;$(ProjectDir)Entities;$(ProjectDir)Activities;$(ProjectDir)Managers;$(ProjectDir)Menus;$(ProjectDir)GUI;$(ProjectDir)external\include;$(ProjectDir)external\include\boost-1_55_0;$(ProjectDir)external\include\RakNet;$(ProjectDir)external\include\LZ4;$(ProjectDir)external\include\fmod</AdditionalIncludeDirectories>
216-
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
216+
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;ALLEGRO_STATICLINK;ALLEGRO_NO_STD_HEADERS;ALLEGRO_NO_MAGIC_MAIN;_CRT_SECURE_NO_DEPRECATE;_HAS_ITERATOR_DEBUGGING=0;ZLIB_WINAPI;_WINDOWS;WIN32;RELEASE_BUILD;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
217217
<ExceptionHandling>Sync</ExceptionHandling>
218218
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
219219
<BufferSecurityCheck>false</BufferSecurityCheck>

System/RTEError.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace RTE {
2626

2727
char message[512];
2828

29-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
29+
#ifndef RELEASE_BUILD
3030
// Show message box with explanation
3131
std::snprintf(message, sizeof(message), "Runtime Error in file %s, line %i, because:\n\n%s\n\nThe last frame has been dumped to 'abortscreen.bmp'", file, line, description);
3232
allegro_message(message);

System/RTEError.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define DebuggerBreak ;
1111
#endif
1212

13-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
13+
#ifndef RELEASE_BUILD
1414
#define AbortAction DebuggerBreak
1515
#else
1616
#define AbortAction std::exit(EXIT_FAILURE);

0 commit comments

Comments
 (0)