Revise some map scripts, mostly for getting items

This commit is contained in:
Rangi 2020-07-16 11:19:05 -04:00
parent 58f1089370
commit 594c58a289
61 changed files with 371 additions and 348 deletions

View file

@ -43,3 +43,9 @@ SLOTSMOUSE EQU $1614
const BIT_VOLCANOBADGE ; 6 const BIT_VOLCANOBADGE ; 6
const BIT_EARTHBADGE ; 7 const BIT_EARTHBADGE ; 7
NUM_BADGES EQU const_value NUM_BADGES EQU const_value
; OaksAideScript results
OAKS_AIDE_BAG_FULL EQU $00
OAKS_AIDE_GOT_ITEM EQU $01
OAKS_AIDE_NOT_ENOUGH_MONS EQU $80
OAKS_AIDE_REFUSED EQU $ff

View file

@ -3,7 +3,7 @@ OpenPokemonCenterPC:
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ret nz ret nz
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
tx_pre_jump PokemonCenterPCText tx_pre_jump PokemonCenterPCText

View file

@ -25,22 +25,22 @@ OaksAideScript:
jr nc, .bagFull jr nc, .bagFull
ld hl, OaksAideGotItemText ld hl, OaksAideGotItemText
call PrintText call PrintText
ld a, $1 ld a, OAKS_AIDE_GOT_ITEM
jr .done jr .done
.bagFull .bagFull
ld hl, OaksAideNoRoomText ld hl, OaksAideNoRoomText
call PrintText call PrintText
xor a xor a ; OAKS_AIDE_BAG_FULL
jr .done jr .done
.notEnoughOwnedMons .notEnoughOwnedMons
ld hl, OaksAideUhOhText ld hl, OaksAideUhOhText
call PrintText call PrintText
ld a, $80 ld a, OAKS_AIDE_NOT_ENOUGH_MONS
jr .done jr .done
.choseNo .choseNo
ld hl, OaksAideComeBackText ld hl, OaksAideComeBackText
call PrintText call PrintText
ld a, $ff ld a, OAKS_AIDE_REFUSED
.done .done
ldh [hOaksAideResult], a ldh [hOaksAideResult], a
ret ret

View file

@ -1,6 +1,6 @@
PromptUserToPlaySlots: PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2 call SaveScreenTilesToBuffer2
ld a, BANK(DisplayTextIDInit) ld a, BANK(DisplayTextIDInit) ; TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
ld b, a ld b, a
ld hl, DisplayTextIDInit ld hl, DisplayTextIDInit

View file

@ -272,7 +272,7 @@ EnableAutoTextBoxDrawing::
jr AutoTextBoxDrawingCommon jr AutoTextBoxDrawingCommon
DisableAutoTextBoxDrawing:: DisableAutoTextBoxDrawing::
ld a, $01 ld a, TRUE
AutoTextBoxDrawingCommon:: AutoTextBoxDrawingCommon::
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a

View file

@ -10,9 +10,7 @@ BluesHouse_ScriptPointers:
BluesHouseScript0: BluesHouseScript0:
SetEvent EVENT_ENTERED_BLUES_HOUSE SetEvent EVENT_ENTERED_BLUES_HOUSE
ld a, $1
; trigger the next script
ld a, 1
ld [wBluesHouseCurScript], a ld [wBluesHouseCurScript], a
ret ret
@ -20,40 +18,40 @@ BluesHouseScript1:
ret ret
BluesHouse_TextPointers: BluesHouse_TextPointers:
dw BluesHouseText1 dw BluesHouseDaisySittingText
dw BluesHouseText2 dw BluesHouseDaisyWalkingText
dw BluesHouseText3 dw BluesHouseTownMapText
BluesHouseText1: BluesHouseDaisySittingText:
text_asm text_asm
CheckEvent EVENT_GOT_TOWN_MAP CheckEvent EVENT_GOT_TOWN_MAP
jr nz, .GotMap jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX CheckEvent EVENT_GOT_POKEDEX
jr nz, .GiveMap jr nz, .give_town_map
ld hl, DaisyInitialText ld hl, DaisyInitialText
call PrintText call PrintText
jr .done jr .done
.GiveMap .give_town_map
ld hl, DaisyOfferMapText ld hl, DaisyOfferMapText
call PrintText call PrintText
lb bc, TOWN_MAP, 1 lb bc, TOWN_MAP, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld a, HS_TOWN_MAP ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject ; hide table map object predef HideObject
ld hl, GotMapText ld hl, GotMapText
call PrintText call PrintText
SetEvent EVENT_GOT_TOWN_MAP SetEvent EVENT_GOT_TOWN_MAP
jr .done jr .done
.GotMap .got_town_map
ld hl, DaisyUseMapText ld hl, DaisyUseMapText
call PrintText call PrintText
jr .done jr .done
.BagFull .bag_full
ld hl, DaisyBagFullText ld hl, DaisyBagFullText
call PrintText call PrintText
.done .done
@ -80,10 +78,10 @@ DaisyUseMapText:
text_far _DaisyUseMapText text_far _DaisyUseMapText
text_end text_end
BluesHouseText2: ; Daisy, walking around BluesHouseDaisyWalkingText:
text_far _BluesHouseText2 text_far _BluesHouseDaisyWalkingText
text_end text_end
BluesHouseText3: ; map on table BluesHouseTownMapText:
text_far _BluesHouseText3 text_far _BluesHouseTownMapText
text_end text_end

View file

@ -28,24 +28,24 @@ CeladonDinerText4:
CeladonDinerText5: CeladonDinerText5:
text_asm text_asm
CheckEvent EVENT_GOT_COIN_CASE CheckEvent EVENT_GOT_COIN_CASE
jr nz, .asm_eb14d jr nz, .got_item
ld hl, CeladonDinerText_491a7 ld hl, CeladonDinerText_491a7
call PrintText call PrintText
lb bc, COIN_CASE, 1 lb bc, COIN_CASE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_COIN_CASE SetEvent EVENT_GOT_COIN_CASE
ld hl, ReceivedCoinCaseText ld hl, ReceivedCoinCaseText
call PrintText call PrintText
jr .asm_68b61 jr .done
.BagFull .bag_full
ld hl, CoinCaseNoRoomText ld hl, CoinCaseNoRoomText
call PrintText call PrintText
jr .asm_68b61 jr .done
.asm_eb14d .got_item
ld hl, CeladonDinerText_491b7 ld hl, CeladonDinerText_491b7
call PrintText call PrintText
.asm_68b61 .done
jp TextScriptEnd jp TextScriptEnd
CeladonDinerText_491a7: CeladonDinerText_491a7:

View file

