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

@@ -237,7 +237,7 @@ PokeBallEffect:
ld hl, wOptions
res NO_TEXT_SCROLL, [hl]
ld hl, ItemUsedText
call PrintText
call PrintText1bpp
ld a, [wEnemyMonCatchRate]
ld b, a
@@ -503,7 +503,7 @@ PokeBallEffect:
jp z, .FinishTutorial
ld hl, Text_GotchaMonWasCaught
call PrintText
call PrintText1bpp
call ClearSprites
@@ -524,7 +524,7 @@ PokeBallEffect:
jr z, .skip_pokedex
ld hl, NewDexDataText
call PrintText
call PrintText1bpp
call ClearSprites
@@ -569,7 +569,7 @@ PokeBallEffect:
.SkipPartyMonFriendBall:
ld hl, AskGiveNicknameText
call PrintText
call PrintText1bpp
ld a, [wCurPartySpecies]
ld [wNamedObjectIndex], a
@@ -629,7 +629,7 @@ PokeBallEffect:
call CloseSRAM
ld hl, AskGiveNicknameText
call PrintText
call PrintText1bpp
ld a, [wCurPartySpecies]
ld [wNamedObjectIndex], a
@@ -672,7 +672,7 @@ PokeBallEffect:
call CloseSRAM
ld hl, BallSentToPCText
call PrintText
call PrintText1bpp
call RotateThreePalettesRight
call LoadStandardFont
@@ -686,7 +686,7 @@ PokeBallEffect:
ld hl, Text_GotchaMonWasCaught
.shake_and_break_free
call PrintText
call PrintText1bpp
call ClearSprites
.return_from_capture
@@ -1190,7 +1190,7 @@ VitaminEffect:
call Play_SFX_FULL_HEAL
ld hl, ItemStatRoseText
call PrintText
call PrintText1bpp
ld c, HAPPINESS_USEDITEM
farcall ChangeHappiness
@@ -1199,7 +1199,7 @@ VitaminEffect:
NoEffectMessage:
ld hl, ItemWontHaveEffectText
call PrintText
call PrintText1bpp
jp ClearPalettes
UpdateStatsAfterItem:
@@ -1341,7 +1341,7 @@ RareCandyEffect:
hlcoord 9, 0
ld b, 10
ld c, 9
call Textbox
call Textbox1bpp
hlcoord 11, 1
ld bc, 4
@@ -1722,7 +1722,7 @@ ChooseMonToUseItemOn:
farcall InitPartyMenuWithCancel
farcall InitPartyMenuGFX
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -2073,7 +2073,7 @@ UseRepel:
ld a, [wRepelEffect]
and a
ld hl, RepelUsedEarlierIsStillInEffectText
jp nz, PrintText
jp nz, PrintText1bpp
ld a, b
ld [wRepelEffect], a
@@ -2189,9 +2189,9 @@ PokeFluteEffect:
ld a, [wPokeFluteCuredSleep]
and a
ld hl, .PlayedFluteText
jp z, PrintText
jp z, PrintText1bpp
ld hl, .PlayedTheFlute
call PrintText
call PrintText1bpp
ld a, [wLowHealthAlarm]
and 1 << DANGER_ON_F
@@ -2199,7 +2199,7 @@ PokeFluteEffect:
; more code was dummied out here
.dummy
ld hl, .FluteWakeUpText
jp PrintText
jp PrintText1bpp
.CureSleep:
ld de, PARTYMON_STRUCT_LENGTH
@@ -2305,7 +2305,7 @@ RestorePPEffect:
ld hl, RestoreThePPOfWhichMoveText
.ppup
call PrintText
call PrintText1bpp
ld a, [wCurMoveNum]
push af
@@ -2346,7 +2346,7 @@ RestorePPEffect:
.CantUsePPUpOnSketch:
ld hl, PPIsMaxedOutText
call PrintText
call PrintText1bpp
jr .loop2
.do_ppup
@@ -2359,7 +2359,7 @@ RestorePPEffect:
call Play_SFX_FULL_HEAL
ld hl, PPsIncreasedText
call PrintText
call PrintText1bpp
FinishPPRestore:
call ClearPalettes
@@ -2382,7 +2382,7 @@ BattleRestorePP:
.not_in_battle
call Play_SFX_FULL_HEAL
ld hl, PPRestoredText
call PrintText
call PrintText1bpp
jr FinishPPRestore
.UpdateBattleMonPP:
@@ -2557,7 +2557,7 @@ OpenBox:
farcall SetSpecificDecorationFlag
ld hl, .SentTrophyHomeText
call PrintText
call PrintText1bpp
jp UseDisposableItem
@@ -2577,7 +2577,7 @@ Play_SFX_FULL_HEAL:
UseItemText:
ld hl, ItemUsedText
call PrintText
call PrintText1bpp
call Play_SFX_FULL_HEAL
call WaitPressAorB_BlinkCursor
UseDisposableItem:
@@ -2599,14 +2599,14 @@ UseBallInTrainerBattle:
ld [wNumHits], a
predef PlayBattleAnim
ld hl, BallBlockedText
call PrintText
call PrintText1bpp
ld hl, BallDontBeAThiefText
call PrintText
call PrintText1bpp
jr UseDisposableItem
WontHaveAnyEffect_NotUsedMessage:
ld hl, ItemWontHaveEffectText
call PrintText
call PrintText1bpp
; Item wasn't used.
ld a, $2
@@ -2615,11 +2615,11 @@ WontHaveAnyEffect_NotUsedMessage:
LooksBitterMessage:
ld hl, ItemLooksBitterText
jp PrintText
jp PrintText1bpp
Ball_BoxIsFullMessage:
ld hl, BallBoxFullText
call PrintText
call PrintText1bpp
; Item wasn't used.
ld a, $2
@@ -2654,7 +2654,7 @@ CantUseItemMessage:
; Item couldn't be used.
xor a
ld [wItemEffectSucceeded], a
jp PrintText
jp PrintText1bpp
ItemLooksBitterText:
text_far _ItemLooksBitterText

