Window HUD: Handle Window being fully shown during reanchor map (#15)

This commit is contained in:
xCrystal
2023-08-28 12:03:32 +02:00
parent 6e49bb9893
commit 11db1300b2
3 changed files with 23 additions and 10 deletions

View File

@@ -70,8 +70,7 @@ DoBattleTransition:
call DelayFrame
call .LoadPokeballTiles
call CopyTilemapAtOnce
ld a, SCREEN_HEIGHT_PX
ldh [hWY], a
call HideWindow_EnableLCDInt
call DelayFrame
xor a
ldh [hBGMapMode], a

View File

@@ -34,7 +34,11 @@ ReanchorBGMap_NoOAMUpdate::
farcall ApplyPals
ld a, TRUE
ldh [hCGBPalUpdate], a
; display window while BG map is reanchored.
; disable LCD interrupt to prevent cropping the window due to hWindowHUD
; (caller must re-enable when window is hidden again).
xor a
ldh [rSTAT], a
ldh [hBGMapMode], a
ldh [hWY], a
farcall HDMATransfer_FillBGMap0WithBlack ; no need to farcall
@@ -63,8 +67,7 @@ LoadFont_NoOAMUpdate::
ldh [hOAMUpdate], a
call LoadFrame
ld a, $90
ldh [hWY], a
call HideWindow_EnableLCDInt
call SafeUpdateSprites
call LoadStandardFont