@ -8,7 +8,7 @@ CeladonMansion1F_TextPointers:
dw CeladonMansion1Text4 dw CeladonMansion1Text4
dw CeladonMansion1Text5 dw CeladonMansion1Text5
CeladonMansion1_486a1: CeladonMansion1_PlayCryScript:
call PlayCry call PlayCry
jp TextScriptEnd jp TextScriptEnd
@ -16,7 +16,7 @@ CeladonMansion1Text1:
text_far _CeladonMansion1Text1 text_far _CeladonMansion1Text1
text_asm text_asm
ld a, MEOWTH ld a, MEOWTH
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text2: CeladonMansion1Text2:
text_far _CeladonMansion1Text2 text_far _CeladonMansion1Text2
@ -26,13 +26,13 @@ CeladonMansion1Text3:
text_far _CeladonMansion1Text3 text_far _CeladonMansion1Text3
text_asm text_asm
ld a, CLEFAIRY ld a, CLEFAIRY
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text4: CeladonMansion1Text4:
text_far _CeladonMansion1Text4 text_far _CeladonMansion1Text4
text_asm text_asm
ld a, NIDORAN_F ld a, NIDORAN_F
jp CeladonMansion1_486a1 jp CeladonMansion1_PlayCryScript
CeladonMansion1Text5: CeladonMansion1Text5:
text_far _CeladonMansion1Text5 text_far _CeladonMansion1Text5

View file

@ -25,32 +25,30 @@ WriterText:
DirectorText: DirectorText:
text_asm text_asm
; check pokédex
ld hl, wPokedexOwned ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits call CountSetBits
ld a, [wNumSetBits] ld a, [wNumSetBits]
cp 150 cp NUM_POKEMON - 1 ; discount Mew
jr nc, .CompletedDex jr nc, .completed_dex
ld hl, .GameDesigner ld hl, .GameDesignerText
jr .done jr .done
.CompletedDex .completed_dex
ld hl, .CompletedDexText ld hl, .CompletedDexText
.done .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd
.GameDesigner .GameDesignerText:
text_far _GameDesignerText text_far _GameDesignerText
text_end text_end
.CompletedDexText .CompletedDexText:
text_far _CompletedDexText text_far _CompletedDexText
text_promptbutton text_promptbutton
text_asm text_asm
callfar DisplayDiploma callfar DisplayDiploma
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd jp TextScriptEnd

View file

@ -13,9 +13,9 @@ CeladonMansion5Text2:
text_asm text_asm
lb bc, EEVEE, 25 lb bc, EEVEE, 25
call GivePokemon call GivePokemon
jr nc, .asm_24365 jr nc, .party_full
ld a, HS_CELADON_MANSION_EEVEE_GIFT ld a, HS_CELADON_MANSION_EEVEE_GIFT
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject
.asm_24365 .party_full
jp TextScriptEnd jp TextScriptEnd

View file

@ -23,21 +23,21 @@ CeladonMart3F_TextPointers:
CeladonMart3Text1: CeladonMart3Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM18 CheckEvent EVENT_GOT_TM18
jr nz, .asm_a5463 jr nz, .got_item
ld hl, TM18PreReceiveText ld hl, TM18PreReceiveText
call PrintText call PrintText
lb bc, TM_COUNTER, 1 lb bc, TM_COUNTER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_TM18 SetEvent EVENT_GOT_TM18
ld hl, ReceivedTM18Text ld hl, ReceivedTM18Text
jr .asm_81359 jr .done
.BagFull .bag_full
ld hl, TM18NoRoomText ld hl, TM18NoRoomText
jr .asm_81359 jr .done
.asm_a5463 .got_item
ld hl, TM18ExplanationText ld hl, TM18ExplanationText
.asm_81359 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -40,23 +40,22 @@ CeladonMartElevatorScript_48631:
jp CopyData jp CopyData
CeladonMartElevatorFloors: CeladonMartElevatorFloors:
db 5 ; number of elements in list db 5 ; #
db FLOOR_1F db FLOOR_1F
db FLOOR_2F db FLOOR_2F
db FLOOR_3F db FLOOR_3F
db FLOOR_4F db FLOOR_4F
db FLOOR_5F db FLOOR_5F
db $FF db -1 ; end
CeladonMartElevatorWarpMaps:
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator. ; These specify where the player goes after getting out of the elevator.
db $05, CELADON_MART_1F CeladonMartElevatorWarpMaps:
db $02, CELADON_MART_2F ; warp number, map id
db $02, CELADON_MART_3F db 5, CELADON_MART_1F
db $02, CELADON_MART_4F db 2, CELADON_MART_2F
db $02, CELADON_MART_5F db 2, CELADON_MART_3F
db 2, CELADON_MART_4F
db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd: CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654: CeladonMartElevatorScript_48654:

View file

@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script: CeruleanBadgeHouse_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
dec a dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -34,7 +34,7 @@ CeruleanHouse2Text1:
jr c, .asm_74e60 jr c, .asm_74e60
ld hl, TextPointers_74e86 ld hl, TextPointers_74e86
ld a, [wcf91] ld a, [wcf91]
sub $15 sub BOULDERBADGE
add a add a
ld d, $0 ld d, $0
ld e, a ld e, a
@ -52,7 +52,16 @@ CeruleanHouse2Text1:
jp TextScriptEnd jp TextScriptEnd
BadgeItemList: BadgeItemList:
db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF db 8 ; #
db BOULDERBADGE
db CASCADEBADGE
db THUNDERBADGE
db RAINBOWBADGE
db SOULBADGE
db MARSHBADGE
db VOLCANOBADGE
db EARTHBADGE
db -1 ; end
CeruleanHouse2Text_74e77: CeruleanHouse2Text_74e77:
text_far _CeruleanHouse2Text_74e77 text_far _CeruleanHouse2Text_74e77

View file

@ -9,17 +9,17 @@ CeruleanTrashedHouse_TextPointers:
CeruleanHouseTrashedText1: CeruleanHouseTrashedText1:
text_asm text_asm
ld b, $e4 ld b, TM_DIG
predef GetQuantityOfItemInBag predef GetQuantityOfItemInBag
and b and b
jr z, .asm_f8734 jr z, .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6b0 ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText call PrintText
jr .asm_8dfe9 jr .done
.asm_f8734 .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6ab ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText call PrintText
.asm_8dfe9 .done
jp TextScriptEnd jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab: CeruleanHouseTrashedText_1d6ab:

View file

@ -44,7 +44,7 @@ FossilsList:
db DOME_FOSSIL db DOME_FOSSIL
db HELIX_FOSSIL db HELIX_FOSSIL
db OLD_AMBER db OLD_AMBER
db $00 db 0 ; end
Lab4Text1: Lab4Text1:
text_asm text_asm

View file

@ -11,24 +11,24 @@ CinnabarLabMetronomeRoom_TextPointers:
Lab3Text1: Lab3Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM35 CheckEvent EVENT_GOT_TM35
jr nz, .asm_e551a jr nz, .got_item
ld hl, TM35PreReceiveText ld hl, TM35PreReceiveText
call PrintText call PrintText
lb bc, TM_METRONOME, 1 lb bc, TM_METRONOME, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM35Text ld hl, ReceivedTM35Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM35 SetEvent EVENT_GOT_TM35
jr .asm_eb896 jr .done
.BagFull .bag_full
ld hl, TM35NoRoomText ld hl, TM35NoRoomText
call PrintText call PrintText
jr .asm_eb896 jr .done
.asm_e551a .got_item
ld hl, TM35ExplanationText ld hl, TM35ExplanationText
call PrintText call PrintText
.asm_eb896 .done
jp TextScriptEnd jp TextScriptEnd
TM35PreReceiveText: TM35PreReceiveText:

