You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Overworld HUD implementation (#15)
This commit is contained in:
@@ -126,7 +126,9 @@ EnterMap:
|
||||
ld [wPoisonStepCount], a
|
||||
.dontresetpoison
|
||||
|
||||
call EnableOverworldWindowHUD
|
||||
call ConstructOverworldHUDTilemap
|
||||
call TransferOverworldHUDToBGMap
|
||||
call EnableOverworldHUD
|
||||
|
||||
xor a ; end map entry
|
||||
ldh [hMapEntryMethod], a
|
||||
|
||||
@@ -25,17 +25,20 @@ ReanchorBGMap_NoOAMUpdate::
|
||||
xor a
|
||||
ldh [hLCDCPointer], a
|
||||
ldh [hBGMapMode], a
|
||||
; prepare vBGMap1/vBGMap3 to be displayed while vBGMap0/vBGMap2 is reanchored.
|
||||
; draw screen at wTilemap and wAttrmap and then transfer it.
|
||||
ld a, $90
|
||||
ldh [hWY], a
|
||||
call LoadScreenTilemapAndAttrmapPals
|
||||
call LoadWindowHUD
|
||||
ld a, HIGH(vBGMap1)
|
||||
call .LoadBGMapAddrIntoHRAM
|
||||
call HDMATransferTilemapAndAttrmap_OpenAndCloseMenu
|
||||
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
|
||||
; display window using vBGMap1/vBGMap3 while vBGMap0/vBGMap2 is reanchored.
|
||||
; disable LCD interrupt to prevent cropping the window if window HUD is active
|
||||
; (caller must re-enable when window is hidden again).
|
||||
xor a
|
||||
ldh [rSTAT], a
|
||||
|
||||
@@ -33,4 +33,5 @@ _LoadScreenTilemap::
|
||||
.carry
|
||||
dec b
|
||||
jr nz, .loop
|
||||
|
||||
ret
|
||||
|
||||
@@ -1165,7 +1165,7 @@ Script_loadtrainer:
|
||||
ret
|
||||
|
||||
Script_startbattle:
|
||||
call DisableWindowHUD
|
||||
call DisableOverworldHUD
|
||||
call BufferScreen
|
||||
predef StartBattle
|
||||
ld a, [wBattleResult]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
HandleNewMap:
|
||||
call ClearUnusedMapBuffer
|
||||
call ResetMapBufferEventFlags
|
||||
call ResetFlashIfOutOfCave
|
||||
call GetCurrentMapSceneID
|
||||
|
||||
Reference in New Issue
Block a user