From f46db37d508f0111ad44ad062ed3d83ba3282d1d Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sat, 15 Jul 2023 23:36:59 +0100 Subject: Thoroughly document debug code (#410) --- engine/menus/main_menu.asm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'engine/menus') diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 024def28..69b3b918 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -121,7 +121,7 @@ MainMenu: ld [wDestinationMap], a ld hl, wd732 set 2, [hl] ; fly warp or dungeon warp - call SpecialWarpIn + call PrepareForSpecialWarp jp SpecialEnterMap InitOptions: @@ -268,10 +268,10 @@ LinkMenu: ld c, 50 call DelayFrames ld hl, wd732 - res 1, [hl] + res BIT_DEBUG_MODE, [hl] ld a, [wDefaultMap] ld [wDestinationMap], a - call SpecialWarpIn + call PrepareForSpecialWarp ld c, 20 call DelayFrames xor a @@ -308,7 +308,12 @@ LinkCanceledText: StartNewGame: ld hl, wd732 - res 1, [hl] + ; Ensure debug mode is not used when + ; starting a regular new game. + ; Debug mode persists in saved games for + ; both debug and non-debug builds, and is + ; only reset here by the main menu. + res BIT_DEBUG_MODE, [hl] ; fallthrough StartNewGameDebug: call OakSpeech -- cgit v1.3.1-sl0p