diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/billshouse.asm | 2 | ||||
-rwxr-xr-x | scripts/blueshouse.asm | 2 | ||||
-rwxr-xr-x | scripts/celadongamecorner.asm | 2 | ||||
-rwxr-xr-x | scripts/cinnabargym.asm | 2 | ||||
-rwxr-xr-x | scripts/cinnabarisland.asm | 2 | ||||
-rwxr-xr-x | scripts/gary.asm | 2 | ||||
-rwxr-xr-x | scripts/halloffameroom.asm | 2 | ||||
-rwxr-xr-x | scripts/museum1f.asm | 2 | ||||
-rwxr-xr-x | scripts/oakslab.asm | 2 | ||||
-rwxr-xr-x | scripts/pallettown.asm | 2 | ||||
-rwxr-xr-x | scripts/pokemontower2.asm | 2 | ||||
-rwxr-xr-x | scripts/redshouse2f.asm | 2 | ||||
-rwxr-xr-x | scripts/route16gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route18gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route22.asm | 2 | ||||
-rwxr-xr-x | scripts/route22gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route5gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route6gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route7gate.asm | 2 | ||||
-rwxr-xr-x | scripts/route8gate.asm | 2 | ||||
-rwxr-xr-x | scripts/safarizoneentrance.asm | 2 | ||||
-rwxr-xr-x | scripts/seafoamislands4.asm | 2 | ||||
-rwxr-xr-x | scripts/seafoamislands5.asm | 2 | ||||
-rwxr-xr-x | scripts/ssanne2.asm | 2 | ||||
-rwxr-xr-x | scripts/vermilioncity.asm | 75 | ||||
-rwxr-xr-x | scripts/vermilioncity2.asm | 45 | ||||
-rwxr-xr-x | scripts/viridianmart.asm | 2 |
27 files changed, 121 insertions, 49 deletions
diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 56f2204f..4f01021e 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -2,7 +2,7 @@ BillsHouseScript: ; 1e76a (7:676a) call EnableAutoTextBoxDrawing ld a, [W_BILLSHOUSECURSCRIPT] ld hl, BillsHouseScriptPointers - jp CallFunctionInTable + jp JumpTable BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript0 diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 6aa2eaec..4a23df9e 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -2,7 +2,7 @@ BluesHouseScript: ; 19b3b (6:5b3b) call EnableAutoTextBoxDrawing ld hl,BluesHouseScriptPointers ld a,[W_BLUESHOUSECURSCRIPT] - jp CallFunctionInTable + jp JumpTable BluesHouseScriptPointers: ; 19b47 (6:5b47) dw BluesHouseScript0 diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index c3872bab..5fc9cf97 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -4,7 +4,7 @@ CeladonGameCornerScript: ; 48bbd (12:4bbd) call EnableAutoTextBoxDrawing ld hl, CeladonGameCornerScriptPointers ld a, [W_CELADONGAMECORNERCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf) ld hl, wd126 diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 649609b3..c5d462b3 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -3,7 +3,7 @@ CinnabarGymScript: ; 7574a (1d:574a) call EnableAutoTextBoxDrawing ld hl, CinnabarGymScriptPointers ld a, [W_CINNABARGYMCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CinnabarGymScript_75759: ; 75759 (1d:5759) ld hl, wd126 diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 48ded740..3a2e9a2b 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -6,7 +6,7 @@ CinnabarIslandScript: ; 1ca19 (7:4a19) ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL ld hl, CinnabarIslandScriptPointers ld a, [W_CINNABARISLANDCURSCRIPT] - jp CallFunctionInTable + jp JumpTable CinnabarIslandScriptPointers: ; 1ca34 (7:4a34) dw CinnabarIslandScript0 diff --git a/scripts/gary.asm b/scripts/gary.asm index 685e18fe..64734c58 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -2,7 +2,7 @@ GaryScript: ; 75f1d (1d:5f1d) call EnableAutoTextBoxDrawing ld hl, GaryScriptPointers ld a, [W_GARYCURSCRIPT] - jp CallFunctionInTable + jp JumpTable GaryScript_75f29: ; 75f29 (1d:5f29) xor a diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index 466ce77d..0f975673 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -2,7 +2,7 @@ HallofFameRoomScript: ; 5a49e (16:649e) call EnableAutoTextBoxDrawing ld hl, HallofFameRoomScriptPointers ld a, [W_HALLOFFAMEROOMCURSCRIPT] - jp CallFunctionInTable + jp JumpTable HallofFameRoomScript_5a4aa: ; 5a4aa (16:64aa) xor a diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index 75dc1ce8..ae5a2b42 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -5,7 +5,7 @@ Museum1FScript: ; 5c0f7 (17:40f7) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Museum1FScriptPointers ld a, [W_MUSEUM1FCURSCRIPT] - jp CallFunctionInTable + jp JumpTable Museum1FScriptPointers: ; 5c109 (17:4109) dw Museum1FScript0 diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index aff39cbc..2970fa2a 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -7,7 +7,7 @@ OaksLabScript: ; 1cb0e (7:4b0e) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers ld a, [W_OAKSLABCURSCRIPT] - jp CallFunctionInTable + jp JumpTable OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript0 diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 147cbdb6..73f50e3e 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -6,7 +6,7 @@ PalletTownScript: ; 18e5b (6:4e5b) call EnableAutoTextBoxDrawing ld hl, PalletTownScriptPointers ld a, [W_PALLETTOWNCURSCRIPT] - jp CallFunctionInTable + jp JumpTable PalletTownScriptPointers: ; 18e73 (6:4e73) dw PalletTownScript0 diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index d498f88e..7aebf81b 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -2,7 +2,7 @@ PokemonTower2Script: ; 604f2 (18:44f2) call EnableAutoTextBoxDrawing ld hl, PokemonTower2ScriptPointers ld a, [W_POKEMONTOWER2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable PokemonTower2Script_604fe: ; 604fe (18:44fe) xor a diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm index 2335e6d1..565d09e3 100755 --- a/scripts/redshouse2f.asm +++ b/scripts/redshouse2f.asm @@ -2,7 +2,7 @@ RedsHouse2FScript: ; 5c0b0 (17:40b0) call EnableAutoTextBoxDrawing ld hl,RedsHouse2FScriptPointers ld a,[W_REDSHOUSE2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable RedsHouse2FScriptPointers: ; 5c0bc (17:40bc) dw RedsHouse2FScript0 diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index 801e577e..197b12b2 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -4,7 +4,7 @@ Route16GateScript: ; 496be (12:56be) call EnableAutoTextBoxDrawing ld a, [W_ROUTE16GATECURSCRIPT] ld hl, Route16GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route16GateScriptPointers: ; 496cf (12:56cf) dw Route16GateScript0 diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index 060a6bbf..33f67e97 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -4,7 +4,7 @@ Route18GateScript: ; 49876 (12:5876) call EnableAutoTextBoxDrawing ld a, [W_ROUTE18GATECURSCRIPT] ld hl, Route18GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route18GateScriptPointers: ; 49887 (12:5887) dw Route18GateScript0 diff --git a/scripts/route22.asm b/scripts/route22.asm index a7c61903..5ea8178f 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -2,7 +2,7 @@ Route22Script: ; 50eb2 (14:4eb2) call EnableAutoTextBoxDrawing ld hl, Route22ScriptPointers ld a, [W_ROUTE22CURSCRIPT] - jp CallFunctionInTable + jp JumpTable Route22ScriptPointers: ; 50ebe (14:4ebe) dw Route22Script0 diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index f0b5b92d..5fdd70c8 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -2,7 +2,7 @@ Route22GateScript: ; 1e683 (7:6683) call EnableAutoTextBoxDrawing ld hl, Route22GateScriptPointers ld a, [W_ROUTE22GATECURSCRIPT] - call CallFunctionInTable + call JumpTable ld a, [wYCoord] cp $4 ld a, ROUTE_23 diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm index 35f3a020..6442fd83 100755 --- a/scripts/route5gate.asm +++ b/scripts/route5gate.asm @@ -2,7 +2,7 @@ Route5GateScript: ; 1df33 (7:5f33) call EnableAutoTextBoxDrawing ld a, [W_ROUTE5GATECURSCRIPT] ld hl, Route5GateScriptPointers - jp CallFunctionInTable + jp JumpTable Route5GateScriptPointers: ; 1df3f (7:5f3f) dw Route5GateScript0 diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm index a4b6149c..dd179e28 100755 --- a/scripts/route6gate.asm +++ b/scripts/route6gate.asm @@ -2,7 +2,7 @@ Route6GateScript: ; 1e03d (7:603d) call EnableAutoTextBoxDrawing ld hl, Route6GateScriptPointers ld a, [W_ROUTE6GATECURSCRIPT] - call CallFunctionInTable + call JumpTable ret Route6GateScriptPointers: ; 1e04a (7:604a) diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm index b55f813c..7f87b78c 100755 --- a/scripts/route7gate.asm +++ b/scripts/route7gate.asm @@ -2,7 +2,7 @@ Route7GateScript: ; 1e100 (7:6100) call EnableAutoTextBoxDrawing ld a, [W_ROUTE7GATECURSCRIPT] ld hl, Route7GateScriptPointers - call CallFunctionInTable + call JumpTable ret Route7GateScriptPointers: ; 1e10d (7:610d) diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm index 96bfa875..fe2e3c3c 100755 --- a/scripts/route8gate.asm +++ b/scripts/route8gate.asm @@ -2,7 +2,7 @@ Route8GateScript: ; 1e1c7 (7:61c7) call EnableAutoTextBoxDrawing ld hl, Route8GateScriptPointers ld a, [W_ROUTE8GATECURSCRIPT] - jp CallFunctionInTable + jp JumpTable Route8GateScriptPointers: ; 1e1d3 (7:61d3) dw Route8GateScript0 diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index 2f8ff34b..a0a0ffda 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -2,7 +2,7 @@ SafariZoneEntranceScript: ; 751cd (1d:51cd) call EnableAutoTextBoxDrawing ld hl, SafariZoneEntranceScriptPointers ld a, [wSafariZoneEntranceCurScript] - jp CallFunctionInTable + jp JumpTable SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) dw .SafariZoneEntranceScript0 diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index e3234b0a..56ccd2e3 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -42,7 +42,7 @@ SeafoamIslands4Script: ; 4658d (11:658d) .asm_465ed ld hl, SeafoamIslands4ScriptPointers ld a, [wSeafoamIslands4CurScript] - jp CallFunctionInTable + jp JumpTable Seafoam4HolesCoords: ; 465f6 (11:65f6) db $10,$03 diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index 98c27666..f8b7aed7 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -2,7 +2,7 @@ SeafoamIslands5Script: ; 46799 (11:6799) call EnableAutoTextBoxDrawing ld a, [wSeafoamIslands5CurScript] ld hl, SeafoamIslands5ScriptPointers - jp CallFunctionInTable + jp JumpTable SeafoamIslands5Script_467a5: ; 467a5 (11:67a5) xor a diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index eea27ec9..7bdafe2c 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -2,7 +2,7 @@ SSAnne2Script: ; 6139f (18:539f) call EnableAutoTextBoxDrawing ld hl, SSAnne2ScriptPointers ld a, [W_SSANNE2CURSCRIPT] - jp CallFunctionInTable + jp JumpTable SSAnne2Script_613ab: ; 613ab (18:53ab) xor a diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 67e3cddd..a8fc8ce7 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -1,5 +1,7 @@ VermilionCityScript: ; 197a1 (6:57a1) call EnableAutoTextBoxDrawing + ld hl, wPreventBlackout + res 7, [hl] ld hl, wd126 bit 6, [hl] res 6, [hl] @@ -11,11 +13,24 @@ VermilionCityScript: ; 197a1 (6:57a1) call nz, VermilionCityScript_197c0 ld hl, VermilionCityScriptPointers ld a, [W_VERMILIONCITYCURSCRIPT] - jp CallFunctionInTable + call JumpTable + call VermilionCityScript_19869 + ret + +VermilionCityScript_19869: + CheckEventHL EVENT_152 + ret nz + CheckEventReuseHL EVENT_GOT_BIKE_VOUCHER + ret z + SetEventReuseHL EVENT_152 + ret VermilionCityScript_197c0: ; 197c0 (6:57c0) call Random - ld a, [$ffd4] + ld a, [hRandomAdd] + ld b, a + ld a, [hRandomSub] + adc b and $e ld [wFirstLockTrashCanIndex], a ret @@ -40,10 +55,10 @@ VermilionCityScriptPointers: ; 197dc (6:57dc) VermilionCityScript0: ; 197e6 (6:57e6) ld a, [wSpriteStateData1 + 9] and a ; cp SPRITE_FACING_DOWN - ret nz + jr nz, .asm_198de ld hl, CoordsData_19823 call ArePlayerCoordsInArray - ret nc + jr nc, .asm_198de xor a ld [hJoyHeld], a ld [wcf0d], a @@ -67,6 +82,9 @@ VermilionCityScript0: ; 197e6 (6:57e6) ld [W_VERMILIONCITYCURSCRIPT], a ret +.asm_198de + ret + CoordsData_19823: ; 19823 (6:5823) db $1e,$12 db $ff @@ -122,11 +140,12 @@ VermilionCityTextPointers: ; 1986f (6:586f) dw VermilionCityText6 dw VermilionCityText7 dw VermilionCityText8 + dw VermilionCityText9 dw MartSignText dw PokeCenterSignText - dw VermilionCityText11 dw VermilionCityText12 dw VermilionCityText13 + dw VermilionCityText14 VermilionCityText1: ; 19889 (6:5889) TX_FAR _VermilionCityText1 @@ -225,33 +244,43 @@ VermilionCityText5: ; 19922 (6:5922) ld a, MACHOP call PlayCry call WaitForSoundToFinish - ld hl, VermilionCityText14 + ld hl, VermilionCityText15 ret -VermilionCityText14: ; 19933 (6:5933) - TX_FAR _VermilionCityText14 +VermilionCityText15: ; 19933 (6:5933) + TX_FAR _VermilionCityText15 db "@" VermilionCityText6: ; 19938 (6:5938) TX_FAR _VermilionCityText6 db "@" -VermilionCityText7: ; 1993d (6:593d) - TX_FAR _VermilionCityText7 - db "@" +VermilionCityText8: ; 1993d (6:593d) + TX_ASM + callba Func_f1a8a + jp TextScriptEnd -VermilionCityText8: ; 19942 (6:5942) - TX_FAR _VermilionCityText8 - db "@" +VermilionCityText9: ; 19942 (6:5942) + TX_ASM + callba Func_f1a96 + jp TextScriptEnd -VermilionCityText11: ; 19947 (6:5947) - TX_FAR _VermilionCityText11 - db "@" +VermilionCityText12: + TX_ASM + callba Func_f1aa2 + jp TextScriptEnd -VermilionCityText12: ; 1994c (6:594c) - TX_FAR _VermilionCityText12 - db "@" +VermilionCityText13: ; 19947 (6:5947) + TX_ASM + callba Func_f1aae + jp TextScriptEnd -VermilionCityText13: ; 19951 (6:5951) - TX_FAR _VermilionCityText13 - db "@" +VermilionCityText14: ; 1994c (6:594c) + TX_ASM + callba Func_f1aba + jp TextScriptEnd + +VermilionCityText7: ; 19951 (6:5951) + TX_ASM + callba Func_f1a0f + jp TextScriptEnd diff --git a/scripts/vermilioncity2.asm b/scripts/vermilioncity2.asm index 4be44db0..eb7ea37a 100755 --- a/scripts/vermilioncity2.asm +++ b/scripts/vermilioncity2.asm @@ -65,4 +65,47 @@ OfficerJennyText5: TX_FAR _OfficerJennyText5 db "@" - dr $f1a8a,$f1ac6 +Func_f1a8a: + ld hl, VermilionCityText_f1a91 + call PrintText + ret + +VermilionCityText_f1a91: + TX_FAR _VermilionCityText8 + db "@" + +Func_f1a96: + ld hl, VermilionCityText_f1a9d + call PrintText + ret + +VermilionCityText_f1a9d: + TX_FAR _VermilionCityText9 + db "@" + +Func_f1aa2: + ld hl, VermilionCityText_f1aa9 + call PrintText + ret + +VermilionCityText_f1aa9: + TX_FAR _VermilionCityText12 + db "@" + +Func_f1aae: + ld hl, VermilionCityText_f1ab5 + call PrintText + ret + +VermilionCityText_f1ab5: + TX_FAR _VermilionCityText13 + db "@" + +Func_f1aba: + ld hl, VermilionCityText_f1ac1 + call PrintText + ret + +VermilionCityText_f1ac1: + TX_FAR _VermilionCityText14 + db "@" diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 4f4b2875..8d974abc 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -3,7 +3,7 @@ ViridianMartScript: ; 1d46e (7:546e) call EnableAutoTextBoxDrawing ld hl, ViridianMartScriptPointers ld a, [W_VIRIDIANMARKETCURSCRIPT] - jp CallFunctionInTable + jp JumpTable ViridianMartScript_1d47d: ; 1d47d (7:547d) CheckEvent EVENT_OAK_GOT_PARCEL |