Don't hide board menu objects behind the textbox (#11) [adapts Board menu to 2957bce0a9]

This commit is contained in:
xCrystal 2023-08-31 18:51:37 +02:00
parent 2957bce0a9
commit 7bd940aeac

View File

@ -9,7 +9,7 @@ BoardMenu::
; refresh overworld sprites to hide those behind textbox before drawing new graphics ; refresh overworld sprites to hide those behind textbox before drawing new graphics
call UpdateSprites call UpdateSprites
farcall LoadBoardMenuGFX farcall LoadBoardMenuGFX
call DrawBoardMenuTiles call DrawBoardMenuTilesAndClearPriorityAttr
call ApplyBoardMenuSpritePalette call ApplyBoardMenuSpritePalette
; allow Pal update to complete, then apply the tilemap ; allow Pal update to complete, then apply the tilemap
call DelayFrame call DelayFrame
@ -41,11 +41,15 @@ BoardMenu::
ld [wScriptVar], a ld [wScriptVar], a
ret ret
DrawBoardMenuTiles: DrawBoardMenuTilesAndClearPriorityAttr:
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
ld a, BOARD_MENU_BG_FIRST_TILE ld a, BOARD_MENU_BG_FIRST_TILE
lb bc, 3, 18 lb bc, 3, 18
jp FillBoxWithConsecutiveBytes call FillBoxWithConsecutiveBytes
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY, wAttrmap
ld a, PAL_BG_TEXT
lb bc, 3, 18
jp FillBoxWithByte
ApplyBoardMenuSpritePalette: ApplyBoardMenuSpritePalette:
ld hl, BoardMenuItemPals ld hl, BoardMenuItemPals