Board menu: implement preliminary Party, Bag, Pokegear, and Exit submenus (#11)

This commit is contained in:
xCrystal
2023-09-22 23:12:05 +02:00
parent c11c53e0d7
commit ca919cdf98
19 changed files with 275 additions and 59 deletions

View File

@@ -1916,7 +1916,7 @@ ReturnToMapWithSpeechTextbox::
call ClearBGPalettes
call ClearSprites
call ReloadTilesetAndPalettes
call SpeechTextbox1bpp
call SpeechTextbox ; 1bpp or 2bpp according to wTextboxFlags[TEXT_2BPP_F]
ld hl, wVramState
set 0, [hl]
call UpdateSprites
@@ -1934,8 +1934,15 @@ ReloadTilesetAndPalettes::
call DisableLCD
call ClearSprites
farcall RefreshSprites
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
jr nz, .2bpp
call LoadStandardFont
call LoadFrame
jr .font_done
.2bpp
call LoadOverworldFontAndFrame
.font_done
ldh a, [hROMBank]
push af
ld a, [wMapGroup]

View File

@@ -165,6 +165,13 @@ Textbox2bpp::
pop bc
jp TextboxAttributes2bpp
SpeechTextbox:
; Standard 1bpp or 2bpp textbox according to wTextboxFlags[TEXT_2BPP_F]
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
jr z, SpeechTextbox1bpp
jr SpeechTextbox2bpp
RadioTerminator::
ld hl, .stop
ret
@@ -172,7 +179,7 @@ RadioTerminator::
.stop:
text_end
ClearTextbox:
ClearTextbox::
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW
jp ClearBox