View file

@ -13,34 +13,34 @@ CopycatsHouse2F_TextPointers:
CopycatsHouse2FText1: CopycatsHouse2FText1:
text_asm text_asm
CheckEvent EVENT_GOT_TM31 CheckEvent EVENT_GOT_TM31
jr nz, .asm_7ccf3 jr nz, .got_item
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4 ld hl, CopycatsHouse2FText_5ccd4
call PrintText call PrintText
ld b, POKE_DOLL ld b, POKE_DOLL
call IsItemInBag call IsItemInBag
jr z, .asm_62ecd jr z, .done
ld hl, TM31PreReceiveText ld hl, TM31PreReceiveText
call PrintText call PrintText
lb bc, TM_MIMIC, 1 lb bc, TM_MIMIC, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM31Text ld hl, ReceivedTM31Text
call PrintText call PrintText
ld a, POKE_DOLL ld a, POKE_DOLL
ldh [hItemToRemoveID], a ldh [hItemToRemoveID], a
farcall RemoveItemByID farcall RemoveItemByID
SetEvent EVENT_GOT_TM31 SetEvent EVENT_GOT_TM31
jr .asm_62ecd jr .done
.BagFull .bag_full
ld hl, TM31NoRoomText ld hl, TM31NoRoomText
call PrintText call PrintText
jr .asm_62ecd jr .done
.asm_7ccf3 .got_item
ld hl, TM31ExplanationText2 ld hl, TM31ExplanationText2
call PrintText call PrintText
.asm_62ecd .done
jp TextScriptEnd jp TextScriptEnd
CopycatsHouse2FText_5ccd4: CopycatsHouse2FText_5ccd4:

View file

@ -2,4 +2,5 @@ DiglettsCave_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers: DiglettsCave_TextPointers:
text_end
text_end ; unused

View file

@ -7,39 +7,30 @@ FuchsiaGoodRodHouse_TextPointers:
FuchsiaHouse3Text1: FuchsiaHouse3Text1:
text_asm text_asm
ld a, [wd728] ld a, [wd728]
bit 4, a bit 4, a ; got good rod?
jr nz, .after jr nz, .got_item
ld hl, FuchsiaHouse3Text_561bd ld hl, FuchsiaHouse3Text_561bd
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .refused jr nz, .refused
lb bc, GOOD_ROD, 1 lb bc, GOOD_ROD, 1
call GiveItem call GiveItem
jr nc, .full jr nc, .bag_full
ld hl, wd728 ld hl, wd728
set 4, [hl] set 4, [hl] ; got good rod
ld hl, FuchsiaHouse3Text_561c2 ld hl, FuchsiaHouse3Text_561c2
jr .talk jr .done
.bag_full
.full
ld hl, FuchsiaHouse3Text_5621c ld hl, FuchsiaHouse3Text_5621c
jr .talk jr .done
.refused .refused
ld hl, FuchsiaHouse3Text_56212 ld hl, FuchsiaHouse3Text_56212
jr .talk jr .done
.got_item
.after
ld hl, FuchsiaHouse3Text_56217 ld hl, FuchsiaHouse3Text_56217
.done
.talk
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -16,14 +16,14 @@ LavenderHouse2Text1:
LavenderHouse2Text2: LavenderHouse2Text2:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_65711 jr nz, .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9dc ld hl, LavenderHouse2Text_1d9dc
call PrintText call PrintText
jr .asm_64be1 jr .done
.asm_65711 .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9e1 ld hl, LavenderHouse2Text_1d9e1
call PrintText call PrintText
.asm_64be1 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse2Text_1d9dc: LavenderHouse2Text_1d9dc:

View file

@ -20,9 +20,9 @@ LavenderTownText1:
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
ld hl, LavenderTownText_44146 ld hl, LavenderTownText_44146
jr nz, .asm_40831 jr nz, .got_text
ld hl, LavenderTownText_44141 ld hl, LavenderTownText_44141
.asm_40831 .got_text
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -13,14 +13,14 @@ MrFujisHouse_TextPointers:
LavenderHouse1Text1: LavenderHouse1Text1:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_72e5d jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d1 ld hl, LavenderHouse1Text_1d8d1
call PrintText call PrintText
jr .asm_6957f jr .done
.asm_72e5d .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d6 ld hl, LavenderHouse1Text_1d8d6
call PrintText call PrintText
.asm_6957f .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d8d1: LavenderHouse1Text_1d8d1:
@ -34,14 +34,14 @@ LavenderHouse1Text_1d8d6:
LavenderHouse1Text2: LavenderHouse1Text2:
text_asm text_asm
CheckEvent EVENT_RESCUED_MR_FUJI CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .asm_06470 jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f4 ld hl, LavenderHouse1Text_1d8f4
call PrintText call PrintText
jr .asm_3d208 jr .done
.asm_06470 .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f9 ld hl, LavenderHouse1Text_1d8f9
call PrintText call PrintText
.asm_3d208 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d8f4: LavenderHouse1Text_1d8f4:
@ -69,24 +69,24 @@ LavenderHouse1Text4:
LavenderHouse1Text5: LavenderHouse1Text5:
text_asm text_asm
CheckEvent EVENT_GOT_POKE_FLUTE CheckEvent EVENT_GOT_POKE_FLUTE
jr nz, .asm_15ac2 jr nz, .got_item
ld hl, LavenderHouse1Text_1d94c ld hl, LavenderHouse1Text_1d94c
call PrintText call PrintText
lb bc, POKE_FLUTE, 1 lb bc, POKE_FLUTE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedFluteText ld hl, ReceivedFluteText
call PrintText call PrintText
SetEvent EVENT_GOT_POKE_FLUTE SetEvent EVENT_GOT_POKE_FLUTE
jr .asm_da749 jr .done
.BagFull .bag_full
ld hl, FluteNoRoomText ld hl, FluteNoRoomText
call PrintText call PrintText
jr .asm_da749 jr .done
.asm_15ac2 .got_item
ld hl, MrFujiAfterFluteText ld hl, MrFujiAfterFluteText
call PrintText call PrintText
.asm_da749 .done
jp TextScriptEnd jp TextScriptEnd
LavenderHouse1Text_1d94c: LavenderHouse1Text_1d94c:

View file

@ -7,24 +7,24 @@ MrPsychicsHouse_TextPointers:
SaffronHouse2Text1: SaffronHouse2Text1:
text_asm text_asm
CheckEvent EVENT_GOT_TM29 CheckEvent EVENT_GOT_TM29
jr nz, .asm_9e72b jr nz, .got_item
ld hl, TM29PreReceiveText ld hl, TM29PreReceiveText
call PrintText call PrintText
lb bc, TM_PSYCHIC_M, 1 lb bc, TM_PSYCHIC_M, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM29Text ld hl, ReceivedTM29Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM29 SetEvent EVENT_GOT_TM29
jr .asm_fe4e1 jr .done
.BagFull .bag_full
ld hl, TM29NoRoomText ld hl, TM29NoRoomText
call PrintText call PrintText
jr .asm_fe4e1 jr .done
.asm_9e72b .got_item
ld hl, TM29ExplanationText ld hl, TM29ExplanationText
call PrintText call PrintText
.asm_fe4e1 .done
jp TextScriptEnd jp TextScriptEnd
TM29PreReceiveText: TM29PreReceiveText:

