diff options
author | dannye <corrnondacqb@yahoo.com> | 2015-08-05 16:20:29 -0500 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2015-08-05 16:25:58 -0500 |
commit | f8a9c37a0019eb085c22c6e3ae53b16ff0cd4f6a (patch) | |
tree | 53ef4ec4b7ab591f1ba98322405c6b1e645a21e2 /scripts | |
parent | 891627d4ba193dd839e03e9e30f1e492e57eac9f (diff) |
Use more lb
and other clean up
Diffstat (limited to 'scripts')
61 files changed, 145 insertions, 126 deletions
diff --git a/scripts/agatha.asm b/scripts/agatha.asm index 60ddf606..1e34c99c 100755 --- a/scripts/agatha.asm +++ b/scripts/agatha.asm @@ -22,7 +22,7 @@ AgathaScript_76443: ; 76443 (1d:6443) AgathaScript_76459: ; 76459 (1d:6459) ld [wNewTileBlockID], a - ld bc, $2 + lb bc, 0, 2 predef_jump ReplaceTileBlock AgathaScript_76464: ; 76464 (1d:6464) diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index f0bdf615..cf717b43 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -19,7 +19,7 @@ BikeShopText1: ; 1d745 (7:5745) jr z, .asm_41190 ld hl, BikeShopText_1d81f call PrintText - ld bc, (BICYCLE << 8) | 1 + lb bc, BICYCLE, 1 call GiveItem jr nc, .BagFull ld a, BIKE_VOUCHER diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index e4cfc031..08ac98d6 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -163,7 +163,7 @@ BillsHouseText2: ; 1e874 (7:6874) jr nz, .asm_1e8a9 ld hl, BillThankYouText call PrintText - ld bc, (S_S__TICKET << 8) | 1 + lb bc, S_S__TICKET, 1 call GiveItem jr nc, .BagFull ld hl, SSTicketReceivedText diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 0e29d64c..6aa2eaec 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -36,7 +36,7 @@ BluesHouseText1: ; 19b5d (6:5b5d) .GiveMap ld hl,DaisyOfferMapText call PrintText - ld bc,(TOWN_MAP << 8) | 1 + lb bc, TOWN_MAP, 1 call GiveItem jr nc, .BagFull ld a,HS_TOWN_MAP diff --git a/scripts/bruno.asm b/scripts/bruno.asm index c39656b9..bdfd7e24 100755 --- a/scripts/bruno.asm +++ b/scripts/bruno.asm @@ -22,7 +22,7 @@ BrunoScript_762ec: ; 762ec (1d:62ec) BrunoScript_76302: ; 76302 (1d:6302) ld [wNewTileBlockID], a - ld bc, $2 + lb bc, 0, 2 predef_jump ReplaceTileBlock BrunoScript_7630d: ; 7630d (1d:630d) diff --git a/scripts/celadoncity.asm b/scripts/celadoncity.asm index ce0c4731..cfc8f197 100755 --- a/scripts/celadoncity.asm +++ b/scripts/celadoncity.asm @@ -46,7 +46,7 @@ CeladonCityText5: ; 1999e (6:599e) jr nz, .asm_7053f ld hl, TM41PreText call PrintText - ld bc, (TM_41 << 8) | 1 + lb bc, TM_41, 1 call GiveItem jr c, .Success ld hl, TM41NoRoomText diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm index a37bc558..be1ed4c8 100755 --- a/scripts/celadondiner.asm +++ b/scripts/celadondiner.asm @@ -31,7 +31,7 @@ CeladonDinerText5: ; 49173 (12:5173) jr nz, .asm_eb14d ld hl, CeladonDinerText_491a7 call PrintText - ld bc, (COIN_CASE << 8) | 1 + lb bc, COIN_CASE, 1 call GiveItem jr nc, .BagFull SetEvent EVENT_GOT_COIN_CASE diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index e8917434..787a2f3d 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -32,7 +32,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec) ret nz ld a, $2a ld [wNewTileBlockID], a - ld bc, $0208 + lb bc, 2, 8 predef_jump ReplaceTileBlock CeladonGameCornerScript_48c07: ; 48c07 (12:4c07) @@ -452,7 +452,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd) SetEvent EVENT_FOUND_ROCKET_HIDEOUT ld a, $43 ld [wNewTileBlockID], a - ld bc, $0208 + lb bc, 2, 8 predef ReplaceTileBlock jp TextScriptEnd @@ -477,8 +477,8 @@ CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) call TextBoxBorder call UpdateSprites coord hl, 12, 1 - ld b, $4 - ld c, $7 + ld b, 4 + ld c, 7 call ClearScreenArea coord hl, 12, 2 ld de, GameCornerMoneyText diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm index 5dc328c7..64e85ff7 100755 --- a/scripts/celadongym.asm +++ b/scripts/celadongym.asm @@ -47,7 +47,7 @@ CeladonGymText_48963: ; 48963 (12:4963) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_ERIKA - ld bc, (TM_21 << 8) | 1 + lb bc, TM_21, 1 call GiveItem jr nc, .BagFull ld a, $a diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm index 60d2cc92..6d979e04 100755 --- a/scripts/celadonmansion5.asm +++ b/scripts/celadonmansion5.asm @@ -11,7 +11,7 @@ CeladonMansion5Text1: ; 1dd41 (7:5d41) CeladonMansion5Text2: ; 1dd46 (7:5d46) TX_ASM - ld bc,(EEVEE << 8) | 25 + lb bc, EEVEE, 25 call GivePokemon jr nc, .asm_24365 ld a, HS_CELADON_MANSION_5_GIFT diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm index f525d0af..c6c6ecc7 100755 --- a/scripts/celadonmart3.asm +++ b/scripts/celadonmart3.asm @@ -26,7 +26,7 @@ CeladonMart3Text1: ; 4824a (12:424a) jr nz, .asm_a5463 ld hl, TM18PreReceiveText call PrintText - ld bc, (TM_18 << 8) | 1 + lb bc, TM_18, 1 call GiveItem jr nc, .BagFull SetEvent EVENT_GOT_TM18 diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index 113044cd..8eeb5d2b 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -88,7 +88,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) ld hl, CeladonMartRoofText_48515 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_49 << 8) | 1 + lb bc, TM_49, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM49Text @@ -101,7 +101,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) ld hl, CeladonMartRoofText_48504 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_48 << 8) | 1 + lb bc, TM_48, 1 call GiveItem jr nc, .BagFull ld hl, CeladonMartRoofText_4850a @@ -114,7 +114,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c) ld hl, CeladonMartRoofText_484f3 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_13 << 8) | 1 + lb bc, TM_13, 1 call GiveItem jr nc, .BagFull ld hl, CeladonMartRoofText_484f9 diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index c13e66e2..158a683d 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -299,7 +299,7 @@ CeruleanCityText2: ; 1967c (6:567c) .asm_4ca20 ld hl, CeruleanCityText_196f3 call PrintText - ld bc, (TM_28 << 8) + 1 + lb bc, TM_28, 1 call GiveItem jr c, .Success ld hl, TM28NoRoomText diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm index a7845c68..ca1c2c7d 100755 --- a/scripts/ceruleangym.asm +++ b/scripts/ceruleangym.asm @@ -47,7 +47,7 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_MISTY - ld bc, (TM_11 << 8) | 1 + lb bc, TM_11, 1 call GiveItem jr nc, .BagFull ld a, $6 diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 60df9338..5bbb94a9 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -144,7 +144,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BLAINE - ld bc, (TM_38 << 8) | 1 + lb bc, TM_38, 1 call GiveItem jr nc, .BagFull ld a, $b diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm index 953c7126..74dbb1c5 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -23,7 +23,7 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82) jr z, .asm_62ecd ld hl, TM31PreReceiveText call PrintText - ld bc, (TM_31 << 8) | 1 + lb bc, TM_31, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM31Text diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index adde809f..cbafc034 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -113,7 +113,7 @@ FanClubText5: ; tell the story ld hl, .storytext call PrintText - ld bc, (BIKE_VOUCHER << 8) | 1 + lb bc, BIKE_VOUCHER, 1 call GiveItem jr nc, .BagFull ld hl, .receivedvouchertext diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm index 9bbc38a8..3ec89256 100755 --- a/scripts/fuchsiagym.asm +++ b/scripts/fuchsiagym.asm @@ -47,7 +47,7 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_KOGA - ld bc, (TM_06 << 8) | 1 + lb bc, TM_06, 1 call GiveItem jr nc, .BagFull ld a, $a diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm index 37aebd23..76b5e91f 100755 --- a/scripts/fuchsiahouse2.asm +++ b/scripts/fuchsiahouse2.asm @@ -38,7 +38,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2) .asm_60cba ld hl, WardenThankYouText call PrintText - ld bc,(HM_04 << 8) | 1 + lb bc, HM_04, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM04Text diff --git a/scripts/fuchsiahouse3.asm b/scripts/fuchsiahouse3.asm index 8c83b779..2aabb9c2 100755 --- a/scripts/fuchsiahouse3.asm +++ b/scripts/fuchsiahouse3.asm @@ -18,7 +18,7 @@ FuchsiaHouse3Text1: ; 56181 (15:6181) and a jr nz, .refused - ld bc, (GOOD_ROD << 8) | 1 + lb bc, GOOD_ROD, 1 call GiveItem jr nc, .full diff --git a/scripts/lab3.asm b/scripts/lab3.asm index 59b04b8c..cbb5f53f 100755 --- a/scripts/lab3.asm +++ b/scripts/lab3.asm @@ -14,7 +14,7 @@ Lab3Text1: ; 75c94 (1d:5c94) jr nz, .asm_e551a ld hl, TM35PreReceiveText call PrintText - ld bc, (TM_35 << 8) | 1 + lb bc, TM_35, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM35Text diff --git a/scripts/lance.asm b/scripts/lance.asm index 9fa621da..e2c43614 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -25,12 +25,12 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4) LanceScript_5a2de: ; 5a2de (16:62de) push bc ld [wNewTileBlockID], a - ld bc, $602 + lb bc, 6, 2 call LanceScript_5a2f0 pop bc ld a, b ld [wNewTileBlockID], a - ld bc, $603 + lb bc, 6, 3 LanceScript_5a2f0: ; 5a2f0 (16:62f0) predef_jump ReplaceTileBlock diff --git a/scripts/lavenderhouse1.asm b/scripts/lavenderhouse1.asm index 556e94a3..ccf9cef1 100755 --- a/scripts/lavenderhouse1.asm +++ b/scripts/lavenderhouse1.asm @@ -72,7 +72,7 @@ LavenderHouse1Text5: ; 1d918 (7:5918) jr nz, .asm_15ac2 ld hl, LavenderHouse1Text_1d94c call PrintText - ld bc, (POKE_FLUTE << 8) | 1 + lb bc, POKE_FLUTE, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedFluteText diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm index 3c639d1e..43eee966 100755 --- a/scripts/lorelei.asm +++ b/scripts/lorelei.asm @@ -23,7 +23,7 @@ LoreleiScript_76191: ; 76191 (1d:6191) ld a, $24 .asm_761ab ld [wNewTileBlockID], a - ld bc, $2 + lb bc, 0, 2 predef_jump ReplaceTileBlock LoreleiScript_761b6: ; 761b6 (1d:61b6) diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index 88bdd3ed..bbfb0a0b 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -15,22 +15,22 @@ Mansion1Subscript1: ; 442c5 (11:42c5) ret z CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_442ec - ld bc, $060c + lb bc, 6, 12 call Mansion1Script_4430b - ld bc, $0308 + lb bc, 3, 8 call Mansion1Script_44304 - ld bc, $080a + lb bc, 8, 10 call Mansion1Script_44304 - ld bc, $0d0d + lb bc, 13, 13 jp Mansion1Script_44304 .asm_442ec - ld bc, $060c + lb bc, 6, 12 call Mansion1Script_44304 - ld bc, $0308 + lb bc, 3, 8 call Mansion1Script_4430b - ld bc, $080a + lb bc, 8, 10 call Mansion1Script_4430b - ld bc, $0d0d + lb bc, 13, 13 jp Mansion1Script_4430b Mansion1Script_44304: ; 44304 (11:4304) diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index cb697b94..22bc2b12 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -16,24 +16,24 @@ Mansion2Script_51fee: ; 51fee (14:5fee) CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_52016 ld a, $e - ld bc, $204 + lb bc, 2, 4 call Mansion2Script_5202f ld a, $54 - ld bc, $409 + lb bc, 4, 9 call Mansion2Script_5202f ld a, $5f - ld bc, $b03 + lb bc, 11, 3 call Mansion2Script_5202f ret .asm_52016 ld a, $5f - ld bc, $204 + lb bc, 2, 4 call Mansion2Script_5202f ld a, $e - ld bc, $409 + lb bc, 4, 9 call Mansion2Script_5202f ld a, $e - ld bc, $b03 + lb bc, 11, 3 call Mansion2Script_5202f ret diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index 21c959aa..84c00981 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -271,7 +271,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9) ld a, [wCurrentMenuItem] and a jr nz, .asm_49f21 - ld bc,(DOME_FOSSIL << 8) | 1 + lb bc, DOME_FOSSIL, 1 call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 @@ -299,7 +299,7 @@ MtMoon3Text7: ; 49f29 (12:5f29) ld a, [wCurrentMenuItem] and a jr nz, .asm_49f61 - ld bc, (HELIX_FOSSIL << 8) | 1 + lb bc, HELIX_FOSSIL, 1 call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index 63cc06e4..fd3e4e53 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -43,7 +43,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec) ld hl, MtMoonPokecenterText_49366 jr .printText .enoughMoney - ld bc,(MAGIKARP << 8) | 5 + lb bc, MAGIKARP, 5 call GivePokemon jr nc, .done xor a diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index 4c209eb8..ac552c6d 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -191,7 +191,7 @@ Museum1FText3: ; 5c256 (17:4256) jr nz, .asm_5c285 ld hl, Museum1FText_5c28e call PrintText - ld bc, (OLD_AMBER << 8) | 1 + lb bc, OLD_AMBER, 1 call GiveItem jr nc, .BagFull SetEvent EVENT_GOT_OLD_AMBER diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 93f87657..996ab754 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -1022,7 +1022,7 @@ OaksLabText5: ; 1d248 (7:5248) .asm_1d2d0 CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK jr nz, .asm_1d2e7 - ld bc, (POKE_BALL << 8) | 5 + lb bc, POKE_BALL, 5 call GiveItem ld hl, OaksLabGivePokeballsText call PrintText diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 81fcb600..831403bb 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -47,7 +47,7 @@ PewterGymScript_5c3df: ; 5c3df (17:43df) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BROCK - ld bc, (TM_34 << 8) | 1 + lb bc, TM_34, 1 call GiveItem jr nc, .BagFull ld a, $5 diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm index c658596e..82561577 100755 --- a/scripts/rockethideout1.asm +++ b/scripts/rockethideout1.asm @@ -27,7 +27,7 @@ RocketHideout1Script_44be0: ; 44be0 (11:4be0) ld a, $e .asm_44c03 ld [wNewTileBlockID], a - ld bc, $080c + lb bc, 8, 12 predef_jump ReplaceTileBlock RocketHideout1ScriptPointers: ; 44c0e (11:4c0e) diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index 62d6f6bb..a71e444c 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -27,7 +27,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473) ld a, $e .asm_45498 ld [wNewTileBlockID], a - ld bc, $050c + lb bc, 5, 12 predef_jump ReplaceTileBlock RocketHideout4Script_454a3: ; 454a3 (11:54a3) diff --git a/scripts/route1.asm b/scripts/route1.asm index 6c00e555..926ffd20 100755 --- a/scripts/route1.asm +++ b/scripts/route1.asm @@ -12,7 +12,7 @@ Route1Text1: ; 1cab8 (7:4ab8) jr nz, .asm_1cada ld hl, Route1ViridianMartSampleText call PrintText - ld bc, (POTION << 8) | 1 + lb bc, POTION, 1 call GiveItem jr nc, .BagFull ld hl, Route1Text_1cae8 diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index f651d373..e7ad5cbf 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -12,7 +12,7 @@ Route12GateUpstairsText1: ; 49569 (12:5569) jr c, .asm_0ad3c ld hl, TM39PreReceiveText call PrintText - ld bc, (TM_39 << 8) | 1 + lb bc, TM_39, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM39Text diff --git a/scripts/route12house.asm b/scripts/route12house.asm index 6b3e17fc..bb065f1c 100755 --- a/scripts/route12house.asm +++ b/scripts/route12house.asm @@ -15,7 +15,7 @@ Route12HouseText1: ; 56484 (15:6484) ld a, [wCurrentMenuItem] and a jr nz, .asm_a2d76 - ld bc, (SUPER_ROD << 8) | 1 + lb bc, SUPER_ROD, 1 call GiveItem jr nc, .BagFull ld hl, wd728 diff --git a/scripts/route16house.asm b/scripts/route16house.asm index 4a0ac0c3..ee23fd89 100755 --- a/scripts/route16house.asm +++ b/scripts/route16house.asm @@ -12,7 +12,7 @@ Route16HouseText1: ; 1e5ff (7:65ff) jr nz, .asm_13616 ld hl, Route16HouseText3 call PrintText - ld bc, (HM_02 << 8) | 1 + lb bc, HM_02, 1 call GiveItem jr nc, .BagFull SetEvent EVENT_GOT_HM02 diff --git a/scripts/route24.asm b/scripts/route24.asm index 4e83a5cd..6eba1d35 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -149,7 +149,7 @@ Route24Text1: ; 514a4 (14:54a4) jr nz, .asm_514f9 ld hl, Route24Text_51510 call PrintText - ld bc, (NUGGET << 8) | 1 + lb bc, NUGGET, 1 call GiveItem jr nc, .BagFull SetEvent EVENT_GOT_NUGGET diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm index 9d354cff..4a37f0e6 100644 --- a/scripts/safarizoneentrance-yellow.asm +++ b/scripts/safarizoneentrance-yellow.asm @@ -54,7 +54,7 @@ ld hl,.MakePaymentText call PrintText ld a,30 - ld hl,(502 / $100) << 8 | (502 % $100) + lb hl, (502 / $100), (502 % $100) .xf1ff2 ld [W_NUMSAFARIBALLS],a ld a,h diff --git a/scripts/safarizonesecrethouse.asm b/scripts/safarizonesecrethouse.asm index 6cf17b9d..8881472b 100755 --- a/scripts/safarizonesecrethouse.asm +++ b/scripts/safarizonesecrethouse.asm @@ -10,7 +10,7 @@ SafariZoneSecretHouseText1: ; 4a31c (12:631c) jr nz, .asm_20a9b ld hl, SafariZoneSecretHouseText_4a350 call PrintText - ld bc, (HM_03 << 8) | 1 + lb bc, HM_03, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM03Text diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm index 9ee632f7..140b1130 100755 --- a/scripts/saffrongym.asm +++ b/scripts/saffrongym.asm @@ -47,7 +47,7 @@ SaffronGymText_5d068: ; 5d068 (17:5068) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_SABRINA - ld bc, (TM_46 << 8) | 1 + lb bc, TM_46, 1 call GiveItem jr nc, .BagFull ld a, $b diff --git a/scripts/saffronhouse2.asm b/scripts/saffronhouse2.asm index f3ec4c99..2c159190 100755 --- a/scripts/saffronhouse2.asm +++ b/scripts/saffronhouse2.asm @@ -10,7 +10,7 @@ SaffronHouse2Text1: ; 1de41 (7:5e41) jr nz, .asm_9e72b ld hl, TM29PreReceiveText call PrintText - ld bc,(TM_29 << 8) | 1 + lb bc, TM_29, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM29Text diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm index fb419a22..a6f2f860 100755 --- a/scripts/silphco10.asm +++ b/scripts/silphco10.asm @@ -13,18 +13,19 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5a173 + ld hl, SilphCo10GateCoords call SilphCo2Script_59d43 call SilphCo10Text_5a176 CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR ret nz ld a, $54 ld [wNewTileBlockID], a - ld bc, $405 + lb bc, 4, 5 predef_jump ReplaceTileBlock -DataTable_5a173: ; 5a173 (16:6173) - db $04,$05,$FF +SilphCo10GateCoords: ; 5a173 (16:6173) + db $04,$05 + db $FF SilphCo10Text_5a176: ; 5a176 (16:6176) ld a, [$ffe0] diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index 9cdf2891..4c83c20d 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -13,18 +13,19 @@ SilphCo11Script_62110: ; 62110 (18:6110) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_62134 + ld hl, SilphCo11GateCoords call SilphCo11Script_62137 call SilphCo11Script_62163 CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR ret nz ld a, $20 ld [wNewTileBlockID], a - ld bc, $603 + lb bc, 6, 3 predef_jump ReplaceTileBlock -DataTable_62134: ; 62134 (18:6134) - db $06,$03,$FF +SilphCo11GateCoords: ; 62134 (18:6134) + db $06,$03 + db $FF SilphCo11Script_62137: ; 62137 (18:6137) push hl @@ -306,7 +307,7 @@ SilphCo11Text1: ; 622dc (18:62dc) jp nz, .asm_62308 ld hl, SilphCoPresidentText call PrintText - ld bc, (MASTER_BALL << 8) | 1 + lb bc, MASTER_BALL, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedSilphCoMasterBallText diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm index b758455e..ecb3b5a5 100755 --- a/scripts/silphco2.asm +++ b/scripts/silphco2.asm @@ -13,7 +13,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59d3e + ld hl, SilphCo2GateCoords call SilphCo2Script_59d43 call SilphCo2Script_59d6f CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $0202 + lb bc, 2, 2 predef ReplaceTileBlock pop af .asm_59d2e @@ -29,11 +29,13 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07) ret nz ld a, $54 ld [wNewTileBlockID], a - ld bc, $0502 + lb bc, 5, 2 predef_jump ReplaceTileBlock -DataTable_59d3e: ; 59d3e (16:5d3e) - db $02,$02,$05,$02,$FF +SilphCo2GateCoords: ; 59d3e (16:5d3e) + db $02,$02 + db $05,$02 + db $FF SilphCo2Script_59d43: ; 59d43 (16:5d43) push hl @@ -141,7 +143,7 @@ SilphCo2Text1: ; 59dc1 (16:5dc1) jr nz, .asm_59de4 ld hl, SilphCo2Text_59ded call PrintText - ld bc, (TM_36 << 8) | 1 + lb bc, TM_36, 1 call GiveItem ld hl, TM36NoRoomText jr nc, .asm_59de7 diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index f693ea33..bdaac452 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59fa8 + ld hl, SilphCo3GateCoords call SilphCo2Script_59d43 call SilphCo3Script_59fad CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $404 + lb bc, 4, 4 predef ReplaceTileBlock pop af .asm_59f98 @@ -29,11 +29,13 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $408 + lb bc, 4, 8 predef_jump ReplaceTileBlock -DataTable_59fa8: ; 59fa8 (16:5fa8) - db $04,$04,$04,$08,$FF +SilphCo3GateCoords: ; 59fa8 (16:5fa8) + db $04,$04 + db $04,$08 + db $FF SilphCo3Script_59fad: ; 59fad (16:5fad) EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 0ea2c8c8..0dad6f6b 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -13,7 +13,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo4Data19d58 + ld hl, SilphCo4GateCoords call SilphCo4Script_19d5d call SilphCo4Script_19d89 CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $0602 + lb bc, 6, 2 predef ReplaceTileBlock pop af .asm_19d48 @@ -29,11 +29,13 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ret nz ld a, $54 ld [wNewTileBlockID], a - ld bc, $0406 + lb bc, 4, 6 predef_jump ReplaceTileBlock -SilphCo4Data19d58: ; 19d58 (6:5d58) - db $06, $02, $04, $06, $ff +SilphCo4GateCoords: ; 19d58 (6:5d58) + db $06,$02 + db $04,$06 + db $FF SilphCo4Script_19d5d: ; 19d5d (6:5d5d) push hl diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index d6f35993..7380f98f 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -13,7 +13,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo5Coords + ld hl, SilphCo5GateCoords call SilphCo4Script_19d5d call SilphCo5Script_19f9e CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $0203 + lb bc, 2, 3 predef ReplaceTileBlock pop af .asm_19f74 @@ -30,7 +30,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $0603 + lb bc, 6, 3 predef ReplaceTileBlock pop af .asm_19f87 @@ -38,11 +38,14 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $0507 + lb bc, 5, 7 predef_jump ReplaceTileBlock -SilphCo5Coords: ; 19f97 (6:5f97) - db $02, $03, $06, $03, $05, $07, $ff +SilphCo5GateCoords: ; 19f97 (6:5f97) + db $02,$03 + db $06,$03 + db $05,$07 + db $FF SilphCo5Script_19f9e: ; 19f9e (6:5f9e) EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm index 25fbcef9..fa199069 100755 --- a/scripts/silphco6.asm +++ b/scripts/silphco6.asm @@ -13,19 +13,19 @@ SilphCo6Script_1a1bf: ; 1a1bf (6:61bf) bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo6Coords1 + ld hl, SilphCo6GateCoords call SilphCo4Script_19d5d call SilphCo6Script_1a1e6 CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $0602 + lb bc, 6, 2 predef_jump ReplaceTileBlock -SilphCo6Coords1: ; 1a1e3 (6:61e3) - db $06, $02 - db $ff +SilphCo6GateCoords: ; 1a1e3 (6:61e3) + db $06,$02 + db $FF SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6) ld a, [$ffe0] diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm index 44e92475..525405c7 100755 --- a/scripts/silphco7.asm +++ b/scripts/silphco7.asm @@ -13,7 +13,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_51bc1 + ld hl, SilphCo7GateCoords call SilphCo7Text_51bc8 call SilphCo7Text_51bf4 CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $305 + lb bc, 3, 5 predef ReplaceTileBlock pop af .asm_51b9e @@ -30,7 +30,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $20a + lb bc, 2, 10 predef ReplaceTileBlock pop af .asm_51bb1 @@ -38,11 +38,14 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77) ret nz ld a, $54 ld [wNewTileBlockID], a - ld bc, $60a + lb bc, 6, 10 predef_jump ReplaceTileBlock -DataTable_51bc1: ; 51bc1 (14:5bc1) - db $03,$05,$02,$0A,$06,$0A,$FF +SilphCo7GateCoords: ; 51bc1 (14:5bc1) + db $03,$05 + db $02,$0A + db $06,$0A + db $FF SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) push hl @@ -329,7 +332,7 @@ SilphCo7Text1: .givelapras ld hl, .MeetLaprasGuyText call PrintText - ld bc, (LAPRAS << 8) | 15 + lb bc, LAPRAS, 15 call GivePokemon jr nc, .done ld a, [wSimulatedJoypadStatesEnd] diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm index 7545f359..9ea985a8 100755 --- a/scripts/silphco8.asm +++ b/scripts/silphco8.asm @@ -13,18 +13,19 @@ SilphCo8Script_5651a: ; 5651a (15:651a) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5653e + ld hl, SilphCo8GateCoords call SilphCo8Script_56541 call SilphCo8Script_5656d CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $403 + lb bc, 4, 3 predef_jump ReplaceTileBlock -DataTable_5653e: ; 5653e (15:653e) - db $04,$03,$FF +SilphCo8GateCoords: ; 5653e (15:653e) + db $04,$03 + db $FF SilphCo8Script_56541: ; 56541 (15:6541) push hl diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index 557ce1f1..02638459 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -13,7 +13,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5d82e + ld hl, SilphCo9GateCoords call SilphCo9Script_5d837 call SilphCo9Script_5d863 CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $401 + lb bc, 4, 1 predef ReplaceTileBlock pop af .asm_5d7f8 @@ -30,7 +30,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $209 + lb bc, 2, 9 predef ReplaceTileBlock pop af .asm_5d80b @@ -39,7 +39,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $509 + lb bc, 5, 9 predef ReplaceTileBlock pop af .asm_5d81e @@ -47,11 +47,15 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $605 + lb bc, 6, 5 predef_jump ReplaceTileBlock -DataTable_5d82e: ; 5d82e (17:582e) - db $04,$01,$02,$09,$05,$09,$06,$05,$FF +SilphCo9GateCoords: ; 5d82e (17:582e) + db $04,$01 + db $02,$09 + db $05,$09 + db $06,$05 + db $FF SilphCo9Script_5d837: ; 5d837 (17:5837) push hl diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index 9bb4aac6..b99f5bb2 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -22,7 +22,7 @@ SSAnne7Text1: ; 618ad (18:58ad) call PrintText ld hl, ReceivingHM01Text call PrintText - ld bc, (HM_01 << 8) | 1 + lb bc, HM_01, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM01Text diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm index 5c504335..78a38aec 100755 --- a/scripts/vermiliongym.asm +++ b/scripts/vermiliongym.asm @@ -38,7 +38,7 @@ VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d) ld a, $5 .asm_5ca7f ld [wNewTileBlockID], a - ld bc, $202 + lb bc, 2, 2 predef_jump ReplaceTileBlock VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a) @@ -66,7 +66,7 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_LT_SURGE - ld bc, (TM_24 << 8) | 1 + lb bc, TM_24, 1 call GiveItem jr nc, .BagFull ld a, $7 diff --git a/scripts/vermilionhouse2.asm b/scripts/vermilionhouse2.asm index 775c32bb..f166ebb8 100755 --- a/scripts/vermilionhouse2.asm +++ b/scripts/vermilionhouse2.asm @@ -15,7 +15,7 @@ VermilionHouse2Text1: ; 56075 (15:6075) ld a, [wCurrentMenuItem] and a jr nz, .asm_eb1b7 - ld bc, (OLD_ROD << 8) | 1 + lb bc, OLD_ROD, 1 call GiveItem jr nc, .BagFull ld hl, wd728 diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index dbb69a64..11f5d5db 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -15,7 +15,7 @@ VictoryRoad1Script: ; 5da0a (17:5a0a) ret z ld a, $1d ld [wNewTileBlockID], a - ld bc, $604 + lb bc, 6, 4 predef_jump ReplaceTileBlock VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index 41fe0212..cb956b1c 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -23,14 +23,14 @@ VictoryRoad2Script_517c9: ; 517c9 (14:57c9) jr z, .asm_517da push af ld a, $15 - ld bc, $403 + lb bc, 4, 3 call VictoryRoad2Script_517e2 pop af .asm_517da bit 7, a ret z ld a, $1d - ld bc, $70b + lb bc, 7, 11 VictoryRoad2Script_517e2: ; 517e2 (14:57e2) ld [wNewTileBlockID], a diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index c5aaef50..22e6813a 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -17,7 +17,7 @@ VictoryRoad3Script_44996: ; 44996 (11:4996) ret z ld a, $1d ld [wNewTileBlockID], a - ld bc, $503 + lb bc, 5, 3 predef_jump ReplaceTileBlock VictoryRoad3ScriptPointers: ; 449b1 (11:49b1) diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index 7cdf5ad8..79ad444f 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -235,7 +235,7 @@ ViridianCityText6: ; 19196 (6:5196) jr nz, .asm_4e5a0 ld hl, ViridianCityText_191ca call PrintText - ld bc, (TM_42 << 8) | 1 + lb bc, TM_42, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM42Text diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 8e012040..6cded55d 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -141,7 +141,7 @@ ViridianGymScript3_74995: ; 74995 (1d:4995) ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI - ld bc, (TM_27 << 8) | 1 + lb bc, TM_27, 1 call GiveItem jr nc, .BagFull ld a, $d diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 986ac8f1..5cb6eaea 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -52,7 +52,7 @@ ViridianMartScript1: ; 1d4c0 (7:54c0) ld a, $5 ld [hSpriteIndexOrTextID], a call DisplayTextID - ld bc, (OAKS_PARCEL << 8) + 1 + lb bc, OAKS_PARCEL, 1 call GiveItem SetEvent EVENT_GOT_OAKS_PARCEL ld a, $2 |