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

@@ -697,7 +697,7 @@ AI_Switch:
jr c, .skiptext
ld hl, EnemyWithdrewText
call PrintText
call PrintText1bpp
.skiptext
ld a, 1
@@ -838,7 +838,7 @@ PrintText_UsedItemOn:
ld bc, ITEM_NAME_LENGTH
call CopyBytes
ld hl, EnemyUsedOnText
jp PrintText
jp PrintText1bpp
EnemyUsedOnText:
text_far _EnemyUsedOnText

View File

@@ -2716,7 +2716,7 @@ SetUpBattlePartyMenu_Loop: ; switch to fullscreen menu?
JumpToPartyMenuAndPrintText:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -4833,7 +4833,7 @@ BattleMenu_Pack:
call UpdateBattleHUDs
call WaitBGMap
call LoadTilemapToTempTilemap
call ClearWindowData
call ClearMenuAndWindowData
call FinishBattleAnim
and a
ret
@@ -4844,7 +4844,7 @@ BattleMenu_Pack:
ld a, [wBattleResult]
and BATTLERESULT_BITMASK
ld [wBattleResult], a ; WIN
call ClearWindowData
call ClearMenuAndWindowData
call SetPalettes
scf
ret
@@ -5144,7 +5144,7 @@ MoveSelectionScreen:
ld b, 4
ld c, 14
.got_dims
call Textbox
call Textbox1bpp
hlcoord 6, 17 - NUM_MOVES
ld a, [wMoveSelectionMenuType]
@@ -5423,7 +5423,7 @@ MoveInfoBox:
hlcoord 0, 8
ld b, 3
ld c, 9
call Textbox
call Textbox1bpp
ld a, [wPlayerDisableCount]
and a
@@ -7126,7 +7126,7 @@ GiveExperiencePoints:
hlcoord 9, 0
ld b, 10
ld c, 9
call Textbox
call Textbox1bpp
hlcoord 11, 1
ld bc, 4
predef PrintTempMonStats
@@ -8686,7 +8686,7 @@ InitBattleDisplay:
hlcoord 0, 12
ld b, 4
ld c, 18
call Textbox
call Textbox1bpp
hlcoord 1, 5
lb bc, 3, 7
call ClearBox

View File

@@ -167,7 +167,7 @@ ClearBattleRAM:
callfar ResetEnemyStatLevels
call ClearWindowData
call ClearMenuAndWindowData
ld hl, hBGMapAddress
xor a ; LOW(vBGMap0)

View File

@@ -238,7 +238,7 @@ _ShowLinkBattleParticipants:
hlcoord 2, 3
ld b, 9
ld c, 14
call Textbox
call Textbox1bpp
hlcoord 4, 5
ld de, wPlayerName
call PlaceString

View File

@@ -584,7 +584,7 @@ DebugRoom_EditPagedValues:
hlcoord 0, 0
ld b, SCREEN_HEIGHT - 2
ld c, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
hlcoord 8, 17
ld de, DebugRoom_PageString
call PlaceString

View File

@@ -69,7 +69,7 @@ BuenaPrize:
call Buena_PlacePrizeMenuBox
call Buena_DisplayBlueCardBalance
ld hl, .BuenaAskWhichPrizeText
call PrintText
call PrintText1bpp
jr .okay
.loop
@@ -139,7 +139,7 @@ BuenaPrize:
call CloseWindow
call CloseWindow
ld hl, .BuenaComeAgainText
call PrintText
call PrintText1bpp
call JoyWaitAorB
call PlayClickSFX
ret

View File

@@ -15,7 +15,7 @@ BugContest_SetCaughtContestMon:
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .ContestCaughtMonText
call PrintText
call PrintText1bpp
ret
.generatestats

View File