View file

@ -123,9 +123,9 @@ CoordsData_49df1:
MovementData_49df8: MovementData_49df8:
db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT
MovementData_49df9: MovementData_49df9:
db NPC_MOVEMENT_UP,$FF db NPC_MOVEMENT_UP
db $FF
MtMoon3Script5: MtMoon3Script5:
ld a, [wd730] ld a, [wd730]

View file

@ -1,5 +1,5 @@
Museum1F_Script: Museum1F_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@ -188,24 +188,24 @@ Museum1FText_5c251:
Museum1FText3: Museum1FText3:
text_asm text_asm
CheckEvent EVENT_GOT_OLD_AMBER CheckEvent EVENT_GOT_OLD_AMBER
jr nz, .asm_5c285 jr nz, .got_item
ld hl, Museum1FText_5c28e ld hl, Museum1FText_5c28e
call PrintText call PrintText
lb bc, OLD_AMBER, 1 lb bc, OLD_AMBER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_OLD_AMBER SetEvent EVENT_GOT_OLD_AMBER
ld a, HS_OLD_AMBER ld a, HS_OLD_AMBER
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef HideObject predef HideObject
ld hl, ReceivedOldAmberText ld hl, ReceivedOldAmberText
jr .asm_5c288 jr .done
.BagFull .bag_full
ld hl, Museum1FText_5c29e ld hl, Museum1FText_5c29e
jr .asm_5c288 jr .done
.asm_5c285 .got_item
ld hl, Museum1FText_5c299 ld hl, Museum1FText_5c299
.asm_5c288 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -1,7 +1,7 @@
OaksLab_Script: OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
call nz, OaksLabScript_1d076 call nz, OaksLabScript_1d076
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a

View file

@ -1,6 +1,6 @@
PewterMart_Script: PewterMart_Script:
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
ret ret

View file

@ -17,14 +17,16 @@ PewterPokecenterText2:
PewterJigglypuffText: PewterJigglypuffText:
text_asm text_asm
ld a, $1 ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text ld hl, .JigglypuffText
call PrintText call PrintText
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
call PlaySound call PlaySound
ld c, 32 ld c, 32
call DelayFrames call DelayFrames
ld hl, JigglypuffFacingDirections ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
@ -37,15 +39,16 @@ PewterJigglypuffText:
inc hl inc hl
jr nz, .findMatchingFacingDirectionLoop jr nz, .findMatchingFacingDirectionLoop
dec hl dec hl
push hl push hl
ld c, BANK(Music_JigglypuffSong) ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic call PlayMusic
pop hl pop hl
.loop
.spinMovementLoop
ld a, [hl] ld a, [hl]
ld [wSprite03StateData1ImageIndex], a ld [wSprite03StateData1ImageIndex], a
; rotate the array ; rotate the array
push hl push hl
ld hl, wJigglypuffFacingDirections ld hl, wJigglypuffFacingDirections
@ -55,22 +58,20 @@ PewterJigglypuffText:
ld a, [wJigglypuffFacingDirections - 1] ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a ld [wJigglypuffFacingDirections + 3], a
pop hl pop hl
ld c, 24 ld c, 24
call DelayFrames call DelayFrames
ld a, [wChannelSoundIDs] ld a, [wChannelSoundIDs]
ld b, a ld b, a
ld a, [wChannelSoundIDs + Ch2] ld a, [wChannelSoundIDs + Ch2]
or b or b
jr nz, .loop jr nz, .spinMovementLoop
ld c, 48 ld c, 48
call DelayFrames call DelayFrames
call PlayDefaultMusic call PlayDefaultMusic
jp TextScriptEnd jp TextScriptEnd
.Text .JigglypuffText:
text_far _PewterJigglypuffText text_far _PewterJigglypuffText
text_end text_end

View file

@ -115,12 +115,12 @@ FanClubText5:
call PrintText call PrintText
lb bc, BIKE_VOUCHER, 1 lb bc, BIKE_VOUCHER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, .receivedvouchertext ld hl, .receivedvouchertext
call PrintText call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER SetEvent EVENT_GOT_BIKE_VOUCHER
jr .done jr .done
.BagFull .bag_full
ld hl, .bagfulltext ld hl, .bagfulltext
call PrintText call PrintText
jr .done jr .done

View file

@ -42,7 +42,8 @@ PokemonTower6Script0:
ret ret
CoordsData_60b45: CoordsData_60b45:
db $10,$0A,$FF db $10,$0A
db $FF
PokemonTower6Script4: PokemonTower6Script4:
ld a, [wIsInBattle] ld a, [wIsInBattle]

View file

@ -2,14 +2,14 @@ RedsHouse1F_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
RedsHouse1F_TextPointers: RedsHouse1F_TextPointers:
dw RedsHouse1FText1 dw RedsHouse1FMomText
dw RedsHouse1FText2 dw RedsHouse1FTVText
RedsHouse1FText1: ; Mom RedsHouse1FMomText:
text_asm text_asm
ld a, [wd72e] ld a, [wd72e]
bit 3, a bit 3, a ; received a Pokémon from Oak?
jr nz, .heal ; if player has received a Pokémon from Oak, heal team jr nz, .heal
ld hl, MomWakeUpText ld hl, MomWakeUpText
call PrintText call PrintText
jr .done jr .done
@ -49,14 +49,14 @@ MomHealText2:
text_far _MomHealText2 text_far _MomHealText2
text_end text_end
RedsHouse1FText2: ; TV RedsHouse1FTVText:
text_asm text_asm
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
ld hl, TVWrongSideText ld hl, TVWrongSideText
jr nz, .notUp jr nz, .got_text
ld hl, StandByMeText ld hl, StandByMeText
.notUp .got_text
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -21,4 +21,5 @@ RedsHouse2FScript1:
ret ret
RedsHouse2F_TextPointers: RedsHouse2F_TextPointers:
text_end
text_end ; unused

View file

@ -9,7 +9,7 @@ RockTunnelPokecenter_TextPointers:
dw RockTunnelTradeNurseText dw RockTunnelTradeNurseText
RockTunnelHealNurseText: RockTunnelHealNurseText:
db $ff script_pokecenter_nurse
RockTunnelPokecenterText2: RockTunnelPokecenterText2:
text_far _RockTunnelPokecenterText2 text_far _RockTunnelPokecenterText2
@ -20,4 +20,4 @@ RockTunnelPokecenterText3:
text_end text_end
RockTunnelTradeNurseText: RockTunnelTradeNurseText:
db $f6 script_cable_club_receptionist

View file

