ref: 80bae03975a84dadf080c79f52216866dd410cf8
parent: a51037eeeedb03e29d8675626018cf02750882fa
author: dannye <corrnondacqb@yahoo.com>
date: Sun Jul 17 21:17:03 EDT 2016
Clean up text commands
--- a/charmap.asm
+++ b/charmap.asm
@@ -150,6 +150,7 @@
charmap "@", $50
charmap "#", $54
;charmap "POKé", $54
+charmap "№", $74
charmap "…", $75
charmap "┌", $79
@@ -159,8 +160,6 @@
charmap "└", $7D
charmap "┘", $7E
-charmap "№", $74
-
charmap " ", $7F
charmap "A", $80
charmap "B", $81
@@ -226,7 +225,9 @@
charmap "'s", $BD
charmap "'t", $BE
charmap "'v", $BF
+
charmap "'", $E0
+
charmap "-", $E3
charmap "'r", $E4
charmap "'m", $E5
@@ -233,10 +234,15 @@
charmap "?", $E6
charmap "!", $E7
charmap ".", $E8
+
+charmap "▷", $EC
charmap "▶", $ED
+charmap "▲", $ED
+charmap "▼", $EE
charmap "♂", $EF
charmap "¥", $F0
charmap "×", $F1
+charmap "⠄", $F2
charmap "/", $F3
charmap ",", $F4
charmap "♀", $F5
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2127,7 +2127,7 @@
ld [hl], "▶"
ld c, 50
call DelayFrames
- ld [hl], $ec
+ ld [hl], "▷"
ld a, $2 ; select the "ITEM" menu
jp .upperLeftMenuItemWasNotSelected
.oldManName
@@ -2680,7 +2680,7 @@
dec a
ld bc, SCREEN_WIDTH
call AddNTimes
- ld [hl], $ec
+ ld [hl], "▷"
.select
ld hl, hFlags_0xFFF6
set 1, [hl]
@@ -7726,7 +7726,7 @@
ret
GreatlyRoseText:
- db $0a
+ TX_DELAY
TX_FAR _GreatlyRoseText
RoseText:
@@ -7930,7 +7930,7 @@
ret
GreatlyFellText:
- db $0a
+ TX_DELAY
TX_FAR _GreatlyFellText
FellText:
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -368,5 +368,5 @@
GrewLevelText:
TX_FAR _GrewLevelText
- db $0b
+ TX_SFX_LEVEL_UP
db "@"
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ b/engine/battle/moveEffects/focus_energy_effect.asm
@@ -17,6 +17,6 @@
jpab PrintButItFailedText_
GettingPumpedText:
- db $0a
+ TX_DELAY
TX_FAR _GettingPumpedText
db "@"
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -547,7 +547,7 @@
ld a, " "
ld [hl], a
.cancelMenuItem_Loop
- ld a, $ed ; filled arrow cursor
+ ld a, "▶" ; filled arrow cursor
Coorda 1, 16
.cancelMenuItem_JoypadLoop
call JoypadLowSensitivity
@@ -566,7 +566,7 @@
ld [wCurrentMenuItem], a
jp .playerMonMenu
.cancelMenuItem_APressed
- ld a, $ec ; unfilled arrow cursor
+ ld a, "▷" ; unfilled arrow cursor
Coorda 1, 16
ld a, $f
ld [wSerialExchangeNybbleSendData], a
@@ -616,7 +616,7 @@
coord hl, 1, 9
ld bc, SCREEN_WIDTH
call AddNTimes
- ld [hl], $ec ; cursor
+ ld [hl], "▷" ; cursor
ret
TradeCenter_DisplayStats:
--- a/engine/give_pokemon.asm
+++ b/engine/give_pokemon.asm
@@ -70,7 +70,7 @@
GotMonText:
TX_FAR _GotMonText
- db $0b
+ TX_SFX_ITEM_1
db "@"
SetToBoxText:
--- a/engine/hidden_object_functions14.asm
+++ b/engine/hidden_object_functions14.asm
@@ -7,7 +7,7 @@
TMNotebook:
TX_FAR TMNotebookText
- db $0d
+ TX_WAIT
db "@"
ViridianSchoolNotebook:
@@ -45,7 +45,7 @@
ViridianSchoolNotebookText5:
TX_FAR _ViridianSchoolNotebookText5
- db $0d
+ TX_WAIT
db "@"
ViridianSchoolNotebookText1:
--- a/engine/hidden_object_functions3.asm
+++ b/engine/hidden_object_functions3.asm
@@ -127,7 +127,7 @@
TownMapText:
TX_FAR _TownMapText
- db $06
+ TX_BLINK
TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -235,9 +235,9 @@
ret
CinnabarGymQuizCorrectText:
- db $0b
+ TX_SFX_ITEM_1
TX_FAR _CinnabarGymQuizCorrectText
- db $06
+ TX_BLINK
TX_ASM
ld a, [$ffe0]
@@ -372,7 +372,7 @@
BillsHouseInitiatedText:
TX_FAR _BillsHouseInitiatedText
- db $06
+ TX_BLINK
TX_ASM
ld a, $ff
ld [wNewSoundID], a
--- a/engine/in_game_trades.asm
+++ b/engine/in_game_trades.asm
@@ -265,7 +265,9 @@
TradedForText:
TX_FAR _TradedForText
- db $11, $a, "@"
+ TX_SFX_KEY_ITEM
+ TX_DELAY
+ db "@"
WannaTrade1Text:
TX_FAR _WannaTrade1Text
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -608,7 +608,8 @@
;"All right! {MonName} was caught!"
;play sound
TX_FAR _ItemUseBallText05
- db $12,$06
+ TX_SFX_CAUGHT_MON
+ TX_BLINK
db "@"
ItemUseBallText07:
;"X was transferred to Bill's PC"
@@ -623,7 +624,8 @@
;"New DEX data will be added..."
;play sound
TX_FAR _ItemUseBallText06
- db $13,$06
+ TX_SFX_DEX_PAGE_ADDED
+ TX_BLINK
db "@"
ItemUseTownMap:
@@ -1836,7 +1838,7 @@
PlayedFluteHadEffectText:
TX_FAR _PlayedFluteHadEffectText
- db $06
+ TX_BLINK
TX_ASM
ld a,[wIsInBattle]
and a
@@ -2395,19 +2397,19 @@
ItemUseText00:
TX_FAR _ItemUseText001
- db $05
+ TX_LINE
TX_FAR _ItemUseText002
db "@"
GotOnBicycleText:
TX_FAR _GotOnBicycleText1
- db $05
+ TX_LINE
TX_FAR _GotOnBicycleText2
db "@"
GotOffBicycleText:
TX_FAR _GotOffBicycleText1
- db $05
+ TX_LINE
TX_FAR _GotOffBicycleText2
db "@"
--- a/engine/learn_move.asm
+++ b/engine/learn_move.asm
@@ -185,7 +185,9 @@
LearnedMove1Text:
TX_FAR _LearnedMove1Text
- db $b,6,"@"
+ TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the pary menu (rare candy) and plays SFX_LEVEL_UP in battle
+ TX_BLINK
+ db "@"
WhichMoveToForgetText:
TX_FAR _WhichMoveToForgetText
@@ -205,7 +207,7 @@
OneTwoAndText:
TX_FAR _OneTwoAndText
- db $a
+ TX_DELAY
TX_ASM
ld a, SFX_SWAP
call PlaySoundWaitForCurrent
@@ -214,7 +216,7 @@
PoofText:
TX_FAR _PoofText
- db $a
+ TX_DELAY
ForgotAndText:
TX_FAR _ForgotAndText
db "@"
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -332,13 +332,13 @@
db "CONTINUE", $4e
NewGameText:
- db "NEW GAME", $4e
- db "OPTION@"
+ db "NEW GAME"
+ next "OPTION@"
CableClubOptionsText:
- db "TRADE CENTER", $4e
- db "COLOSSEUM", $4e
- db "CANCEL@"
+ db "TRADE CENTER"
+ next "COLOSSEUM"
+ next "CANCEL@"
DisplayContinueGameInfo:
xor a
--- a/engine/menu/oaks_pc.asm
+++ b/engine/menu/oaks_pc.asm
@@ -20,7 +20,8 @@
ClosedOaksPCText:
TX_FAR _ClosedOaksPCText
- db $0d,"@"
+ TX_WAIT
+ db "@"
AccessedOaksPCText:
TX_FAR _AccessedOaksPCText
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -70,7 +70,7 @@
dec hl
dec hl
dec hl
- ld a,$EC ; unfilled right arrow menu cursor
+ ld a,"▷" ; unfilled right arrow menu cursor
ld [hli],a ; place the cursor
inc hl
inc hl
@@ -87,7 +87,7 @@
call PrintStatusCondition
pop hl
push hl
- ld bc,20 + 1 ; down 1 row and right 1 column
+ ld bc,SCREEN_WIDTH + 1 ; down 1 row and right 1 column
ld a,[hFlags_0xFFF6]
set 0,a
ld [hFlags_0xFFF6],a
@@ -307,8 +307,8 @@
RareCandyText:
TX_FAR _RareCandyText
- db $0B
- db $06
+ TX_SFX_ITEM_1 ; probably supposed to play SFX_LEVEL_UP but the wrong music bank is loaded
+ TX_BLINK
db "@"
SetPartyMenuHPBarColor:
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -155,7 +155,7 @@
ld [H_AUTOBGTRANSFERENABLED],a
; draw the horizontal line separating the seen and owned amounts from the menu
coord hl, 15, 8
- ld a,$7a ; horizontal line tile
+ ld a,"─"
ld [hli],a
ld [hli],a
ld [hli],a
@@ -267,7 +267,7 @@
inc hl
call PlaceString
pop hl
- ld bc,2 * 20
+ ld bc,2 * SCREEN_WIDTH
add hl,bc
pop de
pop af
@@ -344,7 +344,7 @@
DrawPokedexVerticalLine:
ld c,9 ; height of line
- ld de,20 ; width of screen
+ ld de,SCREEN_WIDTH
ld a,$71 ; vertical line tile
.loop
ld [hl],a
@@ -568,7 +568,8 @@
ret
HeightWeightText:
- db "HT ?",$60,"??",$61,$4E,"WT ???lb@"
+ db "HT ?",$60,"??",$61
+ next "WT ???lb@"
; XXX does anything point to this?
PokeText:
@@ -580,7 +581,7 @@
db $69,$6B,$69,$6B,$6B
db $6B,$6B,$69,$6B,$69
db $6B,$69,$6B,$69,$6A
- db $50
+ db "@"
; draws a line of tiles
; INPUT:
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -44,7 +44,7 @@
RequireCoinCaseTextPtr:
TX_FAR _RequireCoinCaseText
- db $0D
+ TX_WAIT
db "@"
ExchangeCoinsForPrizesTextPtr:
@@ -266,7 +266,7 @@
HereYouGoTextPtr:
TX_FAR _HereYouGoText
- db $0D
+ TX_WAIT
db "@"
SoYouWantPrizeTextPtr:
@@ -275,17 +275,17 @@
SorryNeedMoreCoinsText:
TX_FAR _SorryNeedMoreCoinsText
- db $0D
+ TX_WAIT
db "@"
PrizeRoomBagIsFullTextPtr:
TX_FAR _OopsYouDontHaveEnoughRoomText
- db $0D
+ TX_WAIT
db "@"
OhFineThenTextPtr:
TX_FAR _OhFineThenText
- db $0D ; wait keypress (A/B) without blink
+ TX_WAIT
db "@"
GetPrizeMonLevel:
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -675,7 +675,7 @@
; hl = address of top tile in the line
; a = tile ID
TrainerInfo_DrawVerticalLine:
- ld de,20
+ ld de,SCREEN_WIDTH
ld c,8
.loop
ld [hl],a
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -211,10 +211,11 @@
db "TYPE2/", $4e
IDNoText:
- db $73, "№", "/", $4e
+ db $73, "№/", $4e
OTText:
- db "OT/", $4e, "@"
+ db "OT/"
+ next "@"
StatusText:
db "STATUS/@"
--- a/engine/menu/vending_machine.asm
+++ b/engine/menu/vending_machine.asm
@@ -93,7 +93,8 @@
DrinkPriceText:
db "¥200"
next "¥300"
- next "¥350",$4E,"@"
+ next "¥350"
+ next "@"
VendingMachineText4:
TX_FAR _VendingMachineText4
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -157,7 +157,7 @@
db "@"
OakSpeechText2:
TX_FAR _OakSpeechText2A
- db $14 ; play NIDORINA cry from TextCommandSounds
+ TX_CRY_NIDORINA
TX_FAR _OakSpeechText2B
db "@"
IntroducePlayerText:
--- a/engine/overworld/cable_club_npc.asm
+++ b/engine/overworld/cable_club_npc.asm
@@ -123,7 +123,8 @@
CableClubNPCPleaseWaitText:
TX_FAR _CableClubNPCPleaseWaitText
- db $a, "@"
+ TX_DELAY
+ db "@"
CableClubNPCLinkClosedBecauseOfInactivityText:
TX_FAR _CableClubNPCLinkClosedBecauseOfInactivityText
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -73,7 +73,7 @@
CardKeySuccessText:
TX_FAR _CardKeySuccessText1
- db $0b
+ TX_SFX_ITEM_1
TX_FAR _CardKeySuccessText2
db "@"
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -122,11 +122,12 @@
FoundHiddenCoinsText:
TX_FAR _FoundHiddenCoinsText
- db $10,"@"
+ TX_SFX_ITEM_2
+ db "@"
DroppedHiddenCoinsText:
TX_FAR _FoundHiddenCoins2Text
- db $10
+ TX_SFX_ITEM_2
TX_FAR _DroppedHiddenCoinsText
db "@"
--- a/engine/overworld/item.asm
+++ b/engine/overworld/item.asm
@@ -46,7 +46,7 @@
FoundItemText:
TX_FAR _FoundItemText
- db $0B
+ TX_SFX_ITEM_1
db "@"
NoMoreRoomForItemText:
--- a/engine/overworld/oaks_aide.asm
+++ b/engine/overworld/oaks_aide.asm
@@ -63,7 +63,7 @@
OaksAideGotItemText:
TX_FAR _OaksAideGotItemText
- db $0b
+ TX_SFX_ITEM_1
db "@"
OaksAideNoRoomText:
--- a/engine/overworld/pokecenter.asm
+++ b/engine/overworld/pokecenter.asm
@@ -50,7 +50,7 @@
db "@"
ShallWeHealYourPokemonText:
- db $a
+ TX_DELAY
TX_FAR _ShallWeHealYourPokemonText
db "@"
@@ -63,6 +63,6 @@
db "@"
PokemonCenterFarewellText:
- db $a
+ TX_DELAY
TX_FAR _PokemonCenterFarewellText
db "@"
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -610,7 +610,8 @@
YeahText:
TX_FAR _YeahText
- db $0a, "@"
+ TX_DELAY
+ db "@"
SlotMachine_PrintWinningSymbol:
; prints winning symbol and down arrow in text box
@@ -627,7 +628,7 @@
inc a
ld [hl], a
coord hl, 18, 16
- ld [hl], $ee ; down arrow
+ ld [hl], "▼"
ret
SlotMachine_SubtractBetFromPlayerCoins:
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -179,9 +179,9 @@
ld c, 15
call DelayFrames
coord hl, 18, 0
- ld [hl], $ed
+ ld [hl], "▲"
coord hl, 19, 0
- ld [hl], $ee
+ ld [hl], "▼"
pop hl
.inputLoop
push hl
--- a/engine/trade2.asm
+++ b/engine/trade2.asm
@@ -43,7 +43,6 @@
jp PrintNumber
Trade_MonInfoText:
- db "──",$74,$F2,$4E
- db $4E
- db "OT/",$4E
- db $73,"№",$F2,"@"
+ db "──№⠄",$4E
+ next "OT/"
+ next $73,"№⠄","@"
--- a/home.asm
+++ b/home.asm
@@ -968,7 +968,6 @@
db "@"
PickUpItemText::
-; XXX better label (what does predef $5C do?)
TX_ASM
predef PickUpItem
jp TextScriptEnd
@@ -1885,7 +1884,7 @@
jp nz,.loop
ld bc,-8
add hl,bc
- ld a,$ee ; down arrow
+ ld a,"▼"
ld [hl],a
ret
.printCancelMenuItem
@@ -4123,7 +4122,7 @@
HandleDownArrowBlinkTiming::
ld a,[hl]
ld b,a
- ld a,$ee ; down arrow
+ ld a,"▼"
cp b
jr nz,.downArrowOff
.downArrowOn
@@ -4157,7 +4156,7 @@
ret nz
ld a,$06
ld [H_DOWNARROWBLINKCNT2],a
- ld a,$ee ; down arrow
+ ld a,"▼"
ld [hl],a
ret
--- a/home/text.asm
+++ b/home/text.asm
@@ -11,7 +11,7 @@
ld [hl], a
pop hl
- ld de, 20
+ ld de, SCREEN_WIDTH
add hl, de
; middle rows
@@ -24,7 +24,7 @@
ld [hl], "│"
pop hl
- ld de, 20
+ ld de, SCREEN_WIDTH
add hl, de
dec b
jr nz, .next
@@ -268,7 +268,7 @@
ld a,[wLinkState]
cp LINK_STATE_BATTLING
jp z,Next1AA2
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
Next1AA2::
call ProtectedDelay3
@@ -286,7 +286,7 @@
Char51::
push de
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
@@ -301,7 +301,7 @@
Char49::
push de
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
call ManualTextScroll
@@ -317,7 +317,7 @@
jp PlaceNextChar_inc
Char4B::
- ld a,$EE
+ ld a,"▼"
Coorda 18, 16
call ProtectedDelay3
push de
@@ -328,29 +328,33 @@
;fall through
Char4C::
push de
- call Next1B18
- call Next1B18
+ call ScrollTextUp
+ call ScrollTextUp
coord hl, 1, 16
pop de
jp PlaceNextChar_inc
-Next1B18::
- coord hl, 0, 14
- coord de, 0, 13
- ld b,60
-.next
+; move both rows of text in the normal text box up one row
+; always called twice in a row
+; first time, copy the two rows of text to the "in between" rows that are usually emtpy
+; second time, copy the bottom row of text into the top row of text
+ScrollTextUp::
+ coord hl, 0, 14 ; top row of text
+ coord de, 0, 13 ; empty line above text
+ ld b, SCREEN_WIDTH * 3
+.copyText
ld a,[hli]
ld [de],a
inc de
dec b
- jr nz,.next
+ jr nz,.copyText
coord hl, 1, 16
ld a, " "
ld b,SCREEN_WIDTH - 2
-.next2
+.clearText
ld [hli],a
dec b
- jr nz,.next2
+ jr nz,.clearText
; wait five frames
ld b,5
@@ -509,7 +513,7 @@
ld a,[wLinkState]
cp a,LINK_STATE_BATTLING
jp z,TextCommand0D
- ld a,$ee ; down arrow
+ ld a,"▼"
Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box
push bc
call ManualTextScroll ; blink arrow and wait for A or B to be pressed
@@ -525,8 +529,8 @@
TextCommand07::
ld a," "
Coorda 18, 16 ; place blank space in lower right corner of dialogue text box
- call Next1B18 ; scroll up text
- call Next1B18
+ call ScrollTextUp
+ call ScrollTextUp
pop hl
coord bc, 1, 16 ; address of second line of dialogue text box
jp NextTextCommand
@@ -626,10 +630,10 @@
; format: text command ID, sound ID or cry ID
TextCommandSounds::
- db $0B,SFX_GET_ITEM_1
+ db $0B,SFX_GET_ITEM_1 ; actually plays SFX_LEVEL_UP when the battle music engine is loaded
db $12,SFX_CAUGHT_MON
- db $0E,SFX_POKEDEX_RATING
- db $0F,SFX_GET_ITEM_1
+ db $0E,SFX_POKEDEX_RATING ; unused?
+ db $0F,SFX_GET_ITEM_1 ; unused?
db $10,SFX_GET_ITEM_2
db $11,SFX_GET_KEY_ITEM
db $13,SFX_DEX_PAGE_ADDED
@@ -648,7 +652,7 @@
ld h,b
ld l,c
.loop
- ld a,$75 ; ellipsis
+ ld a,"…"
ld [hli],a
push de
call Joypad
--- a/macros.asm
+++ b/macros.asm
@@ -1,16 +1,4 @@
-text EQUS "db $00," ; Start writing text.
-next EQUS "db $4e," ; Move a line down.
-line EQUS "db $4f," ; Start writing at the bottom line.
-para EQUS "db $51," ; Start a new paragraph.
-cont EQUS "db $55," ; Scroll to the next line.
-done EQUS "db $57" ; End a text box.
-prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
-
-page EQUS "db $49," ; Start a new Pokedex page.
-dex EQUS "db $5f, $50" ; End a Pokedex entry.
-
-
percent EQUS "* $ff / 100"
lb: MACRO ; r, hi, lo
@@ -180,23 +168,17 @@
ENDM
; text macros
-TX_NUM: MACRO
-; print a big-endian decimal number.
-; \1: address to read from
-; \2: number of bytes to read
-; \3: number of digits to display
- db $09
- dw \1
- db \2 << 4 | \3
- ENDM
+text EQUS "db $00," ; Start writing text.
+next EQUS "db $4e," ; Move a line down.
+line EQUS "db $4f," ; Start writing at the bottom line.
+para EQUS "db $51," ; Start a new paragraph.
+cont EQUS "db $55," ; Scroll to the next line.
+done EQUS "db $57" ; End a text box.
+prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
-TX_FAR: MACRO
- db $17
- dw \1
- db BANK(\1)
- ENDM
+page EQUS "db $49," ; Start a new Pokedex page.
+dex EQUS "db $5f, $50" ; End a Pokedex entry.
-; text engine command $1
TX_RAM: MACRO
; prints text to screen
; \1: RAM address to read from
@@ -212,23 +194,41 @@
db \2
ENDM
-TX_MART: MACRO
- db $FE, _NARG
- rept _NARG
- db \1
- shift
- endr
- db $FF
+TX_LINE EQUS "db $05"
+TX_BLINK EQUS "db $06"
+;TX_SCROLL EQUS "db $07"
+TX_ASM EQUS "db $08"
+
+TX_NUM: MACRO
+; print a big-endian decimal number.
+; \1: address to read from
+; \2: number of bytes to read
+; \3: number of digits to display
+ db $09
+ dw \1
+ db \2 << 4 | \3
ENDM
-TX_LINE EQUS "db $05"
-TX_BUTTON_SOUND EQUS "db $06"
-TX_ASM EQUS "db $08"
-TX_SFX_ITEM EQUS "db $0b"
-TX_WAIT_BUTTON EQUS "db $0d"
-TX_SFX_CONGRATS EQUS "db $10"
-TX_SFX_KEY_ITEM EQUS "db $11"
+TX_DELAY EQUS "db $0a"
+TX_SFX_ITEM_1 EQUS "db $0b"
+TX_SFX_LEVEL_UP EQUS "db $0b"
+;TX_ELLIPSES EQUS "db $0c"
+TX_WAIT EQUS "db $0d"
+;TX_SFX_DEX_RATING EQUS "db $0e"
+TX_SFX_ITEM_2 EQUS "db $10"
+TX_SFX_KEY_ITEM EQUS "db $11"
+TX_SFX_CAUGHT_MON EQUS "db $12"
+TX_SFX_DEX_PAGE_ADDED EQUS "db $13"
+TX_CRY_NIDORINA EQUS "db $14"
+TX_CRY_PIDGEOT EQUS "db $15"
+;TX_CRY_DEWGONG EQUS "db $16"
+TX_FAR: MACRO
+ db $17
+ dw \1
+ db BANK(\1)
+ ENDM
+
TX_VENDING_MACHINE EQUS "db $f5"
TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6"
TX_PRIZE_VENDOR EQUS "db $f7"
@@ -235,6 +235,16 @@
TX_POKECENTER_PC EQUS "db $f9"
TX_PLAYERS_PC EQUS "db $fc"
TX_BILLS_PC EQUS "db $fd"
+
+TX_MART: MACRO
+ db $FE, _NARG
+ rept _NARG
+ db \1
+ shift
+ endr
+ db $FF
+ ENDM
+
TX_POKECENTER_NURSE EQUS "db $ff"
; Predef macro.
--- a/main.asm
+++ b/main.asm
@@ -1702,19 +1702,26 @@
dw .NoYesMenu
.NoYesMenu
- db "NO",$4E,"YES@"
+ db "NO"
+ next "YES@"
.YesNoMenu
- db "YES",$4E,"NO@"
+ db "YES"
+ next "NO@"
.NorthWestMenu
- db "NORTH",$4E,"WEST@"
+ db "NORTH"
+ next "WEST@"
.SouthEastMenu
- db "SOUTH",$4E,"EAST@"
+ db "SOUTH"
+ next "EAST@"
.NorthEastMenu
- db "NORTH",$4E,"EAST@"
+ db "NORTH"
+ next "EAST@"
.TradeCancelMenu
- db "TRADE",$4E,"CANCEL@"
+ db "TRADE"
+ next "CANCEL@"
.HealCancelMenu
- db "HEAL",$4E,"CANCEL@"
+ db "HEAL"
+ next "CANCEL@"
DisplayFieldMoveMonMenu:
xor a
--- a/scripts/bikeshop.asm
+++ b/scripts/bikeshop.asm
@@ -103,7 +103,8 @@
BikeShopText_1d824:
TX_FAR _BikeShopText_1d824
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
BikeShopComeAgainText:
TX_FAR _BikeShopComeAgainText
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -192,7 +192,7 @@
SSTicketReceivedText:
TX_FAR _SSTicketReceivedText
TX_SFX_KEY_ITEM
- TX_BUTTON_SOUND
+ TX_BLINK
db "@"
SSTicketNoRoomText:
--- a/scripts/celadoncity.asm
+++ b/scripts/celadoncity.asm
@@ -69,7 +69,8 @@
ReceivedTM41Text:
TX_FAR _ReceivedTM41Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM41ExplanationText:
TX_FAR _TM41ExplanationText
--- a/scripts/celadondiner.asm
+++ b/scripts/celadondiner.asm
@@ -54,7 +54,8 @@
ReceivedCoinCaseText:
TX_FAR _ReceivedCoinCaseText
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
CoinCaseNoRoomText:
TX_FAR _CoinCaseNoRoomText
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -267,7 +267,7 @@
Received10CoinsText:
TX_FAR _Received10CoinsText
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
db "@"
CeladonGameCornerText_48da7:
@@ -345,7 +345,7 @@
Received20CoinsText:
TX_FAR _Received20CoinsText
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
db "@"
CeladonGameCornerText_48e31:
@@ -397,7 +397,7 @@
CeladonGameCornerText_48e8d:
TX_FAR _CeladonGameCornerText_48e8d
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
db "@"
CeladonGameCornerText_48e93:
--- a/scripts/celadongym.asm
+++ b/scripts/celadongym.asm
@@ -201,7 +201,7 @@
TM21Text:
TX_FAR _ReceivedTM21Text
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _TM21ExplanationText
db "@"
--- a/scripts/celadonmansion3.asm
+++ b/scripts/celadonmansion3.asm
@@ -47,7 +47,7 @@
.CompletedDexText
TX_FAR _CompletedDexText
- db $6
+ TX_BLINK
TX_ASM
callab DisplayDiploma
ld a, $1
--- a/scripts/celadonmart3.asm
+++ b/scripts/celadonmart3.asm
@@ -47,7 +47,8 @@
ReceivedTM18Text:
TX_FAR _ReceivedTM18Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM18ExplanationText:
TX_FAR _TM18ExplanationText
--- a/scripts/celadonmartroof.asm
+++ b/scripts/celadonmartroof.asm
@@ -139,48 +139,48 @@
CeladonMartRoofText_484f3:
TX_FAR _CeladonMartRoofText_484f3
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_484f9:
TX_FAR _CeladonMartRoofText_484f9
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
TX_FAR _CeladonMartRoofText_484fe
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_48504:
TX_FAR _CeladonMartRoofText_48504
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_4850a:
TX_FAR _CeladonMartRoofText_4850a
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
TX_FAR _CeladonMartRoofText_4850f
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_48515:
TX_FAR _CeladonMartRoofText_48515
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
ReceivedTM49Text:
TX_FAR _ReceivedTM49Text
- TX_SFX_ITEM
+ TX_SFX_ITEM_1
TX_FAR _CeladonMartRoofText_48520
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_48526:
TX_FAR _CeladonMartRoofText_48526
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofText_4852c:
TX_FAR _CeladonMartRoofText_4852c
- TX_WAIT_BUTTON
+ TX_WAIT
db "@"
CeladonMartRoofScript_PrintDrinksInBag:
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -320,9 +320,10 @@
ReceivedTM28Text:
TX_FAR _ReceivedTM28Text
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _ReceivedTM28Text2
- db $0D, "@"
+ TX_WAIT
+ db "@"
TM28NoRoomText:
TX_FAR _TM28NoRoomText
@@ -356,13 +357,13 @@
CeruleanCityText7:
TX_ASM
ld a, [hRandomAdd]
- cp $b4
+ cp 180
jr c, .asm_e9fc9
ld hl, CeruleanCityText_19730
call PrintText
jr .asm_d486e
.asm_e9fc9
- cp $64
+ cp 100
jr c, .asm_df99b
ld hl, CeruleanCityText_19735
call PrintText
@@ -388,19 +389,19 @@
CeruleanCityText8:
TX_ASM
ld a, [hRandomAdd]
- cp $b4
+ cp 180
jr c, .asm_e28da
ld hl, CeruleanCityText_1976f
call PrintText
jr .asm_f2f38
.asm_e28da
- cp $78
+ cp 120
jr c, .asm_15d08
ld hl, CeruleanCityText_19774
call PrintText
jr .asm_f2f38
.asm_15d08
- cp $3c
+ cp 60
jr c, .asm_d7fea
ld hl, CeruleanCityText_19779
call PrintText
--- a/scripts/ceruleangym.asm
+++ b/scripts/ceruleangym.asm
@@ -150,7 +150,8 @@
CeruleanGymText6:
ReceivedTM11Text:
TX_FAR _ReceivedTM11Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
CeruleanGymText7:
TX_FAR _CeruleanGymText_5c7d3
@@ -158,7 +159,9 @@
CeruleanGymText_5c7d8:
TX_FAR _CeruleanGymText_5c7d8
- db $11, $6, "@"
+ TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
+ TX_BLINK
+ db "@"
CeruleanGymText2:
TX_ASM
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -233,8 +233,8 @@
BlaineEndBattleText:
TX_FAR _BlaineEndBattleText
- db $11
- db $d
+ TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
+ TX_WAIT
db "@"
BlaineFireBlastText:
@@ -247,7 +247,7 @@
ReceivedTM38Text:
TX_FAR _ReceivedTM38Text
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _TM38ExplanationText
db "@"
--- a/scripts/copycatshouse2f.asm
+++ b/scripts/copycatshouse2f.asm
@@ -53,10 +53,11 @@
ReceivedTM31Text:
TX_FAR _ReceivedTM31Text
- db $0B
+ TX_SFX_ITEM_1
TM31ExplanationText1:
TX_FAR _TM31ExplanationText1
- db $d, "@"
+ TX_WAIT
+ db "@"
TM31ExplanationText2:
TX_FAR _TM31ExplanationText2
@@ -64,7 +65,8 @@
TM31NoRoomText:
TX_FAR _TM31NoRoomText
- db $d, "@"
+ TX_WAIT
+ db "@"
CopycatsHouse2FText2:
TX_FAR _CopycatsHouse2FText2
--- a/scripts/fanclub.asm
+++ b/scripts/fanclub.asm
@@ -144,7 +144,7 @@
.receivedvouchertext
TX_FAR ReceivedBikeVoucherText
- db $11
+ TX_SFX_KEY_ITEM
TX_FAR ExplainBikeVoucherText
db "@"
--- a/scripts/fuchsiagym.asm
+++ b/scripts/fuchsiagym.asm
@@ -193,7 +193,7 @@
FuchsiaGymText10:
TX_FAR _ReceivedTM06Text
- db $11
+ TX_SFX_KEY_ITEM
TM06ExplanationText:
TX_FAR _TM06ExplanationText
--- a/scripts/fuchsiahouse2.asm
+++ b/scripts/fuchsiahouse2.asm
@@ -69,7 +69,7 @@
WardenTeethText1:
TX_FAR _WardenTeethText1
- db $0b
+ TX_SFX_ITEM_1
WardenTeethText2:
TX_FAR _WardenTeethText2
@@ -81,7 +81,8 @@
ReceivedHM04Text:
TX_FAR _ReceivedHM04Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
HM04ExplanationText:
TX_FAR _HM04ExplanationText
--- a/scripts/fuchsiahouse3.asm
+++ b/scripts/fuchsiahouse3.asm
@@ -49,7 +49,7 @@
FuchsiaHouse3Text_561c2:
TX_FAR _FuchsiaHouse3Text_561c2
- db $0B
+ TX_SFX_ITEM_1
db "@"
UnusedText_561c8:
--- a/scripts/lab3.asm
+++ b/scripts/lab3.asm
@@ -37,7 +37,8 @@
ReceivedTM35Text:
TX_FAR _ReceivedTM35Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM35ExplanationText:
TX_FAR _TM35ExplanationText
--- a/scripts/lavenderhouse1.asm
+++ b/scripts/lavenderhouse1.asm
@@ -95,7 +95,7 @@
ReceivedFluteText:
TX_FAR _ReceivedFluteText
- db $11
+ TX_SFX_KEY_ITEM
TX_FAR _FluteExplanationText
db "@"
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -323,7 +323,9 @@
MtMoon3Text_49f6f:
TX_FAR _MtMoon3Text_49f6f
- db $11, $d, "@"
+ TX_SFX_KEY_ITEM
+ TX_WAIT
+ db "@"
MtMoon3Script_49f76:
ld hl, MtMoon3Text_49f7f
@@ -332,7 +334,8 @@
MtMoon3Text_49f7f:
TX_FAR _MtMoon3Text_49f7f
- db $d, "@"
+ TX_WAIT
+ db "@"
MtMoon3Text_49f85:
TX_FAR _MtMoon3Text_49f85
@@ -352,7 +355,8 @@
MtMoon3Text_49f99:
TX_FAR _MtMoon3Text_49f99
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
MtMoon3BattleText2:
TX_FAR _MtMoon3BattleText2
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -215,7 +215,8 @@
ReceivedOldAmberText:
TX_FAR _ReceivedOldAmberText
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
Museum1FText_5c299:
TX_FAR _Museum1FText_5c299
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -149,7 +149,7 @@
PewterGymText5:
TX_FAR _ReceivedTM34Text
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _TM34ExplanationText
db "@"
@@ -159,7 +159,7 @@
PewterGymText_5c4bc:
TX_FAR _PewterGymText_5c4bc
- db $0B
+ TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded
TX_FAR _PewterGymText_5c4c1
db "@"
--- a/scripts/rockethideout1.asm
+++ b/scripts/rockethideout1.asm
@@ -130,7 +130,8 @@
ret
RocketHideout1Text_44c9f:
- db $6, "@"
+ TX_BLINK
+ db "@"
RocketHideout1BattleText2:
TX_FAR _RocketHideout1BattleText2
--- a/scripts/rockethideoutelevator.asm
+++ b/scripts/rockethideoutelevator.asm
@@ -81,4 +81,5 @@
RocketHideoutElevatorText_4578b:
TX_FAR _RocketElevatorText_4578b
- db $d, "@"
+ TX_WAIT
+ db "@"
--- a/scripts/route1.asm
+++ b/scripts/route1.asm
@@ -32,7 +32,8 @@
Route1Text_1cae8:
TX_FAR _Route1Text_1cae8
- db $0b,"@"
+ TX_SFX_ITEM_1
+ db "@"
Route1Text_1caee:
TX_FAR _Route1Text_1caee
--- a/scripts/route12gateupstairs.asm
+++ b/scripts/route12gateupstairs.asm
@@ -35,7 +35,8 @@
ReceivedTM39Text:
TX_FAR _ReceivedTM39Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM39ExplanationText:
TX_FAR _TM39ExplanationText
--- a/scripts/route12house.asm
+++ b/scripts/route12house.asm
@@ -40,7 +40,7 @@
Route12HouseText_564c5:
TX_FAR _Route12HouseText_564c5
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _Route12HouseText_564ca
db "@"
--- a/scripts/route16house.asm
+++ b/scripts/route16house.asm
@@ -30,7 +30,8 @@
ReceivedHM02Text:
TX_FAR _ReceivedHM02Text
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
HM02ExplanationText:
TX_FAR _HM02ExplanationText
--- a/scripts/route22gate.asm
+++ b/scripts/route22gate.asm
@@ -89,4 +89,5 @@
Route22GateText_1e71a:
TX_FAR _Route22GateText_1e71a
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -227,7 +227,7 @@
VictoryRoadGuardText2:
TX_FAR _VictoryRoadGuardText2
- db $b
+ TX_SFX_ITEM_1
TX_FAR _VictoryRoadGuardText_513a3
db "@"
--- a/scripts/route24.asm
+++ b/scripts/route24.asm
@@ -185,13 +185,15 @@
Route24Text_51510:
TX_FAR _Route24Text_51510
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _Route24Text_51515
db "@"
Route24Text_5151a:
TX_FAR _Route24Text_5151a
- db $0B, $6, "@"
+ TX_SFX_ITEM_1
+ TX_BLINK
+ db "@"
Route24Text_51521:
TX_FAR _Route24Text_51521
--- a/scripts/route5gate.asm
+++ b/scripts/route5gate.asm
@@ -106,7 +106,7 @@
Route6GateText3:
Route5GateText3:
TX_FAR _SaffronGateText_8aaa9
- db $11
+ TX_SFX_KEY_ITEM
TX_FAR _SaffronGateText_1dff1
db "@"
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -209,7 +209,7 @@
.MakePaymentText
TX_FAR SafariZoneEntranceText_9e747
- db $b
+ TX_SFX_ITEM_1
TX_FAR _SafariZoneEntranceText_75360
db "@"
--- a/scripts/safarizonesecrethouse.asm
+++ b/scripts/safarizonesecrethouse.asm
@@ -33,7 +33,8 @@
ReceivedHM03Text:
TX_FAR _ReceivedHM03Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
HM03ExplanationText:
TX_FAR _HM03ExplanationText
--- a/scripts/saffroncity.asm
+++ b/scripts/saffroncity.asm
@@ -74,7 +74,8 @@
SaffronCityText12:
TX_FAR _SaffronCityText12
- db $15, "@" ; play PIDGEOT cry from TextCommandSounds
+ TX_CRY_PIDGEOT
+ db "@"
SaffronCityText13:
TX_FAR _SaffronCityText13
--- a/scripts/saffrongym.asm
+++ b/scripts/saffrongym.asm
@@ -189,8 +189,8 @@
SaffronGymText_5d167:
TX_FAR _SaffronGymText_5d167
- db $11 ; play same sound as red giving oak parcel
- db $6 ; wait for keypress
+ TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
+ TX_BLINK
db "@"
SaffronGymText_5d16e:
@@ -203,7 +203,7 @@
SaffronGymText11:
TX_FAR ReceivedTM46Text
- db $b
+ TX_SFX_ITEM_1
TX_FAR _TM46ExplanationText
db "@"
--- a/scripts/saffronhouse2.asm
+++ b/scripts/saffronhouse2.asm
@@ -33,7 +33,8 @@
ReceivedTM29Text:
TX_FAR _ReceivedTM29Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM29ExplanationText:
TX_FAR _TM29ExplanationText
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -330,7 +330,8 @@
ReceivedSilphCoMasterBallText:
TX_FAR _ReceivedSilphCoMasterBallText
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
SilphCo10Text_6231c:
TX_FAR _SilphCo10Text_6231c
--- a/scripts/silphco2.asm
+++ b/scripts/silphco2.asm
@@ -162,7 +162,8 @@
ReceivedTM36Text:
TX_FAR _ReceivedTM36Text
- db $0B, "@"
+ TX_SFX_ITEM_1
+ db "@"
TM36ExplanationText:
TX_FAR _TM36ExplanationText
--- a/scripts/ssanne7.asm
+++ b/scripts/ssanne7.asm
@@ -73,7 +73,8 @@
ReceivedHM01Text:
TX_FAR _ReceivedHM01Text
- db $11, "@"
+ TX_SFX_KEY_ITEM
+ db "@"
SSAnne7Text_61932:
TX_FAR _SSAnne7Text_61932
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -179,7 +179,7 @@
VermilionGymText7:
TX_FAR _ReceivedTM24Text
- db $11
+ TX_SFX_KEY_ITEM
TX_FAR _TM24ExplanationText
db "@"
--- a/scripts/vermilionhouse2.asm
+++ b/scripts/vermilionhouse2.asm
@@ -40,7 +40,7 @@
VermilionHouse2Text_560b6:
TX_FAR _VermilionHouse2Text_560b6
- db $0B
+ TX_SFX_ITEM_1
TX_FAR _VermilionHouse2Text_560bb
db "@"
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -258,7 +258,8 @@
ReceivedTM42Text:
TX_FAR _ReceivedTM42Text
- db $10, "@"
+ TX_SFX_ITEM_2
+ db "@"
TM42Explanation:
TX_FAR _TM42Explanation
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -307,11 +307,13 @@
ViridianGymText_74ad3:
TX_FAR _ViridianGymText_74ad3
- db $0b, "@"
+ TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded
+ db "@"
ViridianGymText_74ad9:
TX_FAR _ViridianGymText_74ad9
- db $0d, "@"
+ TX_WAIT
+ db "@"
ViridianGymText12:
TX_FAR _ViridianGymText12
@@ -319,7 +321,7 @@
ViridianGymText13:
TX_FAR _ReceivedTM27Text
- db $0b
+ TX_SFX_ITEM_1
TM27ExplanationText:
TX_FAR _TM27ExplanationText
--- a/scripts/viridianmart.asm
+++ b/scripts/viridianmart.asm
@@ -81,7 +81,7 @@
ViridianMartText5:
TX_FAR ViridianMartParcelQuestText
- db $11
+ TX_SFX_KEY_ITEM
db "@"
ViridianMartText2: