aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsh Ketchum <no-reply@sl0p.foo>2026-07-15 21:24:29 +0200
committerAsh Ketchum <no-reply@sl0p.foo>2026-07-15 21:24:29 +0200
commit397f583158195e85118c4027cf18e2536e8d1452 (patch)
tree9c655aaa1798f547364fcfed35b3cbdf79b379f1
parentREADME: swap demo GIF to show off EXPLORE (better showcase than SAVER) (diff)
downloadpokeyellow-397f583158195e85118c4027cf18e2536e8d1452.tar.gz
pokeyellow-397f583158195e85118c4027cf18e2536e8d1452.tar.xz
pokeyellow-397f583158195e85118c4027cf18e2536e8d1452.zip
SAVER: continuous scrolling (chain pages, no per-page pause)HEADmaster
The screensaver used to return through .renderArrows (reloading the font, re-clearing/re-arming OAM+LCDC -- all pointless when arrows are hidden) plus an idle DelayFrame between every page, giving a ~1-frame hitch each screen. Add .afterMove: in saver mode it skips all that and dispatches the next direction immediately, so in-map pages chain back-to-back and the camera scrolls continuously. Manual EXPLORE still redraws its arrows as before. (Map-boundary crossings still briefly freeze while LoadMapData reloads the neighbour -- inherent to the full map load; a same-tileset fast path would be a larger, riskier change.)
-rw-r--r--engine/slop_menu.asm28
1 files changed, 21 insertions, 7 deletions
diff --git a/engine/slop_menu.asm b/engine/slop_menu.asm
index 5d14cfb1..b69bb353 100644
--- a/engine/slop_menu.asm
+++ b/engine/slop_menu.asm
@@ -420,24 +420,38 @@ SlopExploreShared:
jp c, .moveRight
jp z, .moveRight
jp .edgeRight
-; in-map page moves: smooth-scroll one screen, then just redraw the arrows
-; (the scroll already left the destination view on screen in rotated VRAM).
+; in-map page moves: smooth-scroll one screen, then .afterMove.
.moveUp
ld c, SLOP_PAGE_Y
call SlopScrollUp
- jp .renderArrows
+ jp .afterMove
.moveDown
ld c, SLOP_PAGE_Y
call SlopScrollDown
- jp .renderArrows
+ jp .afterMove
.moveLeft
ld c, SLOP_PAGE_X
call SlopScrollLeft
- jp .renderArrows
+ jp .afterMove
.moveRight
ld c, SLOP_PAGE_X
call SlopScrollRight
- jp .renderArrows
+ jp .afterMove
+; After an in-map page (or an edge clamp): EXPLORE redraws its arrows and waits
+; for input; the SCREENSAVER instead picks the next direction and dispatches it
+; immediately -- no arrow redraw, no idle DelayFrame -- so pages chain into one
+; another and the camera scrolls continuously.
+.afterMove
+ ld a, [wSlopSaverDir]
+ and a
+ jp z, .renderArrows
+.saverNext
+ call Joypad ; refresh hJoyHeld (updated by the scroll's vblanks)
+ ldh a, [hJoyHeld]
+ and a
+ jp nz, .exit ; any real button wakes the screensaver
+ call SlopSaverPickDir ; d = next auto-scroll direction
+ jp .dispatch
; ---- map-edge handling ----
; A full page won't fit before the edge, so smooth-scroll the remaining (even)
; distance right up to the edge, then either cross into the connected map (one
@@ -527,7 +541,7 @@ SlopExploreShared:
call LoadMapData
jp .renderView
.clampArrows
- jp .renderArrows
+ jp .afterMove
; ---- A: warp the player to the walkable tile nearest the screen centre ----
; the centre tile is wTileMap(col 8,row 9) = coord (wYCoord,wXCoord); a coord
; offset (dy,dx) maps to wTileMap(8+2dx, 9+2dy). Scan outward for a passable tile.