aboutsummaryrefslogtreecommitdiffstats
path: root/engine/menus/main_menu.asm
diff options
context:
space:
mode:
authorAsh Ketchum <no-reply@sl0p.foo>2026-07-15 00:28:26 +0200
committerAsh Ketchum <no-reply@sl0p.foo>2026-07-15 00:28:26 +0200
commitd52815caa2c0f385ae61e38ecc7b5bddd7ccf7b3 (patch)
tree2a16380216840c8c97d6da88216b8358f5d896ad /engine/menus/main_menu.asm
parentComment all trade locations (#161) (diff)
downloadpokeyellow-d52815caa2c0f385ae61e38ecc7b5bddd7ccf7b3.tar.gz
pokeyellow-d52815caa2c0f385ae61e38ecc7b5bddd7ccf7b3.tar.xz
pokeyellow-d52815caa2c0f385ae61e38ecc7b5bddd7ccf7b3.zip
fastboot: skip intro/title/menu and autoload save if one exists
Three small hooks, all gated on CheckForPlayerNameInSRAM (carry = save present): - home/init.asm: skip 'predef PlayIntro' when a save exists - engine/movie/title.asm (PrepareTitleScreen): jp MainMenu, skipping the title screen (only the boot path hits PrepareTitleScreen; return-to-title paths jp DisplayTitleScreen directly, so they're unaffected) - engine/menus/main_menu.asm (MainMenu): after TryLoadSaveFile, if wSaveFileStatus==2 jp SpecialEnterMap, skipping the CONTINUE menu Exported CheckForPlayerNameInSRAM (:: ) so home/init.asm can farcall it. New game (no save) path is fully preserved. Ship pokeyellow.gbc only; the _DEBUG build overflows home ROM0 by 8 bytes with the init hook.
Diffstat (limited to 'engine/menus/main_menu.asm')
-rw-r--r--engine/menus/main_menu.asm7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
index d0e1cc1b..c41a7d10 100644
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -10,6 +10,11 @@ MainMenu:
predef TryLoadSaveFile
+; FASTBOOT: if the save loaded cleanly (status 2), skip the menu and continue
+ ld a, [wSaveFileStatus]
+ cp 2
+ jp z, SpecialEnterMap
+
.mainMenuLoop
ld c, 20
call DelayFrames
@@ -273,7 +278,7 @@ DisplayOptionMenu:
callfar DisplayOptionMenu_
ret
-CheckForPlayerNameInSRAM:
+CheckForPlayerNameInSRAM::
ld a, RAMG_SRAM_ENABLE
ld [rRAMG], a
ld a, BMODE_ADVANCED