View File

@@ -163,7 +163,7 @@ StandardMart:
.HowMayIHelpYou:
call LoadStandardMenuHeader
ld hl, MartWelcomeText
call PrintText
call PrintText1bpp
ld a, STANDARDMART_TOPMENU
ret
@@ -211,7 +211,7 @@ StandardMart:
.AnythingElse:
call LoadStandardMenuHeader
ld hl, MartAskMoreText
call PrintText
call PrintText1bpp
ld a, STANDARDMART_TOPMENU
ret
@@ -364,7 +364,7 @@ LoadBuyMenuText:
ld a, [hli]
ld h, [hl]
ld l, a
call PrintText
call PrintText1bpp
ret
MartAskPurchaseQuantity:
@@ -441,7 +441,7 @@ BuyMenuLoop:
ld [wMenuScrollPositionBackup], a
ld a, [wMenuCursorY]
ld [wMenuCursorPositionBackup], a
call SpeechTextbox
call SpeechTextbox1bpp
ld a, [wMenuJoypad]
cp B_BUTTON
jr z, .set_carry
@@ -476,7 +476,7 @@ BuyMenuLoop:
call JoyWaitAorB
.cancel
call SpeechTextbox
call SpeechTextbox1bpp
and a
ret
@@ -758,13 +758,13 @@ SellMenu:
and a
jr z, .okay_to_sell
ld hl, MartCantBuyText
call PrintText
call PrintText1bpp
and a
ret
.okay_to_sell
ld hl, MartSellHowManyText
call PrintText
call PrintText1bpp
farcall PlaceMoneyAtTopLeftOfTextbox
farcall SelectQuantityToSell
call ExitMenu

View File

@@ -572,7 +572,7 @@ GiveItem:
farcall InitPartyMenuGFX
.loop
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -582,7 +582,7 @@ GiveItem:
cp EGG
jr nz, .give
ld hl, .AnEggCantHoldAnItemText
call PrintText
call PrintText1bpp
jr .loop
.give
@@ -1200,7 +1200,7 @@ Pack_PrintTextNoScroll:
push af
set NO_TEXT_SCROLL, a
ld [wOptions], a
call PrintText
call PrintText1bpp
pop af
ld [wOptions], a
ret
@@ -1357,7 +1357,7 @@ Pack_InitGFX:
; Place the textbox for displaying the item description
hlcoord 0, SCREEN_HEIGHT - 4 - 2
lb bc, 4, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
call EnableLCD
call DrawPackGFX
ret

View File

@@ -60,9 +60,9 @@ AskTeachTMHM:
jr c, .TM
ld hl, BootedHMText ; Booted up an HM
.TM:
call PrintText
call PrintText1bpp
ld hl, ContainedMoveText
call PrintText
call PrintText1bpp
call YesNoBox
.NotTMHM:
pop bc
@@ -84,7 +84,7 @@ ChooseMonToLearnTMHM_NoRefresh:
ld [wPartyMenuActionText], a
.loopback
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -133,7 +133,7 @@ TeachTMHM:
call PlaySFX
pop de
ld hl, TMHMNotCompatibleText
call PrintText
call PrintText1bpp
jr .nope
.compatible
@@ -242,7 +242,7 @@ TMHM_ShowTMMoveDescription:
hlcoord 0, 12
ld b, 4
ld c, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
ld a, [wCurItem]
cp NUM_TMS + NUM_HMS + 1
jr nc, TMHM_JoypadLoop
@@ -491,7 +491,7 @@ VerboseReceiveTMHM: ; unreferenced
jr nc, .print
ld hl, .ReceivedTMHMText
.print
jp PrintText
jp PrintText1bpp
.NoRoomTMHMText:
text_far _NoRoomTMHMText

View File

@@ -4,7 +4,7 @@ UpdateItemDescription:
hlcoord 0, 12
ld b, 4
ld c, SCREEN_WIDTH - 2
call Textbox
call Textbox1bpp
ld a, [wMenuSelection]
cp -1
ret z