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

@@ -960,7 +960,7 @@ BillsPC_PlaceString:
push de
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
pop de
hlcoord 1, 16
call PlaceString
@@ -977,7 +977,7 @@ BillsPC_MoveMonWOMail_BoxNameAndArrows:
BillsPC_BoxName:
hlcoord 8, 0
lb bc, 1, 10
call Textbox
call Textbox1bpp
ld a, [wBillsPC_LoadedBox]
and a
@@ -1216,7 +1216,7 @@ BillsPC_LoadMonStats:
BillsPC_RefreshTextboxes:
hlcoord 8, 2
lb bc, 10, 10
call Textbox
call Textbox1bpp
hlcoord 8, 2
ld [hl], "└"
@@ -1771,7 +1771,7 @@ DepositPokemon:
call ClearBox
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
call WaitBGMap
hlcoord 1, 16
ld de, PCString_Stored
@@ -1826,7 +1826,7 @@ TryWithdrawPokemon:
call ClearBox
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
call WaitBGMap
hlcoord 1, 16
ld de, PCString_Got
@@ -1862,7 +1862,7 @@ ReleasePKMN_ByePKMN:
call ClearBox
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
call WaitBGMap
ld a, [wCurPartySpecies]
@@ -1883,7 +1883,7 @@ ReleasePKMN_ByePKMN:
call DelayFrames
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
hlcoord 1, 16
ld de, PCString_Bye
call PlaceString
@@ -1906,7 +1906,7 @@ MovePKMNWithoutMail_InsertMon:
push af
hlcoord 0, 15
lb bc, 1, 18
call Textbox
call Textbox1bpp
hlcoord 1, 16
ld de, .Saving_LeaveOn
call PlaceString
@@ -2212,7 +2212,7 @@ _ChangeBox:
ld [wMenuScrollPosition], a
hlcoord 0, 4
lb bc, 8, 9
call Textbox
call Textbox1bpp
call ScrollingMenu
ld a, [wMenuJoypad]
cp B_BUTTON
@@ -2275,7 +2275,7 @@ GetBoxName:
BillsPC_PrintBoxCountAndCapacity:
hlcoord 11, 7
lb bc, 5, 7
call Textbox
call Textbox1bpp
ld a, [wMenuSelection]
cp -1
ret z
@@ -2350,7 +2350,7 @@ BillsPC_PrintBoxName:
hlcoord 0, 0
ld b, 2
ld c, 18
call Textbox
call Textbox1bpp
hlcoord 1, 2
ld de, .Current
call PlaceString
@@ -2478,7 +2478,7 @@ BillsPC_PlaceChangeBoxString:
push de
hlcoord 0, 14
lb bc, 2, 18
call Textbox
call Textbox1bpp
pop de
hlcoord 1, 16
call PlaceString

View File

@@ -28,7 +28,7 @@ _BillsPC:
push af
set NO_TEXT_SCROLL, [hl]
ld hl, .PCWhatText
call PrintText
call PrintText1bpp
pop af
ld [wOptions], a
call LoadFontsBattleExtra
@@ -111,7 +111,7 @@ BillsPC_MovePKMNMenu:
farcall IsAnyMonHoldingMail
jr nc, .no_mail
ld hl, .PCMonHoldingMailText
call PrintText
call PrintText1bpp
jr .quit
.no_mail
@@ -240,10 +240,10 @@ ClearPCItemScreen:
call ByteFill
hlcoord 0, 0
lb bc, 10, 18
call Textbox
call Textbox1bpp
hlcoord 0, 12
lb bc, 4, 18
call Textbox
call Textbox1bpp
call WaitBGMap2
call SetPalettes ; load regular palettes?
ret

View File

@@ -301,7 +301,7 @@ HatchEggs:
ld hl, wPlayerName
call CopyBytes
ld hl, .Text_HatchEgg
call PrintText
call PrintText1bpp
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
ld bc, MON_NAME_LENGTH
@@ -310,7 +310,7 @@ HatchEggs:
ld e, l
push de
ld hl, .BreedAskNicknameText
call PrintText
call PrintText1bpp
call YesNoBox
pop de
jr c, .nonickname
@@ -357,7 +357,7 @@ HatchEggs:
push af
call EggHatch_AnimationSequence
ld hl, .BreedClearboxText
call PrintText
call PrintText1bpp
pop af
ld [wCurPartySpecies], a
pop bc
@@ -854,7 +854,7 @@ Hatch_ShellFragmentLoop:
DayCareMon1:
ld hl, LeftWithDayCareManText
call PrintText
call PrintText1bpp
ld a, [wBreedMon1Species]
call PlayMonCry
ld a, [wDayCareLady]
@@ -863,11 +863,11 @@ DayCareMon1:
call PromptButton
ld hl, wBreedMon2Nickname
call DayCareMonCompatibilityText
jp PrintText
jp PrintText1bpp
DayCareMon2:
ld hl, LeftWithDayCareLadyText
call PrintText
call PrintText1bpp
ld a, [wBreedMon2Species]
call PlayMonCry
ld a, [wDayCareMan]
@@ -876,7 +876,7 @@ DayCareMon2:
call PromptButton
ld hl, wBreedMon1Nickname
call DayCareMonCompatibilityText
jp PrintText
jp PrintText1bpp
DayCareMonCursor:
jp WaitPressAorB_BlinkCursor

View File

@@ -149,7 +149,7 @@ CheckPartyFullAfterContest:
GiveANickname_YesNo:
ld hl, CaughtAskNicknameText
call PrintText
call PrintText1bpp
jp YesNoBox
CaughtAskNicknameText:

View File