@@ -12,12 +12,12 @@ DisplayCaughtContestMonStats:
hlcoord 0, 0
ld b, 4
ld c, 13
call Textbox
call Textbox1bpp
hlcoord 0, 6
ld b, 4
ld c, 13
call Textbox
call Textbox1bpp
hlcoord 2, 0
ld de, .Stock
@@ -68,7 +68,7 @@ DisplayCaughtContestMonStats:
call PrintNum
ld hl, ContestAskSwitchText
call PrintText
call PrintText1bpp
pop af
ld [wOptions], a
@@ -93,7 +93,7 @@ ContestAskSwitchText:
DisplayAlreadyCaughtText:
call GetPokemonName
ld hl, .ContestAlreadyCaughtText
jp PrintText
jp PrintText1bpp
.ContestAlreadyCaughtText:
text_far _ContestAlreadyCaughtText

View File

@@ -7,21 +7,21 @@ _BugContestJudging:
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_ThirdPlaceText
call PrintText
call PrintText2bpp
ld a, [wBugContestSecondPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestSecondPlaceMon]
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_SecondPlaceText
call PrintText
call PrintText2bpp
ld a, [wBugContestFirstPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestFirstPlaceMon]
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_FirstPlaceText
call PrintText
call PrintText2bpp
jp BugContest_GetPlayersResult
ContestJudging_FirstPlaceText:

View File

@@ -268,7 +268,7 @@ PrintDayCareText:
ld a, [hli]
ld h, [hl]
ld l, a
call PrintText
call PrintText1bpp
ret
.TextTable:
@@ -379,7 +379,7 @@ DayCareManOutside:
bit DAYCAREMAN_HAS_EGG_F, [hl]
jr nz, .AskGiveEgg
ld hl, .NotYetText
call PrintText
call PrintText1bpp
ret
.NotYetText:
@@ -388,7 +388,7 @@ DayCareManOutside:
.AskGiveEgg:
ld hl, .FoundAnEggText
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .Declined
ld a, [wPartyCount]
@@ -399,7 +399,7 @@ DayCareManOutside:
res DAYCAREMAN_HAS_EGG_F, [hl]
call DayCare_InitBreeding
ld hl, .ReceivedEggText
call PrintText
call PrintText1bpp
ld de, SFX_GET_EGG
call PlaySFX
ld c, 120
@@ -411,14 +411,14 @@ DayCareManOutside:
ld hl, .IllKeepItThanksText
.Load0:
call PrintText
call PrintText1bpp
xor a ; FALSE
ld [wScriptVar], a
ret
.PartyFull:
ld hl, .NoRoomForEggText
call PrintText
call PrintText1bpp
ld a, TRUE
ld [wScriptVar], a
ret

View File

@@ -117,7 +117,7 @@ Elevator_GoToFloor:
Elevator_AskWhichFloor:
call LoadStandardMenuHeader
ld hl, AskFloorElevatorText
call PrintText
call PrintText1bpp
call Elevator_GetCurrentFloorText
ld hl, Elevator_MenuHeader
call CopyMenuHeader
@@ -150,7 +150,7 @@ Elevator_GetCurrentFloorText:
hlcoord 0, 0
ld b, 4
ld c, 8
call Textbox
call Textbox1bpp
hlcoord 1, 2
ld de, Elevator_CurrentFloorText
call PlaceString

View File

@@ -457,10 +457,10 @@ DisplayHOFMon:
call ByteFill
hlcoord 0, 0
lb bc, 3, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
hlcoord 0, 12
lb bc, 4, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
ld a, [wTempMonSpecies]
ld [wCurPartySpecies], a
ld [wTextDecimalByte], a
@@ -564,10 +564,10 @@ HOF_AnimatePlayerPic:
ldh [hBGMapMode], a
hlcoord 0, 2
lb bc, 8, 9
call Textbox
call Textbox1bpp
hlcoord 0, 12
lb bc, 4, 18
call Textbox
call Textbox1bpp
hlcoord 2, 4
ld de, wPlayerName
call PlaceString

View File

