From 259c6b8ec4524dcd4a75da065106107f2165b202 Mon Sep 17 00:00:00 2001 From: Ash Ketchum Date: Wed, 15 Jul 2026 12:15:50 +0200 Subject: explore: pivot to noclip free-roam camera 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). --- home/overworld.asm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'home') diff --git a/home/overworld.asm b/home/overworld.asm index a41a7ba8..95b94646 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1218,6 +1218,9 @@ SignLoop:: ; function to check if the player will jump down a ledge and check if the tile ahead is passable (when not surfing) ; sets the carry flag if there is a collision, and unsets it if there isn't a collision CollisionCheckOnLand:: + ld a, [wSlopNoclip] ; SL0P noclip: walk through everything (carry clear) + and a + ret nz ld a, [wMovementFlags] bit BIT_LEDGE_OR_FISHING, a jr nz, .noCollision @@ -1797,10 +1800,8 @@ LoadPlayerSpriteGraphicsCommon:: ; function to load data from the map header LoadMapHeader:: farcall MarkTownVisitedAndLoadToggleableObjects - jr asm_0dbd - -Func_0db5:: ; unreferenced - farcall LoadToggleableObjectData +; SL0P: removed unreferenced Func_0db5 (farcall LoadToggleableObjectData) to make +; room in ROM0 for the noclip hook in CollisionCheckOnLand. asm_0dbd: ld a, [wCurMapTileset] ld [wUnusedCurMapTilesetCopy], a -- cgit v1.3.1-sl0p