Use numeric constants in text strings with "{d:interpolation}"

This commit is contained in:
Rangi 2021-03-21 18:14:31 -04:00
parent 0506e5b1b9
commit 90ce126139
13 changed files with 35 additions and 32 deletions

View File

@ -47,10 +47,3 @@ MAX_DAY_CARE_EXP EQU $500000
; hall of fame ; hall of fame
HOF_MASTER_COUNT EQU 200 HOF_MASTER_COUNT EQU 200
; bug-catching contest
BUG_CONTEST_MINUTES EQU 20
BUG_CONTEST_SECONDS EQU 0
BUG_CONTEST_PLAYER EQU 1
NUM_BUG_CONTESTANTS EQU 10 ; not counting the player
BUG_CONTESTANT_SIZE EQU 4

View File

@ -283,6 +283,14 @@ NUM_DECODESCS EQU const_value
const BUGCONTEST_BOXED_MON ; 1 const BUGCONTEST_BOXED_MON ; 1
const BUGCONTEST_NO_CATCH ; 2 const BUGCONTEST_NO_CATCH ; 2
; Bug-Catching Contest values
BUG_CONTEST_BALLS EQU 20
BUG_CONTEST_MINUTES EQU 20
BUG_CONTEST_SECONDS EQU 0
BUG_CONTEST_PLAYER EQU 1
NUM_BUG_CONTESTANTS EQU 10 ; not counting the player
BUG_CONTESTANT_SIZE EQU 4
; HealMachineAnim setval arguments ; HealMachineAnim setval arguments
; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm) ; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm)
const_def const_def

View File

@ -1,7 +1,7 @@
GiveParkBalls: GiveParkBalls:
xor a xor a
ld [wContestMon], a ld [wContestMon], a
ld a, 20 ld a, BUG_CONTEST_BALLS
ld [wParkBallsRemaining], a ld [wParkBallsRemaining], a
farcall StartBugContestTimer farcall StartBugContestTimer
ret ret

View File

@ -90,9 +90,9 @@ CeladonDeptStore6FVendingMachine:
.MenuData: .MenuData:
db STATICMENU_CURSOR ; flags db STATICMENU_CURSOR ; flags
db 4 ; items db 4 ; items
db "FRESH WATER ¥200@" db "FRESH WATER ¥{d:CELADONDEPTSTORE6F_FRESH_WATER_PRICE}@"
db "SODA POP ¥300@" db "SODA POP ¥{d:CELADONDEPTSTORE6F_SODA_POP_PRICE}@"
db "LEMONADE ¥350@" db "LEMONADE ¥{d:CELADONDEPTSTORE6F_LEMONADE_PRICE}@"
db "CANCEL@" db "CANCEL@"
CeladonDeptStore6FDirectory: CeladonDeptStore6FDirectory:

View File

@ -116,9 +116,9 @@ CeladonPrizeRoom_TMMenuHeader:
.MenuData: .MenuData:
db STATICMENU_CURSOR ; flags db STATICMENU_CURSOR ; flags
db 4 ; items db 4 ; items
db "TM32 1500@" db "TM32 {d:CELADONGAMECORNERPRIZEROOM_TM32_COINS}@"
db "TM29 3500@" db "TM29 {d:CELADONGAMECORNERPRIZEROOM_TM29_COINS}@"
db "TM15 7500@" db "TM15 {d:CELADONGAMECORNERPRIZEROOM_TM15_COINS}@"
db "CANCEL@" db "CANCEL@"
CeladonGameCornerPrizeRoomPokemonVendor: CeladonGameCornerPrizeRoomPokemonVendor:
@ -202,9 +202,9 @@ CeladonGameCornerPrizeRoomPokemonVendor:
.MenuData: .MenuData:
db STATICMENU_CURSOR ; flags db STATICMENU_CURSOR ; flags
db 4 ; items db 4 ; items
db "PIKACHU 2222@" db "PIKACHU {d:CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS}@"
db "PORYGON 5555@" db "PORYGON {d:CELADONGAMECORNERPRIZEROOM_PORYGON_COINS}@"
db "LARVITAR 8888@" db "LARVITAR {d:CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS}@"
db "CANCEL@" db "CANCEL@"
CeladonGameCornerPrizeRoomGentlemanText: CeladonGameCornerPrizeRoomGentlemanText:

View File

@ -79,9 +79,9 @@ GoldenrodVendingMachine:
.MenuData: .MenuData:
db STATICMENU_CURSOR ; flags db STATICMENU_CURSOR ; flags
db 4 ; items db 4 ; items
db "FRESH WATER ¥200@" db "FRESH WATER ¥{d:GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE}@"
db "SODA POP ¥300@" db "SODA POP ¥{d:GOLDENRODDEPTSTORE6F_SODA_POP_PRICE}@"
db "LEMONADE ¥350@" db "LEMONADE ¥{d:GOLDENRODDEPTSTORE6F_LEMONADE_PRICE}@"
db "CANCEL@" db "CANCEL@"
GoldenrodDeptStore6FLassScript: GoldenrodDeptStore6FLassScript:

View File