@ -41,19 +41,18 @@ RocketHideoutElevatorScript_45741:
ret ret
RocketHideoutElavatorFloors: RocketHideoutElavatorFloors:
db $03 ; num elements in list db 3 ; #
db FLOOR_B1F db FLOOR_B1F
db FLOOR_B2F db FLOOR_B2F
db FLOOR_B4F db FLOOR_B4F
db $FF ; terminator db -1 ; end
RocketHideoutElevatorWarpMaps:
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator. ; These specify where the player goes after getting out of the elevator.
db $04, ROCKET_HIDEOUT_B1F RocketHideoutElevatorWarpMaps:
db $04, ROCKET_HIDEOUT_B2F ; warp number, map id
db $02, ROCKET_HIDEOUT_B4F db 4, ROCKET_HIDEOUT_B1F
db 4, ROCKET_HIDEOUT_B2F
db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd: RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f: RocketHideoutElevatorScript_4575f:

View file

@ -9,20 +9,20 @@ Route1_TextPointers:
Route1Text1: Route1Text1:
text_asm text_asm
CheckAndSetEvent EVENT_GOT_POTION_SAMPLE CheckAndSetEvent EVENT_GOT_POTION_SAMPLE
jr nz, .asm_1cada jr nz, .got_item
ld hl, Route1ViridianMartSampleText ld hl, Route1ViridianMartSampleText
call PrintText call PrintText
lb bc, POTION, 1 lb bc, POTION, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, Route1Text_1cae8 ld hl, Route1Text_1cae8
jr .asm_1cadd jr .done
.BagFull .bag_full
ld hl, Route1Text_1caf3 ld hl, Route1Text_1caf3
jr .asm_1cadd jr .done
.asm_1cada .got_item
ld hl, Route1Text_1caee ld hl, Route1Text_1caee
.asm_1cadd .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -18,10 +18,10 @@ Route11GateUpstairsScriptEnd:
Route11GateUpstairsText2: Route11GateUpstairsText2:
text_asm text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1 CheckEvent EVENT_GOT_ITEMFINDER, 1
jr c, .asm_4949b jr c, .got_item
ld a, 30 ; pokemon needed ld a, 30
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, ITEMFINDER ; oak's aide reward ld a, ITEMFINDER
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -32,13 +32,13 @@ Route11GateUpstairsText2:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
dec a dec a ; OAKS_AIDE_GOT_ITEM?
jr nz, .asm_494a1 jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER SetEvent EVENT_GOT_ITEMFINDER
.asm_4949b .got_item
ld hl, Route11GateUpstairsText_494a3 ld hl, Route11GateUpstairsText_494a3
call PrintText call PrintText
.asm_494a1 .no_item
jr Route11GateUpstairsScriptEnd jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3: Route11GateUpstairsText_494a3:

View file

@ -9,24 +9,24 @@ Route12Gate2F_TextPointers:
Route12GateUpstairsText1: Route12GateUpstairsText1:
text_asm text_asm
CheckEvent EVENT_GOT_TM39, 1 CheckEvent EVENT_GOT_TM39, 1
jr c, .asm_0ad3c jr c, .got_item
ld hl, TM39PreReceiveText ld hl, TM39PreReceiveText
call PrintText call PrintText
lb bc, TM_SWIFT, 1 lb bc, TM_SWIFT, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM39Text ld hl, ReceivedTM39Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM39 SetEvent EVENT_GOT_TM39
jr .asm_4ba56 jr .done
.BagFull .bag_full
ld hl, TM39NoRoomText ld hl, TM39NoRoomText
call PrintText call PrintText
jr .asm_4ba56 jr .done
.asm_0ad3c .got_item
ld hl, TM39ExplanationText ld hl, TM39ExplanationText
call PrintText call PrintText
.asm_4ba56 .done
jp TextScriptEnd jp TextScriptEnd
TM39PreReceiveText: TM39PreReceiveText:
@ -68,7 +68,7 @@ GateUpstairsScript_PrintIfFacingUp:
ld a, [wSpritePlayerStateData1FacingDirection] ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
jr z, .up jr z, .up
ld a, $1 ld a, TRUE
jr .done jr .done
.up .up
call PrintText call PrintText

View file

@ -7,30 +7,30 @@ Route12SuperRodHouse_TextPointers:
Route12HouseText1: Route12HouseText1:
text_asm text_asm
ld a, [wd728] ld a, [wd728]
bit 5, a bit 5, a ; received super rod?
jr nz, .asm_b4cad jr nz, .got_item
ld hl, Route12HouseText_564c0 ld hl, Route12HouseText_564c0
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_a2d76 jr nz, .refused
lb bc, SUPER_ROD, 1 lb bc, SUPER_ROD, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, wd728 ld hl, wd728
set 5, [hl] set 5, [hl] ; received super rod
ld hl, Route12HouseText_564c5 ld hl, Route12HouseText_564c5
jr .asm_df984 jr .done
.BagFull .bag_full
ld hl, Route12HouseText_564d9 ld hl, Route12HouseText_564d9
jr .asm_df984 jr .done
.asm_a2d76 .refused
ld hl, Route12HouseText_564cf ld hl, Route12HouseText_564cf
jr .asm_df984 jr .done
.asm_b4cad .got_item
ld hl, Route12HouseText_564d4 ld hl, Route12HouseText_564d4
.asm_df984 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -8,10 +8,10 @@ Route15Gate2F_TextPointers:
Route15GateUpstairsText1: Route15GateUpstairsText1:
text_asm text_asm
CheckEvent EVENT_GOT_EXP_ALL CheckEvent EVENT_GOT_EXP_ALL
jr nz, .asm_49683 jr nz, .got_item
ld a, 50 ; pokemon needed ld a, 50
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, EXP_ALL ; oak's aide reward ld a, EXP_ALL
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -21,13 +21,13 @@ Route15GateUpstairsText1:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
cp $1 cp OAKS_AIDE_GOT_ITEM
jr nz, .asm_49689 jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL SetEvent EVENT_GOT_EXP_ALL
.asm_49683 .got_item
ld hl, Route15GateUpstairsText_4968c ld hl, Route15GateUpstairsText_4968c
call PrintText call PrintText
.asm_49689 .no_item
jp TextScriptEnd jp TextScriptEnd
Route15GateUpstairsText_4968c: Route15GateUpstairsText_4968c:

View file

@ -9,18 +9,18 @@ Route16HouseText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM02 CheckEvent EVENT_GOT_HM02
ld hl, HM02ExplanationText ld hl, HM02ExplanationText
jr nz, .asm_13616 jr nz, .got_item
ld hl, Route16HouseText3 ld hl, Route16HouseText3
call PrintText call PrintText
lb bc, HM_FLY, 1 lb bc, HM_FLY, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_HM02 SetEvent EVENT_GOT_HM02
ld hl, ReceivedHM02Text ld hl, ReceivedHM02Text
jr .asm_13616 jr .got_item
.BagFull .bag_full
ld hl, HM02NoRoomText ld hl, HM02NoRoomText
.asm_13616 .got_item
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -61,7 +61,8 @@ Route23Script0:
ret ret
YCoordsData_51255: YCoordsData_51255:
db $23,$38,$55,$60,$69,$77,$88,$FF db $23,$38,$55,$60,$69,$77,$88
db $FF
Route23Script_5125d: Route23Script_5125d:
ld hl, BadgeTextPointers ld hl, BadgeTextPointers

View file

@ -45,7 +45,8 @@ Route24Script0:
ret ret
CoordsData_5140e: CoordsData_5140e:
db $0F,$0A,$FF db $0F,$0A
db $FF
Route24Script4: Route24Script4:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]
@ -103,12 +104,12 @@ Route24Text1:
text_asm text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET CheckEvent EVENT_GOT_NUGGET
jr nz, .asm_514f9 jr nz, .got_item
ld hl, Route24Text_51510 ld hl, Route24Text_51510
call PrintText call PrintText
lb bc, NUGGET, 1 lb bc, NUGGET, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET SetEvent EVENT_GOT_NUGGET
ld hl, Route24Text_5151a ld hl, Route24Text_5151a
call PrintText call PrintText
@ -130,11 +131,11 @@ Route24Text1:
ld [wRoute24CurScript], a ld [wRoute24CurScript], a
ld [wCurMapScript], a ld [wCurMapScript], a
jp TextScriptEnd jp TextScriptEnd
.asm_514f9 .got_item
ld hl, Route24Text_51530 ld hl, Route24Text_51530
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd
.BagFull .bag_full
ld hl, Route24Text_51521 ld hl, Route24Text_51521
call PrintText call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE SetEvent EVENT_NUGGET_REWARD_AVAILABLE

View file

@ -8,10 +8,10 @@ Route2Gate_TextPointers:
Route2GateText1: Route2GateText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM05 CheckEvent EVENT_GOT_HM05
jr nz, .asm_5d60d jr nz, .got_item
ld a, 10 ; pokemon needed ld a, 10
ldh [hOaksAideRequirement], a ldh [hOaksAideRequirement], a
ld a, HM_FLASH ; oak's aide reward ld a, HM_FLASH
ldh [hOaksAideRewardItem], a ldh [hOaksAideRewardItem], a
ld [wd11e], a ld [wd11e], a
call GetItemName call GetItemName
@ -21,13 +21,13 @@ Route2GateText1:
call CopyData call CopyData
predef OaksAideScript predef OaksAideScript
ldh a, [hOaksAideResult] ldh a, [hOaksAideResult]
cp $1 cp OAKS_AIDE_GOT_ITEM
jr nz, .asm_5d613 jr nz, .no_item
SetEvent EVENT_GOT_HM05 SetEvent EVENT_GOT_HM05
.asm_5d60d .got_item
ld hl, Route2GateText_5d616 ld hl, Route2GateText_5d616
call PrintText call PrintText
.asm_5d613 .no_item
jp TextScriptEnd jp TextScriptEnd
Route2GateText_5d616: Route2GateText_5d616:

View file

@ -40,7 +40,8 @@ Route6GateScript0:
CoordsData_1e08c: CoordsData_1e08c:
db $02,$03 db $02,$03
db $02,$04,$FF db $02,$04
db $FF
Route6GateScript1: Route6GateScript1:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -1,5 +1,5 @@
SSAnne2FRooms_Script: SSAnne2FRooms_Script:
ld a, $1 ld a, TRUE
ld [wAutoTextBoxDrawingControl], a ld [wAutoTextBoxDrawingControl], a
xor a xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld [wDoNotWaitForButtonPressAfterDisplayingText], a

View file

@ -2,4 +2,5 @@ SSAnneB1F_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers: SSAnneB1F_TextPointers:
text_end
text_end ; unused

View file

@ -17,28 +17,28 @@ SSAnneCaptainsRoom_TextPointers:
SSAnne7Text1: SSAnne7Text1:
text_asm text_asm
CheckEvent EVENT_GOT_HM01 CheckEvent EVENT_GOT_HM01
jr nz, .asm_797c4 jr nz, .got_item
ld hl, SSAnne7RubText ld hl, SSAnne7RubText
call PrintText call PrintText
ld hl, ReceivingHM01Text ld hl, ReceivingHM01Text
call PrintText call PrintText
lb bc, HM_CUT, 1 lb bc, HM_CUT, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedHM01Text ld hl, ReceivedHM01Text
call PrintText call PrintText
SetEvent EVENT_GOT_HM01 SetEvent EVENT_GOT_HM01
jr .asm_0faf5 jr .done
.BagFull .bag_full
ld hl, HM01NoRoomText ld hl, HM01NoRoomText
call PrintText call PrintText
ld hl, wd72d ld hl, wd72d
set 5, [hl] set 5, [hl]
jr .asm_0faf5 jr .done
.asm_797c4 .got_item
ld hl, SSAnne7Text_61932 ld hl, SSAnne7Text_61932
call PrintText call PrintText
.asm_0faf5 .done
jp TextScriptEnd jp TextScriptEnd
SSAnne7RubText: SSAnne7RubText:

View file

@ -41,17 +41,17 @@ SSAnne6Text7:
call PrintText call PrintText
ldh a, [hRandomAdd] ldh a, [hRandomAdd]
bit 7, a bit 7, a
jr z, .asm_93eb1 jr z, .not_dialog_1
ld hl, SSAnne6Text_6180c ld hl, SSAnne6Text_6180c
jr .asm_63292 jr .done
.asm_93eb1 .not_dialog_1
bit 4, a bit 4, a
jr z, .asm_7436c jr z, .not_dialog_2
ld hl, SSAnne6Text_61811 ld hl, SSAnne6Text_61811
jr .asm_63292 jr .done
.asm_7436c .not_dialog_2
ld hl, SSAnne6Text_61816 ld hl, SSAnne6Text_61816
.asm_63292 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -7,24 +7,24 @@ SafariZoneSecretHouse_TextPointers:
SafariZoneSecretHouseText1: SafariZoneSecretHouseText1:
text_asm text_asm
CheckEvent EVENT_GOT_HM03 CheckEvent EVENT_GOT_HM03
jr nz, .asm_20a9b jr nz, .got_item
ld hl, SafariZoneSecretHouseText_4a350 ld hl, SafariZoneSecretHouseText_4a350
call PrintText call PrintText
lb bc, HM_SURF, 1 lb bc, HM_SURF, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedHM03Text ld hl, ReceivedHM03Text
call PrintText call PrintText
SetEvent EVENT_GOT_HM03 SetEvent EVENT_GOT_HM03
jr .asm_8f1fc jr .done
.BagFull .bag_full
ld hl, HM03NoRoomText ld hl, HM03NoRoomText
call PrintText call PrintText
jr .asm_8f1fc jr .done
.asm_20a9b .got_item
ld hl, HM03ExplanationText ld hl, HM03ExplanationText
call PrintText call PrintText
.asm_8f1fc .done
jp TextScriptEnd jp TextScriptEnd
SafariZoneSecretHouseText_4a350: SafariZoneSecretHouseText_4a350:

View file

