Implement handy text macros from yellow

This commit is contained in:
pikalaxalt 2016-06-09 21:20:02 -04:00
parent 8b3f9b244d
commit d8dae96f35
17 changed files with 70 additions and 56 deletions

View file

@ -11,7 +11,7 @@ OpenRedsPC: ; 5db86 (17:5b86)
tx_pre_jump RedBedroomPCText
RedBedroomPCText: ; 5db8e (17:5b8e)
db $fc ; FuncTX_ItemStoragePC
TX_PLAYERS_PC
Route15GateLeftBinoculars: ; 5db8f (17:5b8f)
ld a, [wSpriteStateData1 + 9]

View file

@ -195,4 +195,4 @@ OpenPokemonCenterPC: ; 62516 (18:6516)
tx_pre_jump PokemonCenterPCText
PokemonCenterPCText: ; 62529 (18:6529)
db $F9 ; FuncTX_PokemonCenterPC
TX_POKECENTER_PC

View file

@ -205,15 +205,13 @@ TX_RAM: MACRO
ENDM
TX_BCD: MACRO
; \1: RAM address to read from
; \2: number of bytes + print flags
db $2
dw \1
db \2
ENDM
TX_ASM: MACRO
db $08
ENDM
TX_MART: MACRO
db $FE, _NARG
rept _NARG
@ -223,6 +221,22 @@ TX_MART: MACRO
db $FF
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_VENDING_MACHINE EQUS "db $f5"
TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6"
TX_PRIZE_VENDOR EQUS "db $f7"
TX_POKECENTER_PC EQUS "db $f9"
TX_PLAYERS_PC EQUS "db $fc"
TX_BILLS_PC EQUS "db $fd"
TX_POKECENTER_NURSE EQUS "db $ff"
; Predef macro.
add_predef: MACRO
\1Predef::
@ -263,14 +277,6 @@ tx_pre_jump: MACRO
jp PrintPredefTextID
ENDM
TX_SFX_KEY_ITEM: macro
db $11
endm
TX_CONGRATSSFX: macro
db $10
endm
WALK EQU $FE
STAY EQU $FF
@ -309,6 +315,10 @@ object: MACRO
ENDC
ENDM
StopAllMusic: macro
ld a, $ff
call PlaySound
endm
;1_channel EQU $00
;2_channels EQU $40

View file

@ -122,7 +122,7 @@ BillsHouseTextPointers: ; 1e834 (7:6834)
dw BillsHouseText4
BillsHouseText4: ; 1e83c (7:683c)
db $fd
TX_BILLS_PC
BillsHouseText1: ; 1e83d (7:683d)
TX_ASM
@ -191,7 +191,9 @@ BillThankYouText: ; 1e8ba (7:68ba)
SSTicketReceivedText: ; 1e8bf (7:68bf)
TX_FAR _SSTicketReceivedText
db $11, $6, "@"
TX_SFX_KEY_ITEM
TX_BUTTON_SOUND
db "@"
SSTicketNoRoomText: ; 1e8c6 (7:68c6)
TX_FAR _SSTicketNoRoomText

View file

@ -267,7 +267,8 @@ CeladonGameCornerText_48d9c: ; 48d9c (12:4d9c)
Received10CoinsText: ; 48da1 (12:4da1)
TX_FAR _Received10CoinsText
db $0B, "@"
TX_SFX_ITEM
db "@"
CeladonGameCornerText_48da7: ; 48da7 (12:4da7)
TX_FAR _CeladonGameCornerText_48da7
@ -344,7 +345,8 @@ CeladonGameCornerText_48e26: ; 48e26 (12:4e26)
Received20CoinsText: ; 48e2b (12:4e2b)
TX_FAR _Received20CoinsText
db $0B, "@"
TX_SFX_ITEM
db "@"
CeladonGameCornerText_48e31: ; 48e31 (12:4e31)
TX_FAR _CeladonGameCornerText_48e31
@ -395,7 +397,8 @@ CeladonGameCornerText_48e88: ; 48e88 (12:4e88)
CeladonGameCornerText_48e8d: ; 48e8d (12:4e8d)
TX_FAR _CeladonGameCornerText_48e8d
db $0B, "@"
TX_SFX_ITEM
db "@"
CeladonGameCornerText_48e93: ; 48e93 (12:4e93)
TX_FAR _CeladonGameCornerText_48e93

View file

@ -139,48 +139,48 @@ CeladonMartRoofText_484ee:
CeladonMartRoofText_484f3:
TX_FAR _CeladonMartRoofText_484f3
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_484f9:
TX_FAR _CeladonMartRoofText_484f9
db $0b
TX_SFX_ITEM
TX_FAR _CeladonMartRoofText_484fe
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_48504:
TX_FAR _CeladonMartRoofText_48504
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_4850a:
TX_FAR _CeladonMartRoofText_4850a
db $0b
TX_SFX_ITEM
TX_FAR _CeladonMartRoofText_4850f
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_48515:
TX_FAR _CeladonMartRoofText_48515
db $0d
TX_WAIT_BUTTON
db "@"
ReceivedTM49Text:
TX_FAR _ReceivedTM49Text
db $0b
TX_SFX_ITEM
TX_FAR _CeladonMartRoofText_48520
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_48526:
TX_FAR _CeladonMartRoofText_48526
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofText_4852c:
TX_FAR _CeladonMartRoofText_4852c
db $0d
TX_WAIT_BUTTON
db "@"
CeladonMartRoofScript_PrintDrinksInBag:
@ -248,7 +248,7 @@ CeladonMartRoofText4:
db "@"
CeladonMartRoofText5:
db $f5
TX_VENDING_MACHINE
CeladonMartRoofText6:
TX_FAR _CeladonMartRoofText6

