Skip to content

Commit

Permalink
In labels, stick to Place for text without delay, and Print for text …
Browse files Browse the repository at this point in the history
…with letter delay (#1078)
  • Loading branch information
xCrystal committed Jan 7, 2024
1 parent cd28c44 commit 5be9856
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 45 deletions.
12 changes: 6 additions & 6 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ SetUpBattlePartyMenu_Loop: ; switch to fullscreen menu?

JumpToPartyMenuAndPrintText:
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down Expand Up @@ -9076,7 +9076,7 @@ BattleStartMessage:
farcall Battle_GetTrainerName

ld hl, WantsToBattleText
jr .PlaceBattleStartText
jr .PrintBattleStartText

.wild
call BattleCheckEnemyShininess
Expand Down Expand Up @@ -9118,18 +9118,18 @@ BattleStartMessage:
farcall StubbedTrainerRankings_HookedEncounters

ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
jr .PrintBattleStartText

.NotFishing:
ld hl, PokemonFellFromTreeText
cp BATTLETYPE_TREE
jr z, .PlaceBattleStartText
jr z, .PrintBattleStartText
ld hl, WildCelebiAppearedText
cp BATTLETYPE_CELEBI
jr z, .PlaceBattleStartText
jr z, .PrintBattleStartText
ld hl, WildPokemonAppearedText

.PlaceBattleStartText:
.PrintBattleStartText:
push hl
farcall BattleStart_TrainerHuds
pop hl
Expand Down
2 changes: 1 addition & 1 deletion engine/events/battle_tower/trainer_text.asm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endc
bccoord 1, 14
pop af
ldh [rSVBK], a
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

INCLUDE "mobile/fixed_words.asm"
Expand Down
12 changes: 6 additions & 6 deletions engine/events/mom.asm
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ DSTChecks:
call .ClearBox
bccoord 1, 14
ld hl, .TimesetAskAdjustDSTText
call PlaceHLTextAtBC
call PrintTextboxTextAt
call YesNoBox
ret c
call .ClearBox
bccoord 1, 14
ld hl, .MomLostGearBookletText
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.loop
Expand All @@ -316,7 +316,7 @@ DSTChecks:
bit 7, a
jr z, .SetDST
ld hl, .TimesetAskNotDSTText
call PlaceHLTextAtBC
call PrintTextboxTextAt
call YesNoBox
ret c
ld a, [wDST]
Expand All @@ -326,12 +326,12 @@ DSTChecks:
call .ClearBox
bccoord 1, 14
ld hl, .TimesetNotDSTText
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.SetDST:
ld hl, .TimesetAskDSTText
call PlaceHLTextAtBC
call PrintTextboxTextAt
call YesNoBox
ret c
ld a, [wDST]
Expand All @@ -341,7 +341,7 @@ DSTChecks:
call .ClearBox
bccoord 1, 14
ld hl, .TimesetDSTText
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.SetClockForward:
Expand Down
2 changes: 1 addition & 1 deletion engine/items/item_effects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ ChooseMonToUseItemOn:
farcall InitPartyMenuWithCancel
farcall InitPartyMenuGFX
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down
2 changes: 1 addition & 1 deletion engine/items/pack.asm
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ GiveItem:
farcall InitPartyMenuGFX
.loop
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down
2 changes: 1 addition & 1 deletion engine/items/tmhm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ChooseMonToLearnTMHM_NoRefresh:
ld [wPartyMenuActionText], a
.loopback
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down
20 changes: 10 additions & 10 deletions engine/link/link.asm
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ LinkTimeout:
pop de
pop hl
bccoord 1, 14
call PlaceHLTextAtBC
call PrintTextboxTextAt
call RotateThreePalettesRight
call ClearScreen
ld b, SCGB_DIPLOMA
Expand Down Expand Up @@ -1504,7 +1504,7 @@ LinkTrade_TradeStatsMenu:
dec a
ld [wCurTradePartyMon], a
ld [wPlayerLinkAction], a
farcall PrintWaitingTextAndSyncAndExchangeNybble
farcall PlaceWaitingTextAndSyncAndExchangeNybble
ld a, [wOtherPlayerLinkMode]
cp $f
jp z, InitTradeMenuDisplay
Expand All @@ -1526,7 +1526,7 @@ LinkTrade_TradeStatsMenu:
farcall Link_WaitBGMap
ld hl, .LinkTradeCantBattleText
bccoord 1, 14
call PlaceHLTextAtBC
call PrintTextboxTextAt
jr .cancel_trade

.abnormal
Expand All @@ -1548,7 +1548,7 @@ LinkTrade_TradeStatsMenu:
farcall Link_WaitBGMap
ld hl, .LinkAbnormalMonText
bccoord 1, 14
call PlaceHLTextAtBC
call PrintTextboxTextAt

.cancel_trade
hlcoord 0, 12
Expand All @@ -1560,7 +1560,7 @@ LinkTrade_TradeStatsMenu:
call PlaceString
ld a, $1
ld [wPlayerLinkAction], a
farcall PrintWaitingTextAndSyncAndExchangeNybble
farcall PlaceWaitingTextAndSyncAndExchangeNybble
ld c, 100
call DelayFrames
jp InitTradeMenuDisplay
Expand Down Expand Up @@ -1622,7 +1622,7 @@ LinkTradePartymonMenuCheckCancel:
ldcoord_a 9, 17
ld a, $f
ld [wPlayerLinkAction], a
farcall PrintWaitingTextAndSyncAndExchangeNybble
farcall PlaceWaitingTextAndSyncAndExchangeNybble
ld a, [wOtherPlayerLinkMode]
cp $f
jr nz, .loop1
Expand Down Expand Up @@ -1721,7 +1721,7 @@ LinkTrade:
call GetPokemonName
ld hl, LinkAskTradeForText
bccoord 1, 14
call PlaceHLTextAtBC
call PrintTextboxTextAt
call LoadStandardMenuHeader
hlcoord 10, 7
ld b, 3
Expand Down Expand Up @@ -1770,13 +1770,13 @@ LinkTrade:
hlcoord 1, 14
ld de, String_TooBadTheTradeWasCanceled
call PlaceString
farcall PrintWaitingTextAndSyncAndExchangeNybble
farcall PlaceWaitingTextAndSyncAndExchangeNybble
jp InitTradeMenuDisplay_Delay

.try_trade
ld a, $2
ld [wPlayerLinkAction], a
farcall PrintWaitingTextAndSyncAndExchangeNybble
farcall PlaceWaitingTextAndSyncAndExchangeNybble
ld a, [wOtherPlayerLinkMode]
dec a
jr nz, .do_trade
Expand Down Expand Up @@ -2019,7 +2019,7 @@ LinkTrade:
ld a, b
ld [wPlayerLinkAction], a
push bc
call Serial_PrintWaitingTextAndSyncAndExchangeNybble
call Serial_PlaceWaitingTextAndSyncAndExchangeNybble
pop bc
ld a, [wLinkMode]
cp LINK_TIMECAPSULE
Expand Down
6 changes: 3 additions & 3 deletions engine/link/link_trade.asm
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ LinkTextbox:
call _LinkTextbox
ret

PrintWaitingTextAndSyncAndExchangeNybble:
PlaceWaitingTextAndSyncAndExchangeNybble:
call LoadStandardMenuHeader
call .PrintWaitingText
call .PlaceWaitingText
farcall WaitLinkTransfer
call Call_ExitMenu
call WaitBGMap2
ret

.PrintWaitingText:
.PlaceWaitingText:
hlcoord 4, 10
ld b, 1
ld c, 10
Expand Down
2 changes: 1 addition & 1 deletion engine/menus/start_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ StartMenu_Pokemon:

.menunoreload
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down
2 changes: 1 addition & 1 deletion engine/pokegear/pokegear.asm
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ Pokegear_UpdateClock:
farcall PrintHoursMins
ld hl, .GearTodayText
bccoord 6, 6
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

db "ごぜん@"
Expand Down
2 changes: 1 addition & 1 deletion engine/pokegear/radio.asm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ PrintRadioLine:
cp 2
jr nz, .print
bccoord 1, 16
call PlaceHLTextAtBC
call PrintTextboxTextAt
jr .skip
.print
call PrintTextboxText
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/mail.asm
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ MailboxPC:
farcall InitPartyMenuWithCancel
farcall InitPartyMenuGFX
farcall WritePartyMenuTilemap
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call WaitBGMap
call SetDefaultBGPAndOBP
call DelayFrame
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/mon_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions engine/pokemon/party_menu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ InitPartyMenuLayout:
call InitPartyMenuWithCancel
call InitPartyMenuGFX
call WritePartyMenuTilemap
call PrintPartyMenuText
call PlacePartyMenuText
ret

LoadPartyMenuGFX:
Expand Down Expand Up @@ -703,7 +703,7 @@ PartyMenuSelect:
scf
ret

PrintPartyMenuText:
PlacePartyMenuText:
hlcoord 0, 14
lb bc, 2, 18
call Textbox
Expand Down
6 changes: 3 additions & 3 deletions engine/rtc/timeset.asm
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ InitialSetDSTFlag:
lb bc, 3, 18
call ClearBox
ld hl, .Text
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.Text:
Expand All @@ -574,7 +574,7 @@ InitialClearDSTFlag:
lb bc, 3, 18
call ClearBox
ld hl, .Text
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.Text:
Expand All @@ -598,7 +598,7 @@ MrChrono: ; unreferenced
lb bc, 3, SCREEN_WIDTH - 2
call ClearBox
ld hl, .Text
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

.Text:
Expand Down
2 changes: 1 addition & 1 deletion home/serial.asm
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Serial_ExchangeSyncBytes::
jr nz, .exchange
ret

Serial_PrintWaitingTextAndSyncAndExchangeNybble::
Serial_PlaceWaitingTextAndSyncAndExchangeNybble::
call LoadTilemapToTempTilemap
callfar PlaceWaitingText
call WaitLinkTransfer
Expand Down
4 changes: 2 additions & 2 deletions home/text.asm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BuenaPrintText::

PrintTextboxText::
bccoord TEXTBOX_INNERX, TEXTBOX_INNERY
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

SetUpTextbox::
Expand Down Expand Up @@ -658,7 +658,7 @@ PokeFluteTerminator::
.stop:
text_end

PlaceHLTextAtBC::
PrintTextboxTextAt::
ld a, [wTextboxFlags]
push af
set TEXT_DELAY_F, a
Expand Down
2 changes: 1 addition & 1 deletion mobile/fixed_words.asm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ PrintEZChatBattleMessage:
; now, let's place the string from wc618 to bc
pop bc
ld hl, wc618
call PlaceHLTextAtBC
call PrintTextboxTextAt
; restore the original values of [wJumptableIndex] and [wcf64]
pop hl
ld a, l
Expand Down
2 changes: 1 addition & 1 deletion mobile/mobile_12_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Function4aa34:
farcall WritePartyMenuTilemap
xor a
ld [wPartyMenuActionText], a
farcall PrintPartyMenuText
farcall PlacePartyMenuText
call Function4aab6
call WaitBGMap
call SetDefaultBGPAndOBP
Expand Down
2 changes: 1 addition & 1 deletion mobile/mobile_5f.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ Function17dd13:
push hl
pop bc
pop hl
call PlaceHLTextAtBC
call PrintTextboxTextAt
ret

Function17dd30:
Expand Down

0 comments on commit 5be9856

Please sign in to comment.