diff options
| author | Ash Ketchum <no-reply@sl0p.foo> | 2026-07-15 12:23:17 +0200 |
|---|---|---|
| committer | Ash Ketchum <no-reply@sl0p.foo> | 2026-07-15 12:23:17 +0200 |
| commit | bf910f66bafedf92be60b5457e6ea2621aaabab8 (patch) | |
| tree | 7e4de2126e77fbb4396a92d1ee927ed1a44a8a25 /engine/slop_menu.asm | |
| parent | explore: pivot to noclip free-roam camera (diff) | |
| download | pokeyellow-bf910f66bafedf92be60b5457e6ea2621aaabab8.tar.gz pokeyellow-bf910f66bafedf92be60b5457e6ea2621aaabab8.tar.xz pokeyellow-bf910f66bafedf92be60b5457e6ea2621aaabab8.zip | |
explore: hide player (camera) + fix menu close
- UpdatePlayerSprite: when wSlopNoclip is set, jump to .disableSprite so the
player sprite is hidden -> true free-roam camera (bankable bank, no ROM0 cost).
- SlopExplore was returning carry-set into .exitProceed, which bare-returns and
assumes a warp will redraw the screen; since noclip doesn't warp, the menu
window lingered. Now it closes like the B path (SlopMenuRestoreFlags + push
bank + jp CloseTextDisplay) so the overworld is rebuilt cleanly.
- SL0P.md: document EXPLORE noclip camera + the hooks.
Verified A/B in Pallet: noclip on -> player gone, walls/seams passable; off ->
player back, collision restored, menu closes cleanly.
Diffstat (limited to 'engine/slop_menu.asm')
| -rw-r--r-- | engine/slop_menu.asm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engine/slop_menu.asm b/engine/slop_menu.asm index e3b07fe6..b4b7f78e 100644 --- a/engine/slop_menu.asm +++ b/engine/slop_menu.asm @@ -231,8 +231,15 @@ SlopExplore: ld a, [wSlopNoclip] xor $01 ld [wSlopNoclip], a - scf ; carry set -> close menu, back to overworld - ret +; close the menu the same way the B button does (rebuild the overworld) instead +; of .exitProceed, which only bare-returns and assumes a warp will redraw. + pop hl ; drop the pushed .afterHandler return address + call SlopMenuRestoreFlags + ld a, $01 + ld [wUpdateSpritesEnabled], a + ldh a, [hLoadedROMBank] + push af + jp CloseTextDisplay ; =========================================================================== ; ITEMS submenu: give 99 of the chosen item (stacks via GiveItem) |