@ -411,7 +411,7 @@ SchoolboyJackTradeMonText:
para "For example…" para "For example…"
para "There are 50 kinds" para "There are {d:NUM_TMS} kinds"
line "of TMs." line "of TMs."
para "Traded #MON" para "Traded #MON"

View File

@ -1,3 +1,5 @@
BLUE_CARD_POINT_CAP EQU 30
object_const_def object_const_def
const RADIOTOWER2F_SUPER_NERD const RADIOTOWER2F_SUPER_NERD
const RADIOTOWER2F_TEACHER const RADIOTOWER2F_TEACHER
@ -112,7 +114,7 @@ Buena:
checkitem BLUE_CARD checkitem BLUE_CARD
iffalse .NoBlueCard iffalse .NoBlueCard
readvar VAR_BLUECARDBALANCE readvar VAR_BLUECARDBALANCE
ifequal 30, .BlueCardCapped0 ifequal BLUE_CARD_POINT_CAP, .BlueCardCapped0
playmusic MUSIC_BUENAS_PASSWORD playmusic MUSIC_BUENAS_PASSWORD
writetext RadioTower2FBuenaDoYouKnowPasswordText writetext RadioTower2FBuenaDoYouKnowPasswordText
special AskRememberPassword special AskRememberPassword
@ -155,7 +157,7 @@ Buena:
pause 20 pause 20
special RestartMapMusic special RestartMapMusic
readvar VAR_BLUECARDBALANCE readvar VAR_BLUECARDBALANCE
ifequal 30, .BlueCardCapped1 ifequal BLUE_CARD_POINT_CAP, .BlueCardCapped1
end end
.Introduction: .Introduction:
@ -625,12 +627,12 @@ RadioTower2FBuenaOfferPhoneNumberText:
text "BUENA: Oh! Your" text "BUENA: Oh! Your"
line "BLUE CARD reached" line "BLUE CARD reached"
para "30 points today!" para "{d:BLUE_CARD_POINT_CAP} points today!"
line "That's so wild!" line "That's so wild!"
para "Hmm… There isn't a" para "Hmm… There isn't a"
line "prize for hitting" line "prize for hitting"
cont "30 points, but…" cont "{d:BLUE_CARD_POINT_CAP} points, but…"
para "You came by so" para "You came by so"
line "often, <PLAY_G>." line "often, <PLAY_G>."

View File

@ -252,7 +252,7 @@ Route35NationalParkGateOfficer1GiveParkBallsText:
Route35NationalParkGatePlayerReceivedParkBallsText: Route35NationalParkGatePlayerReceivedParkBallsText:
text "<PLAYER> received" text "<PLAYER> received"
line "20 PARK BALLS." line "{d:BUG_CONTEST_BALLS} PARK BALLS."
done done
Route35NationalParkGateOfficer1ExplainsRulesText: Route35NationalParkGateOfficer1ExplainsRulesText:
@ -261,7 +261,7 @@ Route35NationalParkGateOfficer1ExplainsRulesText:
cont "est bug #MON" cont "est bug #MON"
cont "is the winner." cont "is the winner."
para "You have 20" para "You have {d:BUG_CONTEST_MINUTES}"
line "minutes." line "minutes."
para "If you run out of" para "If you run out of"

View File

@ -503,7 +503,7 @@ Route36NationalParkGateOfficer1GiveParkBallsText:
Route36NationalParkGatePlayerReceivedParkBallsText: Route36NationalParkGatePlayerReceivedParkBallsText:
text "<PLAYER> received" text "<PLAYER> received"
line "20 PARK BALLS." line "{d:BUG_CONTEST_BALLS} PARK BALLS."
done done
Route36NationalParkGateOfficer1ExplainsRulesText: Route36NationalParkGateOfficer1ExplainsRulesText:
@ -512,7 +512,7 @@ Route36NationalParkGateOfficer1ExplainsRulesText:
cont "est bug #MON" cont "est bug #MON"
cont "is the winner." cont "is the winner."
para "You have 20" para "You have {d:BUG_CONTEST_MINUTES}"
line "minutes." line "minutes."
para "If you run out of" para "If you run out of"

View File

@ -122,7 +122,7 @@ FarmerMText_BuyMilk:
line "to restore HP!" line "to restore HP!"
para "I'll give it to ya" para "I'll give it to ya"
line "fer just ¥500." line "fer just ¥{d:ROUTE39FARMHOUSE_MILK_PRICE}."
done done
FarmerMText_GotMilk: FarmerMText_GotMilk:

View File

@ -196,7 +196,7 @@ RocketText_TollFee:
text "Hold it there," text "Hold it there,"
line "kiddo!" line "kiddo!"
para "The toll is ¥1000" para "The toll is ¥{d:ROUTE43GATE_TOLL}"
line "to go through." line "to go through."
done done

View File

@ -356,7 +356,7 @@ RuinsOfAlphResearchCenterComputerText_GotAllUnown:
text "Mystery #MON" text "Mystery #MON"
line "Name: UNOWN" line "Name: UNOWN"
para "A total of 26" para "A total of {d:NUM_UNOWN}"
line "kinds found." line "kinds found."
done done