diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2016-06-03 17:54:53 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2016-06-03 17:54:53 -0400 |
commit | 8cdf73265f95e9a55112f373804867244512878d (patch) | |
tree | 64f4263b86839e1eb9770688ad890683fa89c503 | |
parent | 5c86071351aefd9ac0d15eeb7894da4160cfc761 (diff) | |
parent | 12b2aba4c3e112628a904e7336d8b2413c56da74 (diff) |
Merge pull request #10 from PikalaxALT/master
Next batch of scripts, etc.
126 files changed, 5154 insertions, 3882 deletions
@@ -17,6 +17,12 @@ PCM_10 EQU $35 PCM_11 EQU $36 PCM_12 EQU $37 PCM_13 EQU $38 +GLOBAL AUDIO_1, AUDIO_2, AUDIO_3, AUDIO_4 +GLOBAL PCM_1, PCM_2, PCM_3, PCM_4, PCM_5, PCM_6, PCM_7 +GLOBAL PCM_8, PCM_9, PCM_10, PCM_11, PCM_12, PCM_13 + + + INCLUDE "constants.asm" diff --git a/charmap.asm b/charmap.asm index e4368d40..8f57a130 100644 --- a/charmap.asm +++ b/charmap.asm @@ -147,12 +147,14 @@ charmap "ゅ", $E1 charmap "ょ", $E2 charmap "ー", $E3 -charmap "<pkmn>", $4a ; PkMn +charmap "<pkmn>", $4A ; PkMn charmap "@", $50 charmap "<PLAYER>", $52 charmap "<RIVAL>", $53 charmap "#", $54 ;charmap "POKé", $54 +charmap "<TARGET>", $59 +charmap "<USER>", $5A charmap "′", $71 charmap "″", $73 charmap "…", $75 diff --git a/constants.asm b/constants.asm index ba2d76c6..554f89ca 100644 --- a/constants.asm +++ b/constants.asm @@ -27,7 +27,7 @@ INCLUDE "constants/credits_constants.asm" INCLUDE "constants/music_constants.asm" INCLUDE "constants/tilesets.asm" INCLUDE "constants/starter_mons.asm" -INCLUDE "constants/predef_constants.asm" INCLUDE "constants/event_constants.asm" INCLUDE "constants/event_macros.asm" -INCLUDE "constants/pikachu_emotion_constants.asm"
\ No newline at end of file +INCLUDE "constants/pikachu_emotion_constants.asm" +INCLUDE "constants/text_constants.asm" diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index f41477a5..4ca9e178 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -1,10 +1,8 @@ ; this is a list of the sprites that can be enabled/disabled during the game -; sprites marked with an X are constants that are never used -; because those sprites are not (de)activated in a map's script -; (they are either items or sprites that deactivate after battle -; and are detected in wMissableObjectList) +; there may be unused sprites, but these will remain unmarked until +; the disassembly is complete -const_value = 0 + const_def const HS_PALLET_TOWN_OAK ; 00 const HS_LYING_OLD_MAN ; 01 @@ -31,20 +29,20 @@ const_value = 0 const HS_SAFFRON_CITY_C ; 16 const HS_SAFFRON_CITY_D ; 17 const HS_SAFFRON_CITY_E ; 18 - const HS_SAFFRON_CITY_F ; 19 X - const HS_ROUTE_2_ITEM_1 ; 1A X - const HS_ROUTE_2_ITEM_2 ; 1B X - const HS_ROUTE_4_ITEM ; 1C X + const HS_SAFFRON_CITY_F ; 19 + const HS_ROUTE_2_ITEM_1 ; 1A + const HS_ROUTE_2_ITEM_2 ; 1B + const HS_ROUTE_4_ITEM ; 1C const HS_ROUTE_9_ITEM ; 1D - const HS_ROUTE_12_SNORLAX ; 1E X - const HS_ROUTE_12_ITEM_1 ; 1F X - const HS_ROUTE_12_ITEM_2 ; 20 X + const HS_ROUTE_12_SNORLAX ; 1E + const HS_ROUTE_12_ITEM_1 ; 1F + const HS_ROUTE_12_ITEM_2 ; 20 const HS_ROUTE_15_ITEM ; 21 const HS_ROUTE_16_SNORLAX ; 22 const HS_ROUTE_22_RIVAL_1 ; 23 const HS_ROUTE_22_RIVAL_2 ; 24 - const HS_NUGGET_BRIDGE_GUY ; 25 X - const HS_ROUTE_24_ITEM ; 26 X + const HS_NUGGET_BRIDGE_GUY ; 25 + const HS_ROUTE_24_ITEM ; 26 const HS_ROUTE_25_ITEM ; 27 const HS_DAISY_SITTING ; 28 const HS_DAISY_WALKING ; 29 @@ -57,126 +55,126 @@ const_value = 0 const HS_OAKS_LAB_OAK_2 ; 30 const HS_VIRIDIAN_GYM_GIOVANNI ; 31 const HS_VIRIDIAN_GYM_ITEM ; 32 - const HS_OLD_AMBER ; 33 X + const HS_OLD_AMBER ; 33 const HS_CERULEAN_BULBASAUR ; 34 - const HS_UNKNOWN_DUNGEON_1_ITEM_1 ; 35 X - const HS_UNKNOWN_DUNGEON_1_ITEM_2 ; 36 X - const HS_UNKNOWN_DUNGEON_1_ITEM_3 ; 37 X - const HS_POKEMONTOWER_2_RIVAL ; 38 - const HS_POKEMONTOWER_3_ITEM ; 39 X - const HS_POKEMONTOWER_4_ITEM_1 ; 3A X - const HS_POKEMONTOWER_4_ITEM_2 ; 3B X - const HS_POKEMONTOWER_4_ITEM_3 ; 3C X - const HS_POKEMONTOWER_5_ITEM ; 3D X - const HS_POKEMONTOWER_6_ITEM_1 ; 3E X - const HS_POKEMONTOWER_6_ITEM_2 ; 3F X - const HS_POKEMONTOWER_7_ROCKET_1 ; 40 X - const HS_POKEMONTOWER_7_ROCKET_2 ; 41 X - const HS_POKEMONTOWER_7_ROCKET_3 ; 42 + const HS_UNKNOWN_DUNGEON_1_ITEM_1 ; 35 + const HS_UNKNOWN_DUNGEON_1_ITEM_2 ; 36 + const HS_UNKNOWN_DUNGEON_1_ITEM_3 ; 37 + const HS_UNKNOWN_DUNGEON_1_ITEM_4 ; 38 + const HS_POKEMONTOWER_2_RIVAL ; 39 + const HS_POKEMONTOWER_3_ITEM ; 3A + const HS_POKEMONTOWER_4_ITEM_1 ; 3B + const HS_POKEMONTOWER_4_ITEM_2 ; 3C + const HS_POKEMONTOWER_4_ITEM_3 ; 3D + const HS_POKEMONTOWER_5_ITEM ; 3E + const HS_POKEMONTOWER_6_ITEM_1 ; 3F + const HS_POKEMONTOWER_6_ITEM_2 ; 40 + const HS_POKEMONTOWER_7_JESSIE ; 41 + const HS_POKEMONTOWER_7_JAMES ; 42 const HS_POKEMONTOWER_7_MR_FUJI ; 43 const HS_LAVENDER_HOUSE_1_MR_FUJI ; 44 const HS_CELADON_MANSION_5_GIFT ; 45 const HS_GAME_CORNER_ROCKET ; 46 - const HS_FUCHSIA_HOUSE_2_ITEM ; 47 X - const HS_MANSION_1_ITEM_1 ; 48 X - const HS_MANSION_1_ITEM_2 ; 49 X + const HS_FUCHSIA_HOUSE_2_ITEM ; 47 + const HS_MANSION_1_ITEM_1 ; 48 + const HS_MANSION_1_ITEM_2 ; 49 const HS_FIGHTING_DOJO_GIFT_1 ; 4A const HS_FIGHTING_DOJO_GIFT_2 ; 4B const HS_SILPH_CO_1F_RECEPTIONIST ; 4C - const HS_VOLTORB_1 ; 4D X - const HS_VOLTORB_2 ; 4E X - const HS_VOLTORB_3 ; 4F X - const HS_ELECTRODE_1 ; 50 X - const HS_VOLTORB_4 ; 51 X - const HS_VOLTORB_5 ; 52 X - const HS_ELECTRODE_2 ; 53 X - const HS_VOLTORB_6 ; 54 X - const HS_ZAPDOS ; 55 X - const HS_POWER_PLANT_ITEM_1 ; 56 X - const HS_POWER_PLANT_ITEM_2 ; 57 X - const HS_POWER_PLANT_ITEM_3 ; 58 X - const HS_POWER_PLANT_ITEM_4 ; 59 X - const HS_POWER_PLANT_ITEM_5 ; 5A X - const HS_MOLTRES ; 5B X - const HS_VICTORY_ROAD_2_ITEM_1 ; 5C X - const HS_VICTORY_ROAD_2_ITEM_2 ; 5D X - const HS_VICTORY_ROAD_2_ITEM_3 ; 5E X - const HS_VICTORY_ROAD_2_ITEM_4 ; 5F X + const HS_VOLTORB_1 ; 4D + const HS_VOLTORB_2 ; 4E + const HS_VOLTORB_3 ; 4F + const HS_ELECTRODE_1 ; 50 + const HS_VOLTORB_4 ; 51 + const HS_VOLTORB_5 ; 52 + const HS_ELECTRODE_2 ; 53 + const HS_VOLTORB_6 ; 54 + const HS_ZAPDOS ; 55 + const HS_POWER_PLANT_ITEM_1 ; 56 + const HS_POWER_PLANT_ITEM_2 ; 57 + const HS_POWER_PLANT_ITEM_3 ; 58 + const HS_POWER_PLANT_ITEM_4 ; 59 + const HS_POWER_PLANT_ITEM_5 ; 5A + const HS_MOLTRES ; 5B + const HS_VICTORY_ROAD_2_ITEM_1 ; 5C + const HS_VICTORY_ROAD_2_ITEM_2 ; 5D + const HS_VICTORY_ROAD_2_ITEM_3 ; 5E + const HS_VICTORY_ROAD_2_ITEM_4 ; 5F const HS_VICTORY_ROAD_2_BOULDER ; 60 const HS_BILL_POKEMON ; 61 const HS_BILL_1 ; 62 const HS_BILL_2 ; 63 - const HS_VIRIDIAN_FOREST_ITEM_1 ; 64 X - const HS_VIRIDIAN_FOREST_ITEM_2 ; 65 X - const HS_VIRIDIAN_FOREST_ITEM_3 ; 66 X + const HS_VIRIDIAN_FOREST_ITEM_1 ; 64 + const HS_VIRIDIAN_FOREST_ITEM_2 ; 65 + const HS_VIRIDIAN_FOREST_ITEM_3 ; 66 const HS_MT_MOON_1_ITEM_1 ; 67 const HS_MT_MOON_1_ITEM_2 ; 68 - const HS_MT_MOON_1_ITEM_3 ; 69 X - const HS_MT_MOON_1_ITEM_4 ; 6A X - const HS_MT_MOON_1_ITEM_5 ; 6B X - const HS_MT_MOON_1_ITEM_6 ; 6C X + const HS_MT_MOON_1_ITEM_3 ; 69 + const HS_MT_MOON_1_ITEM_4 ; 6A + const HS_MT_MOON_1_ITEM_5 ; 6B + const HS_MT_MOON_1_ITEM_6 ; 6C const HS_MT_MOON_JESSIE ; 6D const HS_MT_MOON_JAMES ; 6E - const HS_MT_MOON_3_FOSSIL_1 ; 6F X - const HS_MT_MOON_3_FOSSIL_2 ; 70 X + const HS_MT_MOON_3_FOSSIL_1 ; 6F + const HS_MT_MOON_3_FOSSIL_2 ; 70 const HS_MT_MOON_3_ITEM_1 ; 71 - const HS_MT_MOON_3_ITEM_2 ; 72 X - const HS_SS_ANNE_2_RIVAL ; 73 X - const HS_SS_ANNE_8_ITEM ; 74 X - const HS_SS_ANNE_9_ITEM_1 ; 75 X - const HS_SS_ANNE_9_ITEM_2 ; 76 X - const HS_SS_ANNE_10_ITEM_1 ; 77 X - const HS_SS_ANNE_10_ITEM_2 ; 78 X - const HS_SS_ANNE_10_ITEM_3 ; 79 X + const HS_MT_MOON_3_ITEM_2 ; 72 + const HS_SS_ANNE_2_RIVAL ; 73 + const HS_SS_ANNE_8_ITEM ; 74 + const HS_SS_ANNE_9_ITEM_1 ; 75 + const HS_SS_ANNE_9_ITEM_2 ; 76 + const HS_SS_ANNE_10_ITEM_1 ; 77 + const HS_SS_ANNE_10_ITEM_2 ; 78 + const HS_SS_ANNE_10_ITEM_3 ; 79 const HS_VICTORY_ROAD_3_ITEM_1 ; 7A const HS_VICTORY_ROAD_3_ITEM_2 ; 7B - const HS_VICTORY_ROAD_3_BOULDER ; 7C X - const HS_ROCKET_HIDEOUT_1_ITEM_1 ; 7D X - const HS_ROCKET_HIDEOUT_1_ITEM_2 ; 7E X - const HS_ROCKET_HIDEOUT_2_ITEM_1 ; 7F X - const HS_ROCKET_HIDEOUT_2_ITEM_2 ; 80 X - const HS_ROCKET_HIDEOUT_2_ITEM_3 ; 81 X - const HS_ROCKET_HIDEOUT_2_ITEM_4 ; 82 X + const HS_VICTORY_ROAD_3_BOULDER ; 7C + const HS_ROCKET_HIDEOUT_1_ITEM_1 ; 7D + const HS_ROCKET_HIDEOUT_1_ITEM_2 ; 7E + const HS_ROCKET_HIDEOUT_2_ITEM_1 ; 7F + const HS_ROCKET_HIDEOUT_2_ITEM_2 ; 80 + const HS_ROCKET_HIDEOUT_2_ITEM_3 ; 81 + const HS_ROCKET_HIDEOUT_2_ITEM_4 ; 82 const HS_ROCKET_HIDEOUT_3_ITEM_1 ; 83 - const HS_ROCKET_HIDEOUT_3_ITEM_2 ; 84 X - const HS_ROCKET_HIDEOUT_4_GIOVANNI ; 85 X - const HS_ROCKET_HIDEOUT_4_ITEM_1 ; 86 X - const HS_ROCKET_HIDEOUT_4_ITEM_2 ; 87 - const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 88 - const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 89 XXX never (de)activated? - const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 8A - -const_value SET $8d + const HS_ROCKET_HIDEOUT_3_ITEM_2 ; 84 + const HS_ROCKET_HIDEOUT_4_GIOVANNI ; 85 + const HS_ROCKET_HIDEOUT_4_JAMES ; 86 + const HS_ROCKET_HIDEOUT_4_JESSIE ; 87 + const HS_ROCKET_HIDEOUT_4_ITEM_1 ; 88 + const HS_ROCKET_HIDEOUT_4_ITEM_2 ; 89 + const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 8A + const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 8B + const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 8C const HS_SILPH_CO_2F_1 ; 8D const HS_SILPH_CO_2F_2 ; 8E const HS_SILPH_CO_2F_3 ; 8F - const HS_SILPH_CO_2F_4 ; 90 X + const HS_SILPH_CO_2F_4 ; 90 const HS_SILPH_CO_2F_5 ; 91 const HS_SILPH_CO_3F_1 ; 92 const HS_SILPH_CO_3F_2 ; 93 - const HS_SILPH_CO_3F_ITEM ; 94 X - const HS_SILPH_CO_4F_1 ; 95 X - const HS_SILPH_CO_4F_2 ; 96 X + const HS_SILPH_CO_3F_ITEM ; 94 + const HS_SILPH_CO_4F_1 ; 95 + const HS_SILPH_CO_4F_2 ; 96 const HS_SILPH_CO_4F_3 ; 97 const HS_SILPH_CO_4F_ITEM_1 ; 98 const HS_SILPH_CO_4F_ITEM_2 ; 99 const HS_SILPH_CO_4F_ITEM_3 ; 9A - const HS_SILPH_CO_5F_1 ; 9B X - const HS_SILPH_CO_5F_2 ; 9C X - const HS_SILPH_CO_5F_3 ; 9D X + const HS_SILPH_CO_5F_1 ; 9B + const HS_SILPH_CO_5F_2 ; 9C + const HS_SILPH_CO_5F_3 ; 9D const HS_SILPH_CO_5F_4 ; 9E const HS_SILPH_CO_5F_ITEM_1 ; 9F const HS_SILPH_CO_5F_ITEM_2 ; A0 - const HS_SILPH_CO_5F_ITEM_3 ; A1 X - const HS_SILPH_CO_6F_1 ; A2 X + const HS_SILPH_CO_5F_ITEM_3 ; A1 + const HS_SILPH_CO_6F_1 ; A2 const HS_SILPH_CO_6F_2 ; A3 const HS_SILPH_CO_6F_3 ; A4 const HS_SILPH_CO_6F_ITEM_1 ; A5 const HS_SILPH_CO_6F_ITEM_2 ; A6 const HS_SILPH_CO_7F_1 ; A7 - const HS_SILPH_CO_7F_2 ; A8 X - const HS_SILPH_CO_7F_3 ; A9 X - const HS_SILPH_CO_7F_4 ; AA XXX sprite doesn't exist + const HS_SILPH_CO_7F_2 ; A8 + const HS_SILPH_CO_7F_3 ; A9 + const HS_SILPH_CO_7F_4 ; AA const HS_SILPH_CO_7F_RIVAL ; AB const HS_SILPH_CO_7F_ITEM_1 ; AC const HS_SILPH_CO_7F_ITEM_2 ; AD @@ -185,48 +183,50 @@ const_value SET $8d const HS_SILPH_CO_8F_2 ; B0 const HS_SILPH_CO_8F_3 ; B1 const HS_SILPH_CO_9F_1 ; B2 - const HS_SILPH_CO_9F_2 ; B3 XXX never (de)activated? - const HS_SILPH_CO_9F_3 ; B4 X - const HS_SILPH_CO_10F_1 ; B5 X - const HS_SILPH_CO_10F_2 ; B6 X + const HS_SILPH_CO_9F_2 ; B3 + const HS_SILPH_CO_9F_3 ; B4 + const HS_SILPH_CO_10F_1 ; B5 + const HS_SILPH_CO_10F_2 ; B6 const HS_SILPH_CO_10F_3 ; B7 const HS_SILPH_CO_10F_ITEM_1 ; B8 const HS_SILPH_CO_10F_ITEM_2 ; B9 - const HS_SILPH_CO_10F_ITEM_3 ; BA XXX sprite doesn't exist - const HS_SILPH_CO_11F_1 ; BB X - const HS_SILPH_CO_11F_2 ; BC X - const HS_SILPH_CO_11F_3 ; BD X - const HS_MAP_F4_1 ; BE X - const HS_MANSION_2_ITEM ; BF X - const HS_MANSION_3_ITEM_1 ; C0 X - const HS_MANSION_3_ITEM_2 ; C1 X - const HS_MANSION_4_ITEM_1 ; C2 X - const HS_MANSION_4_ITEM_2 ; C3 X - const HS_MANSION_4_ITEM_3 ; C4 X - const HS_MANSION_4_ITEM_4 ; C5 X - const HS_MANSION_4_ITEM_5 ; C6 X - const HS_SAFARI_ZONE_EAST_ITEM_1 ; C7 X - const HS_SAFARI_ZONE_EAST_ITEM_2 ; C8 X - const HS_SAFARI_ZONE_EAST_ITEM_3 ; C9 X - const HS_SAFARI_ZONE_EAST_ITEM_4 ; CA X - const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CB X - const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CC X - const HS_SAFARI_ZONE_WEST_ITEM_1 ; CD X - const HS_SAFARI_ZONE_WEST_ITEM_2 ; CE X - const HS_SAFARI_ZONE_WEST_ITEM_3 ; CF X - const HS_SAFARI_ZONE_WEST_ITEM_4 ; D0 X - const HS_SAFARI_ZONE_CENTER_ITEM ; D1 X - const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D2 X - const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D3 X - const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D4 X - const HS_MEWTWO ; D5 X - const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D6 - const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D7 - const HS_VICTORY_ROAD_1_ITEM_1 ; D8 - const HS_VICTORY_ROAD_1_ITEM_2 ; D9 - const HS_CHAMPIONS_ROOM_OAK ; DA - -const_value SET $df + const HS_SILPH_CO_10F_ITEM_3 ; BA + const HS_SILPH_CO_11F_1 ; BB + const HS_SILPH_CO_11F_2 ; BC + const HS_SILPH_CO_11F_JESSIE ; BD + const HS_SILPH_CO_11F_JAMES ; BE + const HS_MAP_F4_1 ; BF + const HS_MANSION_2_ITEM ; C0 + const HS_MANSION_3_ITEM_1 ; C1 + const HS_MANSION_3_ITEM_2 ; C2 + const HS_MANSION_4_ITEM_1 ; C3 + const HS_MANSION_4_ITEM_2 ; C4 + const HS_MANSION_4_ITEM_3 ; C5 + const HS_MANSION_4_ITEM_4 ; C6 + const HS_MANSION_4_ITEM_5 ; C7 + const HS_SAFARI_ZONE_EAST_ITEM_1 ; C8 + const HS_SAFARI_ZONE_EAST_ITEM_2 ; C9 + const HS_SAFARI_ZONE_EAST_ITEM_3 ; CA + const HS_SAFARI_ZONE_EAST_ITEM_4 ; CB + const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CC + const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CD + const HS_SAFARI_ZONE_WEST_ITEM_1 ; CE + const HS_SAFARI_ZONE_WEST_ITEM_2 ; CF + const HS_SAFARI_ZONE_WEST_ITEM_3 ; D0 + const HS_SAFARI_ZONE_WEST_ITEM_4 ; D1 + const HS_SAFARI_ZONE_CENTER_ITEM ; D2 + const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D3 + const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D4 + const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D5 + const HS_UNKNOWN_DUNGEON_2_ITEM_4 ; D6 + const HS_MEWTWO ; D7 + const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D8 + const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D9 + const HS_UNKNOWN_DUNGEON_3_ITEM_3 ; DA + const HS_UNKNOWN_DUNGEON_3_ITEM_4 ; DB + const HS_VICTORY_ROAD_1_ITEM_1 ; DC + const HS_VICTORY_ROAD_1_ITEM_2 ; DD + const HS_CHAMPIONS_ROOM_OAK ; DE const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; DF const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; E0 const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; E1 diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 8333837d..e5d27d1b 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -172,20 +172,6 @@ FLAG_RESET EQU 0 FLAG_SET EQU 1 FLAG_TEST EQU 2 -; special text IDs -TEXT_MON_FAINTED EQU $d0 -TEXT_BLACKED_OUT EQU $d1 -TEXT_REPEL_WORE_OFF EQU $d2 -TEXT_SAFARI_GAME_OVER EQU $d3 - -; PrintNumber - -BIT_LEFT_ALIGN EQU 6 -BIT_LEADING_ZEROES EQU 7 - -LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) -LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) - ; HP bar HP_BAR_GREEN EQU 0 HP_BAR_YELLOW EQU 1 diff --git a/constants/predef_constants.asm b/constants/predef_constants.asm deleted file mode 100644 index 76ff24a9..00000000 --- a/constants/predef_constants.asm +++ /dev/null @@ -1,101 +0,0 @@ -const_value = 0 - - predef_const DrawPlayerHUDAndHPBar - predef_const CopyUncompressedPicToTilemap - predef_const AnimateSendingOutMon - predef_const ScaleSpriteByTwo - predef_const LoadMonBackPic - predef_const CopyDownscaledMonTiles - predef_const LoadMissableObjects - predef_const HealParty - predef_const MoveAnimation; 08 play move animation - predef_const DivideBCDPredef - predef_const DivideBCDPredef2 - predef_const AddBCDPredef - predef_const SubBCDPredef - predef_const DivideBCDPredef3 - predef_const DivideBCDPredef4 - predef_const InitPlayerData - predef_const FlagActionPredef ; 10 - predef_const HideObject ; 11 - predef_const IsObjectHidden - predef_const ApplyOutOfBattlePoisonDamage - predef_const AnyPartyAlive - predef_const ShowObject - predef_const ShowObject2 - predef_const ReplaceTileBlock - predef_const InitPlayerData2 ; 18 - predef_const LoadTilesetHeader - predef_const LearnMoveFromLevelUp - predef_const LearnMove - predef_const GetQuantityOfItemInBag - predef_const CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0 - predef_const GiveItem - predef_const InvertBGPal_4Frames - predef_const FindPathToPlayer - predef_const PredefShakeScreenVertically - predef_const CalcPositionOfPlayerRelativeToNPC - predef_const ConvertNPCMovementDirectionsToJoypadMasks - predef_const PredefShakeScreenHorizontally - predef_const UpdateHPBar - predef_const HPBarLength - predef_const Diploma_TextBoxBorder - predef_const DoubleOrHalveSelectedStats - predef_const ShowPokedexMenu - predef_const EvolutionAfterBattle - predef_const SaveSAVtoSRAM0 - predef_const InitOpponent - predef_const CableClub_Run - predef_const DrawBadges - predef_const ExternalClockTradeAnim - predef_const BattleTransition - predef_const CopyTileIDsFromList - predef_const PlayIntro - predef_const Func_79869 - predef_const FlashScreen - predef_const GetTileAndCoordsInFrontOfPlayer - predef_const StatusScreen - predef_const StatusScreen2 - predef_const InternalClockTradeAnim - predef_const TrainerEngage - predef_const IndexToPokedex - predef_const DisplayPicCenteredOrUpperRight; 3B display pic? - predef_const UsedCut - predef_const ShowPokedexData - predef_const WriteMonMoves - predef_const SaveSAV - predef_const LoadSGB - predef_const MarkTownVisitedAndLoadMissableObjects - predef_const SetPartyMonTypes - predef_const CanLearnTM - predef_const TMToMove - predef_const _RunPaletteCommand - predef_const StarterDex ; 46 - predef_const _AddPartyMon - predef_const UpdateHPBar2 - predef_const DrawEnemyHUDAndHPBar - predef_const LoadTownMap_Nest - predef_const PrintMonType - predef_const EmotionBubble; 4C player exclamation - predef_const EmptyFunc3; return immediately - predef_const AskName - predef_const PewterGuys - predef_const SaveSAVtoSRAM2 - predef_const LoadSAVCheckSum2 - predef_const LoadSAV - predef_const SaveSAVtoSRAM1 - predef_const DoInGameTradeDialogue ; 54 initiate trade - predef_const HallOfFamePC - predef_const DisplayDexRating - predef_const _LeaveMapAnim ; wrong bank - predef_const EnterMapAnim ; wrong bank - predef_const GetTileTwoStepsInFrontOfPlayer - predef_const CheckForCollisionWhenPushingBoulder - predef_const PrintStrengthTxt - predef_const PickUpItem - predef_const PrintMoveType - predef_const LoadMovePPs - predef_const DrawHP ; 5F - predef_const DrawHP2 - predef_const Func_1c9c6 - predef_const OaksAideScript diff --git a/constants/text_constants.asm b/constants/text_constants.asm new file mode 100755 index 00000000..4479e90e --- /dev/null +++ b/constants/text_constants.asm @@ -0,0 +1,15 @@ +; special text IDs +TEXT_MON_FAINTED EQU $d0 +TEXT_BLACKED_OUT EQU $d1 +TEXT_REPEL_WORE_OFF EQU $d2 +TEXT_SAFARI_GAME_OVER EQU $d3 +TEXT_PIKACHU_ANIM EQU $d4 + +; PrintNumber +BIT_MONEY_SIGN EQU 5 +BIT_LEFT_ALIGN EQU 6 +BIT_LEADING_ZEROES EQU 7 + +MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) +LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) +LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) diff --git a/data/hide_show_data.asm b/data/hide_show_data.asm index 71a76e47..2387218b 100755 --- a/data/hide_show_data.asm +++ b/data/hide_show_data.asm @@ -1,7 +1,7 @@ ; data for default hidden/shown ; objects for each map ($00-$F8) -; Table of 2-Byte pointers, one pointer per map, +; Table of 2-Byte pointers, one pointer per map, ; goes up to Map_F7, ends with $FFFF. ; points to table listing all missable object in the area MapHSPointers: ; c69b (3:469b) @@ -267,327 +267,327 @@ MapHSPointers: ; c69b (3:469b) ; This Data is loaded into RAM at wd5ce-$D5F?. (wMissableObjectList) ; These constants come from the bytes for Predef functions: -Hide equ $11 -Show equ $15 +Hide EQU $11 ; (HideObjectPredef - PredefPointers) / 3 +Show EQU $15 ; (ShowObjectPredef - PredefPointers) / 3 MapHSXX: ; c88f (3:488f) - db $FF,$FF,$FF + db $FF, $FF, $FF MapHS00: ; c892 (3:4892) - db PALLET_TOWN,$01,Hide + db PALLET_TOWN, $01, Hide MapHS01: ; c895 (3:4895) - db VIRIDIAN_CITY,$05,Show - db VIRIDIAN_CITY,$07,Hide - db VIRIDIAN_CITY,$08,Hide + db VIRIDIAN_CITY, $05, Show + db VIRIDIAN_CITY, $07, Hide + db VIRIDIAN_CITY, $08, Hide MapHS02: ; c89e (3:489e) - db PEWTER_CITY,$03,Show - db PEWTER_CITY,$05,Show + db PEWTER_CITY, $03, Show + db PEWTER_CITY, $05, Show MapHS03: ; c8a4 (3:48a4) - db CERULEAN_CITY,$01,Hide - db CERULEAN_CITY,$02,Show - db CERULEAN_CITY,$06,Hide - db CERULEAN_CITY,$0A,Show - db CERULEAN_CITY,$0B,Show + db CERULEAN_CITY, $01, Hide + db CERULEAN_CITY, $02, Show + db CERULEAN_CITY, $06, Hide + db CERULEAN_CITY, $0A, Show + db CERULEAN_CITY, $0B, Show MapHS0A: ; c8b3 (3:48b3) - db SAFFRON_CITY,$01,Show - db SAFFRON_CITY,$02,Show - db SAFFRON_CITY,$03,Show - db SAFFRON_CITY,$04,Show - db SAFFRON_CITY,$05,Show - db SAFFRON_CITY,$06,Show - db SAFFRON_CITY,$07,Show - db SAFFRON_CITY,$08,Hide - db SAFFRON_CITY,$09,Hide - db SAFFRON_CITY,$0A,Hide - db SAFFRON_CITY,$0B,Hide - db SAFFRON_CITY,$0C,Hide - db SAFFRON_CITY,$0D,Hide - db SAFFRON_CITY,$0E,Show - db SAFFRON_CITY,$0F,Hide + db SAFFRON_CITY, $01, Show + db SAFFRON_CITY, $02, Show + db SAFFRON_CITY, $03, Show + db SAFFRON_CITY, $04, Show + db SAFFRON_CITY, $05, Show + db SAFFRON_CITY, $06, Show + db SAFFRON_CITY, $07, Show + db SAFFRON_CITY, $08, Hide + db SAFFRON_CITY, $09, Hide + db SAFFRON_CITY, $0A, Hide + db SAFFRON_CITY, $0B, Hide + db SAFFRON_CITY, $0C, Hide + db SAFFRON_CITY, $0D, Hide + db SAFFRON_CITY, $0E, Show + db SAFFRON_CITY, $0F, Hide MapHS0D: ; c8e0 (3:48e0) - db ROUTE_2,$01,Show - db ROUTE_2,$02,Show + db ROUTE_2, $01, Show + db ROUTE_2, $02, Show MapHS0F: ; c8e6 (3:48e6) - db ROUTE_4,$03,Show + db ROUTE_4, $03, Show MapHS14: ; c8e9 (3:48e9) - db ROUTE_9,$0A,Show + db ROUTE_9, $0A, Show MapHS17: ; c8ec (3:48ec) - db ROUTE_12,$01,Show - db ROUTE_12,$09,Show - db ROUTE_12,$0A,Show + db ROUTE_12, $01, Show + db ROUTE_12, $09, Show + db ROUTE_12, $0A, Show MapHS1A: ; c8f5 (3:48f5) - db ROUTE_15,$0B,Show + db ROUTE_15, $0B, Show MapHS1B: ; c8f8 (3:48f8) - db ROUTE_16,$07,Show + db ROUTE_16, $07, Show MapHS21: ; c8fb (3:48fb) - db ROUTE_22,$01,Hide - db ROUTE_22,$02,Hide + db ROUTE_22, $01, Hide + db ROUTE_22, $02, Hide MapHS23: ; c901 (3:4901) - db ROUTE_24,$01,Show - db ROUTE_24,$08,Show + db ROUTE_24, $01, Show + db ROUTE_24, $08, Show MapHS24: ; c907 (3:4907) - db ROUTE_25,$0A,Show + db ROUTE_25, $0A, Show MapHS27: ; c90a (3:490a) - db BLUES_HOUSE,$01,Show - db BLUES_HOUSE,$02,Hide - db BLUES_HOUSE,$03,Show + db BLUES_HOUSE, $01, Show + db BLUES_HOUSE, $02, Hide + db BLUES_HOUSE, $03, Show MapHS28: ; c913 (3:4913) - db OAKS_LAB,$01,Show - db OAKS_LAB,$02,Show - db OAKS_LAB,$03,Hide - db OAKS_LAB,$04,Show - db OAKS_LAB,$05,Show - db OAKS_LAB,$06,Hide + db OAKS_LAB, $01, Show + db OAKS_LAB, $02, Show + db OAKS_LAB, $03, Hide + db OAKS_LAB, $04, Show + db OAKS_LAB, $05, Show + db OAKS_LAB, $06, Hide MapHS2D: ; c925 (3:4925) - db VIRIDIAN_GYM,$01,Show - db VIRIDIAN_GYM,$0B,Show + db VIRIDIAN_GYM, $01, Show + db VIRIDIAN_GYM, $0B, Show MapHS34: ; c92b (3:492b) - db MUSEUM_1F,$05,Show + db MUSEUM_1F, $05, Show MapHS3F: ; c92e (3:492e) ; bulbasaur adoption house - db CERULEAN_HOUSE_1,$02,Show + db CERULEAN_HOUSE_1, $02, Show MapHSE4: ; c931 (3:4931) - db UNKNOWN_DUNGEON_1,$01,Show - db UNKNOWN_DUNGEON_1,$02,Show - db UNKNOWN_DUNGEON_1,$03,Show - db UNKNOWN_DUNGEON_1,$04,Show + db UNKNOWN_DUNGEON_1, $01, Show + db UNKNOWN_DUNGEON_1, $02, Show + db UNKNOWN_DUNGEON_1, $03, Show + db UNKNOWN_DUNGEON_1, $04, Show MapHS8F: ; c93d (3:493d) - db POKEMONTOWER_2,$01,Show + db POKEMONTOWER_2, $01, Show MapHS90: ; c940 (3:4940) - db POKEMONTOWER_3,$04,Show + db POKEMONTOWER_3, $04, Show MapHS91: ; c943 (3:4943) - db POKEMONTOWER_4,$04,Show - db POKEMONTOWER_4,$05,Show - db POKEMONTOWER_4,$06,Show + db POKEMONTOWER_4, $04, Show + db POKEMONTOWER_4, $05, Show + db POKEMONTOWER_4, $06, Show MapHS92: ; c94c (3:494c) - db POKEMONTOWER_5,$06,Show + db POKEMONTOWER_5, $06, Show MapHS93: ; c94f (3:494f) - db POKEMONTOWER_6,$04,Show - db POKEMONTOWER_6,$05,Show + db POKEMONTOWER_6, $04, Show + db POKEMONTOWER_6, $05, Show MapHS94: ; c955 (3:4955) - db POKEMONTOWER_7,$01,Hide ; jessie & james? - db POKEMONTOWER_7,$02,Hide - db POKEMONTOWER_7,$03,Show + db POKEMONTOWER_7, $01, Hide ; jessie & james? + db POKEMONTOWER_7, $02, Hide + db POKEMONTOWER_7, $03, Show MapHS95: ; c95e (3:495e) - db LAVENDER_HOUSE_1,$05,Hide + db LAVENDER_HOUSE_1, $05, Hide MapHS84: ; c961 (3:4961) - db CELADON_MANSION_5,$02,Show + db CELADON_MANSION_5, $02, Show MapHS87: ; c964 (3:4964) - db GAME_CORNER,$0B,Show + db GAME_CORNER, $0B, Show MapHS9B: ; c967 (3:4967) - db FUCHSIA_HOUSE_2,$02,Show + db FUCHSIA_HOUSE_2, $02, Show MapHSA5: ; c96a (3:496a) - db MANSION_1,$02,Show - db MANSION_1,$03,Show + db MANSION_1, $02, Show + db MANSION_1, $03, Show MapHSB1: ; c970 (3:4970) - db FIGHTING_DOJO,$06,Show - db FIGHTING_DOJO,$07,Show + db FIGHTING_DOJO, $06, Show + db FIGHTING_DOJO, $07, Show MapHSB5: ; c976 (3:4976) - db SILPH_CO_1F,$01,Hide + db SILPH_CO_1F, $01, Hide MapHS53: ; c979 (3:4979) - db POWER_PLANT,$01,Show - db POWER_PLANT,$02,Show - db POWER_PLANT,$03,Show - db POWER_PLANT,$04,Show - db POWER_PLANT,$05,Show - db POWER_PLANT,$06,Show - db POWER_PLANT,$07,Show - db POWER_PLANT,$08,Show - db POWER_PLANT,$09,Show - db POWER_PLANT,$0A,Show - db POWER_PLANT,$0B,Show - db POWER_PLANT,$0C,Show - db POWER_PLANT,$0D,Show - db POWER_PLANT,$0E,Show + db POWER_PLANT, $01, Show + db POWER_PLANT, $02, Show + db POWER_PLANT, $03, Show + db POWER_PLANT, $04, Show + db POWER_PLANT, $05, Show + db POWER_PLANT, $06, Show + db POWER_PLANT, $07, Show + db POWER_PLANT, $08, Show + db POWER_PLANT, $09, Show + db POWER_PLANT, $0A, Show + db POWER_PLANT, $0B, Show + db POWER_PLANT, $0C, Show + db POWER_PLANT, $0D, Show + db POWER_PLANT, $0E, Show MapHSC2: ; c9a3 (3:49a3) - db VICTORY_ROAD_2,$06,Show - db VICTORY_ROAD_2,$07,Show - db VICTORY_ROAD_2,$08,Show - db VICTORY_ROAD_2,$09,Show - db VICTORY_ROAD_2,$0A,Show - db VICTORY_ROAD_2,$0D,Show + db VICTORY_ROAD_2, $06, Show + db VICTORY_ROAD_2, $07, Show + db VICTORY_ROAD_2, $08, Show + db VICTORY_ROAD_2, $09, Show + db VICTORY_ROAD_2, $0A, Show + db VICTORY_ROAD_2, $0D, Show MapHS58: ; c9b5 (3:49b5) - db BILLS_HOUSE,$01,Show - db BILLS_HOUSE,$02,Hide - db BILLS_HOUSE,$03,Hide + db BILLS_HOUSE, $01, Show + db BILLS_HOUSE, $02, Hide + db BILLS_HOUSE, $03, Hide MapHS33: ; c9be (3:49be) - db VIRIDIAN_FOREST,$07,Show - db VIRIDIAN_FOREST,$08,Show - db VIRIDIAN_FOREST,$09,Show + db VIRIDIAN_FOREST, $07, Show + db VIRIDIAN_FOREST, $08, Show + db VIRIDIAN_FOREST, $09, Show MapHS3B: ; c9c7 (3:49c7) - db MT_MOON_1,$08,Show - db MT_MOON_1,$09,Show - db MT_MOON_1,$0A,Show - db MT_MOON_1,$0B,Show - db MT_MOON_1,$0C,Show - db MT_MOON_1,$0D,Show + db MT_MOON_1, $08, Show + db MT_MOON_1, $09, Show + db MT_MOON_1, $0A, Show + db MT_MOON_1, $0B, Show + db MT_MOON_1, $0C, Show + db MT_MOON_1, $0D, Show MapHS3D: ; c9d9 (3:49d9) - db MT_MOON_3,$02,Hide - db MT_MOON_3,$06,Hide - db MT_MOON_3,$07,Show - db MT_MOON_3,$08,Show - db MT_MOON_3,$09,Show - db MT_MOON_3,$0A,Show + db MT_MOON_3, $02, Hide + db MT_MOON_3, $06, Hide + db MT_MOON_3, $07, Show + db MT_MOON_3, $08, Show + db MT_MOON_3, $09, Show + db MT_MOON_3, $0A, Show MapHS60: ; c9eb (3:49eb) - db SS_ANNE_2,$02,Hide + db SS_ANNE_2, $02, Hide MapHS66: ; c9ee (3:49ee) - db SS_ANNE_8,$0A,Show + db SS_ANNE_8, $0A, Show MapHS67: ; c9f1 (3:49f1) - db SS_ANNE_9,$06,Show - db SS_ANNE_9,$09,Show + db SS_ANNE_9, $06, Show + db SS_ANNE_9, $09, Show MapHS68: ; c9f7 (3:49f7) - db SS_ANNE_10,$09,Show - db SS_ANNE_10,$0A,Show - db SS_ANNE_10,$0B,Show + db SS_ANNE_10, $09, Show + db SS_ANNE_10, $0A, Show + db SS_ANNE_10, $0B, Show MapHSC6: ; ca00 (3:4a00) - db VICTORY_ROAD_3,$05,Show - db VICTORY_ROAD_3,$06,Show - db VICTORY_ROAD_3,$0A,Show + db VICTORY_ROAD_3, $05, Show + db VICTORY_ROAD_3, $06, Show + db VICTORY_ROAD_3, $0A, Show MapHSC7: ; ca09 (3:4a09) - db ROCKET_HIDEOUT_1,$06,Show - db ROCKET_HIDEOUT_1,$07,Show + db ROCKET_HIDEOUT_1, $06, Show + db ROCKET_HIDEOUT_1, $07, Show MapHSC8: ; ca0f (3:4a0f) - db ROCKET_HIDEOUT_2,$02,Show - db ROCKET_HIDEOUT_2,$03,Show - db ROCKET_HIDEOUT_2,$04,Show - db ROCKET_HIDEOUT_2,$05,Show + db ROCKET_HIDEOUT_2, $02, Show + db ROCKET_HIDEOUT_2, $03, Show + db ROCKET_HIDEOUT_2, $04, Show + db ROCKET_HIDEOUT_2, $05, Show MapHSC9: ; ca1b (3:4a1b) - db ROCKET_HIDEOUT_3,$03,Show - db ROCKET_HIDEOUT_3,$04,Show + db ROCKET_HIDEOUT_3, $03, Show + db ROCKET_HIDEOUT_3, $04, Show MapHSCA: ; ca21 (3:4a21) - db ROCKET_HIDEOUT_4,$01,Show - db ROCKET_HIDEOUT_4,$02,Hide - db ROCKET_HIDEOUT_4,$03,Hide - db ROCKET_HIDEOUT_4,$05,Show - db ROCKET_HIDEOUT_4,$06,Show - db ROCKET_HIDEOUT_4,$07,Show - db ROCKET_HIDEOUT_4,$08,Hide - db ROCKET_HIDEOUT_4,$09,Hide + db ROCKET_HIDEOUT_4, $01, Show + db ROCKET_HIDEOUT_4, $02, Hide + db ROCKET_HIDEOUT_4, $03, Hide + db ROCKET_HIDEOUT_4, $05, Show + db ROCKET_HIDEOUT_4, $06, Show + db ROCKET_HIDEOUT_4, $07, Show + db ROCKET_HIDEOUT_4, $08, Hide + db ROCKET_HIDEOUT_4, $09, Hide MapHSCF: ; ca39 (3:4a39) - db SILPH_CO_2F,$01,Show - db SILPH_CO_2F,$02,Show - db SILPH_CO_2F,$03,Show - db SILPH_CO_2F,$04,Show - db SILPH_CO_2F,$05,Show + db SILPH_CO_2F, $01, Show + db SILPH_CO_2F, $02, Show + db SILPH_CO_2F, $03, Show + db SILPH_CO_2F, $04, Show + db SILPH_CO_2F, $05, Show MapHSD0: ; ca48 (3:4a48) - db SILPH_CO_3F,$02,Show - db SILPH_CO_3F,$03,Show - db SILPH_CO_3F,$04,Show + db SILPH_CO_3F, $02, Show + db SILPH_CO_3F, $03, Show + db SILPH_CO_3F, $04, Show MapHSD1: ; ca51 (3:4a51) - db SILPH_CO_4F,$02,Show - db SILPH_CO_4F,$03,Show - db SILPH_CO_4F,$04,Show - db SILPH_CO_4F,$05,Show - db SILPH_CO_4F,$06,Show - db SILPH_CO_4F,$07,Show + db SILPH_CO_4F, $02, Show + db SILPH_CO_4F, $03, Show + db SILPH_CO_4F, $04, Show + db SILPH_CO_4F, $05, Show + db SILPH_CO_4F, $06, Show + db SILPH_CO_4F, $07, Show MapHSD2: ; ca63 (3:4a63) - db SILPH_CO_5F,$02,Show - db SILPH_CO_5F,$03,Show - db SILPH_CO_5F,$04,Show - db SILPH_CO_5F,$05,Show - db SILPH_CO_5F,$06,Show - db SILPH_CO_5F,$07,Show - db SILPH_CO_5F,$08,Show + db SILPH_CO_5F, $02, Show + db SILPH_CO_5F, $03, Show + db SILPH_CO_5F, $04, Show + db SILPH_CO_5F, $05, Show + db SILPH_CO_5F, $06, Show + db SILPH_CO_5F, $07, Show + db SILPH_CO_5F, $08, Show MapHSD3: ; ca78 (3:4a78) - db SILPH_CO_6F,$06,Show - db SILPH_CO_6F,$07,Show - db SILPH_CO_6F,$08,Show - db SILPH_CO_6F,$09,Show - db SILPH_CO_6F,$0A,Show + db SILPH_CO_6F, $06, Show + db SILPH_CO_6F, $07, Show + db SILPH_CO_6F, $08, Show + db SILPH_CO_6F, $09, Show + db SILPH_CO_6F, $0A, Show MapHSD4: ; ca87 (3:4a87) - db SILPH_CO_7F,$05,Show - db SILPH_CO_7F,$06,Show - db SILPH_CO_7F,$07,Show - db SILPH_CO_7F,$08,Show - db SILPH_CO_7F,$09,Show - db SILPH_CO_7F,$0A,Show - db SILPH_CO_7F,$0B,Show - db SILPH_CO_7F,$0C,Show + db SILPH_CO_7F, $05, Show + db SILPH_CO_7F, $06, Show + db SILPH_CO_7F, $07, Show + db SILPH_CO_7F, $08, Show + db SILPH_CO_7F, $09, Show + db SILPH_CO_7F, $0A, Show + db SILPH_CO_7F, $0B, Show + db SILPH_CO_7F, $0C, Show MapHSD5: ; ca9f (3:4a9f) - db SILPH_CO_8F,$02,Show - db SILPH_CO_8F,$03,Show - db SILPH_CO_8F,$04,Show + db SILPH_CO_8F, $02, Show + db SILPH_CO_8F, $03, Show + db SILPH_CO_8F, $04, Show MapHSE9: ; caa8 (3:4aa8) - db SILPH_CO_9F,$02,Show - db SILPH_CO_9F,$03,Show - db SILPH_CO_9F,$04,Show + db SILPH_CO_9F, $02, Show + db SILPH_CO_9F, $03, Show + db SILPH_CO_9F, $04, Show MapHSEA: ; cab1 (3:4ab1) - db SILPH_CO_10F,$01,Show - db SILPH_CO_10F,$02,Show - db SILPH_CO_10F,$03,Show - db SILPH_CO_10F,$04,Show - db SILPH_CO_10F,$05,Show - db SILPH_CO_10F,$06,Show + db SILPH_CO_10F, $01, Show + db SILPH_CO_10F, $02, Show + db SILPH_CO_10F, $03, Show + db SILPH_CO_10F, $04, Show + db SILPH_CO_10F, $05, Show + db SILPH_CO_10F, $06, Show MapHSEB: ; cac3 (3:4ac3) - db SILPH_CO_11F,$03,Show - db SILPH_CO_11F,$04,Show - db SILPH_CO_11F,$05,Show - db SILPH_CO_11F,$06,Show + db SILPH_CO_11F, $03, Show + db SILPH_CO_11F, $04, Show + db SILPH_CO_11F, $05, Show + db SILPH_CO_11F, $06, Show MapHSF4: ; cacf (3:4acf) - db $F4,$02,Show + db $F4, $02, Show MapHSD6: ; cad2 (3:4ad2) - db MANSION_2,$02,Show + db MANSION_2, $02, Show MapHSD7: ; cad5 (3:4ad5) - db MANSION_3,$03,Show - db MANSION_3,$04,Show + db MANSION_3, $03, Show + db MANSION_3, $04, Show MapHSD8: ; cadb (3:4adb) - db MANSION_4,$03,Show - db MANSION_4,$04,Show - db MANSION_4,$05,Show - db MANSION_4,$06,Show - db MANSION_4,$08,Show + db MANSION_4, $03, Show + db MANSION_4, $04, Show + db MANSION_4, $05, Show + db MANSION_4, $06, Show + db MANSION_4, $08, Show MapHSD9: ; caea (3:4aea) - db SAFARI_ZONE_EAST,$01,Show - db SAFARI_ZONE_EAST,$02,Show - db SAFARI_ZONE_EAST,$03,Show - db SAFARI_ZONE_EAST,$04,Show + db SAFARI_ZONE_EAST, $01, Show + db SAFARI_ZONE_EAST, $02, Show + db SAFARI_ZONE_EAST, $03, Show + db SAFARI_ZONE_EAST, $04, Show MapHSDA: ; caf6 (3:4af6) - db SAFARI_ZONE_NORTH,$01,Show - db SAFARI_ZONE_NORTH,$02,Show + db SAFARI_ZONE_NORTH, $01, Show + db SAFARI_ZONE_NORTH, $02, Show MapHSDB: ; cafc (3:4afc) - db SAFARI_ZONE_WEST,$01,Show - db SAFARI_ZONE_WEST,$02,Show - db SAFARI_ZONE_WEST,$03,Show - db SAFARI_ZONE_WEST,$04,Show + db SAFARI_ZONE_WEST, $01, Show + db SAFARI_ZONE_WEST, $02, Show + db SAFARI_ZONE_WEST, $03, Show + db SAFARI_ZONE_WEST, $04, Show MapHSDC: ; cb08 (3:4b08) - db SAFARI_ZONE_CENTER,$01,Show + db SAFARI_ZONE_CENTER, $01, Show MapHSE2: ; cb0b (3:4b0b) - db UNKNOWN_DUNGEON_2,$01,Show - db UNKNOWN_DUNGEON_2,$02,Show - db UNKNOWN_DUNGEON_2,$03,Show - db UNKNOWN_DUNGEON_2,$04,Show + db UNKNOWN_DUNGEON_2, $01, Show + db UNKNOWN_DUNGEON_2, $02, Show + db UNKNOWN_DUNGEON_2, $03, Show + db UNKNOWN_DUNGEON_2, $04, Show MapHSE3: ; cb17 (3:4b17) - db UNKNOWN_DUNGEON_3,$01,Show - db UNKNOWN_DUNGEON_3,$02,Show - db UNKNOWN_DUNGEON_3,$03,Show - db UNKNOWN_DUNGEON_3,$04,Show - db UNKNOWN_DUNGEON_3,$05,Show + db UNKNOWN_DUNGEON_3, $01, Show + db UNKNOWN_DUNGEON_3, $02, Show + db UNKNOWN_DUNGEON_3, $03, Show + db UNKNOWN_DUNGEON_3, $04, Show + db UNKNOWN_DUNGEON_3, $05, Show MapHS6C: ; cb26 (3:4b26) - db VICTORY_ROAD_1,$03,Show - db VICTORY_ROAD_1,$04,Show + db VICTORY_ROAD_1, $03, Show + db VICTORY_ROAD_1, $04, Show MapHS78: ; cb2c (3:4b2c) - db CHAMPIONS_ROOM,$02,Hide + db CHAMPIONS_ROOM, $02, Hide MapHSC0: ; cb2f (3:4b2f) - db SEAFOAM_ISLANDS_1,$01,Show - db SEAFOAM_ISLANDS_1,$02,Show + db SEAFOAM_ISLANDS_1, $01, Show + db SEAFOAM_ISLANDS_1, $02, Show MapHS9F: ; cb35 (3:4b35) - db SEAFOAM_ISLANDS_2,$01,Hide - db SEAFOAM_ISLANDS_2,$02,Hide + db SEAFOAM_ISLANDS_2, $01, Hide + db SEAFOAM_ISLANDS_2, $02, Hide MapHSA0: ; cb3b (3:4b3b) - db SEAFOAM_ISLANDS_3,$01,Hide - db SEAFOAM_ISLANDS_3,$02,Hide + db SEAFOAM_ISLANDS_3, $01, Hide + db SEAFOAM_ISLANDS_3, $02, Hide MapHSA1: ; cb41 (3:4b41) - db SEAFOAM_ISLANDS_4,$02,Show - db SEAFOAM_ISLANDS_4,$03,Show - db SEAFOAM_ISLANDS_4,$05,Hide - db SEAFOAM_ISLANDS_4,$06,Hide + db SEAFOAM_ISLANDS_4, $02, Show + db SEAFOAM_ISLANDS_4, $03, Show + db SEAFOAM_ISLANDS_4, $05, Hide + db SEAFOAM_ISLANDS_4, $06, Hide MapHSA2: ; cb4d (3:4b4d) - db SEAFOAM_ISLANDS_5,$01,Hide - db SEAFOAM_ISLANDS_5,$02,Hide - db SEAFOAM_ISLANDS_5,$03,Show + db SEAFOAM_ISLANDS_5, $01, Hide + db SEAFOAM_ISLANDS_5, $02, Hide + db SEAFOAM_ISLANDS_5, $03, Show MapHS27Copy: ; cb56 (3:4b56) ; doesn't seem to be referenced - db BLUES_HOUSE,$01,Show - db BLUES_HOUSE,$02,Hide - db BLUES_HOUSE,$03,Show + db BLUES_HOUSE, $01, Show + db BLUES_HOUSE, $02, Hide + db BLUES_HOUSE, $03, Show - db $FF,$01,Show
\ No newline at end of file + db $FF, $01, Show
\ No newline at end of file diff --git a/data/mapObjects/celadongamecorner.asm b/data/mapObjects/celadongamecorner.asm index 1169e1da..a44cf0a6 100755 --- a/data/mapObjects/celadongamecorner.asm +++ b/data/mapObjects/celadongamecorner.asm @@ -18,8 +18,8 @@ CeladonGameCornerObject: ; 0x48fa0 (size=99) object SPRITE_MOM_GEISHA, $8, $b, STAY, LEFT, $6 ; person object SPRITE_GYM_HELPER, $8, $e, STAY, LEFT, $7 ; person object SPRITE_GAMBLER, $b, $f, STAY, RIGHT, $8 ; person - object SPRITE_MART_GUY, $e, $b, STAY, LEFT, $9 ; person - object SPRITE_GENTLEMAN, $11, $d, STAY, RIGHT, $a ; person + object SPRITE_FAT_BALD_GUY, $e, $b, STAY, LEFT, $9 ; person + object SPRITE_FISHER, $11, $d, STAY, RIGHT, $a ; person object SPRITE_ROCKET, $9, $5, STAY, UP, $b, OPP_ROCKET, $7 ; warp-to diff --git a/data/mapObjects/celadonpokecenter.asm b/data/mapObjects/celadonpokecenter.asm index ccc30ce7..7429c190 100755 --- a/data/mapObjects/celadonpokecenter.asm +++ b/data/mapObjects/celadonpokecenter.asm @@ -7,11 +7,12 @@ CeladonPokecenterObject: ; 0x488d2 (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_GENTLEMAN, $7, $3, WALK, $2, $2 ; person + object SPRITE_GENTLEMAN, $7, $3, STAY, DOWN, $2 ; person object SPRITE_FOULARD_WOMAN, $a, $5, WALK, $0, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP CELADON_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/cinnabargym.asm b/data/mapObjects/cinnabargym.asm index d9b69192..2b9f34cb 100755 --- a/data/mapObjects/cinnabargym.asm +++ b/data/mapObjects/cinnabargym.asm @@ -8,7 +8,7 @@ CinnabarGymObject: ; 0x75acc (size=90) db $0 ; signs db $9 ; objects - object SPRITE_FAT_BALD_GUY, $3, $3, STAY, DOWN, $1, OPP_BLAINE, $1 + object SPRITE_MR_MASTERBALL, $3, $3, STAY, DOWN, $1, OPP_BLAINE, $1 object SPRITE_BLACK_HAIR_BOY_2, $11, $2, STAY, DOWN, $2, OPP_SUPER_NERD, $9 object SPRITE_BLACK_HAIR_BOY_2, $11, $8, STAY, DOWN, $3, OPP_BURGLAR, $4 object SPRITE_BLACK_HAIR_BOY_2, $b, $4, STAY, DOWN, $4, OPP_SUPER_NERD, $a diff --git a/data/mapObjects/cinnabarpokecenter.asm b/data/mapObjects/cinnabarpokecenter.asm index f144db96..b855464e 100755 --- a/data/mapObjects/cinnabarpokecenter.asm +++ b/data/mapObjects/cinnabarpokecenter.asm @@ -7,11 +7,12 @@ CinnabarPokecenterObject: ; 0x75e46 (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person object SPRITE_LASS, $9, $4, WALK, $0, $2 ; person object SPRITE_GENTLEMAN, $2, $6, STAY, NONE, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP CINNABAR_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/copycatshouse1f.asm b/data/mapObjects/copycatshouse1f.asm index 96787714..983baa99 100755 --- a/data/mapObjects/copycatshouse1f.asm +++ b/data/mapObjects/copycatshouse1f.asm @@ -11,7 +11,7 @@ CopycatsHouse1FObject: ; 0x75ee3 (size=46) db $3 ; objects object SPRITE_MOM_GEISHA, $2, $2, STAY, DOWN, $1 ; person object SPRITE_FAT_BALD_GUY, $5, $4, STAY, LEFT, $2 ; person - object SPRITE_CLEFAIRY, $1, $4, WALK, $1, $3 ; person + object SPRITE_CHANSEY, $1, $4, STAY, NONE, $3 ; person ; warp-to EVENT_DISP COPYCATS_HOUSE_1F_WIDTH, $7, $2 diff --git a/data/mapObjects/fanclub.asm b/data/mapObjects/fanclub.asm index 6f65b287..cbe0cb31 100755 --- a/data/mapObjects/fanclub.asm +++ b/data/mapObjects/fanclub.asm @@ -5,14 +5,12 @@ FanClubObject: ; 0x59c97 (size=62) db $7, $2, $1, $ff db $7, $3, $1, $ff - db $2 ; signs - db $0, $1, $7 ; FanClubText7 - db $0, $6, $8 ; FanClubText8 + db $0 ; signs db $6 ; objects object SPRITE_FISHER2, $6, $3, STAY, LEFT, $1 ; person object SPRITE_GIRL, $1, $3, STAY, RIGHT, $2 ; person - object SPRITE_CLEFAIRY, $6, $4, STAY, LEFT, $3 ; person + object SPRITE_CLEFAIRY_2, $6, $4, STAY, LEFT, $3 ; person object SPRITE_SEEL, $1, $4, STAY, RIGHT, $4 ; person object SPRITE_GENTLEMAN, $3, $1, STAY, DOWN, $5 ; person object SPRITE_CABLE_CLUB_WOMAN, $5, $1, STAY, DOWN, $6 ; person diff --git a/data/mapObjects/fuchsiagym.asm b/data/mapObjects/fuchsiagym.asm index ded17031..c7fc3799 100755 --- a/data/mapObjects/fuchsiagym.asm +++ b/data/mapObjects/fuchsiagym.asm @@ -8,7 +8,7 @@ FuchsiaGymObject: ; 0x75658 (size=82) db $0 ; signs db $8 ; objects - object SPRITE_BLACKBELT, $4, $a, STAY, DOWN, $1, OPP_KOGA, $1 + object SPRITE_LAPRAS_GIVER, $4, $a, STAY, DOWN, $1, OPP_KOGA, $1 object SPRITE_ROCKER, $8, $d, STAY, DOWN, $2, OPP_JUGGLER, $7 object SPRITE_ROCKER, $7, $8, STAY, RIGHT, $3, OPP_JUGGLER, $3 object SPRITE_ROCKER, $1, $c, STAY, DOWN, $4, OPP_JUGGLER, $8 diff --git a/data/mapObjects/fuchsiapokecenter.asm b/data/mapObjects/fuchsiapokecenter.asm index 19b2c950..8a1c392b 100755 --- a/data/mapObjects/fuchsiapokecenter.asm +++ b/data/mapObjects/fuchsiapokecenter.asm @@ -7,11 +7,12 @@ FuchsiaPokecenterObject: ; 0x7507d (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person - object SPRITE_ROCKER, $2, $3, STAY, NONE, $2 ; person + object SPRITE_ROCKER, $4, $3, STAY, UP, $2 ; person object SPRITE_LASS, $6, $5, WALK, $2, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP FUCHSIA_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/indigoplateaulobby.asm b/data/mapObjects/indigoplateaulobby.asm index dfcd97b7..c41e2cfc 100755 --- a/data/mapObjects/indigoplateaulobby.asm +++ b/data/mapObjects/indigoplateaulobby.asm @@ -8,12 +8,13 @@ IndigoPlateauLobbyObject: ; 0x19c95 (size=58) db $0 ; signs - db $5 ; objects + db $6 ; objects object SPRITE_NURSE, $7, $5, STAY, DOWN, $1 ; person object SPRITE_GYM_HELPER, $4, $9, STAY, RIGHT, $2 ; person object SPRITE_LASS, $5, $1, STAY, DOWN, $3 ; person object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $4 ; person object SPRITE_CABLE_CLUB_WOMAN, $d, $6, STAY, DOWN, $5 ; person + object SPRITE_CHANSEY, $8, $5, STAY, DOWN, $6 ; person ; warp-to EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $7 diff --git a/data/mapObjects/lavenderpokecenter.asm b/data/mapObjects/lavenderpokecenter.asm index b421c3a4..702e67b7 100755 --- a/data/mapObjects/lavenderpokecenter.asm +++ b/data/mapObjects/lavenderpokecenter.asm @@ -7,11 +7,12 @@ LavenderPokecenterObject: ; 0x5c8f4 (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person object SPRITE_GENTLEMAN, $5, $3, STAY, NONE, $2 ; person - object SPRITE_LITTLE_GIRL, $2, $6, WALK, $1, $3 ; person + object SPRITE_LITTLE_GIRL, $a, $5, WALK, $2, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP LAVENDER_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm index a77d1d1e..4d1e26c2 100755 --- a/data/mapObjects/pokemontower7.asm +++ b/data/mapObjects/pokemontower7.asm @@ -6,10 +6,10 @@ PokemonTower7Object: ; 0x60ef6 (size=42) db $0 ; signs - db 3 ; objects - object SPRITE_JESSIE, $a 8, 8, STAY, DOWN, 1 - object SPRITE_JAMES, $b, 8, STAY, DOWN, 2 - object SPRITE_MR_FUJI, $a, 3, STAY, DOWN, 3 + db $3 ; objects + object SPRITE_JESSIE, $a, $8, STAY, DOWN, $1 + object SPRITE_JAMES, $b, $8, STAY, DOWN, $2 + object SPRITE_MR_FUJI, $a, $3, STAY, DOWN, $3 ; warp-to EVENT_DISP POKEMONTOWER_7_WIDTH, $10, $9 ; POKEMONTOWER_6 diff --git a/data/mapObjects/rockethideout4.asm b/data/mapObjects/rockethideout4.asm index 5441f9cd..616f5a75 100755 --- a/data/mapObjects/rockethideout4.asm +++ b/data/mapObjects/rockethideout4.asm @@ -10,8 +10,8 @@ RocketHideout4Object: ; 0x455f1 (size=95) db $9 ; objects object SPRITE_GIOVANNI, $19, $3, STAY, DOWN, $1, OPP_GIOVANNI, $1 - object SPRITE_ROCKET, $17, $c, STAY, DOWN, $2, OPP_ROCKET, $10 - object SPRITE_ROCKET, $1a, $c, STAY, DOWN, $3, OPP_ROCKET, $11 + object SPRITE_JAMES, $19, $a, STAY, DOWN, $2 + object SPRITE_JESSIE, $18, $a, STAY, DOWN, $3 object SPRITE_ROCKET, $b, $2, STAY, DOWN, $4, OPP_ROCKET, $12 object SPRITE_BALL, $a, $c, STAY, NONE, $5, HP_UP object SPRITE_BALL, $9, $4, STAY, NONE, $6, TM_02 diff --git a/data/mapObjects/route18gateupstairs.asm b/data/mapObjects/route18gateupstairs.asm index c611e0c3..93438044 100755 --- a/data/mapObjects/route18gateupstairs.asm +++ b/data/mapObjects/route18gateupstairs.asm @@ -9,7 +9,7 @@ Route18GateUpstairsObject: ; 0x499a4 (size=24) db $2, $6, $3 ; Route18GateUpstairsText3 db $1 ; objects - object SPRITE_BUG_CATCHER, $4, $2, WALK, $2, $1 ; person + object SPRITE_COOK, $4, $2, WALK, $2, $1 ; person ; warp-to EVENT_DISP ROUTE_18_GATE_2F_WIDTH, $7, $7 ; ROUTE_18_GATE_1F diff --git a/data/mapObjects/route22gate.asm b/data/mapObjects/route22gate.asm index 604a8730..02f11d58 100755 --- a/data/mapObjects/route22gate.asm +++ b/data/mapObjects/route22gate.asm @@ -5,7 +5,7 @@ Route22GateObject: ; 0x1e720 (size=42) db $7, $4, $0, $ff db $7, $5, $0, $ff db $0, $4, $0, $ff - db $0, $5, $1, $ff + db $0, $5, $0, $ff db $0 ; signs diff --git a/data/mapObjects/saffrongym.asm b/data/mapObjects/saffrongym.asm index 63676905..20d91991 100755 --- a/data/mapObjects/saffrongym.asm +++ b/data/mapObjects/saffrongym.asm @@ -38,7 +38,7 @@ SaffronGymObject: ; 0x5d259 (size=330) db $0 ; signs db $9 ; objects - object SPRITE_GIRL, $9, $8, STAY, DOWN, $1, OPP_SABRINA, $1 + object SPRITE_LASS, $9, $8, STAY, DOWN, $1, OPP_SABRINA, $1 object SPRITE_MEDIUM, $a, $1, STAY, DOWN, $2, OPP_CHANNELER, $16 object SPRITE_BUG_CATCHER, $11, $1, STAY, DOWN, $3, OPP_PSYCHIC_TR, $1 object SPRITE_MEDIUM, $3, $7, STAY, DOWN, $4, OPP_CHANNELER, $17 diff --git a/data/mapObjects/saffronpokecenter.asm b/data/mapObjects/saffronpokecenter.asm index 8487bb01..bda46343 100755 --- a/data/mapObjects/saffronpokecenter.asm +++ b/data/mapObjects/saffronpokecenter.asm @@ -7,11 +7,12 @@ SaffronPokecenterObject: ; 0x5d54f (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person object SPRITE_FOULARD_WOMAN, $5, $5, STAY, NONE, $2 ; person object SPRITE_GENTLEMAN, $8, $3, STAY, DOWN, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP SAFFRON_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/seafoamislands1.asm b/data/mapObjects/seafoamislands1.asm index 287f67ce..3b3d4f7a 100755 --- a/data/mapObjects/seafoamislands1.asm +++ b/data/mapObjects/seafoamislands1.asm @@ -24,7 +24,3 @@ SeafoamIslands1Object: ; 0x4484f (size=72) EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $5, $7 ; SEAFOAM_ISLANDS_2 EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $3, $19 ; SEAFOAM_ISLANDS_2 EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $f, $17 ; SEAFOAM_ISLANDS_2 - - ; holes - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $6, $11 - EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $6, $18 diff --git a/data/mapObjects/ssanne8.asm b/data/mapObjects/ssanne8.asm index 992230d8..f089b35d 100755 --- a/data/mapObjects/ssanne8.asm +++ b/data/mapObjects/ssanne8.asm @@ -19,7 +19,7 @@ SSAnne8Object: ; 0x61a60 (size=127) object SPRITE_GIRL, $16, $3, WALK, $1, $5 ; person object SPRITE_FAT_BALD_GUY, $0, $e, STAY, NONE, $6 ; person object SPRITE_LITTLE_GIRL, $2, $b, STAY, DOWN, $7 ; person - object SPRITE_CLEFAIRY, $3, $b, STAY, DOWN, $8 ; person + object SPRITE_JIGGLYPUFF, $3, $b, STAY, DOWN, $8 ; person object SPRITE_GIRL, $a, $d, STAY, RIGHT, $9 ; person object SPRITE_BALL, $c, $f, STAY, NONE, $a, TM_08 object SPRITE_GENTLEMAN, $15, $d, WALK, $2, $b ; person diff --git a/data/mapObjects/vermilionhouse3.asm b/data/mapObjects/vermilionhouse3.asm index ab955a20..161ad090 100755 --- a/data/mapObjects/vermilionhouse3.asm +++ b/data/mapObjects/vermilionhouse3.asm @@ -8,7 +8,7 @@ VermilionHouse3Object: ; 0x19c25 (size=26) db $0 ; signs db $1 ; objects - object SPRITE_LITTLE_GIRL, $3, $5, STAY, UP, $1 ; person + object SPRITE_GENTLEMAN, $3, $5, STAY, UP, $1 ; person ; warp-to EVENT_DISP VERMILION_HOUSE_3_WIDTH, $7, $2 diff --git a/data/mapObjects/vermilionpokecenter.asm b/data/mapObjects/vermilionpokecenter.asm index e5d1d147..cd11d653 100755 --- a/data/mapObjects/vermilionpokecenter.asm +++ b/data/mapObjects/vermilionpokecenter.asm @@ -7,11 +7,12 @@ VermilionPokecenterObject: ; 0x5c9a9 (size=44) db $0 ; signs - db $4 ; objects + db $5 ; objects object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person object SPRITE_FISHER, $a, $5, STAY, NONE, $2 ; person object SPRITE_SAILOR, $5, $4, STAY, NONE, $3 ; person object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person + object SPRITE_CHANSEY, $4, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP VERMILION_POKECENTER_WIDTH, $7, $3 diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 40cd151f..04bee42f 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -84,126 +84,126 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(RockTunnelPokecenter_h) db BANK(RockTunnel1_h) db BANK(PowerPlant_h) - db $12 ; db BANK(Route11Gate_h) + db BANK(Route11Gate_h) db BANK(DiglettsCaveEntranceRoute11_h) - db $12 ; db BANK(Route11GateUpstairs_h) - db $12 ; db BANK(Route12Gate_h) - db $07 ; db BANK(BillsHouse_h) - db $17 ; db BANK(VermilionPokecenter_h) - db $16 ; db BANK(FanClub_h) - db $17 ; db BANK(VermilionMart_h) - db $17 ; db BANK(VermilionGym_h) - db $07 ; db BANK(VermilionHouse1_h) - db $07 ; db BANK(VermilionDock_h) - db $18 ; db BANK(SSAnne1_h) - db $18 ; db BANK(SSAnne2_h) - db $11 ; db BANK(SSAnne3_h) - db $18 ; db BANK(SSAnne4_h) - db $18 ; db BANK(SSAnne5_h) - db $18 ; db BANK(SSAnne6_h) - db $18 ; db BANK(SSAnne7_h) - db $18 ; db BANK(SSAnne8_h) - db $18 ; db BANK(SSAnne9_h) - db $18 ; db BANK(SSAnne10_h) + db BANK(Route11GateUpstairs_h) + db BANK(Route12Gate_h) + db BANK(BillsHouse_h) + db BANK(VermilionPokecenter_h) + db BANK(FanClub_h) + db BANK(VermilionMart_h) + db BANK(VermilionGym_h) + db BANK(VermilionHouse1_h) + db BANK(VermilionDock_h) + db BANK(SSAnne1_h) + db BANK(SSAnne2_h) + db BANK(SSAnne3_h) + db BANK(SSAnne4_h) + db BANK(SSAnne5_h) + db BANK(SSAnne6_h) + db BANK(SSAnne7_h) + db BANK(SSAnne8_h) + db BANK(SSAnne9_h) + db BANK(SSAnne10_h) db $1d ; unused db $1d ; unused db $1d ; unused - db $17 ; db BANK(VictoryRoad1_h) + db BANK(VictoryRoad1_h) db $1d ; unused db $1d ; unused db $1d ; unused db $1d ; unused - db $16 ; db BANK(Lance_h) + db BANK(Lance_h) db $1d ; unused db $1d ; unused db $1d ; unused db $1d ; unused - db $16 ; db BANK(HallofFameRoom_h) - db $18 ; db BANK(UndergroundPathNS_h) - db $1d ; db BANK(Gary_h) - db $18 ; db BANK(UndergroundPathWE_h) - db $11 ; db BANK(CeladonMart1_h) - db $15 ; db BANK(CeladonMart2_h) - db $12 ; db BANK(CeladonMart3_h) - db $12 ; db BANK(CeladonMart4_h) - db $12 ; db BANK(CeladonMartRoof_h) - db $12 ; db BANK(CeladonMartElevator_h) - db $12 ; db BANK(CeladonMansion1_h) - db $12 ; db BANK(CeladonMansion2_h) - db $12 ; db BANK(CeladonMansion3_h) - db $12 ; db BANK(CeladonMansion4_h) - db $07 ; db BANK(CeladonMansion5_h) - db $12 ; db BANK(CeladonPokecenter_h) - db $12 ; db BANK(CeladonGym_h) - db $12 ; db BANK(CeladonGameCorner_h) - db $12 ; db BANK(CeladonMart5_h) - db $12 ; db BANK(CeladonPrizeRoom_h) - db $12 ; db BANK(CeladonDiner_h) - db $12 ; db BANK(CeladonHouse_h) - db $12 ; db BANK(CeladonHotel_h) - db $17 ; db BANK(LavenderPokecenter_h) - db $18 ; db BANK(PokemonTower1_h) - db $18 ; db BANK(PokemonTower2_h) - db $18 ; db BANK(PokemonTower3_h) - db $18 ; db BANK(PokemonTower4_h) - db $18 ; db BANK(PokemonTower5_h) - db $18 ; db BANK(PokemonTower6_h) - db $18 ; db BANK(PokemonTower7_h) - db $07 ; db BANK(LavenderHouse1_h) - db $17 ; db BANK(LavenderMart_h) - db $07 ; db BANK(LavenderHouse2_h) - db $07 ; db BANK(FuchsiaMart_h) - db $1d ; db BANK(FuchsiaHouse1_h) - db $1d ; db BANK(FuchsiaPokecenter_h) - db $1d ; db BANK(FuchsiaHouse2_h) - db $1d ; db BANK(SafariZoneEntrance_h) - db $1d ; db BANK(FuchsiaGym_h) - db $1d ; db BANK(FuchsiaMeetingRoom_h) - db $11 ; db BANK(SeafoamIslands2_h) - db $11 ; db BANK(SeafoamIslands3_h) - db $11 ; db BANK(SeafoamIslands4_h) - db $11 ; db BANK(SeafoamIslands5_h) - db $15 ; db BANK(VermilionHouse2_h) - db $15 ; db BANK(FuchsiaHouse3_h) - db $11 ; db BANK(Mansion1_h) - db $1d ; db BANK(CinnabarGym_h) - db $1d ; db BANK(Lab1_h) - db $1d ; db BANK(Lab2_h) - db $1d ; db BANK(Lab3_h) - db $1d ; db BANK(Lab4_h) - db $1d ; db BANK(CinnabarPokecenter_h) - db $1d ; db BANK(CinnabarMart_h) - db $1d ; db BANK(CinnabarMart_h) - db $06 ; db BANK(IndigoPlateauLobby_h) - db $1d ; db BANK(CopycatsHouse1F_h) - db $17 ; db BANK(CopycatsHouse2F_h) - db $17 ; db BANK(FightingDojo_h) - db $17 ; db BANK(SaffronGym_h) - db $07 ; db BANK(SaffronHouse1_h) - db $17 ; db BANK(SaffronMart_h) - db $17 ; db BANK(SilphCo1_h) - db $17 ; db BANK(SaffronPokecenter_h) - db $07 ; db BANK(SaffronHouse2_h) - db $12 ; db BANK(Route15Gate_h) - db $12 ; db BANK(Route15GateUpstairs_h) - db $12 ; db BANK(Route16Gate_h) - db $12 ; db BANK(Route16GateUpstairs_h) - db $07 ; db BANK(Route16House_h) - db $15 ; db BANK(Route12House_h) - db $12 ; db BANK(Route18Gate_h) - db $12 ; db BANK(Route18GateUpstairs_h) - db $11 ; db BANK(SeafoamIslands1_h) - db $07 ; db BANK(Route22Gate_h) - db $14 ; db BANK(VictoryRoad2_h) - db $12 ; db BANK(Route12GateUpstairs_h) - db $06 ; db BANK(VermilionHouse3_h) - db $18 ; db BANK(DiglettsCave_h) - db $11 ; db BANK(VictoryRoad3_h) - db $11 ; db BANK(RocketHideout1_h) - db $11 ; db BANK(RocketHideout2_h) - db $11 ; db BANK(RocketHideout3_h) - db $11 ; db BANK(RocketHideout4_h) - db $11 ; db BANK(RocketHideoutElevator_h) + db BANK(HallofFameRoom_h) + db BANK(UndergroundPathNS_h) + db BANK(Gary_h) + db BANK(UndergroundPathWE_h) + db BANK(CeladonMart1_h) + db BANK(CeladonMart2_h) + db BANK(CeladonMart3_h) + db BANK(CeladonMart4_h) + db BANK(CeladonMartRoof_h) + db BANK(CeladonMartElevator_h) + db BANK(CeladonMansion1_h) + db BANK(CeladonMansion2_h) + db BANK(CeladonMansion3_h) + db BANK(CeladonMansion4_h) + db BANK(CeladonMansion5_h) + db BANK(CeladonPokecenter_h) + db BANK(CeladonGym_h) + db BANK(CeladonGameCorner_h) + db BANK(CeladonMart5_h) + db BANK(CeladonPrizeRoom_h) + db BANK(CeladonDiner_h) + db BANK(CeladonHouse_h) + db BANK(CeladonHotel_h) + db BANK(LavenderPokecenter_h) + db BANK(PokemonTower1_h) + db BANK(PokemonTower2_h) + db BANK(PokemonTower3_h) + db BANK(PokemonTower4_h) + db BANK(PokemonTower5_h) + db BANK(PokemonTower6_h) + db BANK(PokemonTower7_h) + db BANK(LavenderHouse1_h) + db BANK(LavenderMart_h) + db BANK(LavenderHouse2_h) + db BANK(FuchsiaMart_h) + db BANK(FuchsiaHouse1_h) + db BANK(FuchsiaPokecenter_h) + db BANK(FuchsiaHouse2_h) + db BANK(SafariZoneEntrance_h) + db BANK(FuchsiaGym_h) + db BANK(FuchsiaMeetingRoom_h) + db BANK(SeafoamIslands2_h) + db BANK(SeafoamIslands3_h) + db BANK(SeafoamIslands4_h) + db BANK(SeafoamIslands5_h) + db BANK(VermilionHouse2_h) + db BANK(FuchsiaHouse3_h) + db BANK(Mansion1_h) + db BANK(CinnabarGym_h) + db BANK(Lab1_h) + db BANK(Lab2_h) + db BANK(Lab3_h) + db BANK(Lab4_h) + db BANK(CinnabarPokecenter_h) + db BANK(CinnabarMart_h) + db BANK(CinnabarMart_h) + db BANK(IndigoPlateauLobby_h) + db BANK(CopycatsHouse1F_h) + db BANK(CopycatsHouse2F_h) + db BANK(FightingDojo_h) + db BANK(SaffronGym_h) + db BANK(SaffronHouse1_h) + db BANK(SaffronMart_h) + db BANK(SilphCo1_h) + db BANK(SaffronPokecenter_h) + db BANK(SaffronHouse2_h) + db BANK(Route15Gate_h) + db BANK(Route15GateUpstairs_h) + db BANK(Route16Gate_h) + db BANK(Route16GateUpstairs_h) + db BANK(Route16House_h) + db BANK(Route12House_h) + db BANK(Route18Gate_h) + db BANK(Route18GateUpstairs_h) + db BANK(SeafoamIslands1_h) + db BANK(Route22Gate_h) + db BANK(VictoryRoad2_h) + db BANK(Route12GateUpstairs_h) + db BANK(VermilionHouse3_h) + db BANK(DiglettsCave_h) + db BANK(VictoryRoad3_h) + db BANK(RocketHideout1_h) + db BANK(RocketHideout2_h) + db BANK(RocketHideout3_h) + db BANK(RocketHideout4_h) + db BANK(RocketHideoutElevator_h) db $01 ; unused db $01 ; unused db $01 ; unused diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index c8e41d14..501724af 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -84,129 +84,129 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw RockTunnelPokecenter_h dw RockTunnel1_h dw PowerPlant_h - dw $5396 ; dw Route11Gate_h + dw Route11Gate_h dw DiglettsCaveEntranceRoute11_h - dw $53de ; dw Route11GateUpstairs_h - dw $548f ; dw Route12Gate_h - dw $606e ; dw BillsHouse_h - dw $4865 ; dw VermilionPokecenter_h - dw $5a00 ; dw FanClub_h ;id=90 - dw $48cb ; dw VermilionMart_h - dw $4910 ; dw VermilionGym_h - dw $53f8 ; dw VermilionHouse1_h - dw $544e ; dw VermilionDock_h - dw $52a4 ; dw SSAnne1_h - dw $53de ; dw SSAnne2_h - dw $49bf ; dw SSAnne3_h - dw $5650 ; dw SSAnne4_h - dw $56d0 ; dw SSAnne5_h - dw $57d5 ; dw SSAnne6_h ;id=100 - dw $58b7 ; dw SSAnne7_h - dw $5993 ; dw SSAnne8_h - dw $5b68 ; dw SSAnne9_h - dw $5d60 ; dw SSAnne10_h - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $5909 ; dw VictoryRoad1_h - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused ;id=110 - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $623d ; dw Lance_h ; unused - dw $642d ; dw HallofFameRoom_h - dw $5f31 ; dw UndergroundPathNS_h - dw $57a0 ; dw Gary_h ;id=120 - dw $5f55 ; dw UndergroundPathWE_h - dw $42b7 ; dw CeladonMart1_h - dw $60d9 ; dw CeladonMart2_h - dw $4157 ; dw CeladonMart3_h - dw $4251 ; dw CeladonMart4_h - dw $42d0 ; dw CeladonMartRoof_h - dw $44ff ; dw CeladonMartElevator_h - dw $4593 ; dw CeladonMansion1_h - dw $465a ; dw CeladonMansion2_h - dw $46b0 ; dw CeladonMansion3_h ;id=130 - dw $4861 ; dw CeladonMansion4_h - dw $5636 ; dw CeladonMansion5_h - dw $48af ; dw CeladonPokecenter_h - dw $4915 ; dw CeladonGym_h - dw $4bc8 ; dw CeladonGameCorner_h - dw $507f ; dw CeladonMart5_h - dw $5107 ; dw CeladonPrizeRoom_h - dw $5168 ; dw CeladonDiner_h - dw $51e8 ; dw CeladonHouse_h - dw $5243 ; dw CeladonHotel_h ;id=140 - dw $479c ; dw LavenderPokecenter_h - dw $4420 ; dw PokemonTower1_h - dw $44e7 ; dw PokemonTower2_h - dw $46af ; dw PokemonTower3_h - dw $47d9 ; dw PokemonTower4_h - dw $4915 ; dw PokemonTower5_h - dw $4ad2 ; dw PokemonTower6_h - dw $4ce8 ; dw PokemonTower7_h - dw $51a4 ; dw LavenderHouse1_h - dw $4802 ; dw LavenderMart_h ;id=150 - dw $52aa ; dw LavenderHouse2_h - dw $5685 ; dw FuchsiaMart_h - dw $4851 ; dw FuchsiaHouse1_h - dw $489c ; dw FuchsiaPokecenter_h - dw $4902 ; dw FuchsiaHouse2_h - dw $4a1a ; dw SafariZoneEntrance_h - dw $4bd9 ; dw FuchsiaGym_h - dw $4e7f ; dw FuchsiaMeetingRoom_h - dw $6578 ; dw SeafoamIslands2_h - dw $66b4 ; dw SeafoamIslands3_h ;id=160 - dw $67f0 ; dw SeafoamIslands4_h - dw $69fc ; dw SeafoamIslands5_h - dw $6054 ; dw VermilionHouse2_h - dw $6160 ; dw FuchsiaHouse3_h - dw $4344 ; dw Mansion1_h - dw $4ee6 ; dw CinnabarGym_h - dw $53fb ; dw Lab1_h - dw $5490 ; dw Lab2_h - dw $54f6 ; dw Lab3_h - dw $55a0 ; dw Lab4_h ;id=170 - dw $569b ; dw CinnabarPokecenter_h - dw $5701 ; dw CinnabarMart_h - dw $5701 ; dw CinnabarMart_h ; unused - dw $5d45 ; dw IndigoPlateauLobby_h - dw $5746 ; dw CopycatsHouse1F_h - dw $4b5b ; dw CopycatsHouse2F_h - dw $4c47 ; dw FightingDojo_h - dw $4ef7 ; dw SaffronGym_h - dw $56db ; dw SaffronHouse1_h - dw $52f3 ; dw SaffronMart_h ;id=180 - dw $5338 ; dw SilphCo1_h - dw $541f ; dw SaffronPokecenter_h - dw $573a ; dw SaffronHouse2_h - dw $558d ; dw Route15Gate_h - dw $55d5 ; dw Route15GateUpstairs_h - dw $5649 ; dw Route16Gate_h - dw $5796 ; dw Route16GateUpstairs_h - dw $5ef6 ; dw Route16House_h - dw $64a5 ; dw Route12House_h - dw $5801 ; dw Route18Gate_h ;id=190 - dw $5900 ; dw Route18GateUpstairs_h - dw $487e ; dw SeafoamIslands1_h - dw $5f81 ; dw Route22Gate_h - dw $57cc ; dw VictoryRoad2_h - dw $54eb ; dw Route12GateUpstairs_h - dw $5d05 ; dw VermilionHouse3_h - dw $5f79 ; dw DiglettsCave_h - dw $4a0d ; dw VictoryRoad3_h - dw $4c5e ; dw RocketHideout1_h - dw $4ebb ; dw RocketHideout2_h ;200 - dw $52b9 ; dw RocketHideout3_h - dw $54f1 ; dw RocketHideout4_h - dw $5958 ; dw RocketHideoutElevator_h - dw $5958 ; dw RocketHideoutElevator_h ; unused - dw $5958 ; dw RocketHideoutElevator_h ; unused - dw $5958 ; dw RocketHideoutElevator_h ; unused + dw Route11GateUpstairs_h + dw Route12Gate_h + dw BillsHouse_h + dw VermilionPokecenter_h + dw FanClub_h ;id=90 + dw VermilionMart_h + dw VermilionGym_h + dw VermilionHouse1_h + dw VermilionDock_h + dw SSAnne1_h + dw SSAnne2_h + dw SSAnne3_h + dw SSAnne4_h + dw SSAnne5_h + dw SSAnne6_h ;id=100 + dw SSAnne7_h + dw SSAnne8_h + dw SSAnne9_h + dw SSAnne10_h + dw Lance_h ; unused + dw Lance_h ; unused + dw Lance_h ; unused + dw VictoryRoad1_h + dw Lance_h ; unused + dw Lance_h ; unused ;id=110 + dw Lance_h ; unused + dw Lance_h ; unused + dw Lance_h + dw Lance_h ; unused + dw Lance_h ; unused + dw Lance_h ; unused + dw Lance_h ; unused + dw HallofFameRoom_h + dw UndergroundPathNS_h + dw Gary_h ;id=120 + dw UndergroundPathWE_h + dw CeladonMart1_h + dw CeladonMart2_h + dw CeladonMart3_h + dw CeladonMart4_h + dw CeladonMartRoof_h + dw CeladonMartElevator_h + dw CeladonMansion1_h + dw CeladonMansion2_h + dw CeladonMansion3_h ;id=130 + dw CeladonMansion4_h + dw CeladonMansion5_h + dw CeladonPokecenter_h + dw CeladonGym_h + dw CeladonGameCorner_h + dw CeladonMart5_h + dw CeladonPrizeRoom_h + dw CeladonDiner_h + dw CeladonHouse_h + dw CeladonHotel_h ;id=140 + dw LavenderPokecenter_h + dw PokemonTower1_h + dw PokemonTower2_h + dw PokemonTower3_h + dw PokemonTower4_h + dw PokemonTower5_h + dw PokemonTower6_h + dw PokemonTower7_h + dw LavenderHouse1_h + dw LavenderMart_h ;id=150 + dw LavenderHouse2_h + dw FuchsiaMart_h + dw FuchsiaHouse1_h + dw FuchsiaPokecenter_h + dw FuchsiaHouse2_h + dw SafariZoneEntrance_h + dw FuchsiaGym_h + dw FuchsiaMeetingRoom_h + dw SeafoamIslands2_h + dw SeafoamIslands3_h ;id=160 + dw SeafoamIslands4_h + dw SeafoamIslands5_h + dw VermilionHouse2_h + dw FuchsiaHouse3_h + dw Mansion1_h + dw CinnabarGym_h + dw Lab1_h + dw Lab2_h + dw Lab3_h + dw Lab4_h ;id=170 + dw CinnabarPokecenter_h + dw CinnabarMart_h + dw CinnabarMart_h ; unused + dw IndigoPlateauLobby_h + dw CopycatsHouse1F_h + dw CopycatsHouse2F_h + dw FightingDojo_h + dw SaffronGym_h + dw SaffronHouse1_h + dw SaffronMart_h ;id=180 + dw SilphCo1_h + dw SaffronPokecenter_h + dw SaffronHouse2_h + dw Route15Gate_h + dw Route15GateUpstairs_h + dw Route16Gate_h + dw Route16GateUpstairs_h + dw Route16House_h + dw Route12House_h + dw Route18Gate_h ;id=190 + dw Route18GateUpstairs_h + dw SeafoamIslands1_h + dw Route22Gate_h + dw VictoryRoad2_h + dw Route12GateUpstairs_h + dw VermilionHouse3_h + dw DiglettsCave_h + dw VictoryRoad3_h + dw RocketHideout1_h + dw RocketHideout2_h ;200 + dw RocketHideout3_h + dw RocketHideout4_h + dw RocketHideoutElevator_h + dw RocketHideoutElevator_h ; unused + dw RocketHideoutElevator_h ; unused + dw RocketHideoutElevator_h ; unused dw $5c80 ; dw SilphCo2_h dw $5eea ; dw SilphCo3_h dw $5e09 ; dw SilphCo4_h @@ -248,4 +248,4 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw $59ef ; dw Lorelei_h dw $5b4a ; dw Bruno_h dw $5ca1 ; dw Agatha_h ;247 - dw $620e ; dw BeachHouse_h + dw BeachHouse_h diff --git a/data/tileset_headers.asm b/data/tileset_headers.asm index c21474f8..d6c6a2c9 100755 --- a/data/tileset_headers.asm +++ b/data/tileset_headers.asm @@ -1,28 +1,28 @@ Tilesets: ; c558 (3:4558) - dr $c558,$c684 + ; dr $c558,$c684 - ;tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR - ;tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR - ;tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE - ;tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR - ;tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR - ;tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR - ;tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR - ;tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR - ;tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR - ;tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE - ;tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE - ;tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR - ;tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE - ;tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR - ;tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR - ;tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR - ;tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE - ;tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE - ;tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
\ No newline at end of file + tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR + tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR + tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE + tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR + tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR + tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR + tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR + tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR + tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR + tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE + tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE + tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR + tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE + tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR + tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR + tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR + tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE + tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE + tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR diff --git a/engine/bank3c.asm b/engine/bank3c.asm index d176511c..e7ac2a4e 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -330,7 +330,7 @@ Pic_f0cf4: ; f0cf4 (3c:4cf4) GFX_f0d82: ; f0d82 (3c:4d82) dr $f0d82, $f0f12 -Func_f0f12: +PokecenterChanseyText: ld hl, NurseChanseyText call PrintText ld a, CHANSEY @@ -367,125 +367,26 @@ PikachuMovementData_f1e2b: db $38 db $3f -Func_f1e30 - CheckEvent EVENT_GOT_TM18 - jr nz, .asm_f1e54 - ld hl, CeladonMart3Text_f1e5b - call PrintText - lb bc, TM_18, 1 - call GiveItem - jr nc, .asm_f1e4f - SetEvent EVENT_GOT_TM18 - ld hl, CeladonMart3Text_f1e60 - jr .asm_f1e57 - -.asm_f1e4f - ld hl, CeladonMart3Text_f1e6b - jr .asm_f1e57 - -.asm_f1e54 - ld hl, CeladonMart3Text_f1e66 -.asm_f1e57 - call PrintText - ret - -CeladonMart3Text_f1e5b: - TX_FAR _TM18PreReceiveText - db "@" - -CeladonMart3Text_f1e60: - TX_FAR _ReceivedTM18Text - TX_SFX_ITEM - db "@" - -CeladonMart3Text_f1e66: - TX_FAR _TM18ExplanationText - db "@" +INCLUDE "scripts/celadonmart3_2.asm" +INCLUDE "scripts/celadonmansion1_2.asm" +INCLUDE "scripts/celadonmansion3_2.asm" -CeladonMart3Text_f1e6b: - TX_FAR _TM18NoRoomText - db "@" - -Func_f1e70: - ld a, $1 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, CeladonMansion1Text_f1e96 - call PrintText - callab IsStarterPikachuInOurParty - ret nc - ld hl, CeladonMansionText_f1e9c - call PrintText - ld a, $0 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - call Func_f1ea2 - call PrintText - ret - -CeladonMansion1Text_f1e96: - TX_FAR _CeladonMansion1Text2 - TX_WAIT_BUTTON - db "@" - -CeladonMansionText_f1e9c: - TX_FAR _CeladonMansion1Text6 - TX_BUTTON_SOUND - db "@" - -Func_f1ea2: - ld hl, PikachuHappinessThresholds_f1eb9 -.asm_f1ea5 - ld a, [hli] - inc hl - and a - jr z, .asm_f1eb5 - ld b, a - ld a, [wPikachuHappiness] - cp b - jr c, .asm_f1eb5 - inc hl - inc hl - jr .asm_f1ea5 - -.asm_f1eb5 - ld a, [hli] - ld h, [hl] - ld l, a +Func_f1f23: + ld hl, PikachuMovementData_f1f2c + ld b, SPRITE_FACING_DOWN + call Func_f0a82 ret -PikachuHappinessThresholds_f1eb9 - dw 51, CeladonMansion1Text_f1ed5 - dw 101, CeladonMansion1Text_f1eda - dw 131, CeladonMansion1Text_f1edf - dw 161, CeladonMansion1Text_f1ee4 - dw 201, CeladonMansion1Text_f1ee9 - dw 255, CeladonMansion1Text_f1eee - dbbw 0, $ff, CeladonMansion1Text_f1eee - -CeladonMansion1Text_f1ed5: - TX_FAR _CeladonMansion1Text7 - db "@" - -CeladonMansion1Text_f1eda: - TX_FAR _CeladonMansion1Text8 - db "@" - -CeladonMansion1Text_f1edf: - TX_FAR _CeladonMansion1Text9 - db "@" - -CeladonMansion1Text_f1ee4: - TX_FAR _CeladonMansion1Text10 - db "@" - -CeladonMansion1Text_f1ee9: - TX_FAR _CeladonMansion1Text11 - db "@" - -CeladonMansion1Text_f1eee: - TX_FAR _CeladonMansion1Text12 - db "@" +PikachuMovementData_f1f2c: + db $00 + db $20 + db $1e + db $35 + db $3f - dr $f1ef3, $f218c +INCLUDE "scripts/celadondiner2.asm" +INCLUDE "scripts/safarizoneentrance2.asm" +INCLUDE "scripts/cinnabargym2.asm" INCLUDE "scripts/mtmoonpokecenter2.asm" diff --git a/engine/bank3d.asm b/engine/bank3d.asm index 61fc8ed1..f86bcf21 100644 --- a/engine/bank3d.asm +++ b/engine/bank3d.asm @@ -4,53 +4,53 @@ INCLUDE "engine/battle/unused_stats_functions.asm" INCLUDE "engine/battle/scroll_draw_trainer_pic.asm" Func_f429f:: ; f429f (3d:429f) - coord hl, 0,5 - ld c,$0 + coord hl, 0, 5 + ld c, $0 .asm_f42a4 inc c - ld a,c + ld a, c cp $9 ret z - ld d,$5b + ld d, $5b push bc push hl .asm_f42ad call Func_f42c2 dec hl - ld a,d + ld a, d sub $7 - ld d,a + ld d, a dec c - jr nz,.asm_f42ad - ld c,$2 + jr nz, .asm_f42ad + ld c, $2 call DelayFrames pop hl pop bc inc hl jr .asm_f42a4 - + Func_f42c2:: ; f42c2 (3d:f42c2) push hl push de push bc - ld e,$7 + ld e, $7 .loop - ld a,d + ld a, d cp $31 - jr nc,.asm_f42ce - ld a,$7f + jr nc, .asm_f42ce + ld a, $7f .asm_f42ce - ld [hl],a - ld bc,$14 - add hl,bc + ld [hl], a + ld bc, $14 + add hl, bc inc d dec e - jr nz,.loop + jr nz, .loop pop bc pop de pop hl ret - + INCLUDE "engine/battle/decrement_pp.asm" ModifyPikachuHappiness:: ; f430a (3d:430a) @@ -111,7 +111,7 @@ ModifyPikachuHappiness:: ; f430a (3d:430a) xor a .okay ld [wPikachuHappiness], a - + ; Restore d and get the d'th entry in PikachuMoods. pop de dec d @@ -141,20 +141,20 @@ ModifyPikachuHappiness:: ; f430a (3d:430a) ld [wPikachuMood], a .done ret - + HappinessChangeTable: ; f4385 (3d:4385) ; Increase - db 5, 3, 2 ; Gained a level - db 5, 3, 2 ; HP restore - db 1, 1, 0 ; Used X item - db 3, 2, 1 ; Challenged Gym Leader - db 1, 1, 0 ; Teach TM/HM - db 2, 1, 1 ; Walking around + db 5, 3, 2 ; Gained a level + db 5, 3, 2 ; HP restore + db 1, 1, 0 ; Used X item + db 3, 2, 1 ; Challenged Gym Leader + db 1, 1, 0 ; Teach TM/HM + db 2, 1, 1 ; Walking around ; Decrease - db -3, -3, -5 ; Deposited - db -1, -1, -1 ; Fainted in battle - db -5, -5, -10 ; Fainted due to Poison outside of battle - db -5, -5, -10 ; Unknown (d = 10) + db -3, -3, -5 ; Deposited + db -1, -1, -1 ; Fainted in battle + db -5, -5, -10 ; Fainted due to Poison outside of battle + db -5, -5, -10 ; Unknown (d = 10) db -10, -10, -20 ; Unknown (d = 11) PikachuMoods: ; f43a6 (3d:43a6) @@ -177,125 +177,125 @@ OldManPic:: INCBIN "pic/trainer/oldman.pic" ProfOakPicBack:: INCBIN "pic/ytrainer/prof.oakb.pic" Func_f453f:: ; f453f (3d:453f) - ld hl,PokemonLogoGraphics - ld de,vChars2 - ld bc,$730 - ld a,BANK(PokemonLogoGraphics) ; redundant because this function is in bank3d + ld hl, PokemonLogoGraphics + ld de, vChars2 + ld bc, $730 + ld a, BANK(PokemonLogoGraphics) ; redundant because this function is in bank3d call FarCopyData - ld hl,YellowLogoGraphics+$230 - ld de,vChars0+$fd0 - ld bc,$30 - ld a,BANK(YellowLogoGraphics) + ld hl, YellowLogoGraphics+$230 + ld de, vChars0+$fd0 + ld bc, $30 + ld a, BANK(YellowLogoGraphics) call FarCopyData - ld hl,YellowLogoGraphics+$260 - ld de,vChars1 - ld bc,$400 - ld a,BANK(YellowLogoGraphics) + ld hl, YellowLogoGraphics+$260 + ld de, vChars1 + ld bc, $400 + ld a, BANK(YellowLogoGraphics) call FarCopyData - ld hl,YellowLogoGraphics+$660 - ld de,vChars0+$f00 - ld bc,$c0 - ld a,BANK(YellowLogoGraphics) + ld hl, YellowLogoGraphics+$660 + ld de, vChars0+$f00 + ld bc, $c0 + ld a, BANK(YellowLogoGraphics) call FarCopyData ret - + Func_f4578:: ; f4578 (3d:4578) - coord hl, 2,1 - ld de,Pointer_f45f9 - ld bc,7 << 8 | 16 ; 16x7 (xy) + coord hl, 2, 1 + ld de, Pointer_f45f9 + ld bc, 7 << 8 | 16 ; 16x7 (xy) call CopyScreenArea ret - + Func_f4585:: ; f4585 (3d:4585) - coord hl, 6,4 - ld de,Pointer_f4673 - ld bc,4 << 8 | 7 ; 7x4 (xy) + coord hl, 6, 4 + ld de, Pointer_f4673 + ld bc, 4 << 8 | 7 ; 7x4 (xy) call CopyScreenArea - coord hl, 9,8 - ld [hl],$64 + coord hl, 9, 8 + ld [hl], $64 inc hl - ld [hl],$65 + ld [hl], $65 ret - + Func_f459a:: ; f459a (3d:459a) - coord hl, 4,8 - ld de,Pointer_f468f - ld bc,9 << 8 | 12 ; 12x9 (xy) + coord hl, 4, 8 + ld de, Pointer_f468f + ld bc, 9 << 8 | 12 ; 12x9 (xy) call CopyScreenArea - coord hl, 16,10 - ld [hl],$96 - coord hl, 16,11 - ld [hl],$9d - coord hl, 16,12 - ld [hl],$a7 - coord hl, 16,13 - ld [hl],$b1 - ld hl,Pointer_f45c7 - ld de,wOAMBuffer - ld bc,$20 + coord hl, 16, 10 + ld [hl], $96 + coord hl, 16, 11 + ld [hl], $9d + coord hl, 16, 12 + ld [hl], $a7 + coord hl, 16, 13 + ld [hl], $b1 + ld hl, Pointer_f45c7 + ld de, wOAMBuffer + ld bc, $20 call CopyData ret - + Pointer_f45c7: ; f45c7 (3d:45c7) - db $60,$40,$f1,$22 - db $60,$48,$f0,$22 - db $68,$40,$f3,$22 - db $68,$48,$f2,$22 - db $60,$60,$f0,$02 - db $60,$68,$f1,$02 - db $68,$60,$f2,$02 - db $68,$68,$f3,$02 - + db $60, $40, $f1, $22 + db $60, $48, $f0, $22 + db $68, $40, $f3, $22 + db $68, $48, $f2, $22 + db $60, $60, $f0, $02 + db $60, $68, $f1, $02 + db $68, $60, $f2, $02 + db $68, $68, $f3, $02 + CopyScreenArea:: ; f45e7 (3d:45e7) ; copy cxb (xy) screen area from de to hl push bc push hl .loop - ld a,[de] + ld a, [de] inc de - ld [hli],a + ld [hli], a dec c - jr nz,.loop + jr nz, .loop pop hl - ld bc,$14 - add hl,bc + ld bc, $14 + add hl, bc pop bc dec b - jr nz,CopyScreenArea + jr nz, CopyScreenArea ret - + Pointer_f45f9: ; f45f9 (3d:45f9) ; 16x7 (xy) - db $f4,$f4,$f4,$f4,$f4,$f4,$49,$f4,$72,$30,$f4,$f4,$f4,$f4,$f4,$f4 - db $fd,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$f4,$0d,$0e,$0f - db $10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$1a,$1b,$1c,$1d,$1e,$1f - db $20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f - db $f4,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f - db $f4,$41,$42,$43,$44,$45,$46,$47,$48,$f4,$4a,$4b,$4c,$4d,$4e,$4f - db $f4,$6a,$6b,$6c,$6d,$f4,$f4,$f4,$f4,$f4,$f4,$6e,$6f,$70,$71,$f4 + db $f4, $f4, $f4, $f4, $f4, $f4, $49, $f4, $72, $30, $f4, $f4, $f4, $f4, $f4, $f4 + db $fd, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0a, $0b, $f4, $0d, $0e, $0f + db $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1a, $1b, $1c, $1d, $1e, $1f + db $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c, $2d, $2e, $2f + db $f4, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3a, $3b, $3c, $3d, $3e, $3f + db $f4, $41, $42, $43, $44, $45, $46, $47, $48, $f4, $4a, $4b, $4c, $4d, $4e, $4f + db $f4, $6a, $6b, $6c, $6d, $f4, $f4, $f4, $f4, $f4, $f4, $6e, $6f, $70, $71, $f4 Pointer_f4669:: ; f4669 (3d:4669) - db $47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f,$5f - + db $47, $48, $49, $4a, $4b, $4c, $4d, $4e, $4f, $5f + Pointer_f4673:: ; f4673 (3d:4673) ; 7x4 (xy) - db $24,$25,$66,$67,$68,$69,$2a - db $50,$51,$52,$53,$54,$55,$56 - db $57,$58,$59,$5a,$5b,$5c,$5d - db $6d,$5e,$5f,$60,$61,$62,$63 - + db $24, $25, $66, $67, $68, $69, $2a + db $50, $51, $52, $53, $54, $55, $56 + db $57, $58, $59, $5a, $5b, $5c, $5d + db $6d, $5e, $5f, $60, $61, $62, $63 + Pointer_f468f:: ; f468f (3d:468f) ; 12x9 (xy) - db $80,$81,$82,$83,$00,$00,$00,$00,$84,$85,$86,$87 - db $88,$89,$8a,$8b,$8c,$8d,$8d,$8e,$8f,$8a,$90,$91 - db $00,$92,$93,$8a,$8a,$8a,$8a,$8a,$8a,$94,$95,$00 - db $00,$00,$97,$8a,$8a,$98,$99,$8a,$8a,$9a,$9b,$9c - db $00,$00,$9e,$9f,$a0,$a1,$a2,$a3,$a4,$a5,$a6,$8a - db $00,$a8,$a9,$aa,$8a,$ab,$ac,$8a,$ad,$ae,$af,$b0 - db $00,$b2,$b3,$b4,$8a,$8a,$8a,$8a,$b5,$b6,$b7,$b8 - db $00,$b9,$ba,$8a,$8a,$8a,$8a,$8a,$8a,$bb,$bc,$00 - db $00,$00,$bd,$8a,$8a,$8a,$8a,$8a,$8a,$be,$bf,$00 - + db $80, $81, $82, $83, $00, $00, $00, $00, $84, $85, $86, $87 + db $88, $89, $8a, $8b, $8c, $8d, $8d, $8e, $8f, $8a, $90, $91 + db $00, $92, $93, $8a, $8a, $8a, $8a, $8a, $8a, $94, $95, $00 + db $00, $00, $97, $8a, $8a, $98, $99, $8a, $8a, $9a, $9b, $9c + db $00, $00, $9e, $9f, $a0, $a1, $a2, $a3, $a4, $a5, $a6, $8a + db $00, $a8, $a9, $aa, $8a, $ab, $ac, $8a, $ad, $ae, $af, $b0 + db $00, $b2, $b3, $b4, $8a, $8a, $8a, $8a, $b5, $b6, $b7, $b8 + db $00, $b9, $ba, $8a, $8a, $8a, $8a, $8a, $8a, $bb, $bc, $00 + db $00, $00, $bd, $8a, $8a, $8a, $8a, $8a, $8a, $be, $bf, $00 + ; f46f9 (3d:46f9) PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp" YellowLogoGraphics: INCBIN "gfx/yellow_titlescreen.2bpp" @@ -304,267 +304,267 @@ INCLUDE "engine/menu/link_menu.asm" HandleMenuInputDouble:: ; f5a40 (3d:5a40) xor a - ld [wPartyMenuAnimMonEnabled],a + ld [wPartyMenuAnimMonEnabled], a HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44) - ld a,[H_DOWNARROWBLINKCNT1] + ld a, [H_DOWNARROWBLINKCNT1] push af - ld a,[H_DOWNARROWBLINKCNT2] + ld a, [H_DOWNARROWBLINKCNT2] push af ; save existing values on stack xor a - ld [H_DOWNARROWBLINKCNT1],a ; blinking down arrow timing value 1 - ld a,$06 - ld [H_DOWNARROWBLINKCNT2],a ; blinking down arrow timing value 2 + ld [H_DOWNARROWBLINKCNT1], a ; blinking down arrow timing value 1 + ld a, $06 + ld [H_DOWNARROWBLINKCNT2], a ; blinking down arrow timing value 2 .loop1 xor a - ld [wAnimCounter],a ; counter for pokemon shaking animation + ld [wAnimCounter], a ; counter for pokemon shaking animation call Func_f5ab0 call JoypadLowSensitivity - ld a,[hJoy5] + ld a, [hJoy5] and a ; was a key pressed? - jr nz,.keyPressed + jr nz, .keyPressed pop af - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a pop af - ld [H_DOWNARROWBLINKCNT1],a ; restore previous values + ld [H_DOWNARROWBLINKCNT1], a ; restore previous values xor a - ld [wMenuWrappingEnabled],a ; disable menu wrapping + ld [wMenuWrappingEnabled], a ; disable menu wrapping ret .keyPressed xor a - ld [wCheckFor180DegreeTurn],a - ld a,[hJoy5] - ld b,a - bit 6,a ; pressed Up key? - jr z,.checkIfDownPressed + ld [wCheckFor180DegreeTurn], a + ld a, [hJoy5] + ld b, a + bit 6, a ; pressed Up key? + jr z, .checkIfDownPressed .upPressed - ld a,[wCurrentMenuItem] ; selected menu item + ld a, [wCurrentMenuItem] ; selected menu item and a ; already at the top of the menu? - jr z,.checkOtherKeys + jr z, .checkOtherKeys .notAtTop dec a - ld [wCurrentMenuItem],a ; move selected menu item up one space + ld [wCurrentMenuItem], a ; move selected menu item up one space jr .checkOtherKeys .checkIfDownPressed - bit 7,a - jr z,.checkOtherKeys + bit 7, a + jr z, .checkOtherKeys .downPressed - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] inc a - ld c,a - ld a,[wMaxMenuItem] + ld c, a + ld a, [wMaxMenuItem] cp c - jr c,.checkOtherKeys - ld a,c - ld [wCurrentMenuItem],a + jr c, .checkOtherKeys + ld a, c + ld [wCurrentMenuItem], a .checkOtherKeys - ld a,[wMenuWatchedKeys] + ld a, [wMenuWatchedKeys] and b ; does the menu care about any of the pressed keys? - jp z,.loop1 + jp z, .loop1 .checkIfAButtonOrBButtonPressed - ld a,[hJoy5] + ld a, [hJoy5] and A_BUTTON | B_BUTTON - jr z,.skipPlayingSound + jr z, .skipPlayingSound .AButtonOrBButtonPressed - ld a, $90 ; (SFX_02_40 - SFX_Headers_02) / 3 + ld a, SFX_PRESS_AB call PlaySound ; play sound .skipPlayingSound pop af - ld [H_DOWNARROWBLINKCNT2],a + ld [H_DOWNARROWBLINKCNT2], a pop af - ld [H_DOWNARROWBLINKCNT1],a ; restore previous values - ld a,[hJoy5] + ld [H_DOWNARROWBLINKCNT1], a ; restore previous values + ld a, [hJoy5] ret - + Func_f5ab0:: ; f5ab0 (3d:5ab0) - ld a,[wTopMenuItemY] + ld a, [wTopMenuItemY] and a - jr z,.asm_f5ac0 - coord hl, 0,0 - ld bc,$14 + jr z, .asm_f5ac0 + coord hl, 0, 0 + ld bc, SCREEN_WIDTH .loop - add hl,bc + add hl, bc dec a - jr nz,.loop + jr nz, .loop .asm_f5ac0 - ld a,[wTopMenuItemX] - ld b,$0 - ld c,a - add hl,bc + ld a, [wTopMenuItemX] + ld b, $0 + ld c, a + add hl, bc push hl - ld a,[wLastMenuItem] + ld a, [wLastMenuItem] and a - jr z,.asm_f5ad5 - ld bc,$28 + jr z, .asm_f5ad5 + ld bc, $28 .loop2 - add hl,bc + add hl, bc dec a - jr nz,.loop2 + jr nz, .loop2 .asm_f5ad5 - ld a,[hl] + ld a, [hl] cp "▶" - jr nz,.asm_f5ade - ld a,[wTileBehindCursor] - ld [hl],a + jr nz, .asm_f5ade + ld a, [wTileBehindCursor] + ld [hl], a .asm_f5ade pop hl - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a - jr z,.asm_f5aec - ld bc,$28 + jr z, .asm_f5aec + ld bc, $28 .loop3 - add hl,bc + add hl, bc dec a - jr nz,.loop3 + jr nz, .loop3 .asm_f5aec - ld a,[hl] + ld a, [hl] cp "▶" - jr z,.asm_f5af4 - ld [wTileBehindCursor],a + jr z, .asm_f5af4 + ld [wTileBehindCursor], a .asm_f5af4 - ld a,"▶" - ld [hl],a - ld a,l - ld [wMenuCursorLocation],a - ld a,h - ld [wMenuCursorLocation+1],a - ld a,[wCurrentMenuItem] - ld [wLastMenuItem],a + ld a, "▶" + ld [hl], a + ld a, l + ld [wMenuCursorLocation], a + ld a, h + ld [wMenuCursorLocation+1], a + ld a, [wCurrentMenuItem] + ld [wLastMenuItem], a ret - -Func_f5b06:: ; f5b06 (3d:5b06) - ld hl,wd728 - set 0,[hl] - ld hl,Text_f5b17 + +PrintStrengthTxt:: ; f5b06 (3d:5b06) + ld hl, wd728 + set 0, [hl] + ld hl, Text_f5b17 call PrintText - ld hl,Text_f5b28 + ld hl, Text_f5b28 jp PrintText - + Text_f5b17:: ; f5b17 (3d:5b17) TX_FAR _UsedStrengthText ; 2d:417e - db $08 ; asm - ld a,[wcf91] + TX_ASM + ld a, [wcf91] call PlayCry call Delay3 jp TextScriptEnd - + Text_f5b28:: ; f5b28 (3d:5b28) TX_FAR _CanMoveBouldersText ; 2d:4193 db "@" - + CheckForForcedBikeSurf:: ; f5b2d (3d:5b2d) - ld hl,wd728 - set 1,[hl] - ld a,[wd732] - bit 5,a - jr nz,.asm_f5b59 - ld a,[wCurMap] + ld hl, wd728 + set 1, [hl] + ld a, [wd732] + bit 5, a + jr nz, .asm_f5b59 + ld a, [wCurMap] cp SEAFOAM_ISLANDS_5 ret nz CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z - ld hl,CoordsData_f5b64 + ld hl, CoordsData_f5b64 call ArePlayerCoordsInArray ret nc - ld hl,wd728 - res 1,[hl] - ld hl,CurrentTooFastText + ld hl, wd728 + res 1, [hl] + ld hl, CurrentTooFastText jp PrintText .asm_f5b59 - ld hl,wd728 - res 1,[hl] - ld hl,CyclingIsFunText + ld hl, wd728 + res 1, [hl] + ld hl, CyclingIsFunText jp PrintText - + CoordsData_f5b64:: ; f5b64 (3d:5b64) - db 11,07 + db 11, 07 db $ff - + CurrentTooFastText:: ; f5b67 (3d:5b67) TX_FAR _CurrentTooFastText ; 2d:41ab db "@" - + CyclingIsFunText:: ; f5b6c (3d:5b6c) TX_FAR _CyclingIsFunText ; 2d:41ca db "@" - + AddItemToInventory_:: ; f5b70 (3d:5b70) - ld a,[wItemQuantity] ; a = item quantity + ld a, [wItemQuantity] ; a = item quantity push af push bc push de push hl push hl - ld d,50 ; PC box can hold 50 items - ld a,wNumBagItems & $FF + ld d, 50 ; PC box can hold 50 items + ld a, wNumBagItems & $FF cp l - jr nz,.checkIfInventoryFull - ld a,wNumBagItems >> 8 + jr nz, .checkIfInventoryFull + ld a, wNumBagItems >> 8 cp h - jr nz,.checkIfInventoryFull + jr nz, .checkIfInventoryFull ; if the destination is the bag - ld d,20 ; bag can hold 20 items + ld d, 20 ; bag can hold 20 items .checkIfInventoryFull - ld a,[hl] + ld a, [hl] sub d - ld d,a - ld a,[hli] + ld d, a + ld a, [hli] and a - jr z,.addNewItem + jr z, .addNewItem .notAtEndOfInventory - ld a,[hli] - ld b,a ; b = ID of current item in table - ld a,[wcf91] ; a = ID of item being added + ld a, [hli] + ld b, a ; b = ID of current item in table + ld a, [wcf91] ; a = ID of item being added cp b ; does the current item in the table match the item being added? - jp z,.increaseItemQuantity ; if so, increase the item's quantity + jp z, .increaseItemQuantity ; if so, increase the item's quantity inc hl .loop - ld a,[hl] - cp a,$ff ; is it the end of the table? + ld a, [hl] + cp a, $ff ; is it the end of the table? jr nz, .notAtEndOfInventory .addNewItem ; add an item not yet in the inventory pop hl - ld a,d + ld a, d and a ; is there room for a new item slot? - jr z,.done + jr z, .done ; if there is room inc [hl] ; increment the number of items in the inventory - ld a,[hl] ; the number of items will be the index of the new item + ld a, [hl] ; the number of items will be the index of the new item add a dec a - ld c,a - ld b,0 - add hl,bc ; hl = address to store the item - ld a,[wcf91] - ld [hli],a ; store item ID - ld a,[wItemQuantity] - ld [hli],a ; store item quantity - ld [hl],$ff ; store terminator + ld c, a + ld b, 0 + add hl, bc ; hl = address to store the item + ld a, [wcf91] + ld [hli], a ; store item ID + ld a, [wItemQuantity] + ld [hli], a ; store item quantity + ld [hl], $ff ; store terminator jp .success .increaseItemQuantity ; increase the quantity of an item already in the inventory - ld a,[wItemQuantity] - ld b,a ; b = quantity to add - ld a,[hl] ; a = existing item quantity + ld a, [wItemQuantity] + ld b, a ; b = quantity to add + ld a, [hl] ; a = existing item quantity add b ; a = new item quantity - cp a,100 - jp c,.storeNewQuantity ; if the new quantity is less than 100, store it + cp a, 100 + jp c, .storeNewQuantity ; if the new quantity is less than 100, store it ; if the new quantity is greater than or equal to 100, ; try to max out the current slot and add the rest in a new slot - sub a,99 - ld [wItemQuantity],a ; a = amount left over (to put in the new slot) - ld a,d + sub a, 99 + ld [wItemQuantity], a ; a = amount left over (to put in the new slot) + ld a, d and a ; is there room for a new item slot? - jr z,.increaseItemQuantityFailed + jr z, .increaseItemQuantityFailed ; if so, store 99 in the current slot and store the rest in a new slot - ld a,99 - ld [hli],a + ld a, 99 + ld [hli], a jp .loop .increaseItemQuantityFailed pop hl and a jr .done .storeNewQuantity - ld [hl],a + ld [hl], a pop hl .success scf @@ -573,8 +573,8 @@ AddItemToInventory_:: ; f5b70 (3d:5b70) pop de pop bc pop bc - ld a,b - ld [wItemQuantity],a ; restore the initial value from when the function was called + ld a, b + ld [wItemQuantity], a ; restore the initial value from when the function was called ret ; function to remove an item (in varying quantities) from the player's bag or PC box @@ -585,49 +585,49 @@ AddItemToInventory_:: ; f5b70 (3d:5b70) RemoveItemFromInventory_: ; f5be1 (3d:5be1) push hl inc hl - ld a,[wWhichPokemon] ; index (within the inventory) of the item being removed + ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed add a add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry inc hl - ld a,[wItemQuantity] ; quantity being removed - ld e,a - ld a,[hl] ; a = current quantity + ld a, [wItemQuantity] ; quantity being removed + ld e, a + ld a, [hl] ; a = current quantity sub e - ld [hld],a ; store new quantity - ld [wMaxItemQuantity],a + ld [hld], a ; store new quantity + ld [wMaxItemQuantity], a and a - jr nz,.skipMovingUpSlots + jr nz, .skipMovingUpSlots ; if the remaining quantity is 0, ; remove the emptied item slot and move up all the following item slots .moveSlotsUp - ld e,l - ld d,h + ld e, l + ld d, h inc de inc de ; de = address of the slot following the emptied one .loop ; loop to move up the following slots - ld a,[de] + ld a, [de] inc de - ld [hli],a - cp a,$ff - jr nz,.loop + ld [hli], a + cp a, $ff + jr nz, .loop ; update menu info xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a - ld [wBagSavedMenuItem],a - ld [wSavedListScrollOffset],a + ld [wListScrollOffset], a + ld [wCurrentMenuItem], a + ld [wBagSavedMenuItem], a + ld [wSavedListScrollOffset], a pop hl - ld a,[hl] ; a = number of items in inventory + ld a, [hl] ; a = number of items in inventory dec a ; decrement the number of items - ld [hl],a ; store new number of items - ld [wListCount],a - cp a,2 - jr c,.done - ld [wMaxMenuItem],a + ld [hl], a ; store new number of items + ld [wListCount], a + cp a, 2 + jr c, .done + ld [wMaxMenuItem], a jr .done .skipMovingUpSlots pop hl @@ -641,45 +641,45 @@ CircleTile: INCBIN "gfx/circle_tile.2bpp" BadgeNumbersTileGraphics: INCBIN "gfx/badge_numbers.2bpp" ReadSuperRodData:: ; f5ea4 (3d:5ea4) - ld a,[wCurMap] - ld c,a - ld hl,FishingSlots + ld a, [wCurMap] + ld c, a + ld hl, FishingSlots .loop - ld a,[hli] + ld a, [hli] cp $ff - jr z,.notfound + jr z, .notfound cp c - jr z,.found - ld de,$8 - add hl,de + jr z, .found + ld de, $8 + add hl, de jr .loop .found call GenerateRandomFishingEncounter ret .notfound - ld de,$0 + ld de, $0 ret - + GenerateRandomFishingEncounter: ; f5ec1 (3d:5ec1) call Random cp $66 - jr c,.asm_f5ed6 + jr c, .asm_f5ed6 inc hl inc hl cp $b2 - jr c,.asm_f5ed6 + jr c, .asm_f5ed6 inc hl inc hl cp $e5 - jr c,.asm_f5ed6 + jr c, .asm_f5ed6 inc hl inc hl .asm_f5ed6 - ld e,[hl] + ld e, [hl] inc hl - ld d,[hl] + ld d, [hl] ret - + INCLUDE "data/super_rod.asm" INCLUDE "engine/battle/bank3d_battle.asm" INCLUDE "engine/items/tm_prices.asm" diff --git a/engine/bank3f.asm b/engine/bank3f.asm index c31fc986..85674ec4 100644 --- a/engine/bank3f.asm +++ b/engine/bank3f.asm @@ -27,7 +27,7 @@ Func_fc4fa:: ; fc4fa (3f:44fa) bit 4, [hl] res 4, [hl] jr nz, .asm_fc515 - call ResetPikachuAsleep + call EnablePikachuFollowingPlayer call Func_fc523 ld a, $ff ld [wSpriteStateData1 + $f2], a @@ -344,7 +344,7 @@ Func_fc6d5:: ; fc6d5 (3f:46d5) ld a, [wFontLoaded] bit 0, a jp nz, asm_fc76a - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jp nz, asm_fc76a ld a, [hl] and $7f @@ -408,7 +408,7 @@ asm_fc745: ; fc745 (3f:4745) ld hl, wSpriteStateData2 - wSpriteStateData1 add hl, bc ld [hl], a - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .asm_fc75f ld a, [wSpriteStateData1 + $9] xor $4 @@ -1679,7 +1679,7 @@ Func_fce5a:: ; fce5a (3f:4e5a) ret Func_fce73:: ; fce73 (3f:4e73) -; function to test if a pokemon is alive? +; function to test if Pikachu is alive? xor a ld [wWhichPokemon], a ld hl, wPartyCount diff --git a/engine/battle/bank3d_battle.asm b/engine/battle/bank3d_battle.asm index 7f8854a4..4fd37bc4 100644 --- a/engine/battle/bank3d_battle.asm +++ b/engine/battle/bank3d_battle.asm @@ -187,7 +187,7 @@ LoadMonBackPic: ; f6178 (3d:6178) ld b, a jp CopyVideoData -Func_f61a6: ; f61a6 (3d:f61a6) +AnimateSendingOutMon: ; f61a6 (3d:f61a6) ld a, [wPredefRegisters] ld h, a ld a, [wPredefRegisters + 1] @@ -227,7 +227,7 @@ Func_f61a6: ; f61a6 (3d:f61a6) add $31 jr CopyUncompressedPicToHL -Func_f61f9: ; f61f9 (3d:61f9) +CopyUncompressedPicToTilemap: ; f61f9 (3d:61f9) ld a, [wPredefRegisters] ld h, a ld a, [wPredefRegisters + 1] diff --git a/engine/items/items.asm b/engine/items/items.asm index eca9eaef..f37f9f47 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -1765,7 +1765,7 @@ ItemUsePokeflute: ; dfbd (3:5fbd) .notRoute16 cp a,PEWTER_POKECENTER jr nz,.noSnorlaxOrPikachuToWakeUp - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr z,.noSnorlaxOrPikachuToWakeUp callab Func_fcb01 jr nc,.noSnorlaxOrPikachuToWakeUp diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 97a65517..a3f6f7fc 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -227,7 +227,7 @@ BillsPCDeposit: ; 2156d (8:556d) jp c, BillsPCMenu callab IsThisPartymonStarterPikachu_Party jr nc, .asm_215ad - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr z, .asm_215ad ld hl, SleepingPikachuText2 call PrintText diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index 8683d3cb..16bea473 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -53,7 +53,7 @@ RedrawPartyMenu_: ; 11886 (4:5886) ld [wWhichPokemon],a callab IsThisPartymonStarterPikachu_Party jr nc, .regularMon - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr z, .regularMon ld a, $ff ld [hPartyMonIndex], a diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm index 4170a936..f60042de 100755 --- a/engine/overworld/cable_club_npc.asm +++ b/engine/overworld/cable_club_npc.asm @@ -1,7 +1,7 @@ CableClubNPC: ; 7035 (1:7035) ld hl, CableClubNPCWelcomeText call PrintText - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .asm_7048 CheckEvent EVENT_GOT_POKEDEX jp nz, .receivedPokedex diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm index f4f46535..e421a946 100644 --- a/engine/overworld/item.asm +++ b/engine/overworld/item.asm @@ -51,4 +51,4 @@ FoundItemText: ; 4d9a (1:4d9a) NoMoreRoomForItemText: ; 4da0 (1:4da0) TX_FAR _NoMoreRoomForItemText - db "@"
\ No newline at end of file + db "@" diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm index 65305d30..1cc15be5 100644 --- a/engine/overworld/missable_objects.asm +++ b/engine/overworld/missable_objects.asm @@ -30,17 +30,17 @@ MarkTownVisitedAndLoadMissableObjects: ; ef93 (3:6f93) ld a, h ld [H_DIVIDEND], a ld a, l - ld [H_DIVIDEND+1], a + ld [H_DIVIDEND + 1], a xor a - ld [H_DIVIDEND+2], a - ld [H_DIVIDEND+3], a + ld [H_DIVIDEND + 2], a + ld [H_DIVIDEND + 3], a ld a, $3 ld [H_DIVISOR], a ld b, $2 call Divide ; divide difference by 3, resulting in the global offset (number of missable items before ours) ld a, [wCurMap] ld b, a - ld a, [H_DIVIDEND+3] + ld a, [H_DIVIDEND + 3] ld c, a ; store global offset in c ld de, wMissableObjectList pop hl diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm index 3024ff7b..b9307517 100755 --- a/engine/overworld/pokecenter.asm +++ b/engine/overworld/pokecenter.asm @@ -2,7 +2,7 @@ DisplayPokemonCenterDialogue_: ; 6d97 (1:6d97) ld a, [wCurMap] cp PEWTER_POKECENTER jr nz, .regularCenter - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr z, .regularCenter ld hl, LooksContentText ; if pikachu is sleeping, don't heal call PrintText @@ -27,7 +27,7 @@ DisplayPokemonCenterDialogue_: ; 6d97 (1:6d97) call SetLastBlackoutMap callab IsStarterPikachuInOurParty jr nc, .notHealingPlayerPikachu - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .notHealingPlayerPikachu call LoadCurrentMapView call Delay3 @@ -38,7 +38,7 @@ DisplayPokemonCenterDialogue_: ; 6d97 (1:6d97) call PrintText ld c, 64 call DelayFrames - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .playerPikachuNotOnScreen call Func_152d callab IsStarterPikachuInOurParty @@ -58,7 +58,7 @@ DisplayPokemonCenterDialogue_: ; 6d97 (1:6d97) ld [wLastMusicSoundID], a ld [wNewSoundID], a call PlaySound - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .doNotReturnPikachu callab IsStarterPikachuInOurParty call c, Func_6eaa diff --git a/engine/overworld/try_pushing_boulder.asm b/engine/overworld/try_pushing_boulder.asm index d978a083..89e83ff9 100644 --- a/engine/overworld/try_pushing_boulder.asm +++ b/engine/overworld/try_pushing_boulder.asm @@ -2,6 +2,7 @@ TryPushingBoulder: ; f0a1 (3:70a1) ld a, [wd728] bit 0, a ; using Strength? ret z +Func_f0a7: ; f0a7 (3:70a7) ; where LoadMissableObjects predef points to now ld a, [wFlags_0xcd60] bit 1, a ; has boulder dust animation from previous push played yet? diff --git a/engine/pikachu_pic_animation.asm b/engine/pikachu_pic_animation.asm index c16e3e5f..bfac6962 100755 --- a/engine/pikachu_pic_animation.asm +++ b/engine/pikachu_pic_animation.asm @@ -247,7 +247,7 @@ Func_fd05e: ; fd05e (3f:505e) bit 7, [hl] ld a, $1d jr z, .asm_fd0c9 - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer ld a, $1e jr nz, .asm_fd0c9 jr .asm_fd096 @@ -255,7 +255,7 @@ Func_fd05e: ; fd05e (3f:505e) ld a, [wCurMap] cp PEWTER_POKECENTER jr nz, .notPewterPokecenter - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer ld a, $1a jr nz, .asm_fd0c9 jr .asm_fd096 @@ -863,10 +863,10 @@ Data_fd3b0: db $04, $80, $07, $80 ; $1a db $05, $80, $07, $80 ; $1b db $06, $80, $07, $80 ; $1c - db $0b, $27, $02, $00 ; $1d - db $0c, $27, $02, $00 ; $1e - db $0d, $27, $02, $00 ; $1f - db $0e, $27, $02, $00 ; $20 + db $0b, $27, $02, $00 ; $1d step down + db $0c, $27, $02, $00 ; $1e step up + db $0d, $27, $02, $00 ; $1f step left + db $0e, $27, $02, $00 ; $20 step right db $0f, $27, $02, $00 ; $21 db $10, $27, $02, $00 ; $22 db $11, $27, $02, $00 ; $23 @@ -887,10 +887,10 @@ Data_fd3b0: db $10, $0f, $08, $17 ; $32 db $11, $0f, $08, $17 ; $33 db $12, $0f, $08, $17 ; $34 - db $13, $0f, $06, $00 ; $35 - db $14, $0f, $06, $00 ; $36 - db $15, $0f, $06, $00 ; $37 - db $16, $0f, $06, $00 ; $38 + db $13, $0f, $06, $00 ; $35 look down + db $14, $0f, $06, $00 ; $36 look up + db $15, $0f, $06, $00 ; $37 look left + db $16, $0f, $06, $00 ; $38 look right db $02, $80, $04, $00 ; $39 db $02, $80, $05, $00 ; $3a db $02, $80, $03, $80 ; $3b @@ -1636,7 +1636,7 @@ PikachuPewterPokecenterCheck: ; fd8d4 (3f:58d4) ld a, [wCurMap] cp PEWTER_POKECENTER ret nz - call ResetPikachuAsleep + call EnablePikachuFollowingPlayer call Func_fcff2 ret @@ -1644,7 +1644,7 @@ PikachuFanClubCheck: ; fd8e1 (3f:58e1) ld a, [wCurMap] cp POKEMON_FAN_CLUB ret nz - call ResetPikachuAsleep + call EnablePikachuFollowingPlayer call Func_fcff2 ret @@ -1652,7 +1652,7 @@ PikachuBillsHouseCheck: ; fd8ee (3f:58ee) ld a, [wCurMap] cp BILLS_HOUSE ret nz - call ResetPikachuAsleep + call EnablePikachuFollowingPlayer ret Pikachu_LoadCurrentMapViewUpdateSpritesAndDelay3: ; fd8f8 (3f:58f8) diff --git a/engine/predefs.asm b/engine/predefs.asm index 3ec98577..9a97fe95 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -1,153 +1,162 @@ GetPredefPointer: ; f67ed (3d:67ed) -; Store the contents of the register -; pairs (hl, de, bc) at wPredefRegisters. -; Then put the bank and address of predef -; wPredefID in [wPredefBank] and hl. + ; Store the contents of the register + ; pairs (hl, de, bc) at wPredefRegisters. + ; Then put the bank and address of predef + ; wPredefID in [wPredefBank] and hl. - ld a,h - ld [wPredefRegisters],a - ld a,l - ld [wPredefRegisters + 1],a + ld a, h + ld [wPredefRegisters], a + ld a, l + ld [wPredefRegisters + 1], a - ld hl,wPredefRegisters + 2 - ld a,d - ld [hli],a - ld a,e - ld [hli],a + ld hl, wPredefRegisters + 2 + ld a, d + ld [hli], a + ld a, e + ld [hli], a - ld a,b - ld [hli],a - ld [hl],c + ld a, b + ld [hli], a + ld [hl], c - ld hl,PredefPointers - ld de,0 + ld hl, PredefPointers + ld de, 0 - ld a,[wPredefID] - ld e,a + ld a, [wPredefID] + ld e, a add a add e - ld e,a - jr nc,.nocarry + ld e, a + jr nc, .nocarry inc d .nocarry - add hl,de - ld d,h - ld e,l + add hl, de + ld d, h + ld e, l ; get bank of predef routine - ld a,[de] - ld [wPredefBank],a + ld a, [de] + ld [wPredefBank], a ; get pointer inc de - ld a,[de] - ld l,a + ld a, [de] + ld l, a inc de - ld a,[de] - ld h,a + ld a, [de] + ld h, a ret PredefPointers:: ; f681d (3d:681d) -; these are pointers to ASM routines. -; they appear to be used in overworld map scripts. - dbw BANK(DrawPlayerHUDAndHPBar), DrawPlayerHUDAndHPBar ; add_predef DrawPlayerHUDAndHPBar - dbw $3d, $61f9 ; add_predef CopyUncompressedPicToTilemap - dbw $3d, $61a6 ; add_predef Func_3f073 - dbw $0b, $7d79 ; add_predef ScaleSpriteByTwo - dbw $3d, $6178 ; add_predef LoadMonBackPic - dbw $1e, $5c16 ; add_predef CopyDownscaledMonTiles - dbw $03, $70a7 ; add_predef LoadMissableObjects - dbw $03, $752b ; add_predef HealParty - dbw $1e, $4d97 ; add_predef MoveAnimation; 08 play move animation - dbw $03, $75a4 ; add_predef DivideBCDPredef - dbw $03, $75a4 ; add_predef DivideBCDPredef2 - dbw $03, $76a3 ; add_predef AddBCDPredef - dbw $03, $76bc ; add_predef SubBCDPredef - dbw $03, $75a4 ; add_predef DivideBCDPredef3 - dbw $03, $75a4 ; add_predef DivideBCDPredef4 - dbw $03, $76d6 ; add_predef InitPlayerData - dbw $03, $74ec ; add_predef FlagActionPredef - dbw $03, $7053 ; add_predef HideObject - dbw $03, $7022 ; add_predef IsObjectHidden - dbw $03, $43de ; add_predef ApplyOutOfBattlePoisonDamage - dbw $0f, $4ae8 ; add_predef AnyPartyAlive - dbw $03, $7044 ; add_predef ShowObject - dbw $03, $7044 ; add_predef ShowObject2 - dbw $03, $6d1b ; add_predef ReplaceTileBlock - dbw $03, $76d6 ; add_predef InitPlayerData2 - dbw $03, $44f4 ; add_predef LoadTilesetHeader - dbw $0e, $700c ; add_predef LearnMoveFromLevelUp - dbw $01, $6bc8 ; add_predef LearnMove - dbw $03, $7735 ; add_predef IsItemInBag_ - dbw $03, $3ef9 ; dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the ba - dbw $03, $3e3f ; dbw $03,GiveItem - dbw $0a, $7d4c ; add_predef InvertBGPal_4Frames - dbw $03, $774a ; add_predef FindPathToPlayer - dbw $0a, $7d67 ; add_predef Func_480ff - dbw $03, $77b9 ; add_predef CalcPositionOfPlayerRelativeToNPC - dbw $03, $7830 ; add_predef ConvertNPCMovementDirectionsToJoypadMasks - dbw $0a, $7d8d ; add_predef Func_48125 - dbw $03, $78ad ; add_predef UpdateHPBar - dbw $03, $786c ; add_predef HPBarLength - dbw $01, $5b64 ; add_predef Diploma_TextBoxBorder - dbw $0f, $6e8e ; add_predef DoubleOrHalveSelectedStats - dbw $10, $4000 ; add_predef ShowPokedexMenu - dbw $0e, $6dc6 ; add_predef EvolutionAfterBattle - dbw $1c, $7ae5 ; add_predef SaveSAVtoSRAM0 - dbw $3d, $5ff8 ; add_predef InitOpponent - dbw $01, $5b13 ; add_predef CableClub_Run - dbw $03, $6880 ; add_predef DrawBadges - dbw $10, $53f6 ; add_predef ExternalClockTradeAnim - dbw $1c, $49d7 ; add_predef BattleTransition - dbw $1e, $5f7b ; add_predef CopyTileIDsFromList - dbw $10, $5997 ; add_predef PlayIntro - dbw $1e, $59c5 ; add_predef Func_79869 - dbw $1c, $4bd0 ; add_predef FlashScreen - dbw $03, $42d1 ; add_predef GetTileAndCoordsInFrontOfPlayer - dbw $04, $54cc ; add_predef StatusScreen - dbw $04, $56fb ; add_predef StatusScreen2 - dbw $10, $53e5 ; add_predef InternalClockTradeAnim - dbw $15, $685b ; add_predef TrainerEngage - dbw $10, $509d ; add_predef IndexToPokedex - dbw $01, $600d ; add_predef DisplayPicCenteredOrUpperRight; 3B display pic? - dbw $03, $6dd1 ; add_predef UsedCut - dbw $10, $4312 ; add_predef ShowPokedexData - dbw $0e, $713f ; add_predef WriteMonMoves - dbw $1c, $7a67 ; add_predef SaveSAV - dbw $1c, $61f8 ; add_predef LoadSGB - dbw $03, $6f93 ; add_predef MarkTownVisitedAndLoadMissableObjects - dbw $17, $5b93 ; add_predef SetPartyMonTypes - dbw $04, $62f0 ; add_predef CanLearnTM - dbw $04, $631d ; add_predef TMToMove - dbw $1c, $5eb3 ; add_predef Func_71ddf - dbw $17, $40d4 ; add_predef StarterDex ; 46 - dbw $03, $7161 ; add_predef _AddPartyMon - dbw $03, $78ad ; add_predef UpdateHPBar2 - dbw $0f, $4eb1 ; add_predef DrawEnemyHUDAndHPBar - dbw $1c, $4fe4 ; add_predef LoadTownMap_Nest - dbw $09, $7d20 ; add_predef PrintMonType - dbw $10, $516f ; add_predef EmotionBubble; 4C player exclamation - dbw $01, $5b63 ; add_predef EmptyFunc3; return immediately - dbw $01, $625d ; add_predef AskName - dbw $06, $66e5 ; add_predef PewterGuys - dbw $1c, $7b56 ; add_predef SaveSAVtoSRAM2 - dbw $1c, $7a24 ; add_predef LoadSAVCheckSum2 - dbw $1c, $7959 ; add_predef LoadSAV - dbw $1c, $7b32 ; add_predef SaveSAVtoSRAM1 - dbw $1c, $5b86 ; add_predef DoInGameTradeDialogue ; 54 initiate trade - dbw $3c, $4f26 ; add_predef HallOfFamePC - dbw $11, $4169 ; add_predef DisplayDexRating - dbw $1e, $4615 ; dbw $1E, _LeaveMapAnim ; wrong bank - dbw $1e, $4567 ; dbw $1E, EnterMapAnim ; wrong bank - dbw $03, $4309 ; add_predef GetTileTwoStepsInFrontOfPlayer - dbw $03, $4356 ; add_predef CheckForCollisionWhenPushingBoulder - dbw $3d, $5b06 ; add_predef PrintStrengthTxt - dbw $01, $4d55 ; add_predef PickupItem - dbw $09, $7d4d ; add_predef PrintMoveType - dbw $03, $72f9 ; add_predef LoadMovePPs - dbw $04, $5468 ; add_predef DrawHP ; 5F - dbw $04, $546f ; add_predef DrawHP2 - dbw $07, $4264 ; add_predef Func_1c9c6 - dbw $16, $4ecc ; add_predef OaksAideScript + ; these are pointers to ASM routines. + ; they appear to be used in overworld map scripts. + const_def + add_predef DrawPlayerHUDAndHPBar + add_predef CopyUncompressedPicToTilemap + add_predef AnimateSendingOutMon + add_predef ScaleSpriteByTwo + add_predef LoadMonBackPic + add_predef CopyDownscaledMonTiles + add_predef Func_f0a7 + add_predef HealParty + add_predef MoveAnimation ; 08 play move animation (1e:4d97) + add_predef DivideBCDPredef + add_predef DivideBCDPredef2 + add_predef AddBCDPredef + add_predef SubBCDPredef + add_predef DivideBCDPredef3 + add_predef DivideBCDPredef4 + add_predef InitPlayerData + add_predef FlagActionPredef + add_predef HideObject + add_predef IsObjectHidden + add_predef ApplyOutOfBattlePoisonDamage + add_predef AnyPartyAlive + add_predef ShowObject + add_predef ShowObject2 + add_predef ReplaceTileBlock + add_predef InitPlayerData2 + add_predef LoadTilesetHeader + add_predef LearnMoveFromLevelUp + add_predef LearnMove + add_predef GetQuantityOfItemInBag + + predef_const CheckForHiddenObjectOrBookshelfOrCardKeyDoor + predef_const GiveItem + dbw $03, CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; home bank + dbw $03, GiveItem ; home bank + + add_predef InvertBGPal_4Frames + add_predef FindPathToPlayer + add_predef PredefShakeScreenVertically + add_predef CalcPositionOfPlayerRelativeToNPC + add_predef ConvertNPCMovementDirectionsToJoypadMasks + add_predef PredefShakeScreenHorizontally + add_predef UpdateHPBar + add_predef HPBarLength + add_predef Diploma_TextBoxBorder + add_predef DoubleOrHalveSelectedStats + add_predef ShowPokedexMenu + add_predef EvolutionAfterBattle + add_predef SaveSAVtoSRAM0 + add_predef InitOpponent + add_predef CableClub_Run + add_predef DrawBadges + add_predef ExternalClockTradeAnim + add_predef BattleTransition + add_predef CopyTileIDsFromList + add_predef PlayIntro + add_predef GetMoveSoundB + add_predef FlashScreen + add_predef GetTileAndCoordsInFrontOfPlayer + add_predef StatusScreen + add_predef StatusScreen2 + add_predef InternalClockTradeAnim + add_predef TrainerEngage + add_predef IndexToPokedex + add_predef DisplayPicCenteredOrUpperRight ; 3B display pic? (01:600d) + add_predef UsedCut + add_predef ShowPokedexData + add_predef WriteMonMoves + add_predef SaveSAV + add_predef LoadSGB + add_predef MarkTownVisitedAndLoadMissableObjects + add_predef SetPartyMonTypes + add_predef CanLearnTM + add_predef TMToMove + add_predef _RunPaletteCommand + add_predef StarterDex ; 46 (17:40d4) + add_predef _AddPartyMon + add_predef UpdateHPBar2 + add_predef DrawEnemyHUDAndHPBar + add_predef LoadTownMap_Nest + add_predef PrintMonType + add_predef EmotionBubble ; 4C player exclamation (10:516f) + add_predef EmptyFunc3 ; return immediately (01:5b63) + add_predef AskName + add_predef PewterGuys + add_predef SaveSAVtoSRAM2 + add_predef LoadSAV2 + add_predef LoadSAV + add_predef SaveSAVtoSRAM1 + add_predef DoInGameTradeDialogue ; 54 initiate trade (1c:5b86) + add_predef HallOfFamePC + add_predef DisplayDexRating + + predef_const _LeaveMapAnim + predef_const EnterMapAnim + dbw $1E, _LeaveMapAnim ; wrong bank + dbw $1E, EnterMapAnim ; wrong bank + + add_predef GetTileTwoStepsInFrontOfPlayer + add_predef CheckForCollisionWhenPushingBoulder + add_predef PrintStrengthTxt + add_predef PickUpItem + add_predef PrintMoveType + add_predef LoadMovePPs + add_predef DrawHP ; 5F (04:5468) + add_predef DrawHP2 + add_predef DisplayElevatorFloorMenu + add_predef OaksAideScript diff --git a/gfx/blocksets/facility.bst b/gfx/blocksets/facility.bst Binary files differindex 1ed2d436..31d69fd1 100644 --- a/gfx/blocksets/facility.bst +++ b/gfx/blocksets/facility.bst diff --git a/gfx/blocksets/gym.bst b/gfx/blocksets/gym.bst Binary files differindex 48889bfa..f903c964 100644 --- a/gfx/blocksets/gym.bst +++ b/gfx/blocksets/gym.bst diff --git a/gfx/blocksets/gate.bst b/gfx/blocksets/museum.bst Binary files differindex e4c820a4..e4c820a4 100644 --- a/gfx/blocksets/gate.bst +++ b/gfx/blocksets/museum.bst diff --git a/gfx/blocksets/plateau.bst b/gfx/blocksets/plateau.bst Binary files differindex 26435dc8..54c3ffec 100644 --- a/gfx/blocksets/plateau.bst +++ b/gfx/blocksets/plateau.bst diff --git a/gfx/blocksets/pokecenter.bst b/gfx/blocksets/pokecenter.bst Binary files differindex a82460f5..213460aa 100644 --- a/gfx/blocksets/pokecenter.bst +++ b/gfx/blocksets/pokecenter.bst diff --git a/gfx/blocksets/reds_house.bst b/gfx/blocksets/redshouse2.bst Binary files differindex 6c9f4749..6c9f4749 100644 --- a/gfx/blocksets/reds_house.bst +++ b/gfx/blocksets/redshouse2.bst diff --git a/gfx/blocksets/ship_port.bst b/gfx/blocksets/shipport.bst Binary files differindex 60b4767e..60b4767e 100644 --- a/gfx/blocksets/ship_port.bst +++ b/gfx/blocksets/shipport.bst diff --git a/gfx/tilesets/gate.t1.png b/gfx/tilesets/museum.t1.png Binary files differindex 372e6751..372e6751 100644 --- a/gfx/tilesets/gate.t1.png +++ b/gfx/tilesets/museum.t1.png diff --git a/gfx/tilesets/overworld.png b/gfx/tilesets/overworld.png Binary files differnew file mode 100644 index 00000000..a707eec4 --- /dev/null +++ b/gfx/tilesets/overworld.png diff --git a/gfx/tilesets/overworld.t2.png b/gfx/tilesets/overworld.t2.png Binary files differdeleted file mode 100644 index c7533e40..00000000 --- a/gfx/tilesets/overworld.t2.png +++ /dev/null diff --git a/gfx/tilesets/reds_house.t7.png b/gfx/tilesets/redshouse2.t7.png Binary files differindex 5f210d04..5f210d04 100644 --- a/gfx/tilesets/reds_house.t7.png +++ b/gfx/tilesets/redshouse2.t7.png diff --git a/gfx/tilesets/ship_port.t2.png b/gfx/tilesets/shipport.t2.png Binary files differindex fa5bbb27..fa5bbb27 100644 --- a/gfx/tilesets/ship_port.t2.png +++ b/gfx/tilesets/shipport.t2.png @@ -117,12 +117,12 @@ PlayPikachuPCM:: ; 0150 (0:0150) .playSingleSample dec a jr nz, .playSingleSample - + rept 7 call LoadNextSoundClipSample call PlaySoundClipSample endr - + call LoadNextSoundClipSample dec bc ld a, c @@ -140,7 +140,7 @@ LoadNextSoundClipSample:: ; 0199 (0:0199) ld [rNR32], a sla d ret - + PlaySoundClipSample:: ; 01a5 (0:01a5) ld a, $3 .loop @@ -164,7 +164,7 @@ Joypad:: ; 01b9 (0:01b9) ReadJoypad:: ; 01c8 (0:01c8) homecall_jump ReadJoypad_ - + INCLUDE "home/overworld.asm" CheckForUserInterruption:: ; 10ba (0:10ba) @@ -391,8 +391,8 @@ GetCryData:: ; 11a5 (0:11a5) ld [wTempoModifier], a call BankswitchBack - ; Cry headers have 3 channels, - ; and start from index $14, + ; Cry headers have 3 channels, + ; and start from index $14, ; so add 3 times the cry id. ld a, b ld c, $14 @@ -411,7 +411,7 @@ DisplayPartyMenu:: ; 11c8 (0:11c8) call PartyMenuInit call DrawPartyMenu jp HandlePartyMenuInput - + GoBackToPartyMenu:: ; 11dd (0:11dd) ld a, [hTilesetType] push af @@ -477,7 +477,7 @@ HandlePartyMenuInput:: ; 1226 (0:1226) ld [wWhichPokemon], a callab IsThisPartymonStarterPikachu_Party ; 3f:4e18 jr nc, .asm_1258 - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr nz, .asm_128f .asm_1258 pop af @@ -538,13 +538,13 @@ HandlePartyMenuInput:: ; 1226 (0:1226) PartyMenuText_12cc:: ; 12cc (0:12cc) TX_FAR _SleepingPikachuText1 ; 28:411b db "@" - + DrawPartyMenu:: ; 12d1 (0:12d1) ld hl, DrawPartyMenu_ ; 4:5875 jr DrawPartyMenuCommon RedrawPartyMenu:: ; 12d6 (0:12d6) - ld hl, RedrawPartyMenu_ ; 4:5886 + ld hl, RedrawPartyMenu_ ; 4:5886 DrawPartyMenuCommon:: ; 12d9 (0:12d9) ld b, BANK(RedrawPartyMenu_) @@ -586,7 +586,7 @@ PrintLevel:: ; 1303 (0:1303) ld [hli], a ld c, 2 ; number of digits ld a, [wLoadedMonLevel] ; level - cp a, 100 + cp 100 jr c, PrintLevelCommon ; if level at least 100, write over the ":L" tile dec hl @@ -634,16 +634,16 @@ GetMonHeader:: ; 132f (0:132f) ld [wd11e], a ld de, FossilKabutopsPic ld b, $66 ; size of Kabutops fossil and Ghost sprites - cp a, FOSSIL_KABUTOPS ; Kabutops fossil + cp FOSSIL_KABUTOPS ; Kabutops fossil jr z, .specialID ld de, GhostPic - cp a, MON_GHOST ; Ghost + cp MON_GHOST ; Ghost jr z, .specialID ld de, FossilAerodactylPic ld b, $77 ; size of Aerodactyl fossil sprite - cp a, FOSSIL_AERODACTYL ; Aerodactyl fossil + cp FOSSIL_AERODACTYL ; Aerodactyl fossil jr z, .specialID - ;cp a, MEW + ;cp MEW ;jr z, .mew predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number ld a, [wd11e] @@ -760,7 +760,7 @@ PrintBCDDigit:: ; 13e4 (0:13e4) .skipCurrencySymbol res 7, b ; unset 7 to indicate that a nonzero digit has been reached .outputDigit - add a, "0" + add "0" ld [hli], a jp PrintLetterDelay .zeroDigit @@ -1065,7 +1065,7 @@ ResetPlayerSpriteData_ClearSpriteData:: ; 27ba (0:27ba) ld bc, $10 xor a call FillMemory ; XXX why replaced with call + ret? - ret + ret ;jp FillMemory FadeOutAudio:: ; 27c2 (0:27c2) @@ -1143,15 +1143,15 @@ DisplayTextID:: ; 2817 (0:2817) ld [wSpriteIndex], a and a jp z, DisplayStartMenu - cp a, $d4 ; new yellow asm + cp TEXT_PIKACHU_ANIM ; new yellow asm jp z, DisplayUnknownText_29c6 - cp a, TEXT_SAFARI_GAME_OVER + cp TEXT_SAFARI_GAME_OVER jp z, DisplaySafariGameOverText - cp a, TEXT_MON_FAINTED + cp TEXT_MON_FAINTED jp z, DisplayPokemonFaintedText - cp a, TEXT_BLACKED_OUT + cp TEXT_BLACKED_OUT jp z, DisplayPlayerBlackedOutText - cp a, TEXT_REPEL_WORE_OFF + cp TEXT_REPEL_WORE_OFF jp z, DisplayRepelWoreOffText ld a, [wNumSprites] ld e, a @@ -1189,24 +1189,24 @@ DisplayTextID:: ; 2817 (0:2817) ld l, a ; hl = address of the text ld a, [hl] ; a = first byte of text ; check first byte of text for special cases - cp a, $fe ; Pokemart NPC + cp $fe ; Pokemart NPC jp z, DisplayPokemartDialogue - cp a, $ff ; Pokemon Center NPC + cp $ff ; Pokemon Center NPC jp z, DisplayPokemonCenterDialogue - cp a, $fc ; Item Storage PC + cp $fc ; Item Storage PC jp z, FuncTX_ItemStoragePC - cp a, $fd ; Bill's PC + cp $fd ; Bill's PC jp z, FuncTX_BillsPC - cp a, $f9 ; Pokemon Center PC + cp $f9 ; Pokemon Center PC jp z, FuncTX_PokemonCenterPC - cp a, $f5 ; Vending Machine + cp $f5 ; Vending Machine jr nz, .notVendingMachine callba VendingMachineMenu ; jump banks to vending machine routine jr AfterDisplayingTextID .notVendingMachine - cp a, $f7 ; slot machine - jp z, FuncTX_SlotMachine - cp a, $f6 ; cable connection NPC in Pokemon Center + cp $f7 ; slot machine + jp z, FuncTX_GameCornerPrizeMenu + cp $f6 ; cable connection NPC in Pokemon Center jr nz, .notSpecialCase callab CableClubNPC jr AfterDisplayingTextID @@ -1289,7 +1289,7 @@ LoadItemList:: ; 293d (0:293d) ld a, [hli] ld [de], a inc de - cp a, $ff + cp $ff jr nz, .loop ret @@ -1352,7 +1352,7 @@ RepelWoreOffText:: ; 29c1 (0:29c1) DisplayUnknownText_29c6:: ; 29c6 (0:29c6) callab Func_fd004 ; 3f:5004 jp CloseTextDisplay - + INCLUDE "engine/menu/start_menu.asm" ; function to count how many bits are set in a string of bytes @@ -1462,7 +1462,7 @@ DisplayListMenuID:: ; 2ae0 (0:2ae0) ld a, 1 ; max menu item ID is 1 if the list has less than 2 entries ld [wMenuWatchMovingOutOfBounds], a ld a, [wListCount] - cp a, 2 ; does the list have less than 2 entries? + cp 2 ; does the list have less than 2 entries? jr c, .setMenuVariables ld a, 2 ; max menu item ID is 2 if the list has at least 2 entries .setMenuVariables @@ -1532,7 +1532,7 @@ DisplayListMenuIDLoop:: ; 2b4d (0:2b4d) ld a, c ld [wWhichPokemon], a ld a, [wListMenuID] - cp a, ITEMLISTMENU + cp ITEMLISTMENU jr nz, .skipMultiplying ; if it's an item menu sla c ; item entries are 2 bytes long, so multiply by 2 @@ -1553,7 +1553,7 @@ DisplayListMenuIDLoop:: ; 2b4d (0:2b4d) call GetItemPrice pop hl ld a, [wListMenuID] - cp a, ITEMLISTMENU + cp ITEMLISTMENU jr nz, .skipGettingQuantity ; if it's an item menu inc hl @@ -1599,7 +1599,7 @@ DisplayListMenuIDLoop:: ; 2b4d (0:2b4d) jr z, .upPressed .downPressed ld a, [hl] - add a, 3 + add 3 ld b, a ld a, [wListCount] cp b ; will going down scroll past the Cancel button? @@ -1618,7 +1618,7 @@ DisplayChooseQuantityMenu:: ; 2c51 (0:2c51) coord hl, 15, 9 lb bc, 1, 3 ; height and width ld a, [wListMenuID] - cp a, PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz, .drawTextBox ; text box dimensions/coordinates for quantity and price coord hl, 7, 9 @@ -1627,7 +1627,7 @@ DisplayChooseQuantityMenu:: ; 2c51 (0:2c51) call TextBoxBorder coord hl, 16, 10 ld a, [wListMenuID] - cp a, PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz, .printInitialQuantity coord hl, 8, 10 .printInitialQuantity @@ -1671,7 +1671,7 @@ DisplayChooseQuantityMenu:: ; 2c51 (0:2c51) .handleNewQuantity coord hl, 17, 10 ld a, [wListMenuID] - cp a, PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz, .printQuantity .printPrice ld c, $03 @@ -1764,7 +1764,7 @@ PrintListMenuEntries:: ; 2d52 (0:2d52) ld a, [wListScrollOffset] ld c, a ld a, [wListMenuID] - cp a, ITEMLISTMENU + cp ITEMLISTMENU ld a, c jr nz, .skipMultiplying ; if it's an item menu @@ -1784,7 +1784,7 @@ PrintListMenuEntries:: ; 2d52 (0:2d52) ld [wWhichPokemon], a ld a, [de] ld [wd11e], a - cp a, $ff + cp $ff jp z, .printCancelMenuItem push bc push de @@ -1794,7 +1794,7 @@ PrintListMenuEntries:: ; 2d52 (0:2d52) ld a, [wListMenuID] and a jr z, .pokemonPCMenu - cp a, $01 + cp $01 jr z, .movesMenu .itemMenu call GetItemName @@ -1882,7 +1882,7 @@ PrintListMenuEntries:: ; 2d52 (0:2d52) pop de inc de ld a, [wListMenuID] - cp a, ITEMLISTMENU + cp ITEMLISTMENU jr nz, .nextListEntry .printItemQuantity ld a, [wd11e] @@ -2054,9 +2054,9 @@ HiddenPrefix:: ; 2f33 (0:2f33) ; sets carry if item is HM, clears carry if item is not HM ; Input: a = item ID IsItemHM:: ; 2f35 (0:2f35) - cp a, HM_01 + cp HM_01 jr c, .notHM - cp a, TM_01 + cp TM_01 ret .notHM and a @@ -2123,7 +2123,7 @@ ChooseFlyDestination:: ; 2f9a (0:2f9a) Func_2fa7:: ; 2fa7 (0:2fa7) homecall Func_e8a5e ret - + SerialFunction:: ; 2fb7 (0:2fb7) ld a, [wUnknownSerialFlag_d49a] bit 0, a @@ -2147,7 +2147,7 @@ SerialFunction:: ; 2fb7 (0:2fb7) ld a, START_TRANSFER_INTERNAL_CLOCK ld [rSC], a ret - + ; causes the text box to close without waiting for a button press after displaying text DisableWaitingAfterTextDisplay:: ; 2fde (0:2fde) ld a, $01 @@ -2208,7 +2208,7 @@ IsKeyItem:: ; 3000 (0:3000) ; INPUT: ; [wTextBoxID] = text box ID DisplayTextBoxID:: ; 3010 (0:3010) - homecall_sf DisplayTextBoxID_ + homecall_sf DisplayTextBoxID_ ret UpdateGBCPal_BGP:: ; 3021 (0:3021) @@ -2232,7 +2232,7 @@ UpdateGBCPal_BGP:: ; 3021 (0:3021) .notGBC pop af ret - + UpdateGBCPal_OBP0:: ; 3040 (0:3040) push af ld a, [hGBC] @@ -2257,7 +2257,7 @@ UpdateGBCPal_OBP0:: ; 3040 (0:3040) .notGBC pop af ret - + UpdateGBCPal_OBP1:: ; 3061 (0:3061) push af ld a, [hGBC] @@ -2282,7 +2282,7 @@ UpdateGBCPal_OBP1:: ; 3061 (0:3061) .notGBC pop af ret - + Func_3082:: ; 3082 (0:3082) ld a, [H_LOADEDROMBANK] push af @@ -2332,7 +2332,7 @@ RunNPCMovementScript:: ; 30ae (0:30ae) pop af call BankswitchCommon ret - + .NPCMovementScriptPointerTables dw PalletMovementScriptPointerTable dw PewterMuseumGuyMovementScriptPointerTable @@ -2739,7 +2739,7 @@ PlayTrainerMusic:: ; 3379 (0:3379) xor a ld [wAudioFadeOutControl], a call StopAllMusic ; stop music - ld a, $1f ; BANK(Music_MeetEvilTrainer) + ld a, BANK(Music_MeetEvilTrainer) ld [wAudioROMBank], a ld [wAudioSavedROMBank], a ld a, [wEngagedTrainerClass] @@ -2751,7 +2751,7 @@ PlayTrainerMusic:: ; 3379 (0:3379) jr z, .noEvilTrainer cp b jr nz, .evilTrainerListLoop - ld a, $f5 ; MUSIC_MEET_EVIL_TRAINER + ld a, MUSIC_MEET_EVIL_TRAINER jr .PlaySound .noEvilTrainer ld hl, FemaleTrainerList @@ -2761,10 +2761,10 @@ PlayTrainerMusic:: ; 3379 (0:3379) jr z, .maleTrainer cp b jr nz, .femaleTrainerListLoop - ld a, $f8 ; MUSIC_MEET_FEMALE_TRAINER + ld a, MUSIC_MEET_FEMALE_TRAINER jr .PlaySound .maleTrainer - ld a, $fb ; MUSIC_MEET_MALE_TRAINER + ld a, MUSIC_MEET_MALE_TRAINER .PlaySound ld [wNewSoundID], a jp PlaySound @@ -2811,7 +2811,7 @@ FuncTX_BillsPC:: ; 33f9 (0:33f9) ld hl, BillsPC_ jr bankswitchAndContinue -FuncTX_SlotMachine:: ; 3403 (0:3403) +FuncTX_GameCornerPrizeMenu:: ; 3403 (0:3403) ; XXX find a better name for this function ; special_F7 ld b, BANK(CeladonPrizeMenu) @@ -2842,7 +2842,7 @@ IsItemInBag:: ; 3422 (0:3422) ld a, b and a ret - + IsSurfingPikachuInParty:: ; 342a (0:342a) ; set bit 6 of wd472 if true ; also calls Func_3467, which is a bankswitch to IsStarterPikachuInOurParty @@ -2884,7 +2884,7 @@ IsSurfingPikachuInParty:: ; 342a (0:342a) jr nz, .loop call Func_3467 ret - + Func_3467:: ; 3467 (0:3467) push hl push bc @@ -2896,7 +2896,7 @@ Func_3467:: ; 3467 (0:3467) set 7, a ld [wd472], a ret - + DisplayPokedex:: ; 347d (0:347d) ld [wd11e], a jpba _DisplayPokedex @@ -2939,7 +2939,7 @@ SpriteFunc_34a1:: ; 34a1 (0:34a1) dec h ld [hl], c ret - + ; tests if the player's coordinates are in a specified array ; INPUT: ; hl = address of array @@ -2958,7 +2958,7 @@ CheckCoords:: ; 34c4 (0:34c4) ld [wCoordIndex], a .loop ld a, [hli] - cp a, $ff ; reached terminator? + cp $ff ; reached terminator? jr z, .notInArray push hl ld hl, wCoordIndex @@ -3077,7 +3077,7 @@ GetSpriteMovementByte1Pointer:: ; 354b (0:354b) ld h, $C2 ld a, [H_SPRITEINDEX] swap a - add a, 6 + add 6 ld l, a ret @@ -3145,7 +3145,7 @@ IsFightingJessieJames:: ; 359e (0:359e) ld [hli], a ld [hl], d ret - + GetTrainerName:: ; 35bb (0:35bb) jpba GetTrainerName_ @@ -3249,7 +3249,7 @@ MoveSprite_:: ; 3640 (0:3640) ld [hli], a inc de inc c - cp a, $FF ; have we reached the end of the movement data? + cp $FF ; have we reached the end of the movement data? jr nz, .loop ld a, c @@ -3265,7 +3265,7 @@ MoveSprite_:: ; 3640 (0:3640) dec a ld [wJoyIgnore], a ld [wWastedByteCD3A], a - ret + ret ; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2] DivideBytes:: ; 366e (0:366e) @@ -3485,7 +3485,7 @@ GetName:: ; 3762 (0:3762) ld e, l .nextChar ld a, [hli] - cp a, "@" + cp "@" jr nz, .nextChar inc c ;entry counter ld a, b ;wanted entry @@ -3515,7 +3515,7 @@ GetItemPrice:: ; 37d2 (0:37d2) push af ld a, [wListMenuID] cp MOVESLISTMENU - ld a, $1 ; BANK(ItemPrices) + ld a, BANK(ItemPrices) jr nz, .asm_37e0 ld a, $f ; hardcoded Bank .asm_37e0 @@ -3571,9 +3571,9 @@ CopyString:: ; 3816 (0:3816) ; Just copies [hJoyPressed] to [hJoy5]. ; 2. Get currently pressed buttons at low sample rate with delay ; ([hJoy7] == 1, [hJoy6] != 0) -; If the user holds down buttons for more than half a second, +; If the user holds down buttons for more than half a second, ; report buttons as being pressed up to 12 times per second thereafter. -; If the user holds down buttons for less than half a second, +; If the user holds down buttons for less than half a second, ; report only one button press. ; 3. Same as 2, but report no buttons as pressed if A or B is held down. ; ([hJoy7] == 1, [hJoy6] == 0) @@ -3634,7 +3634,7 @@ WaitForTextScrollButtonPress:: ; 3852 (0:3852) push bc callab TownMapSpriteBlinkingAnimation ; 1c:5753 pop bc - pop de + pop de .skipAnimation coord hl, 18, 16 call HandleDownArrowBlinkTiming @@ -3744,7 +3744,7 @@ PrintLetterDelay:: ; 38c8 (0:38c8) ret ; Copies [hl, bc) to [de, bc - hl). -; In other words, the source data is from hl up to but not including bc, +; In other words, the source data is from hl up to but not including bc, ; and the destination is de. CopyDataUntil:: ; 3908 (0:3908) ld a, [hli] @@ -4207,7 +4207,7 @@ PlaceMenuCursor:: ; 3b6d (0:3b6d) jr nz, .oldMenuItemLoop .checkForArrow1 ld a, [hl] - cp a, "▶" ; was an arrow next to the previously selected menu item? + cp "▶" ; was an arrow next to the previously selected menu item? jr nz, .skipClearingArrow .clearArrow ld a, [wTileBehindCursor] @@ -4231,7 +4231,7 @@ PlaceMenuCursor:: ; 3b6d (0:3b6d) jr nz, .currentMenuItemLoop .checkForArrow2 ld a, [hl] - cp a, "▶" ; has the right arrow already been placed? + cp "▶" ; has the right arrow already been placed? jr z, .skipSavingTile ; if so, don't lose the saved tile ld [wTileBehindCursor], a ; save tile before overwriting with right arrow .skipSavingTile @@ -4247,7 +4247,7 @@ PlaceMenuCursor:: ; 3b6d (0:3b6d) ; This is used to mark a menu cursor other than the one currently being ; manipulated. In the case of submenus, this is used to show the location of -; the menu cursor in the parent menu. In the case of swapping items in list, +; the menu cursor in the parent menu. In the case of swapping items in list, ; this is used to mark the item that was first chosen to be swapped. PlaceUnfilledArrowMenuCursor:: ; 3bd9 (0:3bd9) ld b, a @@ -4271,7 +4271,7 @@ EraseMenuCursor:: ; 3be6 (0:3be6) ; This toggles a blinking down arrow at hl on and off after a delay has passed. ; This is often called even when no blinking is occurring. ; The reason is that most functions that call this initialize H_DOWNARROWBLINKCNT1 to 0. -; The effect is that if the tile at hl is initialized with a down arrow, +; The effect is that if the tile at hl is initialized with a down arrow, ; this function will toggle that down arrow on and off, but if the tile isn't ; initliazed with a down arrow, this function does nothing. ; That allows this to be called without worrying about if a down arrow should @@ -4291,7 +4291,7 @@ HandleDownArrowBlinkTiming:: ; 3bf1 (0:3bf1) dec a ld [H_DOWNARROWBLINKCNT2], a ret nz - ld a, " " + ld a, " " ld [hl], a ld a, $ff ld [H_DOWNARROWBLINKCNT1], a @@ -4357,7 +4357,7 @@ FarPrintText:: ; 3c4c (0:3c4c) pop af call BankswitchCommon ret - + PrintNumber:: ; 3c5b (0:3c5b) ; Print the c-digit, b-byte value at de. ; Allows 2 to 7 digits. For 1-digit numbers, add @@ -4562,7 +4562,7 @@ endm ret .NextDigit: ; 3d85 (0:3d85) -; Increment unless the number is left-aligned, +; Increment unless the number is left-aligned, ; leading zeroes are not printed, and no digits ; have been printed yet. bit BIT_LEADING_ZEROES, d @@ -4717,7 +4717,7 @@ ReloadMapSpriteTilePatterns:: ; 3e1e (0:3e1e) GiveItem:: ; 3e3f (0:3e3f) -; Give player quantity c of item b, +; Give player quantity c of item b, ; and copy the item's name to wcf4b. ; Return carry on success. ld a, b @@ -4760,7 +4760,7 @@ BankswitchCommon:: ; 3e7e (0:3e7e) ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a ret - + Bankswitch:: ; 3e84 (0:3e84) ; self-contained bankswitch, use this when not in the home bank ; switches to the bank in b @@ -4787,7 +4787,7 @@ SwitchSRAMBankAndLatchClockData:: ; 3e99 (0:3e99) pop af ld [MBC1SRamBank], a ret - + PrepareRTCDataAndDisableSRAM:: ; 3ea9 (0:3ea9) push af ld a, $0 @@ -4795,7 +4795,7 @@ PrepareRTCDataAndDisableSRAM:: ; 3ea9 (0:3ea9) ld [MBC1SRamEnable], a pop af ret - + INCLUDE "home/predef.asm" UpdateCinnabarGymGateTileBlocks:: ; 3ef0 (0:3ef0) @@ -4863,8 +4863,8 @@ SetMapTextPointer:: ; 3f54 (0:3f54) ret TextPredefs:: ; 3f67 (0:3f67) -const_value = 1 - +const_value = 1 + add_tx_pre CardKeySuccessText ; 01 add_tx_pre CardKeyFailText ; 02 add_tx_pre RedBedroomPCText ; 03 diff --git a/home/audio.asm b/home/audio.asm index c0dd7b8f..f1daa4f1 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -25,11 +25,11 @@ PlayDefaultMusicCommon:: ; 2118 (0:2118) jr z, .surfing call CheckForNoBikingMusicMap jr c, .walking - ld a, $d2 ; MUSIC_BIKE_RIDING + ld a, MUSIC_BIKE_RIDING jr .next .surfing - ld a, $d6 ; MUSIC_SURFING + ld a, MUSIC_SURFING .next ld b, a diff --git a/home/overworld.asm b/home/overworld.asm index bc7ae029..1368dc9d 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -47,308 +47,308 @@ OverworldLoopLessDelay:: ; 0245 (0:0245) call IsSurfingPikachuInParty call LoadGBPal call HandleMidJump - ld a,[wWalkCounter] + ld a, [wWalkCounter] and a - jp nz,.moveAhead ; if the player sprite has not yet completed the walking animation + jp nz, .moveAhead ; if the player sprite has not yet completed the walking animation call JoypadOverworld ; get joypad state (which is possibly simulated) callba SafariZoneCheck ; 7:6321 - ld a,[wSafariZoneGameOver] + ld a, [wSafariZoneGameOver] and a - jp nz,WarpFound2 - ld hl,wd72d - bit 3,[hl] - res 3,[hl] - jp nz,WarpFound2 - ld a,[wd732] - and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp - jp nz,HandleFlyWarpOrDungeonWarp - ld a,[wCurOpponent] + jp nz, WarpFound2 + ld hl, wd72d + bit 3, [hl] + res 3, [hl] + jp nz, WarpFound2 + ld a, [wd732] + and 1 << 4 | 1 << 3 ; fly warp or dungeon warp + jp nz, HandleFlyWarpOrDungeonWarp + ld a, [wCurOpponent] and a - jp nz,.newBattle - ld a,[wd730] - bit 7,a ; are we simulating button presses? - jr z,.notSimulating - ld a,[hJoyHeld] + jp nz, .newBattle + ld a, [wd730] + bit 7, a ; are we simulating button presses? + jr z, .notSimulating + ld a, [hJoyHeld] jr .checkIfStartIsPressed .notSimulating - ld a,[hJoyPressed] + ld a, [hJoyPressed] .checkIfStartIsPressed - bit 3,a ; start button - jr z,.startButtonNotPressed + bit 3, a ; start button + jr z, .startButtonNotPressed ; if START is pressed xor a - ld [hSpriteIndexOrTextID],a ; start menu text ID + ld [hSpriteIndexOrTextID], a ; start menu text ID jp .displayDialogue .startButtonNotPressed - bit 0,a ; A button - jp z,.checkIfDownButtonIsPressed + bit 0, a ; A button + jp z, .checkIfDownButtonIsPressed ; if A is pressed - ld a,[wd730] - bit 2,a - jp nz,.noDirectionButtonsPressed + ld a, [wd730] + bit 2, a + jp nz, .noDirectionButtonsPressed call IsPlayerCharacterBeingControlledByGame - jr nz,.checkForOpponent + jr nz, .checkForOpponent call CheckForHiddenObjectOrBookshelfOrCardKeyDoor - ld a,[$ffeb] + ld a, [$ffeb] and a - jp z,OverworldLoop ; jump if a hidden object or bookshelf was found, but not if a card key door was found + jp z, OverworldLoop ; jump if a hidden object or bookshelf was found, but not if a card key door was found xor a - ld [wd436],a ; new yellow address + ld [wd436], a ; new yellow address call IsSpriteOrSignInFrontOfPlayer call Func_0ffe - ld a,[hSpriteIndexOrTextID] + ld a, [hSpriteIndexOrTextID] and a - jp z,OverworldLoop + jp z, OverworldLoop .displayDialogue predef GetTileAndCoordsInFrontOfPlayer call UpdateSprites - ld a,[wFlags_0xcd60] - bit 2,a - jr nz,.checkForOpponent - bit 0,a - jr nz,.checkForOpponent + ld a, [wFlags_0xcd60] + bit 2, a + jr nz, .checkForOpponent + bit 0, a + jr nz, .checkForOpponent aCoord 8, 9 - ld [wTilePlayerStandingOn],a ; unused? + ld [wTilePlayerStandingOn], a ; unused? call DisplayTextID ; display either the start menu or the NPC/sign text - ld a,[wEnteringCableClub] + ld a, [wEnteringCableClub] and a - jr z,.checkForOpponent + jr z, .checkForOpponent xor a - ld [wLinkTimeoutCounter],a + ld [wLinkTimeoutCounter], a jp EnterMap ; predef LoadSAV -; ld a,[wCurMap] -; ld [wDestinationMap],a +; ld a, [wCurMap] +; ld [wDestinationMap], a ; call SpecialWarpIn -; ld a,[wCurMap] +; ld a, [wCurMap] ; call SwitchToMapRomBank ; switch to the ROM bank of the current map -; ld hl,wCurMapTileset -; set 7,[hl] +; ld hl, wCurMapTileset +; set 7, [hl] .checkForOpponent - ld a,[wCurOpponent] + ld a, [wCurOpponent] and a - jp nz,.newBattle + jp nz, .newBattle jp OverworldLoop .noDirectionButtonsPressed call UpdateSprites ; 231c - ld hl,wFlags_0xcd60 - res 2,[hl] + ld hl, wFlags_0xcd60 + res 2, [hl] xor a ld [wd435], a ld a, $1 - ld [wCheckFor180DegreeTurn],a - ld a,[wPlayerMovingDirection] ; the direction that was pressed last time + ld [wCheckFor180DegreeTurn], a + ld a, [wPlayerMovingDirection] ; the direction that was pressed last time and a jr z, .overworldloop ; if a direction was pressed last time - ld [wPlayerLastStopDirection],a ; save the last direction + ld [wPlayerLastStopDirection], a ; save the last direction xor a - ld [wPlayerMovingDirection],a ; zero the direction + ld [wPlayerMovingDirection], a ; zero the direction .overworldloop jp OverworldLoop .checkIfDownButtonIsPressed - ld a,[hJoyHeld] ; current joypad state - bit 7,a ; down button - jr z,.checkIfUpButtonIsPressed - ld a,1 - ld [wSpriteStateData1 + 3],a ; delta Y - ld a,PLAYER_DIR_DOWN + ld a, [hJoyHeld] ; current joypad state + bit 7, a ; down button + jr z, .checkIfUpButtonIsPressed + ld a, 1 + ld [wSpriteStateData1 + 3], a ; delta Y + ld a, PLAYER_DIR_DOWN jr .handleDirectionButtonPress .checkIfUpButtonIsPressed - bit 6,a ; up button - jr z,.checkIfLeftButtonIsPressed - ld a,-1 - ld [wSpriteStateData1 + 3],a ; delta Y - ld a,PLAYER_DIR_UP + bit 6, a ; up button + jr z, .checkIfLeftButtonIsPressed + ld a, -1 + ld [wSpriteStateData1 + 3], a ; delta Y + ld a, PLAYER_DIR_UP jr .handleDirectionButtonPress .checkIfLeftButtonIsPressed - bit 5,a ; left button - jr z,.checkIfRightButtonIsPressed - ld a,-1 - ld [wSpriteStateData1 + 5],a ; delta X - ld a,PLAYER_DIR_LEFT + bit 5, a ; left button + jr z, .checkIfRightButtonIsPressed + ld a, -1 + ld [wSpriteStateData1 + 5], a ; delta X + ld a, PLAYER_DIR_LEFT jr .handleDirectionButtonPress .checkIfRightButtonIsPressed - bit 4,a ; right button - jr z,.noDirectionButtonsPressed - ld a,$1 - ld [wSpriteStateData1 + 5],a - ld a,$1 + bit 4, a ; right button + jr z, .noDirectionButtonsPressed + ld a, $1 + ld [wSpriteStateData1 + 5], a + ld a, $1 .handleDirectionButtonPress - ld [wPlayerDirection],a ; new direction - ld a,[wd730] - bit 7,a ; are we simulating button presses? - jr nz,.noDirectionChange ; ignore direction changes if we are - ld a,[wCheckFor180DegreeTurn] + ld [wPlayerDirection], a ; new direction + ld a, [wd730] + bit 7, a ; are we simulating button presses? + jr nz, .noDirectionChange ; ignore direction changes if we are + ld a, [wCheckFor180DegreeTurn] and a - jr z,.noDirectionChange - ld a,[wPlayerDirection] ; new direction - ld b,a - ld a,[wPlayerLastStopDirection] ; old direction + jr z, .noDirectionChange + ld a, [wPlayerDirection] ; new direction + ld b, a + ld a, [wPlayerLastStopDirection] ; old direction cp b - jr z,.noDirectionChange - ld a,$8 - ld [wd435],a + jr z, .noDirectionChange + ld a, $8 + ld [wd435], a ; unlike in red/blue, yellow does not have the 180 degrees odd code - ld hl,wFlags_0xcd60 - set 2,[hl] + ld hl, wFlags_0xcd60 + set 2, [hl] xor a - ld [wCheckFor180DegreeTurn],a - ld a,[wPlayerDirection] - ld [wPlayerMovingDirection],a + ld [wCheckFor180DegreeTurn], a + ld a, [wPlayerDirection] + ld [wPlayerMovingDirection], a call NewBattle - jp c,.battleOccurred + jp c, .battleOccurred jp OverworldLoop .noDirectionChange - ld a,[wPlayerDirection] ; current direction - ld [wPlayerMovingDirection],a ; save direction + ld a, [wPlayerDirection] ; current direction + ld [wPlayerMovingDirection], a ; save direction call UpdateSprites - ld a,[wWalkBikeSurfState] - cp a,$02 ; surfing - jr z,.surfing + ld a, [wWalkBikeSurfState] + cp $02 ; surfing + jr z, .surfing ; not surfing call CollisionCheckOnLand - jr nc,.noCollision + jr nc, .noCollision ; collision occurred push hl - ld hl,wd736 - bit 2,[hl] ; standing on warp flag + ld hl, wd736 + bit 2, [hl] ; standing on warp flag pop hl - jp z,OverworldLoop + jp z, OverworldLoop ; collision occurred while standing on a warp push hl call ExtraWarpCheck ; sets carry if there is a potential to warp pop hl - jp c,CheckWarpsCollision + jp c, CheckWarpsCollision jp OverworldLoop .surfing call CollisionCheckOnWater - jp c,OverworldLoop + jp c, OverworldLoop .noCollision - ld a,$08 - ld [wWalkCounter],a + ld a, $08 + ld [wWalkCounter], a callab Func_fcc08 jr .moveAhead2 .moveAhead call IsSpinning call UpdateSprites ; move sprites .moveAhead2 - ld hl,wFlags_0xcd60 - res 2,[hl] + ld hl, wFlags_0xcd60 + res 2, [hl] xor a - ld [wd435],a + ld [wd435], a call DoBikeSpeedup call AdvancePlayerSprite - ld a,[wWalkCounter] + ld a, [wWalkCounter] and a - jp nz,CheckMapConnections ; it seems like this check will never succeed (the other place where CheckMapConnections is run works) + jp nz, CheckMapConnections ; it seems like this check will never succeed (the other place where CheckMapConnections is run works) ; walking animation finished call StepCountCheck - ld a,[wd790] - bit 7,a ; in the safari zone? - jr z,.notSafariZone + ld a, [wd790] + bit 7, a ; in the safari zone? + jr z, .notSafariZone callba SafariZoneCheckSteps - ld a,[wSafariZoneGameOver] + ld a, [wSafariZoneGameOver] and a - jp nz,WarpFound2 + jp nz, WarpFound2 .notSafariZone - ld a,[wIsInBattle] + ld a, [wIsInBattle] and a - jp nz,CheckWarpsNoCollision + jp nz, CheckWarpsNoCollision predef ApplyOutOfBattlePoisonDamage ; also increment daycare mon exp - ld a,[wOutOfBattleBlackout] + ld a, [wOutOfBattleBlackout] and a - jp nz,HandleBlackOut ; if all pokemon fainted + jp nz, HandleBlackOut ; if all pokemon fainted .newBattle call NewBattle - ld hl,wd736 - res 2,[hl] ; standing on warp flag - jp nc,CheckWarpsNoCollision ; check for warps if there was no battle + ld hl, wd736 + res 2, [hl] ; standing on warp flag + jp nc, CheckWarpsNoCollision ; check for warps if there was no battle .battleOccurred - ld hl,wd72d - res 6,[hl] - ld hl,wFlags_D733 - res 3,[hl] - ld hl,wd126 - set 5,[hl] - set 6,[hl] + ld hl, wd72d + res 6, [hl] + ld hl, wFlags_D733 + res 3, [hl] + ld hl, wd126 + set 5, [hl] + set 6, [hl] xor a - ld [hJoyHeld],a - ld a,[wCurMap] - cp a,CINNABAR_GYM - jr nz,.notCinnabarGym - ld hl,wd79b - set 7,[hl] + ld [hJoyHeld], a + ld a, [wCurMap] + cp CINNABAR_GYM + jr nz, .notCinnabarGym + ld hl, wd79b + set 7, [hl] .notCinnabarGym - ld hl,wd72e - set 5,[hl] - ld a,[wCurMap] - cp a,OAKS_LAB - jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab + ld hl, wd72e + set 5, [hl] + ld a, [wCurMap] + cp OAKS_LAB + jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab callab AnyPartyAlive - ld a,d + ld a, d and a - jr z,AllPokemonFainted + jr z, AllPokemonFainted .noFaintCheck - ld c,10 + ld c, 10 call DelayFrames jp EnterMap StepCountCheck:: ; 0457 (0:0457) - ld a,[wd730] - bit 7,a - jr nz,.doneStepCounting ; if button presses are being simulated, don't count steps + ld a, [wd730] + bit 7, a + jr nz, .doneStepCounting ; if button presses are being simulated, don't count steps ; step counting - ld hl,wStepCounter + ld hl, wStepCounter dec [hl] - ld a,[wd72c] - bit 0,a - jr z,.doneStepCounting - ld hl,wNumberOfNoRandomBattleStepsLeft + ld a, [wd72c] + bit 0, a + jr z, .doneStepCounting + ld hl, wNumberOfNoRandomBattleStepsLeft dec [hl] - jr nz,.doneStepCounting - ld hl,wd72c - res 0,[hl] ; indicate that the player has stepped thrice since the last battle + jr nz, .doneStepCounting + ld hl, wd72c + res 0, [hl] ; indicate that the player has stepped thrice since the last battle .doneStepCounting ret AllPokemonFainted:: ; 0475 (0:0475) - ld a,$ff - ld [wIsInBattle],a + ld a, $ff + ld [wIsInBattle], a call RunMapScript jp HandleBlackOut ; function to determine if there will be a battle and execute it (either a trainer battle or wild battle) ; sets carry if a battle occurred and unsets carry if not NewBattle:: ; 0480 (0:0480) - ld a,[wd72d] - bit 4,a - jr nz,.noBattle + ld a, [wd72d] + bit 4, a + jr nz, .noBattle call IsPlayerCharacterBeingControlledByGame - jr nz,.noBattle ; no battle if the player character is under the game's control - ld a,[wd72e] - bit 4,a - jr nz,.noBattle + jr nz, .noBattle ; no battle if the player character is under the game's control + ld a, [wd72e] + bit 4, a + jr nz, .noBattle jpba InitBattle ; 3d:5ff2 .noBattle and a ret DoBikeSpeedup:: ; 049d (0:049d) - ld a,[wWalkBikeSurfState] + ld a, [wWalkBikeSurfState] dec a ; riding a bike? ret nz - ld a,[wd736] - bit 6,a + ld a, [wd736] + bit 6, a ret nz - ld a,[wNPCMovementScriptPointerTableNum] + ld a, [wNPCMovementScriptPointerTableNum] and a ret nz - ld a,[wCurMap] + ld a, [wCurMap] cp ROUTE_17 ; cycling road - jr nz,.goFaster - ld a,[hJoyHeld] - and a,D_UP | D_LEFT | D_RIGHT + jr nz, .goFaster + ld a, [hJoyHeld] + and D_UP | D_LEFT | D_RIGHT ret nz .goFaster call AdvancePlayerSprite @@ -356,51 +356,51 @@ DoBikeSpeedup:: ; 049d (0:049d) ; check if the player has stepped onto a warp after having not collided CheckWarpsNoCollision:: ; 04bd (0:04bd) - ld a,[wNumberOfWarps] + ld a, [wNumberOfWarps] and a - jp z,CheckMapConnections - ld b,0 - ld a,[wNumberOfWarps] - ld c,a - ld a,[wYCoord] - ld d,a - ld a,[wXCoord] - ld e,a - ld hl,wWarpEntries + jp z, CheckMapConnections + ld b, 0 + ld a, [wNumberOfWarps] + ld c, a + ld a, [wYCoord] + ld d, a + ld a, [wXCoord] + ld e, a + ld hl, wWarpEntries CheckWarpsNoCollisionLoop:: ; 04d5 (0:04d5) - ld a,[hli] ; check if the warp's Y position matches + ld a, [hli] ; check if the warp's Y position matches cp d - jr nz,CheckWarpsNoCollisionRetry1 - ld a,[hli] ; check if the warp's X position matches + jr nz, CheckWarpsNoCollisionRetry1 + ld a, [hli] ; check if the warp's X position matches cp e - jr nz,CheckWarpsNoCollisionRetry2 + jr nz, CheckWarpsNoCollisionRetry2 ; if a match was found push hl push bc - ld hl,wd736 - set 2,[hl] ; standing on warp flag + ld hl, wd736 + set 2, [hl] ; standing on warp flag callba IsPlayerStandingOnDoorTileOrWarpTile pop bc pop hl - jr c,WarpFound1 ; jump if standing on door or warp + jr c, WarpFound1 ; jump if standing on door or warp push hl push bc call ExtraWarpCheck pop bc pop hl - jr nc,CheckWarpsNoCollisionRetry2 + jr nc, CheckWarpsNoCollisionRetry2 ; if the extra check passed - ld a,[wFlags_D733] - bit 2,a - jr nz,WarpFound1 + ld a, [wFlags_D733] + bit 2, a + jr nz, WarpFound1 push de push bc call Joypad pop bc pop de - ld a,[hJoyHeld] - and a,D_DOWN | D_UP | D_LEFT | D_RIGHT - jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp + ld a, [hJoyHeld] + and D_DOWN | D_UP | D_LEFT | D_RIGHT + jr z, CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp jr WarpFound1 CheckWarpsNoCollisionRetry1:: ; 050f (0:050f) @@ -411,29 +411,29 @@ CheckWarpsNoCollisionRetry2:: ; 0510 (0:0510) ContinueCheckWarpsNoCollisionLoop:: ; 0512 (0:0512) inc b ; increment warp number dec c ; decrement number of warps - jp nz,CheckWarpsNoCollisionLoop + jp nz, CheckWarpsNoCollisionLoop jp CheckMapConnections ; check if the player has stepped onto a warp after having collided CheckWarpsCollision:: ; 051a (0:051a) - ld a,[wNumberOfWarps] - ld c,a - ld hl,wWarpEntries + ld a, [wNumberOfWarps] + ld c, a + ld hl, wWarpEntries .loop - ld a,[hli] ; Y coordinate of warp - ld b,a - ld a,[wYCoord] + ld a, [hli] ; Y coordinate of warp + ld b, a + ld a, [wYCoord] cp b - jr nz,.retry1 - ld a,[hli] ; X coordinate of warp - ld b,a - ld a,[wXCoord] + jr nz, .retry1 + ld a, [hli] ; X coordinate of warp + ld b, a + ld a, [wXCoord] cp b - jr nz,.retry2 - ld a,[hli] - ld [wDestinationWarpID],a - ld a,[hl] - ld [hWarpDestinationMap],a + jr nz, .retry2 + ld a, [hli] + ld [wDestinationWarpID], a + ld a, [hl] + ld [hWarpDestinationMap], a jr WarpFound2 .retry1 inc hl @@ -441,34 +441,34 @@ CheckWarpsCollision:: ; 051a (0:051a) inc hl inc hl dec c - jr nz,.loop + jr nz, .loop jp OverworldLoop WarpFound1:: ; 0543 (0:0543) - ld a,[hli] - ld [wDestinationWarpID],a - ld a,[hli] - ld [hWarpDestinationMap],a + ld a, [hli] + ld [wDestinationWarpID], a + ld a, [hli] + ld [hWarpDestinationMap], a WarpFound2:: ; 054a (0:054a) - ld a,[wNumberOfWarps] + ld a, [wNumberOfWarps] sub c - ld [wWarpedFromWhichWarp],a ; save ID of used warp - ld a,[wCurMap] - ld [wWarpedFromWhichMap],a + ld [wWarpedFromWhichWarp], a ; save ID of used warp + ld a, [wCurMap] + ld [wWarpedFromWhichMap], a call CheckIfInOutsideMap - jr nz,.indoorMaps + jr nz, .indoorMaps ; this is for handling "outside" maps that can't have the 0xFF destination map - ld a,[wCurMap] - ld [wLastMap],a - ld a,[wCurMapWidth] - ld [wUnusedD366],a ; not read - ld a,[hWarpDestinationMap] - ld [wCurMap],a - cp a,ROCK_TUNNEL_1 - jr nz,.notRockTunnel - ld a,$06 - ld [wMapPalOffset],a + ld a, [wCurMap] + ld [wLastMap], a + ld a, [wCurMapWidth] + ld [wUnusedD366], a ; not read + ld a, [hWarpDestinationMap] + ld [wCurMap], a + cp ROCK_TUNNEL_1 + jr nz, .notRockTunnel + ld a, $06 + ld [wMapPalOffset], a call GBFadeOutToBlack .notRockTunnel callab Func_fc5fa ; 3f:45fa @@ -476,175 +476,175 @@ WarpFound2:: ; 054a (0:054a) jr .done ; for maps that can have the 0xFF destination map, which means to return to the outside map; not all these maps are necessarily indoors, though .indoorMaps - ld a,[hWarpDestinationMap] ; destination map - cp a,$ff - jr z,.goBackOutside + ld a, [hWarpDestinationMap] ; destination map + cp $ff + jr z, .goBackOutside ; if not going back to the previous map - ld [wCurMap],a + ld [wCurMap], a callba IsPlayerStandingOnWarpPadOrHole - ld a,[wStandingOnWarpPadOrHole] + ld a, [wStandingOnWarpPadOrHole] dec a ; is the player on a warp pad? - jr nz,.notWarpPad + jr nz, .notWarpPad ; if the player is on a warp pad call LeaveMapAnim - ld hl,wd732 - set 3,[hl] + ld hl, wd732 + set 3, [hl] jr .skipMapChangeSound .notWarpPad call PlayMapChangeSound .skipMapChangeSound - ld hl,wd736 - res 0,[hl] - res 1,[hl] + ld hl, wd736 + res 0, [hl] + res 1, [hl] callab Func_fc65b ; 3f:465b jr .done .goBackOutside callab Func_fc69a ; 3f:469a - ld a,[wLastMap] - ld [wCurMap],a + ld a, [wLastMap] + ld [wCurMap], a call PlayMapChangeSound xor a - ld [wMapPalOffset],a + ld [wMapPalOffset], a .done - ld hl,wd736 - set 0,[hl] ; have the player's sprite step out from the door (if there is one) + ld hl, wd736 + set 0, [hl] ; have the player's sprite step out from the door (if there is one) call IgnoreInputForHalfSecond jp EnterMap ; if no matching warp was found CheckMapConnections:: ; 05db (0:05db) .checkWestMap - ld a,[wXCoord] - cp a,$ff - jr nz,.checkEastMap - ld a,[W_MAPCONN3PTR] - ld [wCurMap],a - ld a,[wWestConnectedMapXAlignment] ; new X coordinate upon entering west map - ld [wXCoord],a - ld a,[wYCoord] - ld c,a - ld a,[wWestConnectedMapYAlignment] ; Y adjustment upon entering west map + ld a, [wXCoord] + cp $ff + jr nz, .checkEastMap + ld a, [W_MAPCONN3PTR] + ld [wCurMap], a + ld a, [wWestConnectedMapXAlignment] ; new X coordinate upon entering west map + ld [wXCoord], a + ld a, [wYCoord] + ld c, a + ld a, [wWestConnectedMapYAlignment] ; Y adjustment upon entering west map add c - ld c,a - ld [wYCoord],a - ld a,[wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position - ld l,a - ld a,[wWestConnectedMapViewPointer + 1] - ld h,a + ld c, a + ld [wYCoord], a + ld a, [wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position + ld l, a + ld a, [wWestConnectedMapViewPointer + 1] + ld h, a srl c - jr z,.savePointer1 + jr z, .savePointer1 .pointerAdjustmentLoop1 - ld a,[wWestConnectedMapWidth] ; width of connected map - add a,MAP_BORDER * 2 - ld e,a - ld d,0 - ld b,0 - add hl,de + ld a, [wWestConnectedMapWidth] ; width of connected map + add MAP_BORDER * 2 + ld e, a + ld d, 0 + ld b, 0 + add hl, de dec c - jr nz,.pointerAdjustmentLoop1 + jr nz, .pointerAdjustmentLoop1 .savePointer1 - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkEastMap - ld b,a - ld a,[wCurrentMapWidth2] ; map width + ld b, a + ld a, [wCurrentMapWidth2] ; map width cp b - jr nz,.checkNorthMap - ld a,[W_MAPCONN4PTR] - ld [wCurMap],a - ld a,[wEastConnectedMapXAlignment] ; new X coordinate upon entering east map - ld [wXCoord],a - ld a,[wYCoord] - ld c,a - ld a,[wEastConnectedMapYAlignment] ; Y adjustment upon entering east map + jr nz, .checkNorthMap + ld a, [W_MAPCONN4PTR] + ld [wCurMap], a + ld a, [wEastConnectedMapXAlignment] ; new X coordinate upon entering east map + ld [wXCoord], a + ld a, [wYCoord] + ld c, a + ld a, [wEastConnectedMapYAlignment] ; Y adjustment upon entering east map add c - ld c,a - ld [wYCoord],a - ld a,[wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position - ld l,a - ld a,[wEastConnectedMapViewPointer + 1] - ld h,a + ld c, a + ld [wYCoord], a + ld a, [wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position + ld l, a + ld a, [wEastConnectedMapViewPointer + 1] + ld h, a srl c - jr z,.savePointer2 + jr z, .savePointer2 .pointerAdjustmentLoop2 - ld a,[wEastConnectedMapWidth] - add a,MAP_BORDER * 2 - ld e,a - ld d,0 - ld b,0 - add hl,de + ld a, [wEastConnectedMapWidth] + add MAP_BORDER * 2 + ld e, a + ld d, 0 + ld b, 0 + add hl, de dec c - jr nz,.pointerAdjustmentLoop2 + jr nz, .pointerAdjustmentLoop2 .savePointer2 - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkNorthMap - ld a,[wYCoord] - cp a,$ff - jr nz,.checkSouthMap - ld a,[W_MAPCONN1PTR] - ld [wCurMap],a - ld a,[wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map - ld [wYCoord],a - ld a,[wXCoord] - ld c,a - ld a,[wNorthConnectedMapXAlignment] ; X adjustment upon entering north map + ld a, [wYCoord] + cp $ff + jr nz, .checkSouthMap + ld a, [W_MAPCONN1PTR] + ld [wCurMap], a + ld a, [wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map + ld [wYCoord], a + ld a, [wXCoord] + ld c, a + ld a, [wNorthConnectedMapXAlignment] ; X adjustment upon entering north map add c - ld c,a - ld [wXCoord],a - ld a,[wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position - ld l,a - ld a,[wNorthConnectedMapViewPointer + 1] - ld h,a - ld b,0 + ld c, a + ld [wXCoord], a + ld a, [wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position + ld l, a + ld a, [wNorthConnectedMapViewPointer + 1] + ld h, a + ld b, 0 srl c - add hl,bc - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + add hl, bc + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a jp .loadNewMap .checkSouthMap - ld b,a - ld a,[wCurrentMapHeight2] + ld b, a + ld a, [wCurrentMapHeight2] cp b - jr nz,.didNotEnterConnectedMap - ld a,[W_MAPCONN2PTR] - ld [wCurMap],a - ld a,[wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map - ld [wYCoord],a - ld a,[wXCoord] - ld c,a - ld a,[wSouthConnectedMapXAlignment] ; X adjustment upon entering south map + jr nz, .didNotEnterConnectedMap + ld a, [W_MAPCONN2PTR] + ld [wCurMap], a + ld a, [wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map + ld [wYCoord], a + ld a, [wXCoord] + ld c, a + ld a, [wSouthConnectedMapXAlignment] ; X adjustment upon entering south map add c - ld c,a - ld [wXCoord],a - ld a,[wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position - ld l,a - ld a,[wSouthConnectedMapViewPointer + 1] - ld h,a - ld b,0 + ld c, a + ld [wXCoord], a + ld a, [wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position + ld l, a + ld a, [wSouthConnectedMapViewPointer + 1] + ld h, a + ld b, 0 srl c - add hl,bc - ld a,l - ld [wCurrentTileBlockMapViewPointer],a ; pointer to upper left corner of current tile block map section - ld a,h - ld [wCurrentTileBlockMapViewPointer + 1],a + add hl, bc + ld a, l + ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section + ld a, h + ld [wCurrentTileBlockMapViewPointer + 1], a .loadNewMap ; 06ce (0:06ce) ; load the connected map that was entered - ld hl,wPikachuOverworldStateFlags - set 4,[hl] - ld a,$2 - ld [wd431],a + ld hl, wPikachuOverworldStateFlags + set 4, [hl] + ld a, $2 + ld [wd431], a call LoadMapHeader ; 0dab (0:0dab) call PlayDefaultMusicFadeOutCurrent ; music - ld b,SET_PAL_OVERWORLD + ld b, SET_PAL_OVERWORLD call RunPaletteCommand ; Since the sprite set shouldn't change, this will just update VRAM slots at ; $C2XE without loading any tile patterns. @@ -656,21 +656,21 @@ CheckMapConnections:: ; 05db (0:05db) ; function to play a sound when changing maps PlayMapChangeSound:: ; 06ef (0:06ef) - ld a,[wCurMapTileset] + ld a, [wCurMapTileset] cp FACILITY - jr z,.didNotGoThroughDoor + jr z, .didNotGoThroughDoor cp CEMETERY - jr z,.didNotGoThroughDoor + jr z, .didNotGoThroughDoor aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on cp UNDERGROUND ; door tile in tileset 0 - jr nz,.didNotGoThroughDoor + jr nz, .didNotGoThroughDoor ld a, $ad ; SFX_GO_INSIDE jr .playSound .didNotGoThroughDoor ld a, $b5 ; SFX_GO_OUTSIDE .playSound call PlaySound - ld a,[wMapPalOffset] + ld a, [wMapPalOffset] and a ret nz jp GBFadeOutToBlack @@ -721,9 +721,9 @@ ExtraWarpCheck:: ; 071a (0:071a) MapEntryAfterBattle:: ; 0750 (0:0750) callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions - ld a,[wMapPalOffset] + ld a, [wMapPalOffset] and a - jp z,GBFadeInFromWhite + jp z, GBFadeInFromWhite jp LoadGBPal HandleBlackOut:: ; 0762 (0:0762) @@ -773,9 +773,9 @@ Func_07c4:: ; 07c4 (0:07c4) and a ret z xor a - ld [wWalkBikeSurfState],a - ld hl,wd732 - bit 4,[hl] + ld [wWalkBikeSurfState], a + ld hl, wd732 + bit 4, [hl] ret z call PlayDefaultMusic ret @@ -797,7 +797,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7) jr .startWalking .ridingBike - ; If the bike can't be used, + ; If the bike can't be used, ; start walking instead. call IsBikeRidingAllowed jr c, .determineGraphics @@ -819,7 +819,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7) jp LoadWalkingPlayerSpriteGraphics IsBikeRidingAllowed:: ; 0805 (0:0805) -; The bike can be used on Route 23 and Indigo Plateau, +; The bike can be used on Route 23 and Indigo Plateau, ; or maps with tilesets in BikeRidingTilesets. ; Return carry if biking is allowed. @@ -849,208 +849,208 @@ INCLUDE "data/bike_riding_tilesets.asm" ; load the tile pattern data of the current tileset into VRAM LoadTilesetTilePatternData:: ; 0828 (0:0828) - ld a,[wTilesetGFXPtr] - ld l,a - ld a,[wTilesetGFXPtr + 1] - ld h,a - ld de,vTileset - ld bc,$600 - ld a,[wTilesetBank] + ld a, [wTilesetGFXPtr] + ld l, a + ld a, [wTilesetGFXPtr + 1] + ld h, a + ld de, vTileset + ld bc, $600 + ld a, [wTilesetBank] jp FarCopyData ; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8 ; it can also load partial tile maps of connected maps into a border of length 3 around the current map LoadTileBlockMap:: ; 083c (0:083c) ; fill C6E8-CBFB with the background tile - ld hl,wOverworldMap - ld bc,$0514 - ld a,[wMapBackgroundTile] ; background tile number + ld hl, wOverworldMap + ld bc, $0514 + ld a, [wMapBackgroundTile] ; background tile number call FillMemory ; load tile map of current map (made of tile block IDs) ; a 3-byte border at the edges of the map is kept so that there is space for map connections - ld hl,wOverworldMap - ld a,[wCurMapWidth] - ld [hMapWidth],a - add a,MAP_BORDER * 2 ; east and west - ld [hMapStride],a ; map width + border - ld b,0 - ld c,a + ld hl, wOverworldMap + ld a, [wCurMapWidth] + ld [hMapWidth], a + add MAP_BORDER * 2 ; east and west + ld [hMapStride], a ; map width + border + ld b, 0 + ld c, a ; make space for north border (next 3 lines) - add hl,bc - add hl,bc - add hl,bc - ld c,MAP_BORDER - add hl,bc ; this puts us past the (west) border - ld a,[W_MAPDATAPTR] ; tile map pointer - ld e,a - ld a,[W_MAPDATAPTR + 1] - ld d,a ; de = tile map pointer - ld a,[wCurMapHeight] - ld b,a + add hl, bc + add hl, bc + add hl, bc + ld c, MAP_BORDER + add hl, bc ; this puts us past the (west) border + ld a, [W_MAPDATAPTR] ; tile map pointer + ld e, a + ld a, [W_MAPDATAPTR + 1] + ld d, a ; de = tile map pointer + ld a, [wCurMapHeight] + ld b, a .rowLoop ; copy one row each iteration push hl - ld a,[hMapWidth] ; map width (without border) - ld c,a + ld a, [hMapWidth] ; map width (without border) + ld c, a .rowInnerLoop - ld a,[de] + ld a, [de] inc de - ld [hli],a + ld [hli], a dec c - jr nz,.rowInnerLoop + jr nz, .rowInnerLoop ; add the map width plus the border to the base address of the current row to get the next row's address pop hl - ld a,[hMapStride] ; map width + border + ld a, [hMapStride] ; map width + border add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry dec b - jr nz,.rowLoop + jr nz, .rowLoop .northConnection - ld a,[W_MAPCONN1PTR] - cp a,$ff - jr z,.southConnection + ld a, [W_MAPCONN1PTR] + cp $ff + jr z, .southConnection call SwitchToMapRomBank - ld a,[wNorthConnectionStripSrc] - ld l,a - ld a,[wNorthConnectionStripSrc + 1] - ld h,a - ld a,[wNorthConnectionStripDest] - ld e,a - ld a,[wNorthConnectionStripDest + 1] - ld d,a - ld a,[wNorthConnectionStripWidth] - ld [hNorthSouthConnectionStripWidth],a - ld a,[wNorthConnectedMapWidth] - ld [hNorthSouthConnectedMapWidth],a + ld a, [wNorthConnectionStripSrc] + ld l, a + ld a, [wNorthConnectionStripSrc + 1] + ld h, a + ld a, [wNorthConnectionStripDest] + ld e, a + ld a, [wNorthConnectionStripDest + 1] + ld d, a + ld a, [wNorthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth], a + ld a, [wNorthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth], a call LoadNorthSouthConnectionsTileMap .southConnection - ld a,[W_MAPCONN2PTR] - cp a,$ff - jr z,.westConnection + ld a, [W_MAPCONN2PTR] + cp $ff + jr z, .westConnection call SwitchToMapRomBank - ld a,[wSouthConnectionStripSrc] - ld l,a - ld a,[wSouthConnectionStripSrc + 1] - ld h,a - ld a,[wSouthConnectionStripDest] - ld e,a - ld a,[wSouthConnectionStripDest + 1] - ld d,a - ld a,[wSouthConnectionStripWidth] - ld [hNorthSouthConnectionStripWidth],a - ld a,[wSouthConnectedMapWidth] - ld [hNorthSouthConnectedMapWidth],a + ld a, [wSouthConnectionStripSrc] + ld l, a + ld a, [wSouthConnectionStripSrc + 1] + ld h, a + ld a, [wSouthConnectionStripDest] + ld e, a + ld a, [wSouthConnectionStripDest + 1] + ld d, a + ld a, [wSouthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth], a + ld a, [wSouthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth], a call LoadNorthSouthConnectionsTileMap .westConnection - ld a,[W_MAPCONN3PTR] - cp a,$ff - jr z,.eastConnection + ld a, [W_MAPCONN3PTR] + cp $ff + jr z, .eastConnection call SwitchToMapRomBank - ld a,[wWestConnectionStripSrc] - ld l,a - ld a,[wWestConnectionStripSrc + 1] - ld h,a - ld a,[wWestConnectionStripDest] - ld e,a - ld a,[wWestConnectionStripDest + 1] - ld d,a - ld a,[wWestConnectionStripHeight] - ld b,a - ld a,[wWestConnectedMapWidth] - ld [hEastWestConnectedMapWidth],a + ld a, [wWestConnectionStripSrc] + ld l, a + ld a, [wWestConnectionStripSrc + 1] + ld h, a + ld a, [wWestConnectionStripDest] + ld e, a + ld a, [wWestConnectionStripDest + 1] + ld d, a + ld a, [wWestConnectionStripHeight] + ld b, a + ld a, [wWestConnectedMapWidth] + ld [hEastWestConnectedMapWidth], a call LoadEastWestConnectionsTileMap .eastConnection - ld a,[W_MAPCONN4PTR] - cp a,$ff - jr z,.done + ld a, [W_MAPCONN4PTR] + cp $ff + jr z, .done call SwitchToMapRomBank - ld a,[wEastConnectionStripSrc] - ld l,a - ld a,[wEastConnectionStripSrc + 1] - ld h,a - ld a,[wEastConnectionStripDest] - ld e,a - ld a,[wEastConnectionStripDest + 1] - ld d,a - ld a,[wEastConnectionStripHeight] - ld b,a - ld a,[wEastConnectedMapWidth] - ld [hEastWestConnectedMapWidth],a + ld a, [wEastConnectionStripSrc] + ld l, a + ld a, [wEastConnectionStripSrc + 1] + ld h, a + ld a, [wEastConnectionStripDest] + ld e, a + ld a, [wEastConnectionStripDest + 1] + ld d, a + ld a, [wEastConnectionStripHeight] + ld b, a + ld a, [wEastConnectedMapWidth] + ld [hEastWestConnectedMapWidth], a call LoadEastWestConnectionsTileMap .done ret LoadNorthSouthConnectionsTileMap:: ; 0919 (0:0919) - ld c,MAP_BORDER + ld c, MAP_BORDER .loop push de push hl - ld a,[hNorthSouthConnectionStripWidth] - ld b,a + ld a, [hNorthSouthConnectionStripWidth] + ld b, a .innerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.innerLoop + jr nz, .innerLoop pop hl pop de - ld a,[hNorthSouthConnectedMapWidth] + ld a, [hNorthSouthConnectedMapWidth] add l - ld l,a - jr nc,.noCarry1 + ld l, a + jr nc, .noCarry1 inc h .noCarry1 - ld a,[wCurMapWidth] - add a,MAP_BORDER * 2 + ld a, [wCurMapWidth] + add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry2 + ld e, a + jr nc, .noCarry2 inc d .noCarry2 dec c - jr nz,.loop + jr nz, .loop ret LoadEastWestConnectionsTileMap:: ; 093d (0:093d) push hl push de - ld c,MAP_BORDER + ld c, MAP_BORDER .innerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.innerLoop + jr nz, .innerLoop pop de pop hl - ld a,[hEastWestConnectedMapWidth] + ld a, [hEastWestConnectedMapWidth] add l - ld l,a - jr nc,.noCarry1 + ld l, a + jr nc, .noCarry1 inc h .noCarry1 - ld a,[wCurMapWidth] - add a,MAP_BORDER * 2 + ld a, [wCurMapWidth] + add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry2 + ld e, a + jr nc, .noCarry2 inc d .noCarry2 dec b - jr nz,LoadEastWestConnectionsTileMap + jr nz, LoadEastWestConnectionsTileMap ret ; function to check if there is a sign or sprite in front of the player ; if so, carry is set. otherwise, carry is cleared IsSpriteOrSignInFrontOfPlayer:: ; 095e (0:095e) xor a - ld [hSpriteIndexOrTextID],a - ld a,[wNumSigns] + ld [hSpriteIndexOrTextID], a + ld a, [wNumSigns] and a - jr z,.extendRangeOverCounter + jr z, .extendRangeOverCounter ; if there are signs predef GetTileAndCoordsInFrontOfPlayer ; get the coordinates in front of the player in de call SignLoop @@ -1058,191 +1058,191 @@ IsSpriteOrSignInFrontOfPlayer:: ; 095e (0:095e) .extendRangeOverCounter ; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c - ld hl,W_TILESETTALKINGOVERTILES ; list of tiles that extend talking range (counter tiles) - ld b,3 - ld d,$20 ; talking range in pixels (long range) + ld hl, W_TILESETTALKINGOVERTILES ; list of tiles that extend talking range (counter tiles) + ld b, 3 + ld d, $20 ; talking range in pixels (long range) .counterTilesLoop - ld a,[hli] + ld a, [hli] cp c - jr z,IsSpriteInFrontOfPlayer2 ; jumps if the tile in front of the player is a counter tile + jr z, IsSpriteInFrontOfPlayer2 ; jumps if the tile in front of the player is a counter tile dec b - jr nz,.counterTilesLoop + jr nz, .counterTilesLoop ; sets carry flag if a sprite is in front of the player, resets if not IsSpriteInFrontOfPlayer:: ; 0983 (0:0983) - ld d,$10 ; talking range in pixels (normal range) + ld d, $10 ; talking range in pixels (normal range) IsSpriteInFrontOfPlayer2:: ; 0985 (0:0985) - lb bc,$3c, $40 ; Y and X position of player sprite - ld a,[wSpriteStateData1 + 9] ; direction the player is facing + lb bc, $3c, $40 ; Y and X position of player sprite + ld a, [wSpriteStateData1 + 9] ; direction the player is facing .checkIfPlayerFacingUp cp SPRITE_FACING_UP - jr nz,.checkIfPlayerFacingDown + jr nz, .checkIfPlayerFacingDown ; facing up - ld a,b + ld a, b sub d - ld b,a - ld a,PLAYER_DIR_UP + ld b, a + ld a, PLAYER_DIR_UP jr .doneCheckingDirection .checkIfPlayerFacingDown cp SPRITE_FACING_DOWN - jr nz,.checkIfPlayerFacingRight + jr nz, .checkIfPlayerFacingRight ; facing down - ld a,b + ld a, b add d - ld b,a - ld a,PLAYER_DIR_DOWN + ld b, a + ld a, PLAYER_DIR_DOWN jr .doneCheckingDirection .checkIfPlayerFacingRight cp SPRITE_FACING_RIGHT - jr nz,.playerFacingLeft + jr nz, .playerFacingLeft ; facing right - ld a,c + ld a, c add d - ld c,a - ld a,PLAYER_DIR_RIGHT + ld c, a + ld a, PLAYER_DIR_RIGHT jr .doneCheckingDirection .playerFacingLeft ; facing left - ld a,c + ld a, c sub d - ld c,a - ld a,PLAYER_DIR_LEFT + ld c, a + ld a, PLAYER_DIR_LEFT .doneCheckingDirection - ld [wPlayerDirection],a - ld hl,wSpriteStateData1 + $10 + ld [wPlayerDirection], a + ld hl, wSpriteStateData1 + $10 ; yellow does not have the "if sprites are existant" check - ld e,$01 - ld d,$f + ld e, $01 + ld d, $f .spriteLoop push hl - ld a,[hli] ; image (0 if no sprite) + ld a, [hli] ; image (0 if no sprite) and a - jr z,.nextSprite + jr z, .nextSprite inc l - ld a,[hli] ; sprite visibility + ld a, [hli] ; sprite visibility inc a - jr z,.nextSprite + jr z, .nextSprite inc l - ld a,[hli] ; Y location + ld a, [hli] ; Y location cp b - jr nz,.nextSprite + jr nz, .nextSprite inc l - ld a,[hl] ; X location + ld a, [hl] ; X location cp c - jr z,.foundSpriteInFrontOfPlayer + jr z, .foundSpriteInFrontOfPlayer .nextSprite pop hl - ld a,l - add a,$10 - ld l,a + ld a, l + add $10 + ld l, a inc e dec d - jr nz,.spriteLoop + jr nz, .spriteLoop xor a ret .foundSpriteInFrontOfPlayer pop hl - ld a,l - and a,$f0 + ld a, l + and $f0 inc a - ld l,a - set 7,[hl] - ld a,e - ld [hSpriteIndexOrTextID],a - ld a,[hSpriteIndexOrTextID] ; possible useless read because a already has the value of the read address - cp a,$f - jr nz,.dontwritetowd436 - ld a,$FF - ld [wd436],a + ld l, a + set 7, [hl] + ld a, e + ld [hSpriteIndexOrTextID], a + ld a, [hSpriteIndexOrTextID] ; possible useless read because a already has the value of the read address + cp $f + jr nz, .dontwritetowd436 + ld a, $FF + ld [wd436], a .dontwritetowd436 scf ret SignLoop:: ; 09f2 (0:09f2) ; search if a player is facing a sign - ld hl,wSignCoords ; start of sign coordinates - ld a,[wNumSigns] ; number of signs in the map - ld b,a - ld c,$00 + ld hl, wSignCoords ; start of sign coordinates + ld a, [wNumSigns] ; number of signs in the map + ld b, a + ld c, $00 .signLoop inc c - ld a,[hli] ; sign Y + ld a, [hli] ; sign Y cp d - jr z,.yCoordMatched + jr z, .yCoordMatched inc hl jr .retry .yCoordMatched - ld a,[hli] ; sign X + ld a, [hli] ; sign X cp e - jr nz,.retry + jr nz, .retry .xCoordMatched ; found sign push hl push bc - ld hl,wSignTextIDs ; start of sign text ID's - ld b,$00 + ld hl, wSignTextIDs ; start of sign text ID's + ld b, $00 dec c - add hl,bc - ld a,[hl] - ld [hSpriteIndexOrTextID],a ; store sign text ID + add hl, bc + ld a, [hl] + ld [hSpriteIndexOrTextID], a ; store sign text ID pop bc pop hl scf ret .retry dec b - jr nz,.signLoop + jr nz, .signLoop xor a ret ; function to check if the player will jump down a ledge and check if the tile ahead is passable (when not surfing) ; sets the carry flag if there is a collision, and unsets it if there isn't a collision CollisionCheckOnLand:: ; 0a1c (0:0a1c) - ld a,[wd736] - bit 6,a ; is the player jumping? - jr nz,.noCollision + ld a, [wd736] + bit 6, a ; is the player jumping? + jr nz, .noCollision ; if not jumping a ledge - ld a,[wSimulatedJoypadStatesIndex] + ld a, [wSimulatedJoypadStatesIndex] and a - jr nz,.noCollision ; no collisions when the player's movements are being controlled by the game - ld a,[wPlayerDirection] ; the direction that the player is trying to go in - ld d,a - ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) + jr nz, .noCollision ; no collisions when the player's movements are being controlled by the game + ld a, [wPlayerDirection] ; the direction that the player is trying to go in + ld d, a + ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go nop ; ??? why is this in the code - jr nz,.collision + jr nz, .collision xor a - ld [hSpriteIndexOrTextID],a + ld [hSpriteIndexOrTextID], a call IsSpriteInFrontOfPlayer ; check for sprite collisions again? when does the above check fail to detect a sprite collision? - jr nc,.asm_0a5c - res 7,[hl] - ld a,[hSpriteIndexOrTextID] + jr nc, .asm_0a5c + res 7, [hl] + ld a, [hSpriteIndexOrTextID] and a ; was there a sprite collision? - jr z,.asm_0a5c + jr z, .asm_0a5c ; if no sprite collision cp $f - jr nz,.collision - call CheckPikachuAsleep - jr nz,.collision - ld a,[hJoyHeld] + jr nz, .collision + call CheckPikachuFollowingPlayer + jr nz, .collision + ld a, [hJoyHeld] and $2 - jr nz,.asm_0a5c - ld hl,wd435 - ld a,[hl] + jr nz, .asm_0a5c + ld hl, wd435 + ld a, [hl] and a - jr z,.asm_0a5c + jr z, .asm_0a5c dec [hl] - jr nz,.collision + jr nz, .collision .asm_0a5c - ld hl,TilePairCollisionsLand + ld hl, TilePairCollisionsLand call CheckForJumpingAndTilePairCollisions - jr c,.collision + jr c, .collision call CheckTilePassable - jr nc,.noCollision + jr nc, .noCollision .collision - ld a,[wChannelSoundIDs + CH4] + ld a, [wChannelSoundIDs + CH4] cp $b4 ; SFX_COLLISION ; check if collision sound is already playing - jr z,.setCarry + jr z, .setCarry ld a, $b4 ; SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry @@ -1256,8 +1256,8 @@ CollisionCheckOnLand:: ; 0a1c (0:0a1c) ; clears carry if it is, sets carry if not CheckTilePassable:: ; 0a79 (0:0a79) predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player - ld a,[wTileInFrontOfPlayer] ; tile in front of player - ld c,a + ld a, [wTileInFrontOfPlayer] ; tile in front of player + ld c, a call IsTilePassable ret @@ -1276,53 +1276,53 @@ CheckForJumpingAndTilePairCollisions:: ; 0a86 (0:0a86) pop de pop hl and a - ld a,[wd736] - bit 6,a ; is the player jumping? + ld a, [wd736] + bit 6, a ; is the player jumping? ret nz ; if not jumping CheckForTilePairCollisions2:: ; 0aa0 (0:0aa0) aCoord 8, 9 ; tile the player is on - ld [wTilePlayerStandingOn],a + ld [wTilePlayerStandingOn], a CheckForTilePairCollisions:: ; 0aa6 (0:0aa6) - ld a,[wTileInFrontOfPlayer] - ld c,a + ld a, [wTileInFrontOfPlayer] + ld c, a .tilePairCollisionLoop - ld a,[wCurMapTileset] ; tileset number - ld b,a - ld a,[hli] - cp a,$ff - jr z,.noMatch + ld a, [wCurMapTileset] ; tileset number + ld b, a + ld a, [hli] + cp $ff + jr z, .noMatch cp b - jr z,.tilesetMatches + jr z, .tilesetMatches inc hl .retry inc hl jr .tilePairCollisionLoop .tilesetMatches - ld a,[wTilePlayerStandingOn] ; tile the player is on - ld b,a - ld a,[hl] + ld a, [wTilePlayerStandingOn] ; tile the player is on + ld b, a + ld a, [hl] cp b - jr z,.currentTileMatchesFirstInPair + jr z, .currentTileMatchesFirstInPair inc hl - ld a,[hl] + ld a, [hl] cp b - jr z,.currentTileMatchesSecondInPair + jr z, .currentTileMatchesSecondInPair jr .retry .currentTileMatchesFirstInPair inc hl - ld a,[hl] + ld a, [hl] cp c - jr z,.foundMatch + jr z, .foundMatch jr .tilePairCollisionLoop .currentTileMatchesSecondInPair dec hl - ld a,[hli] + ld a, [hli] cp c inc hl - jr nz,.tilePairCollisionLoop + jr nz, .tilePairCollisionLoop .foundMatch scf ret @@ -1357,26 +1357,26 @@ TilePairCollisionsWater:: ; 0afc (0:0afc) ; this builds a tile map from the tile block map based on the current X/Y coordinates of the player's character LoadCurrentMapView:: ; 0b06 (0:0b06) - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[wTilesetBank] ; tile data ROM bank + ld a, [wTilesetBank] ; tile data ROM bank call BankswitchCommon ; switch to ROM bank that contains tile data - ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view - ld e,a - ld a,[wCurrentTileBlockMapViewPointer + 1] - ld d,a - ld hl,wTileMapBackup - ld b,$05 + ld a, [wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view + ld e, a + ld a, [wCurrentTileBlockMapViewPointer + 1] + ld d, a + ld hl, wTileMapBackup + ld b, $05 .rowLoop ; each loop iteration fills in one row of tile blocks push hl push de - ld c,$06 + ld c, $06 .rowInnerLoop ; loop to draw each tile block of the current row push bc push de push hl - ld a,[de] - ld c,a ; tile block number + ld a, [de] + ld c, a ; tile block number call DrawTileBlock pop hl pop de @@ -1387,73 +1387,73 @@ LoadCurrentMapView:: ; 0b06 (0:0b06) inc hl inc de dec c - jr nz,.rowInnerLoop + jr nz, .rowInnerLoop ; update tile block map pointer to next row's address pop de - ld a,[wCurMapWidth] - add a,MAP_BORDER * 2 + ld a, [wCurMapWidth] + add MAP_BORDER * 2 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry ; update tile map pointer to next row's address pop hl - ld a,$60 + ld a, $60 add l - ld l,a - jr nc,.noCarry2 + ld l, a + jr nc, .noCarry2 inc h .noCarry2 dec b - jr nz,.rowLoop - ld hl,wTileMapBackup - ld bc,$0000 + jr nz, .rowLoop + ld hl, wTileMapBackup + ld bc, $0000 .adjustForYCoordWithinTileBlock - ld a,[wYBlockCoord] + ld a, [wYBlockCoord] and a - jr z,.adjustForXCoordWithinTileBlock - ld bc,$0030 - add hl,bc + jr z, .adjustForXCoordWithinTileBlock + ld bc, $0030 + add hl, bc .adjustForXCoordWithinTileBlock - ld a,[wXBlockCoord] + ld a, [wXBlockCoord] and a - jr z,.copyToVisibleAreaBuffer - ld bc,$0002 - add hl,bc + jr z, .copyToVisibleAreaBuffer + ld bc, $0002 + add hl, bc .copyToVisibleAreaBuffer coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank ld b, SCREEN_HEIGHT .rowLoop2 ld c, SCREEN_WIDTH .rowInnerLoop2 - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.rowInnerLoop2 - ld a,$04 + jr nz, .rowInnerLoop2 + ld a, $04 add l - ld l,a - jr nc,.noCarry3 + ld l, a + jr nc, .noCarry3 inc h .noCarry3 dec b - jr nz,.rowLoop2 + jr nz, .rowLoop2 pop af call BankswitchCommon ; restore previous ROM bank ret AdvancePlayerSprite:: ; 0b7f (0:0b7f) - ld a,[wUpdateSpritesEnabled] + ld a, [wUpdateSpritesEnabled] push af - ld a,$FF - ld [wUpdateSpritesEnabled],a + ld a, $FF + ld [wUpdateSpritesEnabled], a ld hl, _AdvancePlayerSprite ; 3c:410c ld b, BANK(_AdvancePlayerSprite) call Bankswitch pop af - ld [wUpdateSpritesEnabled],a + ld [wUpdateSpritesEnabled], a ret ; the following 6 functions are used to tell the V-blank handler to redraw @@ -1462,140 +1462,140 @@ AdvancePlayerSprite:: ; 0b7f (0:0b7f) ScheduleNorthRowRedraw:: ; 0b95 (0:0b95) coord hl, 0, 0 call CopyToRedrawRowOrColumnSrcTiles - ld a,[wMapViewVRAMPointer] - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_ROW - ld [hRedrawRowOrColumnMode],a + ld a, [wMapViewVRAMPointer] + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a ret CopyToRedrawRowOrColumnSrcTiles:: ; 0baa (0:0baa) - ld de,wRedrawRowOrColumnSrcTiles - ld c,2 * SCREEN_WIDTH + ld de, wRedrawRowOrColumnSrcTiles + ld c, 2 * SCREEN_WIDTH .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.loop + jr nz, .loop ret ScheduleSouthRowRedraw:: ; 0bb6 (0:0bb6) coord hl, 0, 16 call CopyToRedrawRowOrColumnSrcTiles - ld a,[wMapViewVRAMPointer] - ld l,a - ld a,[wMapViewVRAMPointer + 1] - ld h,a - ld bc,$0200 - add hl,bc - ld a,h - and a,$03 - or a,$98 - ld [hRedrawRowOrColumnDest + 1],a - ld a,l - ld [hRedrawRowOrColumnDest],a - ld a,REDRAW_ROW - ld [hRedrawRowOrColumnMode],a + ld a, [wMapViewVRAMPointer] + ld l, a + ld a, [wMapViewVRAMPointer + 1] + ld h, a + ld bc, $0200 + add hl, bc + ld a, h + and $03 + or $98 + ld [hRedrawRowOrColumnDest + 1], a + ld a, l + ld [hRedrawRowOrColumnDest], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a ret ScheduleEastColumnRedraw:: ; 0bd6 (0:0bd7) coord hl, 18, 0 call ScheduleColumnRedrawHelper - ld a,[wMapViewVRAMPointer] - ld c,a - and a,$e0 - ld b,a - ld a,c - add a,18 - and a,$1f + ld a, [wMapViewVRAMPointer] + ld c, a + and $e0 + ld b, a + ld a, c + add 18 + and $1f or b - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_COL - ld [hRedrawRowOrColumnMode],a + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_COL + ld [hRedrawRowOrColumnMode], a ret ScheduleColumnRedrawHelper:: ; 0bf6 (0:0bf6) - ld de,wRedrawRowOrColumnSrcTiles - ld c,SCREEN_HEIGHT + ld de, wRedrawRowOrColumnSrcTiles + ld c, SCREEN_HEIGHT .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de - ld a,[hl] - ld [de],a + ld a, [hl] + ld [de], a inc de - ld a,19 + ld a, 19 add l - ld l,a - jr nc,.noCarry + ld l, a + jr nc, .noCarry inc h .noCarry dec c - jr nz,.loop + jr nz, .loop ret ScheduleWestColumnRedraw:: ; 0c0c (0:0c0c) coord hl, 0, 0 call ScheduleColumnRedrawHelper - ld a,[wMapViewVRAMPointer] - ld [hRedrawRowOrColumnDest],a - ld a,[wMapViewVRAMPointer + 1] - ld [hRedrawRowOrColumnDest + 1],a - ld a,REDRAW_COL - ld [hRedrawRowOrColumnMode],a + ld a, [wMapViewVRAMPointer] + ld [hRedrawRowOrColumnDest], a + ld a, [wMapViewVRAMPointer + 1] + ld [hRedrawRowOrColumnDest + 1], a + ld a, REDRAW_COL + ld [hRedrawRowOrColumnMode], a ret ; function to write the tiles that make up a tile block to memory ; Input: c = tile block ID, hl = destination address DrawTileBlock:: ; 0c21 (0:0c21) push hl - ld a,[W_TILESETBLOCKSPTR] ; pointer to tiles - ld l,a - ld a,[W_TILESETBLOCKSPTR + 1] - ld h,a - ld a,c + ld a, [W_TILESETBLOCKSPTR] ; pointer to tiles + ld l, a + ld a, [W_TILESETBLOCKSPTR + 1] + ld h, a + ld a, c swap a - ld b,a - and a,$f0 - ld c,a - ld a,b - and a,$0f - ld b,a ; bc = tile block ID * 0x10 - add hl,bc - ld d,h - ld e,l ; de = address of the tile block's tiles + ld b, a + and $f0 + ld c, a + ld a, b + and $0f + ld b, a ; bc = tile block ID * 0x10 + add hl, bc + ld d, h + ld e, l ; de = address of the tile block's tiles pop hl - ld c,$04 ; 4 loop iterations + ld c, $04 ; 4 loop iterations .loop ; each loop iteration, write 4 tile numbers push bc - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hli],a + ld a, [de] + ld [hli], a inc de - ld a,[de] - ld [hl],a + ld a, [de] + ld [hl], a inc de - ld bc,$0015 - add hl,bc + ld bc, $0015 + add hl, bc pop bc dec c - jr nz,.loop + jr nz, .loop ret ; function to update joypad state and simulate button presses JoypadOverworld:: ; 0c51 (0:0c51) xor a - ld [wSpriteStateData1 + 3],a - ld [wSpriteStateData1 + 5],a + ld [wSpriteStateData1 + 3], a + ld [wSpriteStateData1 + 5], a call RunMapScript call Joypad call ForceBikeDown @@ -1603,66 +1603,66 @@ JoypadOverworld:: ; 0c51 (0:0c51) ret ForceBikeDown:: ; 0c65 (0:0c65) - ld a,[wFlags_D733] - bit 3,a ; check if a trainer wants a challenge + ld a, [wFlags_D733] + bit 3, a ; check if a trainer wants a challenge ret nz - ld a,[wCurMap] - cp a,ROUTE_17 ; Cycling Road + ld a, [wCurMap] + cp ROUTE_17 ; Cycling Road ret nz - ld a,[hJoyHeld] - and a,D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON + ld a, [hJoyHeld] + and D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON ret nz - ld a,D_DOWN - ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press + ld a, D_DOWN + ld [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press ret AreInputsSimulated:: ; 0c7b (0:0c7b) - ld a,[wd730] - bit 7,a + ld a, [wd730] + bit 7, a ret z ; if simulating button presses - ld a,[hJoyHeld] - ld b,a - ld a,[wOverrideSimulatedJoypadStatesMask] ; bit mask for button presses that override simulated ones + ld a, [hJoyHeld] + ld b, a + ld a, [wOverrideSimulatedJoypadStatesMask] ; bit mask for button presses that override simulated ones and b ret nz ; return if the simulated button presses are overridden call GetSimulatedInput - jr nc,.doneSimulating - ld [hJoyHeld],a ; store simulated button press in joypad state + jr nc, .doneSimulating + ld [hJoyHeld], a ; store simulated button press in joypad state and a ret nz - ld [hJoyPressed],a - ld [hJoyReleased],a + ld [hJoyPressed], a + ld [hJoyReleased], a ret ; if done simulating button presses .doneSimulating xor a - ld [wWastedByteCD3A],a - ld [wSimulatedJoypadStatesIndex],a - ld [wSimulatedJoypadStatesEnd],a - ld [wJoyIgnore],a - ld [hJoyHeld],a - ld hl,wd736 - ld a,[hl] - and a,$f8 - ld [hl],a - ld hl,wd730 - res 7,[hl] + ld [wWastedByteCD3A], a + ld [wSimulatedJoypadStatesIndex], a + ld [wSimulatedJoypadStatesEnd], a + ld [wJoyIgnore], a + ld [hJoyHeld], a + ld hl, wd736 + ld a, [hl] + and $f8 + ld [hl], a + ld hl, wd730 + res 7, [hl] ret GetSimulatedInput:: ; 0cb3 (0:0cb3) - ld hl,wSimulatedJoypadStatesIndex + ld hl, wSimulatedJoypadStatesIndex dec [hl] - ld a,[hl] - cp a,$ff - jr z,.endofsimulatedinputs ; if the end of the simulated button presses has been reached + ld a, [hl] + cp $ff + jr z, .endofsimulatedinputs ; if the end of the simulated button presses has been reached push de - ld e,a - ld d,$0 - ld hl,wSimulatedJoypadStatesEnd - add hl,de - ld a,[hl] + ld e, a + ld d, $0 + ld hl, wSimulatedJoypadStatesEnd + add hl, de + ld a, [hl] pop de scf ret @@ -1676,33 +1676,33 @@ GetSimulatedInput:: ; 0cb3 (0:0cb3) ; It seems that this function has a bug in it, but due to luck, it doesn't ; show up. After detecting a sprite collision, it jumps to the code that ; checks if the next tile is passable instead of just directly jumping to the -; "collision detected" code. However, it doesn't store the next tile in c, -; so the old value of c is used. 2429 is always called before this function, +; "collision detected" code. However, it doesn't store the next tile in c, +; so the old value of c is used. 2429 is always called before this function, ; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it ; is considered impassable and it is detected as a collision. CollisionCheckOnWater:: ; 0cca (0:0cca) - ld a,[wd730] - bit 7,a - jp nz,.noCollision ; return and clear carry if button presses are being simulated - ld a,[wPlayerDirection] ; the direction that the player is trying to go in - ld d,a - ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) + ld a, [wd730] + bit 7, a + jp nz, .noCollision ; return and clear carry if button presses are being simulated + ld a, [wPlayerDirection] ; the direction that the player is trying to go in + ld d, a + ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go - jr nz,.collision ; bug? - ld hl,TilePairCollisionsWater + jr nz, .collision ; bug? + ld hl, TilePairCollisionsWater call CheckForJumpingAndTilePairCollisions - jr c,.collision + jr c, .collision predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player (puts it in c and [wTileInFrontOfPlayer]) callab IsNextTileShoreOrWater ; 3:6808 - jr c,.noCollision - ld a,[wTileInFrontOfPlayer] ; tile in front of player - ld c,a + jr c, .noCollision + ld a, [wTileInFrontOfPlayer] ; tile in front of player + ld c, a call IsTilePassable - jr nc,.stopSurfing + jr nc, .stopSurfing .collision - ld a,[wChannelSoundIDs + CH4] + ld a, [wChannelSoundIDs + CH4] cp $b4 ; SFX_COLLISION - jr z,.setCarry + jr z, .setCarry ld a, $b4 ; SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry @@ -1714,12 +1714,12 @@ CollisionCheckOnWater:: ; 0cca (0:0cca) jr nz, .noCollision ; keep surfing if it's not the boarding platform tile jr .stopSurfing ; if it is the boarding platform tile, stop surfing .stopSurfing ; based game freak - ld a,$3 - ld [wd431],a - ld hl,wPikachuOverworldStateFlags - set 5,[hl] + ld a, $3 + ld [wd431], a + ld hl, wPikachuOverworldStateFlags + set 5, [hl] xor a - ld [wWalkBikeSurfState],a + ld [wWalkBikeSurfState], a call LoadPlayerSpriteGraphics call PlayDefaultMusic jr .noCollision @@ -1734,22 +1734,22 @@ RunMapScript:: ; 0d2c (0:0d2c) push de push bc callba TryPushingBoulder - ld a,[wFlags_0xcd60] - bit 1,a ; play boulder dust animation - jr z,.afterBoulderEffect + ld a, [wFlags_0xcd60] + bit 1, a ; play boulder dust animation + jr z, .afterBoulderEffect callba DoBoulderDustAnimation .afterBoulderEffect pop bc pop de pop hl call RunNPCMovementScript - ld a,[wCurMap] ; current map number + ld a, [wCurMap] ; current map number call SwitchToMapRomBank ; change to the ROM bank the map's data is in - ld hl,W_MAPSCRIPTPTR - ld a,[hli] - ld h,[hl] - ld l,a - ld de,.return + ld hl, W_MAPSCRIPTPTR + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return push de jp [hl] ; jump to script .return @@ -1758,38 +1758,38 @@ RunMapScript:: ; 0d2c (0:0d2c) LoadWalkingPlayerSpriteGraphics:: ; 0d5e (0:0d5e) ; new sprite copy stuff xor a - ld [wd473],a - ld b,BANK(RedSprite) - ld de,RedSprite ; $4180 + ld [wd473], a + ld b, BANK(RedSprite) + ld de, RedSprite ; $4180 jr LoadPlayerSpriteGraphicsCommon LoadSurfingPlayerSpriteGraphics2:: ; 0d69 (0:0d69) - ld a,[wd473] + ld a, [wd473] and a - jr z,.asm_0d75 + jr z, .asm_0d75 dec a - jr z,LoadSurfingPlayerSpriteGraphics + jr z, LoadSurfingPlayerSpriteGraphics dec a - jr z,.asm_0d7c + jr z, .asm_0d7c .asm_0d75 - ld a,[wd472] - bit 6,a - jr z,LoadSurfingPlayerSpriteGraphics + ld a, [wd472] + bit 6, a + jr z, LoadSurfingPlayerSpriteGraphics .asm_0d7c - ld b,BANK(SurfingPikachuSprite) - ld de,SurfingPikachuSprite ; 3f:6def + ld b, BANK(SurfingPikachuSprite) + ld de, SurfingPikachuSprite ; 3f:6def jr LoadPlayerSpriteGraphicsCommon LoadSurfingPlayerSpriteGraphics:: ; 0d83 (0:0d83) - ld b,BANK(RedSprite) ; not sure, but probably same bank (5) - ld de,SeelSprite + ld b, BANK(RedSprite) ; not sure, but probably same bank (5) + ld de, SeelSprite jr LoadPlayerSpriteGraphicsCommon LoadBikePlayerSpriteGraphics:: ; 0d8a (0:0d8a) - ld b,BANK(RedCyclingSprite) - ld de,RedCyclingSprite + ld b, BANK(RedCyclingSprite) + ld de, RedCyclingSprite LoadPlayerSpriteGraphicsCommon:: ; 0d8f (0:0d8f) - ld hl,vNPCSprites + ld hl, vNPCSprites push de push hl push bc @@ -1798,14 +1798,14 @@ LoadPlayerSpriteGraphicsCommon:: ; 0d8f (0:0d8f) pop bc pop hl pop de - ld a,$c0 + ld a, $c0 add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry - set 3,h - ld c,$c + set 3, h + ld c, $c jp CopyVideoData ; function to load data from the map header @@ -1814,125 +1814,125 @@ LoadMapHeader:: ; 0dab (0:0dab) jr .asm_0dbd callba Func_f0a55 ; 3c:4a55 .asm_0dbd - ld a,[wCurMapTileset] - ld [wUnusedD119],a - ld a,[wCurMap] + ld a, [wCurMapTileset] + ld [wUnusedD119], a + ld a, [wCurMap] call SwitchToMapRomBank - ld a,[wCurMapTileset] - ld b,a - res 7,a - ld [wCurMapTileset],a - ld [hPreviousTileset],a - bit 7,b + ld a, [wCurMapTileset] + ld b, a + res 7, a + ld [wCurMapTileset], a + ld [hPreviousTileset], a + bit 7, b ret nz call GetMapHeaderPointer ; copy the first 10 bytes (the fixed area) of the map data to D367-D370 - ld de,wCurMapTileset - ld c,$0a + ld de, wCurMapTileset + ld c, $0a .copyFixedHeaderLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.copyFixedHeaderLoop + jr nz, .copyFixedHeaderLoop ; initialize all the connected maps to disabled at first, before loading the actual values - ld a,$ff - ld [W_MAPCONN1PTR],a - ld [W_MAPCONN2PTR],a - ld [W_MAPCONN3PTR],a - ld [W_MAPCONN4PTR],a + ld a, $ff + ld [W_MAPCONN1PTR], a + ld [W_MAPCONN2PTR], a + ld [W_MAPCONN3PTR], a + ld [W_MAPCONN4PTR], a ; copy connection data (if any) to WRAM - ld a,[W_MAPCONNECTIONS] - ld b,a + ld a, [W_MAPCONNECTIONS] + ld b, a .checkNorth - bit 3,b - jr z,.checkSouth - ld de,W_MAPCONN1PTR + bit 3, b + jr z, .checkSouth + ld de, W_MAPCONN1PTR call CopyMapConnectionHeader .checkSouth - bit 2,b - jr z,.checkWest - ld de,W_MAPCONN2PTR + bit 2, b + jr z, .checkWest + ld de, W_MAPCONN2PTR call CopyMapConnectionHeader .checkWest - bit 1,b - jr z,.checkEast - ld de,W_MAPCONN3PTR + bit 1, b + jr z, .checkEast + ld de, W_MAPCONN3PTR call CopyMapConnectionHeader .checkEast - bit 0,b - jr z,.getObjectDataPointer - ld de,W_MAPCONN4PTR + bit 0, b + jr z, .getObjectDataPointer + ld de, W_MAPCONN4PTR call CopyMapConnectionHeader .getObjectDataPointer - ld a,[hli] - ld [wObjectDataPointerTemp],a - ld a,[hli] - ld [wObjectDataPointerTemp + 1],a + ld a, [hli] + ld [wObjectDataPointerTemp], a + ld a, [hli] + ld [wObjectDataPointerTemp + 1], a push hl - ld a,[wObjectDataPointerTemp] - ld l,a - ld a,[wObjectDataPointerTemp + 1] - ld h,a ; hl = base of object data - ld de,wMapBackgroundTile - ld a,[hli] - ld [de],a + ld a, [wObjectDataPointerTemp] + ld l, a + ld a, [wObjectDataPointerTemp + 1] + ld h, a ; hl = base of object data + ld de, wMapBackgroundTile + ld a, [hli] + ld [de], a .loadWarpData - ld a,[hli] - ld [wNumberOfWarps],a + ld a, [hli] + ld [wNumberOfWarps], a and a - jr z,.loadSignData - ld c,a - ld de,wWarpEntries + jr z, .loadSignData + ld c, a + ld de, wWarpEntries .warpLoop ; one warp per loop iteration - ld b,$04 + ld b, $04 .warpInnerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec b - jr nz,.warpInnerLoop + jr nz, .warpInnerLoop dec c - jr nz,.warpLoop + jr nz, .warpLoop .loadSignData - ld a,[hli] ; number of signs - ld [wNumSigns],a + ld a, [hli] ; number of signs + ld [wNumSigns], a and a ; are there any signs? - jr z,.loadSpriteData ; if not, skip this + jr z, .loadSpriteData ; if not, skip this call CopySignData ; 0eb3 (0:0eb3) .loadSpriteData - ld a,[wd72e] - bit 5,a ; did a battle happen immediately before this? - jr nz,.finishUp ; if so, skip this because battles don't destroy this data + ld a, [wd72e] + bit 5, a ; did a battle happen immediately before this? + jr nz, .finishUp ; if so, skip this because battles don't destroy this data call InitSprites .finishUp predef LoadTilesetHeader - ld a,[wd72e] - bit 5,a ; did a battle happen immediately before this? - jr nz,.asm_0e73 + ld a, [wd72e] + bit 5, a ; did a battle happen immediately before this? + jr nz, .asm_0e73 callab Func_fc4fa ; 3f:44fa .asm_0e73 callab LoadWildData ; 3:4b62 pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose) - ld a,[wCurMapHeight] ; map height in 4x4 tile blocks + ld a, [wCurMapHeight] ; map height in 4x4 tile blocks add a ; double it - ld [wCurrentMapHeight2],a ; store map height in 2x2 tile blocks - ld a,[wCurMapWidth] ; map width in 4x4 tile blocks + ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks + ld a, [wCurMapWidth] ; map width in 4x4 tile blocks add a ; double it - ld [wCurrentMapWidth2],a ; map width in 2x2 tile blocks - ld a,[wCurMap] - ld c,a - ld b,$00 - ld a,[H_LOADEDROMBANK] + ld [wCurrentMapWidth2], a ; map width in 2x2 tile blocks + ld a, [wCurMap] + ld c, a + ld b, $00 + ld a, [H_LOADEDROMBANK] push af switchbank MapSongBanks ld hl, MapSongBanks ; 3f:4000 - add hl,bc - add hl,bc - ld a,[hli] - ld [wMapMusicSoundID],a ; music 1 - ld a,[hl] - ld [wMapMusicROMBank],a ; music 2 + add hl, bc + add hl, bc + ld a, [hli] + ld [wMapMusicSoundID], a ; music 1 + ld a, [hl] + ld [wMapMusicROMBank], a ; music 2 pop af call BankswitchCommon ret @@ -1940,38 +1940,38 @@ LoadMapHeader:: ; 0dab (0:0dab) ; function to copy map connection data from ROM to WRAM ; Input: hl = source, de = destination CopyMapConnectionHeader:: ; 0eaa (0:0eaa) - ld c,$0b + ld c, $0b .loop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc de dec c - jr nz,.loop + jr nz, .loop ret CopySignData:: ; 0eb3 (0:0eb3) - ld de,wSignCoords ; start of sign coords - ld bc,wSignTextIDs ; start of sign text ids - ld a,[wNumSigns] ; number of signs + ld de, wSignCoords ; start of sign coords + ld bc, wSignTextIDs ; start of sign text ids + ld a, [wNumSigns] ; number of signs .signcopyloop push af - ld a,[hli] - ld [de],a ; copy y coord + ld a, [hli] + ld [de], a ; copy y coord inc de - ld a,[hli] - ld [de],a ; copy x coord + ld a, [hli] + ld [de], a ; copy x coord inc de - ld a,[hli] - ld [bc],a ; copy sign text id + ld a, [hli] + ld [bc], a ; copy sign text id inc bc pop af dec a - jr nz,.signcopyloop + jr nz, .signcopyloop ret ; function to load map data LoadMapData:: ; 1241 (0:1241) - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af call DisableLCD call ResetMapVariables @@ -1980,18 +1980,18 @@ LoadMapData:: ; 1241 (0:1241) call InitMapSprites ; load tile pattern data for sprites call LoadScreenRelatedData call CopyMapViewToVRAM - ld a,$01 - ld [wUpdateSpritesEnabled],a + ld a, $01 + ld [wUpdateSpritesEnabled], a call EnableLCD - ld b,$09 + ld b, $09 call RunPaletteCommand call LoadPlayerSpriteGraphics - ld a,[wd732] - and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp - jr nz,.restoreRomBank - ld a,[wFlags_D733] - bit 1,a - jr nz,.restoreRomBank + ld a, [wd732] + and 1 << 4 | 1 << 3 ; fly warp or dungeon warp + jr nz, .restoreRomBank + ld a, [wFlags_D733] + bit 1, a + jr nz, .restoreRomBank call UpdateMusic6Times ; music related call PlayDefaultMusicFadeOutCurrent ; music related .restoreRomBank @@ -2006,15 +2006,15 @@ LoadScreenRelatedData:: ; 0f0c (0:0f0c) ret Func_0f16:: ; 0f16 (0:0f16) - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af call DisableLCD call ResetMapVariables - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank call LoadScreenRelatedData call CopyMapViewToVRAM - ld de,vBGMap1 + ld de, vBGMap1 call CopyMapViewToVRAM2 call EnableLCD call ReloadMapSpriteTilePatterns @@ -2022,9 +2022,9 @@ Func_0f16:: ; 0f16 (0:0f16) call BankswitchCommon jr asm_0f4d Func_0f3d:: ; 0f3d (0:0f3d) - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af - ld a,[wCurMap] + ld a, [wCurMap] call SwitchToMapRomBank call LoadTileBlockMap pop af @@ -2034,40 +2034,40 @@ asm_0f4d: ; 0f4d (0:0f4d) ret ; useless? ResetMapVariables:: ; 0f56 (0:0f56) - ld a,$98 - ld [wMapViewVRAMPointer + 1],a + ld a, $98 + ld [wMapViewVRAMPointer + 1], a xor a - ld [wMapViewVRAMPointer],a - ld [hSCY],a - ld [hSCX],a - ld [wWalkCounter],a - ld [wUnusedD119],a - ld [wSpriteSetID],a - ld [wWalkBikeSurfStateCopy],a + ld [wMapViewVRAMPointer], a + ld [hSCY], a + ld [hSCX], a + ld [wWalkCounter], a + ld [wUnusedD119], a + ld [wSpriteSetID], a + ld [wWalkBikeSurfStateCopy], a ret CopyMapViewToVRAM:: ; 0f70 (0:0f70) ; copy current map view to VRAM - ld de,vBGMap0 + ld de, vBGMap0 CopyMapViewToVRAM2: ; 0f73 (0:0f73) - ld hl,wTileMap - ld b,18 + ld hl, wTileMap + ld b, 18 .vramCopyLoop - ld c,20 + ld c, 20 .vramCopyInnerLoop - ld a,[hli] - ld [de],a + ld a, [hli] + ld [de], a inc e dec c - jr nz,.vramCopyInnerLoop - ld a,32 - 20 ; total vram map width in tiles - screen width in tiles + jr nz, .vramCopyInnerLoop + ld a, 32 - 20 ; total vram map width in tiles - screen width in tiles add e - ld e,a - jr nc,.noCarry + ld e, a + jr nc, .noCarry inc d .noCarry dec b - jr nz,.vramCopyLoop + jr nz, .vramCopyLoop ret ; function to switch to the ROM bank that a map is stored in @@ -2075,35 +2075,35 @@ CopyMapViewToVRAM2: ; 0f73 (0:0f73) SwitchToMapRomBank:: ; 0f8b (0:0f8b) push hl push bc - ld c,a - ld b,$00 - ld a,BANK(MapHeaderBanks) + ld c, a + ld b, $00 + ld a, BANK(MapHeaderBanks) call BankswitchHome ; switch to ROM bank 3F - ld hl,MapHeaderBanks - add hl,bc - ld a,[hl] - ld [$ffe8],a ; save map ROM bank + ld hl, MapHeaderBanks + add hl, bc + ld a, [hl] + ld [$ffe8], a ; save map ROM bank call BankswitchBack - ld a,[$ffe8] + ld a, [$ffe8] call BankswitchCommon pop bc pop hl ret GetMapHeaderPointer:: ; 0fa7 (0:0fa7) - ld a,[H_LOADEDROMBANK] + ld a, [H_LOADEDROMBANK] push af switchbank MapHeaderPointers ; 3f:41f2 push de - ld a,[wCurMap] - ld e,a - ld d,$0 - ld hl,MapHeaderPointers - add hl,de - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a + ld a, [wCurMap] + ld e, a + ld d, $0 + ld hl, MapHeaderPointers + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a pop de pop af jp BankswitchCommon @@ -2131,15 +2131,15 @@ ForceBikeOrSurf:: ; 0fd6 (0:0fd6) ; Handle the player jumping down ; a ledge in the overworld. HandleMidJump:: ; 0fe1 (0:0fe1) - ld a,[wd736] - bit 6,a ; jumping down a ledge? + ld a, [wd736] + bit 6, a ; jumping down a ledge? ret z callba _HandleMidJump ret IsSpinning:: ; 0ff0 (0:0ff0) - ld a,[wd736] - bit 7,a + ld a, [wd736] + bit 7, a ret z ; no spinning jpba LoadSpinnerArrowTiles ; spin while moving @@ -2147,140 +2147,140 @@ Func_0ffe:: ; 0ffe (0:0ffe) jpab IsPlayerTalkingToPikachu InitSprites:: ; 1006 (0:1006) - ld a,[hli] - ld [wNumSprites],a ; save the number of sprites + ld a, [hli] + ld [wNumSprites], a ; save the number of sprites push hl push de push bc call ZeroSpriteStateData call DisableRegularSprites - ld hl,wMapSpriteData - ld bc,$20 + ld hl, wMapSpriteData + ld bc, $20 xor a call FillMemory pop bc pop de pop hl - ld a,[wNumSprites] + ld a, [wNumSprites] and a ; are sprites existant? ret z ; don't copy sprite data if not - ld b,a - ld c,$0 - ld de,wSpriteStateData1 + $10 + ld b, a + ld c, $0 + ld de, wSpriteStateData1 + $10 ; copy sprite stuff? .loadSpriteLoop - ld a,[hli] - ld [de],a ; store picture ID at C1X0 + ld a, [hli] + ld [de], a ; store picture ID at C1X0 inc d - ld a,e + ld a, e add $4 - ld e,a - ld a,[hli] - ld [de],a ; store Y position at C2X4 + ld e, a + ld a, [hli] + ld [de], a ; store Y position at C2X4 inc e - ld a,[hli] - ld [de],a ; store X position at C2X5 + ld a, [hli] + ld [de], a ; store X position at C2X5 inc e - ld a,[hli] - ld [de],a ; store movement byte 1 at C2X6 - ld a,[hli] - ld [$ff8d],a ; save movement byte 2 - ld a,[hli] - ld [$ff8e],a ; save text ID and flags byte + ld a, [hli] + ld [de], a ; store movement byte 1 at C2X6 + ld a, [hli] + ld [$ff8d], a ; save movement byte 2 + ld a, [hli] + ld [$ff8e], a ; save text ID and flags byte push bc call LoadSprite pop bc dec d - ld a,e - add a,$a - ld e,a + ld a, e + add $a + ld e, a inc c inc c dec b - jr nz,.loadSpriteLoop + jr nz, .loadSpriteLoop ret ZeroSpriteStateData:: ; 1050 (0:1050) ; zero C110-C1EF and C210-C2EF -; C1F0-C1FF and C2F0-C2FF is probably used for Pikachu - ld hl,wSpriteStateData1 + $10 - ld de,wSpriteStateData2 + $10 +; C1F0-C1FF and C2F0-C2FF is used for Pikachu + ld hl, wSpriteStateData1 + $10 + ld de, wSpriteStateData2 + $10 xor a - ld b,$e0 + ld b, 14 * $10 .loop - ld [hli],a - ld [de],a + ld [hli], a + ld [de], a inc e dec b - jr nz,.loop + jr nz, .loop ret DisableRegularSprites:: ; 1060 (0:1060) ; initialize all C100-C1FF sprite entries to disabled (other than player's and pikachu) - ld hl,wSpriteStateData1 + $12 - ld de,$10 - ld c,$e + ld hl, wSpriteStateData1 + 1 * $10 + 2 + ld de, $10 + ld c, $e .loop - ld [hl],$ff - add hl,de + ld [hl], $ff + add hl, de dec c - jr nz,.loop + jr nz, .loop ret LoadSprite:: ; 106f (0:106f) push hl - ld b,$0 - ld hl,wMapSpriteData - add hl,bc - ld a,[$ff8d] - ld [hli],a ; store movement byte 2 in byte 0 of sprite entry - ld a,[$ff8e] - ld [hl],a ; this appears pointless, since the value is overwritten immediately after - ld a,[$ff8e] - ld [$ff8d],a - and a,$3f - ld [hl],a ; store text ID in byte 1 of sprite entry + ld b, $0 + ld hl, wMapSpriteData + add hl, bc + ld a, [$ff8d] + ld [hli], a ; store movement byte 2 in byte 0 of sprite entry + ld a, [$ff8e] + ld [hl], a ; this appears pointless, since the value is overwritten immediately after + ld a, [$ff8e] + ld [$ff8d], a + and $3f + ld [hl], a ; store text ID in byte 1 of sprite entry pop hl - ld a,[$ff8d] - bit 6,a - jr nz,.trainerSprite - bit 7,a - jr nz,.itemBallSprite + ld a, [$ff8d] + bit 6, a + jr nz, .trainerSprite + bit 7, a + jr nz, .itemBallSprite ; for regular sprites push hl - ld hl,wMapSpriteExtraData - add hl,bc + ld hl, wMapSpriteExtraData + add hl, bc ; zero both bytes, since regular sprites don't use this extra space xor a - ld [hli],a - ld [hl],a + ld [hli], a + ld [hl], a pop hl ret .trainerSprite - ld a,[hli] - ld [$ff8d],a ; save trainer class - ld a,[hli] - ld [$ff8e],a ; save trainer number (within class) + ld a, [hli] + ld [$ff8d], a ; save trainer class + ld a, [hli] + ld [$ff8e], a ; save trainer number (within class) push hl - ld hl,wMapSpriteExtraData - add hl,bc - ld a,[$ff8d] - ld [hli],a ; store trainer class in byte 0 of the entry - ld a,[$ff8e] - ld [hl],a ; store trainer number in byte 1 of the entry + ld hl, wMapSpriteExtraData + add hl, bc + ld a, [$ff8d] + ld [hli], a ; store trainer class in byte 0 of the entry + ld a, [$ff8e] + ld [hl], a ; store trainer number in byte 1 of the entry pop hl ret .itemBallSprite - ld a,[hli] - ld [$ff8d],a ; save item number + ld a, [hli] + ld [$ff8d], a ; save item number push hl - ld hl,wMapSpriteExtraData - add hl,bc - ld a,[$ff8d] - ld [hli],a ; store item number in byte 0 of the entry + ld hl, wMapSpriteExtraData + add hl, bc + ld a, [$ff8d] + ld [hli], a ; store item number in byte 0 of the entry xor a - ld [hl],a ; zero byte 1, since it is not used + ld [hl], a ; zero byte 1, since it is not used pop hl ret ; end of home/overworld.asm = 10b9 (0:10b9) diff --git a/home/pikachu.asm b/home/pikachu.asm index 9e0ab541..bd750773 100755 --- a/home/pikachu.asm +++ b/home/pikachu.asm @@ -30,21 +30,21 @@ Func_152d:: ; 152d (0:152d) pop hl ret -SetPikachuAsleep:: ; 153a (0:153a) +DisablePikachuFollowingPlayer:: ; 153a (0:153a) push hl ld hl, wPikachuOverworldStateFlags set 1, [hl] pop hl ret -ResetPikachuAsleep:: ; 1542 (0:1542) +EnablePikachuFollowingPlayer:: ; 1542 (0:1542) push hl ld hl, wPikachuOverworldStateFlags res 1, [hl] pop hl ret -CheckPikachuAsleep:: ; 154a (0:154a) +CheckPikachuFollowingPlayer:: ; 154a (0:154a) push hl ld hl, wPikachuOverworldStateFlags bit 1, [hl] @@ -350,11 +350,20 @@ TX_FAR: MACRO dab \1 ENDM - +TX_VENDING_MACHINE EQUS "db $f5" TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6" -TX_POKECENTER_NURSE EQUS "db $ff" +TX_PRIZE_VENDOR EQUS "db $f7" +TX_POKECENTER_PC EQUS "db $f9" +TX_PLAYERS_PC EQUS "db $fc" +TX_BILLS_PC EQUS "db $fd" +TX_POKEMART_CLERK EQUS "db $fe" +TX_POKECENTER_NURSE EQUS "db $ff" ; Predef macro. +predef_const: MACRO + const \1PredefID + ENDM + add_predef: MACRO \1Predef:: db BANK(\1) @@ -362,7 +371,7 @@ add_predef: MACRO ENDM predef_id: MACRO - ld a, (\1Predef) ; - PredefPointers) / 3 + ld a, (\1Predef - PredefPointers) / 3 ENDM predef: MACRO @@ -374,10 +383,6 @@ predef_jump: MACRO predef_id \1 jp Predef ENDM - -predef_const: MACRO - const \1Predef - ENDM tx_pre_const: MACRO const \1_id @@ -33,7 +33,7 @@ INCLUDE "engine/overworld/oam.asm" INCLUDE "engine/print_waiting_text.asm" -INCLUDE "engine/overworld/map_sprite_functions1.asm" +INCLUDE "engine/overworld/map_sprite_functions1.asm" INCLUDE "engine/overworld/item.asm" INCLUDE "engine/overworld/movement.asm" INCLUDE "engine/cable_club.asm" @@ -271,9 +271,18 @@ INCLUDE "scripts/fuchsiacity.asm" INCLUDE "data/mapHeaders/blueshouse.asm" INCLUDE "scripts/blueshouse.asm" INCLUDE "data/mapObjects/blueshouse.asm" -BluesHouseBlocks: -INCBIN "maps/blueshouse.blk" - dr $19d05,$1a4ea +BluesHouseBlocks: INCBIN "maps/blueshouse.blk" + +INCLUDE "data/mapHeaders/vermilionhouse3.asm" +INCLUDE "scripts/vermilionhouse3.asm" +INCLUDE "data/mapObjects/vermilionhouse3.asm" +VermilionHouse3Blocks: INCBIN "maps/vermilionhouse3.blk" + +INCLUDE "data/mapHeaders/indigoplateaulobby.asm" +INCLUDE "scripts/indigoplateaulobby.asm" +INCLUDE "data/mapObjects/indigoplateaulobby.asm" +IndigoPlateauLobbyBlocks: INCBIN "maps/indigoplateaulobby.blk" + dr $19e09,$1a4ea INCLUDE "engine/overworld/npc_movement.asm" INCLUDE "engine/overworld/doors.asm" @@ -282,31 +291,30 @@ INCLUDE "engine/overworld/ledges.asm" SECTION "bank07",ROMX,BANK[$07] INCLUDE "data/mapHeaders/cinnabarisland.asm" INCLUDE "data/mapObjects/cinnabarisland.asm" -CinnabarIslandBlocks: -INCBIN "maps/cinnabarisland.blk" +CinnabarIslandBlocks: INCBIN "maps/cinnabarisland.blk" INCLUDE "data/mapHeaders/route1.asm" INCLUDE "data/mapObjects/route1.asm" -Route1Blocks: ; 1c0fc -INCBIN "maps/route1.blk" +Route1Blocks: INCBIN "maps/route1.blk" ; 1c0fc -UndergroundPathEntranceRoute8Blocks: -INCBIN "maps/undergroundpathentranceroute8.blk" -OaksLabBlocks: -INCBIN "maps/oakslab.blk" +UndergroundPathEntranceRoute8Blocks: INCBIN "maps/undergroundpathentranceroute8.blk" +OaksLabBlocks: INCBIN "maps/oakslab.blk" ViridianHouseBlocks: Route2HouseBlocks: PewterHouse1Blocks: PewterHouse2Blocks: CeruleanHouse1Blocks: -INCBIN "maps/viridianhouse.blk" +VermilionHouse1Blocks: +LavenderHouse1Blocks: +LavenderHouse2Blocks: +SaffronHouse1Blocks: +SaffronHouse2Blocks: +Route16HouseBlocks: INCBIN "maps/viridianhouse.blk" SchoolBlocks: -INCBIN "maps/school.blk" -CeruleanHouseTrashedBlocks: -INCBIN "maps/ceruleanhousetrashed.blk" +CeladonMansion5Blocks: INCBIN "maps/school.blk" +CeruleanHouseTrashedBlocks: INCBIN "maps/ceruleanhousetrashed.blk" DiglettsCaveRoute2Blocks: -DiglettsCaveEntranceRoute11Blocks: -INCBIN "maps/diglettscaveroute2.blk" +DiglettsCaveEntranceRoute11Blocks: INCBIN "maps/diglettscaveroute2.blk" INCLUDE "engine/clear_save.asm" INCLUDE "engine/predefs7.asm" @@ -322,13 +330,7 @@ INCLUDE "data/mapHeaders/viridianmart.asm" INCLUDE "scripts/viridianmart.asm" INCLUDE "data/mapObjects/viridianmart.asm" ViridianMartBlocks: -VermilionMartBlocks: -LavenderMartBlocks: -CeladonMartBlocks: -SaffronMartBlocks: -FuchsiaMartBlocks: -CinnabarMartBlocks: -INCBIN "maps/viridianmart.blk" +CeladonMartBlocks:INCBIN "maps/viridianmart.blk" INCLUDE "data/mapHeaders/school.asm" INCLUDE "scripts/school.asm" @@ -357,9 +359,42 @@ INCLUDE "data/mapObjects/ceruleanhouse1.asm" INCLUDE "data/mapHeaders/bikeshop.asm" INCLUDE "scripts/bikeshop.asm" INCLUDE "data/mapObjects/bikeshop.asm" -BikeShopBlocks: -INCBIN "maps/bikeshop.blk" - dr $1d1a4,$1d7ae ; map scripts +BikeShopBlocks: INCBIN "maps/bikeshop.blk" + +INCLUDE "data/mapHeaders/lavenderhouse1.asm" +INCLUDE "scripts/lavenderhouse1.asm" +INCLUDE "data/mapObjects/lavenderhouse1.asm" + +INCLUDE "data/mapHeaders/lavenderhouse2.asm" +INCLUDE "scripts/lavenderhouse2.asm" +INCLUDE "data/mapObjects/lavenderhouse2.asm" + dr $1d30e,$1d3f8 ; map scripts + +INCLUDE "data/mapHeaders/vermilionhouse1.asm" +INCLUDE "scripts/vermilionhouse1.asm" +INCLUDE "data/mapObjects/vermilionhouse1.asm" + +INCLUDE "data/mapHeaders/vermiliondock.asm" +INCLUDE "scripts/vermiliondock.asm" +INCLUDE "data/mapObjects/vermiliondock.asm" +VermilionDockBlocks: INCBIN "maps/vermiliondock.blk" + +INCLUDE "data/mapHeaders/celadonmansion5.asm" +INCLUDE "scripts/celadonmansion5.asm" +INCLUDE "data/mapObjects/celadonmansion5.asm" + +INCLUDE "data/mapHeaders/fuchsiamart.asm" +INCLUDE "scripts/fuchsiamart.asm" +INCLUDE "data/mapObjects/fuchsiamart.asm" +FuchsiaMartBlocks: INCBIN "maps/fuchsiamart.blk" + +INCLUDE "data/mapHeaders/saffronhouse1.asm" +INCLUDE "scripts/saffronhouse1.asm" +INCLUDE "data/mapObjects/saffronhouse1.asm" + +INCLUDE "data/mapHeaders/saffronhouse2.asm" +INCLUDE "scripts/saffronhouse2.asm" +INCLUDE "data/mapObjects/saffronhouse2.asm" INCLUDE "data/mapHeaders/diglettscaveroute2.asm" INCLUDE "scripts/diglettscaveroute2.asm" @@ -372,26 +407,22 @@ INCLUDE "data/mapObjects/route2house.asm" INCLUDE "data/mapHeaders/route5gate.asm" INCLUDE "scripts/route5gate.asm" INCLUDE "data/mapObjects/route5gate.asm" -Route5GateBlocks: ; 1d92f -INCBIN "maps/route5gate.blk" +Route5GateBlocks: INCBIN "maps/route5gate.blk" ; 1d92f INCLUDE "data/mapHeaders/route6gate.asm" INCLUDE "scripts/route6gate.asm" INCLUDE "data/mapObjects/route6gate.asm" -Route6GateBlocks: ; 1d9f2 -INCBIN "maps/route6gate.blk" +Route6GateBlocks: INCBIN "maps/route6gate.blk" ; 1d9f2 INCLUDE "data/mapHeaders/route7gate.asm" INCLUDE "scripts/route7gate.asm" INCLUDE "data/mapObjects/route7gate.asm" -Route7GateBlocks: ; 1dab9 -INCBIN "maps/route7gate.blk" +Route7GateBlocks: INCBIN "maps/route7gate.blk" ; 1dab9 INCLUDE "data/mapHeaders/route8gate.asm" INCLUDE "scripts/route8gate.asm" INCLUDE "data/mapObjects/route8gate.asm" -Route8GateBlocks: ; 1dab9 -INCBIN "maps/route8gate.blk" +Route8GateBlocks: INCBIN "maps/route8gate.blk" ; 1dab9 INCLUDE "data/mapHeaders/undergroundpathentranceroute8.asm" INCLUDE "scripts/undergroundpathentranceroute8.asm" @@ -400,13 +431,25 @@ INCLUDE "data/mapObjects/undergroundpathentranceroute8.asm" INCLUDE "data/mapHeaders/powerplant.asm" INCLUDE "scripts/powerplant.asm" INCLUDE "data/mapObjects/powerplant.asm" -PowerPlantBlocks: -INCBIN "maps/powerplant.blk" +PowerPlantBlocks: INCBIN "maps/powerplant.blk" INCLUDE "data/mapHeaders/diglettscaveroute11.asm" INCLUDE "scripts/diglettscaveroute11.asm" INCLUDE "data/mapObjects/diglettscaveroute11.asm" - dr $1def6,$1e2ae ; map scripts + +INCLUDE "data/mapHeaders/route16house.asm" +INCLUDE "scripts/route16house.asm" +INCLUDE "data/mapObjects/route16house.asm" + +INCLUDE "data/mapHeaders/route22gate.asm" +INCLUDE "scripts/route22gate.asm" +INCLUDE "data/mapObjects/route22gate.asm" +Route22GateBlocks: INCBIN "maps/route22gate.blk" + +INCLUDE "data/mapHeaders/billshouse.asm" +INCLUDE "scripts/billshouse.asm" +INCLUDE "data/mapObjects/billshouse.asm" +BillsHouseBlocks: INCBIN "maps/billshouse.blk" INCLUDE "engine/menu/oaks_pc.asm" @@ -765,8 +808,7 @@ INCLUDE "data/cries.asm" INCLUDE "engine/battle/trainer_ai.asm" INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm" -TradingAnimationGraphics: - INCBIN "gfx/game_boy.norepeat.2bpp" +TradingAnimationGraphics: INCBIN "gfx/game_boy.norepeat.2bpp" INCBIN "gfx/link_cable.2bpp" TradingAnimationGraphicsEnd: @@ -796,16 +838,8 @@ SECTION "bank11",ROMX,BANK[$11] INCLUDE "data/mapHeaders/lavendertown.asm" INCLUDE "data/mapObjects/lavendertown.asm" -LavenderTownBlocks: -INCBIN "maps/lavendertown.blk" -ViridianPokecenterBlocks: -VermilionPokecenterBlocks: -SaffronPokecenterBlocks: -LavenderPokecenterBlocks: -CeladonPokecenterBlocks: -FuchsiaPokecenterBlocks: -CinnabarPokecenterBlocks: -INCBIN "maps/viridianpokecenter.blk" +LavenderTownBlocks: INCBIN "maps/lavendertown.blk" +ViridianPokecenterBlocks: INCBIN "maps/viridianpokecenter.blk" dr $440fb,$4410b INCLUDE "scripts/lavendertown.asm" @@ -815,39 +849,185 @@ INCLUDE "engine/pokedex_rating.asm" INCLUDE "data/mapHeaders/viridianpokecenter.asm" INCLUDE "scripts/viridianpokecenter.asm" INCLUDE "data/mapObjects/viridianpokecenter.asm" - dr $442b7,$443b7 -Mansion1Script_Switches: - dr $443b7,$44571 + +INCLUDE "data/mapHeaders/celadonmart1.asm" +INCLUDE "scripts/celadonmart1.asm" +INCLUDE "data/mapObjects/celadonmart1.asm" +CeladonMart1Blocks: INCBIN "maps/celadonmart1.blk" + +INCLUDE "data/mapHeaders/mansion1.asm" +INCLUDE "scripts/mansion1.asm" +INCLUDE "data/mapObjects/mansion1.asm" +Mansion1Blocks: INCBIN "maps/mansion1.blk" INCLUDE "data/mapHeaders/rocktunnel1.asm" INCLUDE "scripts/rocktunnel1.asm" INCLUDE "data/mapObjects/rocktunnel1.asm" -RockTunnel1Blocks: -INCBIN "maps/rocktunnel1.blk" - - dr $4487e,$45077 -LoadSpinnerArrowTiles: ; 45077 (11:5077) - dr $45077,$46bf3 +RockTunnel1Blocks: INCBIN "maps/rocktunnel1.blk" + +INCLUDE "data/mapHeaders/seafoamislands1.asm" +INCLUDE "scripts/seafoamislands1.asm" +INCLUDE "data/mapObjects/seafoamislands1.asm" +SeafoamIslands1Blocks: INCBIN "maps/seafoamislands1.blk" + +INCLUDE "data/mapHeaders/ssanne3.asm" +INCLUDE "scripts/ssanne3.asm" +INCLUDE "data/mapObjects/ssanne3.asm" +SSAnne3Blocks: INCBIN "maps/ssanne3.blk" + +INCLUDE "data/mapHeaders/victoryroad3.asm" +INCLUDE "scripts/victoryroad3.asm" +INCLUDE "data/mapObjects/victoryroad3.asm" +VictoryRoad3Blocks: INCBIN "maps/victoryroad3.blk" + +INCLUDE "data/mapHeaders/rockethideout1.asm" +INCLUDE "scripts/rockethideout1.asm" +INCLUDE "data/mapObjects/rockethideout1.asm" +RocketHideout1Blocks: INCBIN "maps/rockethideout1.blk" + +INCLUDE "data/mapHeaders/rockethideout2.asm" +INCLUDE "scripts/rockethideout2.asm" +INCLUDE "data/mapObjects/rockethideout2.asm" +RocketHideout2Blocks: INCBIN "maps/rockethideout2.blk" + +INCLUDE "data/mapHeaders/rockethideout3.asm" +INCLUDE "scripts/rockethideout3.asm" +INCLUDE "data/mapObjects/rockethideout3.asm" +RocketHideout3Blocks: INCBIN "maps/rockethideout3.blk" + +INCLUDE "data/mapHeaders/rockethideout4.asm" +INCLUDE "scripts/rockethideout4.asm" +INCLUDE "data/mapObjects/rockethideout4.asm" +RocketHideout4Blocks: INCBIN "maps/rockethideout4.blk" + +INCLUDE "data/mapHeaders/rockethideoutelevator.asm" +INCLUDE "scripts/rockethideoutelevator.asm" +INCLUDE "data/mapObjects/rockethideoutelevator.asm" +RocketHideoutElevatorBlocks: INCBIN "maps/rockethideoutelevator.blk" + dr $45a08,$46578 + +INCLUDE "data/mapHeaders/seafoamislands2.asm" +INCLUDE "scripts/seafoamislands2.asm" +INCLUDE "data/mapObjects/seafoamislands2.asm" +SeafoamIslands2Blocks: INCBIN "maps/seafoamislands2.blk" + +INCLUDE "data/mapHeaders/seafoamislands3.asm" +INCLUDE "scripts/seafoamislands3.asm" +INCLUDE "data/mapObjects/seafoamislands3.asm" +SeafoamIslands3Blocks: INCBIN "maps/seafoamislands3.blk" + +INCLUDE "data/mapHeaders/seafoamislands4.asm" +INCLUDE "scripts/seafoamislands4.asm" +INCLUDE "data/mapObjects/seafoamislands4.asm" +SeafoamIslands4Blocks: INCBIN "maps/seafoamislands4.blk" + +INCLUDE "data/mapHeaders/seafoamislands5.asm" +INCLUDE "scripts/seafoamislands5.asm" +INCLUDE "data/mapObjects/seafoamislands5.asm" +SeafoamIslands5Blocks: INCBIN "maps/seafoamislands5.blk" INCLUDE "engine/overworld/dungeon_warps.asm" SECTION "bank12",ROMX,BANK[$12] INCLUDE "data/mapHeaders/route7.asm" INCLUDE "data/mapObjects/route7.asm" -Route7Blocks: ; 48051 -INCBIN "maps/route7.blk" +Route7Blocks: INCBIN "maps/route7.blk" ; 48051 MtMoonPokecenterBlocks: RockTunnelPokecenterBlocks: -INCBIN "maps/mtmoonpokecenter.blk" - dr $480c7,$480eb +CeladonPokecenterBlocks: INCBIN "maps/mtmoonpokecenter.blk" +Route11GateBlocks: +Route15GateBlocks: +Route18GateBlocks: INCBIN "maps/route11gate.blk" +Route11GateUpstairsBlocks: +Route12GateUpstairsBlocks: +Route15GateUpstairsBlocks: +Route16GateUpstairsBlocks: +Route18GateUpstairsBlocks: INCBIN "maps/route11gateupstairs.blk" INCLUDE "scripts/route7.asm" INCLUDE "data/mapHeaders/redshouse1f.asm" INCLUDE "scripts/redshouse1f.asm" INCLUDE "data/mapObjects/redshouse1f.asm" -RedsHouse1FBlocks: -INCBIN "maps/redshouse1f.blk" - dr $48157,$492a9 +RedsHouse1FBlocks: INCBIN "maps/redshouse1f.blk" + +INCLUDE "data/mapHeaders/celadonmart3.asm" +INCLUDE "scripts/celadonmart3.asm" +INCLUDE "data/mapObjects/celadonmart3.asm" +CeladonMart3Blocks: INCBIN "maps/celadonmart3.blk" + +INCLUDE "data/mapHeaders/celadonmart4.asm" +INCLUDE "scripts/celadonmart4.asm" +INCLUDE "data/mapObjects/celadonmart4.asm" +CeladonMart4Blocks: INCBIN "maps/celadonmart4.blk" + +INCLUDE "data/mapHeaders/celadonmartroof.asm" +INCLUDE "scripts/celadonmartroof.asm" +INCLUDE "data/mapObjects/celadonmartroof.asm" +CeladonMartRoofBlocks: INCBIN "maps/celadonmartroof.blk" + +INCLUDE "data/mapHeaders/celadonmartelevator.asm" +INCLUDE "scripts/celadonmartelevator.asm" +INCLUDE "data/mapObjects/celadonmartelevator.asm" +CeladonMartElevatorBlocks: INCBIN "maps/celadonmartelevator.blk" + +INCLUDE "data/mapHeaders/celadonmansion1.asm" +INCLUDE "scripts/celadonmansion1.asm" +INCLUDE "data/mapObjects/celadonmansion1.asm" +CeladonMansion1Blocks: INCBIN "maps/celadonmansion1.blk" + +INCLUDE "data/mapHeaders/celadonmansion2.asm" +INCLUDE "scripts/celadonmansion2.asm" +INCLUDE "data/mapObjects/celadonmansion2.asm" +CeladonMansion2Blocks: INCBIN "maps/celadonmansion2.blk" + +INCLUDE "data/mapHeaders/celadonmansion3.asm" +INCLUDE "scripts/celadonmansion3.asm" +INCLUDE "data/mapObjects/celadonmansion3.asm" +CeladonMansion3Blocks: INCBIN "maps/celadonmansion3.blk" + +INCLUDE "data/mapHeaders/celadonmansion4.asm" +INCLUDE "scripts/celadonmansion4.asm" +INCLUDE "data/mapObjects/celadonmansion4.asm" +CeladonMansion4Blocks: INCBIN "maps/celadonmansion4.blk" + +INCLUDE "data/mapHeaders/celadonpokecenter.asm" +INCLUDE "scripts/celadonpokecenter.asm" +INCLUDE "data/mapObjects/celadonpokecenter.asm" + +INCLUDE "data/mapHeaders/celadongym.asm" +INCLUDE "scripts/celadongym.asm" +INCLUDE "data/mapObjects/celadongym.asm" +CeladonGymBlocks: INCBIN "maps/celadongym.blk" + +INCLUDE "data/mapHeaders/celadongamecorner.asm" +INCLUDE "scripts/celadongamecorner.asm" +INCLUDE "data/mapObjects/celadongamecorner.asm" +CeladonGameCornerBlocks: INCBIN "maps/celadongamecorner.blk" + +INCLUDE "data/mapHeaders/celadonmart5.asm" +INCLUDE "scripts/celadonmart5.asm" +INCLUDE "data/mapObjects/celadonmart5.asm" +CeladonMart5Blocks: INCBIN "maps/celadonmart5.blk" + +INCLUDE "data/mapHeaders/celadonprizeroom.asm" +INCLUDE "scripts/celadonprizeroom.asm" +INCLUDE "data/mapObjects/celadonprizeroom.asm" +CeladonPrizeRoomBlocks: INCBIN "maps/celadonprizeroom.blk" + +INCLUDE "data/mapHeaders/celadondiner.asm" +INCLUDE "scripts/celadondiner.asm" +INCLUDE "data/mapObjects/celadondiner.asm" +CeladonDinerBlocks: INCBIN "maps/celadondiner.blk" + +INCLUDE "data/mapHeaders/celadonhouse.asm" +INCLUDE "scripts/celadonhouse.asm" +INCLUDE "data/mapObjects/celadonhouse.asm" +CeladonHouseBlocks: INCBIN "maps/celadonhouse.blk" + +INCLUDE "data/mapHeaders/celadonhotel.asm" +INCLUDE "scripts/celadonhotel.asm" +INCLUDE "data/mapObjects/celadonhotel.asm" +CeladonHotelBlocks: INCBIN "maps/celadonhotel.blk" INCLUDE "data/mapHeaders/mtmoonpokecenter.asm" INCLUDE "scripts/mtmoonpokecenter.asm" @@ -857,19 +1037,57 @@ INCLUDE "data/mapHeaders/rocktunnelpokecenter.asm" INCLUDE "scripts/rocktunnelpokecenter.asm" INCLUDE "data/mapObjects/rocktunnelpokecenter.asm" - dr $49396,$49953 +INCLUDE "data/mapHeaders/route11gate.asm" +INCLUDE "scripts/route11gate.asm" +INCLUDE "data/mapObjects/route11gate.asm" + +INCLUDE "data/mapHeaders/route11gateupstairs.asm" +INCLUDE "scripts/route11gateupstairs.asm" +INCLUDE "data/mapObjects/route11gateupstairs.asm" + +INCLUDE "data/mapHeaders/route12gate.asm" +INCLUDE "scripts/route12gate.asm" +INCLUDE "data/mapObjects/route12gate.asm" +Route12GateBlocks: INCBIN "maps/route12gate.blk" + +INCLUDE "data/mapHeaders/route12gateupstairs.asm" +INCLUDE "scripts/route12gateupstairs.asm" +INCLUDE "data/mapObjects/route12gateupstairs.asm" + +INCLUDE "data/mapHeaders/route15gate.asm" +INCLUDE "scripts/route15gate.asm" +INCLUDE "data/mapObjects/route15gate.asm" + +INCLUDE "data/mapHeaders/route15gateupstairs.asm" +INCLUDE "scripts/route15gateupstairs.asm" +INCLUDE "data/mapObjects/route15gateupstairs.asm" + +INCLUDE "data/mapHeaders/route16gate.asm" +INCLUDE "scripts/route16gate.asm" +INCLUDE "data/mapObjects/route16gate.asm" +Route16GateBlocks: INCBIN "maps/route16gate.blk" + +INCLUDE "data/mapHeaders/route16gateupstairs.asm" +INCLUDE "scripts/route16gateupstairs.asm" +INCLUDE "data/mapObjects/route16gateupstairs.asm" + +INCLUDE "data/mapHeaders/route18gate.asm" +INCLUDE "scripts/route18gate.asm" +INCLUDE "data/mapObjects/route18gate.asm" + +INCLUDE "data/mapHeaders/route18gateupstairs.asm" +INCLUDE "scripts/route18gateupstairs.asm" +INCLUDE "data/mapObjects/route18gateupstairs.asm" INCLUDE "data/mapHeaders/mtmoon1.asm" INCLUDE "scripts/mtmoon1.asm" INCLUDE "data/mapObjects/mtmoon1.asm" -MtMoon1Blocks: -INCBIN "maps/mtmoon1.blk" +MtMoon1Blocks: INCBIN "maps/mtmoon1.blk" INCLUDE "data/mapHeaders/mtmoon3.asm" INCLUDE "scripts/mtmoon3.asm" INCLUDE "data/mapObjects/mtmoon3.asm" -MtMoon3Blocks: -INCBIN "maps/mtmoon3.blk" +MtMoon3Blocks: INCBIN "maps/mtmoon3.blk" MtMoon3Script_4a325: ; pikachu-related function? ld a, [wd472] @@ -959,55 +1177,46 @@ JessieJamesPic: INCBIN "pic/ytrainer/jessiejames.pic" INCLUDE "data/mapHeaders/tradecenter.asm" INCLUDE "scripts/tradecenter.asm" INCLUDE "data/mapObjects/tradecenter.asm" -TradeCenterBlocks: -INCBIN "maps/tradecenter.blk" +TradeCenterBlocks: INCBIN "maps/tradecenter.blk" ; 4fee6 (13:7ee6) INCLUDE "data/mapHeaders/colosseum.asm" INCLUDE "scripts/colosseum.asm" INCLUDE "data/mapObjects/colosseum.asm" -ColosseumBlocks: -INCBIN "maps/colosseum.blk" +ColosseumBlocks: INCBIN "maps/colosseum.blk" SECTION "bank14",ROMX,BANK[$14] INCLUDE "data/mapHeaders/route22.asm" INCLUDE "data/mapObjects/route22.asm" -Route22Blocks: -INCBIN "maps/route22.blk" +Route22Blocks: INCBIN "maps/route22.blk" INCLUDE "data/mapHeaders/route20.asm" INCLUDE "data/mapObjects/route20.asm" -Route20Blocks: -INCBIN "maps/route20.blk" +Route20Blocks: INCBIN "maps/route20.blk" INCLUDE "data/mapHeaders/route23.asm" INCLUDE "data/mapObjects/route23.asm" -Route23Blocks: -INCBIN "maps/route23.blk" +Route23Blocks: INCBIN "maps/route23.blk" INCLUDE "data/mapHeaders/route24.asm" INCLUDE "data/mapObjects/route24.asm" -Route24Blocks: ; 506ed (14:46ed) -INCBIN "maps/route24.blk" +Route24Blocks: INCBIN "maps/route24.blk" ; 506ed (14:46ed) INCLUDE "data/mapHeaders/route25.asm" INCLUDE "data/mapObjects/route25.asm" -Route25Blocks: ; 50816 (14:4816) -INCBIN "maps/route25.blk" +Route25Blocks: INCBIN "maps/route25.blk" ; 50816 (14:4816) ; indigoplateau INCLUDE "data/mapHeaders/indigoplateau.asm" INCLUDE "scripts/indigoplateau.asm" INCLUDE "data/mapObjects/indigoplateau.asm" -IndigoPlateauBlocks: ; 50950 (14:4950) -INCBIN "maps/indigoplateau.blk" +IndigoPlateauBlocks: INCBIN "maps/indigoplateau.blk" ; 50950 (14:4950) INCLUDE "data/mapHeaders/saffroncity.asm" INCLUDE "data/mapObjects/saffroncity.asm" -SaffronCityBlocks: ; 50a98 (14:4a98) -INCBIN "maps/saffroncity.blk" +SaffronCityBlocks: INCBIN "maps/saffroncity.blk" ; 50a98 (14:4a98) INCLUDE "scripts/saffroncity.asm" INCLUDE "scripts/route20.asm" INCLUDE "scripts/route22.asm" @@ -1015,14 +1224,15 @@ INCLUDE "scripts/route23.asm" INCLUDE "scripts/route24.asm" INCLUDE "scripts/route25.asm" -; victoryroad2 - dr $517cc,$51a78 +INCLUDE "data/mapHeaders/victoryroad2.asm" +INCLUDE "scripts/victoryroad2.asm" +INCLUDE "data/mapObjects/victoryroad2.asm" +VictoryRoad2Blocks: INCBIN "maps/victoryroad2.blk" INCLUDE "data/mapHeaders/mtmoon2.asm" INCLUDE "scripts/mtmoon2.asm" INCLUDE "data/mapObjects/mtmoon2.asm" -MtMoon2Blocks: -INCBIN "maps/mtmoon2.blk" +MtMoon2Blocks: INCBIN "maps/mtmoon2.blk" dr $51b97,$52060 Mansion2Script_Switches: @@ -1040,56 +1250,48 @@ INCLUDE "engine/hidden_object_functions14.asm" SECTION "bank15",ROMX,BANK[$15] INCLUDE "data/mapHeaders/route2.asm" INCLUDE "data/mapObjects/route2.asm" -Route2Blocks: ; 54086 -INCBIN "maps/route2.blk" +Route2Blocks: INCBIN "maps/route2.blk" ; 54086 INCLUDE "data/mapHeaders/route3.asm" INCLUDE "data/mapObjects/route3.asm" -Route3Blocks: ; 5425d -INCBIN "maps/route3.blk" +Route3Blocks: INCBIN "maps/route3.blk" ; 5425d INCLUDE "data/mapHeaders/route4.asm" INCLUDE "data/mapObjects/route4.asm" -Route4Blocks: ; 543f4 -INCBIN "maps/route4.blk" +Route4Blocks: INCBIN "maps/route4.blk" ; 543f4 INCLUDE "data/mapHeaders/route5.asm" INCLUDE "data/mapObjects/route5.asm" -Route5Blocks: ; 545da -INCBIN "maps/route5.blk" +Route5Blocks: INCBIN "maps/route5.blk" ; 545da INCLUDE "data/mapHeaders/route9.asm" INCLUDE "data/mapObjects/route9.asm" -Route9Blocks: ; 54706 -INCBIN "maps/route9.blk" +Route9Blocks: INCBIN "maps/route9.blk" ; 54706 INCLUDE "data/mapHeaders/route13.asm" INCLUDE "data/mapObjects/route13.asm" -Route13Blocks: -INCBIN "maps/route13.blk" +Route13Blocks: INCBIN "maps/route13.blk" INCLUDE "data/mapHeaders/route14.asm" INCLUDE "data/mapObjects/route14.asm" -Route14Blocks: -INCBIN "maps/route14.blk" +Route14Blocks: INCBIN "maps/route14.blk" INCLUDE "data/mapHeaders/route17.asm" INCLUDE "data/mapObjects/route17.asm" -Route17Blocks: -INCBIN "maps/route17.blk" +Route17Blocks: INCBIN "maps/route17.blk" INCLUDE "data/mapHeaders/route19.asm" INCLUDE "data/mapObjects/route19.asm" -Route19Blocks: -INCBIN "maps/route19.blk" +Route19Blocks: INCBIN "maps/route19.blk" + INCLUDE "data/mapHeaders/route21.asm" INCLUDE "data/mapObjects/route21.asm" -Route21Blocks: ; 5507d -INCBIN "maps/route21.blk" +Route21Blocks: INCBIN "maps/route21.blk" ; 5507d DayCareMBlocks: -INCBIN "maps/daycarem.blk" - dr $5524f,$5525f +VermilionHouse2Blocks: +Route12HouseBlocks: INCBIN "maps/daycarem.blk" +FuchsiaHouse3Blocks: INCBIN "maps/fuchsiahouse3.blk" INCLUDE "engine/battle/experience.asm" @@ -1104,13 +1306,27 @@ INCLUDE "scripts/route17.asm" INCLUDE "scripts/route19.asm" INCLUDE "scripts/route21.asm" -; vermilion house 2 - dr $56054,$56233 +INCLUDE "data/mapHeaders/vermilionhouse2.asm" +INCLUDE "scripts/vermilionhouse2.asm" +INCLUDE "data/mapObjects/vermilionhouse2.asm" + +INCLUDE "data/mapHeaders/celadonmart2.asm" +INCLUDE "scripts/celadonmart2.asm" +INCLUDE "data/mapObjects/celadonmart2.asm" +CeladonMart2Blocks: INCBIN "maps/celadonmart2.blk" + +INCLUDE "data/mapHeaders/fuchsiahouse3.asm" +INCLUDE "scripts/fuchsiahouse3.asm" +INCLUDE "data/mapObjects/fuchsiahouse3.asm" INCLUDE "data/mapHeaders/daycarem.asm" INCLUDE "scripts/daycarem.asm" INCLUDE "data/mapObjects/daycarem.asm" - dr $564a5,$56714 + +INCLUDE "data/mapHeaders/route12house.asm" +INCLUDE "scripts/route12house.asm" +INCLUDE "data/mapObjects/route12house.asm" + dr $5652a,$56714 INCLUDE "engine/menu/diploma_1.asm" @@ -1121,43 +1337,35 @@ SECTION "bank16",ROMX,BANK[$16] INCLUDE "data/mapHeaders/route6.asm" INCLUDE "data/mapObjects/route6.asm" -Route6Blocks: ; 58079 -INCBIN "maps/route6.blk" +Route6Blocks: INCBIN "maps/route6.blk" ; 58079 INCLUDE "data/mapHeaders/route8.asm" INCLUDE "data/mapObjects/route8.asm" -Route8Blocks: ; 581c6 -INCBIN "maps/route8.blk" +Route8Blocks: INCBIN "maps/route8.blk" ; 581c6 INCLUDE "data/mapHeaders/route10.asm" INCLUDE "data/mapObjects/route10.asm" -Route10Blocks: -INCBIN "maps/route10.blk" +Route10Blocks: INCBIN "maps/route10.blk" INCLUDE "data/mapHeaders/route11.asm" INCLUDE "data/mapObjects/route11.asm" -Route11Blocks: ; 5855f -INCBIN "maps/route11.blk" +Route11Blocks: INCBIN "maps/route11.blk" ; 5855f INCLUDE "data/mapHeaders/route12.asm" INCLUDE "data/mapObjects/route12.asm" -Route12Blocks: -INCBIN "maps/route12.blk" +Route12Blocks: INCBIN "maps/route12.blk" INCLUDE "data/mapHeaders/route15.asm" INCLUDE "data/mapObjects/route15.asm" -Route15Blocks: -INCBIN "maps/route15.blk" +Route15Blocks: INCBIN "maps/route15.blk" INCLUDE "data/mapHeaders/route16.asm" INCLUDE "data/mapObjects/route16.asm" -Route16Blocks: ; 58b84 -INCBIN "maps/route16.blk" +Route16Blocks: INCBIN "maps/route16.blk" ; 58b84 INCLUDE "data/mapHeaders/route18.asm" INCLUDE "data/mapObjects/route18.asm" -Route18Blocks: -INCBIN "maps/route18.blk" +Route18Blocks: INCBIN "maps/route18.blk" dr $58d7d,$58d99 INCLUDE "engine/experience.asm" @@ -1174,37 +1382,52 @@ INCLUDE "scripts/route12.asm" INCLUDE "scripts/route15.asm" INCLUDE "scripts/route16.asm" INCLUDE "scripts/route18.asm" - dr $59a00,$5a53a - + +INCLUDE "data/mapHeaders/fanclub.asm" +INCLUDE "scripts/fanclub.asm" +INCLUDE "data/mapObjects/fanclub.asm" +FanClubBlocks: INCBIN "maps/fanclub.blk" + dr $59c80,$5a23d + +INCLUDE "data/mapHeaders/lance.asm" +INCLUDE "scripts/lance.asm" +INCLUDE "data/mapObjects/lance.asm" +LanceBlocks: INCBIN "maps/lance.blk" + +INCLUDE "data/mapHeaders/halloffameroom.asm" +INCLUDE "scripts/halloffameroom.asm" +INCLUDE "data/mapObjects/halloffameroom.asm" +HallofFameRoomBlocks: INCBIN "maps/halloffameroom.blk" + INCLUDE "engine/overworld/saffron_guards.asm" SECTION "bank17",ROMX,BANK[$17] CeruleanMartBlocks: -INCBIN "maps/ceruleanmart.blk" +VermilionMartBlocks: +LavenderMartBlocks: +SaffronMartBlocks: INCBIN "maps/ceruleanmart.blk" RedsHouse2FBlocks: -INCBIN "maps/redshouse2f.blk" -Museum1FBlocks: -INCBIN "maps/museum1f.blk" -Museum2FBlocks: -INCBIN "maps/museum2f.blk" +CopycatsHouse2FBlocks: INCBIN "maps/redshouse2f.blk" +Museum1FBlocks: INCBIN "maps/museum1f.blk" +Museum2FBlocks: INCBIN "maps/museum2f.blk" PewterPokecenterBlocks: -INCBIN "maps/pewterpokecenter.blk" +VermilionPokecenterBlocks: +LavenderPokecenterBlocks: +SaffronPokecenterBlocks: INCBIN "maps/pewterpokecenter.blk" UndergroundPathEntranceRoute5Blocks: UndergroundPathEntranceRoute6Blocks: UndergroundPathEntranceRoute7Blocks: -UndergroundPathEntranceRoute7CopyBlocks: -INCBIN "maps/undergroundpathentranceroute5.blk" +UndergroundPathEntranceRoute7CopyBlocks: INCBIN "maps/undergroundpathentranceroute5.blk" ViridianForestEntranceBlocks: ViridianForestExitBlocks: -Route2GateBlocks: -INCBIN "maps/viridianforestentrance.blk" +Route2GateBlocks: INCBIN "maps/viridianforestentrance.blk" INCLUDE "data/mapHeaders/redshouse2f.asm" INCLUDE "scripts/redshouse2f.asm" INCLUDE "data/mapObjects/redshouse2f.asm" -Func_5c0d4: +StarterDex: ld a, %01001011 ld [wPokedexOwned], a predef ShowPokedexData @@ -1223,8 +1446,7 @@ INCLUDE "data/mapObjects/museum2f.asm" INCLUDE "data/mapHeaders/pewtergym.asm" INCLUDE "scripts/pewtergym.asm" INCLUDE "data/mapObjects/pewtergym.asm" -PewterGymBlocks: -INCBIN "maps/pewtergym.blk" +PewterGymBlocks: INCBIN "maps/pewtergym.blk" INCLUDE "data/mapHeaders/pewterpokecenter.asm" INCLUDE "scripts/pewterpokecenter.asm" @@ -1233,20 +1455,64 @@ INCLUDE "data/mapObjects/pewterpokecenter.asm" INCLUDE "data/mapHeaders/ceruleanpokecenter.asm" INCLUDE "scripts/ceruleanpokecenter.asm" INCLUDE "data/mapObjects/ceruleanpokecenter.asm" -CeruleanPokecenterBlocks: -INCBIN "maps/ceruleanpokecenter.blk" +CeruleanPokecenterBlocks: INCBIN "maps/ceruleanpokecenter.blk" INCLUDE "data/mapHeaders/ceruleangym.asm" INCLUDE "scripts/ceruleangym.asm" INCLUDE "data/mapObjects/ceruleangym.asm" -CeruleanGymBlocks: -INCBIN "maps/ceruleangym.blk" +CeruleanGymBlocks: INCBIN "maps/ceruleangym.blk" INCLUDE "data/mapHeaders/ceruleanmart.asm" INCLUDE "scripts/ceruleanmart.asm" INCLUDE "data/mapObjects/ceruleanmart.asm" - dr $5c79c,$5d485 +INCLUDE "data/mapHeaders/lavenderpokecenter.asm" +INCLUDE "scripts/lavenderpokecenter.asm" +INCLUDE "data/mapObjects/lavenderpokecenter.asm" + +INCLUDE "data/mapHeaders/lavendermart.asm" +INCLUDE "scripts/lavendermart.asm" +INCLUDE "data/mapObjects/lavendermart.asm" + +INCLUDE "data/mapHeaders/vermilionpokecenter.asm" +INCLUDE "scripts/vermilionpokecenter.asm" +INCLUDE "data/mapObjects/vermilionpokecenter.asm" + +INCLUDE "data/mapHeaders/vermilionmart.asm" +INCLUDE "scripts/vermilionmart.asm" +INCLUDE "data/mapObjects/vermilionmart.asm" + +INCLUDE "data/mapHeaders/vermiliongym.asm" +INCLUDE "scripts/vermiliongym.asm" +INCLUDE "data/mapObjects/vermiliongym.asm" +VermilionGymBlocks: INCBIN "maps/vermiliongym.blk" + +INCLUDE "data/mapHeaders/copycatshouse2f.asm" +INCLUDE "scripts/copycatshouse2f.asm" +INCLUDE "data/mapObjects/copycatshouse2f.asm" + +INCLUDE "data/mapHeaders/fightingdojo.asm" +INCLUDE "scripts/fightingdojo.asm" +INCLUDE "data/mapObjects/fightingdojo.asm" +FightingDojoBlocks: INCBIN "maps/fightingdojo.blk" + +INCLUDE "data/mapHeaders/saffrongym.asm" +INCLUDE "scripts/saffrongym.asm" +INCLUDE "data/mapObjects/saffrongym.asm" +SaffronGymBlocks: INCBIN "maps/saffrongym.blk" + +INCLUDE "data/mapHeaders/saffronmart.asm" +INCLUDE "scripts/saffronmart.asm" +INCLUDE "data/mapObjects/saffronmart.asm" + +INCLUDE "data/mapHeaders/silphco1.asm" +INCLUDE "scripts/silphco1.asm" +INCLUDE "data/mapObjects/silphco1.asm" +SilphCo1Blocks: INCBIN "maps/silphco1.blk" + +INCLUDE "data/mapHeaders/saffronpokecenter.asm" +INCLUDE "scripts/saffronpokecenter.asm" +INCLUDE "data/mapObjects/saffronpokecenter.asm" INCLUDE "data/mapHeaders/viridianforestexit.asm" INCLUDE "scripts/viridianforestexit.asm" @@ -1275,35 +1541,181 @@ INCLUDE "data/mapObjects/undergroundpathentranceroute7.asm" INCLUDE "data/mapHeaders/undergroundpathentranceroute7copy.asm" INCLUDE "scripts/undergroundpathentranceroute7copy.asm" INCLUDE "data/mapObjects/undergroundpathentranceroute7copy.asm" + dr $5d6ba,$5d909 - dr $5d6ba,$5da70 +INCLUDE "data/mapHeaders/victoryroad1.asm" +INCLUDE "scripts/victoryroad1.asm" +INCLUDE "data/mapObjects/victoryroad1.asm" +VictoryRoad1Blocks: INCBIN "maps/victoryroad1.blk" INCLUDE "engine/evolution.asm" - dr $5db93,$5dbae +SetPartyMonTypes:: + call GetPredefRegisters + ld bc, 5 + add hl, bc + ld a, [wd11e] + ld [wd0b5], a + push hl + call GetMonHeader + pop hl + ld a, [wMonHType1] + ld [hli], a + ld a, [wMonHType2] + ld [hl], a + ret INCLUDE "engine/hidden_object_functions17.asm" SECTION "bank18",ROMX,BANK[$18] -ViridianForestBlocks: -INCBIN "maps/viridianforest.blk" - dr $60198,$610ed +ViridianForestBlocks: INCBIN "maps/viridianforest.blk" +UndergroundPathNSBlocks: INCBIN "maps/undergroundpathns.blk" +UndergroundPathWEBlocks: INCBIN "maps/undergroundpathwe.blk" + dr $60258,$603c0 + +SSAnne9Blocks: +SSAnne10Blocks: INCBIN "maps/ssanne9.blk" + +INCLUDE "data/mapHeaders/pokemontower1.asm" +INCLUDE "scripts/pokemontower1.asm" +INCLUDE "data/mapObjects/pokemontower1.asm" +PokemonTower1Blocks: INCBIN "maps/pokemontower1.blk" + +INCLUDE "data/mapHeaders/pokemontower2.asm" +INCLUDE "scripts/pokemontower2.asm" +INCLUDE "data/mapObjects/pokemontower2.asm" +PokemonTower2Blocks: INCBIN "maps/pokemontower2.blk" + +INCLUDE "data/mapHeaders/pokemontower3.asm" +INCLUDE "scripts/pokemontower3.asm" +INCLUDE "data/mapObjects/pokemontower3.asm" +PokemonTower3Blocks: INCBIN "maps/pokemontower3.blk" + +INCLUDE "data/mapHeaders/pokemontower4.asm" +INCLUDE "scripts/pokemontower4.asm" +INCLUDE "data/mapObjects/pokemontower4.asm" +PokemonTower4Blocks: INCBIN "maps/pokemontower4.blk" + +INCLUDE "data/mapHeaders/pokemontower5.asm" +INCLUDE "scripts/pokemontower5.asm" +INCLUDE "data/mapObjects/pokemontower5.asm" +PokemonTower5Blocks: INCBIN "maps/pokemontower5.blk" + +INCLUDE "data/mapHeaders/pokemontower6.asm" +INCLUDE "scripts/pokemontower6.asm" +INCLUDE "data/mapObjects/pokemontower6.asm" +PokemonTower6Blocks: INCBIN "maps/pokemontower6.blk" + +INCBIN "maps/unusedblocks60cef.blk" + +INCLUDE "data/mapHeaders/pokemontower7.asm" +INCLUDE "scripts/pokemontower7.asm" +INCLUDE "data/mapObjects/pokemontower7.asm" +PokemonTower7Blocks: INCBIN "maps/pokemontower7.blk" + +INCLUDE "engine/overworld/cinnabar_lab.asm" INCLUDE "data/mapHeaders/viridianforest.asm" INCLUDE "scripts/viridianforest.asm" INCLUDE "data/mapObjects/viridianforest.asm" - dr $612a4,$625e8 + +INCLUDE "data/mapHeaders/ssanne1.asm" +INCLUDE "scripts/ssanne1.asm" +INCLUDE "data/mapObjects/ssanne1.asm" +SSAnne1Blocks: INCBIN "maps/ssanne1.blk" + +INCLUDE "data/mapHeaders/ssanne2.asm" +INCLUDE "scripts/ssanne2.asm" +INCLUDE "data/mapObjects/ssanne2.asm" +SSAnne2Blocks: INCBIN "maps/ssanne2.blk" + +INCLUDE "data/mapHeaders/ssanne4.asm" +INCLUDE "scripts/ssanne4.asm" +INCLUDE "data/mapObjects/ssanne4.asm" +SSAnne4Blocks: INCBIN "maps/ssanne4.blk" + +INCLUDE "data/mapHeaders/ssanne5.asm" +INCLUDE "scripts/ssanne5.asm" +INCLUDE "data/mapObjects/ssanne5.asm" +SSAnne5Blocks: INCBIN "maps/ssanne5.blk" + +INCLUDE "data/mapHeaders/ssanne6.asm" +INCLUDE "scripts/ssanne6.asm" +INCLUDE "data/mapObjects/ssanne6.asm" +SSAnne6Blocks: INCBIN "maps/ssanne6.blk" + +INCLUDE "data/mapHeaders/ssanne7.asm" +INCLUDE "scripts/ssanne7.asm" +INCLUDE "data/mapObjects/ssanne7.asm" +SSAnne7Blocks: INCBIN "maps/ssanne7.blk" + +INCLUDE "data/mapHeaders/ssanne8.asm" +INCLUDE "scripts/ssanne8.asm" +INCLUDE "data/mapObjects/ssanne8.asm" +SSAnne8Blocks: INCBIN "maps/ssanne8.blk" + +INCLUDE "data/mapHeaders/ssanne9.asm" +INCLUDE "scripts/ssanne9.asm" +INCLUDE "data/mapObjects/ssanne9.asm" + +INCLUDE "data/mapHeaders/ssanne10.asm" +INCLUDE "scripts/ssanne10.asm" +INCLUDE "data/mapObjects/ssanne10.asm" + +INCLUDE "data/mapHeaders/undergroundpathns.asm" +INCLUDE "scripts/undergroundpathns.asm" +INCLUDE "data/mapObjects/undergroundpathns.asm" + +INCLUDE "data/mapHeaders/undergroundpathwe.asm" +INCLUDE "scripts/undergroundpathwe.asm" +INCLUDE "data/mapObjects/undergroundpathwe.asm" + +INCLUDE "data/mapHeaders/diglettscave.asm" +INCLUDE "scripts/diglettscave.asm" +INCLUDE "data/mapObjects/diglettscave.asm" +DiglettsCaveBlocks: INCBIN "maps/diglettscave.blk" + dr $62105,$625e8 + INCLUDE "engine/hidden_object_functions18.asm" SECTION "bank19",ROMX,BANK[$19] -Overworld_GFX: - dr $64000,$68000 - +Overworld_GFX: INCBIN "gfx/tilesets/overworld.2bpp" +Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" +RedsHouse1_GFX: +RedsHouse2_GFX: INCBIN "gfx/tilesets/redshouse2.t7.2bpp" +RedsHouse1_Block: +RedsHouse2_Block: INCBIN "gfx/blocksets/redshouse2.bst" +House_GFX: INCBIN "gfx/tilesets/house.t2.2bpp" +House_Block: INCBIN "gfx/blocksets/house.bst" +Mansion_GFX: INCBIN "gfx/tilesets/mansion.t2.2bpp" +Mansion_Block: INCBIN "gfx/blocksets/mansion.bst" +ShipPort_GFX: INCBIN "gfx/tilesets/shipport.t2.2bpp" +ShipPort_Block: INCBIN "gfx/blocksets/shipport.bst" +Interior_GFX: INCBIN "gfx/tilesets/interior.t1.2bpp" +Interior_Block: INCBIN "gfx/blocksets/interior.bst" +Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp" +Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" SECTION "bank1A",ROMX,BANK[$1A] - - dr $68000,$6bff1 - + dr $68000,$68040 +Dojo_GFX: +Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp" +Dojo_Block: +Gym_Block: INCBIN "gfx/blocksets/gym.bst" +Mart_GFX: +Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.2bpp" +Mart_Block: +Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst" +ForestGate_GFX: +Gate_GFX: +Museum_GFX: INCBIN "gfx/tilesets/museum.t1.2bpp" +ForestGate_Block: +Gate_Block: +Museum_Block: INCBIN "gfx/blocksets/museum.bst" +Forest_GFX: INCBIN "gfx/tilesets/forest.2bpp" +Forest_Block: INCBIN "gfx/blocksets/forest.bst" +Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp" +Facility_Block: INCBIN "gfx/blocksets/facility.bst" SECTION "bank1B",ROMX,BANK[$1B] Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp" @@ -1321,7 +1733,6 @@ Club_Block: INCBIN "gfx/blocksets/club.bst" Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp" Underground_Block: INCBIN "gfx/blocksets/underground.bst" - SECTION "bank1C",ROMX,BANK[$1C] INCLUDE "engine/gamefreak.asm" @@ -1339,11 +1750,13 @@ INCLUDE "engine/save.asm" SECTION "bank1D",ROMX,BANK[$1D] - dr $74000,$74010 - +CopycatsHouse1FBlocks: INCBIN "maps/copycatshouse1f.blk" PewterMartBlocks: -INCBIN "maps/pewtermart.blk" - dr $74020,$7405c +CinnabarMartBlocks: INCBIN "maps/pewtermart.blk" +FuchsiaHouse1Blocks: INCBIN "maps/fuchsiahouse1.blk" +FuchsiaPokecenterBlocks: +CinnabarPokecenterBlocks: INCBIN "maps/fuchsiapokecenter.blk" + dr $7404c,$7405c INCLUDE "engine/items/itemfinder.asm" INCLUDE "scripts/ceruleancity2.asm" @@ -1351,8 +1764,7 @@ INCLUDE "scripts/ceruleancity2.asm" INCLUDE "data/mapHeaders/viridiangym.asm" INCLUDE "scripts/viridiangym.asm" INCLUDE "data/mapObjects/viridiangym.asm" -ViridianGymBlocks: -INCBIN "maps/viridiangym.blk" +ViridianGymBlocks: INCBIN "maps/viridiangym.blk" INCLUDE "data/mapHeaders/pewtermart.asm" INCLUDE "scripts/pewtermart.asm" @@ -1362,8 +1774,96 @@ INCLUDE "data/mapObjects/pewtermart.asm" INCLUDE "engine/menu/vending_machine.asm" - dr $74851,$75dfe - +INCLUDE "data/mapHeaders/fuchsiahouse1.asm" +INCLUDE "scripts/fuchsiahouse1.asm" +INCLUDE "data/mapObjects/fuchsiahouse1.asm" + +INCLUDE "data/mapHeaders/fuchsiapokecenter.asm" +INCLUDE "scripts/fuchsiapokecenter.asm" +INCLUDE "data/mapObjects/fuchsiapokecenter.asm" + +INCLUDE "data/mapHeaders/fuchsiahouse2.asm" +INCLUDE "scripts/fuchsiahouse2.asm" +INCLUDE "data/mapObjects/fuchsiahouse2.asm" +FuchsiaHouse2Blocks: INCBIN "maps/fuchsiahouse2.blk" + +INCLUDE "data/mapHeaders/safarizoneentrance.asm" +INCLUDE "data/mapObjects/safarizoneentrance.asm" +SafariZoneEntranceBlocks: INCBIN "maps/safarizoneentrance.blk" +INCLUDE "scripts/safarizoneentrance.asm" + +INCLUDE "data/mapHeaders/fuchsiagym.asm" +INCLUDE "scripts/fuchsiagym.asm" +INCLUDE "data/mapObjects/fuchsiagym.asm" +FuchsiaGymBlocks: INCBIN "maps/fuchsiagym.blk" + +INCLUDE "data/mapHeaders/fuchsiameetingroom.asm" +INCLUDE "scripts/fuchsiameetingroom.asm" +INCLUDE "data/mapObjects/fuchsiameetingroom.asm" +FuchsiaMeetingRoomBlocks: INCBIN "maps/fuchsiameetingroom.blk" + +INCLUDE "data/mapHeaders/cinnabargym.asm" +INCLUDE "scripts/cinnabargym.asm" +INCLUDE "data/mapObjects/cinnabargym.asm" +CinnabarGymBlocks: INCBIN "maps/cinnabargym.blk" + +CinnabarGymScript_753de: + callab Func_f2150 + jp TextScriptEnd + +CinnabarGymScript_753e9: + push hl + ld hl, wd475 + bit 7, [hl] + res 7, [hl] + pop hl + ret + +CinnabarGymScript_753f3: + push hl + ld hl, wd475 + bit 7, [hl] + pop hl + ret + +INCLUDE "data/mapHeaders/lab1.asm" +INCLUDE "scripts/lab1.asm" +INCLUDE "data/mapObjects/lab1.asm" +Lab1Blocks: INCBIN "maps/lab1.blk" + +INCLUDE "data/mapHeaders/lab2.asm" +INCLUDE "scripts/lab2.asm" +INCLUDE "data/mapObjects/lab2.asm" +Lab2Blocks: INCBIN "maps/lab2.blk" + +INCLUDE "data/mapHeaders/lab3.asm" +INCLUDE "scripts/lab3.asm" +INCLUDE "data/mapObjects/lab3.asm" +Lab3Blocks: INCBIN "maps/lab3.blk" + +INCLUDE "data/mapHeaders/lab4.asm" +INCLUDE "scripts/lab4.asm" +INCLUDE "data/mapObjects/lab4.asm" +Lab4Blocks: INCBIN "maps/lab4.blk" + +INCLUDE "data/mapHeaders/cinnabarpokecenter.asm" +INCLUDE "scripts/cinnabarpokecenter.asm" +INCLUDE "data/mapObjects/cinnabarpokecenter.asm" + +INCLUDE "data/mapHeaders/cinnabarmart.asm" +INCLUDE "scripts/cinnabarmart.asm" +INCLUDE "data/mapObjects/cinnabarmart.asm" + +INCLUDE "data/mapHeaders/copycatshouse1f.asm" +INCLUDE "scripts/copycatshouse1f.asm" +INCLUDE "data/mapObjects/copycatshouse1f.asm" + +INCLUDE "data/mapHeaders/gary.asm" +INCLUDE "scripts/gary.asm" +INCLUDE "data/mapObjects/gary.asm" +GaryBlocks: INCBIN "maps/gary.blk" + dr $759ef,$75dfe + INCLUDE "engine/menu/league_pc.asm" INCLUDE "engine/overworld/elevator.asm" diff --git a/maps/celadongamecorner.blk b/maps/celadongamecorner.blk index 82fd0b61..8c8b1fd8 100644 --- a/maps/celadongamecorner.blk +++ b/maps/celadongamecorner.blk @@ -2,4 +2,4 @@ -4***C*///3 : : : :9!9!9!99!9!9!98!8!8!8 ()
\ No newline at end of file +4***C*///3 : : : :9!9!9!99!9!9!98!8!8!8 ()
\ No newline at end of file diff --git a/maps/celadongym.blk b/maps/celadongym.blk index dcecc50c..7ac1b683 100644 --- a/maps/celadongym.blk +++ b/maps/celadongym.blk @@ -1 +1 @@ -38:933<3=33;?>3344356344321
\ No newline at end of file +58:963<3=33;?>3344356344321
\ No newline at end of file diff --git a/maps/celadonhotel.blk b/maps/celadonhotel.blk index 07a8b781..d1399446 100644 --- a/maps/celadonhotel.blk +++ b/maps/celadonhotel.blk @@ -1,2 +1,2 @@ - +&
\ No newline at end of file diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 4f01021e..5d6d668f 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -1,8 +1,10 @@ BillsHouseScript: ; 1e76a (7:676a) + call BillsHouseScript_1e09e call EnableAutoTextBoxDrawing ld a, [W_BILLSHOUSECURSCRIPT] ld hl, BillsHouseScriptPointers - jp JumpTable + call JumpTable + ret BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript0 @@ -11,21 +13,65 @@ BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript3 dw BillsHouseScript4 dw BillsHouseScript5 + dw BillsHouseScript6 + dw BillsHouseScript7 + dw BillsHouseScript8 + dw BillsHouseScript9 + +BillsHouseScript_1e09e: + ld hl, wPreventBlackout + bit 7, [hl] + set 7, [hl] + ret nz + ld hl, wd7f2 + bit 5, [hl] + jr z, .asm_1e0af + jr .asm_1e0b3 + +.asm_1e0af + ld a, $0 + jr .asm_1e0b5 + +.asm_1e0b3 + ld a, $9 +.asm_1e0b5 + ld [W_BILLSHOUSECURSCRIPT], a + ret BillsHouseScript0: ; 1e782 (7:6782) + ld a, [wd472] + bit 7, a + jr z, .asm_1e0d2 + callab Func_fce73 + jr c, .asm_1e0d2 + callab Func_f24d5 +.asm_1e0d2 + xor a + ld [wJoyIgnore], a + ld a, $1 + ld [W_BILLSHOUSECURSCRIPT], a ret BillsHouseScript1: ; 1e783 (7:6783) + ret + +BillsHouseScript2: + ld a, $ff + ld [wJoyIgnore], a ld a, [wSpriteStateData1 + 9] and a ; cp SPRITE_FACING_DOWN ld de, MovementData_1e79c jr nz, .notDown + call CheckPikachuFollowingPlayer + jr nz, .asm_1e0f8 + callab Func_f250b +.asm_1e0f8 ld de, MovementData_1e7a0 .notDown ld a, $1 ld [H_SPRITEINDEX], a call MoveSprite - ld a, $2 + ld a, $3 ld [W_BILLSHOUSECURSCRIPT], a ret @@ -44,25 +90,58 @@ MovementData_1e7a0: ; 1e7a0 (7:67a0) db NPC_MOVEMENT_UP db $FF -BillsHouseScript2: ; 1e7a6 (7:67a6) +BillsHouseScript3: ; 1e7a6 (7:67a6) ld a, [wd730] bit 0, a ret nz ld a, HS_BILL_POKEMON ld [wMissableObjectIndex], a predef HideObject - SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR + call CheckPikachuFollowingPlayer + jr z, .asm_1e13e + ld hl, PikachuMovementData_1e14d + ld a, [wSpriteStateData1 + 9] + and a ; cp SPRITE_FACING_DOWN + jr nz, .asm_1e133 + ld hl, PikachuMovementData_1e152 +.asm_1e133 + call Func_159b + callab InitializePikachuTextID +.asm_1e13e xor a ld [wJoyIgnore], a - ld a, $3 + SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR + ld a, $4 ld [W_BILLSHOUSECURSCRIPT], a ret -BillsHouseScript3: ; 1e7c5 (7:67c5) +PikachuMovementData_1e14d: + db $00 + db $1e + db $1e + db $1e + db $3f + +PikachuMovementData_1e152: + db $00 + db $1e + db $1f + db $1e + db $1e + db $20 + db $36 + db $3f + +BillsHouseScript4: ; 1e7c5 (7:67c5) CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL ret z - ld a, $f0 + ld a, $fc ld [wJoyIgnore], a + ld a, $5 + ld [W_BILLSHOUSECURSCRIPT], a + ret + +BillsHouseScript5: ld a, $2 ld [wSpriteIndex], a ld a, $c @@ -79,11 +158,30 @@ BillsHouseScript3: ; 1e7c5 (7:67c5) predef ShowObject ld c, 8 call DelayFrames + ld hl, wd472 + bit 7, [hl] + jr z, .asm_1e1c6 + call CheckPikachuFollowingPlayer + jr z, .asm_1e1c6 + ld a, $2 + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + ld hl, PikachuMovementData_1e1a9 + call Func_159b + ld a, $f + ld [wEmotionBubbleSpriteIndex], a + ld a, $0 + ld [wWhichEmotionBubble], a + predef EmotionBubble + callab InitializePikachuTextID +.asm_1e1c6 ld a, $2 ld [H_SPRITEINDEX], a ld de, MovementData_1e807 call MoveSprite - ld a, $4 + ld a, $6 ld [W_BILLSHOUSECURSCRIPT], a ret @@ -95,26 +193,67 @@ MovementData_1e807: ; 1e807 (7:6807) db NPC_MOVEMENT_DOWN db $FF -BillsHouseScript4: ; 1e80d (7:680d) +PikachuMovementData_1e1a9: + db $00 + db $37 + db $3f + +BillsHouseScript6: ; 1e80d (7:680d) ld a, [wd730] bit 0, a ret nz - xor a - ld [wJoyIgnore], a SetEvent EVENT_MET_BILL_2 ; this event seems redundant SetEvent EVENT_MET_BILL - ld a, $0 + ld a, $7 ld [W_BILLSHOUSECURSCRIPT], a ret -BillsHouseScript5: ; 1e827 (7:6827) - ld a, $4 +BillsHouseScript7: + xor a + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_UP + ld [wSpriteStateData1 + 9], a + ld a, $FF ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld de, RLE_1e219 + ld hl, wSimulatedJoypadStatesEnd + call DecodeRLEList + dec a + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates + ld a, $8 + ld [W_BILLSHOUSECURSCRIPT], a + ret + +RLE_1e219: + db D_RIGHT,$3 + db $FF + +BillsHouseScript8: + ld a, [wSimulatedJoypadStatesIndex] + and a + ret nz + xor a + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_UP + ld [wSpriteStateData1 + 9], a + ld a, $2 + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + xor a + ld [wJoyIgnore], a + ld a, $2 ld [hSpriteIndexOrTextID], a call DisplayTextID - ld a, $0 + ld a, $9 ld [W_BILLSHOUSECURSCRIPT], a ret +BillsHouseScript9: ; 1e827 (7:6827) + ret + BillsHouseTextPointers: ; 1e834 (7:6834) dw BillsHouseText1 dw BillsHouseText2 @@ -122,91 +261,20 @@ BillsHouseTextPointers: ; 1e834 (7:6834) dw BillsHouseText4 BillsHouseText4: ; 1e83c (7:683c) - db $fd + TX_FAR _BillsHouseDontLeaveText + db "@" BillsHouseText1: ; 1e83d (7:683d) TX_ASM - ld hl, BillsHouseText_1e865 - call PrintText - call YesNoChoice - ld a, [wCurrentMenuItem] - and a - jr nz, .asm_1e85a -.asm_1e84d - ld hl, BillsHouseText_1e86a - call PrintText - ld a, $1 - ld [W_BILLSHOUSECURSCRIPT], a - jr .asm_1e862 -.asm_1e85a - ld hl, BillsHouseText_1e86f - call PrintText - jr .asm_1e84d -.asm_1e862 + callba Func_f2418 jp TextScriptEnd -BillsHouseText_1e865: ; 1e865 (7:6865) - TX_FAR _BillsHouseText_1e865 - db "@" - -BillsHouseText_1e86a: ; 1e86a (7:686a) - TX_FAR _BillsHouseText_1e86a - db "@" - -BillsHouseText_1e86f: ; 1e86f (7:686f) - TX_FAR _BillsHouseText_1e86f - db "@" - BillsHouseText2: ; 1e874 (7:6874) TX_ASM - CheckEvent EVENT_GOT_SS_TICKET - jr nz, .asm_1e8a9 - ld hl, BillThankYouText - call PrintText - lb bc, S_S_TICKET, 1 - call GiveItem - jr nc, .BagFull - ld hl, SSTicketReceivedText - call PrintText - SetEvent EVENT_GOT_SS_TICKET - ld a, HS_CERULEAN_GUARD_1 - ld [wMissableObjectIndex], a - predef ShowObject - ld a, HS_CERULEAN_GUARD_2 - ld [wMissableObjectIndex], a - predef HideObject -.asm_1e8a9 - ld hl, BillsHouseText_1e8cb - call PrintText - jr .asm_1e8b7 -.BagFull - ld hl, SSTicketNoRoomText - call PrintText -.asm_1e8b7 + callba Func_f244a jp TextScriptEnd -BillThankYouText: ; 1e8ba (7:68ba) - TX_FAR _BillThankYouText - db "@" - -SSTicketReceivedText: ; 1e8bf (7:68bf) - TX_FAR _SSTicketReceivedText - db $11, $6, "@" - -SSTicketNoRoomText: ; 1e8c6 (7:68c6) - TX_FAR _SSTicketNoRoomText - db "@" - -BillsHouseText_1e8cb: ; 1e8cb (7:68cb) - TX_FAR _BillsHouseText_1e8cb - db "@" - BillsHouseText3: ; 1e8d0 (7:68d0) TX_ASM - ld hl, BillsHouseText_1e8da - call PrintText + callba Func_f24a2 jp TextScriptEnd - -BillsHouseText_1e8da: ; 1e8da (7:68da) - TX_FAR _BillsHouseText_1e8da - db "@" diff --git a/scripts/billshouse2.asm b/scripts/billshouse2.asm index 6f62a79f..87a39969 100755 --- a/scripts/billshouse2.asm +++ b/scripts/billshouse2.asm @@ -87,7 +87,7 @@ Func_f24ae: ; f24ae ld a, [wCurMap] cp BILLS_HOUSE jr nz, .asm_f24d2 - call CheckPikachuAsleep + call CheckPikachuFollowingPlayer jr z, .asm_f24d2 ld a, [W_BILLSHOUSECURSCRIPT] cp $5 @@ -120,7 +120,7 @@ Func_f24d5: ld a, $1 ld [wWhichEmotionBubble], a predef EmotionBubble - call SetPikachuAsleep + call DisablePikachuFollowingPlayer callab InitializePikachuTextID ret diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm index be1ed4c8..944a0952 100755 --- a/scripts/celadondiner.asm +++ b/scripts/celadondiner.asm @@ -27,39 +27,5 @@ CeladonDinerText4: ; 4916e (12:516e) CeladonDinerText5: ; 49173 (12:5173) TX_ASM - CheckEvent EVENT_GOT_COIN_CASE - jr nz, .asm_eb14d - ld hl, CeladonDinerText_491a7 - call PrintText - lb bc, COIN_CASE, 1 - call GiveItem - jr nc, .BagFull - SetEvent EVENT_GOT_COIN_CASE - ld hl, ReceivedCoinCaseText - call PrintText - jr .asm_68b61 -.BagFull - ld hl, CoinCaseNoRoomText - call PrintText - jr .asm_68b61 -.asm_eb14d - ld hl, CeladonDinerText_491b7 - call PrintText -.asm_68b61 + callab Func_f1f31 jp TextScriptEnd - -CeladonDinerText_491a7: ; 491a7 (12:51a7) - TX_FAR _CeladonDinerText_491a7 - db "@" - -ReceivedCoinCaseText: ; 491ac (12:51ac) - TX_FAR _ReceivedCoinCaseText - db $11, "@" - -CoinCaseNoRoomText: ; 491b2 (12:51b2) - TX_FAR _CoinCaseNoRoomText - db "@" - -CeladonDinerText_491b7: ; 491b7 (12:51b7) - TX_FAR _CeladonDinerText_491b7 - db "@" diff --git a/scripts/celadondiner2.asm b/scripts/celadondiner2.asm new file mode 100755 index 00000000..cfab218b --- /dev/null +++ b/scripts/celadondiner2.asm @@ -0,0 +1,38 @@ +Func_f1f31: + CheckEvent EVENT_GOT_COIN_CASE + jr nz, .asm_eb14d + ld hl, CeladonDinerText_491a7 + call PrintText + lb bc, COIN_CASE, 1 + call GiveItem + jr nc, .BagFull + SetEvent EVENT_GOT_COIN_CASE + ld hl, ReceivedCoinCaseText + call PrintText + jr .asm_68b61 +.BagFull + ld hl, CoinCaseNoRoomText + call PrintText + jr .asm_68b61 +.asm_eb14d + ld hl, CeladonDinerText_491b7 + call PrintText +.asm_68b61 + ret + +CeladonDinerText_491a7: ; 491a7 (12:51a7) + TX_FAR _CeladonDinerText_491a7 + db "@" + +ReceivedCoinCaseText: ; 491ac (12:51ac) + TX_FAR _ReceivedCoinCaseText + TX_SFX_KEY_ITEM + db "@" + +CoinCaseNoRoomText: ; 491b2 (12:51b2) + TX_FAR _CoinCaseNoRoomText + db "@" + +CeladonDinerText_491b7: ; 491b7 (12:51b7) + TX_FAR _CeladonDinerText_491b7 + db "@" diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 5fc9cf97..0013be1b 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -71,8 +71,12 @@ CeladonGameCornerScript1: ; 48c19 (12:4c19) .asm_48c43 ld a, [wXCoord] cp $8 - jr nz, .asm_48c4d + jr nz, .pikachu ld de, MovementData_48c63 + jr .asm_48c4d +.pikachu + callab Func_f1f23 + ld de, MovementData_48c5a .asm_48c4d ld a, $b ld [H_SPRITEINDEX], a @@ -85,8 +89,8 @@ MovementData_48c5a: ; 48c5a (12:4c5a) db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_UP db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_UP db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT @@ -144,7 +148,7 @@ CeladonGameCornerText2: ; 48ca9 (12:4ca9) ld a, [wCurrentMenuItem] and a jr nz, .asm_48d0f - ld b,COIN_CASE + ld b, COIN_CASE call IsItemInBag jr z, .asm_48d19 call Has9990Coins @@ -267,7 +271,8 @@ CeladonGameCornerText_48d9c: ; 48d9c (12:4d9c) Received10CoinsText: ; 48da1 (12:4da1) TX_FAR _Received10CoinsText - db $0B, "@" + TX_SFX_ITEM + db "@" CeladonGameCornerText_48da7: ; 48da7 (12:4da7) TX_FAR _CeladonGameCornerText_48da7 @@ -360,7 +365,7 @@ CeladonGameCornerText10: ; 48e3b (12:4e3b) jr nz, .asm_48e75 ld hl, CeladonGameCornerText_48e88 call PrintText - ld b,COIN_CASE + ld b, COIN_CASE call IsItemInBag jr z, .asm_48e7f call Has9990Coins @@ -472,13 +477,11 @@ CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) ld hl, wd730 set 6, [hl] coord hl, 11, 0 - ld b, $5 - ld c, $7 + lb bc, 5, 7 call TextBoxBorder call UpdateSprites coord hl, 12, 1 - ld b, 4 - ld c, 7 + lb bc, 4, 7 call ClearScreenArea coord hl, 12, 2 ld de, GameCornerMoneyText @@ -488,7 +491,7 @@ CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) call PlaceString coord hl, 12, 3 ld de, wPlayerMoney - ld c, $a3 + ld c, 3 | MONEY_SIGN | LEADING_ZEROES call PrintBCDNumber coord hl, 12, 4 ld de, GameCornerCoinText diff --git a/scripts/celadonmansion1.asm b/scripts/celadonmansion1.asm index 857c2e42..b29ee196 100755 --- a/scripts/celadonmansion1.asm +++ b/scripts/celadonmansion1.asm @@ -1,5 +1,6 @@ CeladonMansion1Script: ; 48694 (12:4694) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMansion1TextPointers: ; 48697 (12:4697) dw CeladonMansion1Text1 @@ -8,31 +9,39 @@ CeladonMansion1TextPointers: ; 48697 (12:4697) dw CeladonMansion1Text4 dw CeladonMansion1Text5 -CeladonMansion1_486a1: ; 486a1 (12:46a1) - call PlayCry - jp TextScriptEnd - CeladonMansion1Text1: ; 486a7 (12:46a7) TX_FAR _CeladonMansion1Text1 TX_ASM ld a, MEOWTH - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text2: ; 486b1 (12:46b1) - TX_FAR _CeladonMansion1Text2 - db "@" + TX_ASM + callba Func_f1e70 + ld a, [wPikachuHappiness] + cp 251 + jr c, .asm_485d9 + ld c, 50 + call DelayFrames + ldpikacry e, PikachuCry23 + callab PlayPikachuSoundClip +.asm_485d9 + jp TextScriptEnd CeladonMansion1Text3: ; 486b6 (12:46b6) TX_FAR _CeladonMansion1Text3 TX_ASM ld a, CLEFAIRY - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text4: ; 486c0 (12:46c0) TX_FAR _CeladonMansion1Text4 TX_ASM ld a, NIDORAN_F - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text5: ; 486ca (12:46ca) TX_FAR _CeladonMansion1Text5 diff --git a/scripts/celadonmansion1_2.asm b/scripts/celadonmansion1_2.asm new file mode 100755 index 00000000..0e1c2389 --- /dev/null +++ b/scripts/celadonmansion1_2.asm @@ -0,0 +1,78 @@ +Func_f1e70: + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, CeladonMansion1Text_f1e96 + call PrintText + callab IsStarterPikachuInOurParty + ret nc + ld hl, CeladonMansionText_f1e9c + call PrintText + ld a, $0 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call Func_f1ea2 + call PrintText + ret + +CeladonMansion1Text_f1e96: + TX_FAR _CeladonMansion1Text2 + TX_WAIT_BUTTON + db "@" + +CeladonMansionText_f1e9c: + TX_FAR _CeladonMansion1Text6 + TX_BUTTON_SOUND + db "@" + +Func_f1ea2: + ld hl, PikachuHappinessThresholds_f1eb9 +.asm_f1ea5 + ld a, [hli] + inc hl + and a + jr z, .asm_f1eb5 + ld b, a + ld a, [wPikachuHappiness] + cp b + jr c, .asm_f1eb5 + inc hl + inc hl + jr .asm_f1ea5 + +.asm_f1eb5 + ld a, [hli] + ld h, [hl] + ld l, a + ret + +PikachuHappinessThresholds_f1eb9 + dw 51, CeladonMansion1Text_f1ed5 + dw 101, CeladonMansion1Text_f1eda + dw 131, CeladonMansion1Text_f1edf + dw 161, CeladonMansion1Text_f1ee4 + dw 201, CeladonMansion1Text_f1ee9 + dw 255, CeladonMansion1Text_f1eee + dbbw 0, $ff, CeladonMansion1Text_f1eee + +CeladonMansion1Text_f1ed5: + TX_FAR _CeladonMansion1Text7 + db "@" + +CeladonMansion1Text_f1eda: + TX_FAR _CeladonMansion1Text8 + db "@" + +CeladonMansion1Text_f1edf: + TX_FAR _CeladonMansion1Text9 + db "@" + +CeladonMansion1Text_f1ee4: + TX_FAR _CeladonMansion1Text10 + db "@" + +CeladonMansion1Text_f1ee9: + TX_FAR _CeladonMansion1Text11 + db "@" + +CeladonMansion1Text_f1eee: + TX_FAR _CeladonMansion1Text12 + db "@" diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm index 11a8646d..191d9304 100755 --- a/scripts/celadonmansion3.asm +++ b/scripts/celadonmansion3.asm @@ -1,5 +1,13 @@ CeladonMansion3Script: ; 48790 (12:4790) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret + +CeladonMansion3_PokedexCount: + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + ret CeladonMansion3TextPointers: ; 48793 (12:4793) dw ProgrammerText @@ -12,31 +20,120 @@ CeladonMansion3TextPointers: ; 48793 (12:4793) dw GameFreakSignText ProgrammerText: ; 487a3 (12:47a3) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + ld hl, CeladonMansion3Text_486f5 + jr nc, .print + ld hl, CeladonMansion3Text_486f0 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_486f0: TX_FAR _ProgrammerText db "@" +CeladonMansion3Text_486f5: + TX_FAR _ProgrammerText2 + db "@" + GraphicArtistText: ; 487a8 (12:47a8) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + jr nc, .completed + ld hl, CeladonMansion3Text_48757 + jr .print + +.completed + ld hl, CeladonMansion3Text_4875c + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .declined_print + call SaveScreenTilesToBuffer2 + xor a + ld [wUpdateSpritesEnabled], a + ld hl, wd730 + set 6, [hl] + callab Func_e8cb1 + ld hl, wd730 + res 6, [hl] + call GBPalWhiteOutWithDelay3 + call ReloadTilesetTilePatterns + call RestoreScreenTilesAndReloadTilePatterns + call LoadScreenTilesFromBuffer2 + call Delay3 + call GBPalNormal + ld hl, CeladonMansion3Text_4876b + ld a, [$ffdb] + and a + jr nz, .print + ld hl, CeladonMansion3Text_48766 + jr .print + +.declined_print + ld hl, CeladonMansion3Text_48761 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_48757: TX_FAR _GraphicArtistText db "@" +CeladonMansion3Text_4875c: + TX_FAR _GraphicArtistText2 + db "@" + +CeladonMansion3Text_48761: + TX_FAR _GraphicArtistText3 + db "@" + +CeladonMansion3Text_48766: + TX_FAR _GraphicArtistText4 + db "@" + +CeladonMansion3Text_4876b: + TX_FAR _GraphicArtistText5 + db "@" + WriterText: ; 487ad (12:47ad) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + ld hl, CeladonMansion3Text_48789 + jr nc, .print + ld hl, CeladonMansion3Text_48784 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_48784: TX_FAR _WriterText db "@" +CeladonMansion3Text_48789: + TX_FAR _WriterText2 + db "@" + DirectorText: ; 487b2 (12:47b2) TX_ASM - + call CeladonMansion3_PokedexCount ; check pokédex - ld hl, wPokedexOwned - ld b, wPokedexOwnedEnd - wPokedexOwned - call CountSetBits - ld a, [wNumSetBits] cp 150 jr nc, .CompletedDex ld hl, .GameDesigner jr .done .CompletedDex ld hl, .CompletedDexText + call PrintText + call Delay3 + xor a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, .UnlockedDiplomaPrinting .done call PrintText jp TextScriptEnd @@ -47,25 +144,33 @@ DirectorText: ; 487b2 (12:47b2) .CompletedDexText TX_FAR _CompletedDexText - db $6 + TX_BUTTON_SOUND TX_ASM callab DisplayDiploma ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd -GameFreakPCText1: ; 487eb (12:47eb) - TX_FAR _CeladonMansion3Text5 +.UnlockedDiplomaPrinting + TX_FAR _CompletedDexText2 db "@" +GameFreakPCText1: ; 487eb (12:47eb) + TX_ASM + callba Func_f1ef3 + jp TextScriptEnd + GameFreakPCText2: ; 487f0 (12:47f0) - TX_FAR _CeladonMansion3Text6 - db "@" + TX_ASM + callba Func_f1eff + jp TextScriptEnd GameFreakPCText3: ; 487f5 (12:47f5) - TX_FAR _CeladonMansion3Text7 - db "@" + TX_ASM + callba Func_f1f0b + jp TextScriptEnd GameFreakSignText: ; 487fa (12:47fa) - TX_FAR _CeladonMansion3Text8 - db "@" + TX_ASM + callba Func_f1f17 + jp TextScriptEnd diff --git a/scripts/celadonmansion3_2.asm b/scripts/celadonmansion3_2.asm new file mode 100755 index 00000000..2d5069d1 --- /dev/null +++ b/scripts/celadonmansion3_2.asm @@ -0,0 +1,35 @@ +Func_f1ef3: + ld hl, CeladonMansion3Text_f1efa + call PrintText + ret + +CeladonMansion3Text_f1efa: ; 487eb (12:47eb) + TX_FAR _CeladonMansion3Text5 + db "@" + +Func_f1eff: + ld hl, CeladonMansion3Text_f1f06 + call PrintText + ret + +CeladonMansion3Text_f1f06: ; 487f0 (12:47f0) + TX_FAR _CeladonMansion3Text6 + db "@" + +Func_f1f0b: + ld hl, CeladonMansion3Text_f1f12 + call PrintText + ret + +CeladonMansion3Text_f1f12: ; 487f5 (12:47f5) + TX_FAR _CeladonMansion3Text7 + db "@" + +Func_f1f17: + ld hl, CeladonMansion3Text_f1f1e + call PrintText + ret + +CeladonMansion3Text_f1f1e: ; 487fa (12:47fa) + TX_FAR _CeladonMansion3Text8 + db "@" diff --git a/scripts/celadonmansion4.asm b/scripts/celadonmansion4.asm index f9045bcd..475baff3 100755 --- a/scripts/celadonmansion4.asm +++ b/scripts/celadonmansion4.asm @@ -1,5 +1,6 @@ CeladonMansion4Script: ; 4886b (12:486b) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMansion4TextPointers: ; 4886e (12:486e) dw CeladonMansion4Text1 diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm index 6d979e04..346eb6bb 100755 --- a/scripts/celadonmansion5.asm +++ b/scripts/celadonmansion5.asm @@ -1,5 +1,6 @@ CeladonMansion5Script: ; 1dd3a (7:5d3a) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMansion5TextPointers: ; 1dd3d (7:5d3d) dw CeladonMansion5Text1 diff --git a/scripts/celadonmart1.asm b/scripts/celadonmart1.asm index 041af8b3..4f297a6e 100755 --- a/scripts/celadonmart1.asm +++ b/scripts/celadonmart1.asm @@ -1,5 +1,6 @@ CeladonMart1Script: ; 60f86 (18:4f86) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMart1TextPointers: ; 60f89 (18:4f89) dw CeladonMart1Text1 diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm index c6c6ecc7..49e5e84b 100755 --- a/scripts/celadonmart3.asm +++ b/scripts/celadonmart3.asm @@ -22,41 +22,9 @@ CeladonMart3TextPointers: ; 48228 (12:4228) CeladonMart3Text1: ; 4824a (12:424a) TX_ASM - CheckEvent EVENT_GOT_TM18 - jr nz, .asm_a5463 - ld hl, TM18PreReceiveText - call PrintText - lb bc, TM_18, 1 - call GiveItem - jr nc, .BagFull - SetEvent EVENT_GOT_TM18 - ld hl, ReceivedTM18Text - jr .asm_81359 -.BagFull - ld hl, TM18NoRoomText - jr .asm_81359 -.asm_a5463 - ld hl, TM18ExplanationText -.asm_81359 - call PrintText + callab Func_f1e30 jp TextScriptEnd -TM18PreReceiveText: ; 48278 (12:4278) - TX_FAR _TM18PreReceiveText - db "@" - -ReceivedTM18Text: ; 4827d (12:427d) - TX_FAR _ReceivedTM18Text - db $0B, "@" - -TM18ExplanationText: ; 48283 (12:4283) - TX_FAR _TM18ExplanationText - db "@" - -TM18NoRoomText: ; 48288 (12:4288) - TX_FAR _TM18NoRoomText - db "@" - CeladonMart3Text2: ; 4828d (12:428d) TX_FAR _CeladonMart3Text2 db "@" diff --git a/scripts/celadonmart3_2.asm b/scripts/celadonmart3_2.asm new file mode 100755 index 00000000..1c9f0db1 --- /dev/null +++ b/scripts/celadonmart3_2.asm @@ -0,0 +1,38 @@ +Func_f1e30 + CheckEvent EVENT_GOT_TM18 + jr nz, .asm_f1e54 + ld hl, CeladonMart3Text_f1e5b + call PrintText + lb bc, TM_18, 1 + call GiveItem + jr nc, .asm_f1e4f + SetEvent EVENT_GOT_TM18 + ld hl, CeladonMart3Text_f1e60 + jr .asm_f1e57 + +.asm_f1e4f + ld hl, CeladonMart3Text_f1e6b + jr .asm_f1e57 + +.asm_f1e54 + ld hl, CeladonMart3Text_f1e66 +.asm_f1e57 + call PrintText + ret + +CeladonMart3Text_f1e5b: + TX_FAR _TM18PreReceiveText + db "@" + +CeladonMart3Text_f1e60: + TX_FAR _ReceivedTM18Text + TX_SFX_ITEM + db "@" + +CeladonMart3Text_f1e66: + TX_FAR _TM18ExplanationText + db "@" + +CeladonMart3Text_f1e6b: + TX_FAR _TM18NoRoomText + db "@" diff --git a/scripts/celadonmart5.asm b/scripts/celadonmart5.asm index 9bd7f991..bf63a7cc 100755 --- a/scripts/celadonmart5.asm +++ b/scripts/celadonmart5.asm @@ -1,5 +1,6 @@ CeladonMart5Script: ; 49069 (12:5069) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMart5TextPointers: ; 4906c (12:506c) dw CeladonMart5Text1 diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index 439ab62e..4d819be7 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -1,5 +1,6 @@ CeladonMartRoofScript: ; 483d5 (12:43d5) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMartRoofScript_GetDrinksInBag: ; 483d8 (12:43d8) ; construct a list of all drinks in the player's bag @@ -71,7 +72,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ; 4840c (12:440c) ld hl, wd730 res 6, [hl] call HandleMenuInput - bit 1, a ; pressed b + bit BIT_B_BUTTON, a ; pressed b ret nz ld hl, wFilteredBagItems ld a, [wCurrentMenuItem] @@ -125,13 +126,16 @@ CeladonMartRoofScript_GiveDrinkToGirl: ; 4840c (12:440c) ret .bagFull ld hl, CeladonMartRoofText_48526 - jp PrintText + call PrintText + ret .alreadyGaveDrink ld hl, CeladonMartRoofText_4852c - jp PrintText + call PrintText + ret RemoveItemByIDBank12: ; 484e6 (12:44e6) - jpba RemoveItemByID + callba RemoveItemByID + ret CeladonMartRoofText_484ee: ; 484ee (12:44ee) TX_FAR _CeladonMartRoofText_484ee @@ -248,7 +252,7 @@ CeladonMartRoofText4: ; 4859d (12:459d) db "@" CeladonMartRoofText5: ; 485a2 (12:45a2) - db $f5 + TX_VENDING_MACHINE CeladonMartRoofText6: ; 485a3 (12:45a3) TX_FAR _CeladonMartRoofText6 diff --git a/scripts/celadonpokecenter.asm b/scripts/celadonpokecenter.asm index 1b8d3a1b..4ff71c43 100755 --- a/scripts/celadonpokecenter.asm +++ b/scripts/celadonpokecenter.asm @@ -7,12 +7,13 @@ CeladonPokecenterTextPointers: ; 488be (12:48be) dw CeladonPokecenterText2 dw CeladonPokecenterText3 dw CeladonPokecenterText4 + dw CeladonPokecenterText5 CeladonPokecenterText4: ; 488c6 (12:48c6) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST CeladonPokecenterText1: ; 488c7 (12:48c7) - db $ff + TX_POKECENTER_NURSE CeladonPokecenterText2: ; 488c8 (12:48c8) TX_FAR _CeladonPokecenterText2 @@ -21,3 +22,8 @@ CeladonPokecenterText2: ; 488c8 (12:48c8) CeladonPokecenterText3: ; 488cd (12:48cd) TX_FAR _CeladonPokecenterText3 db "@" + +CeladonPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/celadonprizeroom.asm b/scripts/celadonprizeroom.asm index 2cfd01d0..980778fe 100755 --- a/scripts/celadonprizeroom.asm +++ b/scripts/celadonprizeroom.asm @@ -17,4 +17,4 @@ CeladonPrizeRoomText2: ; 49102 (12:5102) db "@" CeladonPrizeRoomText3: ; 49107 (12:5107) - db $f7 + TX_PRIZE_VENDOR diff --git a/scripts/ceruleanpokecenter.asm b/scripts/ceruleanpokecenter.asm index f4eb68ae..5ee5d4a2 100755 --- a/scripts/ceruleanpokecenter.asm +++ b/scripts/ceruleanpokecenter.asm @@ -10,10 +10,10 @@ CeruleanPokecenterTextPointers: ; 5c64b (17:464b) dw CeruleanPokecenterText5 CeruleanPokecenterText4: ; 5c653 (17:4653) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST CeruleanPokecenterText1: ; 5c654 (17:4654) - db $ff + TX_POKECENTER_NURSE CeruleanPokecenterText2: ; 5c655 (17:4655) TX_FAR _CeruleanPokecenterText1 @@ -25,5 +25,5 @@ CeruleanPokecenterText3: ; 5c65a (17:465a) CeruleanPokecenterText5: TX_ASM - callab Func_f0f12 + callab PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index c5d462b3..8ae77507 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -35,11 +35,14 @@ CinnabarGymScript_75792: ; 75792 (1d:5792) ld [wOpponentAfterWrongAnswer], a ret -CinnabarGymScript_757a0: ; 757a0 (1d:57a0) +CinnabarGymScript_74f48: ; 757a0 (1d:57a0) ld a, [hSpriteIndexOrTextID] ld [wTrainerHeaderFlagBit], a ret +CinnabarGymFlagAction: ; 757f1 (1d:57f1) + predef_jump FlagActionPredef + CinnabarGymScriptPointers: ; 757a6 (1d:57a6) dw CinnabarGymScript0 dw CinnabarGymScript1 @@ -55,12 +58,18 @@ CinnabarGymScript0: ; 757ae (1d:57ae) jr nz, .asm_757c3 ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a + ld hl, PikachuMovementData_74f97 + ld b, SPRITE_FACING_DOWN + call CinnabarGymScript_74fa3 ld de, MovementData_757d7 jr .asm_757cb .asm_757c3 - ld de, MovementData_757da ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a + ld hl, PikachuMovementData_74f9e + ld b, SPRITE_FACING_RIGHT + call CinnabarGymScript_74fa3 + ld de, MovementData_757da .asm_757cb call MoveSprite ld a, $1 @@ -73,10 +82,39 @@ MovementData_757d7: ; 757d7 (1d:57d7) db NPC_MOVEMENT_UP db $FF +PikachuMovementData_74f97: + db $00 + db $20 + db $1e + db $35 + db $3f + MovementData_757da: ; 757da (1d:57da) db NPC_MOVEMENT_LEFT db $FF +PikachuMovementData_74f9e: + db $00 + db $1d + db $1f + db $38 + db $3f + +CinnabarGymScript_74fa3: + ld a, [wd472] + bit 7, a + ret z + push hl + push bc + callab GetPikachuFacingDirectionAndReturnToE + pop bc + pop hl + ld a, b + cp e + ret nz + call Func_159b + ret + CinnabarGymScript1: ; 757dc (1d:57dc) ld a, [wd730] bit 0, a @@ -88,52 +126,74 @@ CinnabarGymScript1: ; 757dc (1d:57dc) ld [hSpriteIndexOrTextID], a jp DisplayTextID -CinnabarGymFlagAction: ; 757f1 (1d:57f1) - predef_jump FlagActionPredef - CinnabarGymScript2: ; 757f6 (1d:57f6) + call CinnabarGymScript_753e9 ld a, [wIsInBattle] cp $ff jp z, CinnabarGymScript_75792 ld a, [wTrainerHeaderFlagBit] - ld [$ffdb], a - AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 + sub 2 ld c, a ld b, FLAG_TEST - EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 + EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED call CinnabarGymFlagAction ld a, c and a - jr nz, .asm_7581b + jr nz, .asm_7500d + ld a, [wTrainerHeaderFlagBit] + cp 2 + jr z, .asm_7500d + ld c, 30 + call DelayFrames + call CinnabarGymScript_75023 + call CinnabarGymScript_75041 call WaitForSoundToFinish ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish -.asm_7581b + jr .asm_75013 +.asm_7500d + call CinnabarGymScript_75023 + call CinnabarGymScript_75041 +.asm_75013 + xor a + ld [wJoyIgnore], a + ld [wOpponentAfterWrongAnswer], a + ld a, $0 + ld [W_CINNABARGYMCURSCRIPT], a + ld [W_CURMAPSCRIPT], a + ret + +CinnabarGymScript_75023: ld a, [wTrainerHeaderFlagBit] ld [$ffdb], a - AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a ld b, FLAG_SET EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 call CinnabarGymFlagAction + ret + +CinnabarGymScript_75032: ld a, [wTrainerHeaderFlagBit] - sub $2 - AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0 + ld [$ffdb], a + ld c, a + ld b, FLAG_TEST + EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 + call CinnabarGymFlagAction + ret + +CinnabarGymScript_75041: + ld a, [wTrainerHeaderFlagBit] + sub 2 ld c, a ld b, FLAG_SET EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED call CinnabarGymFlagAction call UpdateCinnabarGymGateTileBlocks - xor a - ld [wJoyIgnore], a - ld [wOpponentAfterWrongAnswer], a - ld a, $0 - ld [W_CINNABARGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a ret CinnabarGymScript3: ; 7584a (1d:584a) + call CinnabarGymScript_753e9 ld a, [wIsInBattle] cp $ff jp z, CinnabarGymScript_75792 @@ -184,7 +244,7 @@ CinnabarGymTextPointers: ; 7589f (1d:589f) dw ReceivedTM38Text dw TM38NoRoomText -CinnabarGymScript_758b7: ; 758b7 (1d:58b7) +CinnabarGymScript_750c3: ; 758b7 (1d:58b7) ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer @@ -225,7 +285,7 @@ CinnabarGymText1: ; 758df (1d:58df) call SaveEndBattleTextPointers ld a, $7 ld [wGymLeaderNo], a - jp CinnabarGymScript_758b7 + jp CinnabarGymScript_750c3 BlaineBattleText: ; 75914 (1d:5914) TX_FAR _BlaineBattleText @@ -257,7 +317,7 @@ TM38NoRoomText: ; 75934 (1d:5934) CinnabarGymText2: ; 75939 (1d:5939) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_0 jr nz, .asm_46bb4 ld hl, CinnabarGymText_7595f @@ -265,7 +325,7 @@ CinnabarGymText2: ; 75939 (1d:5939) ld hl, CinnabarGymText_75964 ld de, CinnabarGymText_75964 call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 + jp CinnabarGymScript_750c3 .asm_46bb4 ld hl, CinnabarGymText_75969 call PrintText @@ -285,16 +345,25 @@ CinnabarGymText_75969: ; 75969 (1d:5969) CinnabarGymText3: ; 7596e (1d:596e) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_1 - jr nz, .asm_4b406 + jr nz, .asm_751a8 + call CinnabarGymScript_753f3 + jr nz, .asm_75196 + CheckEvent EVENT_CINNABAR_GYM_GATE1_UNLOCKED + jr nz, .asm_75196 + ld e, $00 + jp CinnabarGymScript_753de + +.asm_75196 ld hl, CinnabarGymText_75994 call PrintText ld hl, CinnabarGymText_75999 ld de, CinnabarGymText_75999 call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 -.asm_4b406 + jp CinnabarGymScript_750c3 + +.asm_751a8 ld hl, CinnabarGymText_7599e call PrintText jp TextScriptEnd @@ -313,16 +382,24 @@ CinnabarGymText_7599e: ; 7599e (1d:599e) CinnabarGymText4: ; 759a3 (1d:59a3) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_2 - jr nz, .asm_c0673 + jr nz, .asm_751ee + call CinnabarGymScript_753f3 + jr nz, .asm_751dc + CheckEvent EVENT_CINNABAR_GYM_GATE2_UNLOCKED + jr nz, .asm_751dc + ld e, $1 + jp CinnabarGymScript_753de + +.asm_751dc ld hl, CinnabarGymText_759c9 call PrintText ld hl, CinnabarGymText_759ce ld de, CinnabarGymText_759ce call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 -.asm_c0673 + jp CinnabarGymScript_750c3 +.asm_751ee ld hl, CinnabarGymText_759d3 call PrintText jp TextScriptEnd @@ -341,16 +418,24 @@ CinnabarGymText_759d3: ; 759d3 (1d:59d3) CinnabarGymText5: ; 759d8 (1d:59d8) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_3 - jr nz, .asm_5cfd7 + jr nz, .asm_75234 + call CinnabarGymScript_753f3 + jr nz, .asm_75222 + CheckEvent EVENT_CINNABAR_GYM_GATE3_UNLOCKED + jr nz, .asm_75222 + ld e, $2 + jp CinnabarGymScript_753de + +.asm_75222 ld hl, CinnabarGymText_759fe call PrintText ld hl, CinnabarGymText_75a03 ld de, CinnabarGymText_75a03 call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 -.asm_5cfd7 + jp CinnabarGymScript_750c3 +.asm_75234 ld hl, CinnabarGymText_75a08 call PrintText jp TextScriptEnd @@ -369,15 +454,23 @@ CinnabarGymText_75a08: ; 75a08 (1d:5a08) CinnabarGymText6: ; 75a0d (1d:5a0d) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_4 jr nz, .asm_776b4 + call CinnabarGymScript_753f3 + jr nz, .asm_75222 + CheckEvent EVENT_CINNABAR_GYM_GATE4_UNLOCKED + jr nz, .asm_75222 + ld e, $3 + jp CinnabarGymScript_753de + +.asm_75222 ld hl, CinnabarGymText_75a33 call PrintText ld hl, CinnabarGymText_75a38 ld de, CinnabarGymText_75a38 call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 + jp CinnabarGymScript_750c3 .asm_776b4 ld hl, CinnabarGymText_75a3d call PrintText @@ -397,15 +490,23 @@ CinnabarGymText_75a3d: ; 75a3d (1d:5a3d) CinnabarGymText7: ; 75a42 (1d:5a42) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_5 jr nz, .asm_2f755 + call CinnabarGymScript_753f3 + jr nz, .asm_75222 + CheckEvent EVENT_CINNABAR_GYM_GATE5_UNLOCKED + jr nz, .asm_75222 + ld e, $4 + jp CinnabarGymScript_753de + +.asm_75222 ld hl, CinnabarGymText_75a68 call PrintText ld hl, CinnabarGymText_75a6d ld de, CinnabarGymText_75a6d call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 + jp CinnabarGymScript_750c3 .asm_2f755 ld hl, CinnabarGymText_75a72 call PrintText @@ -425,15 +526,23 @@ CinnabarGymText_75a72: ; 75a72 (1d:5a72) CinnabarGymText8: ; 75a77 (1d:5a77) TX_ASM - call CinnabarGymScript_757a0 + call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_6 jr nz, .asm_d87be + call CinnabarGymScript_753f3 + jr nz, .asm_75222 + CheckEvent EVENT_CINNABAR_GYM_GATE6_UNLOCKED + jr nz, .asm_75222 + ld e, $5 + jp CinnabarGymScript_753de + +.asm_75222 ld hl, CinnabarGymText_75a9d call PrintText ld hl, CinnabarGymText_75aa2 ld de, CinnabarGymText_75aa2 call SaveEndBattleTextPointers - jp CinnabarGymScript_758b7 + jp CinnabarGymScript_750c3 .asm_d87be ld hl, CinnabarGymText_75aa7 call PrintText @@ -453,20 +562,5 @@ CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7) CinnabarGymText9: ; 75aac (1d:5aac) TX_ASM - CheckEvent EVENT_BEAT_BLAINE - jr nz, .asm_627d9 - ld hl, CinnabarGymText_75ac2 - jr .asm_0b11d -.asm_627d9 - ld hl, CinnabarGymText_75ac7 -.asm_0b11d - call PrintText + callab Func_f2133 jp TextScriptEnd - -CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2) - TX_FAR _CinnabarGymText_75ac2 - db "@" - -CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7) - TX_FAR _CinnabarGymText_75ac7 - db "@" diff --git a/scripts/cinnabargym2.asm b/scripts/cinnabargym2.asm new file mode 100755 index 00000000..a85a3206 --- /dev/null +++ b/scripts/cinnabargym2.asm @@ -0,0 +1,64 @@ +Func_f2133: + CheckEvent EVENT_BEAT_BLAINE + jr nz, .asm_627d9 + ld hl, CinnabarGymText_75ac2 + jr .asm_0b11d +.asm_627d9 + ld hl, CinnabarGymText_75ac7 +.asm_0b11d + call PrintText + ret + +CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2) + TX_FAR _CinnabarGymText_75ac2 + db "@" + +CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7) + TX_FAR _CinnabarGymText_75ac7 + db "@" + +Func_f2150: + ld hl, TextPointers_f215d + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp PrintText + +TextPointers_f215d: + dw CinnabarGymText_f2169 + dw CinnabarGymText_f216e + dw CinnabarGymText_f2173 + dw CinnabarGymText_f2178 + dw CinnabarGymText_f217d + dw CinnabarGymText_f2182 + +CinnabarGymText_f2169: + TX_FAR _CinnabarGymText_1 + db "@" + +CinnabarGymText_f216e: + TX_FAR _CinnabarGymText_2 + db "@" + +CinnabarGymText_f2173: + TX_FAR _CinnabarGymText_3 + db "@" + +CinnabarGymText_f2178: + TX_FAR _CinnabarGymText_4 + db "@" + +CinnabarGymText_f217d: + TX_FAR _CinnabarGymText_5 + db "@" + +CinnabarGymText_f2182: + TX_FAR _CinnabarGymText_6 + db "@" + +CinnabarGymText_f2187: + TX_FAR _CinnabarGymText_7 ; unused + db "@" diff --git a/scripts/cinnabarpokecenter.asm b/scripts/cinnabarpokecenter.asm index abae9d8d..fd49ae85 100755 --- a/scripts/cinnabarpokecenter.asm +++ b/scripts/cinnabarpokecenter.asm @@ -7,9 +7,10 @@ CinnabarPokecenterTextPointers: ; 75e32 (1d:5e32) dw CinnabarPokecenterText2 dw CinnabarPokecenterText3 dw CinnabarPokecenterText4 + dw CinnabarPokecenterText5 CinnabarPokecenterText1: ; 75e3a (1d:5e3a) - db $ff + TX_POKECENTER_NURSE CinnabarPokecenterText2: ; 75e3b (1d:5e3b) TX_FAR _CinnabarPokecenterText1 @@ -20,4 +21,9 @@ CinnabarPokecenterText3: ; 75e40 (1d:5e40) db "@" CinnabarPokecenterText4: ; 75e45 (1d:5e45) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST + +CinnabarPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index cbafc034..a03fd2d7 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -1,15 +1,72 @@ FanClubScript: ; 59b70 (16:5b70) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ld hl, FanClubScriptPointers + ld a, [W_FANCLUBCURSCRIPT] + call JumpTable + ret -FanClubBikeInBag: -; check if any bike paraphernalia in bag - CheckEvent EVENT_GOT_BIKE_VOUCHER - ret nz - ld b, BICYCLE - call IsItemInBag - ret nz - ld b, BIKE_VOUCHER - jp IsItemInBag +FanClubScriptPointers: + dw FanClubScript1 + dw FanClubScript2 + +FanClubScript1: + ld hl, wPreventBlackout + bit 7, [hl] + call z, FanClubScript_59a44 + ld hl, wPreventBlackout + set 7, [hl] + ret + +FanClubScript2: + ld hl, wPreventBlackout + bit 7, [hl] + call z, FanClubScript_59a39 + ld hl, wPreventBlackout + set 7, [hl] + ret + +FanClubScript_59a39: + call Random + ld a, [hRandomAdd] + cp 25 + call c, FanClubScript_59a44 + ret + +FanClubScript_59a44: + ld a, [wd472] + bit 7, a + ret z + callab Func_fce73 + ret c + ld a, $1 + ld [W_FANCLUBCURSCRIPT], a + xor a + ld [wPlayerMovingDirection], a + call UpdateSprites + call UpdateSprites + ld a, $0 + ld [wWhichEmotionBubble], a + ld a, $f ; Pikachu + ld [wEmotionBubbleSpriteIndex], a + predef EmotionBubble + ld hl, PikachuMovementScript_59a8c + call Func_159b + ld a, $2 + ld [wSpriteStateData1 + 3 * $10 + 1], a ; Seel + xor a ; SPRITE_FACING_DOWN + ld [wSpriteStateData1 + 3 * $10 + 9], a + callab InitializePikachuTextID + call DisablePikachuFollowingPlayer + ret + +PikachuMovementScript_59a8c: + db $00 + db $26 + db $20 + db $20 + db $20 + db $1e + db $3f FanClubTextPointers: ; 59b84 (16:5b84) dw FanClubText1 @@ -18,22 +75,28 @@ FanClubTextPointers: ; 59b84 (16:5b84) dw FanClubText4 dw FanClubText5 dw FanClubText6 - dw FanClubText7 - dw FanClubText8 FanClubText1: -; pikachu fan +; clefairy fan TX_ASM - CheckEvent EVENT_PIKACHU_FAN_BOAST + CheckEventHL EVENT_152 + jr z, .asm_59aaf + ld hl, .yellowtext + call PrintText + jr .done + +.asm_59aaf + CheckEventReuseHL EVENT_PIKACHU_FAN_BOAST jr nz, .mineisbetter + SetEventReuseHL EVENT_SEEL_FAN_BOAST ld hl, .normaltext call PrintText - SetEvent EVENT_SEEL_FAN_BOAST jr .done + .mineisbetter + ResetEventReuseHL EVENT_PIKACHU_FAN_BOAST ld hl, .bettertext call PrintText - ResetEvent EVENT_PIKACHU_FAN_BOAST .done jp TextScriptEnd @@ -45,19 +108,29 @@ FanClubText1: TX_FAR PikachuFanBetterText db "@" +.yellowtext + TX_FAR PikachuFanPrintText + db "@" + FanClubText2: ; seel fan TX_ASM - CheckEvent EVENT_SEEL_FAN_BOAST + CheckEventHL EVENT_152 + jr z, .asm_59ae7 + ld hl, .yellowtext + call PrintText + jr .done +.asm_59ae7 + CheckEventReuseHL EVENT_SEEL_FAN_BOAST jr nz, .mineisbetter + SetEventReuseHL EVENT_PIKACHU_FAN_BOAST ld hl, .normaltext call PrintText - SetEvent EVENT_PIKACHU_FAN_BOAST jr .done .mineisbetter + ResetEventReuseHL EVENT_SEEL_FAN_BOAST ld hl, .bettertext call PrintText - ResetEvent EVENT_SEEL_FAN_BOAST .done jp TextScriptEnd @@ -69,12 +142,16 @@ FanClubText2: TX_FAR SeelFanBetterText db "@" +.yellowtext + TX_FAR SeelFanPrintText + db "@" + FanClubText3: ; pikachu TX_ASM ld hl, .text call PrintText - ld a, PIKACHU + ld a, CLEFAIRY call PlayCry call WaitForSoundToFinish jp TextScriptEnd @@ -100,74 +177,131 @@ FanClubText4: FanClubText5: ; chair TX_ASM - call FanClubBikeInBag - jr nz, .nothingleft - - ld hl, .meetchairtext + CheckEventHL EVENT_152 + jr z, .check_bike_voucher + ld hl, Text_59c1f call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .nothanks + jr z, .select_mon_to_print + ld hl, Text_59c24 + jr .gbpals_print_text - ; tell the story - ld hl, .storytext +.check_bike_voucher + CheckEvent EVENT_GOT_BIKE_VOUCHER + jr nz, .got_bike_voucher_already + ld hl, Text_59bfc + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .declined_story + ld hl, Text_59c01 call PrintText lb bc, BIKE_VOUCHER, 1 call GiveItem - jr nc, .BagFull - ld hl, .receivedvouchertext + jr nc, .no_room_for_voucher + ld hl, Text_59c06 call PrintText SetEvent EVENT_GOT_BIKE_VOUCHER - jr .done -.BagFull - ld hl, .bagfulltext - call PrintText - jr .done -.nothanks - ld hl, .nostorytext - call PrintText - jr .done -.nothingleft - ld hl, .finaltext + jp TextScriptEnd + +.no_room_for_voucher + ld hl, Text_59c1a + jr .gbpals_print_text + +.declined_story + ld hl, Text_59c10 + jr .gbpals_print_text + +.got_bike_voucher_already + ld hl, Text_59c15 +.gbpals_print_text + push hl + call LoadGBPal + pop hl call PrintText -.done jp TextScriptEnd -.meetchairtext +.select_mon_to_print + call GBPalWhiteOutWithDelay3 + call LoadCurrentMapView + call SaveScreenTilesToBuffer2 + ld a, $ff + ld [wUpdateSpritesEnabled], a + ld a, $00 + ld [wTempTilesetNumTiles], a + call DisplayPartyMenu + jp nc, .print + call GBPalWhiteOutWithDelay3 + call RestoreScreenTilesAndReloadTilePatterns + ld hl, Text_59c24 + jr .gbpals_print_text + +.print + xor a + ld [wUpdateSpritesEnabled], a + ld hl, wd730 + set 6, [hl] + callab Func_e8e24 + ld hl, wd730 + res 6, [hl] + call GBPalWhiteOutWithDelay3 + call ReloadTilesetTilePatterns + call RestoreScreenTilesAndReloadTilePatterns + call LoadScreenTilesFromBuffer2 + call Delay3 + call GBPalNormal + ld hl, Text_59c2e + ld a, [hOaksAideResult] + and a + jr nz, .gbpals_print_text + ld hl, Text_59c29 + jr .gbpals_print_text + +Text_59bfc: TX_FAR FanClubMeetChairText db "@" -.storytext +Text_59c01: TX_FAR FanClubChairStoryText db "@" -.receivedvouchertext +Text_59c06: TX_FAR ReceivedBikeVoucherText - db $11 + TX_SFX_KEY_ITEM TX_FAR ExplainBikeVoucherText db "@" -.nostorytext +Text_59c10: TX_FAR FanClubNoStoryText db "@" -.finaltext +Text_59c15: TX_FAR FanClubChairFinalText db "@" -.bagfulltext +Text_59c1a: TX_FAR FanClubBagFullText db "@" -FanClubText6: ; 59c88 (16:5c88) - TX_FAR _FanClubText6 +Text_59c1f: + TX_FAR FanClubChairPrintText1 + db "@" + +Text_59c24: + TX_FAR FanClubChairPrintText2 + db "@" + +Text_59c29: + TX_FAR FanClubChairPrintText3 db "@" -FanClubText7: ; 59c8d (16:5c8d) - TX_FAR _FanClubText7 +Text_59c2e: + TX_FAR FanClubChairPrintText4 db "@" -FanClubText8: ; 59c92 (16:5c92) - TX_FAR _FanClubText8 +FanClubText6: ; 59c88 (16:5c88) + TX_FAR _FanClubText6 db "@" diff --git a/scripts/fuchsiamart.asm b/scripts/fuchsiamart.asm index 792dafa2..41aec49a 100755 --- a/scripts/fuchsiamart.asm +++ b/scripts/fuchsiamart.asm @@ -1,5 +1,6 @@ FuchsiaMartScript: ; 1dd88 (7:5d88) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret FuchsiaMartTextPointers: ; 1dd8b (7:5d8b) dw FuchsiaMartText1 diff --git a/scripts/fuchsiapokecenter.asm b/scripts/fuchsiapokecenter.asm index 26f88844..2ad3ac01 100755 --- a/scripts/fuchsiapokecenter.asm +++ b/scripts/fuchsiapokecenter.asm @@ -7,6 +7,7 @@ FuchsiaPokecenterTextPointers: ; 75069 (1d:5069) dw FuchsiaPokecenterText2 dw FuchsiaPokecenterText3 dw FuchsiaPokecenterText4 + dw FuchsiaPokecenterText5 FuchsiaPokecenterText1: ; 75071 (1d:5071) db $ff @@ -21,3 +22,8 @@ FuchsiaPokecenterText3: ; 75077 (1d:5077) FuchsiaPokecenterText4: ; 7507c (1d:507c) db $f6 + +FuchsiaPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/gary.asm b/scripts/gary.asm index 64734c58..290bd753 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -2,7 +2,8 @@ GaryScript: ; 75f1d (1d:5f1d) call EnableAutoTextBoxDrawing ld hl, GaryScriptPointers ld a, [W_GARYCURSCRIPT] - jp JumpTable + call JumpTable + ret GaryScript_75f29: ; 75f29 (1d:5f29) xor a @@ -40,9 +41,9 @@ GaryScript1: ; 75f48 (1d:5f48) ret RLEMovement75f63: ; 75f63 (1d:5f63) - db D_UP,1 - db D_RIGHT,1 - db D_UP,3 + db D_UP, 1 + db D_RIGHT, 1 + db D_UP, 3 db $ff GaryScript2: ; 75f6a (1d:5f6a) @@ -69,18 +70,7 @@ GaryScript2: ; 75f6a (1d:5f6a) ; select which team to use during the encounter ld a, [W_RIVALSTARTER] - cp STARTER2 - jr nz, .NotSquirtle - ld a, $1 - jr .done -.NotSquirtle - cp STARTER3 - jr nz, .Charmander - ld a, $2 - jr .done -.Charmander - ld a, $3 -.done + add $0 ; Wow GameFreak ld [wTrainerNo], a xor a @@ -217,8 +207,8 @@ GaryScript9: ; 76099 (1d:6099) ret RLEMovement760b4: ; 760b4 (1d:60b4) - db D_UP,4 - db D_LEFT,1 + db D_UP, 4 + db D_LEFT, 1 db $ff GaryScript10: ; 760b9 (1d:60b9) diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm index 7655d8c7..c639adb7 100755 --- a/scripts/indigoplateaulobby.asm +++ b/scripts/indigoplateaulobby.asm @@ -20,9 +20,10 @@ IndigoPlateauLobbyTextPointers: ; 19c7f (6:5c7f) dw IndigoPlateauLobbyText3 dw IndigoPlateauLobbyText4 dw IndigoPlateauLobbyText5 + dw IndigoPlateauLobbyText6 IndigoPlateauLobbyText1: ; 19c89 (6:5c89) - db $ff + TX_POKECENTER_NURSE IndigoPlateauLobbyText2: ; 19c8a (6:5c8a) TX_FAR _IndigoPlateauLobbyText1 @@ -33,4 +34,9 @@ IndigoPlateauLobbyText3: ; 19c8f (6:5c8f) db "@" IndigoPlateauLobbyText5: ; 19c94 (6:5c94) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST + +IndigoPlateauLobbyText6: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/lance.asm b/scripts/lance.asm index 4d9d393c..564e7ef1 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -17,22 +17,21 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4) jr nz, .asm_5a2da ld a, $31 ld b, $32 - jp LanceScript_5a2de + jp .asm_5a2de + .asm_5a2da ld a, $72 ld b, $73 - -LanceScript_5a2de: ; 5a2de (16:62de) +.asm_5a2de push bc ld [wNewTileBlockID], a lb bc, 6, 2 - call LanceScript_5a2f0 + call .asm_5a2f0 pop bc ld a, b ld [wNewTileBlockID], a lb bc, 6, 3 - -LanceScript_5a2f0: ; 5a2f0 (16:62f0) +.asm_5a2f0 predef_jump ReplaceTileBlock LanceScript_5a2f5: ; 5a2f5 (16:62f5) @@ -107,7 +106,7 @@ LanceScript_5a35b: ; 5a35b (16:635b) ret RLEList_5a379: ; 5a379 (16:6379) - db D_UP, $0C + db D_UP, $0D db D_LEFT, $0C db D_DOWN, $07 db D_LEFT, $06 diff --git a/scripts/lavenderpokecenter.asm b/scripts/lavenderpokecenter.asm index 452cc8a4..8f9c5454 100755 --- a/scripts/lavenderpokecenter.asm +++ b/scripts/lavenderpokecenter.asm @@ -7,12 +7,13 @@ LavenderPokecenterTextPointers: ; 5c8e0 (17:48e0) dw LavenderPokecenterText2 dw LavenderPokecenterText3 dw LavenderPokecenterText4 + dw LavenderPokecenterText5 LavenderPokecenterText4: ; 5c8e8 (17:48e8) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST LavenderPokecenterText1: ; 5c8e9 (17:48e9) - db $ff + TX_POKECENTER_NURSE LavenderPokecenterText2: ; 5c8ea (17:48ea) TX_FAR _LavenderPokecenterText1 @@ -21,3 +22,8 @@ LavenderPokecenterText2: ; 5c8ea (17:48ea) LavenderPokecenterText3: ; 5c8ef (17:48ef) TX_FAR _LavenderPokecenterText3 db "@" + +LavenderPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index 320ed070..9c35686f 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -36,5 +36,5 @@ MtMoonPokecenterText6: ; 49375 (12:5375) MtMoonPokecenterText7: TX_ASM - callab Func_f0f12 + callab PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 90f5e2b9..70cf17f6 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -14,7 +14,7 @@ PewterPokecenterTextPointers: ; 5c58d (17:458d) dw PewterPokecenterText6 PewterPokecenterText1: ; 5c595 (17:4595) - db $ff + TX_POKECENTER_NURSE PewterPokecenterText2: ; 5c596 (17:4596) TX_FAR _PewterPokecenterText1 @@ -26,7 +26,7 @@ PewterPokecenterText3: ; 5c59b (17:459b) jp TextScriptEnd PewterPokecenterText4: ; 5c60c (17:460c) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST PewterPokecenterText5: ; 5c603 (17:4603) TX_ASM @@ -35,5 +35,5 @@ PewterPokecenterText5: ; 5c603 (17:4603) PewterPokecenterText6: TX_ASM - callab Func_f0f12 + callab PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/pewterpokecenter2.asm b/scripts/pewterpokecenter2.asm index 1aae37d1..c884ad65 100755 --- a/scripts/pewterpokecenter2.asm +++ b/scripts/pewterpokecenter2.asm @@ -57,7 +57,7 @@ Func_f1da4: ret z callab Func_fce73 ret c - call SetPikachuAsleep + call DisablePikachuFollowingPlayer ret PewterPokecenterText_f1e19: diff --git a/scripts/pokemontower1.asm b/scripts/pokemontower1.asm index 4887e740..99b8efef 100755 --- a/scripts/pokemontower1.asm +++ b/scripts/pokemontower1.asm @@ -1,5 +1,6 @@ PokemonTower1Script: ; 6042c (18:442c) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret PokemonTower1TextPointers: ; 6042f (18:442f) dw PokemonTower1Text1 diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index 7aebf81b..6b0c1f00 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -22,9 +22,7 @@ PokemonTower2Script0: ; 6050f (18:450f) ld hl, CoordsData_6055e call ArePlayerCoordsInArray ret nc - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic @@ -71,14 +69,13 @@ PokemonTower2Script1: ; 60563 (18:4563) ld de, MovementData_605b2 CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT jr nz, .asm_60589 + callab Func_f1e22 ld de, MovementData_605a9 .asm_60589 ld a, $1 ld [H_SPRITEINDEX], a call MoveSprite - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic callba Music_RivalAlternateStart ld a, $2 ld [W_POKEMONTOWER2CURSCRIPT], a @@ -144,21 +141,8 @@ PokemonTower2Text1: ; 605df (18:45df) call SaveEndBattleTextPointers ld a, OPP_SONY2 ld [wCurOpponent], a - - ; select which team to use during the encounter ld a, [W_RIVALSTARTER] - cp STARTER2 - jr nz, .NotSquirtle - ld a, $4 - jr .done -.NotSquirtle - cp STARTER3 - jr nz, .Charmander - ld a, $5 - jr .done -.Charmander - ld a, $6 -.done + add $1 ld [wTrainerNo], a ld a, $1 diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index eb6d62e4..abf6104d 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -1,69 +1,234 @@ PokemonTower7Script: ; 60d05 (18:4d05) call EnableAutoTextBoxDrawing - ld hl, PokemonTower7TrainerHeaders - ld de, PokemonTower7ScriptPointers + ld hl, PokemonTower7ScriptPointers ld a, [W_POKEMONTOWER7CURSCRIPT] - call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER7CURSCRIPT], a + call JumpTable ret -PokemonTower7Script_60d18: ; 60d18 (18:4d18) +PokemonTower7Script_60d01: ; 60d18 (18:4d18) xor a ld [wJoyIgnore], a +PokemonTower7Script_60d05: ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a ret PokemonTower7ScriptPointers: - dw CheckFightingMapTrainers - dw DisplayEnemyTrainerTextAndStartBattle - dw PokemonTower7Script2 - dw PokemonTower7Script3 - dw PokemonTower7Script4 + dw PokemonTower7Script0 ; $4d21 + dw PokemonTower7Script1 ; $4d7f + dw PokemonTower7Script2 ; $4d9e + dw PokemonTower7Script3 ; $4da9 + dw PokemonTower7Script4 ; $4dbf + dw PokemonTower7Script5 ; $4dde + dw PokemonTower7Script6 ; $4de9 + dw PokemonTower7Script7 ; $4e0e + dw PokemonTower7Script8 ; $4e34 + dw PokemonTower7Script9 ; $4e7a + dw PokemonTower7Script10 ; $4e9b + dw PokemonTower7Script11 ; $4ec7 + +PokemonTower7Script0: + CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 + call z, PokemonTower7Script_60d2a + ret -PokemonTower7Script2: ; 60d23 (18:4d23) - ld hl, wFlags_0xcd60 - res 0, [hl] - ld a, [wIsInBattle] - cp $ff - jp z, PokemonTower7Script_60d18 - call EndTrainerBattle - ld a, $f0 +PokemonTower7Script_60d2a: + ld a, [wYCoord] + cp $c + ret nz + ResetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + ld a, [wXCoord] + cp $a + jr z, .asm_60d47 + ld a, [wXCoord] ; why? + cp $b + ret nz + SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 +.asm_60d47 + call StopAllMusic + ld c, BANK(Music_JessieAndJames) + ld a, MUSIC_JESSIE_AND_JAMES + call PlayMusic + xor a + ld [hJoyHeld], a + ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a - ld a, [wSpriteIndex] + ld a, HS_POKEMONTOWER_7_JESSIE + call PokemonTower7Script_60eaf + ld a, HS_POKEMONTOWER_7_JAMES + call PokemonTower7Script_60eaf + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld a, $4 ld [hSpriteIndexOrTextID], a call DisplayTextID - call PokemonTower7Script_60db6 - ld a, $3 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld a, $ff + ld [wJoyIgnore], a + ld a, $1 + call PokemonTower7Script_60d05 ret -PokemonTower7Script3: ; 60d56 (18:4d56) +PokemonTower7MovementData_60d7a: + db $4 +PokemonTower7MovementData_60d7b: + db $4 + db $4 + db $4 + db $FF + +PokemonTower7Script1: + ld de, PokemonTower7MovementData_60d7b + CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + jr z, .asm_60d8c + ld de, PokemonTower7MovementData_60d7a +.asm_60d8c + ld a, $1 + ld [hSpriteIndexOrTextID], a + call MoveSprite + ld a, $ff + ld [wJoyIgnore], a + ld a, $2 + call PokemonTower7Script_60d05 + ret + +PokemonTower7Script2: + ld a, $ff + ld [wJoyIgnore], a ld a, [wd730] bit 0, a ret nz - ld hl, wMissableObjectList - ld a, [wSpriteIndex] - ld b, a -.missableObjectsListLoop - ld a, [hli] - cp b ; search for sprite ID in missing objects list - ld a, [hli] - jr nz, .missableObjectsListLoop - ld [wMissableObjectIndex], a ; remove missable object - predef HideObject +PokemonTower7Script3: + ld a, $0 + ld [wSpriteStateData1 + 1 * $10 + 9], a + CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + jr z, .asm_60dba + ld a, $c + ld [wSpriteStateData1 + 1 * $10 + 9], a +.asm_60dba + ld a, $2 + ld [wSpriteStateData1 + 1 * $10 + 1], a +PokemonTower7Script4: + ld de, PokemonTower7MovementData_60d7a + CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + jr z, .asm_60dcc + ld de, PokemonTower7MovementData_60d7b +.asm_60dcc + ld a, $2 + ld [hSpriteIndexOrTextID], a + call MoveSprite + ld a, $ff + ld [wJoyIgnore], a + ld a, $5 + call PokemonTower7Script_60d05 + ret +PokemonTower7Script5: + ld a, $ff + ld [wJoyIgnore], a + ld a, [wd730] + bit 0, a + ret nz +PokemonTower7Script6: + ld a, $2 + ld [wSpriteStateData1 + $2 * $10 + $1], a + ld a, $8 + ld [wSpriteStateData1 + $2 * $10 + $9], a + CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + jr z, .asm_60dff + ld a, $0 + ld [wSpriteStateData1 + $2 * $10 + $9], a +.asm_60dff + call Delay3 + ld a, $FF ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld a, $5 + ld [hSpriteIndexOrTextID], a + call DisplayTextID +PokemonTower7Script7: + ld hl, wd72d + set 6, [hl] + set 7, [hl] + ld hl, PokemonTower7JessieJamesEndBattleText ; 60f2c + ld de, PokemonTower7JessieJamesEndBattleText ; 60f2c + call SaveEndBattleTextPointers + ld a, OPP_ROCKET + ld [wCurOpponent], a + ld a, $2c + ld [wTrainerNo], a + xor a + ld [hJoyHeld], a + ld [wJoyIgnore], a + ld a, $8 + call PokemonTower7Script_60d05 + ret + +PokemonTower7Script8: + ld a, $ff + ld [wJoyIgnore], a + ld a, [wIsInBattle] + cp $ff + jp z, PokemonTower7Script_60d01 + ld a, $2 + ld [wSpriteStateData1 + 1 * $10 + 1], a + ld [wSpriteStateData1 + 2 * $10 + 1], a + xor a + ld [wSpriteStateData1 + 1 * $10 + 9], a + ld [wSpriteStateData1 + 2 * $10 + 9], a + ld a, $FF ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld a, $6 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + xor a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call StopAllMusic + ld c, BANK(Music_JessieAndJames) + ld a, MUSIC_JESSIE_AND_JAMES + call PlayMusic + ld a, $ff + ld [wJoyIgnore], a + ld a, $9 + call PokemonTower7Script_60d05 + ret + +PokemonTower7Script9: + ld a, $ff + ld [wJoyIgnore], a + call GBFadeOutToBlack + ld a, HS_POKEMONTOWER_7_JESSIE + call PokemonTower7Script_60ebe + ld a, HS_POKEMONTOWER_7_JAMES + call PokemonTower7Script_60ebe + call UpdateSprites + call Delay3 + call GBFadeInFromBlack + ld a, $a + call PokemonTower7Script_60d05 + ret + +PokemonTower7Script10: + call PlayDefaultMusic xor a + ld [hJoyHeld], a ld [wJoyIgnore], a - ld [wSpriteIndex], a - ld [wTrainerHeaderFlagBit], a - ld [wUnusedDA38], a + SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 ld a, $0 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + call PokemonTower7Script_60d05 ret -PokemonTower7Script4: ; 60d86 (18:4d86) +PokemonTower7Script_60eaf: + ld [wMissableObjectIndex], a + predef ShowObject + call UpdateSprites + call Delay3 + ret + +PokemonTower7Script_60ebe + ld [wMissableObjectIndex], a + predef HideObject + ret + +PokemonTower7Script11: ld a, $ff ld [wJoyIgnore], a ld a, HS_POKEMONTOWER_7_MR_FUJI @@ -81,180 +246,54 @@ PokemonTower7Script4: ; 60d86 (18:4d86) set 3, [hl] ld a, $0 ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a ret -PokemonTower7Script_60db6: ; 60db6 (18:4db6) - ld hl, CoordsData_60de3 - ld a, [wSpriteIndex] - dec a - swap a - ld d, $0 - ld e, a - add hl, de - ld a, [wYCoord] - ld b, a - ld a, [wXCoord] - ld c, a -.asm_60dcb - ld a, [hli] - cp b - jr nz, .asm_60dde - ld a, [hli] - cp c - jr nz, .asm_60ddf - ld a, [hli] - ld d, [hl] - ld e, a - ld a, [wSpriteIndex] - ld [H_SPRITEINDEX], a - jp MoveSprite -.asm_60dde - inc hl -.asm_60ddf - inc hl - inc hl - jr .asm_60dcb - -CoordsData_60de3: ; 60de3 (18:4de3) - db $0C,$09 - dw MovementData_60e13 - db $0B,$0A - dw MovementData_60e1b - db $0B,$0B - dw MovementData_60e22 - db $0B,$0C - dw MovementData_60e22 - db $0A,$0C - dw MovementData_60e28 - db $09,$0B - dw MovementData_60e30 - db $09,$0A - dw MovementData_60e22 - db $09,$09 - dw MovementData_60e22 - db $08,$09 - dw MovementData_60e37 - db $07,$0A - dw MovementData_60e22 - db $07,$0B - dw MovementData_60e22 - db $07,$0C - dw MovementData_60e22 - -MovementData_60e13: ; 60e13 - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_LEFT - db $FF - -MovementData_60e1b: ; 60e1b - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -MovementData_60e22: ; 60e22 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -MovementData_60e28: ; 60e28 - db NPC_MOVEMENT_LEFT - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -MovementData_60e30: ; 60e30 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_LEFT - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -MovementData_60e37: ; 60e37 - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -PokemonTower7TextPointers: ; 60e3f (18:4e3f) +PokemonTower7TextPointers: dw PokemonTower7Text1 dw PokemonTower7Text2 dw PokemonTower7Text3 - dw PokemonTower7FujiText - -PokemonTower7TrainerHeaders: ; 60e47 (18:4e47) -PokemonTower7TrainerHeader0: ; 60e47 (18:4e47) - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 - dw PokemonTower7BattleText1 ; TextBeforeBattle - dw PokemonTower7AfterBattleText1 ; TextAfterBattle - dw PokemonTower7EndBattleText1 ; TextEndBattle - dw PokemonTower7EndBattleText1 ; TextEndBattle + dw PokemonTower7Text4 + dw PokemonTower7Text5 + dw PokemonTower7Text6 -PokemonTower7TrainerHeader1: ; 60e53 (18:4e53) - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 - dw PokemonTower7BattleText2 ; TextBeforeBattle - dw PokemonTower7AfterBattleText2 ; TextAfterBattle - dw PokemonTower7EndBattleText2 ; TextEndBattle - dw PokemonTower7EndBattleText2 ; TextEndBattle - -PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f) - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 - dw PokemonTower7BattleText3 ; TextBeforeBattle - dw PokemonTower7AfterBattleText3 ; TextAfterBattle - dw PokemonTower7EndBattleText3 ; TextEndBattle - dw PokemonTower7EndBattleText3 ; TextEndBattle - - db $ff +PokemonTower7Text1: +PokemonTower7Text2: + db "@" -PokemonTower7Text1: ; 60e6c (18:4e6c) +PokemonTower7Text4: + TX_FAR _PokemonTowerJessieJamesText1 TX_ASM - ld hl, PokemonTower7TrainerHeader0 - call TalkToTrainer + ld c, 10 + call DelayFrames + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + ld a, $0 + ld [wEmotionBubbleSpriteIndex], a + ld a, $0 + ld [wWhichEmotionBubble], a + predef EmotionBubble + ld c, 20 + call DelayFrames jp TextScriptEnd -PokemonTower7Text2: ; 60e76 (18:4e76) - TX_ASM - ld hl, PokemonTower7TrainerHeader1 - call TalkToTrainer - jp TextScriptEnd +PokemonTower7Text5: + TX_FAR _PokemonTowerJessieJamesText2 + db "@" -PokemonTower7Text3: ; 60e80 (18:4e80) +PokemonTower7JessieJamesEndBattleText: + TX_FAR _PokemonTowerJessieJamesText3 + db "@" + +PokemonTower7Text6: + TX_FAR _PokemonTowerJessieJamesText4 TX_ASM - ld hl, PokemonTower7TrainerHeader2 - call TalkToTrainer + ld c, 64 + call DelayFrames jp TextScriptEnd -PokemonTower7FujiText: +PokemonTower7Text3: TX_ASM - ld hl, TowerRescueFujiText + ld hl, PokemonTower7Text_60f75 call PrintText SetEvent EVENT_RESCUED_MR_FUJI SetEvent EVENT_RESCUED_MR_FUJI_2 @@ -267,47 +306,10 @@ PokemonTower7FujiText: ld a, HS_SAFFRON_CITY_F ld [wMissableObjectIndex], a predef ShowObject - ld a, $4 + ld a, $b ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a jp TextScriptEnd -TowerRescueFujiText: +PokemonTower7Text_60f75: TX_FAR _TowerRescueFujiText db "@" - -PokemonTower7BattleText1: ; 60ec9 (18:4ec9) - TX_FAR _PokemonTower7BattleText1 - db "@" - -PokemonTower7EndBattleText1: ; 60ece (18:4ece) - TX_FAR _PokemonTower7EndBattleText1 - db "@" - -PokemonTower7AfterBattleText1: ; 60ed3 (18:4ed3) - TX_FAR _PokemonTower7AfterBattleText1 - db "@" - -PokemonTower7BattleText2: ; 60ed8 (18:4ed8) - TX_FAR _PokemonTower7BattleText2 - db "@" - -PokemonTower7EndBattleText2: ; 60edd (18:4edd) - TX_FAR _PokemonTower7EndBattleText2 - db "@" - -PokemonTower7AfterBattleText2: ; 60ee2 (18:4ee2) - TX_FAR _PokemonTower7AfterBattleText2 - db "@" - -PokemonTower7BattleText3: ; 60ee7 (18:4ee7) - TX_FAR _PokemonTower7BattleText3 - db "@" - -PokemonTower7EndBattleText3: ; 60eec (18:4eec) - TX_FAR _PokemonTower7EndBattleText3 - db "@" - -PokemonTower7AfterBattleText3: ; 60ef1 (18:4ef1) - TX_FAR _PokemonTower7AfterBattleText3 - db "@" diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index 815f6090..75cb7912 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -1,5 +1,4 @@ RocketHideout4Script: ; 4545d (11:545d) - call RocketHideout4Script_45473 call EnableAutoTextBoxDrawing ld hl, RocketHideout4TrainerHeader0 ld de, RocketHideout4ScriptPointers @@ -8,47 +7,44 @@ RocketHideout4Script: ; 4545d (11:545d) ld [W_ROCKETHIDEOUT4CURSCRIPT], a ret -RocketHideout4Script_45473: ; 45473 (11:5473) - ld hl, wd126 - bit 5, [hl] - res 5, [hl] - ret z - CheckEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED - jr nz, .asm_45496 - CheckBothEventsSet EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0, EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1 - jr z, .asm_4548c - ld a, $2d - jr .asm_45498 -.asm_4548c - ld a, SFX_GO_INSIDE - call PlaySound - SetEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED -.asm_45496 - ld a, $e -.asm_45498 - ld [wNewTileBlockID], a - lb bc, 5, 12 - predef_jump ReplaceTileBlock - -RocketHideout4Script_454a3: ; 454a3 (11:54a3) +RocketHideout4Script_45510: ; 45510 (11:54a3) + CheckAndResetEvent EVENT_6A0 + call nz, RocketHideout4Script_45525 xor a ld [wJoyIgnore], a +RocketHideout4Script_4551e: ld [W_ROCKETHIDEOUT4CURSCRIPT], a ld [W_CURMAPSCRIPT], a ret +RocketHideout4Script_45525: + ld a, HS_ROCKET_HIDEOUT_4_JAMES + call RocketHideout4Script_45756 + ld a, HS_ROCKET_HIDEOUT_4_JESSIE + call RocketHideout4Script_45756 + ret + RocketHideout4ScriptPointers: ; 454ae (11:54ae)c - dw CheckFightingMapTrainers + dw RocketHideout4Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout4Script3 + dw RocketHideout4Script4 + dw RocketHideout4Script5 + dw RocketHideout4Script6 + dw RocketHideout4Script7 + dw RocketHideout4Script8 + dw RocketHideout4Script9 + dw RocketHideout4Script10 + dw RocketHideout4Script11 + dw RocketHideout4Script12 + dw RocketHideout4Script13 RocketHideout4Script3: ; 454b6 (11:54b6) ld a, [wIsInBattle] cp $ff - jp z, RocketHideout4Script_454a3 - call UpdateSprites - ld a, $f0 + jp z, RocketHideout4Script_45510 + ld a, $fc ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ld a, $a @@ -72,61 +68,296 @@ RocketHideout4Script3: ; 454b6 (11:54b6) ld [W_CURMAPSCRIPT], a ret +RocketHideout4Script0: + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 + call z, RocketHideout4Script_455a5 + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_3 + call z, CheckFightingMapTrainers + ret + +RocketHideout4Script_455a5: + ld a, [wYCoord] + cp $e + ret nz + ResetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + ld a, [wXCoord] + cp $18 + jr z, .asm_455c2 + ld a, [wXCoord] + cp $19 + ret nz + SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 +.asm_455c2 + xor a + ld [hJoyHeld], a + ld a, $fc + ld [wJoyIgnore], a + call StopAllMusic + ld c, BANK(Music_JessieAndJames) + ld a, MUSIC_JESSIE_AND_JAMES + call PlayMusic + call UpdateSprites + call Delay3 + call UpdateSprites + call Delay3 + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld a, $b + ld [hSpriteIndexOrTextID], a + call DisplayTextID + xor a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld a, $ff + ld [wJoyIgnore], a + ld a, HS_ROCKET_HIDEOUT_4_JAMES + call RocketHideout4Script_45747 + ld a, HS_ROCKET_HIDEOUT_4_JESSIE + call RocketHideout4Script_45747 + ld a, $4 + call RocketHideout4Script_4551e + ret + +RocketHideout4JessieJamesMovementData_45605: + db $4 +RocketHideout4JessieJamesMovementData_45606: + db $4 + db $4 + db $4 + db $ff + +RocketHideout4Script4: + ld de, RocketHideout4JessieJamesMovementData_45605 + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + jr z, .asm_45617 + ld de, RocketHideout4JessieJamesMovementData_45606 +.asm_45617 + ld a, $2 + ld [hSpriteIndexOrTextID], a + call MoveSprite + ld a, $ff + ld [wJoyIgnore], a + ld a, $5 + call RocketHideout4Script_4551e + ret + +RocketHideout4Script5: + ld a, $ff + ld [wJoyIgnore], a + ld a, [wd730] + bit 0, a + ret nz +RocketHideout4Script6: + ld a, $2 + ld [wSpriteStateData1 + 2 * $10 + 1], a + ld a, SPRITE_FACING_LEFT + ld [wSpriteStateData1 + 2 * $10 + 9], a + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + jr z, .asm_4564a + ld a, SPRITE_FACING_DOWN + ld [wSpriteStateData1 + 2 * $10 + 9], a +.asm_4564a + call Delay3 + ld a, $fc + ld [wJoyIgnore], a +RocketHideout4Script7: + ld de, RocketHideout4JessieJamesMovementData_45606 + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + jr z, .asm_4565f + ld de, RocketHideout4JessieJamesMovementData_45605 +.asm_4565f + ld a, $3 + ld [hSpriteIndexOrTextID], a + call MoveSprite + ld a, $ff + ld [wJoyIgnore], a + ld a, $8 + call RocketHideout4Script_4551e + ret + +RocketHideout4Script8: + ld a, $ff + ld [wJoyIgnore], a + ld a, [wd730] + bit 0, a + ret nz + ld a, $fc + ld [wJoyIgnore], a +RocketHideout4Script9: + ld a, $2 + ld [wSpriteStateData1 + 3 * $10 + 1], a + ld a, SPRITE_FACING_DOWN + ld [wSpriteStateData1 + 3 * $10 + 9], a + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + jr z, .asm_45697 + ld a, SPRITE_FACING_RIGHT + ld [wSpriteStateData1 + 3 * $10 + 9], a +.asm_45697 + call Delay3 + ld a, $c + ld [hSpriteIndexOrTextID], a + call DisplayTextID +RocketHideout4Script10: + ld hl, wd72d + set 6, [hl] + set 7, [hl] + ld hl, RocketHideout4JessieJamesEndBattleText ; 457b2 + ld de, RocketHideout4JessieJamesEndBattleText ; 457b2 + call SaveEndBattleTextPointers + ld a, OPP_ROCKET + ld [wCurOpponent], a + ld a, $2b + ld [wTrainerNo], a + xor a + ld [hJoyHeld], a + ld [wJoyIgnore], a + SetEvent EVENT_6A0 + ld a, $b + call RocketHideout4Script_4551e + ret + +RocketHideout4Script11: + ld a, $ff + ld [wJoyIgnore], a + ld a, [wIsInBattle] + cp $ff + jp z, RocketHideout4Script_45510 + ld a, $2 + ld [wSpriteStateData1 + 2 * $10 + 1], a + ld [wSpriteStateData1 + 3 * $10 + 1], a + xor a + ld [wSpriteStateData1 + 2 * $10 + 9], a + ld [wSpriteStateData1 + 3 * $10 + 9], a + ld a, $fc + ld [wJoyIgnore], a + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld a, $d + ld [hSpriteIndexOrTextID], a + call DisplayTextID + xor a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call StopAllMusic + ld c, BANK(Music_JessieAndJames) + ld a, MUSIC_JESSIE_AND_JAMES + call PlayMusic + ld a, $ff + ld [wJoyIgnore], a + ld a, $c + call RocketHideout4Script_4551e + ret + +RocketHideout4Script12: + ld a, $ff + ld [wJoyIgnore], a + call GBFadeOutToBlack + ld a, HS_ROCKET_HIDEOUT_4_JAMES + call RocketHideout4Script_45756 + ld a, HS_ROCKET_HIDEOUT_4_JESSIE + call RocketHideout4Script_45756 + call UpdateSprites + call Delay3 + call GBFadeInFromBlack + ld a, $d + call RocketHideout4Script_4551e + ret + +RocketHideout4Script13: + call PlayDefaultMusic + xor a + ld [hJoyHeld], a + ld [wJoyIgnore], a + ld hl, wd81b + set 2, [hl] + ld a, $0 + call RocketHideout4Script_4551e + ret + +RocketHideout4Script_45747: + ld [wMissableObjectIndex], a + predef ShowObject + call UpdateSprites + call Delay3 + ret + +RocketHideout4Script_45756: + ld [wMissableObjectIndex], a + predef HideObject + ret + RocketHideout4TextPointers: ; 45501 (11:5501) + dw RocketHideout4Text0 dw RocketHideout4Text1 dw RocketHideout4Text2 dw RocketHideout4Text3 - dw RocketHideout4Text4 dw PickUpItemText dw PickUpItemText dw PickUpItemText dw PickUpItemText dw PickUpItemText + dw RocketHideout4Text9 dw RocketHideout4Text10 + dw RocketHideout4Text11 + dw RocketHideout4Text12 -RocketHideout4TrainerHeaders: ; 45515 (11:5515) -RocketHideout4TrainerHeader0: ; 45515 (11:5515) - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 - dw RocketHideout4BattleText2 ; TextBeforeBattle - dw RocketHideout4AfterBattleText2 ; TextAfterBattle - dw RocketHideout4EndBattleText2 ; TextEndBattle - dw RocketHideout4EndBattleText2 ; TextEndBattle - -RocketHideout4TrainerHeader2: ; 45521 (11:5521) - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 - dw RocketHideout4BattleText3 ; TextBeforeBattle - dw RocketHideout4AfterBattleText3 ; TextAfterBattle - dw RocketHideout4EndBattleText3 ; TextEndBattle - dw RocketHideout4EndBattleText3 ; TextEndBattle - -RocketHideout4TrainerHeader3: ; 4552d (11:552d) +RocketHideout4TrainerHeaders: +RocketHideout4TrainerHeader0: dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_3 - db ($1 << 4) ; trainer's view range + db ($1 << 4) dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_3 - dw RocketHideout4BattleText4 ; TextBeforeBattle - dw RocketHideout4AfterBattleText4 ; TextAfterBattle - dw RocketHideout4EndBattleText4 ; TextEndBattle - dw RocketHideout4EndBattleText4 ; TextEndBattle - + dw RocketHideout4Trainer0BeforeText ; 4581d + dw RocketHideout4Trainer0AfterText ; 4583a + dw RocketHideout4Trainer0EndBattleText ; 45822 + dw RocketHideout4Trainer0EndBattleText ; 45822 db $ff -RocketHideout4Text1: ; 4553a (11:553a) +RocketHideout4Text1: +RocketHideout4Text2: + db "@" + +RocketHideout4Text10: + TX_FAR _RocketHideoutJessieJamesText1 + TX_ASM + ld c, 10 + call DelayFrames + ld a, $8 + ld [wPlayerMovingDirection], a + ld a, $0 + ld [wEmotionBubbleSpriteIndex], a + ld a, $0 + ld [wWhichEmotionBubble], a + predef EmotionBubble + ld c, 20 + call DelayFrames + jp TextScriptEnd + +RocketHideout4Text11: + TX_FAR _RocketHideoutJessieJamesText2 + db "@" + +RocketHideout4JessieJamesEndBattleText: + TX_FAR _RocketHideoutJessieJamesText3 + db "@" + +RocketHideout4Text12: + TX_FAR _RocketHideoutJessieJamesText4 + TX_ASM + ld c, 64 + call DelayFrames + jp TextScriptEnd + +RocketHideout4Text0: TX_ASM CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI - jp nz, .asm_545571 - ld hl, RocketHideout4Text_4557a + jp nz, .asm_457fb + ld hl, RocketHideout4Text_45804 call PrintText ld hl, wd72d set 6, [hl] set 7, [hl] - ld hl, RocketHideout4Text_4557f - ld de, RocketHideout4Text_4557f + ld hl, RocketHideout4Text_45809 + ld de, RocketHideout4Text_45809 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -135,87 +366,52 @@ RocketHideout4Text1: ; 4553a (11:553a) ld a, $3 ld [W_ROCKETHIDEOUT4CURSCRIPT], a ld [W_CURMAPSCRIPT], a - jr .asm_209f0 -.asm_545571 - ld hl, RocketHideout4Text10 + jr .asm_45801 + +.asm_457fb + ld hl, RocketHideout4Text9 call PrintText -.asm_209f0 +.asm_45801 jp TextScriptEnd -RocketHideout4Text_4557a: ; 4557a (11:557a) +RocketHideout4Text_45804: TX_FAR _RocketHideout4Text_4557a db "@" -RocketHideout4Text_4557f: ; 4557f (11:557f) +RocketHideout4Text_45809: TX_FAR _RocketHideout4Text_4557f db "@" -RocketHideout4Text10: ; 45584 (11:5584) +RocketHideout4Text9: TX_FAR _RocketHideout4Text_45584 db "@" -RocketHideout4Text2: ; 45589 (11:5589) +RocketHideout4Text3: TX_ASM ld hl, RocketHideout4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RocketHideout4BattleText2: ; 45593 (11:5593) - TX_FAR _RocketHideout4BattleText2 - db "@" - -RocketHideout4EndBattleText2: ; 45598 (11:5598) - TX_FAR _RocketHideout4EndBattleText2 - db "@" - -RocketHideout4AfterBattleText2: ; 4559d (11:559d) - TX_FAR _RocketHide4AfterBattleText2 - db "@" - -RocketHideout4Text3: ; 455a2 (11:55a2) - TX_ASM - ld hl, RocketHideout4TrainerHeader2 - call TalkToTrainer - jp TextScriptEnd - -RocketHideout4BattleText3: ; 455ac (11:55ac) - TX_FAR _RocketHideout4BattleText3 - db "@" - -RocketHideout4EndBattleText3: ; 455b1 (11:55b1) - TX_FAR _RocketHideout4EndBattleText3 - db "@" - -RocketHideout4AfterBattleText3: ; 455b6 (11:55b6) - TX_FAR _RocketHide4AfterBattleText3 - db "@" - -RocketHideout4Text4: ; 455bb (11:55bb) - TX_ASM - ld hl, RocketHideout4TrainerHeader3 - call TalkToTrainer - jp TextScriptEnd - -RocketHideout4BattleText4: ; 455c5 (11:55c5) +RocketHideout4Trainer0BeforeText: TX_FAR _RocketHideout4BattleText4 db "@" -RocketHideout4EndBattleText4: ; 455ca (11:55ca) +RocketHideout4Trainer0EndBattleText: TX_FAR _RocketHideout4EndBattleText4 - db "@" - -RocketHideout4AfterBattleText4: ; 455cf (11:55cf) + TX_BUTTON_SOUND TX_ASM - ld hl, RocketHideout4Text_455ec - call PrintText - CheckAndSetEvent EVENT_ROCKET_DROPPED_LIFT_KEY - jr nz, .asm_455e9 + SetEvent EVENT_ROCKET_DROPPED_LIFT_KEY ld a, HS_ROCKET_HIDEOUT_4_ITEM_5 ld [wMissableObjectIndex], a predef ShowObject -.asm_455e9 jp TextScriptEnd -RocketHideout4Text_455ec: ; 455ec (11:55ec) +RocketHideout4Trainer0AfterText: + TX_ASM + ld hl, RocketHideout4Text_45844 + call PrintText + jp TextScriptEnd + +RocketHideout4Text_45844: TX_FAR _RocketHideout4Text_455ec db "@" diff --git a/scripts/rocktunnelpokecenter.asm b/scripts/rocktunnelpokecenter.asm index 7d8f4bf6..3518bd8f 100755 --- a/scripts/rocktunnelpokecenter.asm +++ b/scripts/rocktunnelpokecenter.asm @@ -25,5 +25,5 @@ RockTunnelPokecenterText4: ; 493d3 (12:53d3) RockTunnelPokecenterText5: TX_ASM - callab Func_f0f12 + callab PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index ec543a6a..e41e46e5 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -9,7 +9,7 @@ Route11GateUpstairsTextPointers: ; 49457 (12:5457) Route11GateUpstairsText1: ; 4945f (12:545f) TX_ASM - xor a + ld a, $0 ld [wWhichTrade], a predef DoInGameTradeDialogue Route11GateUpstairsScriptEnd: ; 49469 (12:5469) diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index 5fdd70c8..c957e4a6 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -23,9 +23,12 @@ Route22GateScript0: ; 1e6a4 (7:66a4) ret nc xor a ld [hJoyHeld], a + ld a, SPRITE_FACING_LEFT + ld [wSpriteStateData1 + 1 * $10 + 9], a ld a, $1 ld [hSpriteIndexOrTextID], a - jp DisplayTextID + call DisplayTextID + ret Route22GateScriptCoords: ; 1e6b5 (7:66b5) db 2,4 @@ -59,7 +62,7 @@ Route22GateTextPointers: ; 1e6df (7:66df) Route22GateText1: ; 1e6e1 (7:66e1) TX_ASM ld a, [wObtainedBadges] - bit 0, a + bit 0, a ; BOULDERBADGE jr nz, .asm_1e6f6 ld hl, Route22GateText_1e704 call PrintText @@ -89,4 +92,5 @@ Route22GateText_1e715: ; 1e715 (7:6715) Route22GateText_1e71a: ; 1e71a (7:671a) TX_FAR _Route22GateText_1e71a - db $0B, "@" + TX_SFX_ITEM + db "@" diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index a0a0ffda..df80f4e1 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -2,7 +2,8 @@ SafariZoneEntranceScript: ; 751cd (1d:51cd) call EnableAutoTextBoxDrawing ld hl, SafariZoneEntranceScriptPointers ld a, [wSafariZoneEntranceCurScript] - jp JumpTable + call JumpTable + ret SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) dw .SafariZoneEntranceScript0 @@ -43,8 +44,8 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) ret .CoordsData_75221: ; 75221 (1d:5221) - db $02,$03 - db $02,$04 + db $02, $03 + db $02, $04 db $FF .SafariZoneEntranceScript1 @@ -85,6 +86,8 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) call DisplayTextID xor a ld [wNumSafariBalls], a + ld [wSafariSteps], a + ld [wSafariSteps], a ; ????? ld a, D_DOWN ld c, $3 call SafariZoneEntranceAutoWalk @@ -117,10 +120,10 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) SafariZoneEntranceAutoWalk: push af - ld b,0 - ld a,c - ld [wSimulatedJoypadStatesIndex],a - ld hl,wSimulatedJoypadStatesEnd + ld b, 0 + ld a, c + ld [wSimulatedJoypadStatesIndex], a + ld hl, wSimulatedJoypadStatesEnd pop af call FillMemory jp StartSimulatingJoypadStates @@ -143,89 +146,15 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) db "@" .SafariZoneEntranceText4 - TX_FAR SafariZoneEntranceText_9e6e4 TX_ASM - ld a, MONEY_BOX - ld [wTextBoxID],a - call DisplayTextBoxID - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - jp nz,.PleaseComeAgain - xor a - ld [hMoney],a - ld a,$05 - ld [hMoney + 1],a - ld a,$00 - ld [hMoney + 2],a - call HasEnoughMoney - jr nc,.success - ld hl,.NotEnoughMoneyText - call PrintText - jr .CantPayWalkDown - -.success - xor a - ld [wPriceTemp],a - ld a,$05 - ld [wPriceTemp + 1],a - ld a,$00 - ld [wPriceTemp + 2],a - ld hl,wPriceTemp + 2 - ld de,wPlayerMoney + 2 - ld c,3 - predef SubBCDPredef - ld a,MONEY_BOX - ld [wTextBoxID],a - call DisplayTextBoxID - ld hl,.MakePaymentText - call PrintText - ld a,30 - ld [wNumSafariBalls],a - ld a,502 / $100 - ld [wSafariSteps],a - ld a, 502 % $100 - ld [wSafariSteps + 1],a - ld a,D_UP - ld c,3 - call SafariZoneEntranceAutoWalk - SetEvent EVENT_IN_SAFARI_ZONE - ResetEventReuseHL EVENT_SAFARI_GAME_OVER - ld a,3 - ld [wSafariZoneEntranceCurScript],a - jr .done - -.PleaseComeAgain - ld hl,.PleaseComeAgainText - call PrintText -.CantPayWalkDown - ld a,D_DOWN - ld c,1 - call SafariZoneEntranceAutoWalk - ld a,4 - ld [wSafariZoneEntranceCurScript],a -.done + callab Func_f1f77 jp TextScriptEnd -.MakePaymentText - TX_FAR SafariZoneEntranceText_9e747 - db $b - TX_FAR _SafariZoneEntranceText_75360 - db "@" - -.PleaseComeAgainText - TX_FAR _SafariZoneEntranceText_75365 - db "@" - -.NotEnoughMoneyText - TX_FAR _SafariZoneEntranceText_7536a - db "@" - .SafariZoneEntranceText5 TX_FAR SafariZoneEntranceText_9e814 TX_ASM call YesNoChoice - ld a,[wCurrentMenuItem] + ld a, [wCurrentMenuItem] and a jr nz, .asm_7539c ld hl, .SafariZoneEntranceText_753bb @@ -268,26 +197,5 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) .SafariZoneEntranceText2 TX_ASM - ld hl,.FirstTimeQuestionText - call PrintText - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - ld hl,.RegularText - jr nz,.Explanation - ld hl,.ExplanationText -.Explanation - call PrintText + callab Func_f203e jp TextScriptEnd - -.FirstTimeQuestionText - TX_FAR _SafariZoneEntranceText_753e6 - db "@" - -.ExplanationText - TX_FAR _SafariZoneEntranceText_753eb - db "@" - -.RegularText - TX_FAR _SafariZoneEntranceText_753f0 - db "@" diff --git a/scripts/safarizoneentrance2.asm b/scripts/safarizoneentrance2.asm new file mode 100755 index 00000000..0eb50790 --- /dev/null +++ b/scripts/safarizoneentrance2.asm @@ -0,0 +1,251 @@ +Func_f1f77: + ld hl, .WelcomeText + call PrintText + ld a, MONEY_BOX + ld [wTextBoxID], a + call DisplayTextBoxID + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jp nz, .declined + ld hl, wPlayerMoney + ld a, [hli] + or [hl] + inc hl + or [hl] + jr nz, .has_positive_balance + call SafariZoneEntranceGetLowCostAdmissionText + jr c, .deny_entry + jr .poor_mans_discount + +.has_positive_balance + xor a + ld [hMoney], a + ld a, $5 + ld [hMoney + 1], a + ld a, $0 + ld [hMoney + 2], a + call HasEnoughMoney + jr nc, .has_enough_money + ld hl, .NotEnoughMoneyText + call PrintText + call SafariZoneEntranceCalculateLowCostAdmission + jr c, .deny_entry + jr .poor_mans_discount + +.has_enough_money + xor a + ld [wPriceTemp + 0], a + ld a, $5 + ld [wPriceTemp + 1], a + ld a, $0 + ld [wPriceTemp + 2], a + ld hl, wTrainerInfoTextBoxNextRowOffset + ld de, wPlayerMoney + 2 + ld c, 3 + predef SubBCDPredef + ld a, SFX_PURCHASE + call PlaySoundWaitForCurrent + call WaitForSoundToFinish + ld a, MONEY_BOX + ld [wTextBoxID], a + call DisplayTextBoxID + ld hl, .MakePaymentText + call PrintText + ld a, 30 + ld hl, 502 +.poor_mans_discount + ld [wNumSafariBalls], a + ld a, h + ld [wSafariSteps], a + ld a, l + ld [wSafariSteps + 1], a + ld a, D_UP + ld c, 3 + call SafariZoneEntranceStartSimulatiingJoypadStates + SetEvent EVENT_IN_SAFARI_ZONE + ResetEventReuseHL EVENT_SAFARI_GAME_OVER + ld a, $3 + ld [wSafariZoneEntranceCurScript], a + jr .asm_f2024 +.declined: + ld hl, .PleaseComeAgainText + call PrintText +.deny_entry + ld a, D_DOWN + ld c, 1 + call SafariZoneEntranceStartSimulatiingJoypadStates + ld a, $4 + ld [wSafariZoneEntranceCurScript], a +.asm_f2024 + ret + +.WelcomeText + TX_FAR SafariZoneEntranceText_9e6e4 + db "@" + +.MakePaymentText + TX_FAR SafariZoneEntranceText_9e747 + TX_SFX_ITEM + TX_FAR _SafariZoneEntranceText_75360 + db "@" + +.PleaseComeAgainText + TX_FAR _SafariZoneEntranceText_75365 + db "@" + +.NotEnoughMoneyText + TX_FAR _SafariZoneEntranceText_7536a + db "@" + +Func_f203e: + ld hl, .FirstTimeQuestionText + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + ld hl, .RegularText + jr nz, .Explanation + ld hl, .ExplanationText +.Explanation + call PrintText + ret + +.FirstTimeQuestionText + TX_FAR _SafariZoneEntranceText_753e6 + db "@" + +.ExplanationText + TX_FAR _SafariZoneEntranceText_753eb + db "@" + +.RegularText + TX_FAR _SafariZoneEntranceText_753f0 + db "@" + +SafariZoneEntranceStartSimulatiingJoypadStates: + push af + ld b, $0 + ld a, c + ld [wSimulatedJoypadStatesIndex], a + ld hl, wParentMenuItem + pop af + call FillMemory + jp StartSimulatingJoypadStates + +SafariZoneEntranceCalculateLowCostAdmission: + ld hl, wPlayerMoney + ld de, hMoney + ld bc, $3 + call CopyData + xor a + ld [hDivideBCDDivisor], a + ld [hDivideBCDDivisor + 1], a + ld a, 23 + ld [hDivideBCDDivisor + 2], a + predef DivideBCDPredef3 + ld a, [hDivideBCDQuotient + 2] + call SafariZoneEntranceConvertBCDtoNumber + push af + ld hl, wPlayerMoney + xor a + ld bc, $3 + call FillMemory + ld hl, SafariZoneEntranceText_f20c4 + call PrintText_NoCreatingTextBox + ld a, MONEY_BOX + ld [wTextBoxID], a + call DisplayTextBoxID + ld hl, SafariZoneEntranceText_f20c9 + call PrintText + pop af + inc a + jr z, .max_balls + cp 29 + jr c, .load_balls +.max_balls + ld a, 29 +.load_balls + ld hl, 502 + and a + ret + +SafariZoneEntranceText_f20c4: + TX_FAR _SafariZoneLowCostText1 + db "@" + +SafariZoneEntranceText_f20c9: + TX_FAR _SafariZoneLowCostText2 + db "@" + +SafariZoneEntranceGetLowCostAdmissionText: + ld hl, wSafariSteps + ld a, [hl] + push af + inc [hl] + ld e, a + ld d, $0 + ld hl, Pointers_f2100 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + pop af + cp $3 + jr z, .give_one_ball + scf + ret + +.give_one_ball + ld hl, SafariZoneEntranceText_f20f6 + call PrintText_NoCreatingTextBox + ld a, $1 + ld hl, 502 + and a + ret + +SafariZoneEntranceText_f20f6: + TX_FAR _SafariZoneLowCostText3 + TX_SFX_ITEM + TX_FAR _SafariZoneLowCostText4 + db "@" + +Pointers_f2100: + dw SafariZoneEntranceText_f210a + dw SafariZoneEntranceText_f210f + dw SafariZoneEntranceText_f2114 + dw SafariZoneEntranceText_f2119 + dw SafariZoneEntranceText_f2119 + +SafariZoneEntranceText_f210a: + TX_FAR _SafariZoneLowCostText5 + db "@" + +SafariZoneEntranceText_f210f: + TX_FAR _SafariZoneLowCostText6 + db "@" + +SafariZoneEntranceText_f2114: + TX_FAR _SafariZoneLowCostText7 + db "@" + +SafariZoneEntranceText_f2119: + TX_FAR _SafariZoneLowCostText8 + db "@" + +SafariZoneEntranceConvertBCDtoNumber: + push hl + ld c, a + and $f + ld l, a + ld h, $0 + ld a, c + and $f0 + swap a + ld bc, 10 + call AddNTimes + ld a, l + pop hl + ret diff --git a/scripts/saffronpokecenter.asm b/scripts/saffronpokecenter.asm index 8f569a8e..05420812 100755 --- a/scripts/saffronpokecenter.asm +++ b/scripts/saffronpokecenter.asm @@ -7,9 +7,10 @@ SaffronPokecenterTextPointers: ; 5d53b (17:553b) dw SaffronPokecenterText2 dw SaffronPokecenterText3 dw SaffronPokecenterText4 + dw SaffronPokecenterText5 SaffronPokecenterText1: ; 5d543 (17:5543) - db $ff + TX_POKECENTER_NURSE SaffronPokecenterText2: ; 5d544 (17:5544) TX_FAR _SaffronPokecenterText1 @@ -20,4 +21,9 @@ SaffronPokecenterText3: ; 5d549 (17:5549) db "@" SaffronPokecenterText4: ; 5d54e (17:554e) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST + +SaffronPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index f8b7aed7..5901c5ca 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -6,8 +6,9 @@ SeafoamIslands5Script: ; 46799 (11:6799) SeafoamIslands5Script_467a5: ; 467a5 (11:67a5) xor a - ld [wSeafoamIslands5CurScript], a ld [wJoyIgnore], a + ld [wSeafoamIslands5CurScript], a + ld [W_CURMAPSCRIPT], a ret SeafoamIslands5ScriptPointers: ; 467ad (11:67ad) diff --git a/scripts/silphco11_2.asm b/scripts/silphco11_2.asm index e7b59757..22e19a02 100755 --- a/scripts/silphco11_2.asm +++ b/scripts/silphco11_2.asm @@ -71,6 +71,6 @@ MissableObjects_f25ce db HS_SILPH_CO_10F_2 db HS_SILPH_CO_11F_1 db HS_SILPH_CO_11F_2 - db HS_SILPH_CO_11F_3 - db HS_MAP_F4_1 + db HS_SILPH_CO_11F_JESSIE + db HS_SILPH_CO_11F_JAMES db $ff
\ No newline at end of file diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index 7bdafe2c..3a2e207a 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -24,9 +24,7 @@ SSAnne2Script0: ; 613be (18:53be) ld hl, CoordsData_61411 call ArePlayerCoordsInArray ret nc - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic @@ -99,23 +97,8 @@ SSAnne2Script1: ; 61430 (18:5430) call Delay3 ld a, OPP_SONY2 ld [wCurOpponent], a - - ; select which team to use during the encounter - ld a, [W_RIVALSTARTER] - cp STARTER2 - jr nz, .NotSquirtle ld a, $1 - jr .done -.NotSquirtle - cp STARTER3 - jr nz, .Charmander - ld a, $2 - jr .done -.Charmander - ld a, $3 -.done ld [wTrainerNo], a - call SSAnne2Script_61416 ld a, $2 ld [W_SSANNE2CURSCRIPT], a @@ -145,9 +128,7 @@ SSAnne2Script2: ; 6146d (18:546d) ld a, $2 ld [H_SPRITEINDEX], a call MoveSprite - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic callba Music_RivalAlternateStart ld a, $3 ld [W_SSANNE2CURSCRIPT], a diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index 911dac7f..6d07d308 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -3,7 +3,7 @@ SSAnne7Script: ; 61895 (18:5895) jp EnableAutoTextBoxDrawing SSAnne7Script_6189b: ; 6189b (18:589b) - CheckEvent EVENT_RUBBED_CAPTAINS_BACK + CheckEvent EVENT_GOT_HM01 ret nz ld hl, wd72d set 5, [hl] @@ -28,12 +28,12 @@ SSAnne7Text1: ; 618ad (18:58ad) ld hl, ReceivedHM01Text call PrintText SetEvent EVENT_GOT_HM01 + ld hl, wd72d + res 5, [hl] jr .asm_0faf5 .BagFull ld hl, HM01NoRoomText call PrintText - ld hl, wd72d - set 5, [hl] jr .asm_0faf5 .asm_797c4 ld hl, SSAnne7Text_61932 @@ -45,12 +45,10 @@ SSAnne7RubText: ; 618ec (18:58ec) TX_FAR _SSAnne7RubText TX_ASM ld a, [wAudioROMBank] - cp BANK(Audio3_UpdateMusic) + cp AUDIO_3 ld [wAudioSavedROMBank], a jr nz, .asm_61908 - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic ld a, Bank(Music_PkmnHealed) ld [wAudioROMBank], a .asm_61908 diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm index 525a2964..43c3991e 100755 --- a/scripts/ssanne9.asm +++ b/scripts/ssanne9.asm @@ -1,8 +1,5 @@ SSAnne9Script: ; 61b4b (18:5b4b) - ld a, $1 - ld [wAutoTextBoxDrawingControl], a - xor a - ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call DisableAutoTextBoxDrawing ld hl, SSAnne9TrainerHeaders ld de, SSAnne9ScriptPointers ld a, [W_SSANNE9CURSCRIPT] @@ -129,44 +126,24 @@ SSAnne9Text_61c10: ; 61c10 (18:5c10) SSAnne9Text10: ; 61c15 (18:5c15) TX_ASM - ld hl, SSAnne9Text_61c1f - call PrintText + callba Func_f2570 jp TextScriptEnd -SSAnne9Text_61c1f: ; 61c1f (18:5c1f) - TX_FAR _SSAnne9Text_61c1f - db "@" - SSAnne9Text11: ; 61c24 (18:5c24) TX_ASM - ld hl, SSAnne9Text_61c2e - call PrintText + callba Func_f257c jp TextScriptEnd -SSAnne9Text_61c2e: ; 61c2e (18:5c2e) - TX_FAR _SSAnne9Text_61c2e - db "@" - SSAnne9Text12: ; 61c33 (18:5c33) TX_ASM - ld hl, SSAnne9Text_61c3d - call PrintText + callba Func_f2588 jp TextScriptEnd -SSAnne9Text_61c3d: ; 61c3d (18:5c3d) - TX_FAR _SSAnne9Text_61c3d - db "@" - SSAnne9Text13: ; 61c42 (18:5c42) TX_ASM - ld hl, SSAnne9Text_61c4c - call PrintText + callba Func_f2594 jp TextScriptEnd -SSAnne9Text_61c4c: ; 61c4c (18:5c4c) - TX_FAR _SSAnne9Text_61c4c - db "@" - SSAnne9BattleText1: ; 61c51 (18:5c51) TX_FAR _SSAnne9BattleText1 db "@" diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 78ada7cf..cef1766e 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -40,8 +40,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) SetEventForceReuseHL EVENT_SS_ANNE_LEFT ld a, $ff ld [wJoyIgnore], a - ld [wNewSoundID], a - call PlaySound + call StopAllMusic ld c, BANK(Music_Surfing) ld a, MUSIC_SURFING call PlayMusic @@ -63,6 +62,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) ld [H_AUTOBGTRANSFERENABLED], a ld [wSSAnneSmokeDriftAmount], a ld [rOBP1], a + call UpdateGBCPal_OBP1 ld a, 88 ld [wSSAnneSmokeX], a ld hl, wMapViewVRAMPointer @@ -124,7 +124,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) VermilionDock_AnimSmokePuffDriftRight: ; 1dc42 (7:5c42) push bc push de - ld hl, wOAMBuffer + $11 + ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord ld a, [wSSAnneSmokeDriftAmount] swap a ld c, a diff --git a/scripts/vermilionhouse3.asm b/scripts/vermilionhouse3.asm index 478979da..fef07152 100755 --- a/scripts/vermilionhouse3.asm +++ b/scripts/vermilionhouse3.asm @@ -5,8 +5,5 @@ VermilionHouse3TextPointers: ; 19c15 (6:5c15) dw VermilionHouse3Text1 VermilionHouse3Text1: ; 19c17 (6:5c17) - TX_ASM - ld a, $4 - ld [wWhichTrade], a - predef DoInGameTradeDialogue - jp TextScriptEnd + TX_FAR TeachingHMsText + db "@" diff --git a/scripts/vermilionpokecenter.asm b/scripts/vermilionpokecenter.asm index 6e85b3e3..72c232b7 100755 --- a/scripts/vermilionpokecenter.asm +++ b/scripts/vermilionpokecenter.asm @@ -7,9 +7,10 @@ VermilionPokecenterTextPointers: ; 5c995 (17:4995) dw VermilionPokecenterText2 dw VermilionPokecenterText3 dw VermilionPokecenterText4 + dw VermilionPokecenterText5 VermilionPokecenterText1: ; 5c99d (17:499d) - db $ff + TX_POKECENTER_NURSE VermilionPokecenterText2: ; 5c99e (17:499e) TX_FAR _VermilionPokecenterText1 @@ -20,4 +21,9 @@ VermilionPokecenterText3: ; 5c9a3 (17:49a3) db "@" VermilionPokecenterText4: ; 5c9a8 (17:49a8) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST + +VermilionPokecenterText5: + TX_ASM + callab PokecenterChanseyText + jp TextScriptEnd diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index 11f5d5db..ee88d393 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -29,6 +29,9 @@ VictoryRoad1Script0: ; 5da40 (17:5a40) ld hl, CoordsData_5da5c call CheckBoulderCoords jp nc, CheckFightingMapTrainers + ld a, [H_SPRITEINDEX] + cp $f + jp z, CheckFightingMapTrainers ld hl, wd126 set 5, [hl] SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index cb956b1c..87635c2e 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -17,7 +17,6 @@ VictoryRoad2Script: ; 5179d (14:579d) VictoryRoad2Script_517c4: ; 517c4 (14:57c4) ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH - VictoryRoad2Script_517c9: ; 517c9 (14:57c9) CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 jr z, .asm_517da @@ -31,7 +30,6 @@ VictoryRoad2Script_517c9: ; 517c9 (14:57c9) ret z ld a, $1d lb bc, 7, 11 - VictoryRoad2Script_517e2: ; 517e2 (14:57e2) ld [wNewTileBlockID], a predef ReplaceTileBlock @@ -46,6 +44,9 @@ VictoryRoad2Script0: ; 517f1 (14:57f1) ld hl, CoordsData_51816 call CheckBoulderCoords jp nc, CheckFightingMapTrainers + ld a, [hSpriteIndexOrTextID] + cp $f + jp z, CheckFightingMapTrainers EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ld a, [wCoordIndex] cp $2 diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index 22e6813a..72e13775 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -36,6 +36,9 @@ VictoryRoad3Script0: ; 449b7 (11:49b7) ld a, [wCoordIndex] cp $1 jr nz, .asm_449dc + ld a, [hSpriteIndexOrTextID] + cp $f ; Pikachu + jp z, .asm_449fe ld hl, wd126 set 5, [hl] SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 05e566fb..b69e24c2 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -93,7 +93,7 @@ ViridianMartText4: ; 1d4f5 (7:54f5) ViridianMartText5: ; 1d4fa (7:54fa) TX_FAR ViridianMartParcelQuestText - db $11 + TX_SFX_KEY_ITEM db "@" ViridianMartText2: ; 1d500 (7:5500) diff --git a/scripts/viridianpokecenter.asm b/scripts/viridianpokecenter.asm index f8aed602..c2e2d283 100755 --- a/scripts/viridianpokecenter.asm +++ b/scripts/viridianpokecenter.asm @@ -10,7 +10,7 @@ ViridianPokecenterTextPointers: ; 44263 (11:4263) dw ViridianPokeCenterText5 ViridianPokeCenterText1: ; 4426b (11:426b) - db $ff + TX_POKECENTER_NURSE ViridianPokeCenterText2: ; 4426c (11:426c) TX_FAR _ViridianPokeCenterText1 @@ -21,9 +21,9 @@ ViridianPokeCenterText3: ; 44271 (11:4271) db "@" ViridianPokeCenterText4: ; 44276 (11:4276) - db $f6 + TX_CABLE_CLUB_RECEPTIONIST ViridianPokeCenterText5: TX_ASM - callab Func_f0f12 + callab PokecenterChanseyText jp TextScriptEnd @@ -1,4 +1,4 @@ - +INCLUDE "constants/text_constants.asm" TEXT_1 EQU $26 TEXT_2 EQU $27 TEXT_3 EQU $28 @@ -21,7 +21,7 @@ _CardKeySuccessText1:: text "Bingo!@@" _CardKeySuccessText2:: - db $0 + text "" line "The CARD KEY" cont "opened the door!" done @@ -75,7 +75,7 @@ _PokeCenterSignText:: done _FoundItemText:: - text $52, " found" + text "<PLAYER> found" line "@" TX_RAM wcf4b text "!@@" @@ -92,7 +92,7 @@ _OaksAideHiText:: para "If you caught @" TX_NUM hOaksAideRequirement, 1, 3 - db $0 + text "" line "kinds of #MON," cont "I'm supposed to" cont "give you an" @@ -100,7 +100,7 @@ _OaksAideHiText:: TX_RAM wOaksAideRewardItemName text "!" - para "So, ", $52, "! Have" + para "So, <PLAYER>! Have" line "you caught at" cont "least @" TX_NUM hOaksAideRequirement, 1, 3 @@ -113,7 +113,7 @@ _OaksAideUhOhText:: line "Uh-oh! You have" cont "caught only @" TX_NUM hOaksAideNumMonsOwned, 1, 3 - db $0 + text "" cont "kinds of #MON!" para "You need @" @@ -130,7 +130,7 @@ _OaksAideComeBackText:: para "When you get @" TX_NUM hOaksAideRequirement, 1, 3 - db $0 + text "" line "kinds, come back" cont "for @" TX_RAM wOaksAideRewardItemName @@ -149,7 +149,7 @@ _OaksAideHereYouGoText:: prompt _OaksAideGotItemText:: - text $52, " got the" + text "<PLAYER> got the" line "@" TX_RAM wOaksAideRewardItemName text "!@@" @@ -241,10 +241,10 @@ _AIBattleWithdrawText:: _AIBattleUseItemText:: TX_RAM wTrainerName - db $0 + text "" line "used @" TX_RAM wcd6d - db $0 + text "" cont "on @" TX_RAM wEnemyMonNick text "!" @@ -268,7 +268,7 @@ _TradeWentToText:: done _TradeForText:: - text "For ", $52, "'s" + text "For <PLAYER>'s" line "@" TX_RAM wcf4b text "," @@ -306,11 +306,11 @@ _TradeWillTradeText:: text " will" line "trade @" TX_RAM wcd6d - db $0 + text "" done _TradeforText:: - text "for ", $52, "'s" + text "for <PLAYER>'s" line "@" TX_RAM wcf4b text "." @@ -362,7 +362,7 @@ _YeahText:: _DexSeenOwnedText:: text "#DEX Seen:@" TX_NUM wDexRatingNumMonsSeen, 1, 3 - db $0 + text "" line " Owned:@" TX_NUM wDexRatingNumMonsOwned, 1, 3 db "@" @@ -373,27 +373,27 @@ _DexRatingText:: _GymStatueText1:: TX_RAM wGymCityName - db $0 + text "" line "#MON GYM" cont "LEADER: @" TX_RAM wGymLeaderName - db $0 + text "" para "WINNING TRAINERS:" - line $53 + line "<RIVAL>" done _GymStatueText2:: TX_RAM wGymCityName - db $0 + text "" line "#MON GYM" cont "LEADER: @" TX_RAM wGymLeaderName - db $0 + text "" para "WINNING TRAINERS:" - line $53 - cont $52 + line "<RIVAL>" + cont "<PLAYER>" done _ViridianCityPokecenterGuyText:: @@ -596,14 +596,14 @@ _CinnabarGymQuizIntroText:: para "Then get it right!" line "Here we go!" - db $51 + para "" done _CinnabarGymQuizShortIntroText:: text "#MON Quiz!" line "Test your skill!" - db $51 + para "" done _CinnabarQuizQuestionsText1:: @@ -666,7 +666,7 @@ _BillsHouseMonitorText:: done _BillsHouseInitiatedText:: - text $52, " initiated" + text "<PLAYER> initiated" line "TELEPORTER's Cell" cont "Separator!@@" @@ -840,7 +840,7 @@ _IndigoPlateauHQText:: done _RedBedroomSNESText:: - text $52, " is" + text "<PLAYER> is" line "playing the SNES!" cont "...Okay!" cont "It's time to go!" @@ -1019,31 +1019,31 @@ _VermilionGymTrashFailText:: cont "locks were reset!@@" _FoundHiddenItemText:: - text $52, " found" + text "<PLAYER> found" line "@" TX_RAM wcd6d text "!@@" _HiddenItemBagFullText:: - text "But, ", $52, " has" + text "But, <PLAYER> has" line "no more room for" cont "other items!" done _FoundHiddenCoinsText:: - text $52, " found" + text "<PLAYER> found" line "@" - TX_BCD hCoins, $c2 + TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " coins!@@" _FoundHiddenCoins2Text:: - text $52, " found" + text "<PLAYER> found" line "@" - TX_BCD hCoins, $c2 + TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " coins!@@" _DroppedHiddenCoinsText:: - db $0 + text "" para "Oops! Dropped" line "some coins!" done @@ -1097,48 +1097,48 @@ _OutOfSafariBallsText:: _WildRanText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "ran!" prompt _EnemyRanText:: text "Enemy @" TX_RAM wEnemyMonNick - db $0 + text "" line "ran!" prompt _HurtByPoisonText:: - text $5a, "'s" + text "<USER>'s" line "hurt by poison!" prompt _HurtByBurnText:: - text $5a, "'s" + text "<USER>'s" line "hurt by the burn!" prompt _HurtByLeechSeedText:: text "LEECH SEED saps" - line $5a, "!" + line "<USER>!" prompt _EnemyMonFaintedText:: text "Enemy @" TX_RAM wEnemyMonNick - db $0 + text "" line "fainted!" prompt _MoneyForWinningText:: - text $52, " got ¥@" - TX_BCD wAmountMoneyWon, $c3 - db $0 + text "<PLAYER> got ¥@" + TX_BCD wAmountMoneyWon, 3 | LEADING_ZEROES | LEFT_ALIGN + text "" line "for winning!" prompt _TrainerDefeatedText:: - text $52, " defeated" + text "<PLAYER> defeated" line "@" TX_RAM wTrainerName text "!" @@ -1146,7 +1146,7 @@ _TrainerDefeatedText:: _PlayerMonFaintedText:: TX_RAM wBattleMonNick - db $0 + text "" line "fainted!" prompt @@ -1155,20 +1155,20 @@ _UseNextMonText:: done _Sony1WinText:: - text $53, ": Yeah! Am" + text "<RIVAL>: Yeah! Am" line "I great or what?" prompt _PlayerBlackedOutText2:: - text $52, " is out of" + text "<PLAYER> is out of" line "useable #MON!" - para $52, " blacked" + para "<PLAYER> blacked" line "out!" prompt _LinkBattleLostText:: - text $52, " lost to" + text "<PLAYER> lost to" line "@" TX_RAM wTrainerName text "!" @@ -1182,7 +1182,7 @@ _TrainerAboutToUseText:: TX_RAM wEnemyMonNick text "!" - para "Will ", $52 + para "Will <PLAYER>" line "change #MON?" done @@ -1247,7 +1247,7 @@ _NoMovesLeftText:: _MultiHitText:: text "Hit the enemy" line "@" - TX_NUM wPlayerNumHits,1,1 + TX_NUM wPlayerNumHits, 1, 1 text " times!" prompt @@ -1263,42 +1263,42 @@ _GetOutText:: prompt _FastAsleepText:: - text $5A + text "<USER>" line "is fast asleep!" prompt _WokeUpText:: - text $5A + text "<USER>" line "woke up!" prompt _IsFrozenText:: - text $5A + text "<USER>" line "is frozen solid!" prompt _FullyParalyzedText:: - text $5A,"'s" + text "<USER>'s" line "fully paralyzed!" prompt _FlinchedText:: - text $5A + text "<USER>" line "flinched!" prompt _MustRechargeText:: - text $5A + text "<USER>" line "must recharge!" prompt _DisabledNoMoreText:: - text $5A,"'s" + text "<USER>'s" line "disabled no more!" prompt _IsConfusedText:: - text $5A + text "<USER>" line "is confused!" prompt @@ -1308,37 +1308,37 @@ _HurtItselfText:: prompt _ConfusedNoMoreText:: - text $5A,"'s" + text "<USER>'s" line "confused no more!" prompt _SavingEnergyText:: - text $5A + text "<USER>" line "is saving energy!" prompt _UnleashedEnergyText:: - text $5A + text "<USER>" line "unleashed energy!" prompt _ThrashingAboutText:: - text $5A,"'s" + text "<USER>'s" line "thrashing about!" done _AttackContinuesText:: - text $5A,"'s" + text "<USER>'s" line "attack continues!" done _CantMoveText:: - text $5A + text "<USER>" line "can't move!" prompt _MoveIsDisabledText:: - text $5a, "'s" + text "<USER>'s" line "@" TX_RAM wcd6d text " is" @@ -1346,14 +1346,14 @@ _MoveIsDisabledText:: prompt _MonName1Text:: - text $5a, "@@" + text "<USER>@@" _Used1Text:: - db $0 + text "" line "used @@" _Used2Text:: - db $0 + text "" line "used @@" _InsteadText:: @@ -1385,24 +1385,24 @@ _ExclamationPoint5Text:: done _AttackMissedText:: - text $5a, "'s" + text "<USER>'s" line "attack missed!" prompt _KeptGoingAndCrashedText:: - text $5a + text "<USER>" line "kept going and" cont "crashed!" prompt _UnaffectedText:: - text $59, "'s" + text "<TARGET>'s" line "unaffected!" prompt _DoesntAffectMonText:: text "It doesn't affect" - line $59, "!" + line "<TARGET>!" prompt _CriticalHitText:: @@ -1439,23 +1439,23 @@ _TurnedAwayText:: _IgnoredOrdersText:: TX_RAM wBattleMonNick - db $0 + text "" line "ignored orders!" prompt _SubstituteTookDamageText:: text "The SUBSTITUTE" line "took damage for" - cont $59, "!" + cont "<TARGET>!" prompt _SubstituteBrokeText:: - text $59, "'s" + text "<TARGET>'s" line "SUBSTITUTE broke!" prompt _BuildingRageText:: - text $5a, "'s" + text "<USER>'s" line "RAGE is building!" prompt @@ -1508,21 +1508,21 @@ _NotVeryEffectiveText:: _SafariZoneEatingText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "is eating!" prompt _SafariZoneAngryText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "is angry!" prompt _WildMonAppearedText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "appeared!" prompt @@ -1530,7 +1530,7 @@ _HookedMonAttackedText:: text "The hooked" line "@" TX_RAM wEnemyMonNick - db $0 + text "" cont "attacked!" prompt @@ -1539,7 +1539,7 @@ SECTION "Text 3", ROMX, BANK[TEXT_3] _EnemyAppearedText:: TX_RAM wEnemyMonNick - db $0 + text "" line "appeared!" prompt @@ -1592,15 +1592,15 @@ _GoodText:: text "good!@@" _ComeBackText:: - db $0 + text "" line "Come back!" done ; money related _PickUpPayDayMoneyText:: - text $52, " picked up" + text "<PLAYER> picked up" line "¥@" - TX_BCD wTotalPayDayMoney, $c3 + TX_BCD wTotalPayDayMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text "!" prompt @@ -1645,7 +1645,7 @@ _PartyMenuSwapMonText:: _PotionText:: TX_RAM wcd6d - db $0 + text "" line "recovered by @" TX_NUM wHPBarHPDifference, 2, 3 text "!" @@ -1677,7 +1677,7 @@ _IceHealText:: _AwakeningText:: TX_RAM wcd6d - db $0 + text "" line "woke up!" done @@ -1689,7 +1689,7 @@ _FullHealText:: _ReviveText:: TX_RAM wcd6d - db $0 + text "" line "is revitalized!" done @@ -1697,11 +1697,11 @@ _RareCandyText:: TX_RAM wcd6d text " grew" line "to level @" - TX_NUM wCurEnemyLVL, $1,$3 + TX_NUM wCurEnemyLVL, 1, 3 text "!@@" _TurnedOnPC1Text:: - text $52, " turned on" + text "<PLAYER> turned on" line "the PC." prompt @@ -1729,7 +1729,7 @@ _AccessedMyPCText:: prompt _TurnedOnPC2Text:: - text $52, " turned on" + text "<PLAYER> turned on" line "the PC." prompt @@ -1865,7 +1865,7 @@ _CantTakeMonText:: prompt _PikachuUnhappyText:: - TX_RAM $cd6d + TX_RAM wcd6d text " looks" line "unhappy about it!" prompt @@ -1970,13 +1970,13 @@ _DoYouWantToNicknameText:: _YourNameIsText:: text "Right! So your" - line "name is ", $52, "!" + line "name is <PLAYER>!" prompt _HisNameIsText:: text "That's right! I" line "remember now! His" - cont "name is ", $53, "!" + cont "name is <RIVAL>!" prompt _WillBeTradedText:: @@ -2049,19 +2049,19 @@ _ColosseumTotalL50Text:: prompt _ColosseumHeightText:: - TX_RAM $CD6D + TX_RAM wcd6d text " is over" line "6′8″ tall!" prompt _ColosseumWeightText:: - TX_RAM $CD6D + TX_RAM wcd6d text " weighs" line "over 44 pounds!" prompt _ColosseumEvolvedText:: - TX_RAM $CD6D + TX_RAM wcd6d text " is an" line "evolved #MON!" prompt @@ -2092,12 +2092,12 @@ _ColosseumVersionText:: prompt _Char00Text:: - TX_NUM hSpriteIndexOrTextID,1,2 + TX_NUM hSpriteIndexOrTextID, 1, 2 text " error." done _Char55Text:: - text $4B,"@@" + text $4B, "@@" _NoPokemonText:: text "There are no" @@ -2183,7 +2183,7 @@ _SavingText:: done _GameSavedText:: - text $52, " saved" + text "<PLAYER> saved" line "the game!" done @@ -2203,7 +2203,7 @@ _WhenYouChangeBoxText:: _ChooseABoxText:: text "Choose a" - line $4a, " BOX.@@" + line "<pkmn> BOX.@@" _EvolvedText:: TX_RAM wcf4b @@ -2211,7 +2211,7 @@ _EvolvedText:: done _IntoText:: - db $0 + text "" line "into @" TX_RAM wcd6d text "!" @@ -2220,7 +2220,7 @@ _IntoText:: _StoppedEvolvingText:: text "Huh? @" TX_RAM wcf4b - db $0 + text "" line "stopped evolving!" prompt @@ -2230,47 +2230,47 @@ SECTION "Text 5", ROMX, BANK[TEXT_5] _IsEvolvingText:: text "What? @" TX_RAM wcf4b - db $0 + text "" line "is evolving!" done _FellAsleepText:: - text $59 + text "<TARGET>" line "fell asleep!" prompt _AlreadyAsleepText:: - text $59, "'s" + text "<TARGET>'s" line "already asleep!" prompt _PoisonedText:: - text $59 + text "<TARGET>" line "was poisoned!" prompt _BadlyPoisonedText:: - text $59, "'s" + text "<TARGET>'s" line "badly poisoned!" prompt _BurnedText:: - text $59 + text "<TARGET>" line "was burned!" prompt _FrozenText:: - text $59 + text "<TARGET>" line "was frozen solid!" prompt _FireDefrostedText:: text "Fire defrosted" - line $59, "!" + line "<TARGET>!" prompt _MonsStatsRoseText:: - text $5a, "'s" + text "<USER>'s" line "@" TX_RAM wcf4b text "@@" @@ -2283,7 +2283,7 @@ _RoseText:: prompt _MonsStatsFellText:: - text $59, "'s" + text "<TARGET>'s" line "@" TX_RAM wcf4b text "@@" @@ -2296,60 +2296,60 @@ _FellText:: prompt _RanFromBattleText:: - text $5a + text "<USER>" line "ran from battle!" prompt _RanAwayScaredText:: - text $59 + text "<TARGET>" line "ran away scared!" prompt _WasBlownAwayText:: - text $59 + text "<TARGET>" line "was blown away!" prompt _ChargeMoveEffectText:: - text $5a, "@@" + text "<USER>@@" _MadeWhirlwindText:: - db $0 + text "" line "made a whirlwind!" prompt _TookInSunlightText:: - db $0 + text "" line "took in sunlight!" prompt _LoweredItsHeadText:: - db $0 + text "" line "lowered its head!" prompt _SkyAttackGlowingText:: - db $0 + text "" line "is glowing!" prompt _FlewUpHighText:: - db $0 + text "" line "flew up high!" prompt _DugAHoleText:: - db $0 + text "" line "dug a hole!" prompt _BecameConfusedText:: - text $59 + text "<TARGET>" line "became confused!" prompt _MimicLearnedMoveText:: - text $5a + text "<USER>" line "learned" cont "@" TX_RAM wcd6d @@ -2357,7 +2357,7 @@ _MimicLearnedMoveText:: prompt _MoveWasDisabledText:: - text $59, "'s" + text "<TARGET>'s" line "@" TX_RAM wcd6d text " was" @@ -2378,16 +2378,16 @@ _ButItFailedText:: _DidntAffectText:: text "It didn't affect" - line $59, "!" + line "<TARGET>!" prompt _IsUnaffectedText:: - text $59 + text "<TARGET>" line "is unaffected!" prompt _ParalyzedMayNotAttackText:: - text $59, "'s" + text "<TARGET>'s" line "paralyzed! It may" cont "not attack!" prompt @@ -2398,7 +2398,7 @@ _SubstituteText:: prompt _HasSubstituteText:: - text $5a + text "<USER>" line "has a SUBSTITUTE!" prompt @@ -2408,23 +2408,23 @@ _TooWeakSubstituteText:: prompt _WasSeededText:: - text $59 + text "<TARGET>" line "was seeded!" prompt _EvadedAttackText:: - text $59 + text "<TARGET>" line "evaded attack!" prompt _HitWithRecoilText:: - text $5a, "'s" + text "<USER>'s" line "hit with recoil!" prompt _ConvertedTypeText:: text "Converted type to" - line $59, "'s!" + line "<TARGET>'s!" prompt _StatusChangesEliminatedText:: @@ -2433,28 +2433,28 @@ _StatusChangesEliminatedText:: prompt _GettingPumpedText:: - text $5a, "'s" + text "<USER>'s" line "getting pumped!" prompt _StartedSleepingEffect:: - text $5a + text "<USER>" line "started sleeping!" done _FellAsleepBecameHealthyText:: - text $5a + text "<USER>" line "fell asleep and" cont "became healthy!" done _RegainedHealthText:: - text $5a + text "<USER>" line "regained health!" prompt _TransformedText:: - text $5a + text "<USER>" line "transformed into" cont "@" TX_RAM wcd6d @@ -2462,18 +2462,18 @@ _TransformedText:: prompt _LightScreenProtectedText:: - text $5a, "'s" + text "<USER>'s" line "protected against" cont "special attacks!" prompt _ReflectGainedArmorText:: - text $5a + text "<USER>" line "gained armor!" prompt _ShroudedInMistText:: - text $5a, "'s" + text "<USER>'s" line "shrouded in mist!" prompt @@ -2484,11 +2484,11 @@ _CoinsScatteredText:: _SuckedHealthText:: text "Sucked health from" - line $59, "!" + line "<TARGET>!" prompt _DreamWasEatenText:: - text $59, "'s" + text "<TARGET>'s" line "dream was eaten!" prompt @@ -2619,15 +2619,15 @@ _PokemartGreetingText:: _PokemonFaintedText:: TX_RAM wcd6d - db $0 + text "" line "fainted!" done _PlayerBlackedOutText:: - text $52, " is out of" + text "<PLAYER> is out of" line "useable #MON!" - para $52, " blacked" + para "<PLAYER> blacked" line "out!" prompt @@ -2645,7 +2645,7 @@ _PokemartTellBuyPriceText:: text "?" line "That will be" cont "¥@" - TX_BCD hMoney, $c3 + TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text ". OK?" done @@ -2672,7 +2672,7 @@ _PokemonSellingGreetingText:: _PokemartTellSellPriceText:: text "I can pay you" line "¥@" - TX_BCD hMoney, $c3 + TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text " for that." done @@ -2716,7 +2716,7 @@ _AbandonLearningText:: _DidNotLearnText:: TX_RAM wLearnMoveMonName - db $0 + text "" line "did not learn" cont "@" TX_RAM wcf4b @@ -2733,7 +2733,7 @@ _TryingToLearnText:: para "But, @" TX_RAM wLearnMoveMonName - db $0 + text "" line "can't learn more" cont "than 4 moves!" @@ -2751,7 +2751,7 @@ _PoofText:: text " Poof!@@" _ForgotAndText:: - db $0 + text "" para "@" TX_RAM wLearnMoveMonName text " forgot" @@ -2912,7 +2912,7 @@ _CyclingIsFunText:: prompt _GotMonText:: - text $52, " got" + text "<PLAYER> got" line "@" TX_RAM wcd6d text "!@@" @@ -3009,7 +3009,7 @@ _ItemUseBallText06:: text "!@@" _SurfingGotOnText:: - text $52, " got on" + text "<PLAYER> got on" line "@" TX_RAM wcd6d text "!" @@ -3022,7 +3022,7 @@ _SurfingNoPlaceToGetOffText:: _RefusingText:: TX_RAM wcd6d - db $0 + text "" line "is refusing!" prompt @@ -3040,12 +3040,12 @@ _VitaminNoEffectText:: prompt _ThrewBaitText:: - text $52, " threw" + text "<PLAYER> threw" line "some BAIT." done _ThrewRockText:: - text $52, " threw a" + text "<PLAYER> threw a" line "ROCK." done @@ -3063,13 +3063,13 @@ _FluteWokeUpText:: prompt _PlayedFluteHadEffectText:: - text $52, " played the" + text "<PLAYER> played the" line "# FLUTE.@@" _CoinCaseNumCoinsText:: text "Coins" line "@" - TX_BCD wPlayerCoins, $c2 + TX_BCD wPlayerCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " " prompt @@ -3126,7 +3126,7 @@ _TeachMachineMoveText:: para "Teach @" TX_RAM wcf4b - db $0 + text "" line "to a #MON?" done @@ -3145,7 +3145,7 @@ _MonCannotLearnMachineMoveText:: prompt _ItemUseNotTimeText:: - text "OAK: ", $52, "!" + text "OAK: <PLAYER>!" line "This isn't the" cont "time to use that! " prompt @@ -3193,7 +3193,7 @@ _DontHavePokemonText:: prompt _ItemUseText001:: - text $52," used@@" + text "<PLAYER> used@@" _ItemUseText002:: TX_RAM wcf4b @@ -3201,7 +3201,7 @@ _ItemUseText002:: done _GotOnBicycleText1:: - text $52, " got on the@@" + text "<PLAYER> got on the@@" _GotOnBicycleText2:: TX_RAM wcf4b @@ -3209,7 +3209,7 @@ _GotOnBicycleText2:: prompt _GotOffBicycleText1:: - text $52, " got off@@" + text "<PLAYER> got off@@" _GotOffBicycleText2:: text "the @" @@ -3250,7 +3250,7 @@ _ConnectCableText:: prompt _TradedForText:: - text $52, " traded" + text "<PLAYER> traded" line "@" TX_RAM wInGameTradeGiveMonName text " for" @@ -3302,7 +3302,7 @@ _WannaTrade2Text:: para "your @" TX_RAM wInGameTradeGiveMonName - db $0 + text "" line "for @" TX_RAM wInGameTradeReceiveMonName text "?" diff --git a/text/maps/celadon_mansion_3f.asm b/text/maps/celadon_mansion_3f.asm index 03e3831c..d4cc4caa 100644 --- a/text/maps/celadon_mansion_3f.asm +++ b/text/maps/celadon_mansion_3f.asm @@ -56,7 +56,7 @@ _WriterText:: line "I like her!" done -_WriteText2:: +_WriterText2:: text "I wrote the story!" para "It's great you" diff --git a/text/maps/fan_club.asm b/text/maps/fan_club.asm index 8b442011..33d3ca53 100644 --- a/text/maps/fan_club.asm +++ b/text/maps/fan_club.asm @@ -100,13 +100,13 @@ FanClubChairStoryText:: prompt ReceivedBikeVoucherText:: - text $52, " received" + text "<PLAYER> received" line "a @" TX_RAM wcf4b text "!@@" ExplainBikeVoucherText:: - db $0 + text "" para "Exchange that for" line "a BICYCLE!" @@ -128,7 +128,7 @@ FanClubNoStoryText:: done FanClubChairFinalText:: - text "Hello, ", $52, "!" + text "Hello, <PLAYER>!" para "Did you come see" line "me about my" @@ -143,7 +143,7 @@ FanClubBagFullText:: done FanClubChairPrintText1:: - text "Hi there, ",$52,"!" + text "Hi there, <PLAYER>!" line "Have you seen my" cont "#MON photos?" diff --git a/text/maps/hall_of_fame.asm b/text/maps/hall_of_fame.asm index e4b8de4f..cbb0e52b 100644 --- a/text/maps/hall_of_fame.asm +++ b/text/maps/hall_of_fame.asm @@ -1,7 +1,7 @@ _HallofFameRoomText1:: text "OAK: Er-hem!" line "Congratulations," - cont $52, "!" + cont "<PLAYER>!" para "This floor is the" line "#MON HALL OF" @@ -16,13 +16,13 @@ _HallofFameRoomText1:: line "also recorded in" cont "the HALL OF FAME!" - para $52, "! You have" + para "<PLAYER>! You have" line "endeavored hard" cont "to become the new" cont "LEAGUE champion!" para "Congratulations," - line $52, ", you and" + line "<PLAYER>, you and" cont "your #MON are" cont "HALL OF FAMERs!" done @@ -2711,220 +2711,220 @@ wMissableObjectList:: ; d5ce ; terminated with $FF ds 17 * 2 -wGameProgressFlags:: ; d5f0 +wGameProgressFlags:: ; d5e9 ; $c8 bytes - ds 0 -W_OAKSLABCURSCRIPT:: ; d5f0 +W_OAKSLABCURSCRIPT:: ; d5e9 ds 1 -W_PALLETTOWNCURSCRIPT:: ; d5f1 +W_PALLETTOWNCURSCRIPT:: ; d5f0 ds 1 ds 1 -W_BLUESHOUSECURSCRIPT:: ; d5f3 +W_BLUESHOUSECURSCRIPT:: ; d5f2 ds 1 -W_VIRIDIANCITYCURSCRIPT:: ; d5f4 +W_VIRIDIANCITYCURSCRIPT:: ; d5f3 ds 1 ds 2 -W_PEWTERCITYCURSCRIPT:: ; d5f7 +W_PEWTERCITYCURSCRIPT:: ; d5f6 ds 1 -W_ROUTE3CURSCRIPT:: ; d5f8 +W_ROUTE3CURSCRIPT:: ; d5f7 ds 1 -W_ROUTE4CURSCRIPT:: ; d5f9 +W_ROUTE4CURSCRIPT:: ; d5f8 ds 1 +W_FANCLUBCURSCRIPT:: ; d5f9 ds 1 -W_VIRIDIANGYMCURSCRIPT:: ; d5fb +W_VIRIDIANGYMCURSCRIPT:: ; d5fa ds 1 -W_PEWTERGYMCURSCRIPT:: ; d5fc +W_PEWTERGYMCURSCRIPT:: ; d5fb ds 1 -W_CERULEANGYMCURSCRIPT:: ; d5fd +W_CERULEANGYMCURSCRIPT:: ; d5fc ds 1 -W_VERMILIONGYMCURSCRIPT:: ; d5fe +W_VERMILIONGYMCURSCRIPT:: ; d5fd ds 1 -W_CELADONGYMCURSCRIPT:: ; d5ff +W_CELADONGYMCURSCRIPT:: ; d5fe ds 1 -W_ROUTE6CURSCRIPT:: ; d600 +W_ROUTE6CURSCRIPT:: ; d5ff ds 1 -W_ROUTE8CURSCRIPT:: ; d601 +W_ROUTE8CURSCRIPT:: ; d600 ds 1 -W_ROUTE24CURSCRIPT:: ; d602 +W_ROUTE24CURSCRIPT:: ; d601 ds 1 -W_ROUTE25CURSCRIPT:: ; d603 +W_ROUTE25CURSCRIPT:: ; d602 ds 1 -W_ROUTE9CURSCRIPT:: ; d604 +W_ROUTE9CURSCRIPT:: ; d603 ds 1 -W_ROUTE10CURSCRIPT:: ; d605 +W_ROUTE10CURSCRIPT:: ; d604 ds 1 -W_MTMOON1CURSCRIPT:: ; d606 +W_MTMOON1CURSCRIPT:: ; d605 ds 1 -W_MTMOON3CURSCRIPT:: ; d607 +W_MTMOON3CURSCRIPT:: ; d606 ds 1 -W_SSANNE8CURSCRIPT:: ; d608 +W_SSANNE8CURSCRIPT:: ; d607 ds 1 -W_SSANNE9CURSCRIPT:: ; d609 +W_SSANNE9CURSCRIPT:: ; d608 ds 1 -W_ROUTE22CURSCRIPT:: ; d60a +W_ROUTE22CURSCRIPT:: ; d609 ds 1 ds 1 -W_REDSHOUSE2CURSCRIPT:: ; d60c +W_REDSHOUSE2CURSCRIPT:: ; d60b ds 1 -W_VIRIDIANMARKETCURSCRIPT:: ; d60d +W_VIRIDIANMARKETCURSCRIPT:: ; d60c ds 1 -W_ROUTE22GATECURSCRIPT:: ; d60e +W_ROUTE22GATECURSCRIPT:: ; d60d ds 1 -W_CERULEANCITYCURSCRIPT:: ; d60f +W_CERULEANCITYCURSCRIPT:: ; d60e ds 1 ds 7 -W_SSANNE5CURSCRIPT:: ; d617 +W_SSANNE5CURSCRIPT:: ; d616 ds 1 -W_VIRIDIANFORESTCURSCRIPT:: ; d618 +W_VIRIDIANFORESTCURSCRIPT:: ; d617 ds 1 -W_MUSEUM1FCURSCRIPT:: ; d619 +W_MUSEUM1FCURSCRIPT:: ; d618 ds 1 -W_ROUTE13CURSCRIPT:: ; d61a +W_ROUTE13CURSCRIPT:: ; d619 ds 1 -W_ROUTE14CURSCRIPT:: ; d61b +W_ROUTE14CURSCRIPT:: ; d61a ds 1 -W_ROUTE17CURSCRIPT:: ; d61c +W_ROUTE17CURSCRIPT:: ; d61b ds 1 -W_ROUTE19CURSCRIPT:: ; d61d +W_ROUTE19CURSCRIPT:: ; d61c ds 1 -W_ROUTE21CURSCRIPT:: ; d61e +W_ROUTE21CURSCRIPT:: ; d61d ds 1 -wSafariZoneEntranceCurScript:: ; d61f +wSafariZoneEntranceCurScript:: ; d61e ds 1 -W_ROCKTUNNEL2CURSCRIPT:: ; d620 +W_ROCKTUNNEL2CURSCRIPT:: ; d61f ds 1 -W_ROCKTUNNEL1CURSCRIPT:: ; d621 +W_ROCKTUNNEL1CURSCRIPT:: ; d620 ds 1 ds 1 -W_ROUTE11CURSCRIPT:: ; d623 +W_ROUTE11CURSCRIPT:: ; d622 ds 1 -W_ROUTE12CURSCRIPT:: ; d624 +W_ROUTE12CURSCRIPT:: ; d623 ds 1 -W_ROUTE15CURSCRIPT:: ; d625 +W_ROUTE15CURSCRIPT:: ; d624 ds 1 -W_ROUTE16CURSCRIPT:: ; d626 +W_ROUTE16CURSCRIPT:: ; d625 ds 1 -W_ROUTE18CURSCRIPT:: ; d627 +W_ROUTE18CURSCRIPT:: ; d626 ds 1 -W_ROUTE20CURSCRIPT:: ; d628 +W_ROUTE20CURSCRIPT:: ; d627 ds 1 -W_SSANNE10CURSCRIPT:: ; d629 +W_SSANNE10CURSCRIPT:: ; d628 ds 1 -W_VERMILIONCITYCURSCRIPT:: ; d62a +W_VERMILIONCITYCURSCRIPT:: ; d629 ds 1 -W_POKEMONTOWER2CURSCRIPT:: ; d62b +W_POKEMONTOWER2CURSCRIPT:: ; d62a ds 1 -W_POKEMONTOWER3CURSCRIPT:: ; d62c +W_POKEMONTOWER3CURSCRIPT:: ; d62b ds 1 -W_POKEMONTOWER4CURSCRIPT:: ; d62d +W_POKEMONTOWER4CURSCRIPT:: ; d62c ds 1 -W_POKEMONTOWER5CURSCRIPT:: ; d62e +W_POKEMONTOWER5CURSCRIPT:: ; d62d ds 1 -W_POKEMONTOWER6CURSCRIPT:: ; d62f +W_POKEMONTOWER6CURSCRIPT:: ; d62e ds 1 -W_POKEMONTOWER7CURSCRIPT:: ; d630 +W_POKEMONTOWER7CURSCRIPT:: ; d62f ds 1 -W_ROCKETHIDEOUT1CURSCRIPT:: ; d631 +W_ROCKETHIDEOUT1CURSCRIPT:: ; d630 ds 1 -W_ROCKETHIDEOUT2CURSCRIPT:: ; d632 +W_ROCKETHIDEOUT2CURSCRIPT:: ; d631 ds 1 -W_ROCKETHIDEOUT3CURSCRIPT:: ; d633 +W_ROCKETHIDEOUT3CURSCRIPT:: ; d632 ds 1 -W_ROCKETHIDEOUT4CURSCRIPT:: ; d634 +W_ROCKETHIDEOUT4CURSCRIPT:: ; d633 ds 2 -W_ROUTE6GATECURSCRIPT:: ; d636 +W_ROUTE6GATECURSCRIPT:: ; d635 ds 1 -W_ROUTE8GATECURSCRIPT:: ; d637 +W_ROUTE8GATECURSCRIPT:: ; d636 ds 2 -W_CINNABARISLANDCURSCRIPT:: ; d639 +W_CINNABARISLANDCURSCRIPT:: ; d638 ds 1 -W_MANSION1CURSCRIPT:: ; d63a +W_MANSION1CURSCRIPT:: ; d639 ds 2 -W_MANSION2CURSCRIPT:: ; d63c +W_MANSION2CURSCRIPT:: ; d63b ds 1 -W_MANSION3CURSCRIPT:: ; d63d +W_MANSION3CURSCRIPT:: ; d63c ds 1 -W_MANSION4CURSCRIPT:: ; d63e +W_MANSION4CURSCRIPT:: ; d63d ds 1 -W_VICTORYROAD2CURSCRIPT:: ; d63f +W_VICTORYROAD2CURSCRIPT:: ; d63e ds 1 -W_VICTORYROAD3CURSCRIPT:: ; d640 +W_VICTORYROAD3CURSCRIPT:: ; d63f ds 1 -W_CELADONCITYCURSCRIPT:: +W_CELADONCITYCURSCRIPT:: ; d640 ds 1 -W_FIGHTINGDOJOCURSCRIPT:: ; d642 +W_FIGHTINGDOJOCURSCRIPT:: ; d641 ds 1 -W_SILPHCO2CURSCRIPT:: ; d643 +W_SILPHCO2CURSCRIPT:: ; d642 ds 1 -W_SILPHCO3CURSCRIPT:: ; d644 +W_SILPHCO3CURSCRIPT:: ; d643 ds 1 -W_SILPHCO4CURSCRIPT:: ; d645 +W_SILPHCO4CURSCRIPT:: ; d644 ds 1 -W_SILPHCO5CURSCRIPT:: ; d646 +W_SILPHCO5CURSCRIPT:: ; d645 ds 1 -W_SILPHCO6CURSCRIPT:: ; d647 +W_SILPHCO6CURSCRIPT:: ; d646 ds 1 -W_SILPHCO7CURSCRIPT:: ; d648 +W_SILPHCO7CURSCRIPT:: ; d647 ds 1 -W_SILPHCO8CURSCRIPT:: ; d649 +W_SILPHCO8CURSCRIPT:: ; d648 ds 1 -W_SILPHCO9CURSCRIPT:: ; d64a +W_SILPHCO9CURSCRIPT:: ; d649 ds 1 -W_HALLOFFAMEROOMCURSCRIPT:: ; d64b +W_HALLOFFAMEROOMCURSCRIPT:: ; d64a ds 1 -W_GARYCURSCRIPT:: ; d64c +W_GARYCURSCRIPT:: ; d64b ds 1 -W_LORELEICURSCRIPT:: ; d64d +W_LORELEICURSCRIPT:: ; d64c ds 1 -W_BRUNOCURSCRIPT:: ; d64e +W_BRUNOCURSCRIPT:: ; d64d ds 1 -W_AGATHACURSCRIPT:: ; d64f +W_AGATHACURSCRIPT:: ; d64e ds 1 -W_UNKNOWNDUNGEON3CURSCRIPT:: ; d650 +W_UNKNOWNDUNGEON3CURSCRIPT:: ; d64f ds 1 -W_VICTORYROAD1CURSCRIPT:: ; d651 +W_VICTORYROAD1CURSCRIPT:: ; d650 ds 1 ds 1 -W_LANCECURSCRIPT:: ; d653 +W_LANCECURSCRIPT:: ; d652 ds 1 ds 4 -W_SILPHCO10CURSCRIPT:: ; d658 +W_SILPHCO10CURSCRIPT:: ; d657 ds 1 -W_SILPHCO11CURSCRIPT:: ; d659 +W_SILPHCO11CURSCRIPT:: ; d658 ds 1 ds 1 -W_FUCHSIAGYMCURSCRIPT:: ; d65b +W_FUCHSIAGYMCURSCRIPT:: ; d65a ds 1 -W_SAFFRONGYMCURSCRIPT:: ; d65c +W_SAFFRONGYMCURSCRIPT:: ; d65b ds 1 ds 1 -W_CINNABARGYMCURSCRIPT:: ; d65e +W_CINNABARGYMCURSCRIPT:: ; d65d ds 1 -W_CELADONGAMECORNERCURSCRIPT:: ; d65f +W_CELADONGAMECORNERCURSCRIPT:: ; d65e ds 1 -W_ROUTE16GATECURSCRIPT:: ; d660 +W_ROUTE16GATECURSCRIPT:: ; d65f ds 1 -W_BILLSHOUSECURSCRIPT:: ; d661 +W_BILLSHOUSECURSCRIPT:: ; d660 ds 1 -W_ROUTE5GATECURSCRIPT:: ; d662 +W_ROUTE5GATECURSCRIPT:: ; d661 ds 1 -W_POWERPLANTCURSCRIPT:: ; d663 +W_POWERPLANTCURSCRIPT:: ; d662 ; overload ds 0 -W_ROUTE7GATECURSCRIPT:: ; d663 +W_ROUTE7GATECURSCRIPT:: ; d662 ; overload ds 1 ds 1 -W_SSANNE2CURSCRIPT:: ; d665 +W_SSANNE2CURSCRIPT:: ; d664 ds 1 -wSeafoamIslands4CurScript:: ; d666 +wSeafoamIslands4CurScript:: ; d665 ds 1 -W_ROUTE23CURSCRIPT:: ; d667 +W_ROUTE23CURSCRIPT:: ; d666 ds 1 -wSeafoamIslands5CurScript:: ; d668 +wSeafoamIslands5CurScript:: ; d667 ds 1 -W_ROUTE18GATECURSCRIPT:: ; d669 +W_ROUTE18GATECURSCRIPT:: ; d668 ds 1 ds 78 |