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::
const_def
const FAST_TEXT_DELAY_F ; 0
const NO_TEXT_DELAY_F ; 1
const TEXT_DELAY_F ; 1
; wGBPrinterBrightness::
DEF GBPRINTER_LIGHTEST EQU $00

View File

@ -96,7 +96,9 @@ MACRO connection
endc
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
; connection west, Route29, ROUTE_29, 0

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

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