diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/fault_drawer.c | 4 | ||||
| -rw-r--r-- | src/code/game.c | 3 | ||||
| -rw-r--r-- | src/code/graph.c | 6 | ||||
| -rw-r--r-- | src/code/sched.c | 4 | ||||
| -rw-r--r-- | src/code/z_actor_dlftbls.c | 20 | ||||
| -rw-r--r-- | src/code/z_debug.c | 2 | ||||
| -rw-r--r-- | src/code/z_play.c | 11 |
7 files changed, 42 insertions, 8 deletions
diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index 181e68269..8f5fbcbe4 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -102,11 +102,11 @@ FaultDrawer sFaultDrawerDefault = { #ifndef NON_MATCHING // TODO: match .bss (has reordering issues) extern FaultDrawer sFaultDrawer; -extern char D_8016B6BC[0x24]; +extern char D_8016B6C0[0x20]; #else // Non-matching version for struct shiftability FaultDrawer sFaultDrawer; -char D_8016B6BC[0x24]; +char D_8016B6C0[0x20]; #endif void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled) { diff --git a/src/code/game.c b/src/code/game.c index ea6e399f5..444bc4313 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -6,10 +6,11 @@ VisCvg sVisCvg; VisZBuf sVisZBuf; VisMono sVisMono; ViMode sViMode; + +#if OOT_DEBUG FaultClient sGameFaultClient; u16 sLastButtonPressed; -#if OOT_DEBUG void GameState_FaultPrint(void) { static char sBtnChars[] = "ABZSuldr*+LRudlr"; s32 i; diff --git a/src/code/graph.c b/src/code/graph.c index 36cfa633d..e44d2ec3a 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -14,8 +14,13 @@ OSTime sGraphPrevUpdateEndTime; */ OSTime sGraphPrevTaskTimeStart; +#if OOT_DEBUG FaultClient sGraphFaultClient; +#endif + CfbInfo sGraphCfbInfos[3]; + +#if OOT_DEBUG FaultClient sGraphUcodeFaultClient; UCodeInfo D_8012D230[3] = { @@ -30,7 +35,6 @@ UCodeInfo D_8012D248[3] = { { UCODE_S2DEX, gspS2DEX2d_fifoTextStart }, }; -#if OOT_DEBUG void Graph_FaultClient(void) { void* nextFb = osViGetNextFramebuffer(); void* newFb = (SysCfb_GetFbPtr(0) != nextFb) ? SysCfb_GetFbPtr(0) : SysCfb_GetFbPtr(1); diff --git a/src/code/sched.c b/src/code/sched.c index b398f3e45..fbfc42dc0 100644 --- a/src/code/sched.c +++ b/src/code/sched.c @@ -45,14 +45,14 @@ #define RDP_DONE_MSG 668 #define NOTIFY_MSG 670 // original name: ENTRY_MSG -vs32 sSchedDebugPrintfEnabled = false; - OSTime sRSPGfxTimeStart; OSTime sRSPAudioTimeStart; OSTime sRSPOtherTimeStart; OSTime sRDPTimeStart; #if OOT_DEBUG +vs32 sSchedDebugPrintfEnabled = false; + #define SCHED_DEBUG_PRINTF \ if (sSchedDebugPrintfEnabled) \ PRINTF diff --git a/src/code/z_actor_dlftbls.c b/src/code/z_actor_dlftbls.c index 23159e7ed..0dd90d335 100644 --- a/src/code/z_actor_dlftbls.c +++ b/src/code/z_actor_dlftbls.c @@ -23,6 +23,8 @@ #undef DEFINE_ACTOR_UNSET // Actor Overlay Table definition +#if OOT_DEBUG + #define DEFINE_ACTOR(name, _1, allocType, nameString) \ { (uintptr_t)_ovl_##name##SegmentRomStart, \ (uintptr_t)_ovl_##name##SegmentRomEnd, \ @@ -37,6 +39,24 @@ #define DEFINE_ACTOR_INTERNAL(name, _1, allocType, nameString) \ { 0, 0, NULL, NULL, NULL, &name##_InitVars, nameString, allocType, 0 }, +#else + +// Actor name is set to NULL in retail builds +#define DEFINE_ACTOR(name, _1, allocType, _3) \ + { (uintptr_t)_ovl_##name##SegmentRomStart, \ + (uintptr_t)_ovl_##name##SegmentRomEnd, \ + _ovl_##name##SegmentStart, \ + _ovl_##name##SegmentEnd, \ + NULL, \ + &name##_InitVars, \ + NULL, \ + allocType, \ + 0 }, + +#define DEFINE_ACTOR_INTERNAL(name, _1, allocType, _3) { 0, 0, NULL, NULL, NULL, &name##_InitVars, NULL, allocType, 0 }, + +#endif + #define DEFINE_ACTOR_UNSET(_0) { 0 }, ActorOverlay gActorOverlayTable[] = { diff --git a/src/code/z_debug.c b/src/code/z_debug.c index 8fd35af19..652b6f643 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -29,6 +29,7 @@ Color_RGBA8 sDebugCamTextColors[] = { { 128, 255, 32, 128 }, // DEBUG_CAM_TEXT_GREEN }; +#if OOT_DEBUG InputCombo sRegGroupInputCombos[REG_GROUPS] = { { BTN_L, BTN_CUP }, // REG { BTN_L, BTN_CLEFT }, // SREG @@ -93,6 +94,7 @@ char sRegGroupChars[REG_GROUPS] = { 'k', // kREG 'b', // bREG }; +#endif void Regs_Init(void) { s32 i; diff --git a/src/code/z_play.c b/src/code/z_play.c index 62b6f9287..2e499c9a0 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -10,9 +10,12 @@ TransitionTile sTransitionTile; s32 gTransitionTileState; VisMono sPlayVisMono; Color_RGBA8_u32 gVisMonoColor; + +#if OOT_DEBUG FaultClient D_801614B8; +#endif + s16 sTransitionFillTimer; -u64 sDebugCutsceneScriptBuf[0xA00]; void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn); @@ -451,7 +454,10 @@ void Play_Init(GameState* thisx) { AnimationContext_Update(this, &this->animationCtx); gSaveContext.respawnFlag = 0; - if (OOT_DEBUG && R_USE_DEBUG_CUTSCENE) { +#if OOT_DEBUG + if (R_USE_DEBUG_CUTSCENE) { + static u64 sDebugCutsceneScriptBuf[0xA00]; + gDebugCutsceneScript = sDebugCutsceneScriptBuf; PRINTF("\nkawauso_data=[%x]", gDebugCutsceneScript); @@ -459,6 +465,7 @@ void Play_Init(GameState* thisx) { // Presumably the ROM was larger at a previous point in development when this debug feature was used. DmaMgr_DmaRomToRam(0x03FEB000, gDebugCutsceneScript, sizeof(sDebugCutsceneScriptBuf)); } +#endif } void Play_Update(PlayState* this) { |