View file

@ -9,10 +9,10 @@ CeladonPokecenterTextPointers:
dw CeladonTradeNurseText
CeladonTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST
CeladonHealNurseText:
db $ff
TX_POKECENTER_NURSE
CeladonPokecenterText2:
TX_FAR _CeladonPokecenterText2

View file

@ -17,4 +17,4 @@ CeladonPrizeRoomText2: ; 49102 (12:5102)
db "@"
CeladonPrizeRoomText3: ; 49107 (12:5107)
db $f7
TX_PRIZE_VENDOR

View file

@ -9,10 +9,10 @@ CeruleanPokecenterTextPointers:
dw CeruleanTradeNurseText
CeruleanTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST
CeruleanHealNurseText:
db $ff
TX_POKECENTER_NURSE
CeruleanPokecenterText2:
TX_FAR _CeruleanPokecenterText2

View file

@ -9,7 +9,7 @@ CinnabarPokecenterTextPointers:
dw CinnabarTradeNurseText
CinnabarHealNurseText:
db $ff
TX_POKECENTER_NURSE
CinnabarPokecenterText2:
TX_FAR _CinnabarPokecenterText2
@ -20,4 +20,4 @@ CinnabarPokecenterText3:
db "@"
CinnabarTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -9,7 +9,7 @@ FuchsiaPokecenterTextPointers:
dw FuchsiaTradeNurseText
FuchsiaHealNurseText:
db $ff
TX_POKECENTER_NURSE
FuchsiaPokecenterText2:
TX_FAR _FuchsiaPokecenterText1
@ -20,4 +20,4 @@ FuchsiaPokecenterText3:
db "@"
FuchsiaTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -22,7 +22,7 @@ IndigoPlateauLobbyTextPointers:
dw IndigoTradeNurseText
IndigoHealNurseText:
db $ff
TX_POKECENTER_NURSE
IndigoPlateauLobbyText2:
TX_FAR _IndigoPlateauLobbyText2
@ -33,4 +33,4 @@ IndigoPlateauLobbyText3:
db "@"
IndigoTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -9,10 +9,10 @@ LavenderPokecenterTextPointers:
dw LavenderTradeNurseText
LavenderTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST
LavenderHealNurseText:
db $ff
TX_POKECENTER_NURSE
LavenderPokecenterText2:
TX_FAR _LavenderPokecenterText2

View file

@ -9,7 +9,7 @@ PewterPokecenterTextPointers:
dw PewterTradeNurseText
PewterHealNurseText:
db $ff
TX_POKECENTER_NURSE
PewterPokecenterText2:
TX_FAR _PewterPokecenterText2
@ -21,8 +21,7 @@ PewterJigglypuffText:
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text
call PrintText
ld a, $ff
call PlaySound
StopAllMusic
ld c, 32
call DelayFrames
ld hl, JigglypuffFacingDirections
@ -30,7 +29,7 @@ PewterJigglypuffText:
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
call CopyData
ld a, [wSpriteStateData1 + 3 * $10 + $2]
ld a, [Sprite03SpriteImageIdx]
ld hl, wJigglypuffFacingDirections
.findMatchingFacingDirectionLoop
cp [hl]
@ -44,7 +43,7 @@ PewterJigglypuffText:
pop hl
.loop
ld a, [hl]
ld [wSpriteStateData1 + 3 * $10 + $2], a
ld [Sprite03SpriteImageIdx], a
; rotate the array
push hl
@ -82,4 +81,4 @@ JigglypuffFacingDirections:
JigglypuffFacingDirectionsEnd:
PewterTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -9,7 +9,7 @@ SaffronPokecenterTextPointers:
dw SaffronTradeNurseText
SaffronHealNurseText:
db $ff
TX_POKECENTER_NURSE
SaffronPokecenterText2:
TX_FAR _SaffronPokecenterText2
@ -20,4 +20,4 @@ SaffronPokecenterText3:
db "@"
SaffronTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -9,7 +9,7 @@ VermilionPokecenterTextPointers:
dw VermilionTradeNurseText
VermilionHealNurseText:
db $ff
TX_POKECENTER_NURSE
VermilionPokecenterText2:
TX_FAR _VermilionPokecenterText2
@ -20,4 +20,4 @@ VermilionPokecenterText3:
db "@"
VermilionTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST

View file

@ -9,7 +9,7 @@ ViridianPokecenterTextPointers:
dw ViridianTradeNurseText
ViridianHealNurseText:
db $ff
TX_POKECENTER_NURSE
ViridianPokeCenterText2:
TX_FAR _ViridianPokeCenterText2
@ -20,4 +20,4 @@ ViridianPokeCenterText3:
db "@"
ViridianTradeNurseText:
db $f6
TX_CABLE_CLUB_RECEPTIONIST