Functional stub of title menus [Commit 1] (#17)

This commit is contained in:
xCrystal
2023-10-01 00:10:44 +02:00
parent e53ae0eac9
commit a16322350f
24 changed files with 567 additions and 531 deletions

View File

@@ -33,7 +33,7 @@ GameTimer::
; Is the timer paused?
ld hl, wGameTimerPaused
bit GAME_TIMER_PAUSED_F, [hl]
bit GAME_TIMER_COUNTING_F, [hl]
ret z
; Is the timer already capped?

View File

@@ -120,7 +120,7 @@ endr
ConstructAndEnableOverworldHUD::
; map setup command used by MAPSETUP_ENTERLEVEL and MAPSETUP_CONTINUE
ld hl, wTextboxFlags
set TEXT_2BPP_F, [hl]
ld a, TRUE
ld [wText2bpp], a
call ConstructOverworldHUDTilemap
jp EnableOverworldHUD

View File

@@ -1934,8 +1934,8 @@ ReloadTilesetAndPalettes::
call DisableLCD
call ClearSprites
farcall RefreshSprites
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jr nz, .2bpp
call LoadStandardFont
call LoadFrame

View File

@@ -209,8 +209,8 @@ MenuBox::
call GetMenuBoxDims
dec b
dec c
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jp z, Textbox1bpp
ld d, h
ld e, l

View File

@@ -167,8 +167,8 @@ Textbox2bpp::
SpeechTextbox:
; Standard 1bpp or 2bpp textbox according to wTextboxFlags[TEXT_2BPP_F]
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jr z, SpeechTextbox1bpp
jr SpeechTextbox2bpp

View File

@@ -46,8 +46,8 @@ OpenText2bpp::
ld a, BANK(ReanchorBGMap_NoOAMUpdate)
rst Bankswitch
ld hl, wTextboxFlags
set TEXT_2BPP_F, [hl]
ld a, TRUE
ld [wText2bpp], a
; assumes that the overworld 2bpp font and frame are loaded when calling this
call ReanchorBGMap_NoOAMUpdate ; anchor bgmap
@@ -68,8 +68,8 @@ OpenText1bpp::
rst Bankswitch
; note: 1bpp text is NOT compatible with the overworld HUD enabled because it uses 2bpp font tiles.
ld hl, wTextboxFlags
res TEXT_2BPP_F, [hl]
ld a, FALSE
ld [wText2bpp], a
call ReanchorBGMap_NoOAMUpdate ; anchor bgmap
call SpeechTextbox1bpp