Start using text predef macros

also sprite direction constants
This commit is contained in:
dannye 2015-07-04 00:44:12 -05:00
parent bc6f0bc08a
commit f702fc7840
36 changed files with 225 additions and 219 deletions

View file

@ -233,10 +233,10 @@ ViridianPokecenterHiddenObjects: ; 46b93 (11:6b93)
ViridianMartHiddenObjects: ; 46ba0 (11:6ba0) ViridianMartHiddenObjects: ; 46ba0 (11:6ba0)
db $FF db $FF
ViridianSchoolHiddenObjects: ; 46ba1 (11:6ba1) ViridianSchoolHiddenObjects: ; 46ba1 (11:6ba1)
db $04,$03,$20 ; ViridianSchoolNotebook db $04,$03,(ViridianSchoolNotebook_id - TextPredefs) / 2 + 1
db Bank(PrintNotebookText) db Bank(PrintNotebookText)
dw PrintNotebookText dw PrintNotebookText
db $00,$03,$21 ; ViridianSchoolBlackboard db $00,$03,(ViridianSchoolBlackboard_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText) db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText dw PrintBlackboardLinkCableText
db $FF db $FF
@ -743,13 +743,13 @@ LavenderHouse1HiddenObjects: ; 46fc2 (11:6fc2)
dw PrintMagazinesText dw PrintMagazinesText
db $FF db $FF
CeladonMansion5HiddenObjects: ; 46fd5 (11:6fd5) CeladonMansion5HiddenObjects: ; 46fd5 (11:6fd5)
db $00,$03,$34 ; LinkCableHelp db $00,$03,(LinkCableHelp_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText) db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText dw PrintBlackboardLinkCableText
db $00,$04,$34 ; LinkCableHelp db $00,$04,(LinkCableHelp_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText) db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText dw PrintBlackboardLinkCableText
db $04,$03,$35 ; TMNotebook db $04,$03,(TMNotebook_id - TextPredefs) / 2 + 1
db Bank(PrintNotebookText) db Bank(PrintNotebookText)
dw PrintNotebookText dw PrintNotebookText
db $FF db $FF

View file

@ -27,13 +27,13 @@ StartSlotMachine: ; 37e2d (d:7e2d)
call PromptUserToPlaySlots call PromptUserToPlaySlots
ret ret
.printOutOfOrder .printOutOfOrder
ld a, $28 tx_pre_id GameCornerOutOfOrderText
jr .printText jr .printText
.printOutToLunch .printOutToLunch
ld a, $29 tx_pre_id GameCornerOutToLunchText
jr .printText jr .printText
.printSomeonesKeys .printSomeonesKeys
ld a, $2a tx_pre_id GameCornerSomeonesKeysText
.printText .printText
push af push af
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing

View file

@ -6,13 +6,13 @@ AbleToPlaySlotsCheck ; 2ff09 (b:7f09)
predef IsItemInBag_ ; IsItemInBag_ predef IsItemInBag_ ; IsItemInBag_
ld a, b ld a, b
and a and a
ld b, $33 ; GameCornerCoinCaseText ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
jr z, .printCoinCaseRequired jr z, .printCoinCaseRequired
ld hl, wPlayerCoins ld hl, wPlayerCoins
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .done ; able to play jr nz, .done ; able to play
ld b, $32 ; GameCornerNoCoinsText ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
.printCoinCaseRequired .printCoinCaseRequired
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, b ld a, b

View file

@ -66,8 +66,7 @@ ViridianSchoolNotebookText4: ; 52a03 (14:6a03)
PrintFightingDojoText2: ; 52a08 (14:6a08) PrintFightingDojoText2: ; 52a08 (14:6a08)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $37 tx_pre_jump FightingDojoText_52a10
jp PrintPredefTextID
FightingDojoText_52a10: ; 52a10 (14:6a10) FightingDojoText_52a10: ; 52a10 (14:6a10)
TX_FAR _FightingDojoText_52a10 TX_FAR _FightingDojoText_52a10
@ -75,8 +74,7 @@ FightingDojoText_52a10: ; 52a10 (14:6a10)
PrintFightingDojoText3: ; 52a15 (14:6a15) PrintFightingDojoText3: ; 52a15 (14:6a15)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $38 tx_pre_jump FightingDojoText_52a1d
jp PrintPredefTextID
FightingDojoText_52a1d: ; 52a1d (14:6a1d) FightingDojoText_52a1d: ; 52a1d (14:6a1d)
TX_FAR _FightingDojoText_52a1d TX_FAR _FightingDojoText_52a1d
@ -84,8 +82,7 @@ FightingDojoText_52a1d: ; 52a1d (14:6a1d)
PrintFightingDojoText: ; 52a22 (14:6a22) PrintFightingDojoText: ; 52a22 (14:6a22)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $36 tx_pre_jump FightingDojoText
jp PrintPredefTextID
FightingDojoText: ; 52a2a (14:6a2a) FightingDojoText: ; 52a2a (14:6a2a)
TX_FAR _FightingDojoText TX_FAR _FightingDojoText
@ -93,11 +90,10 @@ FightingDojoText: ; 52a2a (14:6a2a)
PrintIndigoPlateauHQText: ; 52a2f (14:6a2f) PrintIndigoPlateauHQText: ; 52a2f (14:6a2f)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $27 tx_pre_jump IndigoPlateauHQText
jp PrintPredefTextID
IndigoPlateauHQText: ; 52a3d (14:6a3d) IndigoPlateauHQText: ; 52a3d (14:6a3d)
TX_FAR _IndigoPlateauHQText TX_FAR _IndigoPlateauHQText

View file

@ -1,7 +1,6 @@
PrintRedsNESText: ; 5db79 (17:5b79) PrintRedsNESText: ; 5db79 (17:5b79)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $4 ; RedBedroomSNESText tx_pre_jump RedBedroomSNESText
jp PrintPredefTextID
RedBedroomSNESText: ; 5db81 (17:5b81) RedBedroomSNESText: ; 5db81 (17:5b81)
TX_FAR _RedBedroomSNESText TX_FAR _RedBedroomSNESText
@ -9,19 +8,17 @@ RedBedroomSNESText: ; 5db81 (17:5b81)
OpenRedsPC: ; 5db86 (17:5b86) OpenRedsPC: ; 5db86 (17:5b86)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $3 tx_pre_jump RedBedroomPCText
jp PrintPredefTextID
RedBedroomPC: ; 5db8e (17:5b8e) RedBedroomPCText: ; 5db8e (17:5b8e)
db $fc ; FuncTX_ItemStoragePC db $fc ; FuncTX_ItemStoragePC
Route15GateLeftBinoculars: ; 5db8f (17:5b8f) Route15GateLeftBinoculars: ; 5db8f (17:5b8f)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 ; i cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $a ; text id Route15UpstairsBinocularsText tx_pre Route15UpstairsBinocularsText
call PrintPredefTextID
ld a, ARTICUNO ld a, ARTICUNO
ld [wcf91], a ld [wcf91], a
call PlayCry call PlayCry
@ -36,8 +33,7 @@ AerodactylFossil: ; 5dbad (17:5bad)
ld [wcf91], a ld [wcf91], a
call DisplayMonFrontSpriteInBox call DisplayMonFrontSpriteInBox
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $9 tx_pre AerodactylFossilText
call PrintPredefTextID
ret ret
AerodactylFossilText: ; 5dbbe (17:5bbe) AerodactylFossilText: ; 5dbbe (17:5bbe)
@ -49,8 +45,7 @@ KabutopsFossil: ; 5bdc3 (17:5bc3)
ld [wcf91], a ld [wcf91], a
call DisplayMonFrontSpriteInBox call DisplayMonFrontSpriteInBox
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $b tx_pre KabutopsFossilText
call PrintPredefTextID
ret ret
KabutopsFossilText: ; 5dbd4 (17:5bd4) KabutopsFossilText: ; 5dbd4 (17:5bd4)
@ -307,8 +302,7 @@ ViridianBlackboardFrozenText: ; 5ddea (17:5dea)
PrintTrashText: ; 5ddef (17:5def) PrintTrashText: ; 5ddef (17:5def)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $26 tx_pre_jump VermilionGymTrashText
jp PrintPredefTextID
VermilionGymTrashText: ; 5ddf7 (17:5df7) VermilionGymTrashText: ; 5ddf7 (17:5df7)
TX_FAR _VermilionGymTrashText TX_FAR _VermilionGymTrashText
@ -324,8 +318,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
bit 0, a bit 0, a
jr z, .ok jr z, .ok
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash) tx_pre_jump VermilionGymTrashText
jp PrintPredefTextID
.ok .ok
bit 1, a bit 1, a
@ -337,7 +330,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
cp b cp b
jr z, .openFirstLock jr z, .openFirstLock
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash) tx_pre_id VermilionGymTrashText
jr .done jr .done
.openFirstLock .openFirstLock
@ -375,7 +368,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
and $f and $f
ld [wd744], a ld [wd744], a
ld a, $3b ; DisplayTextID $3b = VermilionGymTrashSuccesText1 (first lock opened!) tx_pre_id VermilionGymTrashSuccesText1
jr .done jr .done
.trySecondLock .trySecondLock
@ -393,7 +386,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
and $e and $e
ld [wd743], a ld [wd743], a
ld a, $3e ; DisplayTextID $3e = VermilionGymTrashFailText (locks reset!) tx_pre_id VermilionGymTrashFailText
jr .done jr .done
.openSecondLock .openSecondLock
@ -403,7 +396,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
ld hl, wd126 ld hl, wd126
set 6, [hl] set 6, [hl]
ld a, $3d ; DisplayTextID $3d = VermilionGymTrashSuccesText3 (2nd lock opened!) tx_pre_id VermilionGymTrashSuccesText3
.done .done
jp PrintPredefTextID jp PrintPredefTextID

View file

@ -1,31 +1,31 @@
GymStatues: ; 62419 (18:6419) GymStatues: ; 62419 (18:6419)
; if in a gym and have the corresponding badge, a = $D and jp PrintPredefTextID ; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
; if in a gym and dont have the corresponding badge, a = $C and jp PrintPredefTextID ; if in a gym and dont have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
; else ret ; else ret
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
ld hl, .BadgeFlags ld hl, .BadgeFlags
ld a, [W_CURMAP] ld a, [W_CURMAP]
ld b, a ld b, a
.asm_62429 .loop
ld a, [hli] ld a, [hli]
cp $ff cp $ff
ret z ret z
cp b cp b
jr z, .asm_62433 jr z, .match
inc hl inc hl
jr .asm_62429 jr .loop
.asm_62433 .match
ld b, [hl] ld b, [hl]
ld a, [wd72a] ld a, [wd72a]
and b and b
cp b cp b
ld a, $d tx_pre_id GymStatueText2
jr z, .asm_6243f jr z, .haveBadge
ld a, $c tx_pre_id GymStatueText1
.asm_6243f .haveBadge
jp PrintPredefTextID jp PrintPredefTextID
.BadgeFlags: ; 62442 (18:6442) .BadgeFlags: ; 62442 (18:6442)
@ -49,41 +49,53 @@ GymStatueText2: ; 62458 (18:6458)
PrintBenchGuyText: ; 6245d (18:645d) PrintBenchGuyText: ; 6245d (18:645d)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld hl, PokeCenterMapIDList ld hl, BenchGuyTextPointers
ld a, [W_CURMAP] ld a, [W_CURMAP]
ld b, a ld b, a
.asm_62467 .loop
ld a, [hli] ld a, [hli]
cp $ff cp $ff
ret z ret z
cp b cp b
jr z, .asm_62472 jr z, .match
inc hl inc hl
inc hl inc hl
jr .asm_62467 jr .loop
.asm_62472 .match
ld a, [hli] ld a, [hli]
ld b, a ld b, a
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp b cp b
jr nz, .asm_62467 jr nz, .loop ; player isn't facing left at the bench guy
ld a, [hl] ld a, [hl]
jp PrintPredefTextID jp PrintPredefTextID
; format: db map id, 08, text id of PredefTextIDPointerTable ; format: db map id, player sprite facing direction, text id of PredefTextIDPointerTable
PokeCenterMapIDList: ; 6247e (18:647e) BenchGuyTextPointers: ; 6247e (18:647e)
db VIRIDIAN_POKECENTER,$08,$0F db VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT
db PEWTER_POKECENTER,$08,$10 db (ViridianCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db CERULEAN_POKECENTER,$08,$11 db PEWTER_POKECENTER, SPRITE_FACING_LEFT
db LAVENDER_POKECENTER,$08,$12 db (PewterCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db VERMILION_POKECENTER,$08,$13 db CERULEAN_POKECENTER, SPRITE_FACING_LEFT
db CELADON_POKECENTER,$08,$14 db (CeruleanCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db CELADON_HOTEL,$08,$15 db LAVENDER_POKECENTER, SPRITE_FACING_LEFT
db FUCHSIA_POKECENTER,$08,$16 db (LavenderCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db CINNABAR_POKECENTER,$08,$17 db VERMILION_POKECENTER, SPRITE_FACING_LEFT
db SAFFRON_POKECENTER,$08,$18 db (VermilionCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db MT_MOON_POKECENTER,$08,$19 db CELADON_POKECENTER, SPRITE_FACING_LEFT
db ROCK_TUNNEL_POKECENTER,$08,$1A db (CeladonCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db CELADON_HOTEL, SPRITE_FACING_LEFT
db (CeladonCityHotelText_id - TextPredefs) / 2 + 1
db FUCHSIA_POKECENTER, SPRITE_FACING_LEFT
db (FuchsiaCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db CINNABAR_POKECENTER, SPRITE_FACING_LEFT
db (CinnabarIslandPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db SAFFRON_POKECENTER, SPRITE_FACING_LEFT
db (SaffronCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db MT_MOON_POKECENTER, SPRITE_FACING_LEFT
db (MtMoonPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db ROCK_TUNNEL_POKECENTER,SPRITE_FACING_LEFT
db (RockTunnelPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db $FF db $FF
ViridianCityPokecenterBenchGuyText: ; 624a3 (18:64a3) ViridianCityPokecenterBenchGuyText: ; 624a3 (18:64a3)
@ -163,13 +175,12 @@ CeladonCityHotelText: ; 62502 (18:6502)
ret ret
TerminatorText_62508: ; 62508 (18:6508) UnusedPredefText: ; 62508 (18:6508)
db "@" db "@"
PrintBookcaseText: ; 6509 (18:6509) PrintBookcaseText: ; 6509 (18:6509)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $e ; BookcaseText tx_pre_jump BookcaseText
jp PrintPredefTextID
BookcaseText: ; 62511 (18:6511) BookcaseText: ; 62511 (18:6511)
TX_FAR _BookcaseText TX_FAR _BookcaseText
@ -177,13 +188,12 @@ BookcaseText: ; 62511 (18:6511)
OpenPokemonCenterPC: ; 62516 (18:6516) OpenPokemonCenterPC: ; 62516 (18:6516)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 ; check to see if player is facing up cp SPRITE_FACING_UP ; check to see if player is facing up
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $1 ld a, $1
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
ld a, $1f ; PredefText1f tx_pre_jump PokemonCenterPCText
jp PrintPredefTextID
PredefText1f: ; 62529 (18:6529) PokemonCenterPCText: ; 62529 (18:6529)
db $F9 ; FuncTX_PokemonCenterPC db $F9 ; FuncTX_PokemonCenterPC

View file

@ -40,23 +40,40 @@ PrintBookshelfText: ; fb50 (3:7b50)
; format: db tileset id, bookshelf tile id, text id ; format: db tileset id, bookshelf tile id, text id
BookshelfTileIDs: ; fb8b (3:7b8b) BookshelfTileIDs: ; fb8b (3:7b8b)
db PLATEAU, $30, $3A db PLATEAU, $30
db HOUSE, $3D, $3F db (IndigoPlateauStatues_id - TextPredefs) / 2 + 1
db HOUSE, $1E, $40 db HOUSE, $3D
db MANSION, $32, $40 db (TownMapText_id - TextPredefs) / 2 + 1
db REDS_HOUSE_1, $32, $40 db HOUSE, $1E
db LAB, $28, $40 db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db LOBBY, $16, $41 db MANSION, $32
db GYM, $1D, $40 db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db DOJO, $1D, $40 db REDS_HOUSE_1, $32
db GATE, $22, $40 db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db MART, $54, $42 db LAB, $28
db MART, $55, $42 db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db POKECENTER, $54, $42 db LOBBY, $16
db POKECENTER, $55, $42 db (ElevatorText_id - TextPredefs) / 2 + 1
db LOBBY, $50, $42 db GYM, $1D
db LOBBY, $52, $42 db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db SHIP, $36, $40 db DOJO, $1D
db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db GATE, $22
db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db MART, $54
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db MART, $55
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db POKECENTER, $54
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db POKECENTER, $55
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db LOBBY, $50
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db LOBBY, $52
db (PokemonStuffText_id - TextPredefs) / 2 + 1
db SHIP, $36
db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db $FF db $FF
IndigoPlateauStatues: ; fbbf (3:7bbf) IndigoPlateauStatues: ; fbbf (3:7bbf)

View file

@ -1,7 +1,6 @@
PrintNewBikeText: ; 1e94b (7:694b) PrintNewBikeText: ; 1e94b (7:694b)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $39 tx_pre_jump NewBicycleText
jp PrintPredefTextID
NewBicycleText: ; 1e953 (7:6953) NewBicycleText: ; 1e953 (7:6953)
TX_FAR _NewBicycleText TX_FAR _NewBicycleText
@ -9,8 +8,7 @@ NewBicycleText: ; 1e953 (7:6953)
DisplayOakLabLeftPoster: ; 1e958 (7:6958) DisplayOakLabLeftPoster: ; 1e958 (7:6958)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $05 ; PushStartText tx_pre_jump PushStartText
jp PrintPredefTextID
PushStartText: ; 1e960 (7:6960) PushStartText: ; 1e960 (7:6960)
TX_FAR _PushStartText TX_FAR _PushStartText
@ -23,10 +21,10 @@ DisplayOakLabRightPoster: ; 1e965 (7:6965)
call CountSetBits call CountSetBits
ld a, [wd11e] ld a, [wd11e]
cp $2 cp $2
ld a, $6 ; SaveOptionText tx_pre_id SaveOptionText
jr c, .asm_1e97b jr c, .ownThreeOrMoreMon
ld a, $7 ; StrengthsAndWeaknessesText tx_pre_id StrengthsAndWeaknessesText
.asm_1e97b .ownThreeOrMoreMon
jp PrintPredefTextID jp PrintPredefTextID
SaveOptionText: ; 1e97e (7:697e) SaveOptionText: ; 1e97e (7:697e)
@ -120,11 +118,10 @@ GameOverText: ; 1ea12 (7:6a12)
PrintCinnabarQuiz: ; 1ea17 (7:6a17) PrintCinnabarQuiz: ; 1ea17 (7:6a17)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $31 tx_pre_jump CinnabarGymQuiz
jp PrintPredefTextID
CinnabarGymQuiz: ; 1ea25 (7:6a25) CinnabarGymQuiz: ; 1ea25 (7:6a25)
TX_ASM TX_ASM
@ -309,8 +306,7 @@ CinnabarGymGateCoords: ; 1eb48 (7:6b48)
PrintMagazinesText: ; 1eb60 (7:6b60) PrintMagazinesText: ; 1eb60 (7:6b60)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $30 tx_pre MagazinesText
call PrintPredefTextID
ret ret
MagazinesText: ; 1eb69 (7:6b69) MagazinesText: ; 1eb69 (7:6b69)
@ -320,7 +316,7 @@ MagazinesText: ; 1eb69 (7:6b69)
BillsHousePC: ; 1eb6e (7:6b6e) BillsHousePC: ; 1eb6e (7:6b6e)
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
ld a, [wd7f2] ld a, [wd7f2]
bit 7, a bit 7, a
@ -330,13 +326,11 @@ BillsHousePC: ; 1eb6e (7:6b6e)
bit 6, a bit 6, a
jr nz, .asm_1eb8b jr nz, .asm_1eb8b
.asm_1eb86 .asm_1eb86
ld a, $2d tx_pre_jump BillsHouseMonitorText
jp PrintPredefTextID
.asm_1eb8b .asm_1eb8b
ld a, $1 ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $2e tx_pre BillsHouseInitiatedText
call PrintPredefTextID
ld c, 32 ld c, 32
call DelayFrames call DelayFrames
ld a, (SFX_02_3c - SFX_Headers_02) / 3 ld a, (SFX_02_3c - SFX_Headers_02) / 3
@ -364,8 +358,7 @@ BillsHousePC: ; 1eb6e (7:6b6e)
.asm_1ebd2 .asm_1ebd2
ld a, $1 ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $2f tx_pre BillsHousePokemonList
call PrintPredefTextID
ret ret
BillsHouseMonitorText: ; 1ebdd (7:6bdd) BillsHouseMonitorText: ; 1ebdd (7:6bdd)
@ -459,11 +452,10 @@ BillsHousePokemonListText2: ; 1ecaa (7:6caa)
DisplayOakLabEmailText: ; 1ecaf (7:6caf) DisplayOakLabEmailText: ; 1ecaf (7:6caf)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $8 ; OakLabEmailText tx_pre_jump OakLabEmailText
jp PrintPredefTextID
OakLabEmailText: ; 1ecbd (7:6cbd) OakLabEmailText: ; 1ecbd (7:6cbd)
TX_FAR _OakLabEmailText TX_FAR _OakLabEmailText

View file

@ -523,8 +523,7 @@ CableClubLeftGameboy:: ; 5824 (8:5825)
.asm_2183a .asm_2183a
ld [wLinkState], a ld [wLinkState], a
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $22 ; JustAMomentText tx_pre_jump JustAMomentText
jp PrintPredefTextID
CableClubRightGameboy:: ; 5845 (8:5845) CableClubRightGameboy:: ; 5845 (8:5845)
ld a, [hSerialConnectionStatus] ld a, [hSerialConnectionStatus]
@ -541,8 +540,7 @@ CableClubRightGameboy:: ; 5845 (8:5845)
.asm_2185a .asm_2185a
ld [wLinkState], a ld [wLinkState], a
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $22 ; JustAMomentText tx_pre_jump JustAMomentText
jp PrintPredefTextID
JustAMomentText:: ; 21865 (8:5865) JustAMomentText:: ; 21865 (8:5865)
TX_FAR _JustAMomentText TX_FAR _JustAMomentText
@ -552,9 +550,8 @@ JustAMomentText:: ; 21865 (8:5865)
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $23 tx_pre_jump OpenBillsPCText
jp PrintPredefTextID
PredefText23:: ; 21878 (8:5878) OpenBillsPCText:: ; 21878 (8:5878)
db $FD ; FuncTX_BillsPC db $FD ; FuncTX_BillsPC

View file

@ -27,7 +27,7 @@ PrintCardKeyText: ; 52673 (14:6673)
jr z, .noCardKey jr z, .noCardKey
call GetCoordsInFrontOfPlayer call GetCoordsInFrontOfPlayer
push de push de
ld a, $1 tx_pre_id CardKeySuccessText
ld [H_DOWNARROWBLINKCNT2], a ld [H_DOWNARROWBLINKCNT2], a
call PrintPredefTextID call PrintPredefTextID
pop de pop de
@ -54,7 +54,7 @@ PrintCardKeyText: ; 52673 (14:6673)
ld a, (SFX_1f_57 - SFX_Headers_1f) / 3 ld a, (SFX_1f_57 - SFX_Headers_1f) / 3
jp PlaySound jp PlaySound
.noCardKey .noCardKey
ld a, $2 tx_pre_id CardKeyFailText
ld [H_DOWNARROWBLINKCNT2], a ld [H_DOWNARROWBLINKCNT2], a
jp PrintPredefTextID jp PrintPredefTextID

View file

@ -185,26 +185,26 @@ Func_f09f: ; f09f (3:709f)
add hl, bc add hl, bc
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
and a and a
jr z, .asm_f0c7 jr z, .down
cp $4 cp SPRITE_FACING_UP
jr z, .asm_f0cf jr z, .up
cp $8 cp SPRITE_FACING_LEFT
jr z, .asm_f0d7 jr z, .left
ld a, [W_XBLOCKCOORD] ld a, [W_XBLOCKCOORD]
and a and a
jr z, .asm_f0e0 jr z, .asm_f0e0
jr .asm_f0ec jr .asm_f0ec
.asm_f0c7 .down
ld a, [W_YBLOCKCOORD] ld a, [W_YBLOCKCOORD]
and a and a
jr z, .asm_f0e0 jr z, .asm_f0e0
jr .asm_f0df jr .asm_f0df
.asm_f0cf .up
ld a, [W_YBLOCKCOORD] ld a, [W_YBLOCKCOORD]
and a and a
jr z, .asm_f0e1 jr z, .asm_f0e1
jr .asm_f0e0 jr .asm_f0e0
.asm_f0d7 .left
ld a, [W_XBLOCKCOORD] ld a, [W_XBLOCKCOORD]
and a and a
jr z, .asm_f0e6 jr z, .asm_f0e6

View file

@ -16,8 +16,7 @@ HiddenItems: ; 76688 (1d:6688)
ld a, [wWhichTrade] ; item ID ld a, [wWhichTrade] ; item ID
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
ld a, $24 tx_pre_jump FoundHiddenItemText
jp PrintPredefTextID
INCLUDE "data/hidden_item_coords.asm" INCLUDE "data/hidden_item_coords.asm"
@ -112,10 +111,10 @@ HiddenCoins: ; 76799 (1d:6799)
ld a, [wPlayerCoins + 1] ld a, [wPlayerCoins + 1]
cp $99 cp $99
jr nz, .RoomInCoinCase jr nz, .RoomInCoinCase
ld a, $2c tx_pre_id DroppedHiddenCoinsText
jr .done jr .done
.RoomInCoinCase .RoomInCoinCase
ld a, $2b tx_pre_id FoundHiddenCoinsText
.done .done
jp PrintPredefTextID jp PrintPredefTextID

View file

@ -27,34 +27,34 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
jr nz, .asm_4e90 jr nz, .asm_4e90
ld a, [wd528] ld a, [wd528]
bit 2, a bit 2, a
jr z, .asm_4e65 jr z, .notDown
xor a xor a ; ld a, SPRITE_FACING_DOWN
jr .asm_4e86 jr .done
.asm_4e65 .notDown
bit 3, a bit 3, a
jr z, .asm_4e6d jr z, .notUp
ld a, $4 ld a, SPRITE_FACING_UP
jr .asm_4e86 jr .done
.asm_4e6d .notUp
bit 1, a bit 1, a
jr z, .asm_4e75 jr z, .notLeft
ld a, $8 ld a, SPRITE_FACING_LEFT
jr .asm_4e86 jr .done
.asm_4e75 .notLeft
bit 0, a bit 0, a
jr z, .asm_4e7d jr z, .notRight
ld a, $c ld a, SPRITE_FACING_RIGHT
jr .asm_4e86 jr .done
.asm_4e7d .notRight
xor a xor a
ld [wSpriteStateData1 + 7], a ld [wSpriteStateData1 + 7], a
ld [wSpriteStateData1 + 8], a ld [wSpriteStateData1 + 8], a
jr .asm_4eab jr .asm_4eab
.asm_4e86 .done
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
ld a, [wFontLoaded] ld a, [wFontLoaded]
bit 0, a bit 0, a
jr nz, .asm_4e7d jr nz, .notRight
.asm_4e90 .asm_4e90
ld a, [wd736] ld a, [wd736]
bit 7, a bit 7, a

View file

@ -4679,7 +4679,7 @@ SetMapTextPointer:: ; 3f0f (0:3f0f)
TextPredefs:: TextPredefs::
add_tx_pre CardKeySuccessText ; 01 add_tx_pre CardKeySuccessText ; 01
add_tx_pre CardKeyFailText ; 02 add_tx_pre CardKeyFailText ; 02
add_tx_pre RedBedroomPC ; 03 add_tx_pre RedBedroomPCText ; 03
add_tx_pre RedBedroomSNESText ; 04 add_tx_pre RedBedroomSNESText ; 04
add_tx_pre PushStartText ; 05 add_tx_pre PushStartText ; 05
add_tx_pre SaveOptionText ; 06 add_tx_pre SaveOptionText ; 06
@ -4703,17 +4703,17 @@ TextPredefs::
add_tx_pre SaffronCityPokecenterBenchGuyText ; 18 add_tx_pre SaffronCityPokecenterBenchGuyText ; 18
add_tx_pre MtMoonPokecenterBenchGuyText ; 19 add_tx_pre MtMoonPokecenterBenchGuyText ; 19
add_tx_pre RockTunnelPokecenterBenchGuyText ; 1A add_tx_pre RockTunnelPokecenterBenchGuyText ; 1A
add_tx_pre UnusedBenchGuyText1 ; 1B add_tx_pre UnusedBenchGuyText1 ; 1B XXX unused
add_tx_pre UnusedBenchGuyText2 ; 1C add_tx_pre UnusedBenchGuyText2 ; 1C XXX unused
add_tx_pre UnusedBenchGuyText3 ; 1D add_tx_pre UnusedBenchGuyText3 ; 1D XXX unused
add_tx_pre TerminatorText_62508 ; 1E add_tx_pre UnusedPredefText ; 1E XXX unused
add_tx_pre PredefText1f ; 1F add_tx_pre PokemonCenterPCText ; 1F
add_tx_pre ViridianSchoolNotebook ; 20 add_tx_pre ViridianSchoolNotebook ; 20
add_tx_pre ViridianSchoolBlackboard ; 21 add_tx_pre ViridianSchoolBlackboard ; 21
add_tx_pre JustAMomentText ; 22 add_tx_pre JustAMomentText ; 22
add_tx_pre PredefText23 ; 23 add_tx_pre OpenBillsPCText ; 23
add_tx_pre FoundHiddenItemText ; 24 add_tx_pre FoundHiddenItemText ; 24
add_tx_pre HiddenItemBagFullText ; 25 add_tx_pre HiddenItemBagFullText ; 25 XXX unused
add_tx_pre VermilionGymTrashText ; 26 add_tx_pre VermilionGymTrashText ; 26
add_tx_pre IndigoPlateauHQText ; 27 add_tx_pre IndigoPlateauHQText ; 27
add_tx_pre GameCornerOutOfOrderText ; 28 add_tx_pre GameCornerOutOfOrderText ; 28
@ -4736,7 +4736,7 @@ TextPredefs::
add_tx_pre NewBicycleText ; 39 add_tx_pre NewBicycleText ; 39
add_tx_pre IndigoPlateauStatues ; 3A add_tx_pre IndigoPlateauStatues ; 3A
add_tx_pre VermilionGymTrashSuccesText1 ; 3B add_tx_pre VermilionGymTrashSuccesText1 ; 3B
add_tx_pre VermilionGymTrashSuccesText2 ; 3C add_tx_pre VermilionGymTrashSuccesText2 ; 3C XXX unused
add_tx_pre VermilionGymTrashSuccesText3 ; 3D add_tx_pre VermilionGymTrashSuccesText3 ; 3D
add_tx_pre VermilionGymTrashFailText ; 3E add_tx_pre VermilionGymTrashFailText ; 3E
add_tx_pre TownMapText ; 3F add_tx_pre TownMapText ; 3F

View file

@ -1120,7 +1120,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld bc,$3c40 ; Y and X position of player sprite ld bc,$3c40 ; Y and X position of player sprite
ld a,[wSpriteStateData1 + 9] ; direction the player is facing ld a,[wSpriteStateData1 + 9] ; direction the player is facing
.checkIfPlayerFacingUp .checkIfPlayerFacingUp
cp a,$04 cp SPRITE_FACING_UP
jr nz,.checkIfPlayerFacingDown jr nz,.checkIfPlayerFacingDown
; facing up ; facing up
ld a,b ld a,b
@ -1129,7 +1129,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,$08 ld a,$08
jr .doneCheckingDirection jr .doneCheckingDirection
.checkIfPlayerFacingDown .checkIfPlayerFacingDown
cp a,$00 cp SPRITE_FACING_DOWN
jr nz,.checkIfPlayerFacingRight jr nz,.checkIfPlayerFacingRight
; facing down ; facing down
ld a,b ld a,b
@ -1138,7 +1138,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,$04 ld a,$04
jr .doneCheckingDirection jr .doneCheckingDirection
.checkIfPlayerFacingRight .checkIfPlayerFacingRight
cp a,$0c cp SPRITE_FACING_RIGHT
jr nz,.playerFacingLeft jr nz,.playerFacingLeft
; facing right ; facing right
ld a,c ld a,c

View file

@ -226,7 +226,7 @@ add_tx_pre: MACRO
ENDM ENDM
tx_pre_id: MACRO tx_pre_id: MACRO
ld a, (\1_id - TextPredefs) / 2 ld a, (\1_id - TextPredefs) / 2 + 1
ENDM ENDM
tx_pre: MACRO tx_pre: MACRO

View file

@ -2339,7 +2339,7 @@ _GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589)
ld a, [W_XCOORD] ld a, [W_XCOORD]
ld e, a ld e, a
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
and a and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown jr nz, .notFacingDown
; facing down ; facing down
aCoord 8, 11 aCoord 8, 11
@ -2378,7 +2378,7 @@ GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be)
ld d, a ld d, a
ld e, [hl] ld e, [hl]
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
and a and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown jr nz, .notFacingDown
; facing down ; facing down
ld hl, $ffdb ld hl, $ffdb

View file

@ -19,14 +19,14 @@ BattleCenterMScript: ; 4fd10 (13:7d10)
ld [hli], a ld [hli], a
ld a, $a ld a, $a
ld [hl], a ld [hl], a
ld a, $8 ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + $19], a ld [wSpriteStateData1 + $19], a
ld a, [$ffaa] ld a, [$ffaa]
cp $2 cp $2
ret z ret z
ld a, $7 ld a, $7
ld [wSpriteStateData2 + $15], a ld [wSpriteStateData2 + $15], a
ld a, $c ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + $19], a ld [wSpriteStateData1 + $19], a
ret ret

View file

@ -17,11 +17,11 @@ BillsHouseScript0: ; 1e782 (7:6782)
BillsHouseScript1: ; 1e783 (7:6783) BillsHouseScript1: ; 1e783 (7:6783)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
and a and a ; cp SPRITE_FACING_DOWN
ld de, MovementData_1e79c ld de, MovementData_1e79c
jr nz, .asm_1e78f jr nz, .notDown
ld de, MovementData_1e7a0 ld de, MovementData_1e7a0
.asm_1e78f .notDown
ld a, $1 ld a, $1
ld [$ff8c], a ld [$ff8c], a
call MoveSprite call MoveSprite
@ -32,6 +32,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
MovementData_1e79c: ; 1e79c (7:679c) MovementData_1e79c: ; 1e79c (7:679c)
db $40,$40,$40,$FF db $40,$40,$40,$FF
; make Bill walk around the player
MovementData_1e7a0: ; 1e7a0 (7:67a0) MovementData_1e7a0: ; 1e7a0 (7:67a0)
db $C0,$40,$40,$80,$40,$FF db $C0,$40,$40,$80,$40,$FF

View file

@ -85,11 +85,11 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe)
CopycatsHouse2FText7: ; 5cd03 (17:4d03) CopycatsHouse2FText7: ; 5cd03 (17:4d03)
TX_ASM TX_ASM
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ld hl, CopycatsHouse2FText_5cd1c ld hl, CopycatsHouse2FText_5cd1c
jr nz, .asm_399a4 jr nz, .notUp
ld hl, CopycatsHouse2FText_5cd17 ld hl, CopycatsHouse2FText_5cd17
.asm_399a4 .notUp
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -48,7 +48,7 @@ Mansion1ReplaceBlock: ; 44310 (11:4310)
Mansion1Script_Switches: ; 44316 (11:4316) Mansion1Script_Switches: ; 44316 (11:4316)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a

View file

@ -44,7 +44,7 @@ Mansion2Script_5202f: ; 5202f (14:602f)
Mansion2Script_Switches: ; 52037 (14:6037) Mansion2Script_Switches: ; 52037 (14:6037)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a

View file

@ -75,7 +75,7 @@ Mansion3Script_5225b: ; 5225b (14:625b)
Mansion3Script_Switches: ; 5227a (14:627a) Mansion3Script_Switches: ; 5227a (14:627a)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a

View file

@ -46,7 +46,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf)
Mansion4Script_Switches: ; 52420 (14:6420) Mansion4Script_Switches: ; 52420 (14:6420)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
ret nz ret nz
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a

View file

@ -454,6 +454,7 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
ld a, $12 ld a, $12
ld [W_OAKSLABCURSCRIPT], a ld [W_OAKSLABCURSCRIPT], a
jr .done jr .done
; make the player keep facing the rival as he walks away
.asm_1ce8c .asm_1ce8c
ld a, [wcf0f] ld a, [wcf0f]
cp $5 cp $5
@ -461,17 +462,17 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
ld a, [W_XCOORD] ld a, [W_XCOORD]
cp $4 cp $4
jr nz, .asm_1cea1 jr nz, .asm_1cea1
ld a, $c ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
jr .done jr .done
.asm_1cea1 .asm_1cea1
ld a, $8 ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
jr .done jr .done
.asm_1cea8 .asm_1cea8
cp $4 cp $4
ret nz ret nz
xor a xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
.done .done
ret ret

View file

@ -97,7 +97,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
ld a,[wd730] ld a,[wd730]
bit 0,a bit 0,a
ret nz ret nz
xor a xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9],a ld [wSpriteStateData1 + 9],a
ld a,1 ld a,1
ld [wcf0d],a ld [wcf0d],a

View file

@ -69,7 +69,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ld a, HS_POKEMONTOWER_7_MR_FUJI ld a, HS_POKEMONTOWER_7_MR_FUJI
ld [wcc4d], a ld [wcc4d], a
predef HideObject predef HideObject
ld a, $4 ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
ld a, LAVENDER_HOUSE_1 ld a, LAVENDER_HOUSE_1
ld [H_DOWNARROWBLINKCNT1], a ld [H_DOWNARROWBLINKCNT1], a

View file

@ -52,11 +52,11 @@ MomHealText2: ; 481c1 (12:41c1)
RedsHouse1FText2: ; 0x481c6 TV RedsHouse1FText2: ; 0x481c6 TV
TX_ASM TX_ASM
ld a,[wSpriteStateData1 + 9] ld a,[wSpriteStateData1 + 9]
cp 4 cp SPRITE_FACING_UP
ld hl,TVWrongSideText ld hl,TVWrongSideText
jr nz,.done ; if player is not facing up jr nz,.notUp
ld hl,StandByMeText ld hl,StandByMeText
.done .notUp
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -50,8 +50,8 @@ Route11GateUpstairsText_494a3: ; 494a3 (12:54a3)
Route11GateUpstairsText3: ; 494a8 (12:54a8) Route11GateUpstairsText3: ; 494a8 (12:54a8)
TX_ASM TX_ASM
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
jp nz, Route12GateUpstairsScript_495c9 jp nz, GateUpstairsScript_PrintIfFacingUp
ld a, [wd7d8] ld a, [wd7d8]
bit 7, a ; fought snorlax? bit 7, a ; fought snorlax?
ld hl, BinocularsSnorlaxText ld hl, BinocularsSnorlaxText
@ -72,7 +72,7 @@ BinocularsNoSnorlaxText:
Route11GateUpstairsText4: ; 494ce (12:54ce) Route11GateUpstairsText4: ; 494ce (12:54ce)
TX_ASM TX_ASM
ld hl, Route11GateUpstairsText_494d5 ld hl, Route11GateUpstairsText_494d5
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route11GateUpstairsText_494d5: ; 494d5 (12:54d5) Route11GateUpstairsText_494d5: ; 494d5 (12:54d5)
TX_FAR _Route11GateUpstairsText_494d5 TX_FAR _Route11GateUpstairsText_494d5

View file

@ -50,7 +50,7 @@ TM39NoRoomText: ; 495ac (12:55ac)
Route12GateUpstairsText2: ; 495b1 (12:55b1) Route12GateUpstairsText2: ; 495b1 (12:55b1)
TX_ASM TX_ASM
ld hl, Route12GateUpstairsText_495b8 ld hl, Route12GateUpstairsText_495b8
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495b8: ; 495b8 (12:55b8) Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
TX_FAR _Route12GateUpstairsText_495b8 TX_FAR _Route12GateUpstairsText_495b8
@ -59,21 +59,21 @@ Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
Route12GateUpstairsText3: ; 495bd (12:55bd) Route12GateUpstairsText3: ; 495bd (12:55bd)
TX_ASM TX_ASM
ld hl, Route12GateUpstairsText_495c4 ld hl, Route12GateUpstairsText_495c4
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495c4: ; 495c4 (12:55c4) Route12GateUpstairsText_495c4: ; 495c4 (12:55c4)
TX_FAR _Route12GateUpstairsText_495c4 TX_FAR _Route12GateUpstairsText_495c4
db "@" db "@"
Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9) GateUpstairsScript_PrintIfFacingUp: ; 495c9 (12:55c9)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $4 cp SPRITE_FACING_UP
jr z, .asm_495d4 jr z, .up
ld a, $1 ld a, $1
jr .asm_495d8 jr .done
.asm_495d4 .up
call PrintText call PrintText
xor a xor a
.asm_495d8 .done
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd jp TextScriptEnd

View file

@ -39,7 +39,7 @@ Route15GateUpstairsText_4968c: ; 4968c (12:568c)
Route15GateUpstairsText2: ; 49691 (12:5691) Route15GateUpstairsText2: ; 49691 (12:5691)
TX_ASM TX_ASM
ld hl, Route15GateUpstairsText_49698 ld hl, Route15GateUpstairsText_49698
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route15GateUpstairsText_49698: ; 49698 (12:5698) Route15GateUpstairsText_49698: ; 49698 (12:5698)
TX_FAR _Route15GateUpstairsText_49698 TX_FAR _Route15GateUpstairsText_49698

View file

@ -30,7 +30,7 @@ Route16GateUpstairsText_4982f: ; 4982f (12:582f)
Route16GateUpstairsText3: ; 49834 (12:5834) Route16GateUpstairsText3: ; 49834 (12:5834)
TX_ASM TX_ASM
ld hl, Route16GateUpstairsText_4983b ld hl, Route16GateUpstairsText_4983b
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_4983b: ; 4983b (12:583b) Route16GateUpstairsText_4983b: ; 4983b (12:583b)
TX_FAR _Route16GateUpstairsText_4983b TX_FAR _Route16GateUpstairsText_4983b
@ -39,7 +39,7 @@ Route16GateUpstairsText_4983b: ; 4983b (12:583b)
Route16GateUpstairsText4: ; 49840 (12:5840) Route16GateUpstairsText4: ; 49840 (12:5840)
TX_ASM TX_ASM
ld hl, Route16GateUpstairsText_49847 ld hl, Route16GateUpstairsText_49847
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_49847: ; 49847 (12:5847) Route16GateUpstairsText_49847: ; 49847 (12:5847)
TX_FAR _Route16GateUpstairsText_49847 TX_FAR _Route16GateUpstairsText_49847

View file

@ -16,7 +16,7 @@ Route18GateUpstairsText1: ; 4997e (12:597e)
Route18GateUpstairsText2: ; 4998c (12:598c) Route18GateUpstairsText2: ; 4998c (12:598c)
TX_ASM TX_ASM
ld hl, Route18GateUpstairsText_49993 ld hl, Route18GateUpstairsText_49993
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_49993: ; 49993 (12:5993) Route18GateUpstairsText_49993: ; 49993 (12:5993)
TX_FAR _Route18GateUpstairsText_49993 TX_FAR _Route18GateUpstairsText_49993
@ -25,7 +25,7 @@ Route18GateUpstairsText_49993: ; 49993 (12:5993)
Route18GateUpstairsText3: ; 49998 (12:5998) Route18GateUpstairsText3: ; 49998 (12:5998)
TX_ASM TX_ASM
ld hl, Route18GateUpstairsText_4999f ld hl, Route18GateUpstairsText_4999f
jp Route12GateUpstairsScript_495c9 jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_4999f: ; 4999f (12:599f) Route18GateUpstairsText_4999f: ; 4999f (12:599f)
TX_FAR _Route18GateUpstairsText_4999f TX_FAR _Route18GateUpstairsText_4999f

View file

@ -148,13 +148,13 @@ Route22Script2: ; 50fb5 (14:4fb5)
cp $ff cp $ff
jp z, Route22Script_50ece jp z, Route22Script_50ece
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
and a and a ; cp SPRITE_FACING_DOWN
jr nz, .asm_50fc7 jr nz, .notDown
ld a, $4 ld a, SPRITE_FACING_UP
jr .asm_50fc9 jr .done
.asm_50fc7 .notDown
ld a, $c ld a, SPRITE_FACING_RIGHT
.asm_50fc9 .done
ld [$ff8d], a ld [$ff8d], a
ld a, $1 ld a, $1
ld [$ff8c], a ld [$ff8c], a

View file

@ -24,7 +24,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld [wJoyIgnore], a ld [wJoyIgnore], a
xor a xor a
ld [hJoyHeld], a ld [hJoyHeld], a
ld a, $c ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
ld a, [wWhichTrade] ld a, [wWhichTrade]
cp $1 cp $1
@ -247,7 +247,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
.asm_7539c .asm_7539c
ld hl, .SafariZoneEntranceText_753c0 ld hl, .SafariZoneEntranceText_753c0
call PrintText call PrintText
ld a, $4 ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a ld [wSpriteStateData1 + 9], a
ld a, $40 ld a, $40
ld c, $1 ld c, $1

View file

@ -40,7 +40,7 @@ VermilionCityScriptPointers: ; 197dc (6:57dc)
VermilionCityScript0: ; 197e6 (6:57e6) VermilionCityScript0: ; 197e6 (6:57e6)
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
and a and a ; cp SPRITE_FACING_DOWN
ret nz ret nz
ld hl, CoordsData_19823 ld hl, CoordsData_19823
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
@ -54,7 +54,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)
ld a, [wd803] ld a, [wd803]
bit 2, a bit 2, a
jr nz, .asm_19810 jr nz, .asm_19810
ld b, $3f ld b, S_S__TICKET
predef IsItemInBag_ predef IsItemInBag_
ld a, b ld a, b
and a and a
@ -162,7 +162,7 @@ VermilionCityText3: ; 198b1 (6:58b1)
bit 2, a bit 2, a
jr nz, .asm_198f6 jr nz, .asm_198f6
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9]
cp $c cp SPRITE_FACING_RIGHT
jr z, .asm_198c8 jr z, .asm_198c8
ld hl, VermilionCityCoords1 ld hl, VermilionCityCoords1
call ArePlayerCoordsInArray call ArePlayerCoordsInArray