@@ -1,6 +1,6 @@
Kurt_PrintTextWhichApricorn:
ld hl, .WhichApricornText
call PrintText
call PrintText1bpp
ret
.WhichApricornText:
@@ -9,7 +9,7 @@ Kurt_PrintTextWhichApricorn:
Kurt_PrintTextHowMany:
ld hl, .HowManyShouldIMakeText
call PrintText
call PrintText1bpp
ret
.HowManyShouldIMakeText:

View File

@@ -116,7 +116,7 @@ CheckForLuckyNumberWinners:
ld hl, .LuckyNumberMatchPCText
.print
jp PrintText
jp PrintText2bpp
.CompareLuckyNumberToMonID:
push bc

View File

@@ -29,7 +29,7 @@ CheckMagikarpLength:
call CalcMagikarpLength
call PrintMagikarpLength
ld hl, .MagikarpGuruMeasureText
call PrintText
call PrintText2bpp
; Did we beat the record?
ld hl, wMagikarpLength
@@ -294,7 +294,7 @@ MagikarpHouseSign:
ld [wMagikarpLength + 1], a
call PrintMagikarpLength
ld hl, .KarpGuruRecordText
call PrintText
call PrintText2bpp
ret
.KarpGuruRecordText:

View File

@@ -49,11 +49,11 @@ BankOfMom:
.InitializeBank:
ld hl, MomLeavingText1
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .DontSaveMoney
ld hl, MomLeavingText2
call PrintText
call PrintText1bpp
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
jr .done_1
@@ -63,14 +63,14 @@ BankOfMom:
.done_1
ld [wMomSavingMoney], a
ld hl, MomLeavingText3
call PrintText
call PrintText1bpp
ld a, $8
ld [wJumptableIndex], a
ret
.IsThisAboutYourMoney:
ld hl, MomIsThisAboutYourMoneyText
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .nope
ld a, $3
@@ -85,7 +85,7 @@ BankOfMom:
.AccessBankOfMom:
ld hl, MomBankWhatDoYouWantToDoText
call PrintText
call PrintText1bpp
call LoadStandardMenuHeader
ld hl, BankOfMom_MenuHeader
call CopyMenuHeader
@@ -121,7 +121,7 @@ BankOfMom:
.StoreMoney:
ld hl, MomStoreMoneyText
call PrintText
call PrintText1bpp
xor a
ld hl, wStringBuffer2
ld [hli], a
@@ -164,18 +164,18 @@ BankOfMom:
call PlaySFX
call WaitSFX
ld hl, MomStoredMoneyText
call PrintText
call PrintText1bpp
ld a, $8
jr .done_4
.InsufficientFundsInWallet:
ld hl, MomInsufficientFundsInWalletText
call PrintText
call PrintText1bpp
ret
.NotEnoughRoomInBank:
ld hl, MomNotEnoughRoomInBankText
call PrintText
call PrintText1bpp
ret
.CancelDeposit:
@@ -187,7 +187,7 @@ BankOfMom:
.TakeMoney:
ld hl, MomTakeMoneyText
call PrintText
call PrintText1bpp
xor a
ld hl, wStringBuffer2
ld [hli], a
@@ -230,18 +230,18 @@ BankOfMom:
call PlaySFX
call WaitSFX
ld hl, MomTakenMoneyText
call PrintText
call PrintText1bpp
ld a, $8
jr .done_5
.InsufficientFundsInBank:
ld hl, MomHaventSavedThatMuchText
call PrintText
call PrintText1bpp
ret
.NotEnoughRoomInWallet:
ld hl, MomNotEnoughRoomInWalletText
call PrintText
call PrintText1bpp
ret
.CancelWithdraw:
@@ -253,13 +253,13 @@ BankOfMom:
.StopOrStartSavingMoney:
ld hl, MomSaveMoneyText
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .StopSavingMoney
ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
ld [wMomSavingMoney], a
ld hl, MomStartSavingMoneyText
call PrintText
call PrintText1bpp
ld a, $8
ld [wJumptableIndex], a
ret
@@ -273,7 +273,7 @@ BankOfMom:
.JustDoWhatYouCan:
ld hl, MomJustDoWhatYouCanText
call PrintText
call PrintText1bpp
.AskDST:
ld hl, wJumptableIndex
@@ -292,7 +292,7 @@ Mom_ContinueMenuSetup:
ldh [hBGMapMode], a
hlcoord 0, 0
lb bc, 6, 18
call Textbox
call Textbox1bpp
hlcoord 1, 2
ld de, Mom_SavedString
call PlaceString

