diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-16 11:19:05 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-16 11:19:05 -0400 |
commit | 594c58a289cbad3954899d76ed000f483389472f (patch) | |
tree | 31c04c8930d25b68819d47b627a252ec271be849 /scripts | |
parent | 58f10893707004fe353422e19f3d1f2b89e60a6c (diff) |
Revise some map scripts, mostly for getting items
Diffstat (limited to 'scripts')
55 files changed, 356 insertions, 339 deletions
diff --git a/scripts/BluesHouse.asm b/scripts/BluesHouse.asm index 241d6f5a..1ab0fd06 100755 --- a/scripts/BluesHouse.asm +++ b/scripts/BluesHouse.asm @@ -10,9 +10,7 @@ BluesHouse_ScriptPointers: BluesHouseScript0: SetEvent EVENT_ENTERED_BLUES_HOUSE - - ; trigger the next script - ld a, 1 + ld a, $1 ld [wBluesHouseCurScript], a ret @@ -20,40 +18,40 @@ BluesHouseScript1: ret BluesHouse_TextPointers: - dw BluesHouseText1 - dw BluesHouseText2 - dw BluesHouseText3 + dw BluesHouseDaisySittingText + dw BluesHouseDaisyWalkingText + dw BluesHouseTownMapText -BluesHouseText1: +BluesHouseDaisySittingText: text_asm CheckEvent EVENT_GOT_TOWN_MAP - jr nz, .GotMap + jr nz, .got_town_map CheckEvent EVENT_GOT_POKEDEX - jr nz, .GiveMap + jr nz, .give_town_map ld hl, DaisyInitialText call PrintText jr .done -.GiveMap +.give_town_map ld hl, DaisyOfferMapText call PrintText lb bc, TOWN_MAP, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld a, HS_TOWN_MAP ld [wMissableObjectIndex], a - predef HideObject ; hide table map object + predef HideObject ld hl, GotMapText call PrintText SetEvent EVENT_GOT_TOWN_MAP jr .done -.GotMap +.got_town_map ld hl, DaisyUseMapText call PrintText jr .done -.BagFull +.bag_full ld hl, DaisyBagFullText call PrintText .done @@ -80,10 +78,10 @@ DaisyUseMapText: text_far _DaisyUseMapText text_end -BluesHouseText2: ; Daisy, walking around - text_far _BluesHouseText2 +BluesHouseDaisyWalkingText: + text_far _BluesHouseDaisyWalkingText text_end -BluesHouseText3: ; map on table - text_far _BluesHouseText3 +BluesHouseTownMapText: + text_far _BluesHouseTownMapText text_end diff --git a/scripts/CeladonDiner.asm b/scripts/CeladonDiner.asm index e5a2d8b2..e95035f0 100755 --- a/scripts/CeladonDiner.asm +++ b/scripts/CeladonDiner.asm @@ -28,24 +28,24 @@ CeladonDinerText4: CeladonDinerText5: text_asm CheckEvent EVENT_GOT_COIN_CASE - jr nz, .asm_eb14d + jr nz, .got_item ld hl, CeladonDinerText_491a7 call PrintText lb bc, COIN_CASE, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_COIN_CASE ld hl, ReceivedCoinCaseText call PrintText - jr .asm_68b61 -.BagFull + jr .done +.bag_full ld hl, CoinCaseNoRoomText call PrintText - jr .asm_68b61 -.asm_eb14d + jr .done +.got_item ld hl, CeladonDinerText_491b7 call PrintText -.asm_68b61 +.done jp TextScriptEnd CeladonDinerText_491a7: diff --git a/scripts/CeladonMansion1F.asm b/scripts/CeladonMansion1F.asm index 2a386aad..fa901ff9 100755 --- a/scripts/CeladonMansion1F.asm +++ b/scripts/CeladonMansion1F.asm @@ -8,7 +8,7 @@ CeladonMansion1F_TextPointers: dw CeladonMansion1Text4 dw CeladonMansion1Text5 -CeladonMansion1_486a1: +CeladonMansion1_PlayCryScript: call PlayCry jp TextScriptEnd @@ -16,7 +16,7 @@ CeladonMansion1Text1: text_far _CeladonMansion1Text1 text_asm ld a, MEOWTH - jp CeladonMansion1_486a1 + jp CeladonMansion1_PlayCryScript CeladonMansion1Text2: text_far _CeladonMansion1Text2 @@ -26,13 +26,13 @@ CeladonMansion1Text3: text_far _CeladonMansion1Text3 text_asm ld a, CLEFAIRY - jp CeladonMansion1_486a1 + jp CeladonMansion1_PlayCryScript CeladonMansion1Text4: text_far _CeladonMansion1Text4 text_asm ld a, NIDORAN_F - jp CeladonMansion1_486a1 + jp CeladonMansion1_PlayCryScript CeladonMansion1Text5: text_far _CeladonMansion1Text5 diff --git a/scripts/CeladonMansion3F.asm b/scripts/CeladonMansion3F.asm index b2d40b44..f8972793 100755 --- a/scripts/CeladonMansion3F.asm +++ b/scripts/CeladonMansion3F.asm @@ -25,32 +25,30 @@ WriterText: DirectorText: text_asm - - ; check pokédex ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits ld a, [wNumSetBits] - cp 150 - jr nc, .CompletedDex - ld hl, .GameDesigner + cp NUM_POKEMON - 1 ; discount Mew + jr nc, .completed_dex + ld hl, .GameDesignerText jr .done -.CompletedDex +.completed_dex ld hl, .CompletedDexText .done call PrintText jp TextScriptEnd -.GameDesigner +.GameDesignerText: text_far _GameDesignerText text_end -.CompletedDexText +.CompletedDexText: text_far _CompletedDexText text_promptbutton text_asm callfar DisplayDiploma - ld a, $1 + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd diff --git a/scripts/CeladonMansionRoofHouse.asm b/scripts/CeladonMansionRoofHouse.asm index 28cec151..bd564dcc 100755 --- a/scripts/CeladonMansionRoofHouse.asm +++ b/scripts/CeladonMansionRoofHouse.asm @@ -13,9 +13,9 @@ CeladonMansion5Text2: text_asm lb bc, EEVEE, 25 call GivePokemon - jr nc, .asm_24365 + jr nc, .party_full ld a, HS_CELADON_MANSION_EEVEE_GIFT ld [wMissableObjectIndex], a predef HideObject -.asm_24365 +.party_full jp TextScriptEnd diff --git a/scripts/CeladonMart3F.asm b/scripts/CeladonMart3F.asm index e3e929da..55081982 100755 --- a/scripts/CeladonMart3F.asm +++ b/scripts/CeladonMart3F.asm @@ -23,21 +23,21 @@ CeladonMart3F_TextPointers: CeladonMart3Text1: text_asm CheckEvent EVENT_GOT_TM18 - jr nz, .asm_a5463 + jr nz, .got_item ld hl, TM18PreReceiveText call PrintText lb bc, TM_COUNTER, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_TM18 ld hl, ReceivedTM18Text - jr .asm_81359 -.BagFull + jr .done +.bag_full ld hl, TM18NoRoomText - jr .asm_81359 -.asm_a5463 + jr .done +.got_item ld hl, TM18ExplanationText -.asm_81359 +.done call PrintText jp TextScriptEnd diff --git a/scripts/CeladonMartElevator.asm b/scripts/CeladonMartElevator.asm index e58c88f0..b657b3f9 100755 --- a/scripts/CeladonMartElevator.asm +++ b/scripts/CeladonMartElevator.asm @@ -40,23 +40,22 @@ CeladonMartElevatorScript_48631: jp CopyData CeladonMartElevatorFloors: - db 5 ; number of elements in list + db 5 ; # db FLOOR_1F db FLOOR_2F db FLOOR_3F db FLOOR_4F 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. - db $05, CELADON_MART_1F - db $02, CELADON_MART_2F - db $02, CELADON_MART_3F - db $02, CELADON_MART_4F - db $02, CELADON_MART_5F +CeladonMartElevatorWarpMaps: + ; warp number, map id + db 5, CELADON_MART_1F + db 2, CELADON_MART_2F + db 2, CELADON_MART_3F + db 2, CELADON_MART_4F + db 2, CELADON_MART_5F CeladonMartElevatorWarpMapsEnd: CeladonMartElevatorScript_48654: diff --git a/scripts/CeruleanBadgeHouse.asm b/scripts/CeruleanBadgeHouse.asm index e1e4ab44..5e35b079 100755 --- a/scripts/CeruleanBadgeHouse.asm +++ b/scripts/CeruleanBadgeHouse.asm @@ -1,5 +1,5 @@ CeruleanBadgeHouse_Script: - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a dec a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -34,7 +34,7 @@ CeruleanHouse2Text1: jr c, .asm_74e60 ld hl, TextPointers_74e86 ld a, [wcf91] - sub $15 + sub BOULDERBADGE add a ld d, $0 ld e, a @@ -52,7 +52,16 @@ CeruleanHouse2Text1: jp TextScriptEnd 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: text_far _CeruleanHouse2Text_74e77 diff --git a/scripts/CeruleanTrashedHouse.asm b/scripts/CeruleanTrashedHouse.asm index 0d1e6ac3..d11c7721 100755 --- a/scripts/CeruleanTrashedHouse.asm +++ b/scripts/CeruleanTrashedHouse.asm @@ -9,17 +9,17 @@ CeruleanTrashedHouse_TextPointers: CeruleanHouseTrashedText1: text_asm - ld b, $e4 + ld b, TM_DIG predef GetQuantityOfItemInBag and b - jr z, .asm_f8734 + jr z, .no_dig_tm ld hl, CeruleanHouseTrashedText_1d6b0 call PrintText - jr .asm_8dfe9 -.asm_f8734 + jr .done +.no_dig_tm ld hl, CeruleanHouseTrashedText_1d6ab call PrintText -.asm_8dfe9 +.done jp TextScriptEnd CeruleanHouseTrashedText_1d6ab: diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm index 8fe52190..2c388119 100755 --- a/scripts/CinnabarLabFossilRoom.asm +++ b/scripts/CinnabarLabFossilRoom.asm @@ -44,7 +44,7 @@ FossilsList: db DOME_FOSSIL db HELIX_FOSSIL db OLD_AMBER - db $00 + db 0 ; end Lab4Text1: text_asm diff --git a/scripts/CinnabarLabMetronomeRoom.asm b/scripts/CinnabarLabMetronomeRoom.asm index 976a2176..b43f98e2 100755 --- a/scripts/CinnabarLabMetronomeRoom.asm +++ b/scripts/CinnabarLabMetronomeRoom.asm @@ -11,24 +11,24 @@ CinnabarLabMetronomeRoom_TextPointers: Lab3Text1: text_asm CheckEvent EVENT_GOT_TM35 - jr nz, .asm_e551a + jr nz, .got_item ld hl, TM35PreReceiveText call PrintText lb bc, TM_METRONOME, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM35Text call PrintText SetEvent EVENT_GOT_TM35 - jr .asm_eb896 -.BagFull + jr .done +.bag_full ld hl, TM35NoRoomText call PrintText - jr .asm_eb896 -.asm_e551a + jr .done +.got_item ld hl, TM35ExplanationText call PrintText -.asm_eb896 +.done jp TextScriptEnd TM35PreReceiveText: diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm index c27043e6..ef0742ab 100755 --- a/scripts/CopycatsHouse2F.asm +++ b/scripts/CopycatsHouse2F.asm @@ -13,34 +13,34 @@ CopycatsHouse2F_TextPointers: CopycatsHouse2FText1: text_asm CheckEvent EVENT_GOT_TM31 - jr nz, .asm_7ccf3 - ld a, $1 + jr nz, .got_item + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CopycatsHouse2FText_5ccd4 call PrintText ld b, POKE_DOLL call IsItemInBag - jr z, .asm_62ecd + jr z, .done ld hl, TM31PreReceiveText call PrintText lb bc, TM_MIMIC, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM31Text call PrintText ld a, POKE_DOLL ldh [hItemToRemoveID], a farcall RemoveItemByID SetEvent EVENT_GOT_TM31 - jr .asm_62ecd -.BagFull + jr .done +.bag_full ld hl, TM31NoRoomText call PrintText - jr .asm_62ecd -.asm_7ccf3 + jr .done +.got_item ld hl, TM31ExplanationText2 call PrintText -.asm_62ecd +.done jp TextScriptEnd CopycatsHouse2FText_5ccd4: diff --git a/scripts/DiglettsCave.asm b/scripts/DiglettsCave.asm index 6746743f..f9f2e590 100755 --- a/scripts/DiglettsCave.asm +++ b/scripts/DiglettsCave.asm @@ -2,4 +2,5 @@ DiglettsCave_Script: jp EnableAutoTextBoxDrawing DiglettsCave_TextPointers: - text_end + + text_end ; unused diff --git a/scripts/FuchsiaGoodRodHouse.asm b/scripts/FuchsiaGoodRodHouse.asm index 848f744c..28f6d056 100755 --- a/scripts/FuchsiaGoodRodHouse.asm +++ b/scripts/FuchsiaGoodRodHouse.asm @@ -7,39 +7,30 @@ FuchsiaGoodRodHouse_TextPointers: FuchsiaHouse3Text1: text_asm ld a, [wd728] - bit 4, a - jr nz, .after - + bit 4, a ; got good rod? + jr nz, .got_item ld hl, FuchsiaHouse3Text_561bd call PrintText - call YesNoChoice ld a, [wCurrentMenuItem] and a jr nz, .refused - lb bc, GOOD_ROD, 1 call GiveItem - jr nc, .full - + jr nc, .bag_full ld hl, wd728 - set 4, [hl] - + set 4, [hl] ; got good rod ld hl, FuchsiaHouse3Text_561c2 - jr .talk - -.full + jr .done +.bag_full ld hl, FuchsiaHouse3Text_5621c - jr .talk - + jr .done .refused ld hl, FuchsiaHouse3Text_56212 - jr .talk - -.after + jr .done +.got_item ld hl, FuchsiaHouse3Text_56217 - -.talk +.done call PrintText jp TextScriptEnd diff --git a/scripts/LavenderCuboneHouse.asm b/scripts/LavenderCuboneHouse.asm index 45f2f8d8..69d74ede 100755 --- a/scripts/LavenderCuboneHouse.asm +++ b/scripts/LavenderCuboneHouse.asm @@ -16,14 +16,14 @@ LavenderHouse2Text1: LavenderHouse2Text2: text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_65711 + jr nz, .rescued_mr_fuji ld hl, LavenderHouse2Text_1d9dc call PrintText - jr .asm_64be1 -.asm_65711 + jr .done +.rescued_mr_fuji ld hl, LavenderHouse2Text_1d9e1 call PrintText -.asm_64be1 +.done jp TextScriptEnd LavenderHouse2Text_1d9dc: diff --git a/scripts/LavenderTown.asm b/scripts/LavenderTown.asm index 7902db45..d0c66208 100755 --- a/scripts/LavenderTown.asm +++ b/scripts/LavenderTown.asm @@ -20,9 +20,9 @@ LavenderTownText1: ld a, [wCurrentMenuItem] and a ld hl, LavenderTownText_44146 - jr nz, .asm_40831 + jr nz, .got_text ld hl, LavenderTownText_44141 -.asm_40831 +.got_text call PrintText jp TextScriptEnd diff --git a/scripts/MrFujisHouse.asm b/scripts/MrFujisHouse.asm index 88f36e4f..3ef3017a 100755 --- a/scripts/MrFujisHouse.asm +++ b/scripts/MrFujisHouse.asm @@ -13,14 +13,14 @@ MrFujisHouse_TextPointers: LavenderHouse1Text1: text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_72e5d + jr nz, .rescued_mr_fuji ld hl, LavenderHouse1Text_1d8d1 call PrintText - jr .asm_6957f -.asm_72e5d + jr .done +.rescued_mr_fuji ld hl, LavenderHouse1Text_1d8d6 call PrintText -.asm_6957f +.done jp TextScriptEnd LavenderHouse1Text_1d8d1: @@ -34,14 +34,14 @@ LavenderHouse1Text_1d8d6: LavenderHouse1Text2: text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_06470 + jr nz, .rescued_mr_fuji ld hl, LavenderHouse1Text_1d8f4 call PrintText - jr .asm_3d208 -.asm_06470 + jr .done +.rescued_mr_fuji ld hl, LavenderHouse1Text_1d8f9 call PrintText -.asm_3d208 +.done jp TextScriptEnd LavenderHouse1Text_1d8f4: @@ -69,24 +69,24 @@ LavenderHouse1Text4: LavenderHouse1Text5: text_asm CheckEvent EVENT_GOT_POKE_FLUTE - jr nz, .asm_15ac2 + jr nz, .got_item ld hl, LavenderHouse1Text_1d94c call PrintText lb bc, POKE_FLUTE, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedFluteText call PrintText SetEvent EVENT_GOT_POKE_FLUTE - jr .asm_da749 -.BagFull + jr .done +.bag_full ld hl, FluteNoRoomText call PrintText - jr .asm_da749 -.asm_15ac2 + jr .done +.got_item ld hl, MrFujiAfterFluteText call PrintText -.asm_da749 +.done jp TextScriptEnd LavenderHouse1Text_1d94c: diff --git a/scripts/MrPsychicsHouse.asm b/scripts/MrPsychicsHouse.asm index 1e694772..399edfbd 100755 --- a/scripts/MrPsychicsHouse.asm +++ b/scripts/MrPsychicsHouse.asm @@ -7,24 +7,24 @@ MrPsychicsHouse_TextPointers: SaffronHouse2Text1: text_asm CheckEvent EVENT_GOT_TM29 - jr nz, .asm_9e72b + jr nz, .got_item ld hl, TM29PreReceiveText call PrintText lb bc, TM_PSYCHIC_M, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM29Text call PrintText SetEvent EVENT_GOT_TM29 - jr .asm_fe4e1 -.BagFull + jr .done +.bag_full ld hl, TM29NoRoomText call PrintText - jr .asm_fe4e1 -.asm_9e72b + jr .done +.got_item ld hl, TM29ExplanationText call PrintText -.asm_fe4e1 +.done jp TextScriptEnd TM29PreReceiveText: diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm index 9ecb8b1c..81cb13da 100755 --- a/scripts/MtMoonB2F.asm +++ b/scripts/MtMoonB2F.asm @@ -123,9 +123,9 @@ CoordsData_49df1: MovementData_49df8: db NPC_MOVEMENT_RIGHT - MovementData_49df9: - db NPC_MOVEMENT_UP,$FF + db NPC_MOVEMENT_UP + db $FF MtMoon3Script5: ld a, [wd730] diff --git a/scripts/Museum1F.asm b/scripts/Museum1F.asm index caec03be..b7240154 100755 --- a/scripts/Museum1F.asm +++ b/scripts/Museum1F.asm @@ -1,5 +1,5 @@ Museum1F_Script: - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -188,24 +188,24 @@ Museum1FText_5c251: Museum1FText3: text_asm CheckEvent EVENT_GOT_OLD_AMBER - jr nz, .asm_5c285 + jr nz, .got_item ld hl, Museum1FText_5c28e call PrintText lb bc, OLD_AMBER, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_OLD_AMBER ld a, HS_OLD_AMBER ld [wMissableObjectIndex], a predef HideObject ld hl, ReceivedOldAmberText - jr .asm_5c288 -.BagFull + jr .done +.bag_full ld hl, Museum1FText_5c29e - jr .asm_5c288 -.asm_5c285 + jr .done +.got_item ld hl, Museum1FText_5c299 -.asm_5c288 +.done call PrintText jp TextScriptEnd diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm index a2e0bfe8..83d1a798 100755 --- a/scripts/OaksLab.asm +++ b/scripts/OaksLab.asm @@ -1,7 +1,7 @@ OaksLab_Script: CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 call nz, OaksLabScript_1d076 - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a diff --git a/scripts/PewterMart.asm b/scripts/PewterMart.asm index b2ae5a11..2b732129 100755 --- a/scripts/PewterMart.asm +++ b/scripts/PewterMart.asm @@ -1,6 +1,6 @@ PewterMart_Script: call EnableAutoTextBoxDrawing - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a ret diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm index 1c626541..5030244c 100755 --- a/scripts/PewterPokecenter.asm +++ b/scripts/PewterPokecenter.asm @@ -17,14 +17,16 @@ PewterPokecenterText2: PewterJigglypuffText: text_asm - ld a, $1 + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, .Text + ld hl, .JigglypuffText call PrintText + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld c, 32 call DelayFrames + ld hl, JigglypuffFacingDirections ld de, wJigglypuffFacingDirections ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections @@ -37,15 +39,16 @@ PewterJigglypuffText: inc hl jr nz, .findMatchingFacingDirectionLoop dec hl + push hl ld c, BANK(Music_JigglypuffSong) ld a, MUSIC_JIGGLYPUFF_SONG call PlayMusic pop hl -.loop + +.spinMovementLoop ld a, [hl] ld [wSprite03StateData1ImageIndex], a - ; rotate the array push hl ld hl, wJigglypuffFacingDirections @@ -55,22 +58,20 @@ PewterJigglypuffText: ld a, [wJigglypuffFacingDirections - 1] ld [wJigglypuffFacingDirections + 3], a pop hl - ld c, 24 call DelayFrames - ld a, [wChannelSoundIDs] ld b, a ld a, [wChannelSoundIDs + Ch2] or b - jr nz, .loop + jr nz, .spinMovementLoop ld c, 48 call DelayFrames call PlayDefaultMusic jp TextScriptEnd -.Text +.JigglypuffText: text_far _PewterJigglypuffText text_end diff --git a/scripts/PokemonFanClub.asm b/scripts/PokemonFanClub.asm index 62a5ce84..717ba4bb 100755 --- a/scripts/PokemonFanClub.asm +++ b/scripts/PokemonFanClub.asm @@ -115,12 +115,12 @@ FanClubText5: call PrintText lb bc, BIKE_VOUCHER, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, .receivedvouchertext call PrintText SetEvent EVENT_GOT_BIKE_VOUCHER jr .done -.BagFull +.bag_full ld hl, .bagfulltext call PrintText jr .done diff --git a/scripts/PokemonTower6F.asm b/scripts/PokemonTower6F.asm index 3c9e1f1d..7318c4b9 100755 --- a/scripts/PokemonTower6F.asm +++ b/scripts/PokemonTower6F.asm @@ -42,7 +42,8 @@ PokemonTower6Script0: ret CoordsData_60b45: - db $10,$0A,$FF + db $10,$0A + db $FF PokemonTower6Script4: ld a, [wIsInBattle] diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm index 9f45a760..bdeb96d7 100755 --- a/scripts/RedsHouse1F.asm +++ b/scripts/RedsHouse1F.asm @@ -2,14 +2,14 @@ RedsHouse1F_Script: jp EnableAutoTextBoxDrawing RedsHouse1F_TextPointers: - dw RedsHouse1FText1 - dw RedsHouse1FText2 + dw RedsHouse1FMomText + dw RedsHouse1FTVText -RedsHouse1FText1: ; Mom +RedsHouse1FMomText: text_asm ld a, [wd72e] - bit 3, a - jr nz, .heal ; if player has received a Pokémon from Oak, heal team + bit 3, a ; received a Pokémon from Oak? + jr nz, .heal ld hl, MomWakeUpText call PrintText jr .done @@ -49,14 +49,14 @@ MomHealText2: text_far _MomHealText2 text_end -RedsHouse1FText2: ; TV +RedsHouse1FTVText: text_asm ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ld hl, TVWrongSideText - jr nz, .notUp + jr nz, .got_text ld hl, StandByMeText -.notUp +.got_text call PrintText jp TextScriptEnd diff --git a/scripts/RedsHouse2F.asm b/scripts/RedsHouse2F.asm index 2e3463ee..b44b9f98 100755 --- a/scripts/RedsHouse2F.asm +++ b/scripts/RedsHouse2F.asm @@ -21,4 +21,5 @@ RedsHouse2FScript1: ret RedsHouse2F_TextPointers: - text_end + + text_end ; unused diff --git a/scripts/RockTunnelPokecenter.asm b/scripts/RockTunnelPokecenter.asm index 999edf13..755bb8f8 100755 --- a/scripts/RockTunnelPokecenter.asm +++ b/scripts/RockTunnelPokecenter.asm @@ -9,7 +9,7 @@ RockTunnelPokecenter_TextPointers: dw RockTunnelTradeNurseText RockTunnelHealNurseText: - db $ff + script_pokecenter_nurse RockTunnelPokecenterText2: text_far _RockTunnelPokecenterText2 @@ -20,4 +20,4 @@ RockTunnelPokecenterText3: text_end RockTunnelTradeNurseText: - db $f6 + script_cable_club_receptionist diff --git a/scripts/RocketHideoutElevator.asm b/scripts/RocketHideoutElevator.asm index 45b27e3b..8c51294e 100755 --- a/scripts/RocketHideoutElevator.asm +++ b/scripts/RocketHideoutElevator.asm @@ -41,19 +41,18 @@ RocketHideoutElevatorScript_45741: ret RocketHideoutElavatorFloors: - db $03 ; num elements in list + db 3 ; # db FLOOR_B1F db FLOOR_B2F 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. - db $04, ROCKET_HIDEOUT_B1F - db $04, ROCKET_HIDEOUT_B2F - db $02, ROCKET_HIDEOUT_B4F +RocketHideoutElevatorWarpMaps: + ; warp number, map id + db 4, ROCKET_HIDEOUT_B1F + db 4, ROCKET_HIDEOUT_B2F + db 2, ROCKET_HIDEOUT_B4F RocketHideoutElevatorWarpMapsEnd: RocketHideoutElevatorScript_4575f: diff --git a/scripts/Route1.asm b/scripts/Route1.asm index 3aa948c7..bd9afea3 100755 --- a/scripts/Route1.asm +++ b/scripts/Route1.asm @@ -9,20 +9,20 @@ Route1_TextPointers: Route1Text1: text_asm CheckAndSetEvent EVENT_GOT_POTION_SAMPLE - jr nz, .asm_1cada + jr nz, .got_item ld hl, Route1ViridianMartSampleText call PrintText lb bc, POTION, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, Route1Text_1cae8 - jr .asm_1cadd -.BagFull + jr .done +.bag_full ld hl, Route1Text_1caf3 - jr .asm_1cadd -.asm_1cada + jr .done +.got_item ld hl, Route1Text_1caee -.asm_1cadd +.done call PrintText jp TextScriptEnd diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm index 21d742c0..47c8db22 100755 --- a/scripts/Route11Gate2F.asm +++ b/scripts/Route11Gate2F.asm @@ -18,10 +18,10 @@ Route11GateUpstairsScriptEnd: Route11GateUpstairsText2: text_asm CheckEvent EVENT_GOT_ITEMFINDER, 1 - jr c, .asm_4949b - ld a, 30 ; pokemon needed + jr c, .got_item + ld a, 30 ldh [hOaksAideRequirement], a - ld a, ITEMFINDER ; oak's aide reward + ld a, ITEMFINDER ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName @@ -32,13 +32,13 @@ Route11GateUpstairsText2: call CopyData predef OaksAideScript ldh a, [hOaksAideResult] - dec a - jr nz, .asm_494a1 + dec a ; OAKS_AIDE_GOT_ITEM? + jr nz, .no_item SetEvent EVENT_GOT_ITEMFINDER -.asm_4949b +.got_item ld hl, Route11GateUpstairsText_494a3 call PrintText -.asm_494a1 +.no_item jr Route11GateUpstairsScriptEnd Route11GateUpstairsText_494a3: diff --git a/scripts/Route12Gate2F.asm b/scripts/Route12Gate2F.asm index a7e426c9..2174fba8 100755 --- a/scripts/Route12Gate2F.asm +++ b/scripts/Route12Gate2F.asm @@ -9,24 +9,24 @@ Route12Gate2F_TextPointers: Route12GateUpstairsText1: text_asm CheckEvent EVENT_GOT_TM39, 1 - jr c, .asm_0ad3c + jr c, .got_item ld hl, TM39PreReceiveText call PrintText lb bc, TM_SWIFT, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM39Text call PrintText SetEvent EVENT_GOT_TM39 - jr .asm_4ba56 -.BagFull + jr .done +.bag_full ld hl, TM39NoRoomText call PrintText - jr .asm_4ba56 -.asm_0ad3c + jr .done +.got_item ld hl, TM39ExplanationText call PrintText -.asm_4ba56 +.done jp TextScriptEnd TM39PreReceiveText: @@ -68,7 +68,7 @@ GateUpstairsScript_PrintIfFacingUp: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP jr z, .up - ld a, $1 + ld a, TRUE jr .done .up call PrintText diff --git a/scripts/Route12SuperRodHouse.asm b/scripts/Route12SuperRodHouse.asm index 6cc1602c..fba5426e 100755 --- a/scripts/Route12SuperRodHouse.asm +++ b/scripts/Route12SuperRodHouse.asm @@ -7,30 +7,30 @@ Route12SuperRodHouse_TextPointers: Route12HouseText1: text_asm ld a, [wd728] - bit 5, a - jr nz, .asm_b4cad + bit 5, a ; received super rod? + jr nz, .got_item ld hl, Route12HouseText_564c0 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_a2d76 + jr nz, .refused lb bc, SUPER_ROD, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, wd728 - set 5, [hl] + set 5, [hl] ; received super rod ld hl, Route12HouseText_564c5 - jr .asm_df984 -.BagFull + jr .done +.bag_full ld hl, Route12HouseText_564d9 - jr .asm_df984 -.asm_a2d76 + jr .done +.refused ld hl, Route12HouseText_564cf - jr .asm_df984 -.asm_b4cad + jr .done +.got_item ld hl, Route12HouseText_564d4 -.asm_df984 +.done call PrintText jp TextScriptEnd diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm index 9887fbc1..1b85e34e 100755 --- a/scripts/Route15Gate2F.asm +++ b/scripts/Route15Gate2F.asm @@ -8,10 +8,10 @@ Route15Gate2F_TextPointers: Route15GateUpstairsText1: text_asm CheckEvent EVENT_GOT_EXP_ALL - jr nz, .asm_49683 - ld a, 50 ; pokemon needed + jr nz, .got_item + ld a, 50 ldh [hOaksAideRequirement], a - ld a, EXP_ALL ; oak's aide reward + ld a, EXP_ALL ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName @@ -21,13 +21,13 @@ Route15GateUpstairsText1: call CopyData predef OaksAideScript ldh a, [hOaksAideResult] - cp $1 - jr nz, .asm_49689 + cp OAKS_AIDE_GOT_ITEM + jr nz, .no_item SetEvent EVENT_GOT_EXP_ALL -.asm_49683 +.got_item ld hl, Route15GateUpstairsText_4968c call PrintText -.asm_49689 +.no_item jp TextScriptEnd Route15GateUpstairsText_4968c: diff --git a/scripts/Route16FlyHouse.asm b/scripts/Route16FlyHouse.asm index d5b0350a..3bb34b75 100755 --- a/scripts/Route16FlyHouse.asm +++ b/scripts/Route16FlyHouse.asm @@ -9,18 +9,18 @@ Route16HouseText1: text_asm CheckEvent EVENT_GOT_HM02 ld hl, HM02ExplanationText - jr nz, .asm_13616 + jr nz, .got_item ld hl, Route16HouseText3 call PrintText lb bc, HM_FLY, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_HM02 ld hl, ReceivedHM02Text - jr .asm_13616 -.BagFull + jr .got_item +.bag_full ld hl, HM02NoRoomText -.asm_13616 +.got_item call PrintText jp TextScriptEnd diff --git a/scripts/Route23.asm b/scripts/Route23.asm index f4d65266..fbcc2f8b 100755 --- a/scripts/Route23.asm +++ b/scripts/Route23.asm @@ -61,7 +61,8 @@ Route23Script0: ret YCoordsData_51255: - db $23,$38,$55,$60,$69,$77,$88,$FF + db $23,$38,$55,$60,$69,$77,$88 + db $FF Route23Script_5125d: ld hl, BadgeTextPointers diff --git a/scripts/Route24.asm b/scripts/Route24.asm index 28151393..4dec6d2f 100755 --- a/scripts/Route24.asm +++ b/scripts/Route24.asm @@ -45,7 +45,8 @@ Route24Script0: ret CoordsData_5140e: - db $0F,$0A,$FF + db $0F,$0A + db $FF Route24Script4: ld a, [wSimulatedJoypadStatesIndex] @@ -103,12 +104,12 @@ Route24Text1: text_asm ResetEvent EVENT_NUGGET_REWARD_AVAILABLE CheckEvent EVENT_GOT_NUGGET - jr nz, .asm_514f9 + jr nz, .got_item ld hl, Route24Text_51510 call PrintText lb bc, NUGGET, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_NUGGET ld hl, Route24Text_5151a call PrintText @@ -130,11 +131,11 @@ Route24Text1: ld [wRoute24CurScript], a ld [wCurMapScript], a jp TextScriptEnd -.asm_514f9 +.got_item ld hl, Route24Text_51530 call PrintText jp TextScriptEnd -.BagFull +.bag_full ld hl, Route24Text_51521 call PrintText SetEvent EVENT_NUGGET_REWARD_AVAILABLE diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm index d9d30218..60f6ffe1 100755 --- a/scripts/Route2Gate.asm +++ b/scripts/Route2Gate.asm @@ -8,10 +8,10 @@ Route2Gate_TextPointers: Route2GateText1: text_asm CheckEvent EVENT_GOT_HM05 - jr nz, .asm_5d60d - ld a, 10 ; pokemon needed + jr nz, .got_item + ld a, 10 ldh [hOaksAideRequirement], a - ld a, HM_FLASH ; oak's aide reward + ld a, HM_FLASH ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName @@ -21,13 +21,13 @@ Route2GateText1: call CopyData predef OaksAideScript ldh a, [hOaksAideResult] - cp $1 - jr nz, .asm_5d613 + cp OAKS_AIDE_GOT_ITEM + jr nz, .no_item SetEvent EVENT_GOT_HM05 -.asm_5d60d +.got_item ld hl, Route2GateText_5d616 call PrintText -.asm_5d613 +.no_item jp TextScriptEnd Route2GateText_5d616: diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm index 22d40fd3..81a7490a 100755 --- a/scripts/Route6Gate.asm +++ b/scripts/Route6Gate.asm @@ -40,7 +40,8 @@ Route6GateScript0: CoordsData_1e08c: db $02,$03 - db $02,$04,$FF + db $02,$04 + db $FF Route6GateScript1: ld a, [wSimulatedJoypadStatesIndex] diff --git a/scripts/SSAnne2FRooms.asm b/scripts/SSAnne2FRooms.asm index a82afa26..3fe2d34f 100755 --- a/scripts/SSAnne2FRooms.asm +++ b/scripts/SSAnne2FRooms.asm @@ -1,5 +1,5 @@ SSAnne2FRooms_Script: - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a diff --git a/scripts/SSAnneB1F.asm b/scripts/SSAnneB1F.asm index 91452977..f66fdfaa 100755 --- a/scripts/SSAnneB1F.asm +++ b/scripts/SSAnneB1F.asm @@ -2,4 +2,5 @@ SSAnneB1F_Script: jp EnableAutoTextBoxDrawing SSAnneB1F_TextPointers: - text_end + + text_end ; unused diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm index 8b464b53..3d5c5645 100755 --- a/scripts/SSAnneCaptainsRoom.asm +++ b/scripts/SSAnneCaptainsRoom.asm @@ -17,28 +17,28 @@ SSAnneCaptainsRoom_TextPointers: SSAnne7Text1: text_asm CheckEvent EVENT_GOT_HM01 - jr nz, .asm_797c4 + jr nz, .got_item ld hl, SSAnne7RubText call PrintText ld hl, ReceivingHM01Text call PrintText lb bc, HM_CUT, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM01Text call PrintText SetEvent EVENT_GOT_HM01 - jr .asm_0faf5 -.BagFull + jr .done +.bag_full ld hl, HM01NoRoomText call PrintText ld hl, wd72d set 5, [hl] - jr .asm_0faf5 -.asm_797c4 + jr .done +.got_item ld hl, SSAnne7Text_61932 call PrintText -.asm_0faf5 +.done jp TextScriptEnd SSAnne7RubText: diff --git a/scripts/SSAnneKitchen.asm b/scripts/SSAnneKitchen.asm index 969c6b7f..30a9830f 100755 --- a/scripts/SSAnneKitchen.asm +++ b/scripts/SSAnneKitchen.asm @@ -41,17 +41,17 @@ SSAnne6Text7: call PrintText ldh a, [hRandomAdd] bit 7, a - jr z, .asm_93eb1 + jr z, .not_dialog_1 ld hl, SSAnne6Text_6180c - jr .asm_63292 -.asm_93eb1 + jr .done +.not_dialog_1 bit 4, a - jr z, .asm_7436c + jr z, .not_dialog_2 ld hl, SSAnne6Text_61811 - jr .asm_63292 -.asm_7436c + jr .done +.not_dialog_2 ld hl, SSAnne6Text_61816 -.asm_63292 +.done call PrintText jp TextScriptEnd diff --git a/scripts/SafariZoneSecretHouse.asm b/scripts/SafariZoneSecretHouse.asm index 35aa90d7..6eeff8ad 100755 --- a/scripts/SafariZoneSecretHouse.asm +++ b/scripts/SafariZoneSecretHouse.asm @@ -7,24 +7,24 @@ SafariZoneSecretHouse_TextPointers: SafariZoneSecretHouseText1: text_asm CheckEvent EVENT_GOT_HM03 - jr nz, .asm_20a9b + jr nz, .got_item ld hl, SafariZoneSecretHouseText_4a350 call PrintText lb bc, HM_SURF, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM03Text call PrintText SetEvent EVENT_GOT_HM03 - jr .asm_8f1fc -.BagFull + jr .done +.bag_full ld hl, HM03NoRoomText call PrintText - jr .asm_8f1fc -.asm_20a9b + jr .done +.got_item ld hl, HM03ExplanationText call PrintText -.asm_8f1fc +.done jp TextScriptEnd SafariZoneSecretHouseText_4a350: diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm index abea6da4..6f7d050b 100755 --- a/scripts/SilphCo11F.asm +++ b/scripts/SilphCo11F.asm @@ -289,24 +289,24 @@ SilphCo11TrainerHeader1: SilphCo11Text1: text_asm CheckEvent EVENT_GOT_MASTER_BALL - jp nz, .asm_62308 + jp nz, .got_item ld hl, SilphCoPresidentText call PrintText lb bc, MASTER_BALL, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedSilphCoMasterBallText call PrintText SetEvent EVENT_GOT_MASTER_BALL - jr .asm_6230e -.BagFull + jr .done +.bag_full ld hl, SilphCoMasterBallNoRoomText call PrintText - jr .asm_6230e -.asm_62308 + jr .done +.got_item ld hl, SilphCo10Text_6231c call PrintText -.asm_6230e +.done jp TextScriptEnd SilphCoPresidentText: diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm index e660cd0f..c898cbd1 100755 --- a/scripts/SilphCoElevator.asm +++ b/scripts/SilphCoElevator.asm @@ -41,7 +41,7 @@ SilphCoElevatorScript_457f1: ret SilphCoElevatorFloors: - db $0B ; num elements in list + db 11 ; # db FLOOR_1F db FLOOR_2F db FLOOR_3F @@ -53,23 +53,22 @@ SilphCoElevatorFloors: db FLOOR_9F db FLOOR_10F 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. - db $03, SILPH_CO_1F - db $02, SILPH_CO_2F - db $02, SILPH_CO_3F - db $02, SILPH_CO_4F - db $02, SILPH_CO_5F - db $02, SILPH_CO_6F - db $02, SILPH_CO_7F - db $02, SILPH_CO_8F - db $02, SILPH_CO_9F - db $02, SILPH_CO_10F - db $01, SILPH_CO_11F +SilphCoElevatorWarpMaps: + ; warp number, map id + db 3, SILPH_CO_1F + db 2, SILPH_CO_2F + db 2, SILPH_CO_3F + db 2, SILPH_CO_4F + db 2, SILPH_CO_5F + db 2, SILPH_CO_6F + db 2, SILPH_CO_7F + db 2, SILPH_CO_8F + db 2, SILPH_CO_9F + db 2, SILPH_CO_10F + db 1, SILPH_CO_11F SilphCoElevatorWarpMapsEnd: SilphCoElevatorScript_45827: diff --git a/scripts/TradeCenter.asm b/scripts/TradeCenter.asm index b91996e0..dbed79c1 100755 --- a/scripts/TradeCenter.asm +++ b/scripts/TradeCenter.asm @@ -15,16 +15,16 @@ TradeCenter_Script: set 0, [hl] ret nz ld hl, wSprite01StateData2MapY - ld a, $8 + ld a, 8 ; y ld [hli], a - ld a, $a + ld a, 10 ; x ld [hl], a ld a, SPRITE_FACING_LEFT ld [wSprite01StateData1FacingDirection], a ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z - ld a, $7 + ld a, 7 ; x ld [wSprite01StateData2MapX], a ld a, SPRITE_FACING_RIGHT ld [wSprite01StateData1FacingDirection], a diff --git a/scripts/UndergroundPathNorthSouth.asm b/scripts/UndergroundPathNorthSouth.asm index eb8fe4fd..00a7ef90 100755 --- a/scripts/UndergroundPathNorthSouth.asm +++ b/scripts/UndergroundPathNorthSouth.asm @@ -2,4 +2,5 @@ UndergroundPathNorthSouth_Script: jp EnableAutoTextBoxDrawing UndergroundPathNorthSouth_TextPointers: - text_end + + text_end ; unused diff --git a/scripts/UndergroundPathWestEast.asm b/scripts/UndergroundPathWestEast.asm index e21c3268..98571e17 100755 --- a/scripts/UndergroundPathWestEast.asm +++ b/scripts/UndergroundPathWestEast.asm @@ -2,4 +2,5 @@ UndergroundPathWestEast_Script: jp EnableAutoTextBoxDrawing UndergroundPathWestEast_TextPointers: - text_end + + text_end ; unused diff --git a/scripts/VermilionOldRodHouse.asm b/scripts/VermilionOldRodHouse.asm index 5305820d..524395d4 100755 --- a/scripts/VermilionOldRodHouse.asm +++ b/scripts/VermilionOldRodHouse.asm @@ -7,30 +7,30 @@ VermilionOldRodHouse_TextPointers: VermilionHouse2Text1: text_asm ld a, [wd728] - bit 3, a - jr nz, .asm_03ef5 + bit 3, a ; got old rod? + jr nz, .got_item ld hl, VermilionHouse2Text_560b1 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_eb1b7 + jr nz, .refused lb bc, OLD_ROD, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, wd728 - set 3, [hl] + set 3, [hl] ; got old rod ld hl, VermilionHouse2Text_560b6 - jr .asm_5dd95 -.BagFull + jr .done +.bag_full ld hl, VermilionHouse2Text_560ca - jr .asm_5dd95 -.asm_eb1b7 + jr .done +.refused ld hl, VermilionHouse2Text_560c0 - jr .asm_5dd95 -.asm_03ef5 + jr .done +.got_item ld hl, VermilionHouse2Text_560c5 -.asm_5dd95 +.done call PrintText jp TextScriptEnd diff --git a/scripts/VictoryRoad1F.asm b/scripts/VictoryRoad1F.asm index 784329f0..1eff96f0 100755 --- a/scripts/VictoryRoad1F.asm +++ b/scripts/VictoryRoad1F.asm @@ -35,7 +35,8 @@ VictoryRoad1Script0: ret CoordsData_5da5c: - db $0D,$11,$FF + db $0D,$11 + db $FF VictoryRoad1F_TextPointers: dw VictoryRoad1Text1 diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm index 62d98c4c..543ffa97 100755 --- a/scripts/ViridianCity.asm +++ b/scripts/ViridianCity.asm @@ -18,11 +18,11 @@ ViridianCityScript_1900b: CheckEvent EVENT_VIRIDIAN_GYM_OPEN ret nz ld a, [wObtainedBadges] - cp %01111111 - jr nz, .gymClosed + cp $ff ^ (1 << BIT_EARTHBADGE) + jr nz, .gym_closed SetEvent EVENT_VIRIDIAN_GYM_OPEN ret -.gymClosed +.gym_closed ld a, [wYCoord] cp $8 ret nz @@ -148,13 +148,13 @@ ViridianCityText1: ViridianCityText2: text_asm ld a, [wObtainedBadges] - cp %01111111 + cp $ff ^ (1 << BIT_EARTHBADGE) ld hl, ViridianCityText_19127 - jr z, .printAndDone + jr z, .done CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI - jr nz, .printAndDone + jr nz, .done ld hl, ViridianCityText_19122 -.printAndDone +.done call PrintText jp TextScriptEnd @@ -232,21 +232,21 @@ ViridianCityText_19191: ViridianCityText6: text_asm CheckEvent EVENT_GOT_TM42 - jr nz, .gotTm42 + jr nz, .got_item ld hl, ViridianCityText_191ca call PrintText lb bc, TM_DREAM_EATER, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM42Text call PrintText SetEvent EVENT_GOT_TM42 jr .done -.BagFull +.bag_full ld hl, TM42NoRoomText call PrintText jr .done -.gotTm42 +.got_item ld hl, TM42Explanation call PrintText .done @@ -278,13 +278,13 @@ ViridianCityText7: call YesNoChoice ld a, [wCurrentMenuItem] and a - jr z, .hurry + jr z, .refused ld hl, ViridianCityText_1920f call PrintText ld a, $1 ld [wViridianCityCurScript], a jr .done -.hurry +.refused ld hl, ViridianCityText_19214 call PrintText .done diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm index f169f1f5..75992c3e 100755 --- a/scripts/ViridianGym.asm +++ b/scripts/ViridianGym.asm @@ -81,40 +81,52 @@ ViridianGymArrowTilePlayerMovement: ;format: direction, count ViridianGymArrowMovement1: - db D_UP,$09,$FF + db D_UP,$09 + db $FF ViridianGymArrowMovement2: - db D_LEFT,$08,$FF + db D_LEFT,$08 + db $FF ViridianGymArrowMovement3: - db D_DOWN,$09,$FF + db D_DOWN,$09 + db $FF ViridianGymArrowMovement4: - db D_RIGHT,$06,$FF + db D_RIGHT,$06 + db $FF ViridianGymArrowMovement5: - db D_DOWN,$02,$FF + db D_DOWN,$02 + db $FF ViridianGymArrowMovement6: - db D_DOWN,$07,$FF + db D_DOWN,$07 + db $FF ViridianGymArrowMovement7: - db D_RIGHT,$08,$FF + db D_RIGHT,$08 + db $FF ViridianGymArrowMovement8: - db D_RIGHT,$09,$FF + db D_RIGHT,$09 + db $FF ViridianGymArrowMovement9: - db D_UP,$08,$FF + db D_UP,$08 + db $FF ViridianGymArrowMovement10: - db D_UP,$06,$FF + db D_UP,$06 + db $FF ViridianGymArrowMovement11: - db D_LEFT,$06,$FF + db D_LEFT,$06 + db $FF ViridianGymArrowMovement12: - db D_LEFT,$0C,$FF + db D_LEFT,$0C + db $FF ViridianGymScript4: ld a, [wSimulatedJoypadStatesIndex] diff --git a/scripts/ViridianMart.asm b/scripts/ViridianMart.asm index ea1c373f..edf4c4a0 100755 --- a/scripts/ViridianMart.asm +++ b/scripts/ViridianMart.asm @@ -7,12 +7,12 @@ ViridianMart_Script: ViridianMartScript_1d47d: CheckEvent EVENT_OAK_GOT_PARCEL - jr nz, .asm_1d489 + jr nz, .delivered_parcel ld hl, ViridianMart_TextPointers - jr .asm_1d48c -.asm_1d489 + jr .done +.delivered_parcel ld hl, ViridianMart_TextPointers2 -.asm_1d48c +.done ld a, l ld [wMapTextPtr], a ld a, h @@ -67,6 +67,7 @@ ViridianMart_TextPointers: dw ViridianMartText3 dw ViridianMartText4 dw ViridianMartText5 + ViridianMart_TextPointers2: dw ViridianCashierText dw ViridianMartText2 diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm index 6705a450..2dd0410c 100755 --- a/scripts/WardensHouse.asm +++ b/scripts/WardensHouse.asm @@ -11,48 +11,48 @@ WardensHouse_TextPointers: FuchsiaHouse2Text1: text_asm CheckEvent EVENT_GOT_HM04 - jr nz, .subtract + jr nz, .got_item ld b, GOLD_TEETH call IsItemInBag - jr nz, .asm_3f30f + jr nz, .have_gold_teeth CheckEvent EVENT_GAVE_GOLD_TEETH - jr nz, .asm_60cba + jr nz, .gave_gold_teeth ld hl, WardenGibberishText1 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a ld hl, WardenGibberishText3 - jr nz, .asm_61238 + jr nz, .refused ld hl, WardenGibberishText2 -.asm_61238 +.refused call PrintText - jr .asm_52039 -.asm_3f30f + jr .done +.have_gold_teeth ld hl, WardenTeethText1 call PrintText ld a, GOLD_TEETH ldh [hItemToRemoveID], a farcall RemoveItemByID SetEvent EVENT_GAVE_GOLD_TEETH -.asm_60cba +.gave_gold_teeth ld hl, WardenThankYouText call PrintText lb bc, HM_STRENGTH, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM04Text call PrintText SetEvent EVENT_GOT_HM04 - jr .asm_52039 -.subtract + jr .done +.got_item ld hl, HM04ExplanationText call PrintText - jr .asm_52039 -.BagFull + jr .done +.bag_full ld hl, HM04NoRoomText call PrintText -.asm_52039 +.done jp TextScriptEnd WardenGibberishText1: |