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

@ -56,7 +56,7 @@ DEF NUM_FRAMES EQU const_value
; wTextboxFlags:: ; wTextboxFlags::
const_def const_def
const FAST_TEXT_DELAY_F ; 0 const FAST_TEXT_DELAY_F ; 0
const NO_TEXT_DELAY_F ; 1 const TEXT_DELAY_F ; 1
; wGBPrinterBrightness:: ; wGBPrinterBrightness::
DEF GBPRINTER_LIGHTEST EQU $00 DEF GBPRINTER_LIGHTEST EQU $00

View File

@ -96,7 +96,9 @@ MACRO connection
endc endc
ENDM ENDM
map_attributes Level1_Map1, LEVEL_1_MAP_1, $ff, 0 map_attributes Level1_Map1, LEVEL_1_MAP_1, $00, SOUTH | NORTH
connection south, Level1_Map1, LEVEL_1_MAP_1, 0
connection north, Level1_Map1, LEVEL_1_MAP_1, 0
; map_attributes NewBarkTown, NEW_BARK_TOWN, $05, WEST | EAST ; map_attributes NewBarkTown, NEW_BARK_TOWN, $05, WEST | EAST
; connection west, Route29, ROUTE_29, 0 ; connection west, Route29, ROUTE_29, 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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