| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
|
| |
The instant cheats (MONEY/HEAL/COINS/BADGES/DEX/MAXTEAM/TEACH/HMS/REPEL,
NOWILD, and ITEMS-give) dropped you straight back to the menu with no sign
anything happened. Add SlopConfirm: play the item jingle and flash a centred
message box for ~0.8s before returning. NOWILD reports WILD MONS ON/OFF to
match the new state.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Crossing a map connection applies the connection's alignment offset blindly.
At an edge position the connection doesn't span, the resulting coord lands
outside the neighbour (e.g. Y = -8 = $f8), and since the bounds checks then
operate on the wrapped value the camera roams far outside the map, rendering
whatever WRAM lies past wOverworldMap as on-screen garbage. SlopClampCoords
(run in .renderView, i.e. after every entry/cross LoadMapData) clamps wYCoord
to [0,maxY] and wXCoord to [0,maxX] of the freshly-loaded map.
Verified: 120-sample saver soak across 19 maps -> 0 out-of-bounds; manual
EXPLORE crossing unaffected.
|
| |
|
|
|
|
|
|
|
|
| |
- Drop the occasional junction turn: keep the current heading until it is
actually blocked, then turn onto a random non-U-turn direction.
- Fix a freeze: a map's far edge (maxY/maxX = wCurrentMap*2 - 1) is always odd,
but scroll moves round down to even coords, so the camera stops one coord short
and 'coord != max' never flagged the edge as blocked -> the wander got stuck
clamping forever. SlopValidDirMask now treats a direction as open only if there
are >= 2 coords of room (one even step) or a connection to cross.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
New menu entry that auto-drives the EXPLORE camera across the overworld:
- persistent-direction wander (DFS-ish): keep heading, turn only when blocked
or occasionally at a junction, never an immediate U-turn. SlopSaverPickDir
synthesises a d-pad direction into the normal EXPLORE dispatch, so it inherits
smooth scrolling and smooth map-edge crossing.
- arrows hidden; player/Pikachu never drawn (clear+freeze OAM right after every
LoadMapData, before the first frame renders - also fixes a brief player flash
at crossings in manual EXPLORE).
- any button wakes it back to the menu.
State byte wSlopSaverDir reuses wUnusedCreditsByte (0=off, else current dir).
|
| |
|
|
|
|
|
|
| |
At a map boundary, smooth-scroll the remaining (even) distance up to the
edge, then either cross into the connected map (one unavoidable instant
load) or, with no connection, stop smoothly at the edge. Previously any
edge move hard-jumped a whole screen; now only crossing from exactly on a
boundary snaps.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In the paging camera, A now drops the player onto the map you're looking at. It
scans outward from the screen centre (wTileMap col 8,row 9 = the view centre) for
the nearest tile that IsTilePassable, adjusts wYCoord/wXCoord to it, sets
wDestinationWarpID=$ff so LoadMapData enters at those coords, and returns carry
set to close the menu and resume the overworld right there. Factored the view-
pointer math into SlopSetViewPtr (shared by the camera + the warp landing).
Verified: browse Pallet -> Route 1, A -> player lands on Route 1 at the centre
tile and walks around normally (sprite + Pikachu, wild data intact).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Overlay real ▲▼◀▶ arrow sprites at the screen edges for every direction the
camera can currently page: either there's more map that way, or the map has a
connection that way. Arrows update live -- e.g. at a connectionless edge that
direction's arrow disappears.
Implementation: the font has only a down-arrow ($ee) and right-arrow ($ed), so
up/left are made with CGB OBJ Y/X-flip (the emulator supports OBJ flips). Drawn
as 4 sprites in wShadowOAM (8x8 OBJ mode, font loaded so $ed/$ee are OBJ-
reachable at 0x8ed0/0x8ee0). Set wUpdateSpritesEnabled=$ff after building them so
the vblank PrepareOAMData leaves shadow OAM alone instead of repopulating the
player sprite over the arrows.
Verified: Pallet mid-map shows all 4; Viridian shows N/S/W (no E); paging to a
connectionless edge drops that arrow and it returns on the way back.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per feedback, EXPLORE should page whole screens on button presses (instant
redraw), not move/walk the character. Ripped out the walk-engine approach
entirely -- reverted the CollisionCheckOnLand noclip hook and the OverworldLoop
simulated-joypad paging hook, and removed both helpers.
EXPLORE is now a self-contained camera loop that renders straight from the map
block buffer:
- view pointer = wOverworldMap + (by+1)*stride + bx (LoadCurrentMapView)
- a d-pad press shifts the camera coords by ~one screen and re-renders
- at a map edge it crosses to the connected map using that connection's
alignment offset (or clamps if none), LoadMapData + re-render
- B restores the origin view + returns to the SL0P menu
No character walking, sprites hidden for a clean camera. Verified: within-map
paging steps a screen at a time, seams cross with correct offsets (Pallet ->
Route1 -> Viridian), 25-page random stress with no corruption, and normal
gameplay resumes after exit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ground-truth from render_overworld.py showed Kanto is ONE seamless world joined
along shared edges with per-connection offsets -- so a map-by-map browser is the
wrong model. Replaced it with noclip free-roam that leans on the engine's own
player-walk + connection-crossing machinery (which already handles seams/offsets
correctly):
- wSlopNoclip flag (reused the dead wUnusedObtainedBadges byte at D356, 0 r/w,
not unioned, in the saved region -> safe).
- CollisionCheckOnLand: 5-byte hook at the top -> when noclip is set, return
no-collision. Freed the room in ROM0 by deleting the unreferenced Func_0db5
(dead farcall LoadToggleableObjectData) in LoadMapHeader.
- EXPLORE menu entry now just toggles wSlopNoclip and closes the menu, dropping
you into the overworld to glide through walls/NPCs/ledges and walk across map
connections exactly as the world data defines them.
Verified: Pallet -> (walk north through the fences) -> seam-cross into Route 1 at
y=35 -> continue north; toggle off restores collision (player blocked).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Root cause of the 'maps look wrong' bug: LoadMapData renders the view from
wCurrentTileBlockMapViewPointer, which the engine ONLY ever sets from warp /
connection / walk data (LoadDestinationWarpPosition, the connected-map handler,
advance_player_sprite) -- never from wXCoord/wYCoord. My old code set coords and
called LoadMapData, so every map was drawn from a STALE pointer left over from
the previous map: arbitrary, inconsistent windows.
Fix: after LoadMapData loads the block map into wOverworldMap, compute a centered
pointer directly --
stride = wCurMapWidth + MAP_BORDER*2
ptr = wOverworldMap + (height/2 + 1)*stride + width/2
-- clear wYBlockCoord/wXBlockCoord, and call LoadCurrentMapView to redraw. On
exit, save/restore the origin's real view pointer (+ block coords) before
reloading so the overworld comes back correctly.
Verified by DFS-traversing the whole connection graph and stitching 36 centered
maps into a coherent Kanto overworld image.
|
| |
|
|
|
|
|
| |
After rendering each map in EXPLORE, overlay N/S/E/W letters at the screen edges
for the directions that have a real connection (from wCurMapConnections), so you
can see which moves are valid before pressing. P1 done: browse the overworld
connection graph, see exits, no warping yet.
|
| |
|
|
|
|
|
|
|
| |
New EXPLORE entry in the SL0P menu renders any overworld map (LoadMapData, no
NPCs, OBJ layer disabled so even the player sprite is hidden), centered on the
map. U/D/L/R jump to the connected map in that direction when wCurMapConnections
has that flag, following the connection graph (verified Pallet<->Route 1). B
restores the origin map + coords and returns to the menu (movement intact).
Arrows/indicators next.
|
| |
|
|
|
|
|
|
| |
wc5d8 looked unused but the game writes it via computed addresses (observed it
change 56->44->35 while walking/warping), so the NOWILD flag got clobbered and
encounters still happened. wUnusedFlag is a genuine unused WRAM0 byte (verified
stable at 0 through walking + warping, not in the save block so it defaults off
each boot). NOWILD flag now persists reliably.
|
| |
|
|
|
|
|
|
|
|
| |
The SL0P menu jumped straight to CloseTextDisplay on close, but that routine
ends with 'pop af' + bankswitch expecting the caller's bank to have been pushed
(DisplayTextID does this at open, which we bypass). The unbalanced pop ate a
stack word -> wrong bank -> corrupted overworld/collision state, leaving the
player unable to move after closing the menu. Now we push hLoadedROMBank first,
and dropped the bogus LoadScreenTilesFromBuffer2 (CloseTextDisplay's
LoadCurrentMapView rebuilds wTileMap/collision itself).
|
| |
|
|
|
| |
SL0P MENU now 12 entries. HMs let you use field moves anywhere to complement
the warp/noclip goals.
|
| |
|
|
|
| |
Sets every party member's 4 moves to Hyper Beam / Earthquake / Ice Beam /
Thunderbolt with 31 PP each. SL0P MENU now 11 entries.
|
| |
|
|
|
|
| |
COINS sets game-corner coins to 9999. ITEMS submenu grows to 12: balls, Rare
Candy, Full Restore, Max Revive, Max Elixer, PP Up, and all five evolution
stones (Moon/Fire/Thunder/Water/Leaf). Top menu is now 10 entries.
|
| |
|
|
|
|
|
|
|
| |
NOWILD toggles wild encounters off (hooked in TryDoWildEncounter, a banked
file) with an ON indicator drawn on its menu row; the flag lives in the unused
wc5d8 WRAM0 byte (renamed wSlopNoWild, always-accessible, defaults 0). REPEL
refills repel steps to 255. (A NOCLIP toggle was prototyped but its hook lands
in the full home bank - deferred until I free ROM0 budget.) SL0P MENU now: WARP
HEAL MONEY BADGES DEX MAXTEAM ITEMS NOWILD REPEL.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
SL0P MENU grows to 7 entries:
WARP - town warp submenu
HEAL - full party HP + status
MONEY - set cash to 999999
BADGES - all 8 gym badges
DEX - mark every Pokemon owned+seen
MAXTEAM - whole party to Lv100, perfect DVs, maxed EVs, 999 stats/HP
ITEMS - submenu: give x99 of Master/Ultra Ball, Rare Candy, Full Restore,
Max Revive, Max Elixer, PP Up, Nugget (stacks via GiveItem)
All verified live: money 999999, badges FF, dex filled, party Lv100/999/FFFF DVs,
Master Ball x99 in the bag.
|
|
|
Refactor the flat warp menu into a table-driven top-level SL0P MENU opened by
SELECT. Each entry = a name in SlopMenuText + a routine in SlopMenuHandlers;
handlers return carry set (a warp was started, exit) or clear (back to the
menu). Ships two entries:
WARP -> WarpSubmenu (the 13-destination town list)
HEAL -> SlopHealParty (restore party HP + clear status), demoing an action
Shared open/close display handling (hide sprites, single-space flags, wTileMap
push, restore). Add an entry by appending a name+handler and bumping
SLOP_MENU_COUNT. (renamed engine/warp_menu.asm -> engine/slop_menu.asm)
|