@ -289,24 +289,24 @@ SilphCo11TrainerHeader1:
SilphCo11Text1: SilphCo11Text1:
text_asm text_asm
CheckEvent EVENT_GOT_MASTER_BALL CheckEvent EVENT_GOT_MASTER_BALL
jp nz, .asm_62308 jp nz, .got_item
ld hl, SilphCoPresidentText ld hl, SilphCoPresidentText
call PrintText call PrintText
lb bc, MASTER_BALL, 1 lb bc, MASTER_BALL, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedSilphCoMasterBallText ld hl, ReceivedSilphCoMasterBallText
call PrintText call PrintText
SetEvent EVENT_GOT_MASTER_BALL SetEvent EVENT_GOT_MASTER_BALL
jr .asm_6230e jr .done
.BagFull .bag_full
ld hl, SilphCoMasterBallNoRoomText ld hl, SilphCoMasterBallNoRoomText
call PrintText call PrintText
jr .asm_6230e jr .done
.asm_62308 .got_item
ld hl, SilphCo10Text_6231c ld hl, SilphCo10Text_6231c
call PrintText call PrintText
.asm_6230e .done
jp TextScriptEnd jp TextScriptEnd
SilphCoPresidentText: SilphCoPresidentText:

View file

@ -41,7 +41,7 @@ SilphCoElevatorScript_457f1:
ret ret
SilphCoElevatorFloors: SilphCoElevatorFloors:
db $0B ; num elements in list db 11 ; #
db FLOOR_1F db FLOOR_1F
db FLOOR_2F db FLOOR_2F
db FLOOR_3F db FLOOR_3F
@ -53,23 +53,22 @@ SilphCoElevatorFloors:
db FLOOR_9F db FLOOR_9F
db FLOOR_10F db FLOOR_10F
db FLOOR_11F db FLOOR_11F
db $FF ; terminator db -1 ; end
SilphCoElevatorWarpMaps:
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator. ; These specify where the player goes after getting out of the elevator.
db $03, SILPH_CO_1F SilphCoElevatorWarpMaps:
db $02, SILPH_CO_2F ; warp number, map id
db $02, SILPH_CO_3F db 3, SILPH_CO_1F
db $02, SILPH_CO_4F db 2, SILPH_CO_2F
db $02, SILPH_CO_5F db 2, SILPH_CO_3F
db $02, SILPH_CO_6F db 2, SILPH_CO_4F
db $02, SILPH_CO_7F db 2, SILPH_CO_5F
db $02, SILPH_CO_8F db 2, SILPH_CO_6F
db $02, SILPH_CO_9F db 2, SILPH_CO_7F
db $02, SILPH_CO_10F db 2, SILPH_CO_8F
db $01, SILPH_CO_11F db 2, SILPH_CO_9F
db 2, SILPH_CO_10F
db 1, SILPH_CO_11F
SilphCoElevatorWarpMapsEnd: SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827: SilphCoElevatorScript_45827:

View file

@ -15,16 +15,16 @@ TradeCenter_Script:
set 0, [hl] set 0, [hl]
ret nz ret nz
ld hl, wSprite01StateData2MapY ld hl, wSprite01StateData2MapY
ld a, $8 ld a, 8 ; y
ld [hli], a ld [hli], a
ld a, $a ld a, 10 ; x
ld [hl], a ld [hl], a
ld a, SPRITE_FACING_LEFT ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a ld [wSprite01StateData1FacingDirection], a
ldh a, [hSerialConnectionStatus] ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK cp USING_INTERNAL_CLOCK
ret z ret z
ld a, $7 ld a, 7 ; x
ld [wSprite01StateData2MapX], a ld [wSprite01StateData2MapX], a
ld a, SPRITE_FACING_RIGHT ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a ld [wSprite01StateData1FacingDirection], a

View file

@ -2,4 +2,5 @@ UndergroundPathNorthSouth_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
UndergroundPathNorthSouth_TextPointers: UndergroundPathNorthSouth_TextPointers:
text_end
text_end ; unused

View file

@ -2,4 +2,5 @@ UndergroundPathWestEast_Script:
jp EnableAutoTextBoxDrawing jp EnableAutoTextBoxDrawing
UndergroundPathWestEast_TextPointers: UndergroundPathWestEast_TextPointers:
text_end
text_end ; unused

View file

@ -7,30 +7,30 @@ VermilionOldRodHouse_TextPointers:
VermilionHouse2Text1: VermilionHouse2Text1:
text_asm text_asm
ld a, [wd728] ld a, [wd728]
bit 3, a bit 3, a ; got old rod?
jr nz, .asm_03ef5 jr nz, .got_item
ld hl, VermilionHouse2Text_560b1 ld hl, VermilionHouse2Text_560b1
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_eb1b7 jr nz, .refused
lb bc, OLD_ROD, 1 lb bc, OLD_ROD, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, wd728 ld hl, wd728
set 3, [hl] set 3, [hl] ; got old rod
ld hl, VermilionHouse2Text_560b6 ld hl, VermilionHouse2Text_560b6
jr .asm_5dd95 jr .done
.BagFull .bag_full
ld hl, VermilionHouse2Text_560ca ld hl, VermilionHouse2Text_560ca
jr .asm_5dd95 jr .done
.asm_eb1b7 .refused
ld hl, VermilionHouse2Text_560c0 ld hl, VermilionHouse2Text_560c0
jr .asm_5dd95 jr .done
.asm_03ef5 .got_item
ld hl, VermilionHouse2Text_560c5 ld hl, VermilionHouse2Text_560c5
.asm_5dd95 .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd

View file

@ -35,7 +35,8 @@ VictoryRoad1Script0:
ret ret
CoordsData_5da5c: CoordsData_5da5c:
db $0D,$11,$FF db $0D,$11
db $FF
VictoryRoad1F_TextPointers: VictoryRoad1F_TextPointers:
dw VictoryRoad1Text1 dw VictoryRoad1Text1

View file

@ -18,11 +18,11 @@ ViridianCityScript_1900b:
CheckEvent EVENT_VIRIDIAN_GYM_OPEN CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz ret nz
ld a, [wObtainedBadges] ld a, [wObtainedBadges]
cp %01111111 cp $ff ^ (1 << BIT_EARTHBADGE)
jr nz, .gymClosed jr nz, .gym_closed
SetEvent EVENT_VIRIDIAN_GYM_OPEN SetEvent EVENT_VIRIDIAN_GYM_OPEN
ret ret
.gymClosed .gym_closed
ld a, [wYCoord] ld a, [wYCoord]
cp $8 cp $8
ret nz ret nz
@ -148,13 +148,13 @@ ViridianCityText1:
ViridianCityText2: ViridianCityText2:
text_asm text_asm
ld a, [wObtainedBadges] ld a, [wObtainedBadges]
cp %01111111 cp $ff ^ (1 << BIT_EARTHBADGE)
ld hl, ViridianCityText_19127 ld hl, ViridianCityText_19127
jr z, .printAndDone jr z, .done
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr nz, .printAndDone jr nz, .done
ld hl, ViridianCityText_19122 ld hl, ViridianCityText_19122
.printAndDone .done
call PrintText call PrintText
jp TextScriptEnd jp TextScriptEnd
@ -232,21 +232,21 @@ ViridianCityText_19191:
ViridianCityText6: ViridianCityText6:
text_asm text_asm
CheckEvent EVENT_GOT_TM42 CheckEvent EVENT_GOT_TM42
jr nz, .gotTm42 jr nz, .got_item
ld hl, ViridianCityText_191ca ld hl, ViridianCityText_191ca
call PrintText call PrintText
lb bc, TM_DREAM_EATER, 1 lb bc, TM_DREAM_EATER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedTM42Text ld hl, ReceivedTM42Text
call PrintText call PrintText
SetEvent EVENT_GOT_TM42 SetEvent EVENT_GOT_TM42
jr .done jr .done
.BagFull .bag_full
ld hl, TM42NoRoomText ld hl, TM42NoRoomText
call PrintText call PrintText
jr .done jr .done
.gotTm42 .got_item
ld hl, TM42Explanation ld hl, TM42Explanation
call PrintText call PrintText
.done .done
@ -278,13 +278,13 @@ ViridianCityText7:
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr z, .hurry jr z, .refused
ld hl, ViridianCityText_1920f ld hl, ViridianCityText_1920f
call PrintText call PrintText
ld a, $1 ld a, $1
ld [wViridianCityCurScript], a ld [wViridianCityCurScript], a
jr .done jr .done
.hurry .refused
ld hl, ViridianCityText_19214 ld hl, ViridianCityText_19214
call PrintText call PrintText
.done .done

