aboutsummaryrefslogtreecommitdiffstats
path: root/SL0P.md
diff options
context:
space:
mode:
Diffstat (limited to 'SL0P.md')
-rw-r--r--SL0P.md25
1 files changed, 19 insertions, 6 deletions
diff --git a/SL0P.md b/SL0P.md
index be3de2b2..28c2df16 100644
--- a/SL0P.md
+++ b/SL0P.md
@@ -37,23 +37,36 @@ A table-driven cheat menu. Cursor + A to pick, B to back out / close.
| **ITEMS** | submenu: give ×99 of balls, Rare Candy, Full Restore, Max Revive, Max Elixer, PP Up, and all five evolution stones |
| **NOWILD** | toggle wild encounters off (shows `ON`) |
| **REPEL** | refill repel steps |
-| **EXPLORE** | a screen-paging overworld camera: each d-pad press instantly redraws the next screenful of the world (no walking), hopping to the connected map at each edge. **▲▼◀▶ arrows** show which directions you can move; **A** warps the player onto the tile you're looking at; **B** returns to the menu. |
+| **EXPLORE** | a screen-paging overworld camera: each d-pad press smooth-scrolls the next screenful of the world (no walking), gliding across the connected map at each edge. **▲▼◀▶ arrows** show which directions you can move; **A** warps the player onto the tile you're looking at; **B** returns to the menu. |
+| **SAVER** | screensaver: EXPLORE on autopilot. Drifts the camera across the overworld on its own (persistent direction, DFS-ish: keeps going, turns when blocked or occasionally at a junction). Arrows and the player/Pikachu sprites are hidden. Any button wakes it back to the menu. |
Everything is in `engine/slop_menu.asm`. Adding a new entry = add a name to
`SlopMenuText`, a `dw Handler` to `SlopMenuHandlers`, and bump `SLOP_MENU_COUNT`.
Handlers return carry set (a warp/exit was started) or clear (back to the menu),
and can be submenus or one-shot actions.
-Persistent toggle flag: `wUnusedFlag` (NOWILD).
+Persistent flags (reused unused WRAM): `wUnusedFlag` (NOWILD),
+`wUnusedCreditsByte` aliased as `wSlopSaverDir` (screensaver: 0 = off, else the
+current auto-scroll `PAD_*` direction).
**EXPLORE** is a self-contained camera loop in `engine/slop_menu.asm`. It renders
straight out of the map block buffer (`wOverworldMap`): compute a view pointer
`wOverworldMap + (by+1)*stride + bx` (by/bx = player block, stride = width+6),
`LoadCurrentMapView`, push to VRAM, OBJ off. A d-pad press moves the camera coords
-by ~one screen (`SLOP_PAGE_X/Y`) and re-renders; at a map edge it crosses using
-that connection's `*Alignment` offset (vertical: Y=align, X+=align; horizontal:
-X=align, Y+=align) and `LoadMapData`s the neighbour, or clamps if there's none.
-No walk engine, no character movement.
+by ~one screen (`SLOP_PAGE_X/Y`). Movement is a real hardware smooth-scroll built
+on the walk engine's own machinery: `SlopScroll{Up,Down,Left,Right}` ramp
+`hSCX/hSCY` `SLOP_SCROLL_PX` px/frame, advance `wMapViewVRAMPointer`, and inject
+the newly exposed edge with the `Schedule*Redraw` helpers (applied in VBlank). At
+a map edge it smooth-scrolls the remaining distance up to the boundary, then
+crosses using that connection's `*Alignment` offset and `LoadMapData`s the
+neighbour (one unavoidable load), or stops if there's no connection.
+
+**SAVER** is the same loop with `wSlopSaverDir` set: instead of reading the
+d-pad, `SlopSaverPickDir` synthesises a direction into the normal dispatch (so it
+inherits smooth scroll + edge crossing), keeping a persistent heading and only
+turning when blocked or occasionally at a junction (never an immediate U-turn).
+Arrows are skipped, and OAM is cleared + frozen right after every `LoadMapData`
+so the reloaded player/Pikachu are never drawn. Any real button exits.
- **Direction arrows** are 4 OBJ sprites in `wShadowOAM` using the font's down/
right glyphs (`$ee`/`$ed`) plus CGB OBJ X/Y-flip for up/left; set