diff --git a/ld/gamefiles.ntsc-final.inc b/ld/gamefiles.ntsc-final.inc index f44e8c9ff..3dd7c9939 100644 --- a/ld/gamefiles.ntsc-final.inc +++ b/ld/gamefiles.ntsc-final.inc @@ -141,8 +141,6 @@ build/ROMID/game/padhalllv.o (section); \ build/ROMID/game/pad.o (section); \ build/ROMID/game/pak.o (section); \ - build/ROMID/game/debug.o (section); \ - build/ROMID/game/debug3.o (section); \ build/ROMID/game/stubs/game_11eff0.o (section); \ build/ROMID/game/modeldata/general.o (section); \ build/ROMID/game/modeldata/basic.o (section); \ diff --git a/src/game/bg.c b/src/game/bg.c index fcc914586..630290bec 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/debug.h" #include "game/dlights.h" #include "game/game_006900.h" #include "game/portal.h" @@ -1375,7 +1374,7 @@ Gfx *bgRenderSceneInXray(Gfx *gdl) gSPMatrix(gdl++, osVirtualToPhysical(camGetPerspectiveMtxL()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - if (debugIsPropRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { if (thing->roomnum == -1) { gdl = propsRender(gdl, 0, RENDERPASS_XLU, roomnumsbyprop); } @@ -1554,7 +1553,7 @@ Gfx *bgRenderScene(Gfx *gdl) gSPMatrix(gdl++, osVirtualToPhysical(camGetPerspectiveMtxL()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gdl = envStopFog(gdl); - if (debugIsPropRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { if (firstroomnum == thing->roomnum) { gdl = propsRender(gdl, 0, RENDERPASS_OPA_PREBG, roomnumsbyprop); } @@ -1568,7 +1567,7 @@ Gfx *bgRenderScene(Gfx *gdl) gdl = currentPlayerScissorWithinViewportF(gdl, thing->box.xmin, thing->box.ymin, thing->box.xmax, thing->box.ymax); gdl = envStartFog(gdl, false); - if (debugIsBgRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { if (g_StageIndex != STAGEINDEX_TEST_OLD) { gdl = bgRenderRoomOpaque(gdl, thing->roomnum); } @@ -1579,7 +1578,7 @@ Gfx *bgRenderScene(Gfx *gdl) gdl = envStopFog(gdl); - if (debugIsPropRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { if (firstroomnum == thing->roomnum) { gdl = propsRender(gdl, 0, RENDERPASS_OPA_POSTBG, roomnumsbyprop); } @@ -1619,7 +1618,7 @@ Gfx *bgRenderScene(Gfx *gdl) gdl = currentPlayerScissorWithinViewportF(gdl, thing->box.xmin, thing->box.ymin, thing->box.xmax, thing->box.ymax); gdl = envStartFog(gdl, true); - if (debugIsBgRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { gdl = bgRenderRoomXlu(gdl, thing->roomnum); } @@ -1628,7 +1627,7 @@ Gfx *bgRenderScene(Gfx *gdl) gdl = envStopFog(gdl); // Render prop translucent components - if (debugIsPropRenderingEnabled() && getVar80084040()) { + if (getVar80084040()) { if (firstroomnum == thing->roomnum) { gdl = propsRender(gdl, 0, RENDERPASS_XLU, roomnumsbyprop); } @@ -1645,10 +1644,6 @@ Gfx *bgRenderScene(Gfx *gdl) } } -#if VERSION < VERSION_NTSC_1_0 - debug0f119a80nb(); -#endif - return gdl; } #else @@ -3876,43 +3871,6 @@ s32 portalFindNumByVertices(struct portalvertices *arg0) return 0; } -/** - * Build a string showing the state of all rooms in the stage. - * - * The string contains "L" if a room is loaded, "." if not, and has line breaks - * every 40 characters. - * - * Nothing is done with the string though. It's likely that debug versions of - * the game would send the string to the host computer or display it on the HUD. - */ -void roomsHandleStateDebugging(void) -{ - if (debugIsRoomStateDebugEnabled()) { - u8 string[704]; - s32 len = 0; - s32 i; - - for (i = 1; i < g_Vars.roomcount; i++) { - if ((i - 1) % 40 == 0) { - if (i != 1) { - string[len] = '\n'; - len++; - } - } - - if (g_Rooms[i].loaded240) { - string[len] = 'L'; - } else { - string[len] = '.'; - } - - len++; - } - - string[len] = '\0'; - } -} - u32 bgInflate(u8 *src, u8 *dst, u32 len) { u32 result; @@ -5242,10 +5200,6 @@ void bgLoadRoom(s32 roomnum) // It must be big enough to fit both the inflated and compressed room data. if (g_Rooms[roomnum].gfxdatalen > 0) { size = g_Rooms[roomnum].gfxdatalen; - - if (debug0f11edb0()) { - size += 1024; - } } else { size = memaGetLongestFree(); } diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 90b1fa273..f88618d36 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -3,7 +3,6 @@ #include "game/bondgrab.h" #include "game/bondmove.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/prop.h" #include "game/objectives.h" #include "game/bondgun.h" @@ -1090,11 +1089,6 @@ void bgrab0f0ce924(void) bmoveUpdateMoveInitSpeed(&sp74); - if (debugIsTurboModeEnabled()) { - sp74.x += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate60freal * 10.0f; - sp74.z += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate60freal * 10.0f; - } - bgrab0f0ce0bc(&sp74); xdelta = g_Vars.currentplayer->prop->pos.f[0] - g_Vars.currentplayer->bondprevpos.f[0]; diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index ef3b35bf3..498c44776 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -3,7 +3,6 @@ #include "game/bondmove.h" #include "game/bondwalk.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/footstep.h" #include "game/game_006900.h" #include "game/chr.h" @@ -921,13 +920,7 @@ void bwalkUpdateVertical(void) fallspeed = g_Vars.currentplayer->bdeltapos.y; newmanground = g_Vars.currentplayer->vv_manground; - if (debugIsTurboModeEnabled() - && g_Vars.currentplayer->bondforcespeed.x == 0 - && g_Vars.currentplayer->bondforcespeed.z == 0) { - multiplier = 0.277777777f * 5; - } else { - multiplier = 0.277777777f; - } + multiplier = 0.277777777f; newfallspeed = fallspeed - g_Vars.lvupdate60freal * multiplier; newmanground += g_Vars.lvupdate60freal * (fallspeed + newfallspeed) * 0.5f; @@ -1548,11 +1541,6 @@ void bwalk0f0c69b8(void) bmoveUpdateMoveInitSpeed(&spcc); - if (debugIsTurboModeEnabled()) { - spcc.f[0] += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate60freal * 10.0f; - spcc.f[2] += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate60freal * 10.0f; - } - if (g_Vars.currentplayer->bondforcespeed.f[0] != 0.0f || g_Vars.currentplayer->bondforcespeed.f[2] != 0.0f) { spcc.f[0] += g_Vars.currentplayer->bondforcespeed.f[0] * g_Vars.lvupdate60freal; spcc.f[2] += g_Vars.currentplayer->bondforcespeed.f[2] * g_Vars.lvupdate60freal; diff --git a/src/game/bot.c b/src/game/bot.c index 9c55ba49a..9dda547d1 100644 --- a/src/game/bot.c +++ b/src/game/bot.c @@ -1,7 +1,6 @@ #include #include "constants.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/prop.h" #include "game/propsnd.h" @@ -282,8 +281,6 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) return 0; } - dprint(); - if (1); obj->flags3 &= ~OBJFLAG3_ISFETCHTARGET; @@ -298,7 +295,6 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) if (1); qty = ammocrateGetPickupAmmoQty(crate); - dprint(); if (qty) { botactGiveAmmoByType(chr->aibot, crate->ammotype, qty); @@ -309,10 +305,6 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN); - - if (qty) { - dprint(); - } } return 2; case OBJTYPE_MULTIAMMOCRATE: @@ -341,15 +333,9 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) } } #endif - dprint(); - for (i = 0; i != 19; i++) { qty = crate->slots[i].quantity; - if (qty) { - dprint(); - } - if (qty) { botactGiveAmmoByType(chr->aibot, i + 1, qty); } @@ -460,8 +446,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) return false; } - dprint(); - if (prop->timetoregen != 0) { return false; } @@ -476,8 +460,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) } } - dprint(); - if (1); #if VERSION >= VERSION_NTSC_1_0 @@ -490,8 +472,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) } #endif - dprint(); - if ((obj->hidden & OBJHFLAG_PROJECTILE) && obj->projectile && obj->projectile->pickuptimer240 > 0 @@ -499,14 +479,10 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) return false; } - dprint(); - if (!objCanPickupFromSafe(obj)) { return false; } - dprint(); - if (1); if (obj->type == OBJTYPE_WEAPON) { @@ -542,7 +518,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) ignore1 = true; if (objGetDestroyedLevel(obj)) { - dprint(); return false; } @@ -554,7 +529,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) ignore1 = false; if (weaponnum && !botinvGetItemType(chr, weaponnum)) { - dprint(); botinvGiveProp(chr, prop); } @@ -587,8 +561,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) ydist = prop->pos.y - chrprop->pos.y; zdist = prop->pos.z - chrprop->pos.z; - dprint(); - if (chr->aibot->cheap) { if (1); if (1); @@ -603,8 +575,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) sp3c = xdist * xdist + zdist * zdist <= sqrange && ydist >= -200 && ydist <= 200; if (sp3c) { - dprint(); - if ((obj->flags2 & OBJFLAG2_PICKUPWITHOUTLOS) == 0 && !cdTestLos06(&chrprop->pos, chrprop->rooms, &prop->pos, prop->rooms, CDTYPE_DOORS | CDTYPE_BG)) { sp3c = false; @@ -612,7 +582,6 @@ bool botTestPropForPickup(struct prop *prop, struct chrdata *chr) } if (sp3c) { - dprint(); return botPickupProp(prop, chr); } @@ -690,8 +659,6 @@ void botCheckPickups(struct chrdata *chr) if (botIsObjCollectable(obj)) { if (botTestPropForPickup(prop, chr)) { propExecuteTickOperation(prop, TICKOP_FREE); - } else { - dprint(); } } } diff --git a/src/game/botact.c b/src/game/botact.c index 4f73ce2cc..bc7f7c823 100644 --- a/src/game/botact.c +++ b/src/game/botact.c @@ -1,7 +1,6 @@ #include #include "constants.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/propsnd.h" #include "game/bondgun.h" @@ -144,19 +143,13 @@ s32 botactTryRemoveAmmoFromReserve(struct aibot *aibot, s32 weaponnum, s32 funcn return tryqty; } - dprint(); *ammoheld -= tryqty; if (*ammoheld < 0) { amountremoved = tryqty + *ammoheld; *ammoheld = 0; - - if (dprint()) { - return amountremoved; - } } else { amountremoved = tryqty; - dprint(); } return amountremoved; @@ -168,7 +161,6 @@ void botactGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 s32 *heldquantity = &aibot->ammoheld[botactGetAmmoTypeByFunction(weaponnum, funcnum)]; if (aibot && (aibot->unk064 & 1) == 0 && qty > 0) { - dprint(); *heldquantity += qty; if (heldquantity); @@ -178,8 +170,6 @@ void botactGiveAmmoByWeapon(struct aibot *aibot, s32 weaponnum, s32 funcnum, s32 if (*heldquantity > max) { *heldquantity = max; } - - dprint(); } } @@ -192,8 +182,6 @@ void botactGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity) return; } - dprint(); - *heldquantity += quantity; if (heldquantity); @@ -203,8 +191,6 @@ void botactGiveAmmoByType(struct aibot *aibot, u32 ammotype, s32 quantity) if (*heldquantity > max) { *heldquantity = max; } - - dprint(); } bool botactShootFarsight(struct chrdata *chr, s32 arg1, struct coord *vector, struct coord *arg3) diff --git a/src/game/botcmd.c b/src/game/botcmd.c index 53ba991ea..e9fcbfcb1 100644 --- a/src/game/botcmd.c +++ b/src/game/botcmd.c @@ -2,7 +2,6 @@ #include "constants.h" #include "game/activemenu.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/ceil.h" #include "game/game_0b0fd0.h" diff --git a/src/game/botinv.c b/src/game/botinv.c index 6d2fb1bfe..60efb7eff 100644 --- a/src/game/botinv.c +++ b/src/game/botinv.c @@ -1,7 +1,6 @@ #include #include "constants.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/ceil.h" #include "game/game_0b0fd0.h" @@ -147,8 +146,6 @@ void botinvClear(struct chrdata *chr) for (i = 0; i < chr->aibot->maxitems; i++) { chr->aibot->items[i].type = -1; } - - dprint(); } } @@ -173,8 +170,6 @@ struct invitem *botinvGetFreeSlot(struct chrdata *chr) } } - dprint(); - return NULL; } diff --git a/src/game/chr.c b/src/game/chr.c index bd5190a11..dc72998a4 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -3,7 +3,6 @@ #include "constants.h" #include "game/bondmove.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/env.h" #include "game/prop.h" @@ -2625,18 +2624,10 @@ s32 chrTick(struct prop *prop) f32 prevfrac2; s32 prevframe2a; - if (g_Vars.normmplayerisrunning) { - if (g_MpSetup.options & (MPOPTION_SLOWMOTION_ON | MPOPTION_SLOWMOTION_SMART)) { - limit = 2000 * 2000; - } else { - limit = 700 * 700; - } + if (g_MpSetup.options & (MPOPTION_SLOWMOTION_ON | MPOPTION_SLOWMOTION_SMART)) { + limit = 2000 * 2000; } else { - if (debugGetSlowMotion() != SLOWMOTION_OFF) { - limit = 2000 * 2000; - } else { - limit = 700 * 700; - } + limit = 700 * 700; } anim = model->anim; diff --git a/src/game/chraction.c b/src/game/chraction.c index fa90587db..1a52f4992 100644 --- a/src/game/chraction.c +++ b/src/game/chraction.c @@ -1,7 +1,6 @@ #include #include "constants.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/dlights.h" #include "game/footstep.h" #include "game/game_006900.h" diff --git a/src/game/debug.c b/src/game/debug.c deleted file mode 100644 index a283dde09..000000000 --- a/src/game/debug.c +++ /dev/null @@ -1,463 +0,0 @@ -#include -#include "constants.h" -#include "game/debug.h" -#include "bss.h" -#include "data.h" -#include "types.h" - -/** - * This file is used by ntsc-1.0 and above which has the debug functions - * ifdeffed out. - * - * ntsc-beta's debug implementations are in debug1.c and debug2.c. - * Those files are only linked into ntsc-beta. - * - * Splitting it like this is temporary due to it being difficult to identify - * which functions are the same between beta and 1.0. - */ - -s32 var80075d60 = 2; -s32 var80075d64 = 2; -s32 var80075d68 = 2; -u32 var80075d6c = 0x00000002; -u32 var80075d70 = 0x00000000; -bool g_DebugTurboMode = false; -s32 g_DebugScreenshotRgb = 0; -u32 var80075d7c = 0x00000000; -u32 var80075d80 = 0x00000000; -u32 var80075d84 = 0x00000000; -u32 var80075d88 = 0x00000000; -u32 var80075d8c = 0x00000000; -u32 var80075d90 = 0x00000000; -u32 var80075d94 = 0xbf800000; -u32 var80075d98 = 0x00000000; -u32 var80075d9c = 0x3f800000; -u32 var80075da0 = 0x00000000; -u32 var80075da4 = 0x00000000; -u32 var80075da8 = 0x3f800000; -u32 var80075dac = 0x00000000; -u32 var80075db0 = 0x00000000; -u32 var80075db4 = 0x3f800000; -u32 var80075db8 = 0x00000000; -u32 var80075dbc = 0x00000000; -u32 var80075dc0 = 0x00000000; -u32 var80075dc4 = 0x00000000; -u32 var80075dc8 = 0x00000000; -u32 var80075dcc = 0x00000000; -u32 var80075dd0 = 0x00000000; -u32 var80075dd4 = 0x00000000; -u32 var80075dd8 = 0x3f800000; -u32 var80075ddc = 0x00000000; - -void debug0f11ecf0(s32 arg0) // not called -{ - // empty -} - -void debug0f11ecf8(s32 arg0, s32 arg1, s32 arg2) // not called -{ - // empty -} - -s32 debug0f11ed08(s32 arg0) // not called -{ - return arg0; -} - -void debug0f11ed10(s32 arg0, s32 arg1, s32 arg2) // not called -{ - // empty -} - -bool debug0f11ed20(void) // not called -{ - return false; -} - -void debug0f11ed28(s32 arg0) // not called -{ - // empty -} - -void debug0f11ed30(void) // not called -{ - // empty -} - -void debug0f11ed38(void) // not called -{ - // empty -} - -void debug0f11ed40(void) // not called -{ - // empty -} - -void debug0f11ed48(void) // not called -{ - // empty -} - -void debug0f11ed50(void) // not called -{ - // empty -} - -bool debug0f11ed58(s32 arg0, s32 arg1, s32 arg2, s32 arg3) // not called -{ - return false; -} - -/** - * If 1, would render something but the render function is stubbed. - */ -s32 debug0f11ed70(void) -{ - return 0; -} - -bool debugIsBgRenderingEnabled(void) -{ - return true; -} - -bool debugIsPropRenderingEnabled(void) -{ - return true; -} - -bool debug0f11ed88(void) // not called -{ - return false; -} - -bool debug0f11ed90(void) // not called -{ - return false; -} - -void debug0f11ed98(s32 arg0) // not called -{ - // empty -} - -bool debug0f11eda0(void) // not called -{ - return false; -} - -bool debug0f11eda8(void) // not called -{ - return false; -} - -bool debug0f11edb0(void) -{ - return false; -} - -bool debugIsObjDeformDebugEnabled(void) -{ - return false; -} - -bool debugIsRoomStateDebugEnabled(void) -{ - return false; -} - -s32 debug0f11edc8(void) // not called -{ - return var80075d70; -} - -void debug0f11edd4(s32 arg0) // not called -{ - var80075d70 = arg0; -} - -bool debug0f11ede0(void) // not called -{ - return false; -} - -bool debug0f11ede8(void) // not called -{ - return false; -} - -bool debug0f11edf0(void) // not called -{ - return false; -} - -void debug0f11edf8(void) // not called -{ - // empty -} - -void debug0f11ee00(void) // not called -{ - // empty -} - -s32 debugIsTurboModeEnabled(void) -{ - return g_DebugTurboMode; -} - -void debugSetTurboMode(bool enabled) // not called -{ - g_DebugTurboMode = enabled; -} - -bool debugForceAllObjectivesComplete(void) -{ - return false; -} - -bool debugIsZBufferDisabled(void) -{ - return false; -} - -bool debug0f11ee30(void) // not called -{ - return false; -} - -bool debug0f11ee38(void) // not called -{ - return false; -} - -bool debug0f11ee40(void) -{ - return false; -} - -bool debug0f11ee48(void) // not called -{ - return false; -} - -bool debug0f11ee50(void) // not called -{ - return false; -} - -bool debug0f11ee58(void) // not called -{ - return false; -} - -bool debug0f11ee60(void) // not called -{ - return false; -} - -bool debug0f11ee68(void) // not called -{ - return false; -} - -s32 debugGetSlowMotion(void) -{ - return SLOWMOTION_OFF; -} - -bool debug0f11ee78(void) // not called -{ - return false; -} - -bool debug0f11ee80(void) // not called -{ - return false; -} - -bool debugGetTilesDebugMode(void) -{ - return false; -} - -bool debugGetPadsDebugMode(void) -{ - return false; -} - -bool debug0f11ee98(void) // not called -{ - return false; -} - -bool debug0f11eea0(void) // not called -{ - return false; -} - -bool debug0f11eea8(void) -{ - return false; -} - -bool debugDangerousProps(void) -{ - return false; -} - -bool debug0f11eeb8(void) // not called -{ - return false; -} - -bool debug0f11eec0(void) // not called -{ - return false; -} - -bool debug0f11eec8(void) // not called -{ - return false; -} - -bool debug0f11eed0(void) // not called -{ - return false; -} - -s32 debugGetMotionBlur(void) -{ - return 0; -} - -bool debug0f11eee0(void) // not called -{ - return false; -} - -u32 dprint() -{ - return 0; -} - -bool debug0f11eef0(void) // not called -{ - return false; -} - -bool debugIsFootstepsEnabled(void) -{ - return true; -} - -bool debug0f11ef00(void) // not called -{ - return false; -} - -bool debug0f11ef08(void) // not called -{ - return false; -} - -bool debug0f11ef10(void) // not called -{ - return false; -} - -bool debug0f11ef18(void) // not called -{ - return false; -} - -bool debug0f11ef20(void) // not called -{ - return false; -} - -bool debug0f11ef28(void) // not called -{ - return false; -} - -bool debug0f11ef30(void) // not called -{ - return false; -} - -bool debug0f11ef38(void) // not called -{ - return false; -} - -bool debug0f11ef40(void) // not called -{ - return false; -} - -bool debugAllowEndLevel(void) -{ - return true; -} - -bool debug0f11ef50(void) // not called -{ - return false; -} - -bool debug0f11ef58(void) // not called -{ - return false; -} - -bool debug0f11ef60(void) // not called -{ - return false; -} - -bool debug0f11ef68(void) // not called -{ - return false; -} - -bool debug0f11ef70(void) // not called -{ - return false; -} - -bool debugIsChrStatsEnabled(void) -{ - return false; -} - -bool debug0f11ef80(void) -{ - return false; -} - -bool debug0f11ef88(void) // not called -{ - return false; -} - -bool debug0f11ef90(void) // not called -{ - return false; -} - -void debug0f11ef98(s32 arg0) // not called -{ - // empty -} - -void debug0f11efa0(void) // not called -{ - // empty -} - -void debug0f11efa8(void) // not called -{ - // empty -} diff --git a/src/game/debug1.c b/src/game/debug1.c deleted file mode 100644 index a85043a6b..000000000 --- a/src/game/debug1.c +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include "constants.h" -#include "game/debug.h" -#include "lib/debughud.h" -#include "bss.h" -#include "data.h" -#include "types.h" - -s32 g_DMenuSelectedOption = 0; -s32 g_DMenuNumOptions = 0; -char **g_DMenuCurLabels = NULL; -s32 (*g_DMenuCurPositions)[2] = NULL; -s32 g_DMenuNumGroups = 0; -s32 *g_DMenuCurOffsets = NULL; -u32 g_DMenuScaleIndex = 2; -u8 g_DMenuXScales[] = { 4, 4, 4 }; -u8 g_DMenuYScales[] = { 7, 7, 7 }; - -void dmenu0f118c80nb(void) -{ - // empty -} - -void dmenuSetScaleIndex(s32 index) -{ - g_DMenuScaleIndex = index; -} - -void dmenuSetMenu(char **labels, s32 (*positions)[2], s32 *offsets) -{ - s32 numgroups; - - g_DMenuCurLabels = labels; - g_DMenuCurPositions = positions; - g_DMenuCurOffsets = offsets; - - for (numgroups = 0; offsets[numgroups] >= 0; numgroups++); - - g_DMenuNumOptions = offsets[numgroups - 1]; - g_DMenuNumGroups = numgroups; -} - -Gfx *dmenuRender(Gfx *gdl) -{ - s32 xscale = g_DMenuXScales[g_DMenuScaleIndex]; - s32 yscale = g_DMenuYScales[g_DMenuScaleIndex]; - s32 i; - - gDPSetTextureLUT(gdl++, G_TT_NONE); - - // Render unselected/gray options - for (i = 0; i < g_DMenuNumOptions; i++) { - dmenu0f118c80nb(); - - if (i != g_DMenuSelectedOption) { - dhudSetFgColour(0xc0, 0xc0, 0xc0, 0xc0); - dhudSetPos((g_DMenuCurPositions[i][0] * xscale - 20) / 4, (g_DMenuCurPositions[i][1] * yscale - 8) / 7); - dhudPrintString(g_DMenuCurLabels[i]); - } - } - - // Render selected/red option - for (i = 0; i < g_DMenuNumOptions; i++) { - dmenu0f118c80nb(); - - if (i == g_DMenuSelectedOption) { - dhudSetFgColour(0xc0, 0, 0, 0xc0); - dhudSetPos((g_DMenuCurPositions[i][0] * xscale - 20) / 4, (g_DMenuCurPositions[i][1] * yscale - 8) / 7); - dhudPrintString(g_DMenuCurLabels[i]); - } - } - - return gdl; -} - -s32 dmenuGetSelectedOption(void) -{ - return g_DMenuSelectedOption; -} - -void dmenuSetSelectedOption(s32 option) -{ - g_DMenuSelectedOption = option; -} - -void dmenuNavigateUp(void) -{ - s32 i; - - g_DMenuSelectedOption--; - - // If at the top of the first group, wrap to the bottom of the group. - // This must be treated differently to the other groups because the first - // group's offset is omitted from the offsets array. - if (g_DMenuSelectedOption < 0) { - g_DMenuSelectedOption = g_DMenuCurOffsets[0] - 1; - return; - } - - // If at the top of any other group, wrap to the bottom of that group. - for (i = 0; i < g_DMenuNumGroups; i++) { - if (g_DMenuSelectedOption == g_DMenuCurOffsets[i] - 1) { - g_DMenuSelectedOption = g_DMenuCurOffsets[i + 1] - 1; - return; - } - } -} - -void dmenuNavigateDown(void) -{ - s32 i; - - g_DMenuSelectedOption++; - - // If at the bottom of the first group, wrap to the top of the group. - // This must be treated differently to the other groups because the first - // group's offset is omitted from the offsets array. - if (g_DMenuSelectedOption == g_DMenuCurOffsets[0]) { - g_DMenuSelectedOption = 0; - return; - } - - // If at the bottom of any other group, wrap to the top of that group. - for (i = 0; i < g_DMenuNumGroups; i++) { - if (g_DMenuSelectedOption == g_DMenuCurOffsets[i]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[i - 1]; - return; - } - } -} - -void dmenuNavigateRight(void) -{ - s32 i; - - if (g_DMenuSelectedOption < g_DMenuCurOffsets[0]) { - if (g_DMenuNumGroups >= 2) { - g_DMenuSelectedOption += g_DMenuCurOffsets[0]; - - if (g_DMenuSelectedOption >= g_DMenuCurOffsets[1]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[1] - 1; - } - } - return; - } - - for (i = 0; i < g_DMenuNumGroups; i++) { - if (g_DMenuSelectedOption < g_DMenuCurOffsets[i]) { - g_DMenuSelectedOption = g_DMenuSelectedOption + g_DMenuCurOffsets[i] - g_DMenuCurOffsets[i - 1]; - - if (g_DMenuCurOffsets[i + 1] < 0) { - g_DMenuSelectedOption -= g_DMenuCurOffsets[i]; - - if (g_DMenuSelectedOption >= g_DMenuCurOffsets[0]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[0] - 1; - } - } else { - if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i + 1]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[i + 1] - 1; - } - } - return; - } - } -} - -void dmenuNavigateLeft(void) -{ - s32 i; - - // First group - if (g_DMenuSelectedOption < g_DMenuCurOffsets[0]) { - s32 i; - - for (i = 0; i < g_DMenuNumGroups - 1; i++); - - if (i > 0) { - g_DMenuSelectedOption += g_DMenuCurOffsets[i - 1]; - - if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[i] - 1; - } - } - return; - } - - // Any other group - for (i = 0; g_DMenuSelectedOption >= g_DMenuCurOffsets[i]; i++); - - g_DMenuSelectedOption -= g_DMenuCurOffsets[i - 1]; - - if (i - 2 >= 0) { - g_DMenuSelectedOption += g_DMenuCurOffsets[i - 2]; - } - - if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i - 1]) { - g_DMenuSelectedOption = g_DMenuCurOffsets[i - 1] - 1; - } -} diff --git a/src/game/debug2.c b/src/game/debug2.c deleted file mode 100644 index c63502ba6..000000000 --- a/src/game/debug2.c +++ /dev/null @@ -1,1012 +0,0 @@ -#include -#include "constants.h" -#include "game/challenge.h" -#include "game/chraction.h" -#include "game/debug.h" -#include "game/gamefile.h" -#include "lib/debughud.h" -#include "lib/rmon.h" -#include "lib/str.h" -#include "lib/vi.h" -#include "lib/vm.h" -#include "bss.h" -#include "data.h" -#include "types.h" - -#define DEBUGMENU_MAIN 0 -#define DEBUGMENU_CUTSCENE 1 - -#define DEBUGOPT_ALLLEVELS 13 -#define DEBUGOPT_ALLTRAINING 29 -#define DEBUGOPT_PROPS 32 -#define DEBUGOPT_PADS 40 -#define DEBUGOPT_44 44 -#define DEBUGOPT_TILES 39 -#define DEBUGOPT_CHRSTATS 65 -#define DEBUGOPT_ALLCHALLENGES 67 -#define DEBUGOPT_VMSTATS 69 -#define DEBUGOPT_MEMINFO 70 -#define DEBUGOPT_ALLBUDDIES 94 -#define DEBUGOPT_SETCOMPLETE 95 - -#if VERSION == VERSION_PAL_BETA -#define DEBUGOPT_MANPOS 102 -#else -#define DEBUGOPT_MANPOS 101 -#endif - -#if VERSION == VERSION_PAL_BETA -s32 var80075d60 = 2; -s32 var80075d64 = 2; -s32 var80075d68 = 2; -s32 var800786f4nb = 2; -#endif - -s32 g_DebugMenuOffsets[] = { - 15, - 30, - 45, - 59, - 72, - 84, -#if VERSION == VERSION_PAL_BETA - 96, - 109, -#else - 95, - 108, -#endif - -1, -}; - -s32 g_DebugMenuPositions[][2] = { - { 8, 2 }, - { 8, 3 }, - { 8, 4 }, - { 8, 5 }, - { 8, 6 }, - { 8, 7 }, - { 8, 8 }, - { 8, 9 }, - { 8, 10 }, - { 8, 11 }, - { 8, 12 }, - { 8, 13 }, - { 8, 14 }, - { 8, 15 }, - { 8, 16 }, - - { 25, 2 }, - { 25, 3 }, - { 25, 4 }, - { 25, 5 }, - { 25, 6 }, - { 25, 7 }, - { 25, 8 }, - { 25, 9 }, - { 25, 10 }, - { 25, 11 }, - { 25, 12 }, - { 25, 13 }, - { 25, 14 }, - { 25, 15 }, - { 25, 16 }, - - { 40, 2 }, - { 40, 3 }, - { 40, 4 }, - { 40, 5 }, - { 40, 6 }, - { 40, 7 }, - { 40, 8 }, - { 40, 9 }, - { 40, 10 }, - { 40, 11 }, - { 40, 12 }, - { 40, 13 }, - { 40, 14 }, - { 40, 15 }, - { 40, 16 }, - - { 57, 2 }, - { 57, 3 }, - { 57, 4 }, - { 57, 5 }, - { 57, 6 }, - { 57, 7 }, - { 57, 8 }, - { 57, 9 }, - { 57, 10 }, - { 57, 11 }, - { 57, 12 }, - { 57, 13 }, - { 57, 14 }, - { 57, 15 }, - - { 8, 18 }, - { 8, 19 }, - { 8, 20 }, - { 8, 21 }, - { 8, 22 }, - { 8, 23 }, - { 8, 24 }, - { 8, 25 }, - { 8, 26 }, - { 8, 27 }, - { 8, 28 }, - { 8, 29 }, - { 8, 30 }, - - { 25, 18 }, - { 25, 19 }, - { 25, 20 }, - { 25, 21 }, - { 25, 22 }, - { 25, 23 }, - { 25, 24 }, - { 25, 25 }, - { 25, 26 }, - { 25, 27 }, - { 25, 28 }, - { 25, 29 }, - - { 40, 18 }, - { 40, 19 }, - { 40, 20 }, - { 40, 21 }, - { 40, 22 }, - { 40, 23 }, - { 40, 24 }, - { 40, 25 }, - { 40, 26 }, - { 40, 27 }, - { 40, 28 }, -#if VERSION == VERSION_PAL_BETA - { 40, 29 }, -#endif - - { 57, 18 }, - { 57, 19 }, - { 57, 20 }, - { 57, 21 }, - { 57, 22 }, - { 57, 23 }, - { 57, 24 }, - { 57, 25 }, - { 57, 26 }, - { 57, 27 }, - { 57, 28 }, - { 57, 29 }, - { 57, 30 }, -}; - -// ntsc-beta rodata at 7f1af170 -char *g_DebugMenuLabels[] = { - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "All Levels", - "-", - - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "All Training", - - "-", - "-", -#if VERSION == VERSION_NTSC_BETA - "props", -#else - "-", -#endif - "-", - "-", - "-", - "-", - "-", - "-", -#if VERSION == VERSION_NTSC_BETA - "tiles", - "pads", -#else - "-", - "-", -#endif - "-", - "-", - "-", - "-", - - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - - "-", - "-", - "-", - "-", - "-", - "-", -#if VERSION == VERSION_NTSC_BETA - "chr stats", -#else - "-", -#endif - "-", - "all challenges", - "-", - "VM Stats", - "Mem Info", - "-", - - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "-", - "all buddies", -#if VERSION == VERSION_PAL_BETA - "set complete", -#endif - - "-", - "-", - "-", - "-", - "-", - "-", - "testing man pos", - "-", - "-", - "-", - "-", - "-", - "-", -}; - -s32 g_DebugCutsceneOffsets[] = { - 0, -1, -}; - -s32 g_DebugCutscenePositions[][2] = { - { 8, 2 }, - { 8, 3 }, - { 8, 4 }, - { 8, 5 }, - { 8, 6 }, - { 8, 7 }, - { 8, 8 }, - { 8, 9 }, - { 8, 10 }, - { 8, 11 }, -}; - -char *g_DebugCutsceneLabelPtrs[10]; -char g_DebugCutsceneLabelBuffers[10][20]; -u32 var800a7950nb; - -s32 g_DebugCurMenu = DEBUGMENU_MAIN; -s32 g_DebugSelectedOptionsByMenu[2] = {0, 0}; - -#if VERSION == VERSION_NTSC_BETA -s32 var80075d60 = 2; -s32 var80075d64 = 2; -s32 var80075d68 = 2; -s32 var800786f4nb = 2; -#endif - -s32 var800786f8nb = 0; -bool g_DebugRenderBg = true; -bool g_DebugRenderProps = true; -s32 var80078704nb = 1; -s32 var80078708nb = 0; -bool g_DebugRoomState = false; -s32 var80078710nb = 0; -s32 var80078714nb = 0; -s32 var80078718nb = 0; -bool g_DebugObjDeform = false; -bool g_DebugLineMode = false; -s32 var80078724nb = 0; -s32 var80078728nb = 0; -s32 var8007872cnb = 0; -bool g_DebugManPos = false; -bool g_DebugTurboMode = false; -bool g_DebugObjectives = false; -bool g_DebugZBufferDisabled = false; -s32 var80078740nb = 0; -s32 var80078744nb = 0; -s32 var80078748nb = 0; -s32 var8007874cnb = 0; -s32 var80078750nb = 0; -s32 var80078754nb = 0; -s32 var80078758nb = 0; -s32 var8007875cnb = 0; -s32 var80078760nb = 0; -s32 g_DebugSlowMotion = SLOWMOTION_OFF; -s32 var80078768nb = 0; -s32 g_DebugTiles = 0; -s32 g_DebugPads = 0; -s32 var80078774nb = 0; -s32 var80078778nb = 0; -s32 var8007877cnb = 0; -s32 var80078780nb = 0; -s32 var80078784nb = 0; -s32 var80078788nb = 0; -s32 var8007878cnb = 0; -s32 var80078790nb = 0; -bool g_DebugFootsteps = true; -bool g_DebugAllChallenges = false; -bool g_DebugAllBuddies = false; -#if VERSION == VERSION_PAL_BETA -bool g_DebugSetComplete = false; -#endif -bool g_DebugAllTraining = false; -s32 var800787a4nb = 0; -s32 var800787a8nb = 0; -bool g_DebugMemInfo = false; -s32 var800787b0nb = 0; -s32 var800787b4nb = 0; -s32 var800787b8nb = 0; -s32 var800787bcnb = 0; -s32 var800787c0nb = 0; -s32 var800787c4nb = 1; -s32 var800787c8nb = 0; -s32 var800787ccnb = 0; -s32 var800787d0nb = 0; -s32 var800787d4nb = 0; -s32 var800787d8nb = 0; -s32 var800787dcnb = 0; -s32 var800787e0nb = 0; -bool g_DebugChrStats = false; -s32 var800787e8nb = 0; -s32 var800787ecnb = 0; -s32 var800787f0nb = 0; -u32 var800787f4nb = 0x80500000; -u32 var800787f8nb = 0x00040000; -u32 var800787fcnb = 0x7f000000; -u32 var80078800nb = 0x7f100000; -u32 var80078804nb = 0x80600000; -u32 var80078808nb = 0x00040000; -u32 var8007880cnb = 0x70000000; -u32 var80078810nb = 0x70100000; -s32 g_DebugScreenshotRgb = 0; -s32 g_DebugScreenshotJpg = 0; -bool g_DebugIsMenuOpen = false; - -u32 var80078820nb = 0; -u32 var80078824nb = 0; -u32 var80078828nb = 0; -u32 var8007882cnb = 0; -u32 var80078830nb = 0; -u32 var80078834nb = 0xbf800000; -u32 var80078838nb = 0; -u32 var8007883cnb = 0x3f800000; -u32 var80078840nb = 0; -u32 var80078844nb = 0; -u32 var80078848nb = 0x3f800000; -u32 var8007884cnb = 0; -u32 var80078850nb = 0; -u32 var80078854nb = 0x3f800000; -u32 var80078858nb = 0; -u32 var8007885cnb = 0; -u32 var80078860nb = 0; -u32 var80078864nb = 0; -u32 var80078868nb = 0; -u32 var8007886cnb = 0; -u32 var80078870nb = 0; -u32 var80078874nb = 0; -u32 var80078878nb = 0x3f800000; - -void debugUpdateMenu(void) -{ - s32 i; - -} - -void debugSaveSelectedOption(void) -{ - g_DebugSelectedOptionsByMenu[g_DebugCurMenu] = dmenuGetSelectedOption(); -} - -void debug0f1193e4nb(void) -{ - // empty -} - -void debug0f1193ecnb(void) -{ - // empty -} - -void debug0f1193f4nb(void) -{ - var80075d60 = var80075d64 = var800786f4nb = 2; -} - -void debug0f11941cnb(void) -{ - rmon0002fa30(&var800787f4nb, 2); - rmon0002fa38(250); -} - -void debug0f11944cnb(void) -{ - rmon0002fa40(); -} - -bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe) -{ - s32 i; - s32 prev; - s32 tmp = 3; - - debugUpdateMenu(); - - if (g_DebugScreenshotRgb) { - prev = g_DebugScreenshotRgb++; - - if (tmp == prev) { - viGrabRgb32(); - g_DebugScreenshotRgb = 0; - viSet16Bit(); - osViBlack(false); - } - } - - if (g_DebugScreenshotJpg) { - prev = g_DebugScreenshotJpg++; - - if (tmp == prev) { - viGrabJpg32(); - g_DebugScreenshotJpg = 0; - viSet16Bit(); - osViBlack(false); - } - } - - if (!g_DebugIsMenuOpen) { - tmp = (buttons & U_CBUTTONS) && (buttons & D_CBUTTONS); - g_DebugIsMenuOpen = tmp; - return tmp; - } - - if (var80075d68 != -2) { - var800786f4nb = var80075d68; - var80075d68 = -2; - } - - if (buttonsthisframe & L_JPAD) { - dmenuNavigateLeft(); - var80075d68 = -2; - } - - if (buttonsthisframe & R_JPAD) { - dmenuNavigateRight(); - var80075d68 = -2; - } - - if (buttonsthisframe & U_JPAD) { - dmenuNavigateUp(); - var80075d68 = -2; - } - - if (buttonsthisframe & D_JPAD) { - dmenuNavigateDown(); - var80075d68 = -2; - } - - if (buttonsthisframe & (A_BUTTON | START_BUTTON)) { - if (g_DebugCurMenu == DEBUGMENU_CUTSCENE) { - if (dmenuGetSelectedOption() == 0) { - // Selected "main" from cutscene menu - g_DebugCurMenu = DEBUGMENU_MAIN; - dhudClear(); - debugUpdateMenu(); - } else { - cutsceneStart(0xc00 + dmenuGetSelectedOption() - 1); - } - } else if (g_DebugCurMenu == DEBUGMENU_MAIN) { - switch (dmenuGetSelectedOption()) { -#if VERSION == VERSION_PAL_BETA - case DEBUGOPT_MANPOS: - g_DebugManPos ^= 1; - break; - case DEBUGOPT_ALLBUDDIES: - g_DebugAllBuddies ^= 1; - break; - case DEBUGOPT_SETCOMPLETE: - g_DebugSetComplete ^= 1; - break; - case DEBUGOPT_VMSTATS: - g_VmShowStats ^= 1; - break; - case DEBUGOPT_MEMINFO: - g_DebugMemInfo ^= 1; - break; - case DEBUGOPT_ALLLEVELS: - for (i = 0; i < 21; i++) { - for (tmp = 0; tmp < 3; tmp++) { - g_GameFile.besttimes[i][tmp] = 7; - } - } - - g_AltTitleUnlocked = true; - break; - case DEBUGOPT_ALLCHALLENGES: - g_DebugAllChallenges ^= 1; - challengeDetermineUnlockedFeatures(); - break; - case DEBUGOPT_ALLTRAINING: - g_DebugAllTraining ^= 1; - - for (i = 0; i < ARRAYCOUNT(g_GameFile.firingrangescores); i++) { - g_GameFile.firingrangescores[i] = 0xff; - } - - gamefileSetFlag(GAMEFILEFLAG_CI_CLOAK_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_DISGUISE_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_XRAY_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_IR_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_RTRACKER_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_DOORDECODER_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_NIGHTVISION_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_CAMSPY_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_ECMMINE_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_UPLINK_DONE); - break; -#else - case DEBUGOPT_MANPOS: - g_DebugManPos ^= 1; - break; - case DEBUGOPT_PADS: - g_DebugPads = (g_DebugPads + 1) % 4; - break; - case DEBUGOPT_TILES: - g_DebugTiles = (g_DebugTiles + 1) % 4; - break; - case DEBUGOPT_ALLLEVELS: - for (i = 0; i < 21; i++) { - for (tmp = 0; tmp < 3; tmp++) { - g_GameFile.besttimes[i][tmp] = 7; - } - } - - g_AltTitleUnlocked = true; - break; - case DEBUGOPT_ALLCHALLENGES: - g_DebugAllChallenges ^= 1; - challengeDetermineUnlockedFeatures(); - break; - case DEBUGOPT_ALLBUDDIES: - g_DebugAllBuddies ^= 1; - break; - case DEBUGOPT_ALLTRAINING: - g_DebugAllTraining ^= 1; - - for (i = 0; i < ARRAYCOUNT(g_GameFile.firingrangescores); i++) { - g_GameFile.firingrangescores[i] = 0xff; - } - - gamefileSetFlag(GAMEFILEFLAG_CI_CLOAK_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_DISGUISE_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_XRAY_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_IR_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_RTRACKER_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_DOORDECODER_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_NIGHTVISION_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_CAMSPY_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_ECMMINE_DONE); - gamefileSetFlag(GAMEFILEFLAG_CI_UPLINK_DONE); - break; - case DEBUGOPT_44: - // This is one of the "-" labels. The value is returned in a - // getter function but the getter function is never called. - var800787a4nb ^= 1; - break; - case DEBUGOPT_CHRSTATS: - g_DebugChrStats ^= 1; - break; - case DEBUGOPT_PROPS: - g_DebugRenderProps ^= 1; - break; - case DEBUGOPT_VMSTATS: - g_VmShowStats ^= 1; - break; - case DEBUGOPT_MEMINFO: - g_DebugMemInfo ^= 1; - break; -#endif - } - } - } - - if (buttonsthisframe & START_BUTTON) { - if (g_DebugIsMenuOpen == true) { - dhudClear(); - } - - g_DebugIsMenuOpen = false; - } - - debugSaveSelectedOption(); - - return g_DebugIsMenuOpen; -} - -bool debug0f11ed70(void) -{ - return var800786f8nb; -} - -bool debugIsBgRenderingEnabled(void) -{ - return g_DebugRenderBg; -} - -bool debugIsPropRenderingEnabled(void) -{ - return g_DebugRenderProps; -} - -bool debug0f11990cnb(void) -{ - return var80078708nb; -} - -bool debugIsManPosEnabled(void) -{ - return g_DebugManPos; -} - -void debugSetManPos(bool enabled) -{ - g_DebugManPos = enabled; -} - -bool debug0f119930nb(void) -{ - return var80078710nb; -} - -bool debug0f11993cnb(void) -{ - return var80078714nb; -} - -bool debug0f11edb0(void) -{ - return var80078718nb; -} - -bool debugIsObjDeformDebugEnabled(void) -{ - return g_DebugObjDeform; -} - -bool debugIsRoomStateDebugEnabled(void) -{ - return g_DebugRoomState; -} - -bool debugIsLineModeEnabled(void) -{ - return g_DebugLineMode; -} - -void debugSetLineModeEnabled(bool enabled) -{ - g_DebugLineMode = enabled; -} - -bool debugIsTurboModeEnabled(void) -{ - return g_DebugTurboMode; -} - -void debugSetTurboMode(bool enabled) -{ - g_DebugTurboMode = enabled; -} - -bool debugForceAllObjectivesComplete(void) -{ - return g_DebugObjectives; -} - -bool debugIsZBufferDisabled(void) -{ - return g_DebugZBufferDisabled; -} - -bool debug0f11ee30(void) -{ - return var80078744nb; -} - -bool debug0f11ee38(void) -{ - return var80078750nb; -} - -bool debug0f11ee40(void) -{ - return var80078754nb; -} - -bool debug0f1199d8nb(void) -{ - return var80078758nb; -} - -bool debug0f1199e4nb(void) -{ - return var80078740nb; -} - -bool debug0f1199f0nb(void) -{ - return var80078724nb; -} - -bool debug0f1199fcnb(void) -{ - return var80078728nb; -} - -bool debug0f119a08nb(void) -{ - return var8007872cnb; -} - -bool debug0f119a14nb(void) -{ - return var80078748nb; -} - -bool debug0f119a20nb(void) -{ - return var8007874cnb; -} - -bool debug0f119a2cnb(void) -{ - return var8007875cnb; -} - -s32 debugGetSlowMotion(void) -{ - return g_DebugSlowMotion; -} - -bool debug0f119a44nb(void) -{ - return var80078768nb; -} - -bool debug0f119a50nb(void) -{ - return var80078760nb; -} - -s32 debugGetTilesDebugMode(void) -{ - return g_DebugTiles; -} - -s32 debugGetPadsDebugMode(void) -{ - return g_DebugPads; -} - -bool debug0f119a74nb(void) -{ - return var80078774nb; -} - -void debug0f119a80nb(void) -{ - var80078774nb = 0; -} - -bool debug0f119a8cnb(void) -{ - return var80078778nb; -} - -bool debug0f11eea8(void) -{ - return var80078780nb; -} - -bool debug0f119aa4nb(void) -{ - return false; -} - -bool debugDangerousProps(void) -{ - return var800787ecnb; -} - -bool debug0f119ab8nb(void) -{ - return var800787d8nb; -} - -bool debug0f119ac4nb(void) -{ - return var800787dcnb; -} - -bool debug0f119ad0nb(void) -{ - return var8007877cnb; -} - -bool debugGetMotionBlur(void) -{ - return var80078784nb; -} - -bool debug0f119ae8nb(void) -{ - return var80078790nb; -} - -u32 dprint() -{ - return var800787b8nb; -} - -bool debug0f119b00nb(void) -{ - return var800787c0nb; -} - -bool debugAllowEndLevel(void) -{ - return var800787c4nb; -} - -bool debug0f119b18nb(void) -{ - return var800787c8nb; -} - -bool debug0f119b24nb(void) -{ - return var800787ccnb; -} - -bool debug0f119b30nb(void) -{ - return var800787d0nb; -} - -bool debug0f119b3cnb(void) -{ - return var800787d4nb; -} - -bool debugIsFootstepsEnabled(void) -{ - return g_DebugFootsteps; -} - -bool debugIsAllChallengesEnabled(void) -{ - return g_DebugAllChallenges; -} - -bool debugIsAllBuddiesEnabled(void) -{ - return g_DebugAllBuddies; -} - -#if VERSION == VERSION_PAL_BETA -bool debugIsSetCompleteEnabled(void) -{ - return g_DebugSetComplete; -} -#endif - -bool debugIsAllTrainingEnabled(void) -{ - return g_DebugAllTraining; -} - -bool debug0f119b78nb(void) -{ - return var800787a4nb; -} - -bool debug0f119b84nb(void) -{ - return var800787a8nb; -} - -bool debugIsMemInfoEnabled(void) -{ - return g_DebugMemInfo; -} - -bool debug0f119b9cnb(void) -{ - return var800787b0nb; -} - -bool debug0f119ba8nb(void) -{ - return var800787bcnb; -} - -bool debugIsChrStatsEnabled(void) -{ - return g_DebugChrStats; -} - -bool debug0f11ef80(void) -{ - return var800787e8nb; -} - -bool debug0f119bccnb(void) -{ - return var800787e0nb; -} - -bool debug0f119bd8nb(void) -{ - return var800787f0nb; -} diff --git a/src/game/debug3.c b/src/game/debug3.c deleted file mode 100644 index 5fc088876..000000000 --- a/src/game/debug3.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include "constants.h" -#include "game/debug.h" -#include "bss.h" -#include "data.h" -#include "types.h" - -void debug0f11efb0(s32 arg0, s32 arg1) -{ - // empty -} - -void debug0f11efbc(s32 arg0) -{ - // empty -} - -s32 debug0f11efc4(s32 arg0) -{ - return arg0; -} - -void debug0f11efcc(void) -{ - // empty -} - -void debug0f11efd4(void) -{ - // empty -} - -void debug0f11efdc(s32 arg0) -{ - // empty -} diff --git a/src/game/footstep.c b/src/game/footstep.c index 55e0b62af..5d6277ead 100644 --- a/src/game/footstep.c +++ b/src/game/footstep.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/debug.h" #include "game/game_006900.h" #include "game/propsnd.h" #include "game/bg.h" @@ -154,7 +153,7 @@ s32 footstepChooseSound(struct chrdata *chr, s32 footstepindex) */ void footstepCheckDefault(struct chrdata *chr) { - if (debugIsFootstepsEnabled() && PLAYERCOUNT() == 1 && chr) { + if (PLAYERCOUNT() == 1 && chr) { chr->footstep = 0; chr->magicanim = -1; chr->magicframe = 0; @@ -224,7 +223,7 @@ void footstepCheckMagic(struct chrdata *chr) f32 zdiff; s32 soundnum; - if (debugIsFootstepsEnabled() && PLAYERCOUNT() == 1 && chr->magicanim >= 0) { + if (PLAYERCOUNT() == 1 && chr->magicanim >= 0) { #if VERSION >= VERSION_PAL_BETA chr->magicframe += g_Vars.lvupdate60freal * chr->magicspeed; #else diff --git a/src/game/game_006900.c b/src/game/game_006900.c index 490967176..8509668e3 100644 --- a/src/game/game_006900.c +++ b/src/game/game_006900.c @@ -1,6 +1,5 @@ #include #include "constants.h" -#include "game/debug.h" #include "game/game_006900.h" #include "game/propsnd.h" #include "game/bg.h" diff --git a/src/game/hudmsg.c b/src/game/hudmsg.c index 32daa64cc..a5ac755d5 100644 --- a/src/game/hudmsg.c +++ b/src/game/hudmsg.c @@ -89,7 +89,6 @@ s32 hudmsgIsZoomRangeVisible(void) || !g_Vars.mplayerisrunning || g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) - && var80075d60 == 2 && currentPlayerGetSight() == SIGHT_ZOOM && g_Vars.currentplayer->cameramode != CAMERAMODE_THIRDPERSON; } @@ -1714,7 +1713,6 @@ Gfx *hudmsgsRender(Gfx *gdl) if (timerthing) { if (optionsGetShowMissionTime(g_Vars.currentplayerstats->mpindex) - && var80075d60 == 2 && g_Vars.normmplayerisrunning == false && g_Vars.stagenum != STAGE_CITRAINING && g_Vars.currentplayer->cameramode != CAMERAMODE_THIRDPERSON) { diff --git a/src/game/lv.c b/src/game/lv.c index 8f12e6c1a..148acd204 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -14,7 +14,6 @@ #include "game/casing.h" #include "game/chr.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/dlights.h" #include "game/explosions.h" #include "game/filemgr.h" @@ -648,69 +647,6 @@ bool lvUpdateTrackedProp(struct trackedprop *trackedprop, s32 index) return true; } -#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA -Gfx *lvRenderManPosIfEnabled(Gfx *gdl) -{ - char bufroom[16]; - char bufx[16]; - char bufy[16]; - char bufz[16]; - char bufdir[16]; - s32 x; - s32 y; - s32 y2; - - if (debugIsManPosEnabled()) { - f32 xfrac = g_Vars.currentplayer->bond2.unk00.x; - f32 zfrac = g_Vars.currentplayer->bond2.unk00.z; - - char directions[][3] = { - {'n', '\0', '\0'}, - {'n', 'e', '\0'}, - {'e', '\0', '\0'}, - {'s', 'e', '\0'}, - {'s', '\0', '\0'}, - {'s', 'w', '\0'}, - {'w', '\0', '\0'}, - {'n', 'w', '\0'}, - {'n', '\0', '\0'}, - }; - - s32 degrees = atan2f(-xfrac, zfrac) * 180.0f / M_PI; - - sprintf(bufroom, "R=%d(%d)", g_Vars.currentplayer->prop->rooms[0], g_Vars.currentplayer->cam_room); - sprintf(bufx, "%s%sx %4.0f", "", "", g_Vars.currentplayer->prop->pos.x); - sprintf(bufy, "%s%sy %4.0f", "", "", g_Vars.currentplayer->prop->pos.y); - sprintf(bufz, "%s%sz %4.0f", "", "", g_Vars.currentplayer->prop->pos.z); - sprintf(bufdir, "%s %3d", &directions[(degrees + 22) / 45], degrees); - - x = viGetViewLeft() + 17; - y = viGetViewTop() + 17; - y2 = y + 10; - gdl = text0f153628(gdl); - gdl = text0f153a34(gdl, 0, y - 1, viGetWidth(), y2 + 1, 0x00000064); - - gdl = textRenderProjected(gdl, &x, &y, bufroom, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, viGetWidth(), viGetHeight(), 0, 0); - - x = viGetViewLeft() + 87; - gdl = textRenderProjected(gdl, &x, &y, bufx, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, viGetWidth(), viGetHeight(), 0, 0); - - x = viGetViewLeft() + 141; - gdl = textRenderProjected(gdl, &x, &y, bufy, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, viGetWidth(), viGetHeight(), 0, 0); - - x = viGetViewLeft() + 195; - gdl = textRenderProjected(gdl, &x, &y, bufz, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, viGetWidth(), viGetHeight(), 0, 0); - - x = viGetViewLeft() + 249; - gdl = textRenderProjected(gdl, &x, &y, bufdir, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0xffffffff, viGetWidth(), viGetHeight(), 0, 0); - - gdl = text0f153780(gdl); - } - - return gdl; -} -#endif - void lvFindThreatsForProp(struct prop *prop, bool inchild, struct coord *playerpos, bool *activeslots, f32 *distances) { bool condition = true; @@ -1123,12 +1059,7 @@ Gfx *lvRender(Gfx *gdl) if (g_Vars.stagenum == STAGE_TITLE || (g_Vars.stagenum == STAGE_TEST_OLD && titleIsKeepingMode())) { gSPDisplayList(gdl++, &var800613a0); - - if (debugIsZBufferDisabled()) { - gSPDisplayList(gdl++, &var80061360); - } else { - gSPDisplayList(gdl++, &var80061380); - } + gSPDisplayList(gdl++, &var80061380); gdl = vi0000b280(gdl); gdl = vi0000b1d0(gdl); @@ -1249,12 +1180,7 @@ Gfx *lvRender(Gfx *gdl) bviewSetMotionBlur(bluramount); gSPDisplayList(gdl++, &var800613a0); - - if (debugIsZBufferDisabled()) { - gSPDisplayList(gdl++, &var80061360); - } else { - gSPDisplayList(gdl++, &var80061380); - } + gSPDisplayList(gdl++, &var80061380); viSetViewPosition(g_Vars.currentplayer->viewleft, g_Vars.currentplayer->viewtop); viSetFovAspectAndSize(g_Vars.currentplayer->fovy, g_Vars.currentplayer->aspect, @@ -1277,7 +1203,6 @@ Gfx *lvRender(Gfx *gdl) var80084050++; } else if (g_Vars.currentplayer->gunctrl.unk1583_06 - && var80075d60 == 2 && g_Vars.currentplayer->cameramode != CAMERAMODE_THIRDPERSON && var8009dfc0 == 0) { g_Vars.currentplayer->gunctrl.unk1583_06 = bgun0f09eae4(); @@ -1295,10 +1220,7 @@ Gfx *lvRender(Gfx *gdl) gdl = menuRender(gdl); } } else { - if (var80075d60 == 2) { - gdl = playerUpdateShootRot(gdl); - } - + gdl = playerUpdateShootRot(gdl); gdl = viRenderViewportEdges(gdl); gdl = skyRender(gdl); bgTick(); @@ -1372,7 +1294,7 @@ Gfx *lvRender(Gfx *gdl) propsTestForPickup(); gdl = bgRender(gdl); - chr0f028498(var80075d68 == 15 || g_AnimHostEnabled); + chr0f028498(false); gdl = propsRenderBeams(gdl); gdl = shardsRender(gdl); gdl = sparksRender(gdl); @@ -1382,21 +1304,9 @@ Gfx *lvRender(Gfx *gdl) gdl = nbombsRender(gdl); } - if (var80075d60 == 2) { - gdl = playerRenderHud(gdl); + gdl = playerRenderHud(gdl); -#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA - gdl = lvRenderManPosIfEnabled(gdl); -#endif - } else { - gdl = boltbeamsRender(gdl); - - if (g_Vars.currentplayer->visionmode != VISIONMODE_XRAY) { - gdl = bgRenderArtifacts(gdl); - } - } - - if (g_DebugScreenshotRgb <= 0) { + { static struct sndstate *g_CutsceneStaticAudioHandle = NULL; static s32 g_CutsceneStaticTimer = 100; static u8 g_CutsceneStaticActive = false; @@ -1404,50 +1314,6 @@ Gfx *lvRender(Gfx *gdl) u32 alpha; if (g_Vars.tickmode == TICKMODE_CUTSCENE) { - // This chunk of code is unreachable - // (STAGE_TEST_OLD is not used) -#if VERSION < VERSION_PAL_BETA - if (g_Vars.stagenum == STAGE_TEST_OLD) { - f32 frac = 0; - u32 colour; - s32 endframe = animGetNumFrames(g_CutsceneAnimNum) - 1; - - colour = 0; - - if (g_CutsceneCurAnimFrame60 < 90) { - frac = 1.0f - (f32)g_CutsceneCurAnimFrame60 / 90.0f; - } - - if (g_CutsceneAnimNum != ANIM_CUT_OLD_TITLE_CAM_04) { - if (g_CutsceneCurAnimFrame60 > endframe - 90) { - frac = (g_CutsceneCurAnimFrame60 - endframe + 90) / 90.0f; - } - } else { - if (g_CutsceneCurAnimFrame60 > endframe - 30) { - colour = 0xffffff00; - frac = (g_CutsceneCurAnimFrame60 - endframe + 30) / 30.0f; - } - } - - if (frac > 0) { - alpha = 255 * frac; - - gDPPipeSync(gdl++); - gDPSetRenderMode(gdl++, G_RM_CLD_SURF, G_RM_CLD_SURF2); - gDPSetCombineMode(gdl++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetPrimColorViaWord(gdl++, 0, 0, colour | alpha); - - gDPFillRectangle(gdl++, - viGetViewLeft(), - viGetViewTop(), - viGetViewLeft() + viGetViewWidth(), - viGetViewTop() + viGetViewHeight()); - - gdl = text0f153838(gdl); - } - } -#endif - // Handle visual effects in cutscenes switch (g_CutsceneAnimNum) { case ANIM_CUT_CAVE_INTRO_CAM: @@ -1618,14 +1484,6 @@ Gfx *lvRender(Gfx *gdl) if (bluramount); #endif - if (debugGetMotionBlur() == 1) { - gdl = bviewDrawMotionBlur(gdl, 0xffffff00, 128); - } else if (debugGetMotionBlur() == 2) { - gdl = bviewDrawMotionBlur(gdl, 0xffffff00, 192); - } else if (debugGetMotionBlur() == 3) { - gdl = bviewDrawMotionBlur(gdl, 0xffffff00, 230); - } - // Render white when teleporting if (g_Vars.currentplayer->teleportstate > TELEPORTSTATE_INACTIVE) { alpha = 0; @@ -1668,38 +1526,6 @@ Gfx *lvRender(Gfx *gdl) gdl = scenarioRenderHud(gdl); #endif - if (debugGetTilesDebugMode() != 0 - || debugGetPadsDebugMode() != 0 - || debug0f11eea8() - || debug0f11ef80() - || debugIsChrStatsEnabled() - || debug0f11ee40()) { -#if VERSION < VERSION_NTSC_1_0 - s16 spc8[21]; - s16 spb0[11]; - s16 sp9c[10]; - s32 j; - - sp9c[0] = g_Vars.currentplayer->memcamroom; - sp9c[1] = -1; - - for (j = 0; sp9c[j] != -1; j++) { - spc8[j] = sp9c[j]; - } - - spc8[j] = -1; - - for (j = 0; sp9c[j] != -1; j++) { - roomGetNeighbours(sp9c[j], spb0, 10); - roomsAppend(spb0, spc8, 20); - } - - if (debugIsChrStatsEnabled()) { - gdl = chrsRenderChrStats(gdl, spc8); - } -#endif - } - gdl = sky0f1274d8(gdl); gdl = amRender(gdl); mtx00016748(1); @@ -2331,13 +2157,7 @@ void lvTickPlayer(void) f32 xdiff; f32 zdiff; - if (var80075d64 == 2) { - if (var80075d68 == 2) { - playerTick(true); - } else { - playerTick(false); - } - } + playerTick(true); xdiff = g_Vars.currentplayer->prop->pos.x - g_Vars.currentplayer->bondprevpos.x; zdiff = g_Vars.currentplayer->prop->pos.z - g_Vars.currentplayer->bondprevpos.z; diff --git a/src/game/objectives.c b/src/game/objectives.c index a36587fd3..cbb1159ec 100644 --- a/src/game/objectives.c +++ b/src/game/objectives.c @@ -1,7 +1,6 @@ #include #include "constants.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/prop.h" #include "game/setuputils.h" #include "game/objectives.h" @@ -331,10 +330,6 @@ s32 objectiveCheck(s32 index) } } - if (debugForceAllObjectivesComplete()) { - objstatus = OBJECTIVE_COMPLETE; - } - return objstatus; } diff --git a/src/game/player.c b/src/game/player.c index 272e0c798..0e9021fba 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -5173,9 +5173,7 @@ s32 playerTickThirdPerson(struct prop *prop) } if (player->haschrbody && player->model00d4) { - if (var80075d60 == 0 - || var80075d60 == 1 - || (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode != VISIONMODE_SLAYERROCKET)) { + if (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode != VISIONMODE_SLAYERROCKET) { chr->chrflags |= CHRCFLAG_00000001; player->bondperimenabled = false; diff --git a/src/game/propobj.c b/src/game/propobj.c index 708326dba..110134c99 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -3,7 +3,6 @@ #include "game/bondmove.h" #include "game/bondwalk.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/dlights.h" #include "game/nbomb.h" #include "game/playerreset.h" @@ -14643,15 +14642,8 @@ void objDeform(struct defaultobj *obj, s32 level) salt = 0; - if (debugIsObjDeformDebugEnabled()); - if (debugIsObjDeformDebugEnabled()); - salt = random(); - if (debugIsObjDeformDebugEnabled()) { - salt &= 0xffff; - } - wallhitsFreeByProp(obj->prop, 1); swap = false; diff --git a/src/game/proptick.c b/src/game/proptick.c index a4bb28507..877c3de40 100644 --- a/src/game/proptick.c +++ b/src/game/proptick.c @@ -3,7 +3,6 @@ #include "constants.h" #include "game/bondmove.h" #include "game/chraction.h" -#include "game/debug.h" #include "game/chr.h" #include "game/prop.h" #include "game/propsnd.h" diff --git a/src/include/game/debug.h b/src/include/game/debug.h deleted file mode 100644 index d80e43fd1..000000000 --- a/src/include/game/debug.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef IN_GAME_DEBUG_H -#define IN_GAME_DEBUG_H -#include -#include "data.h" -#include "types.h" - -void debug0f119a80nb(void); -u32 dprint(); -s32 debug0f11ed70(void); -bool debugIsBgRenderingEnabled(void); -bool debugIsPropRenderingEnabled(void); -bool debug0f11edb0(void); -bool debugIsObjDeformDebugEnabled(void); -bool debugIsRoomStateDebugEnabled(void); -s32 debugIsTurboModeEnabled(void); -bool debugForceAllObjectivesComplete(void); -bool debugIsZBufferDisabled(void); -bool debug0f11ee40(void); -s32 debugGetSlowMotion(void); -s32 debugGetTilesDebugMode(void); -s32 debugGetPadsDebugMode(void); -bool debug0f11eea8(void); -bool debugDangerousProps(void); -s32 debugGetMotionBlur(void); -bool debugIsFootstepsEnabled(void); -bool debugAllowEndLevel(void); -bool debugIsChrStatsEnabled(void); -bool debug0f11ef80(void); - -s32 dmenuGetSelectedOption(void); -void dmenuSetSelectedOption(s32 option); -void dmenuSetMenu(char **labels, s32 (*positions)[2], s32 *offsets); -void dmenuNavigateRight(void); -void dmenuNavigateLeft(void); -void dmenuNavigateUp(void); -void dmenuNavigateDown(void); -Gfx *dmenuRender(Gfx *gdl); - -void debugUpdateMenu(void); -bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe); -bool debugIsLineModeEnabled(void); - -extern s32 var800786f4nb; -extern s32 g_DebugMenuPositions[][2]; -extern char *g_DebugMenuLabels[]; - -#endif diff --git a/src/lib/main.c b/src/lib/main.c index 19e2a7645..782067b95 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -4,7 +4,6 @@ #include "lib/vars.h" #include "constants.h" #include "game/camdraw.h" -#include "game/debug.h" #include "game/file.h" #include "game/lang.h" #include "game/race.h" @@ -1890,16 +1889,6 @@ void mainTick(void) gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); gDPSetTile(gdl++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, 6, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); -#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA - if (g_MainIsDebugMenuOpen || joyGetButtons(0, U_CBUTTONS | D_CBUTTONS) == (U_CBUTTONS | D_CBUTTONS)) { - g_MainIsDebugMenuOpen = debugProcessInput(joyGetStickX(0), joyGetStickY(0), joyGetButtons(0, 0xffff), joyGetButtonsPressedThisFrame(0, 0xffff)); - } else if (joyGetButtons(0, START_BUTTON) == 0) { - var80075d68 = var800786f4nb; - } else { - g_MainIsDebugMenuOpen = debugProcessInput(joyGetStickX(0), joyGetStickY(0), joyGetButtons(0, 0xffff), joyGetButtonsPressedThisFrame(0, 0xffff)); - } -#endif - lvTick(); playermgrShuffle(); @@ -1921,32 +1910,6 @@ void mainTick(void) gdl = lvRender(gdl); func000034e0(&gdl); -#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA - if (debugIsLineModeEnabled()) { - gDPPipeSync(gdl++); - gDPSetCycleType(gdl++, G_CYC_1CYCLE); - gDPSetBlendColor(gdl++, 0xff, 0xff, 0xff, 0xff); - gDPSetPrimDepth(gdl++, 0xffff, 0xffff); - gDPSetDepthSource(gdl++, G_ZS_PRIM); - gDPSetRenderMode(gdl++, G_RM_VISCVG, G_RM_VISCVG2); - gDPFillRectangle(gdl++, 0, 0, viGetWidth() - 1, viGetHeight() - 1); - } - - gdl = dhudRender(gdl); - dhudClear(); -#endif - - if (debug0f11ed70() >= 2) { - gdl = profileRender(gdl); - } - -#if VERSION == VERSION_NTSC_BETA || VERSION == VERSION_PAL_BETA - if (g_MainIsDebugMenuOpen) { - debugUpdateMenu(); - gdl = dmenuRender(gdl); - } -#endif - gDPFullSync(gdl++); gSPEndDisplayList(gdl++); } @@ -1961,10 +1924,6 @@ void mainTick(void) memaPrint(); func0f16cf94(); profileSetMarker(PROFILE_MAINTICK_END); - -#if VERSION == VERSION_PAL_BETA - debug0f119a80nb(); -#endif } }