aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsh Ketchum <no-reply@sl0p.foo>2026-07-15 01:06:16 +0200
committerAsh Ketchum <no-reply@sl0p.foo>2026-07-15 01:06:16 +0200
commit9eeda257644a91fdd1fd21993ad1bb84dcacd676 (patch)
treeb4645eb9abf42fb54fc4dbd67e2b1c0e640a082f
parentwarp: full quick-warp menu (B2) (diff)
downloadpokeyellow-9eeda257644a91fdd1fd21993ad1bb84dcacd676.tar.gz
pokeyellow-9eeda257644a91fdd1fd21993ad1bb84dcacd676.tar.xz
pokeyellow-9eeda257644a91fdd1fd21993ad1bb84dcacd676.zip
warp: polish menu (clear bg + hide sprites), 13 destinations, kill the bird
- Hide the overworld behind the menu: wUpdateSpritesEnabled=$ff + ClearSprites + ClearScreen so no map tiles or NPCs bleed through. - Single-space the list via BIT_SINGLE_SPACED_LINES + BIT_DOUBLE_SPACED_MENU (restored on exit) so all 13 fly destinations fit: the 11 towns + Route 4 + Route 10 (every map with FlyWarpData coords). - No more bird: don't set BIT_USED_FLY (teleport-in instead of fly-in), and redirect _LeaveMapAnim's .flyAnimation to the plain warp-pad fade. Verified 0 sprites active through the warp transition.
-rw-r--r--engine/overworld/player_animations.asm2
-rw-r--r--engine/warp_menu.asm57
2 files changed, 40 insertions, 19 deletions
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index 1948f68d..331ce639 100644
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -128,7 +128,7 @@ _LeaveMapAnim::
call StopMusic
ld a, [wStatusFlags6]
bit BIT_ESCAPE_WARP, a
- jr z, .flyAnimation
+ jr z, .playerStandingOnWarpPad ; SL0P: plain fade instead of the fly bird
; if going to the last used pokemon center
ld hl, wPlayerSpinInPlaceAnimFrameDelay
ld a, 16
diff --git a/engine/warp_menu.asm b/engine/warp_menu.asm
index d31aba45..38758665 100644
--- a/engine/warp_menu.asm
+++ b/engine/warp_menu.asm
@@ -1,23 +1,35 @@
; Quick-warp menu, opened with SELECT in the overworld (hooked in
-; home/overworld.asm). Draws a town list, and on selection reuses the game's
-; fly-warp machinery (wDestinationMap + BIT_FLY_WARP/BIT_USED_FLY); the
-; overworld loop then fades out and warps us in at the destination fly coords.
+; home/overworld.asm). Hides the overworld sprites, clears the screen, and draws
+; a single-spaced destination list. On selection it reuses the fly-warp
+; machinery (wDestinationMap + BIT_FLY_WARP) to warp in at the destination's
+; fly coordinates. BIT_USED_FLY is deliberately NOT set, so arrival uses the
+; teleport-in animation (the departure bird is redirected to a plain fade in
+; engine/overworld/player_animations.asm).
-DEF WARP_COUNT EQU 10
+DEF WARP_COUNT EQU 13
SECTION "Warp Menu", ROMX
WarpMenu::
- call SaveScreenTilesToBuffer2 ; stash the overworld so we can restore
+; single-space the list text (<NEXT> = 1 row) and the menu cursor
+ ldh a, [hUILayoutFlags]
+ set BIT_SINGLE_SPACED_LINES, a
+ set BIT_DOUBLE_SPACED_MENU, a
+ ldh [hUILayoutFlags], a
+; hide the overworld sprites so nothing shows behind the menu
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ call ClearSprites
+ call ClearScreen
hlcoord 0, 0
- lb bc, 11, 11
+ lb bc, 13, 11
call TextBoxBorder
hlcoord 2, 1
ld de, WarpMenuText
call PlaceString
-; push wTileMap to VRAM and switch on the menu/window display (the overworld
-; renders the scrolled map straight to VRAM, so without this our box drawn into
-; wTileMap would be invisible - mirrors the tail of DisplayTextIDInit)
+; push wTileMap to VRAM and switch on the menu display (mirrors the tail of
+; DisplayTextIDInit); the overworld renders the scrolled map straight to VRAM,
+; so our box drawn into wTileMap would otherwise be invisible.
ld b, HIGH(vBGMap1)
call CopyScreenTileBufferToVRAM
xor a
@@ -31,16 +43,22 @@ WarpMenu::
ld [wMenuWatchMovingOutOfBounds], a
ld [wMenuJoypadPollCount], a
inc a ; 1
- ld [wTopMenuItemX], a ; cursor column (text is at column 2)
+ ld [wTopMenuItemX], a ; cursor column (text at column 2)
ld [wTopMenuItemY], a ; first item row
ld a, PAD_A | PAD_B
ld [wMenuWatchedKeys], a
ld a, WARP_COUNT - 1
ld [wMaxMenuItem], a
call HandleMenuInput
+ push af ; save pressed keys
+ ldh a, [hUILayoutFlags] ; restore default UI spacing
+ res BIT_SINGLE_SPACED_LINES, a
+ res BIT_DOUBLE_SPACED_MENU, a
+ ldh [hUILayoutFlags], a
+ pop af
bit B_PAD_B, a
jr nz, .cancel
-; A pressed: look up the chosen map id and fire the fly-warp
+; A pressed: look up the chosen map id and fire the fly-warp (no BIT_USED_FLY)
ld a, [wCurrentMenuItem]
ld e, a
ld d, 0
@@ -50,11 +68,10 @@ WarpMenu::
ld [wDestinationMap], a
ld hl, wStatusFlags6
set BIT_FLY_WARP, [hl]
- ASSERT wStatusFlags6 + 1 == wStatusFlags7
- inc hl
- set BIT_USED_FLY, [hl]
ret ; overworld loop performs the warp
.cancel
+ ld a, $01
+ ld [wUpdateSpritesEnabled], a ; re-enable overworld sprites
call LoadScreenTilesFromBuffer2
jp CloseTextDisplay ; redraw the overworld and return
@@ -63,13 +80,17 @@ WarpMenuText:
next "VIRIDIAN"
next "PEWTER"
next "CERULEAN"
+ next "LAVENDER"
next "VERMILION"
next "CELADON"
next "FUCHSIA"
- next "SAFFRON"
next "CINNABAR"
- next "INDIGO@"
+ next "INDIGO"
+ next "SAFFRON"
+ next "ROUTE 4"
+ next "ROUTE 10@"
WarpMapTable:
- db PALLET_TOWN, VIRIDIAN_CITY, PEWTER_CITY, CERULEAN_CITY, VERMILION_CITY
- db CELADON_CITY, FUCHSIA_CITY, SAFFRON_CITY, CINNABAR_ISLAND, INDIGO_PLATEAU
+ db PALLET_TOWN, VIRIDIAN_CITY, PEWTER_CITY, CERULEAN_CITY, LAVENDER_TOWN
+ db VERMILION_CITY, CELADON_CITY, FUCHSIA_CITY, CINNABAR_ISLAND, INDIGO_PLATEAU
+ db SAFFRON_CITY, ROUTE_4, ROUTE_10