View File

@@ -1,10 +1,10 @@
MoveDeletion:
ld hl, .DeleterIntroText
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .declined
ld hl, .DeleterAskWhichMonText
call PrintText
call PrintText1bpp
farcall SelectMonFromParty
jr c, .declined
ld a, [wCurPartySpecies]
@@ -18,7 +18,7 @@ MoveDeletion:
and a
jr z, .onlyonemove
ld hl, .DeleterAskWhichMoveText
call PrintText
call PrintText1bpp
call LoadStandardMenuHeader
farcall ChooseMoveToDelete
push af
@@ -31,7 +31,7 @@ MoveDeletion:
ld [wNamedObjectIndex], a
call GetMoveName
ld hl, .AskDeleteMoveText
call PrintText
call PrintText1bpp
call YesNoBox
pop bc
jr c, .declined
@@ -41,22 +41,22 @@ MoveDeletion:
call PlaySFX
call WaitSFX
ld hl, .DeleterForgotMoveText
call PrintText
call PrintText1bpp
ret
.egg
ld hl, .MailEggText
call PrintText
call PrintText1bpp
ret
.declined
ld hl, .DeleterNoComeAgainText
call PrintText
call PrintText1bpp
ret
.onlyonemove
ld hl, .MoveKnowsOneText
call PrintText
call PrintText1bpp
ret
.MoveKnowsOneText:

View File

@@ -72,7 +72,7 @@ CheckCanLearnMoveTutorMove:
pop de
ld a, BANK(TMHMNotCompatibleText)
ld hl, TMHMNotCompatibleText
call FarPrintText
call FarPrintText1bpp
jr .didnt_learn
.can_learn

View File

@@ -1,12 +1,12 @@
_NameRater:
; Introduce himself
ld hl, NameRaterHelloText
call PrintText
call PrintText1bpp
call YesNoBox
jp c, .cancel
; Select a Pokemon from your party
ld hl, NameRaterWhichMonText
call PrintText
call PrintText1bpp
farcall SelectMonFromParty
jr c, .cancel
; He can't rename an egg...
@@ -19,12 +19,12 @@ _NameRater:
jr c, .traded
; This name is good, but we can do better. How about it?
ld hl, NameRaterBetterNameText
call PrintText
call PrintText1bpp
call YesNoBox
jr c, .cancel
; What name shall I give it then?
ld hl, NameRaterWhatNameText
call PrintText
call PrintText1bpp
; Load the new nickname into wStringBuffer2
xor a ; PARTYMON
ld [wMonType], a
@@ -59,7 +59,7 @@ _NameRater:
push hl
call GetCurNickname
ld hl, NameRaterNamedText
call PrintText
call PrintText1bpp
pop hl
jr .done
@@ -75,7 +75,7 @@ _NameRater:
ld hl, NameRaterEggText
.done
call PrintText
call PrintText1bpp
ret
CheckIfMonIsYourOT:

View File

@@ -35,14 +35,14 @@ NPCTrade::
call TradeFlagAction
ld hl, NPCTradeCableText
call PrintText
call PrintText1bpp
call DoNPCTrade
call .TradeAnimation
call GetTradeMonNames
ld hl, TradedForText
call PrintText
call PrintText1bpp
call RestartMapMusic
@@ -400,7 +400,7 @@ PrintTradeText:
ld a, [hli]
ld h, [hl]
ld l, a
call PrintText
call PrintText1bpp
ret
TradeTexts:

Some files were not shown because too many files have changed in this diff Show More