@@ -205,7 +205,7 @@ EvolveAfterBattle_MasterLoop:
call GetNickname
call CopyName1
ld hl, EvolvingText
call PrintText
call PrintText1bpp
ld c, 50
call DelayFrames
@@ -228,7 +228,7 @@ EvolveAfterBattle_MasterLoop:
jp c, CancelEvolution
ld hl, CongratulationsYourPokemonText
call PrintText
call PrintText1bpp
pop hl
@@ -377,7 +377,7 @@ UpdateSpeciesNameIfNotNicknamed:
CancelEvolution:
ld hl, StoppedEvolvingText
call PrintText
call PrintText1bpp
call ClearTilemap
pop hl
jp EvolveAfterBattle_MasterLoop

View File

@@ -15,7 +15,7 @@ KnowsMove:
.knows_move
ld hl, .KnowsMoveText
call PrintText
call PrintText1bpp
scf
ret

View File

@@ -52,7 +52,7 @@ LearnMove:
call GetMoveName
ld hl, Text_1_2_and_Poof ; 1, 2 and…
call PrintText
call PrintText1bpp
pop de
pop hl
@@ -103,25 +103,25 @@ LearnMove:
.cancel
ld hl, StopLearningMoveText
call PrintText
call PrintText1bpp
call YesNoBox
jp c, .loop
ld hl, DidNotLearnMoveText
call PrintText
call PrintText1bpp
ld b, 0
ret
.learned
ld hl, LearnedMoveText
call PrintText
call PrintText1bpp
ld b, 1
ret
ForgetMove:
push hl
ld hl, AskForgetMoveText
call PrintText
call PrintText1bpp
call YesNoBox
pop hl
ret c
@@ -135,11 +135,11 @@ ForgetMove:
.loop
push hl
ld hl, MoveAskForgetText
call PrintText
call PrintText1bpp
hlcoord 5, 2
ld b, NUM_MOVES * 2
ld c, MOVE_NAME_LENGTH
call Textbox
call Textbox1bpp
hlcoord 5 + 2, 2 + 2
ld a, SCREEN_WIDTH * 2
ld [wListMovesLineSpacing], a
@@ -192,7 +192,7 @@ ForgetMove:
.hmmove
ld hl, MoveCantForgetHMText
call PrintText
call PrintText1bpp
pop hl
jr .loop

View File

@@ -488,7 +488,7 @@ MailboxPC:
farcall InitPartyMenuWithCancel
farcall InitPartyMenuGFX
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -503,12 +503,12 @@ MailboxPC:
and a
jr z, .attach_mail
ld hl, .MailAlreadyHoldingItemText
call PrintText
call PrintText1bpp
jr .try_again
.egg
ld hl, .MailEggText
call PrintText
call PrintText1bpp
jr .try_again
.attach_mail
@@ -517,7 +517,7 @@ MailboxPC:
ld b, a
call MoveMailFromPCToParty
ld hl, .MailMovedFromBoxText
call PrintText
call PrintText1bpp
.exit2
jp CloseSubmenu

View File

@@ -164,7 +164,7 @@ SwitchPartyMons:
ld a, PARTYMENUACTION_MOVE
ld [wPartyMenuActionText], a
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
hlcoord 0, 1
ld bc, SCREEN_WIDTH * 2
@@ -268,7 +268,7 @@ GiveTakePartyMonItem:
ret
TryGiveItemToPartymon:
call SpeechTextbox
call SpeechTextbox1bpp
call PartyMonItemName
call GetPartyItemLocation
ld a, [hl]
@@ -342,7 +342,7 @@ GivePartyItem:
ret
TakePartyItem:
call SpeechTextbox
call SpeechTextbox1bpp
call GetPartyItemLocation
ld a, [hl]
and a
@@ -728,7 +728,7 @@ MonMenu_Softboiled_MilkDrink:
.NotEnoughHP:
ld hl, .PokemonNotEnoughHPText
call PrintText
call PrintText1bpp
.finish
xor a
@@ -1106,11 +1106,11 @@ SetUpMoveScreenBG:
hlcoord 0, 1
ld b, 9
ld c, 18
call Textbox
call Textbox1bpp
hlcoord 0, 11
ld b, 5
ld c, 18
call Textbox
call Textbox1bpp
hlcoord 2, 0
lb bc, 2, 3
call ClearBox
@@ -1157,7 +1157,7 @@ SetUpMoveList:
hlcoord 0, 11
ld b, 5
ld c, 18
jp Textbox
jp Textbox1bpp
PrepareToPlaceMoveData:
ld hl, wPartyMon1Moves

View File

@@ -1784,7 +1784,7 @@ GivePoke::
and a
ret z
ld hl, WasSentToBillsPCText
call PrintText
call PrintText1bpp
ld a, BANK(sBoxMonNicknames)
call OpenSRAM
ld hl, wMonOrItemNameBuffer

View File

@@ -31,7 +31,7 @@ InitPartyMenuLayout:
call InitPartyMenuWithCancel
call InitPartyMenuGFX
call WritePartyMenuTilemap
call PrintPartyMenuText
call PlacePartyMenuText
ret
LoadPartyMenuGFX:
@@ -625,10 +625,10 @@ PartyMenuSelect:
scf
ret
PrintPartyMenuText:
PlacePartyMenuText:
hlcoord 0, 14
lb bc, 2, 18
call Textbox
call Textbox1bpp
ld a, [wPartyCount]
and a
jr nz, .haspokemon
@@ -769,7 +769,7 @@ PrintPartyMenuActionText:
push af
set NO_TEXT_SCROLL, a
ld [wOptions], a
call PrintText
call PrintText1bpp
pop af
ld [wOptions], a
ret