View file

@ -81,40 +81,52 @@ ViridianGymArrowTilePlayerMovement:
;format: direction, count ;format: direction, count
ViridianGymArrowMovement1: ViridianGymArrowMovement1:
db D_UP,$09,$FF db D_UP,$09
db $FF
ViridianGymArrowMovement2: ViridianGymArrowMovement2:
db D_LEFT,$08,$FF db D_LEFT,$08
db $FF
ViridianGymArrowMovement3: ViridianGymArrowMovement3:
db D_DOWN,$09,$FF db D_DOWN,$09
db $FF
ViridianGymArrowMovement4: ViridianGymArrowMovement4:
db D_RIGHT,$06,$FF db D_RIGHT,$06
db $FF
ViridianGymArrowMovement5: ViridianGymArrowMovement5:
db D_DOWN,$02,$FF db D_DOWN,$02
db $FF
ViridianGymArrowMovement6: ViridianGymArrowMovement6:
db D_DOWN,$07,$FF db D_DOWN,$07
db $FF
ViridianGymArrowMovement7: ViridianGymArrowMovement7:
db D_RIGHT,$08,$FF db D_RIGHT,$08
db $FF
ViridianGymArrowMovement8: ViridianGymArrowMovement8:
db D_RIGHT,$09,$FF db D_RIGHT,$09
db $FF
ViridianGymArrowMovement9: ViridianGymArrowMovement9:
db D_UP,$08,$FF db D_UP,$08
db $FF
ViridianGymArrowMovement10: ViridianGymArrowMovement10:
db D_UP,$06,$FF db D_UP,$06
db $FF
ViridianGymArrowMovement11: ViridianGymArrowMovement11:
db D_LEFT,$06,$FF db D_LEFT,$06
db $FF
ViridianGymArrowMovement12: ViridianGymArrowMovement12:
db D_LEFT,$0C,$FF db D_LEFT,$0C
db $FF
ViridianGymScript4: ViridianGymScript4:
ld a, [wSimulatedJoypadStatesIndex] ld a, [wSimulatedJoypadStatesIndex]

View file

@ -7,12 +7,12 @@ ViridianMart_Script:
ViridianMartScript_1d47d: ViridianMartScript_1d47d:
CheckEvent EVENT_OAK_GOT_PARCEL CheckEvent EVENT_OAK_GOT_PARCEL
jr nz, .asm_1d489 jr nz, .delivered_parcel
ld hl, ViridianMart_TextPointers ld hl, ViridianMart_TextPointers
jr .asm_1d48c jr .done
.asm_1d489 .delivered_parcel
ld hl, ViridianMart_TextPointers2 ld hl, ViridianMart_TextPointers2
.asm_1d48c .done
ld a, l ld a, l
ld [wMapTextPtr], a ld [wMapTextPtr], a
ld a, h ld a, h
@ -67,6 +67,7 @@ ViridianMart_TextPointers:
dw ViridianMartText3 dw ViridianMartText3
dw ViridianMartText4 dw ViridianMartText4
dw ViridianMartText5 dw ViridianMartText5
ViridianMart_TextPointers2: ViridianMart_TextPointers2:
dw ViridianCashierText dw ViridianCashierText
dw ViridianMartText2 dw ViridianMartText2

View file

@ -11,48 +11,48 @@ WardensHouse_TextPointers:
FuchsiaHouse2Text1: FuchsiaHouse2Text1:
text_asm text_asm
CheckEvent EVENT_GOT_HM04 CheckEvent EVENT_GOT_HM04
jr nz, .subtract jr nz, .got_item
ld b, GOLD_TEETH ld b, GOLD_TEETH
call IsItemInBag call IsItemInBag
jr nz, .asm_3f30f jr nz, .have_gold_teeth
CheckEvent EVENT_GAVE_GOLD_TEETH CheckEvent EVENT_GAVE_GOLD_TEETH
jr nz, .asm_60cba jr nz, .gave_gold_teeth
ld hl, WardenGibberishText1 ld hl, WardenGibberishText1
call PrintText call PrintText
call YesNoChoice call YesNoChoice
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
ld hl, WardenGibberishText3 ld hl, WardenGibberishText3
jr nz, .asm_61238 jr nz, .refused
ld hl, WardenGibberishText2 ld hl, WardenGibberishText2
.asm_61238 .refused
call PrintText call PrintText
jr .asm_52039 jr .done
.asm_3f30f .have_gold_teeth
ld hl, WardenTeethText1 ld hl, WardenTeethText1
call PrintText call PrintText
ld a, GOLD_TEETH ld a, GOLD_TEETH
ldh [hItemToRemoveID], a ldh [hItemToRemoveID], a
farcall RemoveItemByID farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH SetEvent EVENT_GAVE_GOLD_TEETH
.asm_60cba .gave_gold_teeth
ld hl, WardenThankYouText ld hl, WardenThankYouText
call PrintText call PrintText
lb bc, HM_STRENGTH, 1 lb bc, HM_STRENGTH, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .bag_full
ld hl, ReceivedHM04Text ld hl, ReceivedHM04Text
call PrintText call PrintText
SetEvent EVENT_GOT_HM04 SetEvent EVENT_GOT_HM04
jr .asm_52039 jr .done
.subtract .got_item
ld hl, HM04ExplanationText ld hl, HM04ExplanationText
call PrintText call PrintText
jr .asm_52039 jr .done
.BagFull .bag_full
ld hl, HM04NoRoomText ld hl, HM04NoRoomText
call PrintText call PrintText
.asm_52039 .done
jp TextScriptEnd jp TextScriptEnd
WardenGibberishText1: WardenGibberishText1:

View file

@ -29,14 +29,14 @@ _DaisyUseMapText::
cont "you are." cont "you are."
done done
_BluesHouseText2:: _BluesHouseDaisyWalkingText::
text "#MON are living" text "#MON are living"
line "things! If they" line "things! If they"
cont "get tired, give" cont "get tired, give"
cont "them a rest!" cont "them a rest!"
done done
_BluesHouseText3:: _BluesHouseTownMapText::
text "It's a big map!" text "It's a big map!"
line "This is useful!" line "This is useful!"
done done