Use overworld textbox in text printing functions, differentiating between 1bpp and 2bpp text (#10)

This commit is contained in:
xCrystal
2023-08-11 12:28:14 +02:00
parent 1e02f136fd
commit 052d246ee3
85 changed files with 448 additions and 379 deletions

View File

@@ -7,7 +7,7 @@ _DeleteSaveData:
ld de, MUSIC_MAIN_MENU
call PlayMusic
ld hl, .ClearAllSaveDataText
call PrintText
call PrintText1bpp
ld hl, .NoYesMenuHeader
call CopyMenuHeader
call VerticalMenu

View File

@@ -23,7 +23,7 @@ InitGender:
call WaitBGMap2
call SetPalettes
ld hl, AreYouABoyOrAreYouAGirlText
call PrintText
call PrintText1bpp
ld hl, .MenuHeader
call LoadMenuHeader
call WaitBGMap2

View File

@@ -42,7 +42,7 @@ NewGame_ClearTilemapEtc:
call ClearTilemap
call LoadFrame
call LoadStandardFont
call ClearWindowData
call ClearMenuAndWindowData
ret
Option:
@@ -535,7 +535,7 @@ OakSpeech:
call Intro_RotatePalettesLeftFrontpic
ld hl, OakText1
call PrintText
call PrintText1bpp
call RotateThreePalettesRight
call ClearTilemap
@@ -556,9 +556,9 @@ OakSpeech:
call Intro_WipeInFrontpic
ld hl, OakText2
call PrintText
call PrintText1bpp
ld hl, OakText4
call PrintText
call PrintText1bpp
call RotateThreePalettesRight
call ClearTilemap
@@ -573,7 +573,7 @@ OakSpeech:
call Intro_RotatePalettesLeftFrontpic
ld hl, OakText5
call PrintText
call PrintText1bpp
call RotateThreePalettesRight
call ClearTilemap
@@ -586,10 +586,10 @@ OakSpeech:
call Intro_RotatePalettesLeftFrontpic
ld hl, OakText6
call PrintText
call PrintText1bpp
call NamePlayer
ld hl, OakText7
call PrintText
call PrintText1bpp
ret
OakText1:
@@ -1124,7 +1124,7 @@ CopyrightString:
GameInit::
farcall TryLoadSaveData
call ClearWindowData
call ClearMenuAndWindowData
call ClearBGPalettes
call ClearTilemap
ld a, HIGH(vBGMap0)

View File

@@ -147,7 +147,7 @@ MainMenu_PrintCurrentTimeAndDay:
hlcoord 0, 14
ld b, 2
ld c, 18
call Textbox
call Textbox1bpp
ret
.PlaceTime:
@@ -212,7 +212,7 @@ ClearTilemapEtc:
call ClearTilemap
call LoadFrame
call LoadStandardFont
call ClearWindowData
call ClearMenuAndWindowData
ret
MainMenu_NewGame:

View File

@@ -647,7 +647,7 @@ RestoreOverworldMapTiles: ; unreferenced
Error_Cant_ExitMenu:
ld hl, .WindowPoppingErrorText
call PrintText
call PrintText1bpp
call WaitBGMap
.infinite_loop
jr .infinite_loop

View File

@@ -69,7 +69,7 @@ DisplayCoinCaseBalance:
hlcoord 11, 0
ld b, 1
ld c, 7
call Textbox
call Textbox1bpp
hlcoord 12, 0
ld de, CoinString
call PlaceString
@@ -86,7 +86,7 @@ DisplayMoneyAndCoinBalance:
hlcoord 5, 0
ld b, 3
ld c, 13
call Textbox
call Textbox1bpp
hlcoord 6, 1
ld de, MoneyString
call PlaceString
@@ -118,7 +118,7 @@ StartMenu_PrintSafariGameStatus: ; unreferenced
hlcoord 0, 0
ld b, 3
ld c, 7
call Textbox
call Textbox1bpp
hlcoord 1, 1
ld de, wSafariTimeRemaining
lb bc, 2, 3
@@ -146,7 +146,7 @@ StartMenu_DrawBugContestStatusBox:
hlcoord 0, 0
ld b, 5
ld c, 17
call Textbox
call Textbox1bpp
ret
StartMenu_PrintBugContestStatus:

View File

@@ -20,7 +20,7 @@ _Option:
hlcoord 0, 0
ld b, SCREEN_HEIGHT - 2
ld c, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
hlcoord 2, 2
ld de, StringOptions
call PlaceString

View File

@@ -1,7 +1,7 @@
SaveMenu:
call LoadStandardMenuHeader
farcall DisplaySaveInfoOnSave
call SpeechTextbox
call SpeechTextbox2bpp
call UpdateSprites
farcall SaveMenu_CopyTilemapAtOnce
ld hl, WouldYouLikeToSaveTheGameText
@@ -18,7 +18,6 @@ SaveMenu:
.refused
call ExitMenu
call GSReloadPalettes
farcall SaveMenu_CopyTilemapAtOnce
scf
ret
@@ -209,7 +208,6 @@ SaveTheGame_yesorno:
dec a
call CloseWindow
push af
call GSReloadPalettes
pop af
and a
ret
@@ -244,7 +242,7 @@ SavedTheGame:
ld [wOptions], a
; <PLAYER> saved the game!
ld hl, SavedTheGameText
call PrintText
call PrintText1bpp
; restore the original text speed setting
pop af
ld [wOptions], a
@@ -328,7 +326,7 @@ SavingDontTurnOffThePower:
ld [wOptions], a
; SAVING... DON'T TURN OFF THE POWER.
ld hl, SavingDontTurnOffThePowerText
call PrintText
call PrintText1bpp
; Restore the text speed setting
pop af
ld [wOptions], a
@@ -536,7 +534,7 @@ TryLoadSaveFile:
set NO_TEXT_SCROLL, a
ld [wOptions], a
ld hl, SaveFileCorruptedText
call PrintText
call PrintText1bpp
pop af
ld [wOptions], a
scf

View File

@@ -78,11 +78,6 @@ ScrollingMenuJoyAction:
jp nz, .d_down
jr .loop
.no_zero_no_carry ; unreferenced
ld a, -1
and a
ret
.a_button
call PlaceHollowCursor
ld a, [wMenuCursorY]

View File

@@ -11,7 +11,7 @@
const STARTMENUITEM_QUIT ; 8
StartMenu::
call ClearWindowData
call ClearMenuAndWindowData
ld de, SFX_MENU
call PlaySFX
@@ -34,7 +34,7 @@ StartMenu::
call .DrawBugContestStatusBox
call SafeUpdateSprites
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
farcall LoadFonts_NoOAMUpdate
farcall LoadFont_NoOAMUpdate
call .DrawBugContestStatus
call UpdateTimePals
jr .Select
@@ -151,7 +151,6 @@ StartMenu::
call DrawVariableLengthMenuBox
call .DrawBugContestStatus
call UpdateSprites
call GSReloadPalettes
call FinishExitMenu
ret
@@ -512,7 +511,7 @@ StartMenu_Pokemon:
.menunoreload
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes ; load regular palettes?
call DelayFrame