Fix beta builds when DEBUG is not defined

This commit is contained in:
Ryan Dwyer
2023-06-03 11:46:19 +10:00
parent 1df5e4dc51
commit b97228e682
9 changed files with 23 additions and 9 deletions
+2
View File
@@ -1211,7 +1211,9 @@ Gfx *bgRenderScene(Gfx *gdl)
}
#if VERSION < VERSION_NTSC_1_0
#ifdef DEBUG
debug0f119a80nb();
#endif
#endif
return gdl;
+1 -1
View File
@@ -813,7 +813,7 @@ void challengeConsiderMarkingComplete(void)
{
bool result = challengeIsCompleteForEndscreen();
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if ((g_CheatsActiveBank0 == 0 && g_CheatsActiveBank1 == 0) && (result || debugIsSetCompleteEnabled()))
#elif VERSION >= VERSION_NTSC_1_0
if (g_CheatsActiveBank0 == 0 && g_CheatsActiveBank1 == 0 && result)
+2 -2
View File
@@ -407,7 +407,7 @@ s32 var80078790nb = 0;
bool g_DebugFootsteps = true;
bool g_DebugAllChallenges = false;
bool g_DebugAllBuddies = false;
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0
bool g_DebugSetComplete = false;
#endif
bool g_DebugAllTraining = false;
@@ -1107,7 +1107,7 @@ bool debugIsAllBuddiesEnabled(void)
return g_DebugAllBuddies;
}
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0
bool debugIsSetCompleteEnabled(void)
{
return g_DebugSetComplete;
+6 -6
View File
@@ -1458,7 +1458,7 @@ void endscreenPrepare(void)
#endif
// Push the endscreen
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if ((g_Vars.currentplayer->isdead || g_Vars.currentplayer->aborted || !objectiveIsAllComplete()) && !debugIsSetCompleteEnabled())
#else
if (g_Vars.currentplayer->isdead || g_Vars.currentplayer->aborted || !objectiveIsAllComplete())
@@ -1509,7 +1509,7 @@ void endscreenPrepare(void)
g_GameFile.autostageindex = g_MissionConfig.stageindex;
g_GameFile.autodifficulty = g_MissionConfig.difficulty;
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if (g_CheatsActiveBank0 == 0
&& g_CheatsActiveBank1 == 0
&& g_MissionConfig.pdmode == false
@@ -1687,7 +1687,7 @@ void endscreenPushCoop(void)
g_Menus[g_MpPlayerNum].playernum = g_Vars.currentplayernum;
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if (((g_Vars.bond->isdead && g_Vars.coop->isdead)
|| g_Vars.bond->aborted
|| g_Vars.coop->aborted
@@ -1737,7 +1737,7 @@ void endscreenPushSolo(void)
g_MpPlayerNum = 0;
g_Menus[g_MpPlayerNum].playernum = 0;
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if (((g_Vars.bond->isdead && g_Vars.coop->isdead)
|| g_Vars.bond->aborted
|| g_Vars.coop->aborted
@@ -1786,7 +1786,7 @@ void endscreenPushAnti(void)
g_Menus[g_MpPlayerNum].playernum = g_Vars.currentplayernum;
if (g_Vars.currentplayer == g_Vars.bond) {
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if (!g_Vars.anti->aborted && (g_Vars.bond->isdead || g_Vars.bond->aborted || !objectiveIsAllComplete()) && !debugIsSetCompleteEnabled())
#else
if (!g_Vars.anti->aborted && (g_Vars.bond->isdead || g_Vars.bond->aborted || !objectiveIsAllComplete()))
@@ -1809,7 +1809,7 @@ void endscreenPushAnti(void)
filemgrSaveOrLoad(&g_GameFileGuid, FILEOP_SAVE_GAME_000, 0);
} else {
#if VERSION == VERSION_PAL_BETA
#if VERSION >= VERSION_NTSC_1_0 && defined(DEBUG)
if (!g_Vars.anti->aborted && (g_Vars.bond->isdead || g_Vars.bond->aborted || !objectiveIsAllComplete()) && !debugIsSetCompleteEnabled())
#else
if (!g_Vars.anti->aborted && (g_Vars.bond->isdead || g_Vars.bond->aborted || !objectiveIsAllComplete()))
+4
View File
@@ -1282,9 +1282,11 @@ s32 getMaxAiBuddies(void)
}
#if VERSION == VERSION_PAL_BETA
#ifdef DEBUG
if (debugIsAllBuddiesEnabled()) {
max = 4;
}
#endif
#endif
return max;
@@ -1394,9 +1396,11 @@ MenuItemHandlerResult menuhandlerCoopBuddy(s32 operation, struct menuitem *item,
maxbuddies = 1;
}
#ifdef DEBUG
if (debugIsAllBuddiesEnabled()) {
maxbuddies = 4;
}
#endif
data->dropdown.value = human + maxbuddies;
}
+2
View File
@@ -223,9 +223,11 @@ bool frIsWeaponAvailable(s32 weapon)
}
#if VERSION < VERSION_NTSC_1_0
#ifdef DEBUG
if (debugIsAllTrainingEnabled() && weapon <= WEAPON_XRAYSCANNER) {
return true;
}
#endif
#endif
return frIsWeaponFound(weapon);
+2
View File
@@ -1501,7 +1501,9 @@ void mainTick(void)
profileSetMarker(PROFILE_MAINTICK_END);
#if VERSION == VERSION_PAL_BETA
#ifdef DEBUG
debug0f119a80nb();
#endif
#endif
}
}
+2
View File
@@ -289,6 +289,7 @@ void memaPrint(void)
memaDefragPass(&g_MemaHeap);
#ifdef DEBUG
#if VERSION == VERSION_PAL_BETA
if (debugIsMemInfoEnabled()) {
dhudSetFgColour(0xff, 0xff, 0xff, 0xff);
@@ -392,6 +393,7 @@ void memaPrint(void)
line++;
}
#endif
#endif
}
void *memaAlloc(u32 size)
+2
View File
@@ -187,6 +187,7 @@ void *mempAlloc(u32 len, u8 pool)
}
#if VERSION < VERSION_NTSC_1_0
#ifdef DEBUG
if (pool != MEMPOOL_8 && pool != MEMPOOL_7 && len) {
char buffer[80];
u32 stack;
@@ -206,6 +207,7 @@ void *mempAlloc(u32 len, u8 pool)
crashSetMessage(buffer);
CRASH();
}
#endif
#endif
return allocation;