From 86354f1d50a5cb510b2788558c06342b21dbaa08 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 5 Feb 2020 02:47:32 -0500 Subject: [PATCH 01/34] Document some pokenav and region map --- data/maps/AlteringCave/map.json | 2 +- data/maps/BirthIsland_Exterior/map.json | 2 +- data/maps/BirthIsland_Harbor/map.json | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/NavelRock_B1F/map.json | 2 +- data/maps/NavelRock_Bottom/map.json | 2 +- data/maps/NavelRock_Down01/map.json | 2 +- data/maps/NavelRock_Down02/map.json | 2 +- data/maps/NavelRock_Down03/map.json | 2 +- data/maps/NavelRock_Down04/map.json | 2 +- data/maps/NavelRock_Down05/map.json | 2 +- data/maps/NavelRock_Down06/map.json | 2 +- data/maps/NavelRock_Down07/map.json | 2 +- data/maps/NavelRock_Down08/map.json | 2 +- data/maps/NavelRock_Down09/map.json | 2 +- data/maps/NavelRock_Down10/map.json | 2 +- data/maps/NavelRock_Down11/map.json | 2 +- data/maps/NavelRock_Entrance/map.json | 2 +- data/maps/NavelRock_Exterior/map.json | 2 +- data/maps/NavelRock_Fork/map.json | 2 +- data/maps/NavelRock_Harbor/map.json | 2 +- data/maps/NavelRock_Top/map.json | 2 +- data/maps/NavelRock_Up1/map.json | 2 +- data/maps/NavelRock_Up2/map.json | 2 +- data/maps/NavelRock_Up3/map.json | 2 +- data/maps/NavelRock_Up4/map.json | 2 +- data/scripts/abnormal_weather.inc | 2 +- .../pokenav/{zoom.png => city_zoom_text.png} | Bin .../{zoom_tiles.png => city_zoom_tiles.png} | Bin ...8622868.pal => region_map_info_window.pal} | 0 include/constants/heal_locations.h | 8 +- include/constants/region_map_sections.h | 12 +- include/constants/weather.h | 47 +- include/pokedex_area_region_map.h | 17 + include/pokenav.h | 109 +- include/region_map.h | 45 +- include/unk_pokedex_area_screen_helper.h | 17 - ld_script.txt | 4 +- src/data/region_map/city_map_entries.h | 46 +- src/data/region_map/region_map_entries.h | 12 +- src/field_region_map.c | 35 +- src/field_specials.c | 14 +- src/graphics.c | 4 +- src/map_name_popup.c | 6 +- src/party_menu.c | 2 +- src/pokedex_area_region_map.c | 66 + src/pokedex_area_screen.c | 24 +- src/pokemon_summary_screen.c | 2 +- src/pokenav.c | 300 ++-- src/pokenav_conditions_1.c | 2 +- src/pokenav_conditions_2.c | 4 +- src/pokenav_conditions_3.c | 10 +- src/pokenav_main_menu.c | 80 +- src/pokenav_match_call_1.c | 14 +- src/pokenav_match_call_2.c | 34 +- src/pokenav_match_call_ui.c | 2 + src/pokenav_menu_handler_1.c | 44 +- src/pokenav_menu_handler_2.c | 71 +- src/pokenav_region_map.c | 520 +++---- src/pokenav_ribbons_1.c | 8 +- src/pokenav_ribbons_2.c | 4 +- src/region_map.c | 1241 ++++++++--------- src/unk_pokedex_area_screen_helper.c | 68 - sym_ewram.txt | 2 +- 65 files changed, 1477 insertions(+), 1453 deletions(-) rename graphics/pokenav/{zoom.png => city_zoom_text.png} (100%) rename graphics/pokenav/{zoom_tiles.png => city_zoom_tiles.png} (100%) rename graphics/pokenav/{8622868.pal => region_map_info_window.pal} (100%) create mode 100755 include/pokedex_area_region_map.h delete mode 100755 include/unk_pokedex_area_screen_helper.h create mode 100644 src/pokedex_area_region_map.c delete mode 100644 src/unk_pokedex_area_screen_helper.c diff --git a/data/maps/AlteringCave/map.json b/data/maps/AlteringCave/map.json index 848eb95c1..2addfddb7 100644 --- a/data/maps/AlteringCave/map.json +++ b/data/maps/AlteringCave/map.json @@ -3,7 +3,7 @@ "name": "AlteringCave", "layout": "LAYOUT_ALTERING_CAVE", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_ALTERING_CAVE_2", + "region_map_section": "MAPSEC_ALTERING_CAVE", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/BirthIsland_Exterior/map.json b/data/maps/BirthIsland_Exterior/map.json index 50bd57f0b..ddb06e994 100644 --- a/data/maps/BirthIsland_Exterior/map.json +++ b/data/maps/BirthIsland_Exterior/map.json @@ -3,7 +3,7 @@ "name": "BirthIsland_Exterior", "layout": "LAYOUT_BIRTH_ISLAND_EXTERIOR", "music": "MUS_NONE", - "region_map_section": "MAPSEC_BIRTH_ISLAND_2", + "region_map_section": "MAPSEC_BIRTH_ISLAND", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_INDOOR", diff --git a/data/maps/BirthIsland_Harbor/map.json b/data/maps/BirthIsland_Harbor/map.json index ea124d9ef..4df765428 100644 --- a/data/maps/BirthIsland_Harbor/map.json +++ b/data/maps/BirthIsland_Harbor/map.json @@ -3,7 +3,7 @@ "name": "BirthIsland_Harbor", "layout": "LAYOUT_ISLAND_HARBOR", "music": "MUS_NONE", - "region_map_section": "MAPSEC_BIRTH_ISLAND_2", + "region_map_section": "MAPSEC_BIRTH_ISLAND", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_INDOOR", diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index 95be20f75..333bffc37 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -4,7 +4,7 @@ EverGrandeCity_PokemonCenter_1F_MapScripts:: @ 8229A34 .byte 0 EverGrandeCity_PokemonCenter_1F_OnTransition: @ 8229A3F - setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_1 + setrespawn HEAL_LOCATION_EVER_GRANDE_CITY call_if_unset FLAG_MET_SCOTT_IN_EVERGRANDE, EverGrandeCity_PokemonCenter_1F_EventScript_TryShowScott end diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index 814025895..5c6400509 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -4,7 +4,7 @@ EverGrandeCity_PokemonLeague_1F_MapScripts:: @ 82295D2 .byte 0 EverGrandeCity_PokemonLeague_1F_OnTransition: @ 82295DD - setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_2 + setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE setflag FLAG_LANDMARK_POKEMON_LEAGUE call_if_unset FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_1F_EventScript_GuardsBlockDoor end diff --git a/data/maps/NavelRock_B1F/map.json b/data/maps/NavelRock_B1F/map.json index 6b5cd0089..bfea2e738 100644 --- a/data/maps/NavelRock_B1F/map.json +++ b/data/maps/NavelRock_B1F/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_B1F", "layout": "LAYOUT_NAVEL_ROCK_B1F", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Bottom/map.json b/data/maps/NavelRock_Bottom/map.json index 1ae004107..b2ebb08c6 100644 --- a/data/maps/NavelRock_Bottom/map.json +++ b/data/maps/NavelRock_Bottom/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Bottom", "layout": "LAYOUT_NAVEL_ROCK_BOTTOM", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down01/map.json b/data/maps/NavelRock_Down01/map.json index 50f60b52e..255e69a8e 100644 --- a/data/maps/NavelRock_Down01/map.json +++ b/data/maps/NavelRock_Down01/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down01", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down02/map.json b/data/maps/NavelRock_Down02/map.json index fb2d15145..3fbf7ee63 100644 --- a/data/maps/NavelRock_Down02/map.json +++ b/data/maps/NavelRock_Down02/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down02", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down03/map.json b/data/maps/NavelRock_Down03/map.json index a82e03610..9f8650c27 100644 --- a/data/maps/NavelRock_Down03/map.json +++ b/data/maps/NavelRock_Down03/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down03", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down04/map.json b/data/maps/NavelRock_Down04/map.json index 58e81b709..ce7f0c267 100644 --- a/data/maps/NavelRock_Down04/map.json +++ b/data/maps/NavelRock_Down04/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down04", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down05/map.json b/data/maps/NavelRock_Down05/map.json index a1fcef804..4a0f0630c 100644 --- a/data/maps/NavelRock_Down05/map.json +++ b/data/maps/NavelRock_Down05/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down05", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down06/map.json b/data/maps/NavelRock_Down06/map.json index 204a2a2cf..2964e533f 100644 --- a/data/maps/NavelRock_Down06/map.json +++ b/data/maps/NavelRock_Down06/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down06", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down07/map.json b/data/maps/NavelRock_Down07/map.json index f48063d8a..a1cbac77b 100644 --- a/data/maps/NavelRock_Down07/map.json +++ b/data/maps/NavelRock_Down07/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down07", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down08/map.json b/data/maps/NavelRock_Down08/map.json index d5f7ea8fe..7065aa090 100644 --- a/data/maps/NavelRock_Down08/map.json +++ b/data/maps/NavelRock_Down08/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down08", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down09/map.json b/data/maps/NavelRock_Down09/map.json index 348739b31..9f4618afb 100644 --- a/data/maps/NavelRock_Down09/map.json +++ b/data/maps/NavelRock_Down09/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down09", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down10/map.json b/data/maps/NavelRock_Down10/map.json index 3aa128fa0..6aca30847 100644 --- a/data/maps/NavelRock_Down10/map.json +++ b/data/maps/NavelRock_Down10/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down10", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Down11/map.json b/data/maps/NavelRock_Down11/map.json index 0ed44f0fc..257c2ba6f 100644 --- a/data/maps/NavelRock_Down11/map.json +++ b/data/maps/NavelRock_Down11/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Down11", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Entrance/map.json b/data/maps/NavelRock_Entrance/map.json index 983df45df..dbe05a525 100644 --- a/data/maps/NavelRock_Entrance/map.json +++ b/data/maps/NavelRock_Entrance/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Entrance", "layout": "LAYOUT_NAVEL_ROCK_ENTRANCE", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Exterior/map.json b/data/maps/NavelRock_Exterior/map.json index b98f08d4e..951f9a468 100644 --- a/data/maps/NavelRock_Exterior/map.json +++ b/data/maps/NavelRock_Exterior/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Exterior", "layout": "LAYOUT_NAVEL_ROCK_EXTERIOR", "music": "MUS_RG_NANASHIMA", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_INDOOR", diff --git a/data/maps/NavelRock_Fork/map.json b/data/maps/NavelRock_Fork/map.json index 728b8a7aa..960735377 100644 --- a/data/maps/NavelRock_Fork/map.json +++ b/data/maps/NavelRock_Fork/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Fork", "layout": "LAYOUT_NAVEL_ROCK_FORK", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Harbor/map.json b/data/maps/NavelRock_Harbor/map.json index e91dfa8d1..6c7957832 100644 --- a/data/maps/NavelRock_Harbor/map.json +++ b/data/maps/NavelRock_Harbor/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Harbor", "layout": "LAYOUT_ISLAND_HARBOR", "music": "MUS_RG_NANASHIMA", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_INDOOR", diff --git a/data/maps/NavelRock_Top/map.json b/data/maps/NavelRock_Top/map.json index c906c4ceb..03cc3ab7b 100644 --- a/data/maps/NavelRock_Top/map.json +++ b/data/maps/NavelRock_Top/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Top", "layout": "LAYOUT_NAVEL_ROCK_TOP", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_SHADE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Up1/map.json b/data/maps/NavelRock_Up1/map.json index 24d1b5a32..7142677f5 100644 --- a/data/maps/NavelRock_Up1/map.json +++ b/data/maps/NavelRock_Up1/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Up1", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Up2/map.json b/data/maps/NavelRock_Up2/map.json index 2d16e798c..606b46ba6 100644 --- a/data/maps/NavelRock_Up2/map.json +++ b/data/maps/NavelRock_Up2/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Up2", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Up3/map.json b/data/maps/NavelRock_Up3/map.json index 2e984b379..9612a2dcc 100644 --- a/data/maps/NavelRock_Up3/map.json +++ b/data/maps/NavelRock_Up3/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Up3", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM1", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/maps/NavelRock_Up4/map.json b/data/maps/NavelRock_Up4/map.json index e448e6a9a..27f8b6b81 100644 --- a/data/maps/NavelRock_Up4/map.json +++ b/data/maps/NavelRock_Up4/map.json @@ -3,7 +3,7 @@ "name": "NavelRock_Up4", "layout": "LAYOUT_NAVEL_ROCK_LADDER_ROOM2", "music": "MUS_RG_NANADUNGEON", - "region_map_section": "MAPSEC_NAVEL_ROCK2", + "region_map_section": "MAPSEC_NAVEL_ROCK", "requires_flash": false, "weather": "WEATHER_NONE", "map_type": "MAP_TYPE_UNDERGROUND", diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index 88da0405f..16f8af41f 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -172,7 +172,7 @@ AbnormalWeather_StartGroudonWeather:: @ 8273D1B AbnormalWeather_EventScript_EndEventAndCleanup_1:: @ 8273D1F lockall - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START + compare VAR_ABNORMAL_WEATHER_LOCATION, MARINE_CAVE_LOCATIONS_START goto_if_ge AbnormalWeather_EventScript_ShowRainEndedMessage goto AbnormalWeather_EventScript_ShowSunEndedMessage end diff --git a/graphics/pokenav/zoom.png b/graphics/pokenav/city_zoom_text.png similarity index 100% rename from graphics/pokenav/zoom.png rename to graphics/pokenav/city_zoom_text.png diff --git a/graphics/pokenav/zoom_tiles.png b/graphics/pokenav/city_zoom_tiles.png similarity index 100% rename from graphics/pokenav/zoom_tiles.png rename to graphics/pokenav/city_zoom_tiles.png diff --git a/graphics/pokenav/8622868.pal b/graphics/pokenav/region_map_info_window.pal similarity index 100% rename from graphics/pokenav/8622868.pal rename to graphics/pokenav/region_map_info_window.pal diff --git a/include/constants/heal_locations.h b/include/constants/heal_locations.h index 64c8956a9..272a69dfa 100644 --- a/include/constants/heal_locations.h +++ b/include/constants/heal_locations.h @@ -11,16 +11,16 @@ #define HEAL_LOCATION_LILYCOVE_CITY 8 #define HEAL_LOCATION_MOSSDEEP_CITY 9 #define HEAL_LOCATION_SOOTOPOLIS_CITY 10 -#define HEAL_LOCATION_EVER_GRANDE_CITY_1 11 -#define HEAL_LOCATION_LITTLEROOT_TOWN_1 12 -#define HEAL_LOCATION_LITTLEROOT_TOWN_2 13 +#define HEAL_LOCATION_EVER_GRANDE_CITY 11 +#define HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE 12 +#define HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE 13 #define HEAL_LOCATION_OLDALE_TOWN 14 #define HEAL_LOCATION_DEWFORD_TOWN 15 #define HEAL_LOCATION_LAVARIDGE_TOWN 16 #define HEAL_LOCATION_FALLARBOR_TOWN 17 #define HEAL_LOCATION_VERDANTURF_TOWN 18 #define HEAL_LOCATION_PACIFIDLOG_TOWN 19 -#define HEAL_LOCATION_EVER_GRANDE_CITY_2 20 +#define HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE 20 #define HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR 21 #define HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST 22 diff --git a/include/constants/region_map_sections.h b/include/constants/region_map_sections.h index bba76939c..7b780be01 100644 --- a/include/constants/region_map_sections.h +++ b/include/constants/region_map_sections.h @@ -175,7 +175,7 @@ #define MAPSEC_SEVII_ISLE_22 0xAB #define MAPSEC_SEVII_ISLE_23 0xAC #define MAPSEC_SEVII_ISLE_24 0xAD -#define MAPSEC_NAVEL_ROCK 0xAE +#define MAPSEC_NAVEL_ROCK_FRLG 0xAE #define MAPSEC_MT_EMBER 0xAF #define MAPSEC_BERRY_FOREST 0xB0 #define MAPSEC_ICEFALL_CAVE 0xB1 @@ -184,11 +184,11 @@ #define MAPSEC_DOTTED_HOLE 0xB4 #define MAPSEC_LOST_CAVE 0xB5 #define MAPSEC_PATTERN_BUSH 0xB6 -#define MAPSEC_ALTERING_CAVE 0xB7 +#define MAPSEC_ALTERING_CAVE_FRLG 0xB7 #define MAPSEC_TANOBY_CHAMBERS 0xB8 #define MAPSEC_THREE_ISLE_PATH 0xB9 #define MAPSEC_TANOBY_KEY 0xBA -#define MAPSEC_BIRTH_ISLAND 0xBB +#define MAPSEC_BIRTH_ISLAND_FRLG 0xBB #define MAPSEC_MONEAN_CHAMBER 0xBC #define MAPSEC_LIPTOO_CHAMBER 0xBD #define MAPSEC_WEEPTH_CHAMBER 0xBE @@ -201,7 +201,7 @@ #define MAPSEC_AQUA_HIDEOUT 0xC5 #define MAPSEC_MAGMA_HIDEOUT 0xC6 #define MAPSEC_MIRAGE_TOWER 0xC7 -#define MAPSEC_BIRTH_ISLAND_2 0xC8 +#define MAPSEC_BIRTH_ISLAND 0xC8 #define MAPSEC_FARAWAY_ISLAND 0xC9 #define MAPSEC_ARTISAN_CAVE 0xCA #define MAPSEC_MARINE_CAVE 0xCB @@ -211,8 +211,8 @@ #define MAPSEC_UNDERWATER_UNK1 0xCF #define MAPSEC_UNDERWATER_129 0xD0 #define MAPSEC_DESERT_UNDERPASS 0xD1 -#define MAPSEC_ALTERING_CAVE_2 0xD2 -#define MAPSEC_NAVEL_ROCK2 0xD3 +#define MAPSEC_ALTERING_CAVE 0xD2 +#define MAPSEC_NAVEL_ROCK 0xD3 #define MAPSEC_TRAINER_HILL 0xD4 #define MAPSEC_NONE 0xD5 diff --git a/include/constants/weather.h b/include/constants/weather.h index 98a0a2e1e..aa0309882 100644 --- a/include/constants/weather.h +++ b/include/constants/weather.h @@ -39,28 +39,31 @@ // These are the "abnormal weather events" that are used // to find Kyogre and Groudon. -#define ABNORMAL_WEATHER_COUNT_PER_LEGENDARY 8 -#define ABNORMAL_WEATHER_GROUDON_LOCATIONS_START 1 -#define ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START 1 + ABNORMAL_WEATHER_COUNT_PER_LEGENDARY +#define ABNORMAL_WEATHER_LOCATIONS (MARINE_CAVE_LOCATIONS + TERRA_CAVE_LOCATIONS) +#define ABNORMAL_WEATHER_NONE 0 -#define ABNORMAL_WEATHER_NONE 0 -// Groudon locations -#define ABNORMAL_WEATHER_ROUTE_114_NORTH 1 -#define ABNORMAL_WEATHER_ROUTE_114_SOUTH 2 -#define ABNORMAL_WEATHER_ROUTE_115_WEST 3 -#define ABNORMAL_WEATHER_ROUTE_115_EAST 4 -#define ABNORMAL_WEATHER_ROUTE_116_NORTH 5 -#define ABNORMAL_WEATHER_ROUTE_116_SOUTH 6 -#define ABNORMAL_WEATHER_ROUTE_118_EAST 7 -#define ABNORMAL_WEATHER_ROUTE_118_WEST 8 -// Kyogre locations -#define ABNORMAL_WEATHER_ROUTE_105_NORTH 9 -#define ABNORMAL_WEATHER_ROUTE_105_SOUTH 10 -#define ABNORMAL_WEATHER_ROUTE_125_WEST 11 -#define ABNORMAL_WEATHER_ROUTE_125_EAST 12 -#define ABNORMAL_WEATHER_ROUTE_127_NORTH 13 -#define ABNORMAL_WEATHER_ROUTE_127_SOUTH 14 -#define ABNORMAL_WEATHER_ROUTE_129_WEST 15 -#define ABNORMAL_WEATHER_ROUTE_129_EAST 16 +// Groudon/Terra Cave locations +#define TERRA_CAVE_LOCATIONS_START 1 +#define ABNORMAL_WEATHER_ROUTE_114_NORTH (TERRA_CAVE_LOCATIONS_START + 0) +#define ABNORMAL_WEATHER_ROUTE_114_SOUTH (TERRA_CAVE_LOCATIONS_START + 1) +#define ABNORMAL_WEATHER_ROUTE_115_WEST (TERRA_CAVE_LOCATIONS_START + 2) +#define ABNORMAL_WEATHER_ROUTE_115_EAST (TERRA_CAVE_LOCATIONS_START + 3) +#define ABNORMAL_WEATHER_ROUTE_116_NORTH (TERRA_CAVE_LOCATIONS_START + 4) +#define ABNORMAL_WEATHER_ROUTE_116_SOUTH (TERRA_CAVE_LOCATIONS_START + 5) +#define ABNORMAL_WEATHER_ROUTE_118_EAST (TERRA_CAVE_LOCATIONS_START + 6) +#define ABNORMAL_WEATHER_ROUTE_118_WEST (TERRA_CAVE_LOCATIONS_START + 7) +#define TERRA_CAVE_LOCATIONS 8 + +// Kyogre/Marina Cave locations +#define MARINE_CAVE_LOCATIONS_START (TERRA_CAVE_LOCATIONS_START + TERRA_CAVE_LOCATIONS) +#define ABNORMAL_WEATHER_ROUTE_105_NORTH (MARINE_CAVE_LOCATIONS_START + 0) +#define ABNORMAL_WEATHER_ROUTE_105_SOUTH (MARINE_CAVE_LOCATIONS_START + 1) +#define ABNORMAL_WEATHER_ROUTE_125_WEST (MARINE_CAVE_LOCATIONS_START + 2) +#define ABNORMAL_WEATHER_ROUTE_125_EAST (MARINE_CAVE_LOCATIONS_START + 3) +#define ABNORMAL_WEATHER_ROUTE_127_NORTH (MARINE_CAVE_LOCATIONS_START + 4) +#define ABNORMAL_WEATHER_ROUTE_127_SOUTH (MARINE_CAVE_LOCATIONS_START + 5) +#define ABNORMAL_WEATHER_ROUTE_129_WEST (MARINE_CAVE_LOCATIONS_START + 6) +#define ABNORMAL_WEATHER_ROUTE_129_EAST (MARINE_CAVE_LOCATIONS_START + 7) +#define MARINE_CAVE_LOCATIONS 8 #endif // GUARD_CONSTANTS_WEATHER_H diff --git a/include/pokedex_area_region_map.h b/include/pokedex_area_region_map.h new file mode 100755 index 000000000..175f60c74 --- /dev/null +++ b/include/pokedex_area_region_map.h @@ -0,0 +1,17 @@ +#ifndef GUARD_POKEDEX_AREA_REGION_MAP_H +#define GUARD_POKEDEX_AREA_REGION_MAP_H + +struct PokedexAreaMapTemplate +{ + u32 bg:2; + u32 offset:8; + u32 mode:2; + u32 unk:20; // never read +}; + +void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *); +bool32 sub_81C4E90(void); +void PokedexAreaMapChangeBgY(u32); +void FreePokedexAreaMapBgNum(void); + +#endif // GUARD_POKEDEX_AREA_REGION_MAP_H diff --git a/include/pokenav.h b/include/pokenav.h index fe5616618..3eafe9af2 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -65,24 +65,44 @@ enum POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone }; +enum +{ + POKENAV_GFX_MAIN_MENU, + POKENAV_GFX_CONDITION_MENU, + POKENAV_GFX_RIBBONS_MENU, + POKENAV_GFX_MATCH_CALL_MENU, + POKENAV_GFX_MAP_MENU_ZOOMED_OUT, + POKENAV_GFX_MAP_MENU_ZOOMED_IN, + POKENAV_GFX_PARTY_MENU, + POKENAV_GFX_SEARCH_MENU, + POKENAV_GFX_COOL_MENU, + POKENAV_GFX_BEAUTY_MENU, + POKENAV_GFX_CUTE_MENU, + POKENAV_GFX_SMART_MENU, + POKENAV_GFX_TOUGH_MENU, + POKENAV_GFX_MENUS_END, +}; + +#define POKENAV_GFX_SUBMENUS_START POKENAV_GFX_PARTY_MENU + #define POKENAV_MENU_IDS_START 100000 enum { - POKENAV_MENU_0 = POKENAV_MENU_IDS_START, - POKENAV_MENU_1, - POKENAV_MENU_2, - POKENAV_MENU_3, - POKENAV_MENU_4, - POKENAV_MENU_5, - POKENAV_MENU_6, - POKENAV_MENU_7, - POKENAV_MENU_8, - POKENAV_MENU_9, - POKENAV_MENU_A, - POKENAV_MENU_B, - POKENAV_MENU_C, - POKENAV_MENU_D, - POKENAV_MENU_E, + POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, + POKENAV_MAIN_MENU_CURSOR_ON_MAP, + POKENAV_CONDITION_MENU, + POKENAV_CONDITION_SEARCH_MENU, + POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL, + POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS, + POKENAV_REGION_MAP, + POKENAV_CONDITION_PARTY, + POKENAV_CONDITION_SEARCH_RESULTS, + POKENAV_MENU_9, // Condition + POKENAV_MENU_A, // Condition + POKENAV_MATCH_CALL, + POKENAV_RIBBONS_MON_LIST, + POKENAV_MENU_D, // Ribbons + POKENAV_MENU_E, // Ribbons }; enum @@ -220,6 +240,15 @@ enum POKENAV_MC_FUNC_EXIT }; +enum +{ + POKENAV_MAP_FUNC_NONE, + POKENAV_MAP_FUNC_CURSOR_MOVED, + POKENAV_MAP_FUNC_ZOOM_OUT, + POKENAV_MAP_FUNC_ZOOM_IN, + POKENAV_MAP_FUNC_EXIT, +}; + // pokenav.c void SetSelectedConditionSearch(u32); u32 GetSelectedConditionSearch(void); @@ -275,7 +304,7 @@ void sub_81C7850(u32 a0); u32 sub_81C786C(void); void LoadLeftHeaderGfxForIndex(u32 arg0); void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2); -void sub_81C7AC0(s32 a0); +void PokenavFadeScreen(s32 fadeType); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); @@ -298,30 +327,30 @@ void sub_81C7834(void *func1, void *func2); void ShutdownPokenav(void); // pokenav_menu_handler_1.c -bool32 PokenavCallback_Init_0(void); -bool32 PokenavCallback_Init_4(void); -bool32 PokenavCallback_Init_5(void); -bool32 PokenavCallback_Init_2(void); -bool32 PokenavCallback_Init_3(void); -u32 sub_81C941C(void); -void sub_81C9430(void); +bool32 PokenavCallback_Init_MainMenuCursorOnMap(void); +bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void); +bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void); +bool32 PokenavCallback_Init_ConditionMenu(void); +bool32 PokenavCallback_Init_ConditionSearchMenu(void); +u32 GetMenuHandlerCallback(void); +void FreeMenuHandlerSubstruct1(void); int GetPokenavMenuType(void); int GetPokenavCursorPos(void); int GetCurrentMenuItemId(void); u16 GetHelpBarTextId(void); // pokenav_menu_handler_2.c -bool32 sub_81C9924(void); -bool32 sub_81C9940(void); +bool32 OpenPokenavMenuInitial(void); +bool32 OpenPokenavMenuNotInitial(void); void CreateMenuHandlerLoopedTask(s32 ltIdx); -bool32 sub_81C99C0(void); -void sub_81C99D4(void); +bool32 IsMenuHandlerLoopedTaskActive(void); +void FreeMenuHandlerSubstruct2(void); void sub_81CAADC(void); // pokenav_match_call_1.c -bool32 PokenavCallback_Init_11(void); -u32 sub_81CAB24(void); -void sub_81CAB38(void); +bool32 PokenavCallback_Init_MatchCall(void); +u32 GetMatchCallCallback(void); +void FreeMatchCallSubstruct1(void); int sub_81CAE28(void); int GetNumberRegistered(void); int sub_81CAE48(void); @@ -341,19 +370,19 @@ int GetIndexDeltaOfNextCheckPageUp(int index); bool32 IsRematchEntryRegistered(int index); // pokenav_match_call_2.c -bool32 sub_81CB260(void); +bool32 OpenMatchCall(void); void CreateMatchCallLoopedTask(s32 index); -u32 sub_81CB2CC(void); -void sub_81CB2E0(void); +bool32 IsMatchCallLoopedTaskActive(void); +void FreeMatchCallSubstruct2(void); // pokenav_region_map.c -u32 PokenavCallback_Init_6(void); -void sub_81CC524(void); -u32 sub_81CC554(void); -bool32 sub_81CC5F4(void); -void sub_81CC62C(s32); -u32 sub_81CC65C(void); -void sub_81CC670(void); +u32 PokenavCallback_Init_RegionMap(void); +u32 GetRegionMapCallback(void); +bool32 OpenPokenavRegionMap(void); +void CreateRegionMapLoopedTask(s32); +bool32 IsRegionMapLoopedTaskActive(void); +void FreeRegionMapSubstruct1(void); +void FreeRegionMapSubstruct2(void); // pokenav_conditions_1.c u32 PokenavCallback_Init_7(void); diff --git a/include/region_map.h b/include/region_map.h index 0d219643d..97364abd8 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -4,20 +4,21 @@ #include "bg.h" // Exported type declarations +#define MAP_NAME_LENGTH 16 enum { - INPUT_EVENT_NONE, - INPUT_EVENT_MOVE_START, - INPUT_EVENT_MOVE_CONT, - INPUT_EVENT_MOVE_END, - INPUT_EVENT_A_BUTTON, - INPUT_EVENT_B_BUTTON, + MAP_INPUT_NONE, + MAP_INPUT_MOVE_START, + MAP_INPUT_MOVE_CONT, + MAP_INPUT_MOVE_END, + MAP_INPUT_A_BUTTON, + MAP_INPUT_B_BUTTON, }; enum { MAPSECTYPE_NONE, - MAPSECTYPE_PLAIN, + MAPSECTYPE_ROUTE, MAPSECTYPE_CITY_CANFLY, MAPSECTYPE_CITY_CANTFLY, MAPSECTYPE_BATTLE_FRONTIER @@ -25,9 +26,9 @@ enum { struct RegionMap { /*0x000*/ u16 mapSecId; - /*0x002*/ u8 iconDrawType; + /*0x002*/ u8 mapSecType; /*0x003*/ u8 posWithinMapSec; - /*0x004*/ u8 mapSecName[0x14]; + /*0x004*/ u8 mapSecName[20]; /*0x018*/ u8 (*inputCallback)(void); /*0x01c*/ struct Sprite *cursorSprite; /*0x020*/ struct Sprite *playerIconSprite; @@ -90,28 +91,28 @@ struct RegionMapLocation // Exported RAM declarations // Exported ROM declarations -void sub_8122CF8(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed); -bool8 sub_8122DB0(void); +void InitRegionMapData(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed); +bool8 LoadRegionMapGfx(void); void UpdateRegionMapVideoRegs(void); void InitRegionMap(struct RegionMap *regionMap, u8 argument); -u8 sub_81230AC(void); -bool8 sub_8123514(void); +u8 DoRegionMapInputCallback(void); +bool8 UpdateRegionMapZoom(void); void FreeRegionMapIconResources(void); -u16 GetRegionMapSectionIdAt(u16 x, u16 y); +u16 GetRegionMapSecIdAt(u16 x, u16 y); void CreateRegionMapPlayerIcon(u16 x, u16 y); void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); +bool32 IsEventIslandMapSecId(u8 mapSecId); u8 *GetMapName(u8 *, u16, u16); -bool32 sub_8124668(u8 mapSecId); u8 *GetMapNameGeneric(u8 *dest, u16 mapSecId); -u8 *sub_8124610(u8 *dest, u16 mapSecId); +u8 *GetMapNameHandleAquaHideout(u8 *dest, u16 mapSecId); u16 CorrectSpecialMapSecId(u16 mapSecId); -void sub_8122D88(struct RegionMap *regionMap); +void ShowRegionMapForPokedexAreaScreen(struct RegionMap *regionMap); void PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(s16 x, s16 y); -void MCB2_FlyMap(void); -bool8 sub_8124658(void); -void sub_812454C(void); -void sub_8123030(u16 a0, u32 a1); -void sub_8123418(void); +void CB2_OpenFlyMap(void); +bool8 IsRegionMapZoomed(void); +void TrySetPlayerIconBlink(void); +void sub_8123030(u16 color, u32 coeff); +void SetRegionMapDataForZoom(void); extern const struct RegionMapLocation gRegionMapEntries[]; diff --git a/include/unk_pokedex_area_screen_helper.h b/include/unk_pokedex_area_screen_helper.h deleted file mode 100755 index 45beed70e..000000000 --- a/include/unk_pokedex_area_screen_helper.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef GUARD_UNK_POKEDEX_AREA_SCREEN_HELPER_H -#define GUARD_UNK_POKEDEX_AREA_SCREEN_HELPER_H - -struct UnkStruct_1C4D70 -{ - u32 bg:2; - u32 unk2:8; - u32 unk10:2; - u32 unk12:20; -}; - -void sub_81C4D70(const struct UnkStruct_1C4D70 *); -bool32 sub_81C4E90(void); -void sub_81C4ED0(u32); -void sub_81C4EB4(void); - -#endif // GUARD_UNK_POKEDEX_AREA_SCREEN_HELPER_H diff --git a/ld_script.txt b/ld_script.txt index a4f2bc3dc..5ce484d08 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -302,7 +302,7 @@ SECTIONS { src/mirage_tower.o(.text); src/berry_fix_program.o(.text); src/pokemon_summary_screen.o(.text); - src/unk_pokedex_area_screen_helper.o(.text); + src/pokedex_area_region_map.o(.text); src/battle_pyramid_bag.o(.text); src/pokenav.o(.text); src/pokenav_main_menu.o(.text); @@ -659,7 +659,7 @@ SECTIONS { src/mirage_tower.o(.rodata); src/berry_fix_program.o(.rodata); src/pokemon_summary_screen.o(.rodata); - src/unk_pokedex_area_screen_helper.o(.rodata); + src/pokedex_area_region_map.o(.rodata); src/battle_pyramid_bag.o(.rodata); src/pokenav.o(.rodata); src/pokenav_main_menu.o(.rodata); diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h index 7b8361a7c..09689da5b 100644 --- a/src/data/region_map/city_map_entries.h +++ b/src/data/region_map/city_map_entries.h @@ -1,112 +1,112 @@ -const struct CityMapEntry gPokenavCityMaps[] = +static const struct CityMapEntry sPokenavCityMaps[NUM_CITY_MAPS] = { { - .mapSecId = 0, + .mapSecId = MAPSEC_LITTLEROOT_TOWN, .index = 0, .tilemap = gPokenavCityMap_Littleroot_0, }, { - .mapSecId = 1, + .mapSecId = MAPSEC_OLDALE_TOWN, .index = 0, .tilemap = gPokenavCityMap_Oldale_0, }, { - .mapSecId = 2, + .mapSecId = MAPSEC_DEWFORD_TOWN, .index = 0, .tilemap = gPokenavCityMap_Dewford_0, }, { - .mapSecId = 3, + .mapSecId = MAPSEC_LAVARIDGE_TOWN, .index = 0, .tilemap = gPokenavCityMap_Lavarige_0, }, { - .mapSecId = 4, + .mapSecId = MAPSEC_FALLARBOR_TOWN, .index = 0, .tilemap = gPokenavCityMap_Fallarbor_0, }, { - .mapSecId = 5, + .mapSecId = MAPSEC_VERDANTURF_TOWN, .index = 0, .tilemap = gPokenavCityMap_Verdanturf_0, }, { - .mapSecId = 6, + .mapSecId = MAPSEC_PACIFIDLOG_TOWN, .index = 0, .tilemap = gPokenavCityMap_Pacifidlog_0, }, { - .mapSecId = 7, + .mapSecId = MAPSEC_PETALBURG_CITY, .index = 0, .tilemap = gPokenavCityMap_Petalburg_0, }, { - .mapSecId = 8, + .mapSecId = MAPSEC_SLATEPORT_CITY, .index = 0, .tilemap = gPokenavCityMap_Slateport_0, }, { - .mapSecId = 8, + .mapSecId = MAPSEC_SLATEPORT_CITY, .index = 1, .tilemap = gPokenavCityMap_Slateport_1, }, { - .mapSecId = 9, + .mapSecId = MAPSEC_MAUVILLE_CITY, .index = 0, .tilemap = gPokenavCityMap_Mauville_0, }, { - .mapSecId = 9, + .mapSecId = MAPSEC_MAUVILLE_CITY, .index = 1, .tilemap = gPokenavCityMap_Mauville_1, }, { - .mapSecId = 10, + .mapSecId = MAPSEC_RUSTBORO_CITY, .index = 0, .tilemap = gPokenavCityMap_Rustboro_0, }, { - .mapSecId = 10, + .mapSecId = MAPSEC_RUSTBORO_CITY, .index = 1, .tilemap = gPokenavCityMap_Rustboro_1, }, { - .mapSecId = 11, + .mapSecId = MAPSEC_FORTREE_CITY, .index = 0, .tilemap = gPokenavCityMap_Fortree_0, }, { - .mapSecId = 12, + .mapSecId = MAPSEC_LILYCOVE_CITY, .index = 0, .tilemap = gPokenavCityMap_Lilycove_0, }, { - .mapSecId = 12, + .mapSecId = MAPSEC_LILYCOVE_CITY, .index = 1, .tilemap = gPokenavCityMap_Lilycove_1, }, { - .mapSecId = 13, + .mapSecId = MAPSEC_MOSSDEEP_CITY, .index = 0, .tilemap = gPokenavCityMap_Mossdeep_0, }, { - .mapSecId = 13, + .mapSecId = MAPSEC_MOSSDEEP_CITY, .index = 1, .tilemap = gPokenavCityMap_Mossdeep_1, }, { - .mapSecId = 14, + .mapSecId = MAPSEC_SOOTOPOLIS_CITY, .index = 0, .tilemap = gPokenavCityMap_Sootopolis_0, }, { - .mapSecId = 15, + .mapSecId = MAPSEC_EVER_GRANDE_CITY, .index = 0, .tilemap = gPokenavCityMap_EverGrande_0, }, { - .mapSecId = 15, + .mapSecId = MAPSEC_EVER_GRANDE_CITY, .index = 1, .tilemap = gPokenavCityMap_EverGrande_1, }, diff --git a/src/data/region_map/region_map_entries.h b/src/data/region_map/region_map_entries.h index b2d625c84..1d503d72f 100644 --- a/src/data/region_map/region_map_entries.h +++ b/src/data/region_map/region_map_entries.h @@ -374,7 +374,7 @@ const struct RegionMapLocation gRegionMapEntries[] = { [MAPSEC_SEVII_ISLE_22] = { 0, 0, 1, 1, sMapName_SeviiIsle22}, [MAPSEC_SEVII_ISLE_23] = { 0, 0, 1, 1, sMapName_SeviiIsle23}, [MAPSEC_SEVII_ISLE_24] = { 0, 0, 1, 1, sMapName_SeviiIsle24}, - [MAPSEC_NAVEL_ROCK] = { 0, 0, 1, 1, sMapName_NavelRock}, + [MAPSEC_NAVEL_ROCK_FRLG] = { 0, 0, 1, 1, sMapName_NavelRock}, [MAPSEC_MT_EMBER] = { 0, 0, 1, 1, sMapName_MtEmber}, [MAPSEC_BERRY_FOREST] = { 0, 0, 1, 1, sMapName_BerryForest}, [MAPSEC_ICEFALL_CAVE] = { 0, 0, 1, 1, sMapName_IcefallCave}, @@ -383,11 +383,11 @@ const struct RegionMapLocation gRegionMapEntries[] = { [MAPSEC_DOTTED_HOLE] = { 0, 0, 1, 1, sMapName_DottedHole}, [MAPSEC_LOST_CAVE] = { 0, 0, 1, 1, sMapName_LostCave}, [MAPSEC_PATTERN_BUSH] = { 0, 0, 1, 1, sMapName_PatternBush}, - [MAPSEC_ALTERING_CAVE] = { 0, 0, 1, 1, sMapName_AlteringCave}, + [MAPSEC_ALTERING_CAVE_FRLG] = { 0, 0, 1, 1, sMapName_AlteringCave}, [MAPSEC_TANOBY_CHAMBERS] = { 0, 0, 1, 1, sMapName_TanobyChambers}, [MAPSEC_THREE_ISLE_PATH] = { 0, 0, 1, 1, sMapName_ThreeIslePath}, [MAPSEC_TANOBY_KEY] = { 0, 0, 1, 1, sMapName_TanobyKey}, - [MAPSEC_BIRTH_ISLAND] = { 0, 0, 1, 1, sMapName_BirthIsland}, + [MAPSEC_BIRTH_ISLAND_FRLG] = { 0, 0, 1, 1, sMapName_BirthIsland}, [MAPSEC_MONEAN_CHAMBER] = { 0, 0, 1, 1, sMapName_MoneanChamber}, [MAPSEC_LIPTOO_CHAMBER] = { 0, 0, 1, 1, sMapName_LiptooChamber}, [MAPSEC_WEEPTH_CHAMBER] = { 0, 0, 1, 1, sMapName_WeepthChamber}, @@ -400,7 +400,7 @@ const struct RegionMapLocation gRegionMapEntries[] = { [MAPSEC_AQUA_HIDEOUT] = {19, 3, 1, 1, sMapName_AquaHideout}, [MAPSEC_MAGMA_HIDEOUT] = { 6, 3, 1, 1, sMapName_MagmaHideout}, [MAPSEC_MIRAGE_TOWER] = { 8, 2, 1, 1, sMapName_MirageTower}, - [MAPSEC_BIRTH_ISLAND_2] = { 0, 0, 1, 1, sMapName_BirthIsland}, + [MAPSEC_BIRTH_ISLAND] = { 0, 0, 1, 1, sMapName_BirthIsland}, [MAPSEC_FARAWAY_ISLAND] = { 0, 0, 1, 1, sMapName_FarawayIsland}, [MAPSEC_ARTISAN_CAVE] = {22, 12, 1, 1, sMapName_ArtisanCave}, [MAPSEC_MARINE_CAVE] = { 0, 0, 1, 1, sMapName_MarineCave}, @@ -410,8 +410,8 @@ const struct RegionMapLocation gRegionMapEntries[] = { [MAPSEC_UNDERWATER_UNK1] = {24, 3, 2, 2, sMapName_Underwater}, [MAPSEC_UNDERWATER_129] = {24, 10, 2, 1, sMapName_Underwater}, [MAPSEC_DESERT_UNDERPASS] = { 2, 0, 1, 1, sMapName_DesertUnderpass}, - [MAPSEC_ALTERING_CAVE_2] = { 6, 8, 1, 1, sMapName_AlteringCave}, - [MAPSEC_NAVEL_ROCK2] = { 0, 0, 1, 1, sMapName_NavelRock}, + [MAPSEC_ALTERING_CAVE] = { 6, 8, 1, 1, sMapName_AlteringCave}, + [MAPSEC_NAVEL_ROCK] = { 0, 0, 1, 1, sMapName_NavelRock}, [MAPSEC_TRAINER_HILL] = { 8, 4, 1, 1, sMapName_TrainerHill} }; diff --git a/src/field_region_map.c b/src/field_region_map.c index 184c49b40..50d2b5a8e 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -13,13 +13,23 @@ #include "window.h" #include "constants/rgb.h" +/* + * This is the type of map shown when interacting with the metatiles for + * a wall-mounted Region Map (on the wall of the Pokemon Centers near the PC) + * It does not zoom, and pressing A or B closes the map + * + * For the region map in the pokenav, see pokenav_region_map.c + * For the region map in the pokedex, see pokdex_area_screen.c/pokedex_area_region_map.c + * For the fly map, and utility functions all of the maps use, see region_map.c + */ + // Static type declarations // Static RAM declarations static EWRAM_DATA struct { MainCallback callback; - u32 filler_004; + u32 unused; struct RegionMap regionMap; u16 state; } *sFieldRegionMapHandler = NULL; @@ -34,7 +44,7 @@ static void PrintRegionMapSecName(void); // .rodata -static const struct BgTemplate gUnknown_085E5068[] = { +static const struct BgTemplate sFieldRegionMapBgTemplates[] = { { .bg = 0, .charBaseIndex = 0, @@ -54,7 +64,7 @@ static const struct BgTemplate gUnknown_085E5068[] = { } }; -static const struct WindowTemplate gUnknown_085E5070[] = +static const struct WindowTemplate sFieldRegionMapWindowTemplates[] = { { .bg = 0, @@ -102,8 +112,8 @@ static void MCB2_InitRegionMapRegisters(void) ResetSpriteData(); FreeAllSpritePalettes(); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(1, gUnknown_085E5068, 2); - InitWindows(gUnknown_085E5070); + InitBgsFromTemplates(1, sFieldRegionMapBgTemplates, 2); + InitWindows(sFieldRegionMapWindowTemplates); DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 0x27, 0xd0); clear_scheduled_bg_copies_to_vram(); @@ -134,7 +144,7 @@ static void FieldUpdateRegionMap(void) switch (sFieldRegionMapHandler->state) { case 0: - InitRegionMap(&sFieldRegionMapHandler->regionMap, 0); + InitRegionMap(&sFieldRegionMapHandler->regionMap, FALSE); CreateRegionMapPlayerIcon(0, 0); CreateRegionMapCursor(1, 1); sFieldRegionMapHandler->state++; @@ -162,13 +172,13 @@ static void FieldUpdateRegionMap(void) } break; case 4: - switch (sub_81230AC()) + switch (DoRegionMapInputCallback()) { - case INPUT_EVENT_MOVE_END: + case MAP_INPUT_MOVE_END: PrintRegionMapSecName(); break; - case INPUT_EVENT_A_BUTTON: - case INPUT_EVENT_B_BUTTON: + case MAP_INPUT_A_BUTTON: + case MAP_INPUT_B_BUTTON: sFieldRegionMapHandler->state++; break; } @@ -184,8 +194,7 @@ static void FieldUpdateRegionMap(void) SetMainCallback2(sFieldRegionMapHandler->callback); if (sFieldRegionMapHandler != NULL) { - free(sFieldRegionMapHandler); - sFieldRegionMapHandler = NULL; + FREE_AND_SET_NULL(sFieldRegionMapHandler); } FreeAllWindowBuffers(); } @@ -195,7 +204,7 @@ static void FieldUpdateRegionMap(void) static void PrintRegionMapSecName(void) { - if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE) + if (sFieldRegionMapHandler->regionMap.mapSecType != MAPSECTYPE_NONE) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); diff --git a/src/field_specials.c b/src/field_specials.c index ce3ccce95..701a03c32 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3550,21 +3550,21 @@ void CreateAbnormalWeatherEvent(void) if (FlagGet(FLAG_DEFEATED_KYOGRE) == TRUE) { - VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % ABNORMAL_WEATHER_COUNT_PER_LEGENDARY) + ABNORMAL_WEATHER_GROUDON_LOCATIONS_START); + VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % TERRA_CAVE_LOCATIONS) + TERRA_CAVE_LOCATIONS_START); } else if (FlagGet(FLAG_DEFEATED_GROUDON) == TRUE) { - VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % ABNORMAL_WEATHER_COUNT_PER_LEGENDARY) + ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START); + VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % MARINE_CAVE_LOCATIONS) + MARINE_CAVE_LOCATIONS_START); } else if ((randomValue & 1) == 0) { randomValue = Random(); - VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % ABNORMAL_WEATHER_COUNT_PER_LEGENDARY) + ABNORMAL_WEATHER_GROUDON_LOCATIONS_START); + VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % TERRA_CAVE_LOCATIONS) + TERRA_CAVE_LOCATIONS_START); } else { randomValue = Random(); - VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % ABNORMAL_WEATHER_COUNT_PER_LEGENDARY) + ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START); + VarSet(VAR_ABNORMAL_WEATHER_LOCATION, (randomValue % MARINE_CAVE_LOCATIONS) + MARINE_CAVE_LOCATIONS_START); } } @@ -3595,14 +3595,10 @@ bool32 GetAbnormalWeatherMapNameAndType(void) GetMapName(gStringVar1, sAbnormalWeatherMapNumbers[abnormalWeather - 1], 0); - if (abnormalWeather < ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START) - { + if (abnormalWeather < MARINE_CAVE_LOCATIONS_START) return FALSE; - } else - { return TRUE; - } } bool8 AbnormalWeatherHasExpired(void) diff --git a/src/graphics.c b/src/graphics.c index eeeba56c9..82d6701ef 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1355,8 +1355,8 @@ const u16 gPokenavMessageBox_Pal[] = INCBIN_U16("graphics/pokenav/message.gbapal const u32 gPokenavMessageBox_Gfx[] = INCBIN_U32("graphics/pokenav/message.4bpp.lz"); const u32 gPokenavMessageBox_Tilemap[] = INCBIN_U32("graphics/pokenav/message.bin.lz"); -const u16 gHoennMapZoomIcons_Pal[] = INCBIN_U16("graphics/pokenav/zoom_tiles.gbapal"); -const u32 gHoennMapZoomIcons_Gfx[] = INCBIN_U32("graphics/pokenav/zoom.4bpp.lz"); +const u16 gRegionMapCityZoomTiles_Pal[] = INCBIN_U16("graphics/pokenav/city_zoom_tiles.gbapal"); +const u32 gRegionMapCityZoomText_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_text.4bpp.lz"); const u16 gPokenavConditionCancel_Pal[] = INCBIN_U16("graphics/pokenav/cancel.gbapal"); const u8 gPokenavConditionCancel_Gfx[] = INCBIN_U8("graphics/pokenav/cancel.4bpp"); diff --git a/src/map_name_popup.c b/src/map_name_popup.c index b84489a17..35110581f 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -161,7 +161,7 @@ static const u8 gRegionMapSectionId_To_PopUpThemeIdMapping[] = [MAPSEC_AQUA_HIDEOUT - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, [MAPSEC_MAGMA_HIDEOUT - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, [MAPSEC_MIRAGE_TOWER - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, - [MAPSEC_BIRTH_ISLAND_2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_WOOD, + [MAPSEC_BIRTH_ISLAND - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_WOOD, [MAPSEC_FARAWAY_ISLAND - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_WOOD, [MAPSEC_ARTISAN_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, [MAPSEC_MARINE_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, @@ -171,8 +171,8 @@ static const u8 gRegionMapSectionId_To_PopUpThemeIdMapping[] = [MAPSEC_UNDERWATER_UNK1 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, [MAPSEC_UNDERWATER_129 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE2, [MAPSEC_DESERT_UNDERPASS - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, - [MAPSEC_ALTERING_CAVE_2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, - [MAPSEC_NAVEL_ROCK2 - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_ALTERING_CAVE - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, + [MAPSEC_NAVEL_ROCK - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_STONE, [MAPSEC_TRAINER_HILL - KANTO_MAPSEC_COUNT] = MAPPOPUP_THEME_MARBLE }; diff --git a/src/party_menu.c b/src/party_menu.c index 4decdeb02..d0eaa42fd 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -3680,7 +3680,7 @@ static void CursorCb_FieldMove(u8 taskId) sPartyMenuInternal->data[0] = fieldMove; break; case FIELD_MOVE_FLY: - gPartyMenu.exitCallback = MCB2_FlyMap; + gPartyMenu.exitCallback = CB2_OpenFlyMap; Task_ClosePartyMenu(taskId); break; default: diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c new file mode 100644 index 000000000..dfea9ea44 --- /dev/null +++ b/src/pokedex_area_region_map.c @@ -0,0 +1,66 @@ +#include "global.h" +#include "main.h" +#include "menu.h" +#include "bg.h" +#include "malloc.h" +#include "palette.h" +#include "pokedex_area_region_map.h" + +static EWRAM_DATA u8 *sPokedexAreaMapBgNum = NULL; + +static const u16 sPokedexAreaMap_Pal[] = INCBIN_U16("graphics/interface/region_map.gbapal"); +static const u32 sPokedexAreaMap_Gfx[] = INCBIN_U32("graphics/interface/region_map.8bpp.lz"); +static const u32 sPokedexAreaMap_Tilemap[] = INCBIN_U32("graphics/interface/region_map.bin.lz"); +static const u32 sPokedexAreaMapAffine_Gfx[] = INCBIN_U32("graphics/interface/region_map_affine.8bpp.lz"); +static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/interface/region_map_affine.bin.lz"); + +void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) +{ + u8 mode; + sPokedexAreaMapBgNum = Alloc(4); + mode = template->mode; + + if (mode == 0) + { + SetBgAttribute(template->bg, BG_ATTR_METRIC, 0); + decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMap_Gfx, 0, template->offset, 0); + sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMap_Tilemap, 0, 0, 1), template->offset, 32, 32, FALSE); + } + else + { + SetBgAttribute(template->bg, BG_ATTR_METRIC, 2); + SetBgAttribute(template->bg, BG_ATTR_TYPE, 1); + decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMapAffine_Gfx, 0, template->offset, 0); + sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1), template->offset, 64, 64, TRUE); + } + + ChangeBgX(template->bg, 0, 0); + ChangeBgY(template->bg, 0, 0); + SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); + CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[0x70], 0x60); + *sPokedexAreaMapBgNum = template->bg; +} + +bool32 sub_81C4E90(void) +{ + if (!free_temp_tile_data_buffers_if_possible()) + { + ShowBg(*sPokedexAreaMapBgNum); + return FALSE; + } + else + { + return TRUE; + } +} + +void FreePokedexAreaMapBgNum(void) +{ + if (sPokedexAreaMapBgNum != NULL) + FREE_AND_SET_NULL(sPokedexAreaMapBgNum); +} + +void PokedexAreaMapChangeBgY(u32 a0) +{ + ChangeBgY(*sPokedexAreaMapBgNum, a0 * 0x100, 0); +} diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 697fdb792..474788357 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -14,7 +14,7 @@ #include "sound.h" #include "string_util.h" #include "trig.h" -#include "unk_pokedex_area_screen_helper.h" +#include "pokedex_area_region_map.h" #include "wild_encounter.h" #include "constants/maps.h" #include "constants/region_map_sections.h" @@ -113,7 +113,7 @@ static const u16 sLandmarkData[][2] = { {MAPSEC_SKY_PILLAR, FLAG_LANDMARK_SKY_PILLAR}, {MAPSEC_SEAFLOOR_CAVERN, FLAG_LANDMARK_SEAFLOOR_CAVERN}, - {MAPSEC_ALTERING_CAVE_2, FLAG_LANDMARK_ALTERING_CAVE}, + {MAPSEC_ALTERING_CAVE, FLAG_LANDMARK_ALTERING_CAVE}, {MAPSEC_MIRAGE_TOWER, FLAG_LANDMARK_MIRAGE_TOWER}, {MAPSEC_DESERT_UNDERPASS, FLAG_LANDMARK_DESERT_UNDERPASS}, {MAPSEC_ARTISAN_CAVE, FLAG_LANDMARK_ARTISAN_CAVE}, @@ -230,12 +230,12 @@ static const u8 sAreaGlowTilemapMapping[] = { 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, }; -static const struct UnkStruct_1C4D70 sUnknown_085B4018 = +static const struct PokedexAreaMapTemplate sPokedexAreaMapTemplate = { .bg = 3, - .unk2 = 0, - .unk10 = 0, - .unk12 = 2, + .offset = 0, + .mode = 0, + .unk = 2, }; static const u8 sAreaMarkerTiles[]; @@ -456,7 +456,7 @@ static u16 GetRegionMapSectionId(u8 mapGroup, u8 mapNum) static bool8 MapHasMon(const struct WildPokemonHeader *info, u16 species) { - if (GetRegionMapSectionId(info->mapGroup, info->mapNum) == MAPSEC_ALTERING_CAVE_2) + if (GetRegionMapSectionId(info->mapGroup, info->mapNum) == MAPSEC_ALTERING_CAVE) { sPokedexAreaScreen->unk6E2++; if (sPokedexAreaScreen->unk6E2 != sPokedexAreaScreen->unk6E4 + 1) @@ -503,7 +503,7 @@ static void BuildAreaGlowTilemap(void) { for (x = 0; x < AREA_SCREEN_WIDTH; x++) { - if (GetRegionMapSectionIdAt(x, y) == sPokedexAreaScreen->overworldAreasWithMons[i].regionMapSectionId) + if (GetRegionMapSecIdAt(x, y) == sPokedexAreaScreen->overworldAreasWithMons[i].regionMapSectionId) sPokedexAreaScreen->areaGlowTilemap[j] = GLOW_TILE_FULL; j++; @@ -662,13 +662,13 @@ static void Task_PokedexAreaScreen_0(u8 taskId) break; case 1: SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 3); - sub_81C4D70(&sUnknown_085B4018); + LoadPokedexAreaMapGfx(&sPokedexAreaMapTemplate); StringFill(sPokedexAreaScreen->charBuffer, CHAR_SPACE, 16); break; case 2: if (sub_81C4E90() == TRUE) return; - sub_81C4ED0(-8); + PokedexAreaMapChangeBgY(-8); break; case 3: ResetDrawAreaGlowState(); @@ -678,7 +678,7 @@ static void Task_PokedexAreaScreen_0(u8 taskId) return; break; case 5: - sub_8122D88(&sPokedexAreaScreen->regionMap); + ShowRegionMapForPokedexAreaScreen(&sPokedexAreaScreen->regionMap); CreateRegionMapPlayerIcon(1, 1); PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(0, -8); break; @@ -746,7 +746,7 @@ static void Task_PokedexAreaScreen_1(u8 taskId) sPokedexAreaScreen->errno[0] = gTasks[taskId].data[1]; sub_813D6B4(); DestroyTask(taskId); - sub_81C4EB4(); + FreePokedexAreaMapBgNum(); FREE_AND_SET_NULL(sPokedexAreaScreen); return; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index ffd468a9b..81befefc5 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3095,7 +3095,7 @@ static void BufferMonTrainerMemo(void) if (sum->metLocation < MAPSEC_NONE) { - sub_8124610(metLocationString, sum->metLocation); + GetMapNameHandleAquaHideout(metLocationString, sum->metLocation); DynamicPlaceholderTextUtil_SetPlaceholderPtr(4, metLocationString); } diff --git a/src/pokenav.c b/src/pokenav.c index 03b29ab0b..8ea33575a 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -26,18 +26,18 @@ struct PokenavResources void *field10[SUBSTRUCT_COUNT]; }; -struct UnknownPokenavCallbackStruct +struct PokenavCallbacks { - bool32 (*unk0)(void); - u32 (*unk4)(void); - bool32 (*unk8)(void); - void (*unkC)(s32); - u32 (*unk10)(void); - void (*unk14)(void); - void (*unk18)(void); + bool32 (*init)(void); + u32 (*callback)(void); + bool32 (*open)(void); + void (*createLoopTask)(s32); + bool32 (*isLoopTaskActive)(void); + void (*free1)(void); + void (*free2)(void); }; -static u32 sub_81C75E0(void); +static u32 GetCurrentMenuCB(void); static u32 sub_81C75D4(void); static bool32 SetActivePokenavMenu(u32 menuId); static bool32 AnyMonHasRibbon(void); @@ -51,142 +51,158 @@ static void Task_RunLoopedTask(u8 taskId); static void Task_Pokenav(u8 taskId); static void CB2_InitPokenavForTutorial(void); -const struct UnknownPokenavCallbackStruct PokenavMenuCallbacks[15] = +// TODO: Use MENU ids +const struct PokenavCallbacks PokenavMenuCallbacks[15] = { + [POKENAV_MAIN_MENU - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_0, - .unk4 = sub_81C941C, - .unk8 = sub_81C9924, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_MainMenuCursorOnMap, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_MAIN_MENU_CURSOR_ON_MAP - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_0, - .unk4 = sub_81C941C, - .unk8 = sub_81C9940, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_MainMenuCursorOnMap, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuNotInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_CONDITION_MENU - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_2, - .unk4 = sub_81C941C, - .unk8 = sub_81C9940, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_ConditionMenu, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuNotInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_CONDITION_SEARCH_MENU - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_3, - .unk4 = sub_81C941C, - .unk8 = sub_81C9940, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_ConditionSearchMenu, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuNotInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_4, - .unk4 = sub_81C941C, - .unk8 = sub_81C9940, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_MainMenuCursorOnMatchCall, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuNotInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_5, - .unk4 = sub_81C941C, - .unk8 = sub_81C9940, - .unkC = CreateMenuHandlerLoopedTask, - .unk10 = sub_81C99C0, - .unk14 = sub_81C9430, - .unk18 = sub_81C99D4, + .init = PokenavCallback_Init_MainMenuCursorOnRibbons, + .callback = GetMenuHandlerCallback, + .open = OpenPokenavMenuNotInitial, + .createLoopTask = CreateMenuHandlerLoopedTask, + .isLoopTaskActive = IsMenuHandlerLoopedTaskActive, + .free1 = FreeMenuHandlerSubstruct1, + .free2 = FreeMenuHandlerSubstruct2, }, + [POKENAV_REGION_MAP - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_6, - .unk4 = sub_81CC554, - .unk8 = sub_81CC5F4, - .unkC = sub_81CC62C, - .unk10 = sub_81CC65C, - .unk14 = sub_81CC524, - .unk18 = sub_81CC670, + .init = PokenavCallback_Init_RegionMap, + .callback = GetRegionMapCallback, + .open = OpenPokenavRegionMap, + .createLoopTask = CreateRegionMapLoopedTask, + .isLoopTaskActive = IsRegionMapLoopedTaskActive, + .free1 = FreeRegionMapSubstruct1, + .free2 = FreeRegionMapSubstruct2, }, + [POKENAV_CONDITION_PARTY - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_7, - .unk4 = sub_81CD070, - .unk8 = sub_81CDDD4, - .unkC = sub_81CDE2C, - .unk10 = sub_81CDE64, - .unk14 = sub_81CD1C0, - .unk18 = sub_81CECA0, + .init = PokenavCallback_Init_7, + .callback = sub_81CD070, + .open = sub_81CDDD4, + .createLoopTask = sub_81CDE2C, + .isLoopTaskActive = sub_81CDE64, + .free1 = sub_81CD1C0, + .free2 = sub_81CECA0, }, + [POKENAV_CONDITION_SEARCH_RESULTS - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_8, - .unk4 = sub_81CEFDC, - .unk8 = sub_81CF330, - .unkC = sub_81CF3A0, - .unk10 = sub_81CF3D0, - .unk14 = sub_81CEFF0, - .unk18 = sub_81CF3F8, + .init = PokenavCallback_Init_8, + .callback = sub_81CEFDC, + .open = sub_81CF330, + .createLoopTask = sub_81CF3A0, + .isLoopTaskActive = sub_81CF3D0, + .free1 = sub_81CEFF0, + .free2 = sub_81CF3F8, }, + [POKENAV_MENU_9 - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_9, - .unk4 = sub_81CD070, - .unk8 = sub_81CDDD4, - .unkC = sub_81CDE2C, - .unk10 = sub_81CDE64, - .unk14 = sub_81CD1C0, - .unk18 = sub_81CECA0, + .init = PokenavCallback_Init_9, + .callback = sub_81CD070, + .open = sub_81CDDD4, + .createLoopTask = sub_81CDE2C, + .isLoopTaskActive = sub_81CDE64, + .free1 = sub_81CD1C0, + .free2 = sub_81CECA0, }, + [POKENAV_MENU_A - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_10, - .unk4 = sub_81CEFDC, - .unk8 = sub_81CF368, - .unkC = sub_81CF3A0, - .unk10 = sub_81CF3D0, - .unk14 = sub_81CEFF0, - .unk18 = sub_81CF3F8, + .init = PokenavCallback_Init_10, + .callback = sub_81CEFDC, + .open = sub_81CF368, + .createLoopTask = sub_81CF3A0, + .isLoopTaskActive = sub_81CF3D0, + .free1 = sub_81CEFF0, + .free2 = sub_81CF3F8, }, + [POKENAV_MATCH_CALL - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_11, - .unk4 = sub_81CAB24, - .unk8 = sub_81CB260, - .unkC = CreateMatchCallLoopedTask, - .unk10 = sub_81CB2CC, - .unk14 = sub_81CAB38, - .unk18 = sub_81CB2E0, + .init = PokenavCallback_Init_MatchCall, + .callback = GetMatchCallCallback, + .open = OpenMatchCall, + .createLoopTask = CreateMatchCallLoopedTask, + .isLoopTaskActive = IsMatchCallLoopedTaskActive, + .free1 = FreeMatchCallSubstruct1, + .free2 = FreeMatchCallSubstruct2, }, + [POKENAV_RIBBONS_MON_LIST - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_12, - .unk4 = sub_81CFA34, - .unk8 = sub_81CFDD0, - .unkC = sub_81CFE40, - .unk10 = sub_81CFE70, - .unk14 = sub_81CFA48, - .unk18 = sub_81CFE98, + .init = PokenavCallback_Init_12, + .callback = sub_81CFA34, + .open = sub_81CFDD0, + .createLoopTask = sub_81CFE40, + .isLoopTaskActive = sub_81CFE70, + .free1 = sub_81CFA48, + .free2 = sub_81CFE98, }, + [POKENAV_MENU_D - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_13, - .unk4 = sub_81D04A0, - .unk8 = sub_81D0978, - .unkC = sub_81D09B0, - .unk10 = sub_81D09E0, - .unk14 = sub_81D04B8, - .unk18 = sub_81D09F4, + .init = PokenavCallback_Init_13, + .callback = sub_81D04A0, + .open = sub_81D0978, + .createLoopTask = sub_81D09B0, + .isLoopTaskActive = sub_81D09E0, + .free1 = sub_81D04B8, + .free2 = sub_81D09F4, }, + [POKENAV_MENU_E - POKENAV_MENU_IDS_START] = { - .unk0 = PokenavCallback_Init_14, - .unk4 = sub_81CFA34, - .unk8 = sub_81CFE08, - .unkC = sub_81CFE40, - .unk10 = sub_81CFE70, - .unk14 = sub_81CFA48, - .unk18 = sub_81CFE98, + .init = PokenavCallback_Init_14, + .callback = sub_81CFA34, + .open = sub_81CFE08, + .createLoopTask = sub_81CFE40, + .isLoopTaskActive = sub_81CFE70, + .free1 = sub_81CFA48, + .free2 = sub_81CFE98, }, }; @@ -416,66 +432,68 @@ static void VBlankCB_Pokenav(void) ProcessSpriteCopyRequests(); } +#define tState data[0] + static void Task_Pokenav(u8 taskId) { - u32 v1; + u32 menuId; s16 *data = gTasks[taskId].data; - switch (data[0]) + switch (tState) { case 0: InitPokenavMainMenu(); - data[0] = 1; + tState = 1; break; case 1: // Wait for LoopedTask_InitPokenavMenu to finish if (PokenavMainMenuLoopedTaskIsActive()) break; - SetActivePokenavMenu(POKENAV_MENU_0); - data[0] = 4; + SetActivePokenavMenu(POKENAV_MAIN_MENU); + tState = 4; break; case 2: if (sub_81C786C()) break; - data[0] = 3; + tState = 3; case 3: - v1 = sub_81C75E0(); - if (v1 == -1) + menuId = GetCurrentMenuCB(); + if (menuId == -1) { ShutdownPokenav(); - data[0] = 5; + tState = 5; } - else if (v1 >= POKENAV_MENU_IDS_START) + else if (menuId >= POKENAV_MENU_IDS_START) { - PokenavMenuCallbacks[gPokenavResources->currentMenuIndex].unk18(); - PokenavMenuCallbacks[gPokenavResources->currentMenuIndex].unk14(); - if (SetActivePokenavMenu(v1)) + PokenavMenuCallbacks[gPokenavResources->currentMenuIndex].free2(); + PokenavMenuCallbacks[gPokenavResources->currentMenuIndex].free1(); + if (SetActivePokenavMenu(menuId)) { - data[0] = 4; + tState = 4; } else { ShutdownPokenav(); - data[0] = 5; + tState = 5; } } - else if (v1 != 0) + else if (menuId != 0) { - sub_81C7850(v1); + sub_81C7850(menuId); if (sub_81C786C()) - data[0] = 2; + tState = 2; } break; case 4: if (!sub_81C75D4()) - data[0] = 3; + tState = 3; break; case 5: if (!WaitForPokenavShutdownFade()) { bool32 calledFromScript = (gPokenavResources->mode != POKENAV_MODE_NORMAL); - sub_81C9430(); + FreeMenuHandlerSubstruct1(); FreePokenavResources(); if (calledFromScript) SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic); @@ -486,18 +504,20 @@ static void Task_Pokenav(u8 taskId) } } +#undef tState + static bool32 SetActivePokenavMenu(u32 menuId) { u32 index = menuId - POKENAV_MENU_IDS_START; InitKeys_(); - if (!PokenavMenuCallbacks[index].unk0()) + if (!PokenavMenuCallbacks[index].init()) return FALSE; - if (!PokenavMenuCallbacks[index].unk8()) + if (!PokenavMenuCallbacks[index].open()) return FALSE; - sub_81C7834(PokenavMenuCallbacks[index].unkC, PokenavMenuCallbacks[index].unk10); - gPokenavResources->currentMenuCb1 = PokenavMenuCallbacks[index].unk4; + sub_81C7834(PokenavMenuCallbacks[index].createLoopTask, PokenavMenuCallbacks[index].isLoopTaskActive); + gPokenavResources->currentMenuCb1 = PokenavMenuCallbacks[index].callback; gPokenavResources->currentMenuIndex = index; return TRUE; } @@ -507,7 +527,7 @@ static u32 sub_81C75D4(void) return sub_81C786C(); } -static u32 sub_81C75E0(void) +static u32 GetCurrentMenuCB(void) { return gPokenavResources->currentMenuCb1(); } diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 70c309992..84e2a9682 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -147,7 +147,7 @@ u32 sub_81CD110(struct PokenavSub11 *structPtr) u32 sub_81CD19C(struct PokenavSub11 *structPtr) { if (structPtr->unk6300 == 0) - return POKENAV_MENU_2; + return POKENAV_CONDITION_MENU; else return POKENAV_MENU_A; } diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 11fdaa425..ed253f90f 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -296,7 +296,7 @@ u32 sub_81CDE94(s32 state) PrintHelpBarText(HELPBAR_CONDITION_MON_STATUS); return LT_INC_AND_PAUSE; case 15: - sub_81C7AC0(1); + PokenavFadeScreen(1); if (!sub_81CDD5C()) { LoadLeftHeaderGfxForIndex(6); @@ -353,7 +353,7 @@ u32 sub_81CE2D0(s32 state) sub_81CEE74(FALSE); return 1; case 2: - sub_81C7AC0(0); + PokenavFadeScreen(0); if (!sub_81CDD5C()) sub_81C78A0(); return 0; diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 9b6ce432b..74bc3cc9d 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -197,12 +197,12 @@ static u32 sub_81CF030(struct PokenavSub7 *structPtr) static u32 sub_81CF0B0(struct PokenavSub7 *structPtr) { - return 100003; + return POKENAV_CONDITION_SEARCH_MENU; } static u32 sub_81CF0B8(struct PokenavSub7 *structPtr) { - return 100009; + return POKENAV_MENU_9; } static u32 sub_81CF0C0(void) @@ -448,7 +448,7 @@ static u32 sub_81CF418(s32 state) sub_81C7FA0(r4, 1, 0); sub_81C7FA0(1, 1, 0); } - sub_81C7AC0(1); + PokenavFadeScreen(1); return LT_INC_AND_PAUSE; case 5: if (IsPaletteFadeActive()) @@ -598,7 +598,7 @@ static u32 sub_81CF758(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); + PokenavFadeScreen(0); sub_81C78A0(); return LT_INC_AND_PAUSE; case 1: @@ -618,7 +618,7 @@ static u32 sub_81CF798(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); + PokenavFadeScreen(0); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 583d23a55..fdd27b087 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -13,28 +13,6 @@ #include "menu.h" #include "dma3.h" -enum -{ - POKENAV_GFX_MAIN_MENU, - POKENAV_GFX_CONDITION_MENU, - POKENAV_GFX_RIBBONS_MENU, - POKENAV_GFX_MATCH_CALL_MENU, - // One of these is for the zoomed-in map, and the other is for the - // zoomed-out map. Don't know which is which yet. - POKENAV_GFX_MAP_MENU_UNK0, - POKENAV_GFX_MAP_MENU_UNK1, - POKENAV_GFX_PARTY_MENU, - POKENAV_GFX_SEARCH_MENU, - POKENAV_GFX_COOL_MENU, - POKENAV_GFX_BEAUTY_MENU, - POKENAV_GFX_CUTE_MENU, - POKENAV_GFX_SMART_MENU, - POKENAV_GFX_TOUGH_MENU, - POKENAV_GFX_MENUS_END, -}; - -#define POKENAV_GFX_SUBMENUS_START POKENAV_GFX_PARTY_MENU - struct PokenavMainMenuResources { void (*unk0)(u32); @@ -42,7 +20,7 @@ struct PokenavMainMenuResources u32 unk8; u32 currentTaskId; u32 helpBarWindowId; - u32 unk14; + u32 palettes; struct Sprite *spinningPokenav; struct Sprite *leftHeaderSprites[2]; struct Sprite *submenuLeftHeaderSprites[2]; @@ -174,12 +152,12 @@ static const struct CompressedSpriteSheet sPokenavMenuLeftHeaderSpriteSheets[] = .size = 0x20, .tag = 4 }, - [POKENAV_GFX_MAP_MENU_UNK0] = { + [POKENAV_GFX_MAP_MENU_ZOOMED_OUT] = { .data = gPokenavLeftHeaderHoennMap_Gfx, .size = 0x20, .tag = 0 }, - [POKENAV_GFX_MAP_MENU_UNK1] = { + [POKENAV_GFX_MAP_MENU_ZOOMED_IN] = { .data = gPokenavLeftHeaderHoennMap_Gfx, .size = 0x40, .tag = 0 @@ -343,7 +321,7 @@ bool32 WaitForPokenavShutdownFade(void) { if (!gPaletteFade.active) { - sub_81C99D4(); + FreeMenuHandlerSubstruct2(); CleanupPokenavMainMenuResources(); FreeAllWindowBuffers(); return FALSE; @@ -629,17 +607,17 @@ _081C7AAE:\n\ .syntax divided"); } -void sub_81C7AC0(s32 a0) +void PokenavFadeScreen(s32 fadeType) { struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); - switch (a0) + switch (fadeType) { case 0: - BeginNormalPaletteFade(structPtr->unk14, -2, 0, 16, RGB_BLACK); + BeginNormalPaletteFade(structPtr->palettes, -2, 0, 16, RGB_BLACK); break; case 1: - BeginNormalPaletteFade(structPtr->unk14, -2, 16, 0, RGB_BLACK); + BeginNormalPaletteFade(structPtr->palettes, -2, 16, 0, RGB_BLACK); break; case 2: BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK); @@ -708,7 +686,7 @@ static void InitPokenavMainMenuResources(void) LoadCompressedSpriteSheet(&gSpinningPokenavSpriteSheet[i]); Pokenav_AllocAndLoadPalettes(gSpinningNavgearPalettes); - structPtr->unk14 = ~1 & ~(0x10000 << IndexOfSpritePaletteTag(0)); + structPtr->palettes = ~1 & ~(0x10000 << IndexOfSpritePaletteTag(0)); spriteId = CreateSprite(&sSpinningPokenavSpriteTemplate, 220, 12, 0); structPtr->spinningPokenav = &gSprites[spriteId]; } @@ -772,61 +750,61 @@ static void InitHoennMapHeaderSprites(void) } } -void LoadLeftHeaderGfxForIndex(u32 arg0) +void LoadLeftHeaderGfxForIndex(u32 menuGfxId) { - if (arg0 < POKENAV_GFX_SUBMENUS_START) - LoadLeftHeaderGfxForMenu(arg0); + if (menuGfxId < POKENAV_GFX_SUBMENUS_START) + LoadLeftHeaderGfxForMenu(menuGfxId); else - LoadLeftHeaderGfxForSubMenu(arg0 - POKENAV_GFX_SUBMENUS_START); + LoadLeftHeaderGfxForSubMenu(menuGfxId - POKENAV_GFX_SUBMENUS_START); } -void sub_81C7E14(u32 arg0) +void sub_81C7E14(u32 menuGfxId) { struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); - if (arg0 == 4) + if (menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_OUT) structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 32; else structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 64; } -static void LoadLeftHeaderGfxForMenu(u32 index) +static void LoadLeftHeaderGfxForMenu(u32 menuGfxId) { struct PokenavMainMenuResources *structPtr; u32 size, tag; - if (index >= POKENAV_GFX_SUBMENUS_START) + if (menuGfxId >= POKENAV_GFX_SUBMENUS_START) return; structPtr = GetSubstructPtr(0); - tag = sPokenavMenuLeftHeaderSpriteSheets[index].tag; - size = GetDecompressedDataSize(sPokenavMenuLeftHeaderSpriteSheets[index].data); + tag = sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].tag; + size = GetDecompressedDataSize(sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].data); LoadPalette(&gPokenavLeftHeader_Pal[tag * 16], (IndexOfSpritePaletteTag(1) * 16) + 0x100, 0x20); - LZ77UnCompWram(sPokenavMenuLeftHeaderSpriteSheets[index].data, gDecompressionBuffer); + LZ77UnCompWram(sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].data, gDecompressionBuffer); RequestDma3Copy(gDecompressionBuffer, (void *)VRAM + 0x10000 + (GetSpriteTileStartByTag(2) * 32), size, 1); - structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + sPokenavMenuLeftHeaderSpriteSheets[index].size; + structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].size; - if (index == POKENAV_GFX_MAP_MENU_UNK0 || index == POKENAV_GFX_MAP_MENU_UNK1) + if (menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_OUT || menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_IN) structPtr->leftHeaderSprites[1]->pos2.x = 56; else structPtr->leftHeaderSprites[1]->pos2.x = 64; } -static void LoadLeftHeaderGfxForSubMenu(u32 arg0) +static void LoadLeftHeaderGfxForSubMenu(u32 menuGfxId) { u32 size, tag; - if (arg0 >= POKENAV_GFX_MENUS_END - POKENAV_GFX_SUBMENUS_START) + if (menuGfxId >= POKENAV_GFX_MENUS_END - POKENAV_GFX_SUBMENUS_START) return; - tag = sPokenavSubMenuLeftHeaderSpriteSheets[arg0].tag; - size = GetDecompressedDataSize(sPokenavSubMenuLeftHeaderSpriteSheets[arg0].data); + tag = sPokenavSubMenuLeftHeaderSpriteSheets[menuGfxId].tag; + size = GetDecompressedDataSize(sPokenavSubMenuLeftHeaderSpriteSheets[menuGfxId].data); LoadPalette(&gPokenavLeftHeader_Pal[tag * 16], (IndexOfSpritePaletteTag(2) * 16) + 0x100, 0x20); - LZ77UnCompWram(sPokenavSubMenuLeftHeaderSpriteSheets[arg0].data, &gDecompressionBuffer[0x1000]); + LZ77UnCompWram(sPokenavSubMenuLeftHeaderSpriteSheets[menuGfxId].data, &gDecompressionBuffer[0x1000]); RequestDma3Copy(&gDecompressionBuffer[0x1000], (void *)VRAM + 0x10800 + (GetSpriteTileStartByTag(2) * 32), size, 1); } -void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2) +void sub_81C7FA0(u32 menuGfxId, bool32 arg1, bool32 arg2) { u32 var; @@ -835,7 +813,7 @@ void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2) else var = 0x10; - if (arg0 < 6) + if (menuGfxId < POKENAV_GFX_SUBMENUS_START) ShowLeftHeaderSprites(var, arg2); else ShowLeftHeaderSubmenuSprites(var, arg2); diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index 28e84b50b..ef1d5343f 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -30,7 +30,7 @@ struct Pokenav3Struct }; static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); -static u32 sub_81CABFC(struct Pokenav3Struct *); +static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *); static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *); static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *); static u32 CB2_HandleCallInput(struct Pokenav3Struct *); @@ -52,7 +52,7 @@ static const u8 sMatchCallOptionsHasCheckPage[] = MATCH_CALL_OPTION_CANCEL }; -bool32 PokenavCallback_Init_11(void) +bool32 PokenavCallback_Init_MatchCall(void) { struct Pokenav3Struct *state = AllocSubstruct(5, sizeof(struct Pokenav3Struct)); if (!state) @@ -65,13 +65,13 @@ bool32 PokenavCallback_Init_11(void) return TRUE; } -u32 sub_81CAB24(void) +u32 GetMatchCallCallback(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); return state->callback(state); } -void sub_81CAB38(void) +void FreeMatchCallSubstruct1(void) { FreePokenavSubstruct(5); } @@ -113,7 +113,7 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) { if (GetPokenavMode() != POKENAV_MODE_FORCE_CALL_READY) { - state->callback = sub_81CABFC; + state->callback = GetExitMatchCallMenuId; return POKENAV_MC_FUNC_EXIT; } else @@ -126,9 +126,9 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 sub_81CABFC(struct Pokenav3Struct *state) +static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *state) { - return POKENAV_MENU_4; + return POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL; } static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state) diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index aaa1767aa..aa69c592f 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -27,8 +27,8 @@ struct Pokenav4Struct { - bool32 (*unk0)(void); - u32 unk4; + bool32 (*isTaskActiveCB)(void); + u32 loopTaskId; u8 filler8[0x6]; u8 unkE; u8 unkF; @@ -49,8 +49,8 @@ struct Pokenav4Struct u8 unk2028[0x20]; }; -static bool32 sub_81CB310(void); -static u32 sub_81CB324(s32); +static bool32 GetCurrentLoopedTaskActive(void); +static u32 LoopedTask_OpenMatchCall(s32); static void sub_81CBBB8(void); static void sub_81CBC1C(void); static void sub_81CC2B4(void); @@ -274,32 +274,32 @@ static const struct SpriteTemplate sTrainerPicSpriteTemplate = .callback = SpriteCallbackDummy, }; -bool32 sub_81CB260(void) +bool32 OpenMatchCall(void) { struct Pokenav4Struct *state = AllocSubstruct(6, sizeof(struct Pokenav4Struct)); if (!state) return FALSE; state->unk19 = 0; - state->unk4 = CreateLoopedTask(sub_81CB324, 1); - state->unk0 = sub_81CB310; + state->loopTaskId = CreateLoopedTask(LoopedTask_OpenMatchCall, 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; return TRUE; } void CreateMatchCallLoopedTask(s32 index) { struct Pokenav4Struct *state = GetSubstructPtr(6); - state->unk4 = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1); - state->unk0 = sub_81CB310; + state->loopTaskId = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; } -u32 sub_81CB2CC(void) +bool32 IsMatchCallLoopedTaskActive(void) { struct Pokenav4Struct *state = GetSubstructPtr(6); - return state->unk0(); + return state->isTaskActiveCB(); } -void sub_81CB2E0(void) +void FreeMatchCallSubstruct2(void) { struct Pokenav4Struct *state = GetSubstructPtr(6); sub_81CC2B4(); @@ -310,13 +310,13 @@ void sub_81CB2E0(void) FreePokenavSubstruct(6); } -static bool32 sub_81CB310(void) +static bool32 GetCurrentLoopedTaskActive(void) { struct Pokenav4Struct *state = GetSubstructPtr(6); - return IsLoopedTaskActive(state->unk4); + return IsLoopedTaskActive(state->loopTaskId); } -static u32 sub_81CB324(s32 taskState) +static u32 LoopedTask_OpenMatchCall(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -376,7 +376,7 @@ static u32 sub_81CB324(s32 taskState) sub_81CC214(); LoadLeftHeaderGfxForIndex(3); sub_81C7FA0(3, 1, 0); - sub_81C7AC0(1); + PokenavFadeScreen(1); return LT_INC_AND_PAUSE; case 7: if (IsPaletteFadeActive() || sub_81C8010()) @@ -849,7 +849,7 @@ u32 ExitMatchCall(s32 taskState) case 0: PlaySE(SE_SELECT); sub_81CBC38(0); - sub_81C7AC0(0); + PokenavFadeScreen(0); sub_81C78A0(); return LT_INC_AND_PAUSE; case 1: diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index fd346393e..01740fcce 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -7,6 +7,8 @@ #include "menu.h" #include "decompress.h" +// TODO: This UI isnt just for match call, seems to be the general pokenav list UI + struct UnknownSubSubStruct_0203CF40 { u8 bg; u8 unk1; diff --git a/src/pokenav_menu_handler_1.c b/src/pokenav_menu_handler_1.c index 44176176d..bd33a21af 100644 --- a/src/pokenav_menu_handler_1.c +++ b/src/pokenav_menu_handler_1.c @@ -11,15 +11,15 @@ struct Pokenav1Struct s16 cursorPos; u16 currMenuItem; u16 helpBarIndex; - u32 unk8; + u32 menuId; u32 (*callback)(struct Pokenav1Struct*); }; static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state); static void ReturnToConditionMenu(struct Pokenav1Struct *state); static void ReturnToMainMenu(struct Pokenav1Struct *state); -static u32 sub_81C97BC(struct Pokenav1Struct *state); -static void sub_81C97B0(struct Pokenav1Struct *state, u32 a1); +static u32 GetMenuId(struct Pokenav1Struct *state); +static void SetMenuIdAndCB(struct Pokenav1Struct *state, u32 a1); static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state); static u32 CB2_ReturnToMainMenu(struct Pokenav1Struct *state); static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state); @@ -97,7 +97,7 @@ static u8 GetPokenavMainMenuType(void) return menuType; } -bool32 PokenavCallback_Init_0(void) +bool32 PokenavCallback_Init_MainMenuCursorOnMap(void) { struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct)); if (!state) @@ -111,7 +111,7 @@ bool32 PokenavCallback_Init_0(void) return TRUE; } -bool32 PokenavCallback_Init_4(void) +bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void) { struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct)); if (!state) @@ -125,7 +125,7 @@ bool32 PokenavCallback_Init_4(void) return TRUE; } -bool32 PokenavCallback_Init_5(void) +bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void) { struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct)); if (!state) @@ -138,7 +138,7 @@ bool32 PokenavCallback_Init_5(void) return TRUE; } -bool32 PokenavCallback_Init_2(void) +bool32 PokenavCallback_Init_ConditionMenu(void) { struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct)); if (!state) @@ -152,7 +152,7 @@ bool32 PokenavCallback_Init_2(void) return TRUE; } -bool32 PokenavCallback_Init_3(void) +bool32 PokenavCallback_Init_ConditionSearchMenu(void) { struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct)); if (!state) @@ -200,13 +200,13 @@ static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*) } } -u32 sub_81C941C(void) +u32 GetMenuHandlerCallback(void) { struct Pokenav1Struct *state = GetSubstructPtr(1); return state->callback(state); } -void sub_81C9430(void) +void FreeMenuHandlerSubstruct1(void) { FreePokenavSubstruct(1); } @@ -222,7 +222,7 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state) { case POKENAV_MENUITEM_MAP: state->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT; - sub_81C97B0(state, POKENAV_MENU_6); + SetMenuIdAndCB(state, POKENAV_REGION_MAP); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_CONDITION: state->menuType = POKENAV_MENU_TYPE_CONDITION; @@ -232,13 +232,13 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state) return POKENAV_MENU_FUNC_OPEN_CONDITION; case POKENAV_MENUITEM_MATCH_CALL: state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - sub_81C97B0(state, POKENAV_MENU_B); + SetMenuIdAndCB(state, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_RIBBONS: if (CanViewRibbonsMenu()) { state->helpBarIndex = HELPBAR_RIBBONS_MON_LIST; - sub_81C97B0(state, POKENAV_MENU_C); + SetMenuIdAndCB(state, POKENAV_RIBBONS_MON_LIST); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else @@ -268,7 +268,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state) if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL) { state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - sub_81C97B0(state, POKENAV_MENU_B); + SetMenuIdAndCB(state, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else @@ -304,7 +304,7 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state) else if (menuItem == POKENAV_MENUITEM_MATCH_CALL) { state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - sub_81C97B0(state, POKENAV_MENU_B); + SetMenuIdAndCB(state, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else @@ -355,7 +355,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state) return POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH; case POKENAV_MENUITEM_CONDITION_PARTY: state->helpBarIndex = 0; - sub_81C97B0(state, POKENAV_MENU_7); + SetMenuIdAndCB(state, POKENAV_CONDITION_PARTY); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_CONDITION_CANCEL: PlaySE(SE_SELECT); @@ -393,7 +393,7 @@ static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state) if (menuItem != POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL) { SetSelectedConditionSearch(menuItem - POKENAV_MENUITEM_CONDITION_SEARCH_COOL); - sub_81C97B0(state, POKENAV_MENU_8); + SetMenuIdAndCB(state, POKENAV_CONDITION_SEARCH_RESULTS); state->helpBarIndex = HELPBAR_CONDITION_MON_LIST; return POKENAV_MENU_FUNC_OPEN_FEATURE; } @@ -434,15 +434,15 @@ static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state) return POKENAV_MENU_FUNC_RETURN_TO_CONDITION; } -static void sub_81C97B0(struct Pokenav1Struct *state, u32 a1) +static void SetMenuIdAndCB(struct Pokenav1Struct *state, u32 menuId) { - state->unk8 = a1; - state->callback = sub_81C97BC; + state->menuId = menuId; + state->callback = GetMenuId; } -static u32 sub_81C97BC(struct Pokenav1Struct *state) +static u32 GetMenuId(struct Pokenav1Struct *state) { - return state->unk8; + return state->menuId; } static void ReturnToMainMenu(struct Pokenav1Struct *state) diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index 94b816b6d..1dfbf3417 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -17,26 +17,24 @@ #include "constants/songs.h" #include "constants/rgb.h" -// Top Menu - struct Pokenav2Struct { - bool32 (*callback)(void); + bool32 (*isTaskActiveCB)(void); u32 loopedTaskId; u16 optionDescWindowId; u8 bg3ScrollTaskId; u8 cursorPos; bool8 otherIconsInMotion; - u8 field_00d; + bool8 pokenavAlreadyOpen; bool32 iconVisible[MAX_POKENAV_MENUITEMS]; struct Sprite * field_028; struct Sprite * iconSprites[MAX_POKENAV_MENUITEMS][4]; u16 bg1TilemapBuffer[0x400]; }; -static struct Pokenav2Struct * sub_81C9958(void); -static bool32 sub_81C99FC(void); -static u32 sub_81C9A10(s32 state); +static struct Pokenav2Struct * OpenPokenavMenu(void); +static bool32 GetCurrentLoopedTaskActive(void); +static u32 LoopedTask_OpenMenu(s32 state); static u32 LoopedTask_MoveMenuCursor(s32 state); static u32 LoopedTask_OpenConditionMenu(s32 state); static u32 LoopedTask_ReturnToMainMenu(s32 state); @@ -337,59 +335,56 @@ static bool32 sub_81C98D4(void) return FALSE; } -bool32 sub_81C9924(void) +bool32 OpenPokenavMenuInitial(void) { - struct Pokenav2Struct * unk = sub_81C9958(); + struct Pokenav2Struct * state = OpenPokenavMenu(); - if (unk == NULL) + if (state == NULL) return FALSE; - unk->field_00d = 0; + state->pokenavAlreadyOpen = FALSE; return TRUE; } -bool32 sub_81C9940(void) +bool32 OpenPokenavMenuNotInitial(void) { - struct Pokenav2Struct * unk = sub_81C9958(); + struct Pokenav2Struct * state = OpenPokenavMenu(); - if (unk == NULL) + if (state == NULL) return FALSE; - unk->field_00d = 1; + state->pokenavAlreadyOpen = TRUE; return TRUE; } -static struct Pokenav2Struct * sub_81C9958(void) +static struct Pokenav2Struct * OpenPokenavMenu(void) { - struct Pokenav2Struct * unk = AllocSubstruct(2, sizeof(struct Pokenav2Struct)); + struct Pokenav2Struct * state = AllocSubstruct(2, sizeof(struct Pokenav2Struct)); - if (unk != NULL) + if (state != NULL) { - unk->otherIconsInMotion = FALSE; - unk->loopedTaskId = CreateLoopedTask(sub_81C9A10, 1); - unk->callback = sub_81C99FC; + state->otherIconsInMotion = FALSE; + state->loopedTaskId = CreateLoopedTask(LoopedTask_OpenMenu, 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; } - return unk; + return state; } - void CreateMenuHandlerLoopedTask(s32 ltIdx) { - struct Pokenav2Struct * unk = GetSubstructPtr(2); - - unk->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1); - unk->callback = sub_81C99FC; + struct Pokenav2Struct * state = GetSubstructPtr(2); + state->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; } -bool32 sub_81C99C0(void) +bool32 IsMenuHandlerLoopedTaskActive(void) { - struct Pokenav2Struct * unk = GetSubstructPtr(2); - - return unk->callback(); + struct Pokenav2Struct * state = GetSubstructPtr(2); + return state->isTaskActiveCB(); } -void sub_81C99D4(void) +void FreeMenuHandlerSubstruct2(void) { struct Pokenav2Struct * unk = GetSubstructPtr(2); @@ -400,14 +395,14 @@ void sub_81C99D4(void) FreePokenavSubstruct(2); } -static bool32 sub_81C99FC(void) +static bool32 GetCurrentLoopedTaskActive(void) { struct Pokenav2Struct * unk = GetSubstructPtr(2); return IsLoopedTaskActive(unk->loopedTaskId); } -static u32 sub_81C9A10(s32 state) +static u32 LoopedTask_OpenMenu(s32 state) { struct Pokenav2Struct * unk = GetSubstructPtr(2); @@ -466,12 +461,12 @@ static u32 sub_81C9A10(s32 state) ShowBg(1); ShowBg(2); ShowBg(3); - if (unk->field_00d) - sub_81C7AC0(1); + if (unk->pokenavAlreadyOpen) + PokenavFadeScreen(1); else { PlaySE(SE_PN_ON); - sub_81C7AC0(3); + PokenavFadeScreen(3); } switch (GetPokenavMenuType()) { @@ -741,7 +736,7 @@ static u32 LoopedTask_OpenPokenavFeature(s32 state) return LT_PAUSE; if (sub_81C8010()) return LT_PAUSE; - sub_81C7AC0(0); + PokenavFadeScreen(0); return LT_INC_AND_PAUSE; case 3: if (IsPaletteFadeActive()) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index be30ca94d..59eaf6b71 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -13,23 +13,27 @@ #include "task.h" #include "text_window.h" #include "window.h" +#include "constants/rgb.h" #include "constants/songs.h" +#include "constants/region_map_sections.h" + +#define NUM_CITY_MAPS 22 struct Pokenav5Struct { u8 filler0[0xC]; - bool32 unkC; - u32 (*unk10)(struct Pokenav5Struct *); + bool32 zoomDisabled; + u32 (*callback)(struct Pokenav5Struct *); }; struct Pokenav5Struct_2 { - bool32 (*unk0)(void); - u32 unk4; - u16 unk8; - struct Sprite *cityFeatureTextSprites[3]; - u8 unk18[0x800]; - u8 cityZoomPics[22][0xC8]; + bool32 (*isTaskActiveCB)(void); + u32 loopTaskId; + u16 infoWindowId; + struct Sprite *cityZoomTextSprites[3]; + u8 tilemapBuffer[0x800]; + u8 cityZoomPics[NUM_CITY_MAPS][200]; }; struct CityMapEntry @@ -39,45 +43,43 @@ struct CityMapEntry const u32 *tilemap; }; -static u32 sub_81CC568(struct Pokenav5Struct *); -static u32 sub_81CC5B4(struct Pokenav5Struct *); -static u32 sub_81CC5DC(struct Pokenav5Struct *); -static u32 sub_81CC6F4(s32); -static u32 sub_81CCD34(s32); -static bool32 sub_81CC6BC(void); -static void sub_81CC9EC(void); -static void sub_81CC9C0(void); -static void sub_81CCD10(void); -static bool32 sub_81CCD24(void); -static void sub_81CCA1C(struct Pokenav5Struct_2 *); -static bool32 sub_81CCAFC(void); -static void sub_81CCB0C(struct Pokenav5Struct_2 *); -static bool32 sub_81CCC4C(struct Pokenav5Struct_2 *); -static void sub_81CCC5C(int); -static bool32 sub_81CCC88(void); -static void sub_81CCE58(void); -static void sub_81CCD70(struct Pokenav5Struct_2 *, int, int); -static void sub_81CCDE8(struct Pokenav5Struct_2 *, int, int); -static void sub_81CCFA4(int); -static void sub_81CCC9C(u8 taskId); -static void sub_81CCF78(void); -void sub_81CCEF4(struct Sprite *sprite); -u32 sub_81CC848(s32); -u32 sub_81CC878(s32); -u32 sub_81CC8D8(s32); -u32 sub_81CC95C(s32); +static u32 HandleRegionMapInput(struct Pokenav5Struct *); +static u32 HandleRegionMapInputZoomDisabled(struct Pokenav5Struct *); +static u32 GetExitRegionMapMenuId(struct Pokenav5Struct *); +static u32 LoopedTask_OpenRegionMap(s32); +static u32 LoopedTask_DecompressCityMaps(s32); +static bool32 GetCurrentLoopedTaskActive(void); +static void FreeCityZoomViewGfx(void); +static void LoadCityZoomViewGfx(void); +static void DecompressCityMaps(void); +static bool32 IsDecompressCityMapsActive(void); +static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *); +static bool32 TryFreeTempTileDataBuffers(void); +static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *); +static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav5Struct_2 *); +static void ChangeBgYForZoom(bool32); +static bool32 IsChangeBgYForZoomActive(void); +static void CreateCityZoomTextSprites(void); +static void DrawCityMap(struct Pokenav5Struct_2 *, int, int); +static void PrintLandmarkNames(struct Pokenav5Struct_2 *, int, int); +static void SetCityZoomTextInvisibility(bool32); +static void Task_ChangeBgYForZoom(u8 taskId); +static void UpdateCityZoomTextPosition(void); +static void SpriteCB_CityZoomText(struct Sprite *sprite); +static u32 LoopedTask_UpdateInfoAfterCursorMove(s32); +static u32 LoopedTask_RegionMapZoomOut(s32); +static u32 LoopedTask_RegionMapZoomIn(s32); +static u32 LoopedTask_ExitRegionMap(s32); -extern const u16 gHoennMapZoomIcons_Pal[]; -extern const struct SpriteTemplate gUnknown_086231D0; -extern const u32 gHoennMapZoomIcons_Gfx[]; +extern const u16 gRegionMapCityZoomTiles_Pal[]; +extern const u32 gRegionMapCityZoomText_Gfx[]; -const u16 gUnknown_08622868[] = INCBIN_U16("graphics/pokenav/8622868.gbapal"); -const u32 gUnknown_08622888[] = INCBIN_U32("graphics/pokenav/zoom_tiles.4bpp.lz"); +static const u16 sMapSecInfoWindow_Pal[] = INCBIN_U16("graphics/pokenav/region_map_info_window.gbapal"); +static const u32 sRegionMapCityZoomTiles_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_tiles.4bpp.lz"); #include "data/region_map/city_map_tilemaps.h" - -const struct BgTemplate gUnknown_086230D8[3] = +static const struct BgTemplate sRegionMapBgTemplates[3] = { { .bg = 1, @@ -108,27 +110,27 @@ const struct BgTemplate gUnknown_086230D8[3] = }, }; -const LoopedTask gUnknown_086230E4[] = +static const LoopedTask sRegionMapLoopTaskFuncs[] = { - NULL, - sub_81CC848, - sub_81CC878, - sub_81CC8D8, - sub_81CC95C + [POKENAV_MAP_FUNC_NONE] = NULL, + [POKENAV_MAP_FUNC_CURSOR_MOVED] = LoopedTask_UpdateInfoAfterCursorMove, + [POKENAV_MAP_FUNC_ZOOM_OUT] = LoopedTask_RegionMapZoomOut, + [POKENAV_MAP_FUNC_ZOOM_IN] = LoopedTask_RegionMapZoomIn, + [POKENAV_MAP_FUNC_EXIT] = LoopedTask_ExitRegionMap }; -const struct CompressedSpriteSheet gUnknown_086230F8[1] = +static const struct CompressedSpriteSheet sCityZoomTextSpriteSheet[1] = { - {gHoennMapZoomIcons_Gfx, 0x800, 6} + {gRegionMapCityZoomText_Gfx, 0x800, 6} }; -const struct SpritePalette gUnknown_08623100[] = +static const struct SpritePalette sCityZoomTilesSpritePalette[] = { - {gHoennMapZoomIcons_Pal, 11}, + {gRegionMapCityZoomTiles_Pal, 11}, {} }; -const struct WindowTemplate gUnknown_08623110 = +static const struct WindowTemplate sMapSecInfoWindowTemplate = { .bg = 1, .tilemapLeft = 17, @@ -141,7 +143,7 @@ const struct WindowTemplate gUnknown_08623110 = #include "data/region_map/city_map_entries.h" -const struct OamData gUnknown_086231C8 = +const struct OamData sCityZoomTextSprite_OamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -155,18 +157,18 @@ const struct OamData gUnknown_086231C8 = .paletteNum = 0, }; -const struct SpriteTemplate gUnknown_086231D0 = +static const struct SpriteTemplate sCityZoomTextSpriteTemplate = { .tileTag = 6, .paletteTag = 11, - .oam = &gUnknown_086231C8, + .oam = &sCityZoomTextSprite_OamData, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81CCEF4, + .callback = SpriteCB_CityZoomText, }; -u32 PokenavCallback_Init_6(void) +u32 PokenavCallback_Init_RegionMap(void) { struct Pokenav5Struct *state = AllocSubstruct(3, sizeof(struct Pokenav5Struct)); if (!state) @@ -175,105 +177,105 @@ u32 PokenavCallback_Init_6(void) if (!AllocSubstruct(16, sizeof(struct RegionMap))) return FALSE; - state->unkC = sub_8124668(gMapHeader.regionMapSectionId); - if (!state->unkC) - state->unk10 = sub_81CC568; + state->zoomDisabled = IsEventIslandMapSecId(gMapHeader.regionMapSectionId); + if (!state->zoomDisabled) + state->callback = HandleRegionMapInput; else - state->unk10 = sub_81CC5B4; + state->callback = HandleRegionMapInputZoomDisabled; return TRUE; } -void sub_81CC524(void) +void FreeRegionMapSubstruct1(void) { - gSaveBlock2Ptr->regionMapZoom = sub_8124658(); + gSaveBlock2Ptr->regionMapZoom = IsRegionMapZoomed(); FreePokenavSubstruct(16); FreePokenavSubstruct(3); } -u32 sub_81CC554(void) +u32 GetRegionMapCallback(void) { struct Pokenav5Struct *state = GetSubstructPtr(3); - return state->unk10(state); + return state->callback(state); } -static u32 sub_81CC568(struct Pokenav5Struct *state) +static u32 HandleRegionMapInput(struct Pokenav5Struct *state) { - switch (sub_81230AC()) + switch (DoRegionMapInputCallback()) { - case 3: - return 1; - case 4: - if (!sub_8124658()) - return 3; - return 2; - case 5: - state->unk10 = sub_81CC5DC; - return 4; + case MAP_INPUT_MOVE_END: + return POKENAV_MAP_FUNC_CURSOR_MOVED; + case MAP_INPUT_A_BUTTON: + if (!IsRegionMapZoomed()) + return POKENAV_MAP_FUNC_ZOOM_IN; + return POKENAV_MAP_FUNC_ZOOM_OUT; + case MAP_INPUT_B_BUTTON: + state->callback = GetExitRegionMapMenuId; + return POKENAV_MAP_FUNC_EXIT; } - return 0; + return POKENAV_MAP_FUNC_NONE; } -static u32 sub_81CC5B4(struct Pokenav5Struct *state) +static u32 HandleRegionMapInputZoomDisabled(struct Pokenav5Struct *state) { if (gMain.newKeys & B_BUTTON) { - state->unk10 = sub_81CC5DC; - return 4; + state->callback = GetExitRegionMapMenuId; + return POKENAV_MAP_FUNC_EXIT; } - return 0; + return POKENAV_MAP_FUNC_NONE; } -static u32 sub_81CC5DC(struct Pokenav5Struct *state) +static u32 GetExitRegionMapMenuId(struct Pokenav5Struct *state) { - return POKENAV_MENU_1; + return POKENAV_MAIN_MENU_CURSOR_ON_MAP; } -bool32 sub_81CC5E4(void) +bool32 GetZoomDisabled(void) { struct Pokenav5Struct *state = GetSubstructPtr(3); - return state->unkC; + return state->zoomDisabled; } -bool32 sub_81CC5F4(void) +bool32 OpenPokenavRegionMap(void) { struct Pokenav5Struct_2 *state = AllocSubstruct(4, sizeof(struct Pokenav5Struct_2)); if (!state) return FALSE; - state->unk4 = CreateLoopedTask(sub_81CC6F4, 1); - state->unk0 = sub_81CC6BC; + state->loopTaskId = CreateLoopedTask(LoopedTask_OpenRegionMap, 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; return TRUE; } -void sub_81CC62C(s32 index) +void CreateRegionMapLoopedTask(s32 index) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - state->unk4 = CreateLoopedTask(gUnknown_086230E4[index], 1); - state->unk0 = sub_81CC6BC; + state->loopTaskId = CreateLoopedTask(sRegionMapLoopTaskFuncs[index], 1); + state->isTaskActiveCB = GetCurrentLoopedTaskActive; } -u32 sub_81CC65C(void) +bool32 IsRegionMapLoopedTaskActive(void) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - return state->unk0(); + return state->isTaskActiveCB(); } -void sub_81CC670(void) +void FreeRegionMapSubstruct2(void) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); FreeRegionMapIconResources(); - sub_81CC9EC(); - RemoveWindow(state->unk8); + FreeCityZoomViewGfx(); + RemoveWindow(state->infoWindowId); FreePokenavSubstruct(16); FreePokenavSubstruct(4); SetPokenavVBlankCallback(); SetBgMode(0); } -static void sub_81CC6A4(void) +static void VBlankCB_RegionMap(void) { TransferPlttBuffer(); LoadOam(); @@ -281,23 +283,23 @@ static void sub_81CC6A4(void) UpdateRegionMapVideoRegs(); } -static bool32 sub_81CC6BC(void) +static bool32 GetCurrentLoopedTaskActive(void) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - return IsLoopedTaskActive(state->unk4); + return IsLoopedTaskActive(state->loopTaskId); } -static bool8 sub_81CC6D0(void) +static bool8 ShouldOpenRegionMapZoomed(void) { - if (sub_81CC5E4()) + if (GetZoomDisabled()) return FALSE; - return gSaveBlock2Ptr->regionMapZoom == 1; + return gSaveBlock2Ptr->regionMapZoom == TRUE; } -static u32 sub_81CC6F4(s32 taskState) +static u32 LoopedTask_OpenRegionMap(s32 taskState) { - int var0; + int menuGfxId; struct RegionMap *regionMap; struct Pokenav5Struct_2 *state = GetSubstructPtr(4); switch (taskState) @@ -308,209 +310,209 @@ static u32 sub_81CC6F4(s32 taskState) HideBg(2); HideBg(3); SetBgMode(1); - InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8) - 1); + InitBgTemplates(sRegionMapBgTemplates, ARRAY_COUNT(sRegionMapBgTemplates) - 1); regionMap = GetSubstructPtr(16); - sub_8122CF8(regionMap, &gUnknown_086230D8[1], sub_81CC6D0()); - sub_81CC9C0(); - return 0; + InitRegionMapData(regionMap, &sRegionMapBgTemplates[1], ShouldOpenRegionMapZoomed()); + LoadCityZoomViewGfx(); + return LT_INC_AND_PAUSE; case 1: - if (sub_8122DB0()) - return 2; + if (LoadRegionMapGfx()) + return LT_PAUSE; - if (!sub_81CC5E4()) + if (!GetZoomDisabled()) { CreateRegionMapPlayerIcon(4, 9); CreateRegionMapCursor(5, 10); - sub_812454C(); + TrySetPlayerIconBlink(); } else { - sub_8123030(0, 6); + sub_8123030(RGB_BLACK, 6); } - return 0; + return LT_INC_AND_PAUSE; case 2: - sub_81CCD10(); - return 1; + DecompressCityMaps(); + return LT_INC_AND_CONTINUE; case 3: - if (sub_81CCD24()) - return 2; + if (IsDecompressCityMapsActive()) + return LT_PAUSE; - sub_81CCA1C(state); - return 1; + LoadPokenavRegionMapGfx(state); + return LT_INC_AND_CONTINUE; case 4: - if (sub_81CCAFC()) - return 2; + if (TryFreeTempTileDataBuffers()) + return LT_PAUSE; - sub_81CCB0C(state); + UpdateMapSecInfoWindow(state); sub_81C7B40(); - return 0; + return LT_INC_AND_PAUSE; case 5: - if (sub_81CCC4C(state)) - return 2; + if (IsDma3ManagerBusyWithBgCopy_(state)) + return LT_PAUSE; ShowBg(1); ShowBg(2); - SetVBlankCallback_(sub_81CC6A4); - return 0; + SetVBlankCallback_(VBlankCB_RegionMap); + return LT_INC_AND_PAUSE; case 6: - if (!sub_81CC6D0()) - var0 = 4; + if (!ShouldOpenRegionMapZoomed()) + menuGfxId = POKENAV_GFX_MAP_MENU_ZOOMED_OUT; else - var0 = 5; + menuGfxId = POKENAV_GFX_MAP_MENU_ZOOMED_IN; - LoadLeftHeaderGfxForIndex(var0); - sub_81C7FA0(var0, 1, 1); - sub_81C7AC0(1); - return 0; + LoadLeftHeaderGfxForIndex(menuGfxId); + sub_81C7FA0(menuGfxId, 1, 1); + PokenavFadeScreen(1); + return LT_INC_AND_PAUSE; case 7: if (IsPaletteFadeActive() || sub_81C8010()) - return 2; - return 1; + return LT_PAUSE; + return LT_INC_AND_CONTINUE; default: - return 4; + return LT_FINISH; } } -u32 sub_81CC848(s32 taskState) +static u32 LoopedTask_UpdateInfoAfterCursorMove(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); switch (taskState) { case 0: - sub_81CCB0C(state); - return 0; + UpdateMapSecInfoWindow(state); + return LT_INC_AND_PAUSE; case 1: - if (sub_81CCC4C(state)) - return 2; + if (IsDma3ManagerBusyWithBgCopy_(state)) + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CC878(s32 taskState) +static u32 LoopedTask_RegionMapZoomOut(s32 taskState) { switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81CCC5C(0); - sub_8123418(); - return 0; + ChangeBgYForZoom(FALSE); + SetRegionMapDataForZoom(); + return LT_INC_AND_PAUSE; case 1: - if (sub_8123514() || sub_81CCC88()) - return 2; + if (UpdateRegionMapZoom() || IsChangeBgYForZoomActive()) + return LT_PAUSE; PrintHelpBarText(HELPBAR_MAP_ZOOMED_OUT); - return 0; + return LT_INC_AND_PAUSE; case 2: if (WaitForHelpBar()) - return 2; + return LT_PAUSE; - sub_81C7E14(4); + sub_81C7E14(POKENAV_GFX_MAP_MENU_ZOOMED_OUT); break; } - return 4; + return LT_FINISH; } -u32 sub_81CC8D8(s32 taskState) +static u32 LoopedTask_RegionMapZoomIn(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81CCB0C(state); - return 0; + UpdateMapSecInfoWindow(state); + return LT_INC_AND_PAUSE; case 1: - if (sub_81CCC4C(state)) - return 2; + if (IsDma3ManagerBusyWithBgCopy_(state)) + return LT_PAUSE; - sub_81CCC5C(1); - sub_8123418(); - return 0; + ChangeBgYForZoom(TRUE); + SetRegionMapDataForZoom(); + return LT_INC_AND_PAUSE; case 2: - if (sub_8123514() || sub_81CCC88()) - return 2; + if (UpdateRegionMapZoom() || IsChangeBgYForZoomActive()) + return LT_PAUSE; PrintHelpBarText(HELPBAR_MAP_ZOOMED_IN); - return 0; + return LT_INC_AND_PAUSE; case 3: if (WaitForHelpBar()) - return 2; + return LT_PAUSE; - sub_81C7E14(5); + sub_81C7E14(POKENAV_GFX_MAP_MENU_ZOOMED_IN); break; } - return 4; + return LT_FINISH; } -u32 sub_81CC95C(s32 taskState) +static u32 LoopedTask_ExitRegionMap(s32 taskState) { switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); - return 0; + PokenavFadeScreen(0); + return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) - return 2; + return LT_PAUSE; sub_81C7FDC(); sub_81C78A0(); - return 0; + return LT_INC_AND_PAUSE; case 2: if (MainMenuLoopedTaskIsBusy()) - return 2; + return LT_PAUSE; HideBg(1); HideBg(2); HideBg(3); - return 0; + return LT_INC_AND_PAUSE; } - return 4; + return LT_FINISH; } -static void sub_81CC9C0(void) +static void LoadCityZoomViewGfx(void) { int i; - for (i = 0; i < ARRAY_COUNT(gUnknown_086230F8); i++) - LoadCompressedSpriteSheet(&gUnknown_086230F8[i]); + for (i = 0; i < ARRAY_COUNT(sCityZoomTextSpriteSheet); i++) + LoadCompressedSpriteSheet(&sCityZoomTextSpriteSheet[i]); - Pokenav_AllocAndLoadPalettes(gUnknown_08623100); - sub_81CCE58(); + Pokenav_AllocAndLoadPalettes(sCityZoomTilesSpritePalette); + CreateCityZoomTextSprites(); } -static void sub_81CC9EC(void) +static void FreeCityZoomViewGfx(void) { int i; struct Pokenav5Struct_2 *state = GetSubstructPtr(4); FreeSpriteTilesByTag(6); FreeSpritePaletteByTag(11); - for (i = 0; i < 3; i++) - DestroySprite(state->cityFeatureTextSprites[i]); + for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) + DestroySprite(state->cityZoomTextSprites[i]); } -static void sub_81CCA1C(struct Pokenav5Struct_2 *state) +static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state) { sub_8199DF0(1, PIXEL_FILL(0), 0x40, 1); sub_8199DF0(1, PIXEL_FILL(1), 0x41, 1); - CpuFill16(0x1040, state->unk18, 0x800); - SetBgTilemapBuffer(1, state->unk18); - state->unk8 = AddWindow(&gUnknown_08623110); - LoadUserWindowBorderGfx_(state->unk8, 0x42, 0x40); - DrawTextBorderOuter(state->unk8, 0x42, 4); - decompress_and_copy_tile_data_to_vram(1, gUnknown_08622888, 0, 0, 0); - FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); - PutWindowTilemap(state->unk8); - CopyWindowToVram(state->unk8, 3); - CopyPaletteIntoBufferUnfaded(gUnknown_08622868, 0x10, 0x20); - CopyPaletteIntoBufferUnfaded(gHoennMapZoomIcons_Pal, 0x30, 0x20); - if (!sub_8124658()) + CpuFill16(0x1040, state->tilemapBuffer, 0x800); + SetBgTilemapBuffer(1, state->tilemapBuffer); + state->infoWindowId = AddWindow(&sMapSecInfoWindowTemplate); + LoadUserWindowBorderGfx_(state->infoWindowId, 0x42, 0x40); + DrawTextBorderOuter(state->infoWindowId, 0x42, 4); + decompress_and_copy_tile_data_to_vram(1, sRegionMapCityZoomTiles_Gfx, 0, 0, 0); + FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->infoWindowId); + CopyWindowToVram(state->infoWindowId, 3); + CopyPaletteIntoBufferUnfaded(sMapSecInfoWindow_Pal, 0x10, 0x20); + CopyPaletteIntoBufferUnfaded(gRegionMapCityZoomTiles_Pal, 0x30, 0x20); + if (!IsRegionMapZoomed()) ChangeBgY(1, -0x6000, 0); else ChangeBgY(1, 0, 0); @@ -518,68 +520,70 @@ static void sub_81CCA1C(struct Pokenav5Struct_2 *state) ChangeBgX(1, 0, 0); } -static bool32 sub_81CCAFC(void) +static bool32 TryFreeTempTileDataBuffers(void) { return free_temp_tile_data_buffers_if_possible(); } -static void sub_81CCB0C(struct Pokenav5Struct_2 *state) +static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) { struct RegionMap *regionMap = GetSubstructPtr(16); - switch (regionMap->iconDrawType) + switch (regionMap->mapSecType) { case MAPSECTYPE_CITY_CANFLY: - FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); - PutWindowRectTilemap(state->unk8, 0, 0, 12, 2); - AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); - sub_81CCD70(state, regionMap->mapSecId, regionMap->posWithinMapSec); - CopyWindowToVram(state->unk8, 3); - sub_81CCFA4(0); + FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); + PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); + AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec); + CopyWindowToVram(state->infoWindowId, 3); + SetCityZoomTextInvisibility(FALSE); break; case MAPSECTYPE_CITY_CANTFLY: - FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); - PutWindowRectTilemap(state->unk8, 0, 0, 12, 2); - AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); + PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); + AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17); - CopyWindowToVram(state->unk8, 3); - sub_81CCFA4(1); + CopyWindowToVram(state->infoWindowId, 3); + SetCityZoomTextInvisibility(TRUE); break; - case MAPSECTYPE_PLAIN: + case MAPSECTYPE_ROUTE: case MAPSECTYPE_BATTLE_FRONTIER: - FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); - PutWindowTilemap(state->unk8); - AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); - sub_81CCDE8(state, regionMap->mapSecId, regionMap->posWithinMapSec); - CopyWindowToVram(state->unk8, 3); - sub_81CCFA4(1); + FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->infoWindowId); + AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec); + CopyWindowToVram(state->infoWindowId, 3); + SetCityZoomTextInvisibility(TRUE); break; case MAPSECTYPE_NONE: FillBgTilemapBufferRect(1, 0x1041, 17, 4, 12, 13, 17); CopyBgTilemapBufferToVram(1); - sub_81CCFA4(1); + SetCityZoomTextInvisibility(TRUE); break; } } -static bool32 sub_81CCC4C(struct Pokenav5Struct_2 *state) +static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav5Struct_2 *state) { return IsDma3ManagerBusyWithBgCopy(); } -static void sub_81CCC5C(int arg0) +#define tZoomIn data[0] + +static void ChangeBgYForZoom(bool32 zoomIn) { - u8 taskId = CreateTask(sub_81CCC9C, 3); - gTasks[taskId].data[0] = arg0; + u8 taskId = CreateTask(Task_ChangeBgYForZoom, 3); + gTasks[taskId].tZoomIn = zoomIn; } -static bool32 sub_81CCC88(void) +static bool32 IsChangeBgYForZoomActive(void) { - return FuncIsActiveTask(sub_81CCC9C); + return FuncIsActiveTask(Task_ChangeBgYForZoom); } -static void sub_81CCC9C(u8 taskId) +static void Task_ChangeBgYForZoom(u8 taskId) { - if (gTasks[taskId].data[0]) + if (gTasks[taskId].tZoomIn) { if (ChangeBgY(1, 0x480, 1) >= 0) { @@ -587,7 +591,7 @@ static void sub_81CCC9C(u8 taskId) DestroyTask(taskId); } - sub_81CCF78(); + UpdateCityZoomTextPosition(); } else { @@ -597,46 +601,48 @@ static void sub_81CCC9C(u8 taskId) DestroyTask(taskId); } - sub_81CCF78(); + UpdateCityZoomTextPosition(); } } -static void sub_81CCD10(void) +#undef tZoomIn + +static void DecompressCityMaps(void) { - CreateLoopedTask(sub_81CCD34, 1); + CreateLoopedTask(LoopedTask_DecompressCityMaps, 1); } -static bool32 sub_81CCD24(void) +static bool32 IsDecompressCityMapsActive(void) { - return FuncIsActiveLoopedTask(sub_81CCD34); + return FuncIsActiveLoopedTask(LoopedTask_DecompressCityMaps); } -static u32 sub_81CCD34(s32 taskState) +static u32 LoopedTask_DecompressCityMaps(s32 taskState) { struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - if (taskState < (int)ARRAY_COUNT(gPokenavCityMaps)) + if (taskState < NUM_CITY_MAPS) { - LZ77UnCompWram(gPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]); - return 1; + LZ77UnCompWram(sPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]); + return LT_INC_AND_CONTINUE; } - return 4; + return LT_FINISH; } -static void sub_81CCD70(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +static void DrawCityMap(struct Pokenav5Struct_2 *state, int mapSecId, int pos) { int i; - for (i = 0; i < (int)ARRAY_COUNT(gPokenavCityMaps) && (gPokenavCityMaps[i].mapSecId != mapSecId || gPokenavCityMaps[i].index != pos); i++) + for (i = 0; i < NUM_CITY_MAPS && (sPokenavCityMaps[i].mapSecId != mapSecId || sPokenavCityMaps[i].index != pos); i++) ; - if (i == ARRAY_COUNT(gPokenavCityMaps)) + if (i == NUM_CITY_MAPS) return; FillBgTilemapBufferRect_Palette0(1, 0x1041, 17, 6, 12, 11); CopyToBgTilemapBufferRect(1, state->cityZoomPics[i], 18, 6, 10, 10); } -static void sub_81CCDE8(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int pos) { int i = 0; while (1) @@ -646,26 +652,27 @@ static void sub_81CCDE8(struct Pokenav5Struct_2 *state, int mapSecId, int pos) break; StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12); - AddTextPrinterParameterized(state->unk8, 7, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, 7, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); i++; } } -static void sub_81CCE58(void) +static void CreateCityZoomTextSprites(void) { int i; int y; struct Sprite *sprite; struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - if (!sub_8124658()) + // When not zoomed in the text is still created but its pushed off screen + if (!IsRegionMapZoomed()) y = 228; else y = 132; - for (i = 0; i < 3; i++) + for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) { - u8 spriteId = CreateSprite(&gUnknown_086231D0, 152 + i * 32, y, 8); + u8 spriteId = CreateSprite(&sCityZoomTextSpriteTemplate, 152 + i * 32, y, 8); sprite = &gSprites[spriteId]; sprite->data[0] = 0; sprite->data[1] = i * 4; @@ -673,11 +680,12 @@ static void sub_81CCE58(void) sprite->data[3] = 150; sprite->data[4] = i * 4; sprite->oam.tileNum += i * 4; - state->cityFeatureTextSprites[i] = sprite; + state->cityZoomTextSprites[i] = sprite; } } -void sub_81CCEF4(struct Sprite *sprite) +// Slide and cycle through the text key showing what the features on the zoomed city map are +static void SpriteCB_CityZoomText(struct Sprite *sprite) { if (sprite->data[3]) { @@ -711,19 +719,19 @@ void sub_81CCEF4(struct Sprite *sprite) } } -static void sub_81CCF78(void) +static void UpdateCityZoomTextPosition(void) { int i; struct Pokenav5Struct_2 *state = GetSubstructPtr(4); int y = 132 - (GetBgY(1) >> 8); - for (i = 0; i < 3; i++) - state->cityFeatureTextSprites[i]->pos1.y = y; + for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) + state->cityZoomTextSprites[i]->pos1.y = y; } -static void sub_81CCFA4(int invisible) +static void SetCityZoomTextInvisibility(bool32 invisible) { int i; struct Pokenav5Struct_2 *state = GetSubstructPtr(4); - for (i = 0; i < 3; i++) - state->cityFeatureTextSprites[i]->invisible = invisible; + for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) + state->cityZoomTextSprites[i]->invisible = invisible; } diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index 63b4adb30..db3b7f08e 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -188,7 +188,7 @@ static u32 sub_81CFA88(struct PokenavSub9 *structPtr) static u32 sub_81CFB08(struct PokenavSub9 *structPtr) { - return POKENAV_MENU_5; + return POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS; } static u32 sub_81CFB10(struct PokenavSub9 *structPtr) @@ -446,7 +446,7 @@ static u32 sub_81CFEB8(s32 state) ShowBg(2); HideBg(3); PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST); - sub_81C7AC0(1); + PokenavFadeScreen(1); if (!unk->unkC) { LoadLeftHeaderGfxForIndex(2); @@ -601,7 +601,7 @@ static u32 sub_81D01DC(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); + PokenavFadeScreen(0); sub_81C78A0(); return LT_INC_AND_PAUSE; case 1: @@ -621,7 +621,7 @@ static u32 sub_81D021C(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); + PokenavFadeScreen(0); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index 2789b1244..f27b664ea 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -586,7 +586,7 @@ u32 sub_81D0A6C(s32 state) ShowBg(1); ShowBg(2); HideBg(3); - sub_81C7AC0(1); + PokenavFadeScreen(1); return LT_INC_AND_PAUSE; } return LT_PAUSE; @@ -604,7 +604,7 @@ u32 sub_81D0C54(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C7AC0(0); + PokenavFadeScreen(0); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/region_map.c b/src/region_map.c index 5694d4c7a..e183261b9 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -28,6 +28,17 @@ #include "constants/heal_locations.h" #include "constants/map_types.h" #include "constants/rgb.h" +#include "constants/weather.h" + +/* + * This file handles region maps generally, and the map used when selecting a fly destination. + * Specific features of other region map uses are handled elsewhere + * + * For the region map in the pokenav, see pokenav_region_map.c + * For the region map in the pokedex, see pokdex_area_screen.c/pokedex_area_region_map.c + * For the region map that can be viewed on the wall of pokemon centers, see field_region_map.c + * + */ #define MAP_WIDTH 28 #define MAP_HEIGHT 15 @@ -36,9 +47,11 @@ #define MAPCURSOR_X_MAX (MAPCURSOR_X_MIN + MAP_WIDTH - 1) #define MAPCURSOR_Y_MAX (MAPCURSOR_Y_MIN + MAP_HEIGHT - 1) +#define FLYDESTICON_RED_OUTLINE 6 + // Static type declarations -struct FlagControlledFlyDest +struct MultiNameFlyDest { const u8 *const *name; u16 mapSecId; @@ -48,18 +61,18 @@ struct FlagControlledFlyDest // Static RAM declarations static EWRAM_DATA struct RegionMap *gRegionMap = NULL; + static EWRAM_DATA struct { - /*0x000*/ void (*unk_000)(void); - /*0x004*/ u16 unk_004; - /*0x006*/ u16 mapSecId; - /*0x008*/ struct RegionMap regionMap; - /*0x88c*/ u8 unk_88c[0x1c0]; - /*0xa4c*/ u8 unk_a4c[0x26]; - /*0xa72*/ bool8 choseFlyLocation; -} *sFlyMap = NULL; // a74 + void (*callback)(void); + u16 state; + u16 mapSecId; + struct RegionMap regionMap; + u8 tileBuffer[0x1c0]; + u8 nameBuffer[0x26]; // never read + bool8 choseFlyLocation; +} *sFlyMap = NULL; static bool32 gUnknown_03001180; -static bool32 gUnknown_03001184; // Static ROM declarations @@ -68,44 +81,44 @@ static u8 MoveRegionMapCursor_Full(void); static u8 ProcessRegionMapInput_Zoomed(void); static u8 MoveRegionMapCursor_Zoomed(void); static void CalcZoomScrollParams(s16 scrollX, s16 scrollY, s16 c, s16 d, u16 e, u16 f, u8 rotation); -static u16 GetRegionMapSectionIdAt_Internal(u16 x, u16 y); +static u16 GetMapSecIdAt(u16 x, u16 y); static void RegionMap_SetBG2XAndBG2Y(s16 x, s16 y); -static void RegionMap_InitializeStateBasedOnPlayerLocation(void); +static void InitMapBasedOnPlayerLocation(void); static void RegionMap_InitializeStateBasedOnSSTidalLocation(void); -static u8 get_flagnr_blue_points(u16 mapSecId); +static u8 GetMapsecType(u16 mapSecId); static u16 CorrectSpecialMapSecId_Internal(u16 mapSecId); -static u16 RegionMap_GetTerraCaveMapSecId(void); -static void RegionMap_GetMarineCaveCoords(u16 *x, u16 *y); -static bool32 RegionMap_IsPlayerInCave(u8 mapSecId); -static void RegionMap_GetPositionOfCursorWithinMapSection(void); +static u16 GetTerraOrMarineCaveMapSecId(void); +static void GetMarineCaveCoords(u16 *x, u16 *y); +static bool32 IsPlayerInAquaHideout(u8 mapSecId); +static void GetPositionOfCursorWithinMapSec(void); static bool8 RegionMap_IsMapSecIdInNextRow(u16 y); -static void SpriteCallback_CursorFull(struct Sprite *sprite); +static void SpriteCB_CursorMapFull(struct Sprite *sprite); static void FreeRegionMapCursorSprite(void); static void HideRegionMapPlayerIcon(void); static void UnhideRegionMapPlayerIcon(void); -static void RegionMapPlayerIconSpriteCallback_Zoomed(struct Sprite *sprite); -static void RegionMapPlayerIconSpriteCallback_Full(struct Sprite *sprite); -static void RegionMapPlayerIconSpriteCallback(struct Sprite *sprite); -static void sub_81248C0(void); -static void sub_81248D4(void); -static void sub_81248F4(void callback(void)); -static void sub_8124904(void); -static void sub_8124A70(void); -static void sub_8124AD4(void); -static void sub_8124BE4(void); -static void sub_8124CBC(struct Sprite *sprite); -static void sub_8124D14(void); -static void sub_8124D64(void); -static void sub_8124E0C(void); +static void SpriteCB_PlayerIconMapZoomed(struct Sprite *sprite); +static void SpriteCB_PlayerIconMapFull(struct Sprite *sprite); +static void SpriteCB_PlayerIcon(struct Sprite *sprite); +static void VBlankCB_FlyMap(void); +static void CB2_FlyMap(void); +static void SetFlyMapCallback(void callback(void)); +static void DrawFlyDestTextWindow(void); +static void LoadFlyDestIcons(void); +static void CreateFlyDestIcons(void); +static void TryCreateRedOutlineFlyDestIcons(void); +static void SpriteCB_FlyDestIcon(struct Sprite *sprite); +static void CB_FadeInFlyMap(void); +static void CB_HandleFlyMapInput(void); +static void CB_ExitFlyMap(void); // .rodata static const u16 sRegionMapCursorPal[] = INCBIN_U16("graphics/pokenav/cursor.gbapal"); static const u32 sRegionMapCursorSmallGfxLZ[] = INCBIN_U32("graphics/pokenav/cursor_small.4bpp.lz"); static const u32 sRegionMapCursorLargeGfxLZ[] = INCBIN_U32("graphics/pokenav/cursor_large.4bpp.lz"); -static const u16 sRegionMapBkgnd_Pal[] = INCBIN_U16("graphics/pokenav/region_map.gbapal"); -static const u32 sRegionMapBkgnd_GfxLZ[] = INCBIN_U32("graphics/pokenav/region_map.8bpp.lz"); -static const u32 sRegionMapBkgnd_TilemapLZ[] = INCBIN_U32("graphics/pokenav/region_map_map.bin.lz"); +static const u16 sRegionMapBg_Pal[] = INCBIN_U16("graphics/pokenav/region_map.gbapal"); +static const u32 sRegionMapBg_GfxLZ[] = INCBIN_U32("graphics/pokenav/region_map.8bpp.lz"); +static const u32 sRegionMapBg_TilemapLZ[] = INCBIN_U32("graphics/pokenav/region_map_map.bin.lz"); static const u16 sRegionMapPlayerIcon_BrendanPal[] = INCBIN_U16("graphics/pokenav/brendan_icon.gbapal"); static const u8 sRegionMapPlayerIcon_BrendanGfx[] = INCBIN_U8("graphics/pokenav/brendan_icon.4bpp"); static const u16 sRegionMapPlayerIcon_MayPal[] = INCBIN_U16("graphics/pokenav/may_icon.gbapal"); @@ -137,52 +150,54 @@ static const u16 sRegionMap_SpecialPlaceLocations[][2] = {MAPSEC_MIRAGE_TOWER, MAPSEC_ROUTE_111}, {MAPSEC_TRAINER_HILL, MAPSEC_ROUTE_111}, {MAPSEC_DESERT_UNDERPASS, MAPSEC_ROUTE_114}, - {MAPSEC_ALTERING_CAVE_2, MAPSEC_ROUTE_103}, + {MAPSEC_ALTERING_CAVE, MAPSEC_ROUTE_103}, {MAPSEC_ARTISAN_CAVE, MAPSEC_ROUTE_103}, {MAPSEC_ABANDONED_SHIP, MAPSEC_ROUTE_108}, {MAPSEC_NONE, MAPSEC_NONE} }; -static const u16 sRegionMap_MarineCaveMapSecIds[] = +static const u16 sMarineCaveMapSecIds[] = { MAPSEC_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE }; -static const u16 sTerraCaveMapSectionIds[] = +static const u16 sTerraOrMarineCaveMapSecIds[ABNORMAL_WEATHER_LOCATIONS] = { - MAPSEC_ROUTE_114, - MAPSEC_ROUTE_114, - MAPSEC_ROUTE_115, - MAPSEC_ROUTE_115, - MAPSEC_ROUTE_116, - MAPSEC_ROUTE_116, - MAPSEC_ROUTE_118, - MAPSEC_ROUTE_118, - MAPSEC_ROUTE_105, - MAPSEC_ROUTE_105, - MAPSEC_ROUTE_125, - MAPSEC_ROUTE_125, - MAPSEC_ROUTE_127, - MAPSEC_ROUTE_127, - MAPSEC_ROUTE_129, - MAPSEC_ROUTE_129 + [ABNORMAL_WEATHER_ROUTE_114_NORTH - 1] = MAPSEC_ROUTE_114, + [ABNORMAL_WEATHER_ROUTE_114_SOUTH - 1] = MAPSEC_ROUTE_114, + [ABNORMAL_WEATHER_ROUTE_115_WEST - 1] = MAPSEC_ROUTE_115, + [ABNORMAL_WEATHER_ROUTE_115_EAST - 1] = MAPSEC_ROUTE_115, + [ABNORMAL_WEATHER_ROUTE_116_NORTH - 1] = MAPSEC_ROUTE_116, + [ABNORMAL_WEATHER_ROUTE_116_SOUTH - 1] = MAPSEC_ROUTE_116, + [ABNORMAL_WEATHER_ROUTE_118_EAST - 1] = MAPSEC_ROUTE_118, + [ABNORMAL_WEATHER_ROUTE_118_WEST - 1] = MAPSEC_ROUTE_118, + [ABNORMAL_WEATHER_ROUTE_105_NORTH - 1] = MAPSEC_ROUTE_105, + [ABNORMAL_WEATHER_ROUTE_105_SOUTH - 1] = MAPSEC_ROUTE_105, + [ABNORMAL_WEATHER_ROUTE_125_WEST - 1] = MAPSEC_ROUTE_125, + [ABNORMAL_WEATHER_ROUTE_125_EAST - 1] = MAPSEC_ROUTE_125, + [ABNORMAL_WEATHER_ROUTE_127_NORTH - 1] = MAPSEC_ROUTE_127, + [ABNORMAL_WEATHER_ROUTE_127_SOUTH - 1] = MAPSEC_ROUTE_127, + [ABNORMAL_WEATHER_ROUTE_129_WEST - 1] = MAPSEC_ROUTE_129, + [ABNORMAL_WEATHER_ROUTE_129_EAST - 1] = MAPSEC_ROUTE_129 }; -static const struct UCoords16 sTerraCaveLocationCoords[] = +#define MARINE_CAVE_COORD(location)(ABNORMAL_WEATHER_##location - MARINE_CAVE_LOCATIONS_START) + +static const struct UCoords16 sMarineCaveLocationCoords[MARINE_CAVE_LOCATIONS] = { - {0x00, 0x0a}, - {0x00, 0x0c}, - {0x18, 0x03}, - {0x19, 0x04}, - {0x19, 0x06}, - {0x19, 0x07}, - {0x18, 0x0a}, - {0x18, 0x0a} + [MARINE_CAVE_COORD(ROUTE_105_NORTH)] = {0, 10}, + [MARINE_CAVE_COORD(ROUTE_105_SOUTH)] = {0, 12}, + [MARINE_CAVE_COORD(ROUTE_125_WEST)] = {24, 3}, + [MARINE_CAVE_COORD(ROUTE_125_EAST)] = {25, 4}, + [MARINE_CAVE_COORD(ROUTE_127_NORTH)] = {25, 6}, + [MARINE_CAVE_COORD(ROUTE_127_SOUTH)] = {25, 7}, + [MARINE_CAVE_COORD(ROUTE_129_WEST)] = {24, 10}, + [MARINE_CAVE_COORD(ROUTE_129_EAST)] = {24, 10} }; -static const u8 sRegionMap_MapSecAquaHideoutOld[] = +static const u8 sMapSecAquaHideoutOld[] = { MAPSEC_AQUA_HIDEOUT_OLD }; @@ -230,7 +245,7 @@ static const struct SpriteTemplate sRegionMapCursorSpriteTemplate = .anims = sRegionMapCursorAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallback_CursorFull + .callback = SpriteCB_CursorMapFull }; static const struct OamData sRegionMapPlayerIconOam = @@ -251,11 +266,12 @@ static const union AnimCmd *const sRegionMapPlayerIconAnimTable[] = sRegionMapPlayerIconAnim1 }; -static const u8 sRegionMapEventSectionIds[] = +// Event islands that don't appear on map. (Southern Island does) +static const u8 sMapSecIdsOffMap[] = { - MAPSEC_BIRTH_ISLAND_2, + MAPSEC_BIRTH_ISLAND, MAPSEC_FARAWAY_ISLAND, - MAPSEC_NAVEL_ROCK2 + MAPSEC_NAVEL_ROCK }; static const u16 sRegionMapFramePal[] = INCBIN_U16("graphics/pokenav/map_frame.gbapal"); @@ -264,9 +280,9 @@ static const u32 sRegionMapFrameGfxLZ[] = INCBIN_U32("graphics/pokenav/map_frame static const u32 sRegionMapFrameTilemapLZ[] = INCBIN_U32("graphics/pokenav/map_frame.bin.lz"); -static const u16 Unknown_085A1D48[] = INCBIN_U16("graphics/pokenav/fly_target_icons.gbapal"); +static const u16 sFlyTargetIcons_Pal[] = INCBIN_U16("graphics/pokenav/fly_target_icons.gbapal"); -static const u32 sUnknown_085A1D68[] = INCBIN_U32("graphics/pokenav/fly_target_icons.4bpp.lz"); +static const u32 sFlyTargetIcons_Gfx[] = INCBIN_U32("graphics/pokenav/fly_target_icons.4bpp.lz"); static const u8 sMapHealLocations[][3] = { @@ -285,7 +301,7 @@ static const u8 sMapHealLocations[][3] = {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY}, {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY}, {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY}, - {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY_1}, + {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY}, {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0}, {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0}, {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0}, @@ -322,22 +338,22 @@ static const u8 sMapHealLocations[][3] = {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0} }; -static const u8 *const gUnknown_085A1ED4[] = +static const u8 *const sEverGrandeCityNames[] = { gText_PokemonLeague, gText_PokemonCenter }; -static const struct FlagControlledFlyDest gUnknown_085A1EDC[] = +static const struct MultiNameFlyDest sMultiNameFlyDestinations[] = { { - .name = gUnknown_085A1ED4, + .name = sEverGrandeCityNames, .mapSecId = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_LANDMARK_POKEMON_LEAGUE } }; -static const struct BgTemplate gUnknown_085A1EE4[] = +static const struct BgTemplate sFlyMapBgTemplates[] = { { .bg = 0, @@ -365,7 +381,7 @@ static const struct BgTemplate gUnknown_085A1EE4[] = } }; -static const struct WindowTemplate gUnknown_085A1EF0[] = +static const struct WindowTemplate sFlyMapWindowTemplates[] = { { .bg = 0, @@ -397,13 +413,13 @@ static const struct WindowTemplate gUnknown_085A1EF0[] = DUMMY_WIN_TEMPLATE }; -static const struct SpritePalette gUnknown_085A1F10 = +static const struct SpritePalette sFlyTargetIconsSpritePalette = { - .data = Unknown_085A1D48, + .data = sFlyTargetIcons_Pal, .tag = 2 }; -static const u16 sUnknown_085A1F18[][2] = +static const u16 sRedOutlineFlyDestinations[][2] = { { FLAG_LANDMARK_BATTLE_FRONTIER, @@ -415,72 +431,73 @@ static const u16 sUnknown_085A1F18[][2] = } }; -static const struct OamData gOamData_085A1F20 = +static const struct OamData sFlyDestIcon_OamData = { .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .priority = 2 }; -static const union AnimCmd gUnknown_085A1F28[] = +static const union AnimCmd sFlyDestIcon_Anim_8x8CanFly[] = { ANIMCMD_FRAME( 0, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F30[] = +static const union AnimCmd sFlyDestIcon_Anim_16x8CanFly[] = { ANIMCMD_FRAME( 1, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F38[] = +static const union AnimCmd sFlyDestIcon_Anim_8x16CanFly[] = { ANIMCMD_FRAME( 3, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F40[] = +static const union AnimCmd sFlyDestIcon_Anim_8x8CantFly[] = { ANIMCMD_FRAME( 5, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F48[] = +static const union AnimCmd sFlyDestIcon_Anim_16x8CantFly[] = { ANIMCMD_FRAME( 6, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F50[] = +static const union AnimCmd sFlyDestIcon_Anim_8x16CantFly[] = { ANIMCMD_FRAME( 8, 5), ANIMCMD_END }; -static const union AnimCmd gUnknown_085A1F58[] = +// Only used by Battle Frontier +static const union AnimCmd sFlyDestIcon_Anim_RedOutline[] = { ANIMCMD_FRAME(10, 5), ANIMCMD_END }; -static const union AnimCmd *const gUnknown_085A1F60[] = +static const union AnimCmd *const sFlyDestIcon_Anims[] = { - gUnknown_085A1F28, - gUnknown_085A1F30, - gUnknown_085A1F38, - gUnknown_085A1F40, - gUnknown_085A1F48, - gUnknown_085A1F50, - gUnknown_085A1F58 + [SPRITE_SHAPE(8x8)] = sFlyDestIcon_Anim_8x8CanFly, + [SPRITE_SHAPE(16x8)] = sFlyDestIcon_Anim_16x8CanFly, + [SPRITE_SHAPE(8x16)] = sFlyDestIcon_Anim_8x16CanFly, + [SPRITE_SHAPE(8x8) + 3] = sFlyDestIcon_Anim_8x8CantFly, + [SPRITE_SHAPE(16x8) + 3] = sFlyDestIcon_Anim_16x8CantFly, + [SPRITE_SHAPE(8x16) + 3] = sFlyDestIcon_Anim_8x16CantFly, + [FLYDESTICON_RED_OUTLINE] = sFlyDestIcon_Anim_RedOutline }; -static const struct SpriteTemplate gUnknown_085A1F7C = +static const struct SpriteTemplate sFlyDestIconSpriteTemplate = { .tileTag = 2, .paletteTag = 2, - .oam = &gOamData_085A1F20, - .anims = gUnknown_085A1F60, + .oam = &sFlyDestIcon_OamData, + .anims = sFlyDestIcon_Anims, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy @@ -490,11 +507,11 @@ static const struct SpriteTemplate gUnknown_085A1F7C = void InitRegionMap(struct RegionMap *regionMap, bool8 zoomed) { - sub_8122CF8(regionMap, NULL, zoomed); - while (sub_8122DB0()); + InitRegionMapData(regionMap, NULL, zoomed); + while (LoadRegionMapGfx()); } -void sub_8122CF8(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed) +void InitRegionMapData(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed) { gRegionMap = regionMap; gRegionMap->initStep = 0; @@ -516,46 +533,38 @@ void sub_8122CF8(struct RegionMap *regionMap, const struct BgTemplate *template, } } -void sub_8122D88(struct RegionMap *regionMap) +void ShowRegionMapForPokedexAreaScreen(struct RegionMap *regionMap) { gRegionMap = regionMap; - RegionMap_InitializeStateBasedOnPlayerLocation(); + InitMapBasedOnPlayerLocation(); gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX; gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY; } -bool8 sub_8122DB0(void) +bool8 LoadRegionMapGfx(void) { switch (gRegionMap->initStep) { case 0: if (gRegionMap->bgManaged) - { - decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0); - } + decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBg_GfxLZ, 0, 0, 0); else - { - LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2)); - } + LZ77UnCompVram(sRegionMapBg_GfxLZ, (u16 *)BG_CHAR_ADDR(2)); break; case 1: if (gRegionMap->bgManaged) { if (!free_temp_tile_data_buffers_if_possible()) - { - decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1); - } + decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBg_TilemapLZ, 0, 0, 1); } else { - LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28)); + LZ77UnCompVram(sRegionMapBg_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28)); } break; case 2: if (!free_temp_tile_data_buffers_if_possible()) - { - LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60); - } + LoadPalette(sRegionMapBg_Pal, 0x70, 0x60); break; case 3: LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage); @@ -564,12 +573,12 @@ bool8 sub_8122DB0(void) LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage); break; case 5: - RegionMap_InitializeStateBasedOnPlayerLocation(); + InitMapBasedOnPlayerLocation(); gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX; gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY; gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId); - gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId); - GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16); + gRegionMap->mapSecType = GetMapsecType(gRegionMap->mapSecId); + GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, MAP_NAME_LENGTH); break; case 6: if (gRegionMap->zoomed == FALSE) @@ -586,7 +595,7 @@ bool8 sub_8122DB0(void) } break; case 7: - RegionMap_GetPositionOfCursorWithinMapSection(); + GetPositionOfCursorWithinMapSec(); UpdateRegionMapVideoRegs(); gRegionMap->cursorSprite = NULL; gRegionMap->playerIconSprite = NULL; @@ -609,9 +618,9 @@ bool8 sub_8122DB0(void) return TRUE; } -void sub_8123030(u16 a0, u32 a1) +void sub_8123030(u16 color, u32 coeff) { - BlendPalettes(0x380, a1, a0); + BlendPalettes(0x380, coeff, color); CpuCopy16(gPlttBufferFaded + 0x70, gPlttBufferUnfaded + 0x70, 0x60); } @@ -631,7 +640,7 @@ void FreeRegionMapIconResources(void) } } -u8 sub_81230AC(void) +u8 DoRegionMapInputCallback(void) { return gRegionMap->inputCallback(); } @@ -640,38 +649,38 @@ static u8 ProcessRegionMapInput_Full(void) { u8 input; - input = INPUT_EVENT_NONE; + input = MAP_INPUT_NONE; gRegionMap->cursorDeltaX = 0; gRegionMap->cursorDeltaY = 0; if (gMain.heldKeys & DPAD_UP && gRegionMap->cursorPosY > MAPCURSOR_Y_MIN) { gRegionMap->cursorDeltaY = -1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_DOWN && gRegionMap->cursorPosY < MAPCURSOR_Y_MAX) { gRegionMap->cursorDeltaY = +1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_LEFT && gRegionMap->cursorPosX > MAPCURSOR_X_MIN) { gRegionMap->cursorDeltaX = -1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_RIGHT && gRegionMap->cursorPosX < MAPCURSOR_X_MAX) { gRegionMap->cursorDeltaX = +1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.newKeys & A_BUTTON) { - input = INPUT_EVENT_A_BUTTON; + input = MAP_INPUT_A_BUTTON; } else if (gMain.newKeys & B_BUTTON) { - input = INPUT_EVENT_B_BUTTON; + input = MAP_INPUT_B_BUTTON; } - if (input == INPUT_EVENT_MOVE_START) + if (input == MAP_INPUT_MOVE_START) { gRegionMap->cursorMovementFrameCounter = 4; gRegionMap->inputCallback = MoveRegionMapCursor_Full; @@ -684,9 +693,8 @@ static u8 MoveRegionMapCursor_Full(void) u16 mapSecId; if (gRegionMap->cursorMovementFrameCounter != 0) - { - return INPUT_EVENT_MOVE_CONT; - } + return MAP_INPUT_MOVE_CONT; + if (gRegionMap->cursorDeltaX > 0) { gRegionMap->cursorPosX++; @@ -703,54 +711,55 @@ static u8 MoveRegionMapCursor_Full(void) { gRegionMap->cursorPosY--; } - mapSecId = GetRegionMapSectionIdAt_Internal(gRegionMap->cursorPosX, gRegionMap->cursorPosY); - gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId); + + mapSecId = GetMapSecIdAt(gRegionMap->cursorPosX, gRegionMap->cursorPosY); + gRegionMap->mapSecType = GetMapsecType(mapSecId); if (mapSecId != gRegionMap->mapSecId) { gRegionMap->mapSecId = mapSecId; - GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16); + GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, MAP_NAME_LENGTH); } - RegionMap_GetPositionOfCursorWithinMapSection(); + GetPositionOfCursorWithinMapSec(); gRegionMap->inputCallback = ProcessRegionMapInput_Full; - return INPUT_EVENT_MOVE_END; + return MAP_INPUT_MOVE_END; } static u8 ProcessRegionMapInput_Zoomed(void) { u8 input; - input = INPUT_EVENT_NONE; + input = MAP_INPUT_NONE; gRegionMap->zoomedCursorDeltaX = 0; gRegionMap->zoomedCursorDeltaY = 0; if (gMain.heldKeys & DPAD_UP && gRegionMap->scrollY > -0x34) { gRegionMap->zoomedCursorDeltaY = -1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_DOWN && gRegionMap->scrollY < 0x3c) { gRegionMap->zoomedCursorDeltaY = +1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_LEFT && gRegionMap->scrollX > -0x2c) { gRegionMap->zoomedCursorDeltaX = -1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.heldKeys & DPAD_RIGHT && gRegionMap->scrollX < 0xac) { gRegionMap->zoomedCursorDeltaX = +1; - input = INPUT_EVENT_MOVE_START; + input = MAP_INPUT_MOVE_START; } if (gMain.newKeys & A_BUTTON) { - input = INPUT_EVENT_A_BUTTON; + input = MAP_INPUT_A_BUTTON; } if (gMain.newKeys & B_BUTTON) { - input = INPUT_EVENT_B_BUTTON; + input = MAP_INPUT_B_BUTTON; } - if (input == INPUT_EVENT_MOVE_START) + if (input == MAP_INPUT_MOVE_START) { gRegionMap->inputCallback = MoveRegionMapCursor_Zoomed; gRegionMap->zoomedCursorMovementFrameCounter = 0; @@ -776,23 +785,23 @@ static u8 MoveRegionMapCursor_Zoomed(void) { gRegionMap->zoomedCursorPosX = x; gRegionMap->zoomedCursorPosY = y; - mapSecId = GetRegionMapSectionIdAt_Internal(x, y); - gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId); + mapSecId = GetMapSecIdAt(x, y); + gRegionMap->mapSecType = GetMapsecType(mapSecId); if (mapSecId != gRegionMap->mapSecId) { gRegionMap->mapSecId = mapSecId; - GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16); + GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, MAP_NAME_LENGTH); } - RegionMap_GetPositionOfCursorWithinMapSection(); + GetPositionOfCursorWithinMapSec(); } gRegionMap->zoomedCursorMovementFrameCounter = 0; gRegionMap->inputCallback = ProcessRegionMapInput_Zoomed; - return INPUT_EVENT_MOVE_END; + return MAP_INPUT_MOVE_END; } - return INPUT_EVENT_MOVE_CONT; + return MAP_INPUT_MOVE_CONT; } -void sub_8123418(void) +void SetRegionMapDataForZoom(void) { if (gRegionMap->zoomed == FALSE) { @@ -827,13 +836,13 @@ void sub_8123418(void) HideRegionMapPlayerIcon(); } -bool8 sub_8123514(void) +bool8 UpdateRegionMapZoom(void) { bool8 retVal; if (gRegionMap->unk_06e >= 16) { - return 0; + return FALSE; } gRegionMap->unk_06e++; if (gRegionMap->unk_06e == 16) @@ -945,7 +954,7 @@ void PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(s16 x, s16 y) } } -static u16 GetRegionMapSectionIdAt_Internal(u16 x, u16 y) +static u16 GetMapSecIdAt(u16 x, u16 y) { if (y < MAPCURSOR_Y_MIN || y > MAPCURSOR_Y_MAX || x < MAPCURSOR_X_MIN || x > MAPCURSOR_X_MAX) { @@ -956,7 +965,7 @@ static u16 GetRegionMapSectionIdAt_Internal(u16 x, u16 y) return sRegionMap_MapSectionLayout[x + y * MAP_WIDTH]; } -static void RegionMap_InitializeStateBasedOnPlayerLocation(void) +static void InitMapBasedOnPlayerLocation(void) { const struct MapHeader *mapHeader; u16 mapWidth; @@ -978,80 +987,76 @@ static void RegionMap_InitializeStateBasedOnPlayerLocation(void) switch (GetMapTypeByGroupAndId(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum)) { - default: - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_UNDERWATER: - case MAP_TYPE_OCEAN_ROUTE: - gRegionMap->mapSecId = gMapHeader.regionMapSectionId; - gRegionMap->playerIsInCave = FALSE; - mapWidth = gMapHeader.mapLayout->width; - mapHeight = gMapHeader.mapLayout->height; - x = gSaveBlock1Ptr->pos.x; - y = gSaveBlock1Ptr->pos.y; - if (gRegionMap->mapSecId == MAPSEC_UNDERWATER_128 || gRegionMap->mapSecId == MAPSEC_UNDERWATER_MARINE_CAVE) - { - gRegionMap->playerIsInCave = TRUE; - } - break; - case MAP_TYPE_UNDERGROUND: - case MAP_TYPE_UNUSED_2: - if (gMapHeader.flags & MAP_ALLOW_ESCAPE_ROPE) - { - mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->escapeWarp.mapGroup, gSaveBlock1Ptr->escapeWarp.mapNum); - gRegionMap->mapSecId = mapHeader->regionMapSectionId; - gRegionMap->playerIsInCave = TRUE; - mapWidth = mapHeader->mapLayout->width; - mapHeight = mapHeader->mapLayout->height; - x = gSaveBlock1Ptr->escapeWarp.x; - y = gSaveBlock1Ptr->escapeWarp.y; - } - else - { - gRegionMap->mapSecId = gMapHeader.regionMapSectionId; - gRegionMap->playerIsInCave = TRUE; - mapWidth = 1; - mapHeight = 1; - x = 1; - y = 1; - } - break; - case MAP_TYPE_SECRET_BASE: - mapHeader = Overworld_GetMapHeaderByGroupAndId((u16)gSaveBlock1Ptr->dynamicWarp.mapGroup, (u16)gSaveBlock1Ptr->dynamicWarp.mapNum); + default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_UNDERWATER: + case MAP_TYPE_OCEAN_ROUTE: + gRegionMap->mapSecId = gMapHeader.regionMapSectionId; + gRegionMap->playerIsInCave = FALSE; + mapWidth = gMapHeader.mapLayout->width; + mapHeight = gMapHeader.mapLayout->height; + x = gSaveBlock1Ptr->pos.x; + y = gSaveBlock1Ptr->pos.y; + if (gRegionMap->mapSecId == MAPSEC_UNDERWATER_128 || gRegionMap->mapSecId == MAPSEC_UNDERWATER_MARINE_CAVE) + gRegionMap->playerIsInCave = TRUE; + break; + case MAP_TYPE_UNDERGROUND: + case MAP_TYPE_UNUSED_2: + if (gMapHeader.flags & MAP_ALLOW_ESCAPE_ROPE) + { + mapHeader = Overworld_GetMapHeaderByGroupAndId(gSaveBlock1Ptr->escapeWarp.mapGroup, gSaveBlock1Ptr->escapeWarp.mapNum); gRegionMap->mapSecId = mapHeader->regionMapSectionId; gRegionMap->playerIsInCave = TRUE; mapWidth = mapHeader->mapLayout->width; mapHeight = mapHeader->mapLayout->height; - x = gSaveBlock1Ptr->dynamicWarp.x; - y = gSaveBlock1Ptr->dynamicWarp.y; - break; - case MAP_TYPE_INDOOR: + x = gSaveBlock1Ptr->escapeWarp.x; + y = gSaveBlock1Ptr->escapeWarp.y; + } + else + { gRegionMap->mapSecId = gMapHeader.regionMapSectionId; - if (gRegionMap->mapSecId != MAPSEC_DYNAMIC) - { - warp = &gSaveBlock1Ptr->escapeWarp; - mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum); - } - else - { - warp = &gSaveBlock1Ptr->dynamicWarp; - mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum); - gRegionMap->mapSecId = mapHeader->regionMapSectionId; - } - if (RegionMap_IsPlayerInCave(gRegionMap->mapSecId)) - { - gRegionMap->playerIsInCave = TRUE; - } - else - { - gRegionMap->playerIsInCave = FALSE; - } - mapWidth = mapHeader->mapLayout->width; - mapHeight = mapHeader->mapLayout->height; - x = warp->x; - y = warp->y; - break; + gRegionMap->playerIsInCave = TRUE; + mapWidth = 1; + mapHeight = 1; + x = 1; + y = 1; + } + break; + case MAP_TYPE_SECRET_BASE: + mapHeader = Overworld_GetMapHeaderByGroupAndId((u16)gSaveBlock1Ptr->dynamicWarp.mapGroup, (u16)gSaveBlock1Ptr->dynamicWarp.mapNum); + gRegionMap->mapSecId = mapHeader->regionMapSectionId; + gRegionMap->playerIsInCave = TRUE; + mapWidth = mapHeader->mapLayout->width; + mapHeight = mapHeader->mapLayout->height; + x = gSaveBlock1Ptr->dynamicWarp.x; + y = gSaveBlock1Ptr->dynamicWarp.y; + break; + case MAP_TYPE_INDOOR: + gRegionMap->mapSecId = gMapHeader.regionMapSectionId; + if (gRegionMap->mapSecId != MAPSEC_DYNAMIC) + { + warp = &gSaveBlock1Ptr->escapeWarp; + mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum); + } + else + { + warp = &gSaveBlock1Ptr->dynamicWarp; + mapHeader = Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum); + gRegionMap->mapSecId = mapHeader->regionMapSectionId; + } + + if (IsPlayerInAquaHideout(gRegionMap->mapSecId)) + gRegionMap->playerIsInCave = TRUE; + else + gRegionMap->playerIsInCave = FALSE; + + mapWidth = mapHeader->mapLayout->width; + mapHeight = mapHeader->mapLayout->height; + x = warp->x; + y = warp->y; + break; } xOnMap = x; @@ -1080,51 +1085,36 @@ static void RegionMap_InitializeStateBasedOnPlayerLocation(void) switch (gRegionMap->mapSecId) { - case MAPSEC_ROUTE_114: - if (y != 0) - { - x = 0; - } - break; - case MAPSEC_ROUTE_126: - case MAPSEC_UNDERWATER_125: + case MAPSEC_ROUTE_114: + if (y != 0) x = 0; - if (gSaveBlock1Ptr->pos.x > 32) - { - x = 1; - } - if (gSaveBlock1Ptr->pos.x > 0x33) - { - x++; - } - y = 0; - if (gSaveBlock1Ptr->pos.y > 0x25) - { - y = 1; - } - if (gSaveBlock1Ptr->pos.y > 0x38) - { - y++; - } - break; - case MAPSEC_ROUTE_121: - x = 0; - if (xOnMap > 14) - { - x = 1; - } - if (xOnMap > 0x1C) - { - x++; - } - if (xOnMap > 0x36) - { - x++; - } - break; - case MAPSEC_UNDERWATER_MARINE_CAVE: - RegionMap_GetMarineCaveCoords(&gRegionMap->cursorPosX, &gRegionMap->cursorPosY); - return; + break; + case MAPSEC_ROUTE_126: + case MAPSEC_UNDERWATER_125: + x = 0; + if (gSaveBlock1Ptr->pos.x > 32) + x++; + if (gSaveBlock1Ptr->pos.x > 51) + x++; + + y = 0; + if (gSaveBlock1Ptr->pos.y > 37) + y++; + if (gSaveBlock1Ptr->pos.y > 56) + y++; + break; + case MAPSEC_ROUTE_121: + x = 0; + if (xOnMap > 14) + x++; + if (xOnMap > 28) + x++; + if (xOnMap > 54) + x++; + break; + case MAPSEC_UNDERWATER_MARINE_CAVE: + GetMarineCaveCoords(&gRegionMap->cursorPosX, &gRegionMap->cursorPosY); + return; } gRegionMap->cursorPosX = gRegionMapEntries[gRegionMap->mapSecId].x + x + MAPCURSOR_X_MIN; gRegionMap->cursorPosY = gRegionMapEntries[gRegionMap->mapSecId].y + y + MAPCURSOR_Y_MIN; @@ -1145,104 +1135,104 @@ static void RegionMap_InitializeStateBasedOnSSTidalLocation(void) x = 0; switch (GetSSTidalLocation(&mapGroup, &mapNum, &xOnMap, &yOnMap)) { - case SS_TIDAL_LOCATION_SLATEPORT: - gRegionMap->mapSecId = MAPSEC_SLATEPORT_CITY; - break; - case SS_TIDAL_LOCATION_LILYCOVE: - gRegionMap->mapSecId = MAPSEC_LILYCOVE_CITY; - break; - case SS_TIDAL_LOCATION_ROUTE124: - gRegionMap->mapSecId = MAPSEC_ROUTE_124; - break; - case SS_TIDAL_LOCATION_ROUTE131: - gRegionMap->mapSecId = MAPSEC_ROUTE_131; - break; - default: - case SS_TIDAL_LOCATION_CURRENTS: - mapHeader = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum); + case SS_TIDAL_LOCATION_SLATEPORT: + gRegionMap->mapSecId = MAPSEC_SLATEPORT_CITY; + break; + case SS_TIDAL_LOCATION_LILYCOVE: + gRegionMap->mapSecId = MAPSEC_LILYCOVE_CITY; + break; + case SS_TIDAL_LOCATION_ROUTE124: + gRegionMap->mapSecId = MAPSEC_ROUTE_124; + break; + case SS_TIDAL_LOCATION_ROUTE131: + gRegionMap->mapSecId = MAPSEC_ROUTE_131; + break; + default: + case SS_TIDAL_LOCATION_CURRENTS: + mapHeader = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum); - gRegionMap->mapSecId = mapHeader->regionMapSectionId; - dimensionScale = mapHeader->mapLayout->width / gRegionMapEntries[gRegionMap->mapSecId].width; - if (dimensionScale == 0) - dimensionScale = 1; - x = xOnMap / dimensionScale; - if (x >= gRegionMapEntries[gRegionMap->mapSecId].width) - x = gRegionMapEntries[gRegionMap->mapSecId].width - 1; + gRegionMap->mapSecId = mapHeader->regionMapSectionId; + dimensionScale = mapHeader->mapLayout->width / gRegionMapEntries[gRegionMap->mapSecId].width; + if (dimensionScale == 0) + dimensionScale = 1; + x = xOnMap / dimensionScale; + if (x >= gRegionMapEntries[gRegionMap->mapSecId].width) + x = gRegionMapEntries[gRegionMap->mapSecId].width - 1; - dimensionScale = mapHeader->mapLayout->height / gRegionMapEntries[gRegionMap->mapSecId].height; - if (dimensionScale == 0) - dimensionScale = 1; - y = yOnMap / dimensionScale; - if (y >= gRegionMapEntries[gRegionMap->mapSecId].height) - y = gRegionMapEntries[gRegionMap->mapSecId].height - 1; - break; + dimensionScale = mapHeader->mapLayout->height / gRegionMapEntries[gRegionMap->mapSecId].height; + if (dimensionScale == 0) + dimensionScale = 1; + y = yOnMap / dimensionScale; + if (y >= gRegionMapEntries[gRegionMap->mapSecId].height) + y = gRegionMapEntries[gRegionMap->mapSecId].height - 1; + break; } gRegionMap->playerIsInCave = FALSE; gRegionMap->cursorPosX = gRegionMapEntries[gRegionMap->mapSecId].x + x + MAPCURSOR_X_MIN; gRegionMap->cursorPosY = gRegionMapEntries[gRegionMap->mapSecId].y + y + MAPCURSOR_Y_MIN; } -static u8 get_flagnr_blue_points(u16 mapSecId) +static u8 GetMapsecType(u16 mapSecId) { switch (mapSecId) { - case MAPSEC_NONE: - return MAPSECTYPE_NONE; - case MAPSEC_LITTLEROOT_TOWN: - return FlagGet(FLAG_VISITED_LITTLEROOT_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_OLDALE_TOWN: - return FlagGet(FLAG_VISITED_OLDALE_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_DEWFORD_TOWN: - return FlagGet(FLAG_VISITED_DEWFORD_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_LAVARIDGE_TOWN: - return FlagGet(FLAG_VISITED_LAVARIDGE_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_FALLARBOR_TOWN: - return FlagGet(FLAG_VISITED_FALLARBOR_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_VERDANTURF_TOWN: - return FlagGet(FLAG_VISITED_VERDANTURF_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_PACIFIDLOG_TOWN: - return FlagGet(FLAG_VISITED_PACIFIDLOG_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_PETALBURG_CITY: - return FlagGet(FLAG_VISITED_PETALBURG_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_SLATEPORT_CITY: - return FlagGet(FLAG_VISITED_SLATEPORT_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_MAUVILLE_CITY: - return FlagGet(FLAG_VISITED_MAUVILLE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_RUSTBORO_CITY: - return FlagGet(FLAG_VISITED_RUSTBORO_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_FORTREE_CITY: - return FlagGet(FLAG_VISITED_FORTREE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_LILYCOVE_CITY: - return FlagGet(FLAG_VISITED_LILYCOVE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_MOSSDEEP_CITY: - return FlagGet(FLAG_VISITED_MOSSDEEP_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_SOOTOPOLIS_CITY: - return FlagGet(FLAG_VISITED_SOOTOPOLIS_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_EVER_GRANDE_CITY: - return FlagGet(FLAG_VISITED_EVER_GRANDE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; - case MAPSEC_BATTLE_FRONTIER: - return FlagGet(FLAG_LANDMARK_BATTLE_FRONTIER) ? MAPSECTYPE_BATTLE_FRONTIER : MAPSECTYPE_NONE; - case MAPSEC_SOUTHERN_ISLAND: - return FlagGet(FLAG_LANDMARK_SOUTHERN_ISLAND) ? MAPSECTYPE_PLAIN : MAPSECTYPE_NONE; - default: - return MAPSECTYPE_PLAIN; + case MAPSEC_NONE: + return MAPSECTYPE_NONE; + case MAPSEC_LITTLEROOT_TOWN: + return FlagGet(FLAG_VISITED_LITTLEROOT_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_OLDALE_TOWN: + return FlagGet(FLAG_VISITED_OLDALE_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_DEWFORD_TOWN: + return FlagGet(FLAG_VISITED_DEWFORD_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_LAVARIDGE_TOWN: + return FlagGet(FLAG_VISITED_LAVARIDGE_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_FALLARBOR_TOWN: + return FlagGet(FLAG_VISITED_FALLARBOR_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_VERDANTURF_TOWN: + return FlagGet(FLAG_VISITED_VERDANTURF_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_PACIFIDLOG_TOWN: + return FlagGet(FLAG_VISITED_PACIFIDLOG_TOWN) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_PETALBURG_CITY: + return FlagGet(FLAG_VISITED_PETALBURG_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_SLATEPORT_CITY: + return FlagGet(FLAG_VISITED_SLATEPORT_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_MAUVILLE_CITY: + return FlagGet(FLAG_VISITED_MAUVILLE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_RUSTBORO_CITY: + return FlagGet(FLAG_VISITED_RUSTBORO_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_FORTREE_CITY: + return FlagGet(FLAG_VISITED_FORTREE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_LILYCOVE_CITY: + return FlagGet(FLAG_VISITED_LILYCOVE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_MOSSDEEP_CITY: + return FlagGet(FLAG_VISITED_MOSSDEEP_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_SOOTOPOLIS_CITY: + return FlagGet(FLAG_VISITED_SOOTOPOLIS_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_EVER_GRANDE_CITY: + return FlagGet(FLAG_VISITED_EVER_GRANDE_CITY) ? MAPSECTYPE_CITY_CANFLY : MAPSECTYPE_CITY_CANTFLY; + case MAPSEC_BATTLE_FRONTIER: + return FlagGet(FLAG_LANDMARK_BATTLE_FRONTIER) ? MAPSECTYPE_BATTLE_FRONTIER : MAPSECTYPE_NONE; + case MAPSEC_SOUTHERN_ISLAND: + return FlagGet(FLAG_LANDMARK_SOUTHERN_ISLAND) ? MAPSECTYPE_ROUTE : MAPSECTYPE_NONE; + default: + return MAPSECTYPE_ROUTE; } } -u16 GetRegionMapSectionIdAt(u16 x, u16 y) +u16 GetRegionMapSecIdAt(u16 x, u16 y) { - return GetRegionMapSectionIdAt_Internal(x, y); + return GetMapSecIdAt(x, y); } static u16 CorrectSpecialMapSecId_Internal(u16 mapSecId) { u32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < ARRAY_COUNT(sMarineCaveMapSecIds); i++) { - if (sRegionMap_MarineCaveMapSecIds[i] == mapSecId) + if (sMarineCaveMapSecIds[i] == mapSecId) { - return RegionMap_GetTerraCaveMapSecId(); + return GetTerraOrMarineCaveMapSecId(); } } for (i = 0; sRegionMap_SpecialPlaceLocations[i][0] != MAPSEC_NONE; i++) @@ -1255,42 +1245,43 @@ static u16 CorrectSpecialMapSecId_Internal(u16 mapSecId) return mapSecId; } -static u16 RegionMap_GetTerraCaveMapSecId(void) +static u16 GetTerraOrMarineCaveMapSecId(void) { s16 idx; idx = VarGet(VAR_ABNORMAL_WEATHER_LOCATION) - 1; - if (idx < 0 || idx > 15) - { + + if (idx < 0 || idx > ABNORMAL_WEATHER_LOCATIONS - 1) idx = 0; - } - return sTerraCaveMapSectionIds[idx]; + + return sTerraOrMarineCaveMapSecIds[idx]; } -static void RegionMap_GetMarineCaveCoords(u16 *x, u16 *y) +static void GetMarineCaveCoords(u16 *x, u16 *y) { u16 idx; idx = VarGet(VAR_ABNORMAL_WEATHER_LOCATION); - if (idx < 9 || idx > 16) + if (idx < MARINE_CAVE_LOCATIONS_START || idx > ABNORMAL_WEATHER_LOCATIONS) { - idx = 9; + idx = MARINE_CAVE_LOCATIONS_START; } - idx -= 9; - *x = sTerraCaveLocationCoords[idx].x + MAPCURSOR_X_MIN; - *y = sTerraCaveLocationCoords[idx].y + MAPCURSOR_Y_MIN; + idx -= MARINE_CAVE_LOCATIONS_START; + + *x = sMarineCaveLocationCoords[idx].x + MAPCURSOR_X_MIN; + *y = sMarineCaveLocationCoords[idx].y + MAPCURSOR_Y_MIN; } -static bool32 RegionMap_IsPlayerInCave(u8 mapSecId) +// Probably meant to be an "IsPlayerInIndoorDungeon" function, but in practice it only has the one mapsec +// Additionally, because the mapsec doesnt exist in Emerald, this function always returns FALSE +static bool32 IsPlayerInAquaHideout(u8 mapSecId) { u32 i; - for (i = 0; i < 1; i++) + for (i = 0; i < ARRAY_COUNT(sMapSecAquaHideoutOld); i++) { - if (sRegionMap_MapSecAquaHideoutOld[i] == mapSecId) - { + if (sMapSecAquaHideoutOld[i] == mapSecId) return TRUE; - } } return FALSE; } @@ -1300,7 +1291,7 @@ u16 CorrectSpecialMapSecId(u16 mapSecId) return CorrectSpecialMapSecId_Internal(mapSecId); } -static void RegionMap_GetPositionOfCursorWithinMapSection(void) +static void GetPositionOfCursorWithinMapSec(void) { u16 x; u16 y; @@ -1339,7 +1330,7 @@ static void RegionMap_GetPositionOfCursorWithinMapSection(void) else { x--; - if (GetRegionMapSectionIdAt_Internal(x, y) == gRegionMap->mapSecId) + if (GetMapSecIdAt(x, y) == gRegionMap->mapSecId) { posWithinMapSec++; } @@ -1358,7 +1349,7 @@ static bool8 RegionMap_IsMapSecIdInNextRow(u16 y) } for (x = MAPCURSOR_X_MIN; x <= MAPCURSOR_X_MAX; x++) { - if (GetRegionMapSectionIdAt_Internal(x, y) == gRegionMap->mapSecId) + if (GetMapSecIdAt(x, y) == gRegionMap->mapSecId) { return TRUE; } @@ -1366,7 +1357,7 @@ static bool8 RegionMap_IsMapSecIdInNextRow(u16 y) return FALSE; } -static void SpriteCallback_CursorFull(struct Sprite *sprite) +static void SpriteCB_CursorMapFull(struct Sprite *sprite) { if (gRegionMap->cursorMovementFrameCounter != 0) { @@ -1376,7 +1367,7 @@ static void SpriteCallback_CursorFull(struct Sprite *sprite) } } -static void SpriteCallback_CursorZoomed(struct Sprite *sprite) +static void SpriteCB_CursorMapZoomed(struct Sprite *sprite) { } @@ -1400,13 +1391,13 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag) { sheet.data = gRegionMap->cursorSmallImage; sheet.size = sizeof(gRegionMap->cursorSmallImage); - template.callback = SpriteCallback_CursorFull; + template.callback = SpriteCB_CursorMapFull; } else { sheet.data = gRegionMap->cursorLargeImage; sheet.size = sizeof(gRegionMap->cursorLargeImage); - template.callback = SpriteCallback_CursorZoomed; + template.callback = SpriteCB_CursorMapZoomed; } LoadSpriteSheet(&sheet); LoadSpritePalette(&palette); @@ -1443,12 +1434,14 @@ static void FreeRegionMapCursorSprite(void) } } -void sub_8124268(void) +// Unused +static void SetUnkCursorSpriteData(void) { gRegionMap->cursorSprite->data[3] = TRUE; } -void sub_8124278(void) +// Unused +static void ClearUnkCursorSpriteData(void) { gRegionMap->cursorSprite->data[3] = FALSE; } @@ -1460,7 +1453,7 @@ void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag) struct SpritePalette palette = {sRegionMapPlayerIcon_BrendanPal, paletteTag}; struct SpriteTemplate template = {tileTag, paletteTag, &sRegionMapPlayerIconOam, sRegionMapPlayerIconAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy}; - if (sub_8124668(gMapHeader.regionMapSectionId)) + if (IsEventIslandMapSecId(gMapHeader.regionMapSectionId)) { gRegionMap->playerIconSprite = NULL; return; @@ -1478,13 +1471,13 @@ void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag) { gRegionMap->playerIconSprite->pos1.x = gRegionMap->playerIconSpritePosX * 8 + 4; gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 8 + 4; - gRegionMap->playerIconSprite->callback = RegionMapPlayerIconSpriteCallback_Full; + gRegionMap->playerIconSprite->callback = SpriteCB_PlayerIconMapFull; } else { gRegionMap->playerIconSprite->pos1.x = gRegionMap->playerIconSpritePosX * 16 - 0x30; gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 16 - 0x42; - gRegionMap->playerIconSprite->callback = RegionMapPlayerIconSpriteCallback_Zoomed; + gRegionMap->playerIconSprite->callback = SpriteCB_PlayerIconMapZoomed; } } @@ -1505,7 +1498,7 @@ static void UnhideRegionMapPlayerIcon(void) { gRegionMap->playerIconSprite->pos1.x = gRegionMap->playerIconSpritePosX * 16 - 0x30; gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 16 - 0x42; - gRegionMap->playerIconSprite->callback = RegionMapPlayerIconSpriteCallback_Zoomed; + gRegionMap->playerIconSprite->callback = SpriteCB_PlayerIconMapZoomed; gRegionMap->playerIconSprite->invisible = FALSE; } else @@ -1514,13 +1507,13 @@ static void UnhideRegionMapPlayerIcon(void) gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 8 + 4; gRegionMap->playerIconSprite->pos2.x = 0; gRegionMap->playerIconSprite->pos2.y = 0; - gRegionMap->playerIconSprite->callback = RegionMapPlayerIconSpriteCallback_Full; + gRegionMap->playerIconSprite->callback = SpriteCB_PlayerIconMapFull; gRegionMap->playerIconSprite->invisible = FALSE; } } } -static void RegionMapPlayerIconSpriteCallback_Zoomed(struct Sprite *sprite) +static void SpriteCB_PlayerIconMapZoomed(struct Sprite *sprite) { sprite->pos2.x = -2 * gRegionMap->scrollX; sprite->pos2.y = -2 * gRegionMap->scrollY; @@ -1536,7 +1529,7 @@ static void RegionMapPlayerIconSpriteCallback_Zoomed(struct Sprite *sprite) } if (sprite->data[2] == TRUE) { - RegionMapPlayerIconSpriteCallback(sprite); + SpriteCB_PlayerIcon(sprite); } else { @@ -1544,12 +1537,12 @@ static void RegionMapPlayerIconSpriteCallback_Zoomed(struct Sprite *sprite) } } -static void RegionMapPlayerIconSpriteCallback_Full(struct Sprite *sprite) +static void SpriteCB_PlayerIconMapFull(struct Sprite *sprite) { - RegionMapPlayerIconSpriteCallback(sprite); + SpriteCB_PlayerIcon(sprite); } -static void RegionMapPlayerIconSpriteCallback(struct Sprite *sprite) +static void SpriteCB_PlayerIcon(struct Sprite *sprite) { if (gRegionMap->blinkPlayerIcon) { @@ -1565,12 +1558,10 @@ static void RegionMapPlayerIconSpriteCallback(struct Sprite *sprite) } } -void sub_812454C(void) +void TrySetPlayerIconBlink(void) { if (gRegionMap->playerIsInCave) - { gRegionMap->blinkPlayerIcon = TRUE; - } } u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength) @@ -1610,28 +1601,24 @@ u8 *GetMapNameGeneric(u8 *dest, u16 mapSecId) { switch (mapSecId) { - case MAPSEC_DYNAMIC: - return StringCopy(dest, gText_Ferry); - case MAPSEC_SECRET_BASE: - return StringCopy(dest, gText_SecretBase); - default: - return GetMapName(dest, mapSecId, 0); + case MAPSEC_DYNAMIC: + return StringCopy(dest, gText_Ferry); + case MAPSEC_SECRET_BASE: + return StringCopy(dest, gText_SecretBase); + default: + return GetMapName(dest, mapSecId, 0); } } -u8 *sub_8124610(u8 *dest, u16 mapSecId) +u8 *GetMapNameHandleAquaHideout(u8 *dest, u16 mapSecId) { if (mapSecId == MAPSEC_AQUA_HIDEOUT_OLD) - { return StringCopy(dest, gText_Hideout); - } else - { return GetMapNameGeneric(dest, mapSecId); - } } -void sub_8124630(u16 mapSecId, u16 *x, u16 *y, u16 *width, u16 *height) +static void GetMapSecDimensions(u16 mapSecId, u16 *x, u16 *y, u16 *width, u16 *height) { *x = gRegionMapEntries[mapSecId].x; *y = gRegionMapEntries[mapSecId].y; @@ -1639,172 +1626,170 @@ void sub_8124630(u16 mapSecId, u16 *x, u16 *y, u16 *width, u16 *height) *height = gRegionMapEntries[mapSecId].height; } -bool8 sub_8124658(void) +bool8 IsRegionMapZoomed(void) { return gRegionMap->zoomed; } -bool32 sub_8124668(u8 mapSecId) +bool32 IsEventIslandMapSecId(u8 mapSecId) { u32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < ARRAY_COUNT(sMapSecIdsOffMap); i++) { - if (mapSecId == sRegionMapEventSectionIds[i]) - { + if (mapSecId == sMapSecIdsOffMap[i]) return TRUE; - } } return FALSE; } -void MCB2_FlyMap(void) +void CB2_OpenFlyMap(void) { switch (gMain.state) { - case 0: - SetVBlankCallback(NULL); - SetGpuReg(REG_OFFSET_DISPCNT, 0); - SetGpuReg(REG_OFFSET_BG0HOFS, 0); - SetGpuReg(REG_OFFSET_BG0VOFS, 0); - SetGpuReg(REG_OFFSET_BG1HOFS, 0); - SetGpuReg(REG_OFFSET_BG1VOFS, 0); - SetGpuReg(REG_OFFSET_BG2VOFS, 0); - SetGpuReg(REG_OFFSET_BG2HOFS, 0); - SetGpuReg(REG_OFFSET_BG3HOFS, 0); - SetGpuReg(REG_OFFSET_BG3VOFS, 0); - sFlyMap = malloc(sizeof(*sFlyMap)); - if (sFlyMap == NULL) - { - SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); - } - else - { - ResetPaletteFade(); - ResetSpriteData(); - FreeSpriteTileRanges(); - FreeAllSpritePalettes(); - gMain.state++; - } - break; - case 1: - ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(1, gUnknown_085A1EE4, 3); + case 0: + SetVBlankCallback(NULL); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG3HOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + sFlyMap = malloc(sizeof(*sFlyMap)); + if (sFlyMap == NULL) + { + SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); + } + else + { + ResetPaletteFade(); + ResetSpriteData(); + FreeSpriteTileRanges(); + FreeAllSpritePalettes(); gMain.state++; - break; - case 2: - InitWindows(gUnknown_085A1EF0); - DeactivateAllTextPrinters(); - gMain.state++; - break; - case 3: - LoadUserWindowBorderGfx(0, 0x65, 0xd0); - clear_scheduled_bg_copies_to_vram(); - gMain.state++; - break; - case 4: - InitRegionMap(&sFlyMap->regionMap, FALSE); - CreateRegionMapCursor(0, 0); - CreateRegionMapPlayerIcon(1, 1); - sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId; - StringFill(sFlyMap->unk_a4c, CHAR_SPACE, 16); - gUnknown_03001180 = TRUE; - sub_8124904(); - gMain.state++; - break; - case 5: - LZ77UnCompVram(sRegionMapFrameGfxLZ, (u16 *)BG_CHAR_ADDR(3)); - gMain.state++; - break; - case 6: - LZ77UnCompVram(sRegionMapFrameTilemapLZ, (u16 *)BG_SCREEN_ADDR(30)); - gMain.state++; - break; - case 7: - LoadPalette(sRegionMapFramePal, 0x10, 0x20); - PutWindowTilemap(2); - FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL); - schedule_bg_copy_tilemap_to_vram(0); - gMain.state++; - break; - case 8: - sub_8124A70(); - gMain.state++; - break; - case 9: - BlendPalettes(-1, 16, 0); - SetVBlankCallback(sub_81248C0); - gMain.state++; - break; - case 10: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - ShowBg(0); - ShowBg(1); - ShowBg(2); - sub_81248F4(sub_8124D14); - SetMainCallback2(sub_81248D4); - gMain.state++; - break; + } + break; + case 1: + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(1, sFlyMapBgTemplates, 3); + gMain.state++; + break; + case 2: + InitWindows(sFlyMapWindowTemplates); + DeactivateAllTextPrinters(); + gMain.state++; + break; + case 3: + LoadUserWindowBorderGfx(0, 0x65, 0xd0); + clear_scheduled_bg_copies_to_vram(); + gMain.state++; + break; + case 4: + InitRegionMap(&sFlyMap->regionMap, FALSE); + CreateRegionMapCursor(0, 0); + CreateRegionMapPlayerIcon(1, 1); + sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId; + StringFill(sFlyMap->nameBuffer, CHAR_SPACE, MAP_NAME_LENGTH); + gUnknown_03001180 = TRUE; + DrawFlyDestTextWindow(); + gMain.state++; + break; + case 5: + LZ77UnCompVram(sRegionMapFrameGfxLZ, (u16 *)BG_CHAR_ADDR(3)); + gMain.state++; + break; + case 6: + LZ77UnCompVram(sRegionMapFrameTilemapLZ, (u16 *)BG_SCREEN_ADDR(30)); + gMain.state++; + break; + case 7: + LoadPalette(sRegionMapFramePal, 0x10, 0x20); + PutWindowTilemap(2); + FillWindowPixelBuffer(2, PIXEL_FILL(0)); + AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL); + schedule_bg_copy_tilemap_to_vram(0); + gMain.state++; + break; + case 8: + LoadFlyDestIcons(); + gMain.state++; + break; + case 9: + BlendPalettes(-1, 16, 0); + SetVBlankCallback(VBlankCB_FlyMap); + gMain.state++; + break; + case 10: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + ShowBg(0); + ShowBg(1); + ShowBg(2); + SetFlyMapCallback(CB_FadeInFlyMap); + SetMainCallback2(CB2_FlyMap); + gMain.state++; + break; } } -static void sub_81248C0(void) +static void VBlankCB_FlyMap(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -static void sub_81248D4(void) +static void CB2_FlyMap(void) { - sFlyMap->unk_000(); + sFlyMap->callback(); AnimateSprites(); BuildOamBuffer(); do_scheduled_bg_tilemap_copies_to_vram(); } -static void sub_81248F4(void callback(void)) +static void SetFlyMapCallback(void callback(void)) { - sFlyMap->unk_000 = callback; - sFlyMap->unk_004 = 0; + sFlyMap->callback = callback; + sFlyMap->state = 0; } -static void sub_8124904(void) +static void DrawFlyDestTextWindow(void) { u16 i; - bool32 flag; + bool32 namePrinted; const u8 *name; - if (sFlyMap->regionMap.iconDrawType > MAPSECTYPE_NONE && sFlyMap->regionMap.iconDrawType <= MAPSECTYPE_BATTLE_FRONTIER) + if (sFlyMap->regionMap.mapSecType > MAPSECTYPE_NONE && sFlyMap->regionMap.mapSecType <= MAPSECTYPE_BATTLE_FRONTIER) { - flag = FALSE; - for (i = 0; i < ARRAY_COUNT(gUnknown_085A1EDC); i++) + namePrinted = FALSE; + for (i = 0; i < ARRAY_COUNT(sMultiNameFlyDestinations); i++) { - if (sFlyMap->regionMap.mapSecId == gUnknown_085A1EDC[i].mapSecId) + if (sFlyMap->regionMap.mapSecId == sMultiNameFlyDestinations[i].mapSecId) { - if (FlagGet(gUnknown_085A1EDC[i].flag)) + if (FlagGet(sMultiNameFlyDestinations[i].flag)) { - StringLength(gUnknown_085A1EDC[i].name[sFlyMap->regionMap.posWithinMapSec]); - flag = TRUE; + StringLength(sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec]); + namePrinted = TRUE; ClearStdWindowAndFrameToTransparent(0, FALSE); - DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x65, 0x0d); + DrawStdFrameWithCustomTileAndPalette(1, FALSE, 101, 13); AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); - name = gUnknown_085A1EDC[i].name[sFlyMap->regionMap.posWithinMapSec]; - AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 0x60), 0x11, 0, NULL); + name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec]; + AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); gUnknown_03001180 = TRUE; } break; } } - if (!flag) + if (!namePrinted) { if (gUnknown_03001180 == TRUE) { ClearStdWindowAndFrameToTransparent(1, FALSE); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x65, 0x0d); + DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13); } else { @@ -1820,7 +1805,7 @@ static void sub_8124904(void) if (gUnknown_03001180 == TRUE) { ClearStdWindowAndFrameToTransparent(1, FALSE); - DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x65, 0x0d); + DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13); } FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, 2); @@ -1830,24 +1815,28 @@ static void sub_8124904(void) } -static void sub_8124A70(void) +static void LoadFlyDestIcons(void) { struct SpriteSheet sheet; - LZ77UnCompWram(sUnknown_085A1D68, sFlyMap->unk_88c); - sheet.data = sFlyMap->unk_88c; - sheet.size = 0x1c0; + LZ77UnCompWram(sFlyTargetIcons_Gfx, sFlyMap->tileBuffer); + sheet.data = sFlyMap->tileBuffer; + sheet.size = sizeof(sFlyMap->tileBuffer); sheet.tag = 2; LoadSpriteSheet(&sheet); - LoadSpritePalette(&gUnknown_085A1F10); - sub_8124AD4(); - sub_8124BE4(); + LoadSpritePalette(&sFlyTargetIconsSpritePalette); + CreateFlyDestIcons(); + TryCreateRedOutlineFlyDestIcons(); } -static void sub_8124AD4(void) +// Sprite data for SpriteCB_FlyDestIcon +#define sIconMapSec data[0] +#define sFlickerTimer data[1] + +static void CreateFlyDestIcons(void) { u16 canFlyFlag; - u16 i; + u16 mapSecId; u16 x; u16 y; u16 width; @@ -1856,43 +1845,39 @@ static void sub_8124AD4(void) u8 spriteId; canFlyFlag = FLAG_VISITED_LITTLEROOT_TOWN; - for (i = 0; i < 16; i++) + for (mapSecId = MAPSEC_LITTLEROOT_TOWN; mapSecId <= MAPSEC_EVER_GRANDE_CITY; mapSecId++) { - sub_8124630(i, &x, &y, &width, &height); + GetMapSecDimensions(mapSecId, &x, &y, &width, &height); x = (x + MAPCURSOR_X_MIN) * 8 + 4; y = (y + MAPCURSOR_Y_MIN) * 8 + 4; + if (width == 2) - { shape = SPRITE_SHAPE(16x8); - } else if (height == 2) - { shape = SPRITE_SHAPE(8x16); - } else - { shape = SPRITE_SHAPE(8x8); - } - spriteId = CreateSprite(&gUnknown_085A1F7C, x, y, 10); + + spriteId = CreateSprite(&sFlyDestIconSpriteTemplate, x, y, 10); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.shape = shape; + if (FlagGet(canFlyFlag)) - { - gSprites[spriteId].callback = sub_8124CBC; - } + gSprites[spriteId].callback = SpriteCB_FlyDestIcon; else - { shape += 3; - } + StartSpriteAnim(&gSprites[spriteId], shape); - gSprites[spriteId].data[0] = i; + gSprites[spriteId].sIconMapSec = mapSecId; } canFlyFlag++; } } -static void sub_8124BE4(void) +// Draw a red outline box on the mapsec if its corresponding flag has been set +// Only used for Battle Frontier, but set up to handle more +static void TryCreateRedOutlineFlyDestIcons(void) { u16 i; u16 x; @@ -1902,142 +1887,142 @@ static void sub_8124BE4(void) u16 mapSecId; u8 spriteId; - for (i = 0; sUnknown_085A1F18[i][1] != MAPSEC_NONE; i++) + for (i = 0; sRedOutlineFlyDestinations[i][1] != MAPSEC_NONE; i++) { - if (FlagGet(sUnknown_085A1F18[i][0])) + if (FlagGet(sRedOutlineFlyDestinations[i][0])) { - mapSecId = sUnknown_085A1F18[i][1]; - sub_8124630(mapSecId, &x, &y, &width, &height); + mapSecId = sRedOutlineFlyDestinations[i][1]; + GetMapSecDimensions(mapSecId, &x, &y, &width, &height); x = (x + MAPCURSOR_X_MIN) * 8; y = (y + MAPCURSOR_Y_MIN) * 8; - spriteId = CreateSprite(&gUnknown_085A1F7C, x, y, 10); + spriteId = CreateSprite(&sFlyDestIconSpriteTemplate, x, y, 10); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.size = SPRITE_SIZE(16x16); - gSprites[spriteId].callback = sub_8124CBC; - StartSpriteAnim(&gSprites[spriteId], 6); - gSprites[spriteId].data[0] = mapSecId; + gSprites[spriteId].callback = SpriteCB_FlyDestIcon; + StartSpriteAnim(&gSprites[spriteId], FLYDESTICON_RED_OUTLINE); + gSprites[spriteId].sIconMapSec = mapSecId; } } } } -static void sub_8124CBC(struct Sprite *sprite) +// Flickers fly destination icon color (by hiding the fly icon sprite) if the cursor is currently on it +static void SpriteCB_FlyDestIcon(struct Sprite *sprite) { - if (sFlyMap->regionMap.mapSecId == sprite->data[0]) + if (sFlyMap->regionMap.mapSecId == sprite->sIconMapSec) { - if (++sprite->data[1] > 16) + if (++sprite->sFlickerTimer > 16) { - sprite->data[1] = 0; + sprite->sFlickerTimer = 0; sprite->invisible = sprite->invisible ? FALSE : TRUE; } } else { - sprite->data[1] = 16; + sprite->sFlickerTimer = 16; sprite->invisible = FALSE; } } -static void sub_8124D14(void) +#undef sIconMapSec +#undef sFlickerTimer + +static void CB_FadeInFlyMap(void) { - switch (sFlyMap->unk_004) + switch (sFlyMap->state) { - case 0: - BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); - sFlyMap->unk_004++; - break; - case 1: - if (!UpdatePaletteFade()) - { - sub_81248F4(sub_8124D64); - } - break; + case 0: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); + sFlyMap->state++; + break; + case 1: + if (!UpdatePaletteFade()) + { + SetFlyMapCallback(CB_HandleFlyMapInput); + } + break; } } -static void sub_8124D64(void) +static void CB_HandleFlyMapInput(void) { - if (sFlyMap->unk_004 == 0) + if (sFlyMap->state == 0) { - switch (sub_81230AC()) + switch (DoRegionMapInputCallback()) { - case INPUT_EVENT_NONE: - case INPUT_EVENT_MOVE_START: - case INPUT_EVENT_MOVE_CONT: - break; - case INPUT_EVENT_MOVE_END: - sub_8124904(); - break; - case INPUT_EVENT_A_BUTTON: - if (sFlyMap->regionMap.iconDrawType == MAPSECTYPE_CITY_CANFLY || sFlyMap->regionMap.iconDrawType == MAPSECTYPE_BATTLE_FRONTIER) - { - m4aSongNumStart(SE_SELECT); - sFlyMap->choseFlyLocation = TRUE; - sub_81248F4(sub_8124E0C); - } - break; - case INPUT_EVENT_B_BUTTON: + case MAP_INPUT_NONE: + case MAP_INPUT_MOVE_START: + case MAP_INPUT_MOVE_CONT: + break; + case MAP_INPUT_MOVE_END: + DrawFlyDestTextWindow(); + break; + case MAP_INPUT_A_BUTTON: + if (sFlyMap->regionMap.mapSecType == MAPSECTYPE_CITY_CANFLY || sFlyMap->regionMap.mapSecType == MAPSECTYPE_BATTLE_FRONTIER) + { m4aSongNumStart(SE_SELECT); - sFlyMap->choseFlyLocation = FALSE; - sub_81248F4(sub_8124E0C); - break; + sFlyMap->choseFlyLocation = TRUE; + SetFlyMapCallback(CB_ExitFlyMap); + } + break; + case MAP_INPUT_B_BUTTON: + m4aSongNumStart(SE_SELECT); + sFlyMap->choseFlyLocation = FALSE; + SetFlyMapCallback(CB_ExitFlyMap); + break; } } } -static void sub_8124E0C(void) +static void CB_ExitFlyMap(void) { - switch (sFlyMap->unk_004) + switch (sFlyMap->state) { - case 0: - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - sFlyMap->unk_004++; - break; - case 1: - if (!UpdatePaletteFade()) + case 0: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); + sFlyMap->state++; + break; + case 1: + if (!UpdatePaletteFade()) + { + FreeRegionMapIconResources(); + if (sFlyMap->choseFlyLocation) { - FreeRegionMapIconResources(); - if (sFlyMap->choseFlyLocation) + switch (sFlyMap->regionMap.mapSecId) { - switch (sFlyMap->regionMap.mapSecId) - { - case MAPSEC_SOUTHERN_ISLAND: - SetWarpDestinationToHealLocation(HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR); - break; - case MAPSEC_BATTLE_FRONTIER: - SetWarpDestinationToHealLocation(HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST); - break; - case MAPSEC_LITTLEROOT_TOWN: - SetWarpDestinationToHealLocation(gSaveBlock2Ptr->playerGender == MALE ? HEAL_LOCATION_LITTLEROOT_TOWN_1 : HEAL_LOCATION_LITTLEROOT_TOWN_2); - break; - case MAPSEC_EVER_GRANDE_CITY: - SetWarpDestinationToHealLocation(FlagGet(FLAG_LANDMARK_POKEMON_LEAGUE) && sFlyMap->regionMap.posWithinMapSec == 0 ? HEAL_LOCATION_EVER_GRANDE_CITY_2 : HEAL_LOCATION_EVER_GRANDE_CITY_1); - break; - default: - if (sMapHealLocations[sFlyMap->regionMap.mapSecId][2] != 0) - { - SetWarpDestinationToHealLocation(sMapHealLocations[sFlyMap->regionMap.mapSecId][2]); - } - else - { - SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], -1); - } - break; - } - ReturnToFieldFromFlyMapSelect(); + case MAPSEC_SOUTHERN_ISLAND: + SetWarpDestinationToHealLocation(HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR); + break; + case MAPSEC_BATTLE_FRONTIER: + SetWarpDestinationToHealLocation(HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST); + break; + case MAPSEC_LITTLEROOT_TOWN: + SetWarpDestinationToHealLocation(gSaveBlock2Ptr->playerGender == MALE ? HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE : HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE); + break; + case MAPSEC_EVER_GRANDE_CITY: + SetWarpDestinationToHealLocation(FlagGet(FLAG_LANDMARK_POKEMON_LEAGUE) && sFlyMap->regionMap.posWithinMapSec == 0 ? HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE : HEAL_LOCATION_EVER_GRANDE_CITY); + break; + default: + if (sMapHealLocations[sFlyMap->regionMap.mapSecId][2] != 0) + SetWarpDestinationToHealLocation(sMapHealLocations[sFlyMap->regionMap.mapSecId][2]); + else + SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], -1); + break; } - else - { - SetMainCallback2(CB2_ReturnToPartyMenuFromFlyMap); - } - if (sFlyMap != NULL) - { - free(sFlyMap); - sFlyMap = NULL; - } - FreeAllWindowBuffers(); + ReturnToFieldFromFlyMapSelect(); } - break; + else + { + SetMainCallback2(CB2_ReturnToPartyMenuFromFlyMap); + } + if (sFlyMap != NULL) + { + free(sFlyMap); + sFlyMap = NULL; + } + FreeAllWindowBuffers(); + } + break; } } diff --git a/src/unk_pokedex_area_screen_helper.c b/src/unk_pokedex_area_screen_helper.c deleted file mode 100644 index 9b2401cb2..000000000 --- a/src/unk_pokedex_area_screen_helper.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "global.h" -#include "main.h" -#include "menu.h" -#include "bg.h" -#include "malloc.h" -#include "palette.h" -#include "unk_pokedex_area_screen_helper.h" - -EWRAM_DATA u8 *gUnknown_0203CF28 = NULL; - -static const u16 gUnknown_0861D140[] = INCBIN_U16("graphics/interface/region_map.gbapal"); -static const u32 gUnknown_0861D1A0[] = INCBIN_U32("graphics/interface/region_map.8bpp.lz"); -static const u32 gUnknown_0861DEF4[] = INCBIN_U32("graphics/interface/region_map.bin.lz"); -static const u32 gUnknown_0861E208[] = INCBIN_U32("graphics/interface/region_map_affine.8bpp.lz"); -static const u32 gUnknown_0861EF64[] = INCBIN_U32("graphics/interface/region_map_affine.bin.lz"); - -void sub_81C4D70(const struct UnkStruct_1C4D70 *template) -{ - u8 unk; - gUnknown_0203CF28 = Alloc(4); - unk = template->unk10; - - if (unk == 0) - { - SetBgAttribute(template->bg, BG_ATTR_METRIC, 0); - decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861D1A0, 0, template->unk2, unk); - sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861DEF4, 0, 0, 1), template->unk2, 32, 32, unk); - } - else - { - SetBgAttribute(template->bg, BG_ATTR_METRIC, 2); - SetBgAttribute(template->bg, BG_ATTR_TYPE, 1); - decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861E208, 0, template->unk2, 0); - sub_8199D3C(decompress_and_copy_tile_data_to_vram(template->bg, gUnknown_0861EF64, 0, 0, 1), template->unk2, 64, 64, 1); - } - - ChangeBgX(template->bg, 0, 0); - ChangeBgY(template->bg, 0, 0); - SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); - CpuCopy32(gUnknown_0861D140, &gPlttBufferUnfaded[0x70], 0x60); - *gUnknown_0203CF28 = template->bg; -} - -bool32 sub_81C4E90(void) -{ - if (!free_temp_tile_data_buffers_if_possible()) - { - ShowBg(*gUnknown_0203CF28); - return FALSE; - } - else - { - return TRUE; - } -} - -void sub_81C4EB4(void) -{ - if (gUnknown_0203CF28 != NULL) - { - FREE_AND_SET_NULL(gUnknown_0203CF28); - } -} - -void sub_81C4ED0(u32 a0) -{ - ChangeBgY(*gUnknown_0203CF28, a0 * 0x100, 0); -} diff --git a/sym_ewram.txt b/sym_ewram.txt index 79e89fc9b..1490a598a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -137,7 +137,7 @@ .include "src/party_menu.o" .include "src/mirage_tower.o" .include "src/pokemon_summary_screen.o" - .include "src/unk_pokedex_area_screen_helper.o" + .include "src/pokedex_area_region_map.o" .include "src/battle_pyramid_bag.o" .include "src/pokenav.o" .include "src/pokenav_match_call_ui.o" From 8e1e09562e8b79d3977856343ac194cf4623b086 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 3 Mar 2020 22:46:48 -0500 Subject: [PATCH 02/34] Use array count for InitBgsFromTemplates --- src/field_region_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_region_map.c b/src/field_region_map.c index 50d2b5a8e..57f95f93e 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -112,7 +112,7 @@ static void MCB2_InitRegionMapRegisters(void) ResetSpriteData(); FreeAllSpritePalettes(); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(1, sFieldRegionMapBgTemplates, 2); + InitBgsFromTemplates(1, sFieldRegionMapBgTemplates, ARRAY_COUNT(sFieldRegionMapBgTemplates)); InitWindows(sFieldRegionMapWindowTemplates); DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 0x27, 0xd0); From 4485d51522a05e40c3c3458169c389b9a0421c3e Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Sun, 23 Feb 2020 15:46:22 +0000 Subject: [PATCH 03/34] Document decoration.c --- data/scripts/secret_base.inc | 2 +- data/specials.inc | 2 +- .../{unk_85a7308.pal => brendan.pal} | 0 .../decorations/{unk_85a7328.pal => may.pal} | 0 ...png => decoration_putting_away_cursor.png} | Bin include/decoration.h | 8 - include/decoration_inventory.h | 8 +- include/global.h | 22 +- include/trader.h | 2 +- src/decoration.c | 1029 +++++++++-------- src/decoration_inventory.c | 86 +- src/secret_base.c | 10 +- src/trader.c | 16 +- 13 files changed, 590 insertions(+), 595 deletions(-) rename graphics/decorations/{unk_85a7308.pal => brendan.pal} (100%) rename graphics/decorations/{unk_85a7328.pal => may.pal} (100%) rename graphics/misc/{decoration_unk_85a7358.png => decoration_putting_away_cursor.png} (100%) diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index cf582bba5..b5c3251b5 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -301,7 +301,7 @@ SecretBase_EventScript_PutAwayDecoration:: @ 8275D2E end SecretBase_EventScript_PutAwayDecorationLoop:: @ 8275D39 - special sub_8129708 + special PutAwayDecorationIteration compare VAR_RESULT, 1 goto_if_eq SecretBase_EventScript_PutAwayDecorationEnd addvar VAR_0x8004, 1 diff --git a/data/specials.inc b/data/specials.inc index dea813a76..fb2e8fe75 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -31,7 +31,7 @@ gSpecials:: @ 81DBA64 def_special GetObjectEventLocalIdByFlag def_special GetSecretBaseTypeInFrontOfPlayer def_special SetSecretBaseOwnerGfxId - def_special sub_8129708 + def_special PutAwayDecorationIteration def_special EnterNewlyCreatedSecretBase def_special SetBattledOwnerFromResult def_special DoSecretBasePCTurnOffEffect diff --git a/graphics/decorations/unk_85a7308.pal b/graphics/decorations/brendan.pal similarity index 100% rename from graphics/decorations/unk_85a7308.pal rename to graphics/decorations/brendan.pal diff --git a/graphics/decorations/unk_85a7328.pal b/graphics/decorations/may.pal similarity index 100% rename from graphics/decorations/unk_85a7328.pal rename to graphics/decorations/may.pal diff --git a/graphics/misc/decoration_unk_85a7358.png b/graphics/misc/decoration_putting_away_cursor.png similarity index 100% rename from graphics/misc/decoration_unk_85a7358.png rename to graphics/misc/decoration_putting_away_cursor.png diff --git a/include/decoration.h b/include/decoration.h index eed930356..b00dd42f1 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -52,14 +52,6 @@ struct Decoration const u16 *tiles; }; -struct DecorationPCContext -{ - u8 *items; - u8 *pos; - u8 size; - u8 isPlayerRoom; -}; - extern const struct Decoration gDecorations[]; extern EWRAM_DATA u8 *gCurDecorationItems; extern EWRAM_DATA u8 gCurDecorationIndex; diff --git a/include/decoration_inventory.h b/include/decoration_inventory.h index 7362c2da2..f43b91d7a 100644 --- a/include/decoration_inventory.h +++ b/include/decoration_inventory.h @@ -12,10 +12,10 @@ extern struct DecorationInventory gDecorationInventories[]; void SetDecorationInventoriesPointers(void); void ClearDecorationInventories(void); s8 GetFirstEmptyDecorSlot(u8 category); -u8 CheckHasDecoration(u8); -u8 DecorationAdd(u8); -u8 DecorationCheckSpace(u8); -s8 DecorationRemove(u8); +u8 CheckHasDecoration(u8 decor); +u8 DecorationAdd(u8 decor); +u8 DecorationCheckSpace(u8 decor); +s8 DecorationRemove(u8 decor); void CondenseDecorationsInCategory(u8 category); u8 GetNumOwnedDecorationsInCategory(u8 category); u8 GetNumOwnedDecorations(void); diff --git a/include/global.h b/include/global.h index 34d897a8c..e3c8fee55 100644 --- a/include/global.h +++ b/include/global.h @@ -637,7 +637,7 @@ struct MauvilleManHipster struct MauvilleOldManTrader { u8 id; - u8 decorIds[NUM_TRADER_ITEMS]; + u8 decorations[NUM_TRADER_ITEMS]; u8 playerNames[NUM_TRADER_ITEMS][11]; u8 alreadyTraded; u8 language[NUM_TRADER_ITEMS]; @@ -928,16 +928,16 @@ struct SaveBlock1 /*0x159C*/ u32 gameStats[NUM_GAME_STATS]; /*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT]; /*0x1A9C*/ struct SecretBase secretBases[SECRET_BASES_COUNT]; - /*0x271C*/ u8 playerRoomDecor[DECOR_MAX_PLAYERS_HOUSE]; - /*0x2728*/ u8 playerRoomDecorPos[DECOR_MAX_PLAYERS_HOUSE]; - /*0x2734*/ u8 decorDesk[10]; - /*0x273E*/ u8 decorChair[10]; - /*0x2748*/ u8 decorPlant[10]; - /*0x2752*/ u8 decorOrnament[30]; - /*0x2770*/ u8 decorMat[30]; - /*0x278E*/ u8 decorPoster[10]; - /*0x2798*/ u8 decorDoll[40]; - /*0x27C0*/ u8 decorCushion[10]; + /*0x271C*/ u8 playerRoomDecorations[DECOR_MAX_PLAYERS_HOUSE]; + /*0x2728*/ u8 playerRoomDecorationPositions[DECOR_MAX_PLAYERS_HOUSE]; + /*0x2734*/ u8 decorationDesks[10]; + /*0x273E*/ u8 decorationChairs[10]; + /*0x2748*/ u8 decorationPlants[10]; + /*0x2752*/ u8 decorationOrnaments[30]; + /*0x2770*/ u8 decorationMats[30]; + /*0x278E*/ u8 decorationPosters[10]; + /*0x2798*/ u8 decorationDolls[40]; + /*0x27C0*/ u8 decorationCushions[10]; /*0x27CA*/ u8 padding_27CA[2]; /*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT]; /*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT]; diff --git a/include/trader.h b/include/trader.h index 25d72bd3b..409d0ba14 100644 --- a/include/trader.h +++ b/include/trader.h @@ -5,7 +5,7 @@ #ifndef GUARD_TRADER_H #define GUARD_TRADER_H -void sub_8133DA0(u8 taskId); +void DecorationItemsMenuAction_Trade(u8 taskId); void ExitTraderMenu(u8 taskId); void TraderSetup(void); void Trader_ResetFlag(void); diff --git a/src/decoration.c b/src/decoration.c index fd41beb6f..c878f397a 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -43,6 +43,25 @@ #define PLACE_DECORATION_PLAYER_TAG 0x008 #define NUM_DECORATION_FLAGS (FLAG_DECORATION_14 - FLAG_DECORATION_0) +#define tCursorX data[0] +#define tCursorY data[1] +#define tState data[2] +#define tInitialX data[3] +#define tInitialY data[4] +#define tDecorWidth data[5] +#define tDecorHeight data[6] +#define tButton data[10] +#define tDecorationMenuCommand data[11] +#define tDecorationItemsMenuCommand data[12] +#define tMenuTaskId data[13] + +#define DECOR_MENU_PLACE 0 +#define DECOR_MENU_TOSS 1 +#define DECOR_MENU_TRADE 2 + +#define DECOR_ITEMS_MENU_PLACE 0 +#define DECOR_ITEMS_MENU_PUT_AWAY 1 + struct DecorationItemsMenu { struct ListMenuItem items[41]; @@ -68,6 +87,23 @@ struct DecorRearrangementDataBuffer u16 flagId; }; +struct DecorationPCContext +{ + u8 *items; + u8 *pos; + u8 size; + u8 isPlayerRoom; +}; + +enum Windows +{ + WINDOW_MAIN_MENU, + WINDOW_DECORATION_CATEGORIES, + WINDOW_DECORATION_CATEGORY_SUMMARY, + WINDOW_DECORATION_CATEGORY_ITEMS, + WINDOW_COUNT +}; + EWRAM_DATA u8 *gCurDecorationItems = NULL; EWRAM_DATA static u8 sDecorationActionsCursorPos = 0; EWRAM_DATA static u8 sNumOwnedDecorationsInCurCategory = 0; @@ -78,10 +114,10 @@ EWRAM_DATA static u16 sDecorationsScrollOffset = 0; EWRAM_DATA u8 gCurDecorationIndex = 0; EWRAM_DATA static u8 sCurDecorationCategory = DECORCAT_DESK; EWRAM_DATA static u32 filler_0203a174[2] = {}; -EWRAM_DATA struct DecorationPCContext gDecorationContext = {}; -EWRAM_DATA static u8 sDecorMenuWindowIds[4] = {}; +EWRAM_DATA static struct DecorationPCContext sDecorationContext = {}; +EWRAM_DATA static u8 sDecorMenuWindowIds[WINDOW_COUNT] = {}; EWRAM_DATA static struct DecorationItemsMenu *sDecorationItemsMenu = NULL; -EWRAM_DATA struct PlaceDecorationGraphicsDataBuffer sPlaceDecorationGraphicsDataBuffer = {}; +EWRAM_DATA static struct PlaceDecorationGraphicsDataBuffer sPlaceDecorationGraphicsDataBuffer = {}; EWRAM_DATA static u16 sCurDecorMapX = 0; EWRAM_DATA static u16 sCurDecorMapY = 0; EWRAM_DATA static u8 sDecor_CameraSpriteObjectIdx1 = 0; @@ -111,62 +147,62 @@ static void ReturnToActionsMenuFromCategories(u8 taskId); static void ExitTraderDecorationMenu(u8 taskId); static void CopyDecorationMenuItemName(u8 *dest, u16 decoration); static void DecorationItemsMenu_OnCursorMove(s32 itemIndex, bool8 flag, struct ListMenu *menu); -void sub_81274A0(u8 a0, s32 a1, u8 a2); +static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, s32 itemIndex, u8 y); static void ShowDecorationItemsWindow(u8 taskId); static void HandleDecorationItemsMenuInput(u8 taskId); -static void PrintDecorationItemDescription(u32 itemIndex); +static void PrintDecorationItemDescription(s32 itemIndex); static void RemoveDecorationItemsOtherWindows(void); -bool8 sub_81277BC(u8 idx); -bool8 sub_81277E8(u8 idx); +static bool8 IsDecorationIndexInSecretBase(u8 idx); +static bool8 IsDecorationIndexInPlayersRoom(u8 idx); static void IdentifyOwnedDecorationsCurrentlyInUse(u8 taskId); static void InitDecorationItemsWindow(u8 taskId); static void ShowDecorationCategorySummaryWindow(u8 category); -void sub_8127A30(u8 taskId); -void sub_8127A8C(u8 taskId); -void sub_8127F68(u8 taskId); -void sub_8128060(u8 taskId); -void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor); -void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphicsDataBuffer *data); -void sub_812826C(u8 taskId); -void sub_81283BC(u8 taskId); -void sub_8128414(u8 taskId); -void AttemptPlaceDecoration(u8 taskId); -void PlaceDecorationPrompt(u8 taskId); -void PlaceDecoration(u8 taskId); -void sub_8128AAC(u8 taskId); -void CancelDecoratingPrompt(u8 taskId); -void CancelDecorating(u8 taskId); -void sub_8128BBC(u8 taskId); -void c1_overworld_prev_quest(u8 taskId); -void sub_8128CD4(void); -void sub_8128DE0(void); -void ContinueDecorating(u8 taskId); -void CantPlaceDecorationPrompt(u8 taskId); -void sub_81292D0(struct Sprite *sprite); -void sub_81292E8(struct Sprite *sprite); -u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor); -const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode); -bool8 sub_81299AC(u8 taskId); -void sub_8129ABC(u8 taskId); -void ContinuePuttingAwayDecorations(u8 taskId); -void sub_8129BCC(u8 taskId); -void sub_8129BF8(u8 taskId); -void sub_8129C74(u8 taskId); -void ContinuePuttingAwayDecorationsPrompt(u8 taskId); -void sub_812A0E8(u8 taskId); -void ReturnDecorationPrompt(u8 taskId); -void PutAwayDecoration(u8 taskId); -void StopPuttingAwayDecorationsPrompt(u8 taskId); -void StopPuttingAwayDecorations(u8 taskId); -void sub_812A22C(u8 taskId); -void sub_812A25C(u8 taskId); -void sub_812A334(void); -void sub_812A36C(struct Sprite *sprite); -void sub_812A39C(void); -void sub_812A3C8(void); -void sub_812A3D4(u8 taskId); -void TossDecorationPrompt(u8 taskId); -void TossDecoration(u8 taskId); +static void DontTossDecoration(u8 taskId); +static void DecorationItemsMenuAction_Cancel(u8 taskId); +static void DecorationItemsMenuAction_AttemptPlace(u8 taskId); +static void Task_PlaceDecoration(u8 taskId); +static void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor); +static void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphicsDataBuffer *data); +static void SetUpDecorationShape(u8 taskId); +static void AttemptPlaceDecoration(u8 taskId); +static void AttemptCancelPlaceDecoration(u8 taskId); +static void AttemptPlaceDecoration_(u8 taskId); +static void PlaceDecorationPrompt(u8 taskId); +static void PlaceDecoration(u8 taskId); +static void PlaceDecoration_(u8 taskId); +static void CancelDecoratingPrompt(u8 taskId); +static void CancelDecorating(u8 taskId); +static void CancelDecorating_(u8 taskId); +static void c1_overworld_prev_quest(u8 taskId); +static void FieldCB_InitDecorationItemsWindow(void); +static void ResetCursorMovement(void); +static void ContinueDecorating(u8 taskId); +static void CantPlaceDecorationPrompt(u8 taskId); +static void InitializePuttingAwayCursorSprite(struct Sprite *sprite); +static void InitializePuttingAwayCursorSprite2(struct Sprite *sprite); +static u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor); +static const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode); +static bool8 HasDecorationsInUse(u8 taskId); +static void Task_ContinuePuttingAwayDecorations(u8 taskId); +static void ContinuePuttingAwayDecorations(u8 taskId); +static void AttemptPutAwayDecoration(u8 taskId); +static void AttemptCancelPutAwayDecoration(u8 taskId); +static void AttemptPutAwayDecoration_(u8 taskId); +static void ContinuePuttingAwayDecorationsPrompt(u8 taskId); +static void AttemptMarkDecorUnderCursorForRemoval(u8 taskId); +static void ReturnDecorationPrompt(u8 taskId); +static void PutAwayDecoration(u8 taskId); +static void StopPuttingAwayDecorationsPrompt(u8 taskId); +static void StopPuttingAwayDecorations(u8 taskId); +static void StopPuttingAwayDecorations_(u8 taskId); +static void Task_StopPuttingAwayDecorations(u8 taskId); +static void FieldCB_StopPuttingAwayDecorations(void); +static void InitializeCameraSprite1(struct Sprite *sprite); +static void LoadPlayerSpritePalette(void); +static void FreePlayerSpritePalette(void); +static void DecorationItemsMenuAction_AttemptToss(u8 taskId); +static void TossDecorationPrompt(u8 taskId); +static void TossDecoration(u8 taskId); #include "data/decoration/tiles.h" #include "data/decoration/description.h" @@ -214,19 +250,19 @@ static const u8 *const sSecretBasePCMenuItemDescriptions[] = static const TaskFunc sSecretBasePC_SelectedDecorationActions[][2] = { - { sub_8127F68, sub_8127A8C }, - { sub_812A3D4, sub_8127A8C }, - { sub_8133DA0, sub_8127A8C }, + { DecorationItemsMenuAction_AttemptPlace, DecorationItemsMenuAction_Cancel }, + { DecorationItemsMenuAction_AttemptToss, DecorationItemsMenuAction_Cancel }, + { DecorationItemsMenuAction_Trade, DecorationItemsMenuAction_Cancel }, }; -static const struct WindowTemplate sDecorationWindowTemplates[4] = +static const struct WindowTemplate sDecorationWindowTemplates[WINDOW_COUNT] = { { .bg = 0, .tilemapLeft = 1, .tilemapTop = 1, .width = 18, - .height = 8, + .height = 2 * ARRAY_COUNT(sDecorationMainMenuActions), .paletteNum = 15, .baseBlock = 0x0001 }, @@ -265,7 +301,7 @@ static const struct ListMenuTemplate sDecorationItemsListMenuTemplate = { .items = NULL, .moveCursorFunc = DecorationItemsMenu_OnCursorMove, - .itemPrintFunc = sub_81274A0, + .itemPrintFunc = DecorationItemsMenu_PrintDecorationInUse, .totalItems = 0, .maxShowed = 0, .windowId = 0, @@ -329,7 +365,7 @@ static const struct SpriteTemplate sDecorationSelectorSpriteTemplate = SpriteCallbackDummy }; -const struct SpriteTemplate sDecorWhilePlacingSpriteTemplate = +static const struct SpriteTemplate sDecorWhilePlacingSpriteTemplate = { 0x0000, 0x0000, @@ -340,33 +376,33 @@ const struct SpriteTemplate sDecorWhilePlacingSpriteTemplate = SpriteCallbackDummy }; -const struct SpritePalette gUnknown_085A72BC = +static const struct SpritePalette sSpritePal_PlaceDecoration = { .data = (const u16 *)&sPlaceDecorationGraphicsDataBuffer.palette, .tag = PLACE_DECORATION_SELECTOR_TAG, }; -const struct YesNoFuncTable sPlaceDecorationYesNoFunctions = +static const struct YesNoFuncTable sPlaceDecorationYesNoFunctions = { .yesFunc = PlaceDecoration, .noFunc = ContinueDecorating, }; -const struct YesNoFuncTable sCancelDecoratingYesNoFunctions = +static const struct YesNoFuncTable sCancelDecoratingYesNoFunctions = { .yesFunc = CancelDecorating, .noFunc = ContinueDecorating, }; -const struct YesNoFuncTable gUnknown_085A72D4[] = +static const struct YesNoFuncTable sPlacePutAwayYesNoFunctions[] = { { - .yesFunc = sub_81283BC, - .noFunc = sub_8128414, + .yesFunc = AttemptPlaceDecoration, + .noFunc = AttemptCancelPlaceDecoration, }, { - .yesFunc = sub_8129BCC, - .noFunc = sub_8129BF8, + .yesFunc = AttemptPutAwayDecoration, + .noFunc = AttemptCancelPutAwayDecoration, } }; @@ -384,41 +420,41 @@ static const u8 sDecorationSlideElevation[] = 3, 0, }; -const u16 gUnknown_085A72F4[] = { +static const u16 sDecorShapeSizes[] = { 0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0x20 }; -const u16 gUnknown_085A7308[] = INCBIN_U16("graphics/decorations/unk_85a7308.gbapal"); +static const u16 sBrendanPalette[] = INCBIN_U16("graphics/decorations/brendan.gbapal"); -const u16 gUnknown_085A7328[] = INCBIN_U16("graphics/decorations/unk_85a7328.gbapal"); +static const u16 sMayPalette[] = INCBIN_U16("graphics/decorations/may.gbapal"); -const struct YesNoFuncTable sReturnDecorationYesNoFunctions = +static const struct YesNoFuncTable sReturnDecorationYesNoFunctions = { .yesFunc = PutAwayDecoration, .noFunc = ContinuePuttingAwayDecorations, }; -const struct YesNoFuncTable sStopPuttingAwayDecorationsYesNoFunctions = +static const struct YesNoFuncTable sStopPuttingAwayDecorationsYesNoFunctions = { .yesFunc = StopPuttingAwayDecorations, .noFunc = ContinuePuttingAwayDecorations, }; -const u8 gUnknown_085A7358[] = INCBIN_U8("graphics/misc/decoration_unk_85a7358.4bpp"); +static const u8 sDecorationPuttingAwayCursor[] = INCBIN_U8("graphics/misc/decoration_putting_away_cursor.4bpp"); -const struct SpritePalette gUnknown_085A73D8 = +static const struct SpritePalette sSpritePal_PuttingAwayCursorBrendan = { - .data = gUnknown_085A7308, + .data = sBrendanPalette, .tag = PLACE_DECORATION_PLAYER_TAG, }; -const struct SpritePalette gUnknown_085A73E0 = +static const struct SpritePalette sSpritePal_PuttingAwayCursorMay = { - .data = gUnknown_085A7328, + .data = sMayPalette, .tag = PLACE_DECORATION_PLAYER_TAG, }; -const struct OamData gUnknown_085A73E8 = +static const struct OamData sPuttingAwayCursorOamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -432,56 +468,55 @@ const struct OamData gUnknown_085A73E8 = .paletteNum = 0, }; -const union AnimCmd gUnknown_085A73F0[] = +static const union AnimCmd sPuttingAwayCursorAnimCmd0[] = { ANIMCMD_FRAME(0, 0, 0), ANIMCMD_END }; -const union AnimCmd *const gUnknown_085A73F8[] = +static const union AnimCmd *const sPuttingAwayCursorAnimCmds[] = { - gUnknown_085A73F0, + sPuttingAwayCursorAnimCmd0, }; -const struct SpriteFrameImage gUnknown_085A73FC = +static const struct SpriteFrameImage sPuttingAwayCursorPicTable = { - .data = gUnknown_085A7358, - .size = 0x80, + .data = sDecorationPuttingAwayCursor, + .size = sizeof(sDecorationPuttingAwayCursor), }; -const struct SpriteTemplate gUnknown_085A7404 = +static const struct SpriteTemplate sPuttingAwayCursorSpriteTemplate = { 0xFFFF, PLACE_DECORATION_PLAYER_TAG, - &gUnknown_085A73E8, - gUnknown_085A73F8, - &gUnknown_085A73FC, + &sPuttingAwayCursorOamData, + sPuttingAwayCursorAnimCmds, + &sPuttingAwayCursorPicTable, gDummySpriteAffineAnimTable, - sub_812A36C + InitializeCameraSprite1 }; -const struct YesNoFuncTable sTossDecorationYesNoFunctions = +static const struct YesNoFuncTable sTossDecorationYesNoFunctions = { .yesFunc = TossDecoration, - .noFunc = sub_8127A30, + .noFunc = DontTossDecoration, }; - void InitDecorationContextItems(void) { if (sCurDecorationCategory < DECORCAT_COUNT) gCurDecorationItems = gDecorationInventories[sCurDecorationCategory].items; - if (gDecorationContext.isPlayerRoom == FALSE) + if (sDecorationContext.isPlayerRoom == FALSE) { - gDecorationContext.items = gSaveBlock1Ptr->secretBases[0].decorations; - gDecorationContext.pos = gSaveBlock1Ptr->secretBases[0].decorationPositions; + sDecorationContext.items = gSaveBlock1Ptr->secretBases[0].decorations; + sDecorationContext.pos = gSaveBlock1Ptr->secretBases[0].decorationPositions; } - if (gDecorationContext.isPlayerRoom == TRUE) + if (sDecorationContext.isPlayerRoom == TRUE) { - gDecorationContext.items = gSaveBlock1Ptr->playerRoomDecor; - gDecorationContext.pos = gSaveBlock1Ptr->playerRoomDecorPos; + sDecorationContext.items = gSaveBlock1Ptr->playerRoomDecorations; + sDecorationContext.pos = gSaveBlock1Ptr->playerRoomDecorationPositions; } } @@ -491,9 +526,9 @@ static u8 AddDecorationWindow(u8 windowIndex) struct WindowTemplate template; windowId = &sDecorMenuWindowIds[windowIndex]; - if (windowIndex == 0) + if (windowIndex == WINDOW_MAIN_MENU) { - template = sDecorationWindowTemplates[0]; + template = sDecorationWindowTemplates[WINDOW_MAIN_MENU]; template.width = GetMaxWidthInMenuTable(sDecorationMainMenuActions, ARRAY_COUNT(sDecorationMainMenuActions)); if (template.width > 18) template.width = 18; @@ -520,9 +555,9 @@ static void RemoveDecorationWindow(u8 windowIndex) static void AddDecorationActionsWindow(void) { - u8 windowId = AddDecorationWindow(0); - PrintMenuTable(windowId, 4, sDecorationMainMenuActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, 4, sDecorationActionsCursorPos); + u8 windowId = AddDecorationWindow(WINDOW_MAIN_MENU); + PrintMenuTable(windowId, ARRAY_COUNT(sDecorationMainMenuActions), sDecorationMainMenuActions); + InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, ARRAY_COUNT(sDecorationMainMenuActions), sDecorationActionsCursorPos); } static void InitDecorationActionsWindow(void) @@ -536,20 +571,20 @@ static void InitDecorationActionsWindow(void) void DoSecretBaseDecorationMenu(u8 taskId) { InitDecorationActionsWindow(); - gDecorationContext.items = gSaveBlock1Ptr->secretBases[0].decorations; - gDecorationContext.pos = gSaveBlock1Ptr->secretBases[0].decorationPositions; - gDecorationContext.size = sizeof(gSaveBlock1Ptr->secretBases[0].decorations); - gDecorationContext.isPlayerRoom = FALSE; + sDecorationContext.items = gSaveBlock1Ptr->secretBases[0].decorations; + sDecorationContext.pos = gSaveBlock1Ptr->secretBases[0].decorationPositions; + sDecorationContext.size = DECOR_MAX_SECRET_BASE; + sDecorationContext.isPlayerRoom = FALSE; gTasks[taskId].func = HandleDecorationActionsMenuInput; } void DoPlayerRoomDecorationMenu(u8 taskId) { InitDecorationActionsWindow(); - gDecorationContext.items = gSaveBlock1Ptr->playerRoomDecor; - gDecorationContext.pos = gSaveBlock1Ptr->playerRoomDecorPos; - gDecorationContext.size = sizeof(gSaveBlock1Ptr->playerRoomDecor); - gDecorationContext.isPlayerRoom = TRUE; + sDecorationContext.items = gSaveBlock1Ptr->playerRoomDecorations; + sDecorationContext.pos = gSaveBlock1Ptr->playerRoomDecorationPositions; + sDecorationContext.size = DECOR_MAX_PLAYERS_HOUSE; + sDecorationContext.isPlayerRoom = TRUE; gTasks[taskId].func = HandleDecorationActionsMenuInput; } @@ -592,7 +627,7 @@ static void DecorationMenuAction_Decorate(u8 taskId) } else { - gTasks[taskId].data[11] = 0; + gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_PLACE; sCurDecorationCategory = DECORCAT_DESK; SecretBasePC_PrepMenuForSelectingStoredDecors(taskId); } @@ -600,18 +635,18 @@ static void DecorationMenuAction_Decorate(u8 taskId) static void DecorationMenuAction_PutAway(u8 taskId) { - if (!sub_81299AC(taskId)) + if (!HasDecorationsInUse(taskId)) { StringExpandPlaceholders(gStringVar4, gText_NoDecorationsInUse); DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationActionsAfterInvalidSelection); } else { - RemoveDecorationWindow(0); + RemoveDecorationWindow(WINDOW_MAIN_MENU); ClearDialogWindowAndFrame(0, 0); FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].data[2] = 0; - gTasks[taskId].func = sub_8129ABC; + gTasks[taskId].tState = 0; + gTasks[taskId].func = Task_ContinuePuttingAwayDecorations; } } @@ -624,7 +659,7 @@ static void DecorationMenuAction_Toss(u8 taskId) } else { - gTasks[taskId].data[11] = 1; + gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_TOSS; sCurDecorationCategory = DECORCAT_DESK; SecretBasePC_PrepMenuForSelectingStoredDecors(taskId); } @@ -632,8 +667,8 @@ static void DecorationMenuAction_Toss(u8 taskId) static void DecorationMenuAction_Cancel(u8 taskId) { - RemoveDecorationWindow(0); - if (!gDecorationContext.isPlayerRoom) + RemoveDecorationWindow(WINDOW_MAIN_MENU); + if (!sDecorationContext.isPlayerRoom) { ScriptContext1_SetupScript(SecretBase_EventScript_PCCancel); DestroyTask(taskId); @@ -654,23 +689,23 @@ static void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId) { LoadPalette(sDecorationMenuPalette, 0xd0, 0x20); ClearDialogWindowAndFrame(0, 0); - RemoveDecorationWindow(0); + RemoveDecorationWindow(WINDOW_MAIN_MENU); InitDecorationCategoriesWindow(taskId); } static void InitDecorationCategoriesWindow(u8 taskId) { - u8 windowId = AddDecorationWindow(1); + u8 windowId = AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); PrintDecorationCategoryMenuItems(taskId); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, DECORCAT_COUNT + 1, sCurDecorationCategory); gTasks[taskId].func = HandleDecorationCategoriesMenuInput; } -static void sub_8126E44(u8 taskId) +static void ReinitDecorationCategoriesWindow(u8 taskId) { - FillWindowPixelBuffer(sDecorMenuWindowIds[1], PIXEL_FILL(1)); + FillWindowPixelBuffer(sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES], PIXEL_FILL(1)); PrintDecorationCategoryMenuItems(taskId); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIds[1], DECORCAT_COUNT + 1, sCurDecorationCategory); + InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES], DECORCAT_COUNT + 1, sCurDecorationCategory); gTasks[taskId].func = HandleDecorationCategoriesMenuInput; } @@ -678,10 +713,10 @@ static void PrintDecorationCategoryMenuItems(u8 taskId) { u8 i; s16 *data = gTasks[taskId].data; - u8 windowId = sDecorMenuWindowIds[1]; - bool8 isPlayerRoom = gDecorationContext.isPlayerRoom; + u8 windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES]; + bool8 isPlayerRoom = sDecorationContext.isPlayerRoom; bool8 shouldDisable = FALSE; - if (isPlayerRoom == TRUE && data[11] == 0) + if (isPlayerRoom == TRUE && tDecorationMenuCommand == DECOR_MENU_PLACE) shouldDisable = TRUE; for (i = 0; i < DECORCAT_COUNT; i++) @@ -693,7 +728,7 @@ static void PrintDecorationCategoryMenuItems(u8 taskId) PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SPEED_FF); } - AddTextPrinterParameterized(windowId, 1, gTasks[taskId].data[11] == 2 ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL); + AddTextPrinterParameterized(windowId, 1, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL); schedule_bg_copy_tilemap_to_vram(0); } @@ -767,7 +802,7 @@ static void SelectDecorationCategory(u8 taskId) } else { - RemoveDecorationWindow(1); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORIES); StringExpandPlaceholders(gStringVar4, gText_NoDecorations); DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationCategoriesAfterInvalidSelection); } @@ -781,7 +816,7 @@ static void ReturnToDecorationCategoriesAfterInvalidSelection(u8 taskId) static void ExitDecorationCategoriesMenu(u8 taskId) { - if (gTasks[taskId].data[11] != 2) + if (gTasks[taskId].tDecorationMenuCommand != DECOR_MENU_TRADE) ReturnToActionsMenuFromCategories(taskId); else ExitTraderDecorationMenu(taskId); @@ -789,7 +824,7 @@ static void ExitDecorationCategoriesMenu(u8 taskId) static void ReturnToActionsMenuFromCategories(u8 taskId) { - RemoveDecorationWindow(1); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORIES); AddDecorationActionsWindow(); DrawDialogueFrame(0, 0); PrintCurMainMenuDescription(); @@ -800,7 +835,7 @@ void ShowDecorationCategoriesWindow(u8 taskId) { LoadPalette(sDecorationMenuPalette, 0xd0, 0x20); ClearDialogWindowAndFrame(0, 0); - gTasks[taskId].data[11] = 2; + gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_TRADE; sCurDecorationCategory = DECORCAT_DESK; InitDecorationCategoriesWindow(taskId); } @@ -812,7 +847,7 @@ void CopyDecorationCategoryName(u8 *dest, u8 category) static void ExitTraderDecorationMenu(u8 taskId) { - RemoveDecorationWindow(1); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORIES); ExitTraderMenu(taskId); } @@ -825,12 +860,12 @@ static void InitDecorationItemsMenuLimits(void) sDecorationItemsMenu->maxShownItems = sDecorationItemsMenu->numMenuItems; } -static void sub_81272C8(void) +static void InitDecorationItemsMenuScrollAndCursor(void) { sub_812225C(&sDecorationsScrollOffset, &sDecorationsCursorPos, sDecorationItemsMenu->maxShownItems, sDecorationItemsMenu->numMenuItems); } -static void sub_81272F8(void) +static void InitDecorationItemsMenuScrollAndCursor2(void) { sub_8122298(&sDecorationsScrollOffset, &sDecorationsCursorPos, sDecorationItemsMenu->maxShownItems, sDecorationItemsMenu->numMenuItems, 8); } @@ -841,7 +876,7 @@ static void PrintDecorationItemMenuItems(u8 taskId) u16 i; data = gTasks[taskId].data; - if ((sCurDecorationCategory < DECORCAT_DOLL || sCurDecorationCategory > DECORCAT_CUSHION) && gDecorationContext.isPlayerRoom == TRUE && data[11] == 0) + if ((sCurDecorationCategory < DECORCAT_DOLL || sCurDecorationCategory > DECORCAT_CUSHION) && sDecorationContext.isPlayerRoom == TRUE && tDecorationMenuCommand == DECOR_MENU_PLACE) ColorMenuItemString(gStringVar1, TRUE); else ColorMenuItemString(gStringVar1, FALSE); @@ -857,7 +892,7 @@ static void PrintDecorationItemMenuItems(u8 taskId) sDecorationItemsMenu->items[i].name = sDecorationItemsMenu->names[i]; sDecorationItemsMenu->items[i].id = -2; gMultiuseListMenuTemplate = sDecorationItemsListMenuTemplate; - gMultiuseListMenuTemplate.windowId = sDecorMenuWindowIds[1]; + gMultiuseListMenuTemplate.windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES]; gMultiuseListMenuTemplate.totalItems = sDecorationItemsMenu->numMenuItems; gMultiuseListMenuTemplate.items = sDecorationItemsMenu->items; gMultiuseListMenuTemplate.maxShowed = sDecorationItemsMenu->maxShownItems; @@ -877,18 +912,14 @@ static void DecorationItemsMenu_OnCursorMove(s32 itemIndex, bool8 flag, struct L PrintDecorationItemDescription(itemIndex); } -void sub_81274A0(u8 a0, s32 a1, u8 a2) +static void DecorationItemsMenu_PrintDecorationInUse(u8 windowId, s32 itemIndex, u8 y) { - if (a1 != -2) + if (itemIndex != -2) { - if (sub_81277BC(a1 + 1) == TRUE) - { - blit_move_info_icon(a0, 0x18, 0x5c, a2 + 2); - } - else if (sub_81277E8(a1 + 1) == TRUE) - { - blit_move_info_icon(a0, 0x19, 0x5c, a2 + 2); - } + if (IsDecorationIndexInSecretBase(itemIndex + 1) == TRUE) + blit_move_info_icon(windowId, 0x18, 0x5c, y + 2); + else if (IsDecorationIndexInPlayersRoom(itemIndex + 1) == TRUE) + blit_move_info_icon(windowId, 0x19, 0x5c, y + 2); } } @@ -917,24 +948,24 @@ static void RemoveDecorationItemsScrollIndicators(void) } } -void sub_8127580(u8 taskId) +static void AddDecorationItemsWindow(u8 taskId) { - AddDecorationWindow(1); + AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); InitDecorationItemsWindow(taskId); } static void InitDecorationItemsWindow(u8 taskId) { s16 *data = gTasks[taskId].data; - AddDecorationWindow(3); + AddDecorationWindow(WINDOW_DECORATION_CATEGORY_ITEMS); ShowDecorationCategorySummaryWindow(sCurDecorationCategory); sDecorationItemsMenu = AllocZeroed(sizeof(*sDecorationItemsMenu)); sDecorationItemsMenu->scrollIndicatorsTaskId = 0xFF; InitDecorationItemsMenuLimits(); - sub_81272C8(); - sub_81272F8(); + InitDecorationItemsMenuScrollAndCursor(); + InitDecorationItemsMenuScrollAndCursor2(); PrintDecorationItemMenuItems(taskId); - data[13] = ListMenuInit(&gMultiuseListMenuTemplate, sDecorationsScrollOffset, sDecorationsCursorPos); + tMenuTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sDecorationsScrollOffset, sDecorationsCursorPos); AddDecorationItemsScrollIndicators(); } @@ -952,25 +983,25 @@ static void HandleDecorationItemsMenuInput(u8 taskId) data = gTasks[taskId].data; if (!gPaletteFade.active) { - input = ListMenu_ProcessInput(data[13]); - ListMenuGetScrollAndRow(data[13], &sDecorationsScrollOffset, &sDecorationsCursorPos); + input = ListMenu_ProcessInput(tMenuTaskId); + ListMenuGetScrollAndRow(tMenuTaskId, &sDecorationsScrollOffset, &sDecorationsCursorPos); switch (input) { case LIST_NOTHING_CHOSEN: break; case LIST_CANCEL: PlaySE(SE_SELECT); - sSecretBasePC_SelectedDecorationActions[data[11]][1](taskId); + sSecretBasePC_SelectedDecorationActions[tDecorationMenuCommand][1](taskId); break; default: PlaySE(SE_SELECT); gCurDecorationIndex = input; RemoveDecorationItemsScrollIndicators(); - DestroyListMenuTask(data[13], &sDecorationsScrollOffset, &sDecorationsCursorPos); - RemoveDecorationWindow(1); + DestroyListMenuTask(tMenuTaskId, &sDecorationsScrollOffset, &sDecorationsCursorPos); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORIES); RemoveDecorationItemsOtherWindows(); free(sDecorationItemsMenu); - sSecretBasePC_SelectedDecorationActions[data[11]][0](taskId); + sSecretBasePC_SelectedDecorationActions[tDecorationMenuCommand][0](taskId); break; } } @@ -978,17 +1009,17 @@ static void HandleDecorationItemsMenuInput(u8 taskId) static void ShowDecorationCategorySummaryWindow(u8 category) { - PrintDecorationCategoryMenuItem(AddDecorationWindow(2), category, 0, 0, 0, 0); + PrintDecorationCategoryMenuItem(AddDecorationWindow(WINDOW_DECORATION_CATEGORY_SUMMARY), category, 0, 0, 0, 0); } -static void PrintDecorationItemDescription(u32 itemIndex) +static void PrintDecorationItemDescription(s32 itemIndex) { u8 windowId; const u8 *str; - windowId = sDecorMenuWindowIds[3]; + windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORY_ITEMS]; FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - if (itemIndex >= sNumOwnedDecorationsInCurCategory) + if ((u32)itemIndex >= sNumOwnedDecorationsInCurCategory) str = gText_GoBackPrevMenu; else str = gDecorations[gCurDecorationItems[itemIndex]].description; @@ -998,12 +1029,11 @@ static void PrintDecorationItemDescription(u32 itemIndex) static void RemoveDecorationItemsOtherWindows(void) { - // Remove description and category summary windows - RemoveDecorationWindow(3); - RemoveDecorationWindow(2); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORY_ITEMS); + RemoveDecorationWindow(WINDOW_DECORATION_CATEGORY_SUMMARY); } -bool8 sub_81277BC(u8 idx) +static bool8 IsDecorationIndexInSecretBase(u8 idx) { u8 i; for (i = 0; i < ARRAY_COUNT(sSecretBaseItemsIndicesBuffer); i++) @@ -1015,7 +1045,7 @@ bool8 sub_81277BC(u8 idx) return FALSE; } -bool8 sub_81277E8(u8 idx) +static bool8 IsDecorationIndexInPlayersRoom(u8 idx) { u8 i; for (i = 0; i < ARRAY_COUNT(sPlayerRoomItemsIndicesBuffer); i++) @@ -1061,11 +1091,11 @@ static void IdentifyOwnedDecorationsCurrentlyInUseInternal(u8 taskId) count = 0; for (i = 0; i < ARRAY_COUNT(sPlayerRoomItemsIndicesBuffer); i++) { - if (gSaveBlock1Ptr->playerRoomDecor[i] != DECOR_NONE) + if (gSaveBlock1Ptr->playerRoomDecorations[i] != DECOR_NONE) { for (j = 0; j < gDecorationInventories[sCurDecorationCategory].size; j++) { - if (gCurDecorationItems[j] == gSaveBlock1Ptr->playerRoomDecor[i] && sub_81277BC(j + 1) != TRUE) + if (gCurDecorationItems[j] == gSaveBlock1Ptr->playerRoomDecorations[i] && IsDecorationIndexInSecretBase(j + 1) != TRUE) { for (k = 0; k < count && sPlayerRoomItemsIndicesBuffer[k] != j + 1; k++); if (k == count) @@ -1103,49 +1133,49 @@ bool8 IsSelectedDecorInThePC(void) return TRUE; } -static void sub_8127A14(u8 taskId) +static void Task_ShowDecorationItemsWindow(u8 taskId) { - AddDecorationWindow(1); + AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); ShowDecorationItemsWindow(taskId); } -void sub_8127A30(u8 taskId) +static void DontTossDecoration(u8 taskId) { ClearDialogWindowAndFrame(0, 0); - gTasks[taskId].func = sub_8127A14; + gTasks[taskId].func = Task_ShowDecorationItemsWindow; } -void sub_8127A5C(u8 taskId) +static void ReturnToDecorationItemsAfterInvalidSelection(u8 taskId) { if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { ClearDialogWindowAndFrame(0, 0); - AddDecorationWindow(1); + AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); ShowDecorationItemsWindow(taskId); } } -void sub_8127A8C(u8 taskId) +static void DecorationItemsMenuAction_Cancel(u8 taskId) { s16 *data = gTasks[taskId].data; RemoveDecorationItemsScrollIndicators(); RemoveDecorationItemsOtherWindows(); - DestroyListMenuTask(data[13], NULL, NULL); + DestroyListMenuTask(tMenuTaskId, NULL, NULL); free(sDecorationItemsMenu); - sub_8126E44(taskId); + ReinitDecorationCategoriesWindow(taskId); } -void sub_8127ACC(u8 taskId) +static void SetInitialPositions(u8 taskId) { - gTasks[taskId].data[3] = gSaveBlock1Ptr->pos.x; - gTasks[taskId].data[4] = gSaveBlock1Ptr->pos.y; - PlayerGetDestCoords(&gTasks[taskId].data[0], &gTasks[taskId].data[1]); + gTasks[taskId].tInitialX = gSaveBlock1Ptr->pos.x; + gTasks[taskId].tInitialY = gSaveBlock1Ptr->pos.y; + PlayerGetDestCoords(&gTasks[taskId].tCursorX, &gTasks[taskId].tCursorY); } -void sub_8127B04(u8 taskId) +static void WarpToInitialPosition(u8 taskId) { DrawWholeMapView(); - SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, gTasks[taskId].data[3], gTasks[taskId].data[4]); + SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, gTasks[taskId].tInitialX, gTasks[taskId].tInitialY); WarpIntoMap(); } @@ -1155,10 +1185,10 @@ static u16 GetDecorationElevation(u8 decoration, u8 tileIndex) switch (decoration) { case DECOR_STAND: - elevation = sDecorationStandElevations[tileIndex] << 12; + elevation = sDecorationStandElevations[tileIndex] << METATILE_ELEVATION_SHIFT; return elevation; case DECOR_SLIDE: - elevation = sDecorationSlideElevation[tileIndex] << 12; + elevation = sDecorationSlideElevation[tileIndex] << METATILE_ELEVATION_SHIFT; return elevation; default: return elevation; @@ -1171,7 +1201,7 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, s16 x, y; u16 behavior; u16 impassableFlag; - u16 posterSide; + u16 overlapsWall; u16 elevation; for (j = 0; j < decHeight; j++) @@ -1181,21 +1211,22 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, { x = mapX + i; behavior = GetBehaviorByMetatileId(0x200 + gDecorations[decoration].tiles[j * decWidth + i]); - if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (behavior >> 12))) + if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (behavior >> METATILE_ELEVATION_SHIFT))) impassableFlag = METATILE_COLLISION_MASK; else impassableFlag = 0; + // Choose the metatile that has the wall background instead of the floor if overlapping a wall. if (gDecorations[decoration].permission != DECORPERM_NA_WALL && MetatileBehavior_IsSecretBaseNorthWall(MapGridGetMetatileBehaviorAt(x, y)) == TRUE) - posterSide = 1; + overlapsWall = 1; else - posterSide = 0; + overlapsWall = 0; elevation = GetDecorationElevation(gDecorations[decoration].id, j * decWidth + i); if (elevation != 0xFFFF) - MapGridSetMetatileEntryAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | posterSide)) | impassableFlag | elevation); + MapGridSetMetatileEntryAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | overlapsWall)) | impassableFlag | elevation); else - MapGridSetMetatileIdAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | posterSide)) | impassableFlag); + MapGridSetMetatileIdAt(x, y, (gDecorations[decoration].tiles[j * decWidth + i] + (0x200 | overlapsWall)) | impassableFlag); } } } @@ -1268,100 +1299,98 @@ void SetDecoration(void) } } -bool8 sub_8127F38(void) +static bool8 HasDecorationSpace(void) { u16 i; - - for (i = 0; i < gDecorationContext.size; i++) + for (i = 0; i < sDecorationContext.size; i++) { - if (gDecorationContext.items[i] == DECOR_NONE) - { + if (sDecorationContext.items[i] == DECOR_NONE) return TRUE; - } } + return FALSE; } -void sub_8127F68(u8 taskId) +static void DecorationItemsMenuAction_AttemptPlace(u8 taskId) { - if (gDecorationContext.isPlayerRoom == TRUE && sCurDecorationCategory != DECORCAT_DOLL && sCurDecorationCategory != DECORCAT_CUSHION) + if (sDecorationContext.isPlayerRoom == TRUE && sCurDecorationCategory != DECORCAT_DOLL && sCurDecorationCategory != DECORCAT_CUSHION) { StringExpandPlaceholders(gStringVar4, gText_CantPlaceInRoom); - DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C); + DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationItemsAfterInvalidSelection); } else if (IsSelectedDecorInThePC() == TRUE) { - if (sub_8127F38() == TRUE) + if (HasDecorationSpace() == TRUE) { FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].data[2] = 0; - gTasks[taskId].func = sub_8128060; + gTasks[taskId].tState = 0; + gTasks[taskId].func = Task_PlaceDecoration; } else { - ConvertIntToDecimalStringN(gStringVar1, gDecorationContext.size, STR_CONV_MODE_RIGHT_ALIGN, 2); - if (gDecorationContext.isPlayerRoom == FALSE) { + ConvertIntToDecimalStringN(gStringVar1, sDecorationContext.size, STR_CONV_MODE_RIGHT_ALIGN, 2); + if (sDecorationContext.isPlayerRoom == FALSE) { StringExpandPlaceholders(gStringVar4, gText_NoMoreDecorations); } else { StringExpandPlaceholders(gStringVar4, gText_NoMoreDecorations2); } - DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C); + DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationItemsAfterInvalidSelection); } } else { StringExpandPlaceholders(gStringVar4, gText_InUseAlready); - DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C); + DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationItemsAfterInvalidSelection); } } -void sub_8128060(u8 taskId) +static void Task_PlaceDecoration(u8 taskId) { - switch (gTasks[taskId].data[2]) + switch (gTasks[taskId].tState) { case 0: if (!gPaletteFade.active) { - sub_8127ACC(taskId); - gTasks[taskId].data[2] = 1; + SetInitialPositions(taskId); + gTasks[taskId].tState = 1; } break; case 1: gPaletteFade.bufferTransferDisabled = TRUE; ConfigureCameraObjectForPlacingDecoration(&sPlaceDecorationGraphicsDataBuffer, gCurDecorationItems[gCurDecorationIndex]); - sub_812826C(taskId); + SetUpDecorationShape(taskId); SetUpPlacingDecorationPlayerAvatar(taskId, &sPlaceDecorationGraphicsDataBuffer); FadeInFromBlack(); gPaletteFade.bufferTransferDisabled = FALSE; - gTasks[taskId].data[2] = 2; + gTasks[taskId].tState = 2; break; case 2: if (IsWeatherNotFadingIn() == TRUE) { - gTasks[taskId].data[12] = 0; + gTasks[taskId].tDecorationItemsMenuCommand = DECOR_ITEMS_MENU_PLACE; ContinueDecorating(taskId); } break; } } -void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor) +static void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor) { sDecor_CameraSpriteObjectIdx1 = gSprites[gFieldCamera.spriteId].data[0]; gFieldCamera.spriteId = gpu_pal_decompress_alloc_tag_and_upload(data, decor); gSprites[gFieldCamera.spriteId].oam.priority = 1; - gSprites[gFieldCamera.spriteId].callback = sub_81292D0; + gSprites[gFieldCamera.spriteId].callback = InitializePuttingAwayCursorSprite; gSprites[gFieldCamera.spriteId].pos1.x = sDecorationMovementInfo[data->decoration->shape].cameraX; gSprites[gFieldCamera.spriteId].pos1.y = sDecorationMovementInfo[data->decoration->shape].cameraY; } -void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphicsDataBuffer *data) +static void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphicsDataBuffer *data) { u8 x; - x = 16 * (u8)gTasks[taskId].data[5] + sDecorationMovementInfo[data->decoration->shape].cameraX - 8 * ((u8)gTasks[taskId].data[5] - 1); + x = 16 * (u8)gTasks[taskId].tDecorWidth + sDecorationMovementInfo[data->decoration->shape].cameraX - 8 * ((u8)gTasks[taskId].tDecorWidth - 1); if (data->decoration->shape == DECORSHAPE_3x1 || data->decoration->shape == DECORSHAPE_3x3 || data->decoration->shape == DECORSHAPE_3x2) x -= 8; @@ -1375,92 +1404,89 @@ void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphic sDecor_CameraSpriteObjectIdx1 = gFieldCamera.spriteId; } -void sub_812826C(u8 taskId) +static void SetUpDecorationShape(u8 taskId) { switch (gDecorations[gCurDecorationItems[gCurDecorationIndex]].shape) { case DECORSHAPE_1x1: - gTasks[taskId].data[5] = 1; - gTasks[taskId].data[6] = 1; + gTasks[taskId].tDecorWidth = 1; + gTasks[taskId].tDecorHeight = 1; break; case DECORSHAPE_2x1: - gTasks[taskId].data[5] = 2; - gTasks[taskId].data[6] = 1; + gTasks[taskId].tDecorWidth = 2; + gTasks[taskId].tDecorHeight = 1; break; case DECORSHAPE_3x1: - gTasks[taskId].data[5] = 3; - gTasks[taskId].data[6] = 1; + gTasks[taskId].tDecorWidth = 3; + gTasks[taskId].tDecorHeight = 1; break; case DECORSHAPE_4x2: - gTasks[taskId].data[5] = 4; - gTasks[taskId].data[6] = 2; + gTasks[taskId].tDecorWidth = 4; + gTasks[taskId].tDecorHeight = 2; break; case DECORSHAPE_2x2: - gTasks[taskId].data[5] = 2; - gTasks[taskId].data[6] = 2; + gTasks[taskId].tDecorWidth = 2; + gTasks[taskId].tDecorHeight = 2; break; case DECORSHAPE_1x2: - gTasks[taskId].data[5] = 1; - gTasks[taskId].data[6] = 2; + gTasks[taskId].tDecorWidth = 1; + gTasks[taskId].tDecorHeight = 2; break; case DECORSHAPE_1x3: - gTasks[taskId].data[5] = 1; - gTasks[taskId].data[6] = 3; - gTasks[taskId].data[1]++; + gTasks[taskId].tDecorWidth = 1; + gTasks[taskId].tDecorHeight = 3; + gTasks[taskId].tCursorY++; break; case DECORSHAPE_2x4: - gTasks[taskId].data[5] = 2; - gTasks[taskId].data[6] = 4; + gTasks[taskId].tDecorWidth = 2; + gTasks[taskId].tDecorHeight = 4; break; case DECORSHAPE_3x3: - gTasks[taskId].data[5] = 3; - gTasks[taskId].data[6] = 3; + gTasks[taskId].tDecorWidth = 3; + gTasks[taskId].tDecorHeight = 3; break; case DECORSHAPE_3x2: - gTasks[taskId].data[5] = 3; - gTasks[taskId].data[6] = 2; + gTasks[taskId].tDecorWidth = 3; + gTasks[taskId].tDecorHeight = 2; break; } } -void sub_81283BC(u8 taskId) +static void AttemptPlaceDecoration(u8 taskId) { - gTasks[taskId].data[10] = 0; + gTasks[taskId].tButton = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 1; gSprites[sDecor_CameraSpriteObjectIdx2].data[7] = 1; - sub_8128DE0(); - AttemptPlaceDecoration(taskId); + ResetCursorMovement(); + AttemptPlaceDecoration_(taskId); } -void sub_8128414(u8 taskId) +static void AttemptCancelPlaceDecoration(u8 taskId) { - gTasks[taskId].data[10] = 0; + gTasks[taskId].tButton = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 1; gSprites[sDecor_CameraSpriteObjectIdx2].data[7] = 1; - sub_8128DE0(); + ResetCursorMovement(); StringExpandPlaceholders(gStringVar4, gText_CancelDecorating); DisplayItemMessageOnField(taskId, gStringVar4, CancelDecoratingPrompt); } -bool8 sub_8128484(u8 behaviorAt, u16 behaviorBy) +// Note: behaviorBy is pre-anded with METATILE_ELEVATION_MASK. +static bool8 IsNonBlockNonElevated(u8 behaviorAt, u16 behaviorBy) { if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE || behaviorBy != 0) - { return FALSE; - } return TRUE; } -bool8 sub_81284AC(u8 taskId, s16 x, s16 y, u16 decor) +static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 behaviorBy) { - if (x == gTasks[taskId].data[3] + 7 && y == gTasks[taskId].data[4] + 7 && decor != DECOR_NONE) - { + if (x == gTasks[taskId].tInitialX + 7 && y == gTasks[taskId].tInitialY + 7 && behaviorBy != 0) return FALSE; - } return TRUE; } -bool8 sub_81284F4(u16 behaviorAt, const struct Decoration *decoration) +static bool8 IsFloorOrBoardAndHole(u16 behaviorAt, const struct Decoration *decoration) { if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE) { @@ -1474,7 +1500,7 @@ bool8 sub_81284F4(u16 behaviorAt, const struct Decoration *decoration) return FALSE; } -bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) +static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) { u8 i; u8 j; @@ -1484,8 +1510,8 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) u8 mapX; s16 curY; s16 curX; - mapY = gTasks[taskId].data[6]; - mapX = gTasks[taskId].data[5]; + mapY = gTasks[taskId].tDecorHeight; + mapX = gTasks[taskId].tDecorWidth; switch (decoration->permission) { @@ -1493,16 +1519,16 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) case DECORPERM_PASS_FLOOR: for (i = 0; i < mapY; i++) { - curY = gTasks[taskId].data[1] - i; + curY = gTasks[taskId].tCursorY - i; for (j = 0; j < mapX; j++) { - curX = gTasks[taskId].data[0] + j; + curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK; - if (!sub_81284F4(behaviorAt, decoration)) + if (!IsFloorOrBoardAndHole(behaviorAt, decoration)) return FALSE; - if (!sub_81284AC(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); @@ -1514,16 +1540,16 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) case DECORPERM_BEHIND_FLOOR: for (i = 0; i < mapY - 1; i++) { - curY = gTasks[taskId].data[1] - i; + curY = gTasks[taskId].tCursorY - i; for (j = 0; j < mapX; j++) { - curX = gTasks[taskId].data[0] + j; + curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK; - if (!MetatileBehavior_IsNormal(behaviorAt) && !sub_8128484(behaviorAt, behaviorBy)) + if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, behaviorBy)) return FALSE; - if (!sub_81284AC(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) return FALSE; if (GetObjectEventIdByXYZ(curX, curY, 0) != 16) @@ -1531,16 +1557,16 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) } } - curY = gTasks[taskId].data[1] - mapY + 1; + curY = gTasks[taskId].tCursorY - mapY + 1; for (j = 0; j < mapX; j++) { - curX = gTasks[taskId].data[0] + j; + curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); behaviorBy = GetBehaviorByMetatileId(0x200 + decoration->tiles[j]) & METATILE_ELEVATION_MASK; if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsSecretBaseNorthWall(behaviorAt)) return FALSE; - if (!sub_81284AC(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); @@ -1551,23 +1577,23 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) case DECORPERM_NA_WALL: for (i = 0; i < mapY; i++) { - curY = gTasks[taskId].data[1] - i; + curY = gTasks[taskId].tCursorY - i; for (j = 0; j < mapX; j++) { - curX = gTasks[taskId].data[0] + j; + curX = gTasks[taskId].tCursorX + j; if (!MetatileBehavior_IsSecretBaseNorthWall(MapGridGetMetatileBehaviorAt(curX, curY))) return FALSE; - if (MapGridGetMetatileIdAt(curX, curY + 1) == 0x28c) + if (MapGridGetMetatileIdAt(curX, curY + 1) == METATILE_SecretBase_SandOrnament_BrokenBase) return FALSE; } } break; case DECORPERM_SPRITE: - curY = gTasks[taskId].data[1]; + curY = gTasks[taskId].tCursorY; for (j = 0; j < mapX; j++) { - curX = gTasks[taskId].data[0] + j; + curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); if (decoration->shape == DECORSHAPE_1x2) { @@ -1588,7 +1614,7 @@ bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) return TRUE; } -void AttemptPlaceDecoration(u8 taskId) +static void AttemptPlaceDecoration_(u8 taskId) { if (CanPlaceDecoration(taskId, &gDecorations[gCurDecorationItems[gCurDecorationIndex]]) == TRUE) { @@ -1603,24 +1629,24 @@ void AttemptPlaceDecoration(u8 taskId) } } -void PlaceDecorationPrompt(u8 taskId) +static void PlaceDecorationPrompt(u8 taskId) { DisplayYesNoMenuDefaultYes(); DoYesNoFuncWithChoice(taskId, &sPlaceDecorationYesNoFunctions); } -void PlaceDecoration(u8 taskId) +static void PlaceDecoration(u8 taskId) { ClearDialogWindowAndFrame(0, 0); - sub_8128AAC(taskId); + PlaceDecoration_(taskId); if (gDecorations[gCurDecorationItems[gCurDecorationIndex]].permission != DECORPERM_SPRITE) { - ShowDecorationOnMap(gTasks[taskId].data[0], gTasks[taskId].data[1], gCurDecorationItems[gCurDecorationIndex]); + ShowDecorationOnMap(gTasks[taskId].tCursorX, gTasks[taskId].tCursorY, gCurDecorationItems[gCurDecorationIndex]); } else { - sCurDecorMapX = gTasks[taskId].data[0] - 7; - sCurDecorMapY = gTasks[taskId].data[1] - 7; + sCurDecorMapX = gTasks[taskId].tCursorX - 7; + sCurDecorMapY = gTasks[taskId].tCursorY - 7; ScriptContext1_SetupScript(SecretBase_EventScript_SetDecoration); } @@ -1628,28 +1654,28 @@ void PlaceDecoration(u8 taskId) if (gMapHeader.regionMapSectionId == MAPSEC_SECRET_BASE) TV_PutSecretBaseVisitOnTheAir(); - sub_8128BBC(taskId); + CancelDecorating_(taskId); } -void sub_8128AAC(u8 taskId) +static void PlaceDecoration_(u8 taskId) { u16 i; - for (i = 0; i < gDecorationContext.size; i++) + for (i = 0; i < sDecorationContext.size; i++) { - if (gDecorationContext.items[i] == DECOR_NONE) + if (sDecorationContext.items[i] == DECOR_NONE) { - gDecorationContext.items[i] = gCurDecorationItems[gCurDecorationIndex]; - gDecorationContext.pos[i] = ((gTasks[taskId].data[0] - 7) << 4) + (gTasks[taskId].data[1] - 7); + sDecorationContext.items[i] = gCurDecorationItems[gCurDecorationIndex]; + sDecorationContext.pos[i] = ((gTasks[taskId].tCursorX - 7) << 4) + (gTasks[taskId].tCursorY - 7); break; } } - if (!gDecorationContext.isPlayerRoom) + if (!sDecorationContext.isPlayerRoom) { for (i = 0; i < DECOR_MAX_SECRET_BASE; i++) { - if (sSecretBaseItemsIndicesBuffer[i] == 0) + if (sSecretBaseItemsIndicesBuffer[i] == DECOR_NONE) { sSecretBaseItemsIndicesBuffer[i] = gCurDecorationIndex + 1; break; @@ -1660,7 +1686,7 @@ void sub_8128AAC(u8 taskId) { for (i = 0; i < DECOR_MAX_PLAYERS_HOUSE; i++) { - if (sPlayerRoomItemsIndicesBuffer[i] == 0) + if (sPlayerRoomItemsIndicesBuffer[i] == DECOR_NONE) { sPlayerRoomItemsIndicesBuffer[i] = gCurDecorationIndex + 1; break; @@ -1669,63 +1695,63 @@ void sub_8128AAC(u8 taskId) } } -void CancelDecoratingPrompt(u8 taskId) +static void CancelDecoratingPrompt(u8 taskId) { DisplayYesNoMenuDefaultYes(); DoYesNoFuncWithChoice(taskId, &sCancelDecoratingYesNoFunctions); } -void CancelDecorating(u8 taskId) +static void CancelDecorating(u8 taskId) { ClearDialogWindowAndFrame(0, 0); - sub_8128BBC(taskId); + CancelDecorating_(taskId); } -void sub_8128BBC(u8 taskId) +static void CancelDecorating_(u8 taskId) { FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].data[2] = 0; + gTasks[taskId].tState = 0; gTasks[taskId].func = c1_overworld_prev_quest; } -void c1_overworld_prev_quest(u8 taskId) +static void c1_overworld_prev_quest(u8 taskId) { - switch (gTasks[taskId].data[2]) + switch (gTasks[taskId].tState) { case 0: ScriptContext2_Enable(); if (!gPaletteFade.active) { - sub_8127B04(taskId); - gTasks[taskId].data[2] = 1; + WarpToInitialPosition(taskId); + gTasks[taskId].tState = 1; } break; case 1: - sub_812A3C8(); + FreePlayerSpritePalette(); FreeSpritePaletteByTag(PLACE_DECORATION_SELECTOR_TAG); - gFieldCallback = sub_8128CD4; + gFieldCallback = FieldCB_InitDecorationItemsWindow; SetMainCallback2(CB2_ReturnToField); DestroyTask(taskId); break; } } -void sub_8128C64(u8 taskId) +static void Task_InitDecorationItemsWindow(u8 taskId) { s16 *data = gTasks[taskId].data; - switch (data[2]) + switch (tState) { case 0: HideSecretBaseDecorationSprites(); - data[2]++; + tState++; break; case 1: ScriptContext1_SetupScript(SecretBase_EventScript_InitDecorations); - data[2]++; + tState++; break; case 2: ScriptContext2_Enable(); - data[2]++; + tState++; break; case 3: if (IsWeatherNotFadingIn() == TRUE) @@ -1734,48 +1760,48 @@ void sub_8128C64(u8 taskId) } } -void sub_8128CD4(void) +static void FieldCB_InitDecorationItemsWindow(void) { u8 taskId; ScriptContext2_Enable(); FadeInFromBlack(); - taskId = CreateTask(sub_8128C64, 8); - sub_8127580(taskId); - gTasks[taskId].data[2] = 0; + taskId = CreateTask(Task_InitDecorationItemsWindow, 8); + AddDecorationItemsWindow(taskId); + gTasks[taskId].tState = 0; } -bool8 sub_8128D10(u8 taskId) +static bool8 ApplyCursorMovement_IsInvalid(u8 taskId) { s16 *data = gTasks[taskId].data; - if (sDecorationLastDirectionMoved == DIR_SOUTH && data[1] - data[6] - 6 < 0) + if (sDecorationLastDirectionMoved == DIR_SOUTH && tCursorY - tDecorHeight - 6 < 0) { - data[1]++; + tCursorY++; return FALSE; } - if (sDecorationLastDirectionMoved == DIR_NORTH && data[1] - 7 >= gMapHeader.mapLayout->height) + if (sDecorationLastDirectionMoved == DIR_NORTH && tCursorY - 7 >= gMapHeader.mapLayout->height) { - data[1]--; + tCursorY--; return FALSE; } - if (sDecorationLastDirectionMoved == DIR_WEST && data[0] - 7 < 0) + if (sDecorationLastDirectionMoved == DIR_WEST && tCursorX - 7 < 0) { - data[0]++; + tCursorX++; return FALSE; } - if (sDecorationLastDirectionMoved == DIR_EAST && data[0] + data[5] - 8 >= gMapHeader.mapLayout->width) + if (sDecorationLastDirectionMoved == DIR_EAST && tCursorX + tDecorWidth - 8 >= gMapHeader.mapLayout->width) { - data[0]--; + tCursorX--; return FALSE; } return TRUE; } -bool8 sub_8128DB4(void) +static bool8 IsHoldingDirection(void) { u16 heldKeys = gMain.heldKeys & DPAD_ANY; if (heldKeys != DPAD_UP && heldKeys != DPAD_DOWN && heldKeys != DPAD_LEFT && heldKeys != DPAD_RIGHT) @@ -1784,26 +1810,26 @@ bool8 sub_8128DB4(void) return TRUE; } -void sub_8128DE0(void) +static void ResetCursorMovement(void) { sDecorationLastDirectionMoved = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0; } -void sub_8128E18(u8 taskId) +static void Task_SelectLocation(u8 taskId) { s16 *data = gTasks[taskId].data; if (!gSprites[sDecor_CameraSpriteObjectIdx1].data[4]) { - if (data[10] == 1) + if (tButton == A_BUTTON) { - gUnknown_085A72D4[data[12]].yesFunc(taskId); + sPlacePutAwayYesNoFunctions[tDecorationItemsMenuCommand].yesFunc(taskId); return; } - else if (data[10] == 2) + else if (tButton == B_BUTTON) { - gUnknown_085A72D4[data[12]].noFunc(taskId); + sPlacePutAwayYesNoFunctions[tDecorationItemsMenuCommand].noFunc(taskId); return; } @@ -1812,7 +1838,7 @@ void sub_8128E18(u8 taskId) sDecorationLastDirectionMoved = DIR_SOUTH; gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = -2; - data[1]--; + tCursorY--; } if ((gMain.heldKeys & DPAD_ANY) == DPAD_DOWN) @@ -1820,7 +1846,7 @@ void sub_8128E18(u8 taskId) sDecorationLastDirectionMoved = DIR_NORTH; gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 2; - data[1]++; + tCursorY++; } if ((gMain.heldKeys & DPAD_ANY) == DPAD_LEFT) @@ -1828,7 +1854,7 @@ void sub_8128E18(u8 taskId) sDecorationLastDirectionMoved = DIR_WEST; gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = -2; gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0; - data[0]--; + tCursorX--; } if ((gMain.heldKeys & DPAD_ANY) == DPAD_RIGHT) @@ -1836,11 +1862,11 @@ void sub_8128E18(u8 taskId) sDecorationLastDirectionMoved = DIR_EAST; gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 2; gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0; - data[0]++; + tCursorX++; } - if (!sub_8128DB4() || !sub_8128D10(taskId)) - sub_8128DE0(); + if (!IsHoldingDirection() || !ApplyCursorMovement_IsInvalid(taskId)) + ResetCursorMovement(); } if (sDecorationLastDirectionMoved) @@ -1849,43 +1875,43 @@ void sub_8128E18(u8 taskId) gSprites[sDecor_CameraSpriteObjectIdx1].data[4] &= 7; } - if (!data[10]) + if (!tButton) { if (gMain.newKeys & A_BUTTON) - data[10] = A_BUTTON; + tButton = A_BUTTON; if (gMain.newKeys & B_BUTTON) - data[10] = B_BUTTON; + tButton = B_BUTTON; } } -void ContinueDecorating(u8 taskId) +static void ContinueDecorating(u8 taskId) { ClearDialogWindowAndFrame(0, 1); gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0; - gTasks[taskId].data[10] = 0; - gTasks[taskId].func = sub_8128E18; + gTasks[taskId].tButton = 0; + gTasks[taskId].func = Task_SelectLocation; } -void CantPlaceDecorationPrompt(u8 taskId) +static void CantPlaceDecorationPrompt(u8 taskId) { if (gMain.newKeys & A_BUTTON || gMain.newKeys & B_BUTTON) ContinueDecorating(taskId); } -void sub_8129048(struct PlaceDecorationGraphicsDataBuffer *data) +static void ClearPlaceDecorationGraphicsDataBuffer(struct PlaceDecorationGraphicsDataBuffer *data) { CpuFill16(0, data, sizeof(*data)); } -void sub_8129068(u16 *dest, u16 pal) +static void CopyPalette(u16 *dest, u16 pal) { - CpuFastCopy(&((u16 *)gTilesetPointer_SecretBase->palettes)[pal << 4], dest, 32); + CpuFastCopy(&((u16 *)gTilesetPointer_SecretBase->palettes)[pal * 16], dest, sizeof(u16) * 16); } -void sub_8129088(u8 *dest, u16 tile) +static void CopyTile(u8 *dest, u16 tile) { - u8 buffer[32]; + u8 buffer[TILE_SIZE_4BPP]; u16 mode; u16 i; @@ -1893,13 +1919,13 @@ void sub_8129088(u8 *dest, u16 tile) if (tile != 0) tile &= 0x03FF; - CpuFastCopy(&((u8 *)gTilesetPointer_SecretBase->tiles)[tile << 5], buffer, 32); + CpuFastCopy(&((u8 *)gTilesetPointer_SecretBase->tiles)[tile * TILE_SIZE_4BPP], buffer, TILE_SIZE_4BPP); switch (mode) { case 0: - CpuFastCopy(buffer, dest, 32); + CpuFastCopy(buffer, dest, TILE_SIZE_4BPP); break; - case 1: + case BG_TILE_H_FLIP(0) >> 10: for (i = 0; i < 8; i++) { dest[4 * i] = (buffer[4 * (i + 1) - 1] >> 4) + ((buffer[4 * (i + 1) - 1] & 0x0F) << 4); @@ -1908,7 +1934,7 @@ void sub_8129088(u8 *dest, u16 tile) dest[4 * i + 3] = (buffer[4 * (i + 1) - 4] >> 4) + ((buffer[4 * (i + 1) - 4] & 0x0F) << 4); } break; - case 2: + case BG_TILE_V_FLIP(0) >> 10: for (i = 0; i < 8; i++) { dest[4 * i] = buffer[4 * (7 - i)]; @@ -1917,7 +1943,7 @@ void sub_8129088(u8 *dest, u16 tile) dest[4 * i + 3] = buffer[4 * (7 - i) + 3]; } break; - case 3: + case BG_TILE_H_FLIP(BG_TILE_V_FLIP(0)) >> 10: for (i = 0; i < 32; i++) { dest[i] = (buffer[31 - i] >> 4) + ((buffer[31 - i] & 0x0F) << 4); @@ -1926,19 +1952,19 @@ void sub_8129088(u8 *dest, u16 tile) } } -void sub_81291A4(struct PlaceDecorationGraphicsDataBuffer *data) +static void SetDecorSelectionBoxTiles(struct PlaceDecorationGraphicsDataBuffer *data) { u16 i; for (i = 0; i < 64; i++) - sub_8129088(&data->image[i * 32], data->tiles[i]); + CopyTile(&data->image[i * TILE_SIZE_4BPP], data->tiles[i]); } -u16 sub_81291CC(u16 tile) +static u16 GetMetatile(u16 tile) { return ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[tile] & 0xFFF; } -void sub_81291E8(struct PlaceDecorationGraphicsDataBuffer *data) +static void SetDecorSelectionMetatiles(struct PlaceDecorationGraphicsDataBuffer *data) { u8 i; u8 shape; @@ -1946,11 +1972,11 @@ void sub_81291E8(struct PlaceDecorationGraphicsDataBuffer *data) shape = data->decoration->shape; for (i = 0; i < gUnknown_085A71B0[shape].size; i++) { - data->tiles[gUnknown_085A71B0[shape].tiles[i]] = sub_81291CC(data->decoration->tiles[gUnknown_085A71B0[shape].y[i]] * 8 + gUnknown_085A71B0[shape].x[i]); + data->tiles[gUnknown_085A71B0[shape].tiles[i]] = GetMetatile(data->decoration->tiles[gUnknown_085A71B0[shape].y[i]] * 8 + gUnknown_085A71B0[shape].x[i]); } } -void SetDecorSelectionBoxOamAttributes(u8 decorShape) +static void SetDecorSelectionBoxOamAttributes(u8 decorShape) { sDecorSelectorOam.y = 0; sDecorSelectorOam.affineMode = ST_OAM_AFFINE_OFF; @@ -1966,7 +1992,7 @@ void SetDecorSelectionBoxOamAttributes(u8 decorShape) sDecorSelectorOam.paletteNum = 0; } -void sub_81292D0(struct Sprite *sprite) +static void InitializePuttingAwayCursorSprite(struct Sprite *sprite) { sprite->data[2] = 0; sprite->data[3] = 0; @@ -1974,10 +2000,10 @@ void sub_81292D0(struct Sprite *sprite) sprite->data[5] = 0; sprite->data[6] = 0; sprite->data[7] = 0; - sprite->callback = sub_81292E8; + sprite->callback = InitializePuttingAwayCursorSprite2; } -void sub_81292E8(struct Sprite *sprite) +static void InitializePuttingAwayCursorSprite2(struct Sprite *sprite) { if (sprite->data[7] == 0) { @@ -1995,23 +2021,23 @@ void sub_81292E8(struct Sprite *sprite) } } -u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor) +static u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor) { - sub_8129048(data); + ClearPlaceDecorationGraphicsDataBuffer(data); data->decoration = &gDecorations[decor]; if (data->decoration->permission == DECORPERM_SPRITE) return AddPseudoObjectEvent(data->decoration->tiles[0], SpriteCallbackDummy, 0, 0, 1); FreeSpritePaletteByTag(PLACE_DECORATION_SELECTOR_TAG); - sub_81291E8(data); + SetDecorSelectionMetatiles(data); SetDecorSelectionBoxOamAttributes(data->decoration->shape); - sub_81291A4(data); - sub_8129068(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * 8) + 7] >> 12); - LoadSpritePalette(&gUnknown_085A72BC); + SetDecorSelectionBoxTiles(data); + CopyPalette(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * 8) + 7] >> 12); + LoadSpritePalette(&sSpritePal_PlaceDecoration); return CreateSprite(&sDecorationSelectorSpriteTemplate, 0, 0, 0); } -u8 AddDecorationIconObjectFromIconTable(u16 tilesTag, u16 paletteTag, u8 decor) +static u8 AddDecorationIconObjectFromIconTable(u16 tilesTag, u16 paletteTag, u8 decor) { struct SpriteSheet sheet; struct CompressedSpritePalette palette; @@ -2040,7 +2066,7 @@ u8 AddDecorationIconObjectFromIconTable(u16 tilesTag, u16 paletteTag, u8 decor) return spriteId; } -const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode) +static const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode) { if (decor > NUM_DECORATIONS) decor = DECOR_NONE; @@ -2048,23 +2074,23 @@ const u32 *GetDecorationIconPicOrPalette(u16 decor, u8 mode) return gDecorIconTable[decor][mode]; } -u8 AddDecorationIconObjectFromObjectEvent(u16 tilesTag, u16 paletteTag, u8 decor) +static u8 AddDecorationIconObjectFromObjectEvent(u16 tilesTag, u16 paletteTag, u8 decor) { u8 spriteId; struct SpriteSheet sheet; struct SpritePalette palette; struct SpriteTemplate *template; - sub_8129048(&sPlaceDecorationGraphicsDataBuffer); + ClearPlaceDecorationGraphicsDataBuffer(&sPlaceDecorationGraphicsDataBuffer); sPlaceDecorationGraphicsDataBuffer.decoration = &gDecorations[decor]; if (sPlaceDecorationGraphicsDataBuffer.decoration->permission != DECORPERM_SPRITE) { - sub_81291E8(&sPlaceDecorationGraphicsDataBuffer); + SetDecorSelectionMetatiles(&sPlaceDecorationGraphicsDataBuffer); SetDecorSelectionBoxOamAttributes(sPlaceDecorationGraphicsDataBuffer.decoration->shape); - sub_81291A4(&sPlaceDecorationGraphicsDataBuffer); - sub_8129068(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * 8) + 7] >> 12); + SetDecorSelectionBoxTiles(&sPlaceDecorationGraphicsDataBuffer); + CopyPalette(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * 8) + 7] >> 12); sheet.data = sPlaceDecorationGraphicsDataBuffer.image; - sheet.size = gUnknown_085A72F4[sPlaceDecorationGraphicsDataBuffer.decoration->shape] << 5; + sheet.size = sDecorShapeSizes[sPlaceDecorationGraphicsDataBuffer.decoration->shape] * TILE_SIZE_4BPP; sheet.tag = tilesTag; LoadSpriteSheet(&sheet); palette.data = sPlaceDecorationGraphicsDataBuffer.palette; @@ -2123,26 +2149,33 @@ u8 AddDecorationIconObject(u8 decor, s16 x, s16 y, u8 priority, u16 tilesTag, u1 return spriteId; } -void sub_81296EC(u8 idx) +static void ClearDecorationContextIndex(u8 idx) { - gDecorationContext.items[idx] = 0; - gDecorationContext.pos[idx] = 0; + sDecorationContext.items[idx] = DECOR_NONE; + sDecorationContext.pos[idx] = 0; } -void sub_8129708(void) +// Input +// gSpecialVar_0x8004: Current iteration. +// +// Output +// gSpecialVar_Result: TRUE if all iterations complete. +// gSpecialVar_0x8005: flagId of decoration (if any). +// gSpecialVar_0x8006: localId of decoration object event (if any). +void PutAwayDecorationIteration(void) { u16 i; gSpecialVar_0x8005 = 0; - gSpecialVar_Result = 0; + gSpecialVar_Result = FALSE; if (gSpecialVar_0x8004 == sCurDecorSelectedInRearrangement) { - gSpecialVar_Result = 1; + gSpecialVar_Result = TRUE; } - else if (gDecorations[gDecorationContext.items[sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx]].permission == DECORPERM_SPRITE) + else if (gDecorations[sDecorationContext.items[sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx]].permission == DECORPERM_SPRITE) { gSpecialVar_0x8005 = sDecorRearrangementDataBuffer[gSpecialVar_0x8004].flagId; - sub_81296EC(sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx); + ClearDecorationContextIndex(sDecorRearrangementDataBuffer[gSpecialVar_0x8004].idx); for (i = 0; i < gMapHeader.events->objectEventCount; i++) { if (gMapHeader.events->objectEvents[i].flagId == gSpecialVar_0x8005) @@ -2169,7 +2202,7 @@ void GetObjectEventLocalIdByFlag(void) } } -void sub_81297F8(void) +static void ClearRearrangementNonSprites(void) { u8 i; u8 y; @@ -2180,9 +2213,9 @@ void sub_81297F8(void) for (i = 0; i < sCurDecorSelectedInRearrangement; i++) { - perm = gDecorations[gDecorationContext.items[sDecorRearrangementDataBuffer[i].idx]].permission; - posX = gDecorationContext.pos[sDecorRearrangementDataBuffer[i].idx] >> 4; - posY = gDecorationContext.pos[sDecorRearrangementDataBuffer[i].idx] & 0x0F; + perm = gDecorations[sDecorationContext.items[sDecorRearrangementDataBuffer[i].idx]].permission; + posX = sDecorationContext.pos[sDecorRearrangementDataBuffer[i].idx] >> 4; + posY = sDecorationContext.pos[sDecorRearrangementDataBuffer[i].idx] & 0x0F; if (perm != DECORPERM_SPRITE) { for (y = 0; y < sDecorRearrangementDataBuffer[i].height; y++) @@ -2193,32 +2226,32 @@ void sub_81297F8(void) } } - sub_81296EC(sDecorRearrangementDataBuffer[i].idx); + ClearDecorationContextIndex(sDecorRearrangementDataBuffer[i].idx); } } } -void sub_81298EC(u8 taskId) +static void Task_PutAwayDecoration(u8 taskId) { - switch (gTasks[taskId].data[2]) + switch (gTasks[taskId].tState) { case 0: - sub_81297F8(); - gTasks[taskId].data[2] = 1; + ClearRearrangementNonSprites(); + gTasks[taskId].tState = 1; break; case 1: if (!gPaletteFade.active) { DrawWholeMapView(); ScriptContext1_SetupScript(SecretBase_EventScript_PutAwayDecoration); ClearDialogWindowAndFrame(0, 1); - gTasks[taskId].data[2] = 2; + gTasks[taskId].tState = 2; } break; case 2: ScriptContext2_Enable(); IdentifyOwnedDecorationsCurrentlyInUseInternal(taskId); FadeInFromBlack(); - gTasks[taskId].data[2] = 3; + gTasks[taskId].tState = 3; break; case 3: if (IsWeatherNotFadingIn() == TRUE) @@ -2232,25 +2265,24 @@ void sub_81298EC(u8 taskId) } } - -bool8 sub_81299AC(u8 taskId) +static bool8 HasDecorationsInUse(u8 taskId) { u16 i; - for (i = 0; i < gDecorationContext.size; i++) + for (i = 0; i < sDecorationContext.size; i++) { - if (gDecorationContext.items[i] != DECOR_NONE) + if (sDecorationContext.items[i] != DECOR_NONE) return TRUE; } return FALSE; } -void SetUpPuttingAwayDecorationPlayerAvatar(void) +static void SetUpPuttingAwayDecorationPlayerAvatar(void) { GetPlayerFacingDirection(); sDecor_CameraSpriteObjectIdx1 = gSprites[gFieldCamera.spriteId].data[0]; - sub_812A39C(); - gFieldCamera.spriteId = CreateSprite(&gUnknown_085A7404, 120, 80, 0); + LoadPlayerSpritePalette(); + gFieldCamera.spriteId = CreateSprite(&sPuttingAwayCursorSpriteTemplate, 120, 80, 0); if (gSaveBlock2Ptr->playerGender == MALE) sDecor_CameraSpriteObjectIdx2 = AddPseudoObjectEvent(OBJ_EVENT_GFX_BRENDAN_DECORATING, SpriteCallbackDummy, 136, 72, 0); else @@ -2262,72 +2294,72 @@ void SetUpPuttingAwayDecorationPlayerAvatar(void) gSprites[sDecor_CameraSpriteObjectIdx1].oam.priority = 1; } -void sub_8129ABC(u8 taskId) +static void Task_ContinuePuttingAwayDecorations(u8 taskId) { s16 *data; data = gTasks[taskId].data; - switch (data[2]) + switch (tState) { case 0: if (!gPaletteFade.active) { - sub_8127ACC(taskId); - data[2] = 1; - data[6] = 1; - data[5] = 1; + SetInitialPositions(taskId); + tState = 1; + tDecorHeight = 1; + tDecorWidth = 1; } break; case 1: SetUpPuttingAwayDecorationPlayerAvatar(); FadeInFromBlack(); - data[2] = 2; + tState = 2; break; case 2: if (IsWeatherNotFadingIn() == TRUE) { - data[12] = 1; + tDecorationItemsMenuCommand = DECOR_ITEMS_MENU_PUT_AWAY; ContinuePuttingAwayDecorations(taskId); } break; } } -void ContinuePuttingAwayDecorations(u8 taskId) +static void ContinuePuttingAwayDecorations(u8 taskId) { ClearDialogWindowAndFrame(0, 1); gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE; - gSprites[sDecor_CameraSpriteObjectIdx1].callback = sub_812A36C; + gSprites[sDecor_CameraSpriteObjectIdx1].callback = InitializeCameraSprite1; gSprites[sDecor_CameraSpriteObjectIdx2].pos1.x = 136; gSprites[sDecor_CameraSpriteObjectIdx2].pos1.y = 72; - gTasks[taskId].data[10] = 0; - gTasks[taskId].func = sub_8128E18; + gTasks[taskId].tButton = 0; + gTasks[taskId].func = Task_SelectLocation; } -void sub_8129BCC(u8 taskId) +static void AttemptPutAwayDecoration(u8 taskId) { - gTasks[taskId].data[10] = 0; - sub_8128DE0(); - sub_8129C74(taskId); + gTasks[taskId].tButton = 0; + ResetCursorMovement(); + AttemptPutAwayDecoration_(taskId); } -void sub_8129BF8(u8 taskId) +static void AttemptCancelPutAwayDecoration(u8 taskId) { - gTasks[taskId].data[10] = 0; - sub_8128DE0(); + gTasks[taskId].tButton = 0; + ResetCursorMovement(); gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE; gSprites[sDecor_CameraSpriteObjectIdx1].callback = SpriteCallbackDummy; StringExpandPlaceholders(gStringVar4, gText_StopPuttingAwayDecorations); DisplayItemMessageOnField(taskId, gStringVar4, StopPuttingAwayDecorationsPrompt); } -void sub_8129C74(u8 taskId) +static void AttemptPutAwayDecoration_(u8 taskId) { s16 *data; u8 behavior; - sub_812A0E8(taskId); + AttemptMarkDecorUnderCursorForRemoval(taskId); if (sCurDecorSelectedInRearrangement != 0) { StringExpandPlaceholders(gStringVar4, gText_ReturnDecorationToPC); @@ -2336,7 +2368,7 @@ void sub_8129C74(u8 taskId) else { data = gTasks[taskId].data; - behavior = MapGridGetMetatileBehaviorAt(data[0], data[1]); + behavior = MapGridGetMetatileBehaviorAt(tCursorX, tCursorY); if (MetatileBehavior_IsSecretBasePC(behavior) == TRUE || MetatileBehavior_IsPlayerRoomPCOn(behavior) == TRUE) { gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE; @@ -2352,13 +2384,13 @@ void sub_8129C74(u8 taskId) } } -void ContinuePuttingAwayDecorationsPrompt(u8 taskId) +static void ContinuePuttingAwayDecorationsPrompt(u8 taskId) { if (gMain.newKeys & A_BUTTON || gMain.newKeys & B_BUTTON) ContinuePuttingAwayDecorations(taskId); } -void sub_8129D8C(u8 decor, struct DecorRearrangementDataBuffer *data) +static void SetDecorRearrangementShape(u8 decor, struct DecorRearrangementDataBuffer *data) { if (gDecorations[decor].shape == DECORSHAPE_1x1) { @@ -2412,15 +2444,15 @@ void sub_8129D8C(u8 decor, struct DecorRearrangementDataBuffer *data) } } -void sub_8129E0C(u8 x, u8 y) +static void SetCameraSpritePosition(u8 x, u8 y) { gSprites[sDecor_CameraSpriteObjectIdx1].invisible = TRUE; gSprites[sDecor_CameraSpriteObjectIdx1].callback = SpriteCallbackDummy; - gSprites[sDecor_CameraSpriteObjectIdx2].pos1.x = (x << 4) + 136; - gSprites[sDecor_CameraSpriteObjectIdx2].pos1.y = (y << 4) + 72; + gSprites[sDecor_CameraSpriteObjectIdx2].pos1.x = x * 16 + 136; + gSprites[sDecor_CameraSpriteObjectIdx2].pos1.y = y * 16 + 72; } -bool8 sub_8129E74(u8 taskId, u8 idx, struct DecorRearrangementDataBuffer *data) +static bool8 DecorationIsUnderCursor(u8 taskId, u8 idx, struct DecorRearrangementDataBuffer *data) { u8 x; u8 y; @@ -2428,32 +2460,32 @@ bool8 sub_8129E74(u8 taskId, u8 idx, struct DecorRearrangementDataBuffer *data) u8 yOff; u8 ht; - x = gTasks[taskId].data[0] - 7; - y = gTasks[taskId].data[1] - 7; - xOff = gDecorationContext.pos[idx] >> 4; - yOff = gDecorationContext.pos[idx] & 0x0F; + x = gTasks[taskId].tCursorX - 7; + y = gTasks[taskId].tCursorY - 7; + xOff = sDecorationContext.pos[idx] >> 4; + yOff = sDecorationContext.pos[idx] & 0x0F; ht = data->height; - if (gDecorationContext.items[idx] == DECOR_SAND_ORNAMENT && MapGridGetMetatileIdAt(xOff + 7, yOff + 7) == 0x28C) + if (sDecorationContext.items[idx] == DECOR_SAND_ORNAMENT && MapGridGetMetatileIdAt(xOff + 7, yOff + 7) == METATILE_SecretBase_SandOrnament_BrokenBase) ht--; if (x >= xOff && x < xOff + data->width && y > yOff - ht && y <= yOff) { - sub_8129E0C(data->width - (x - xOff + 1), yOff - y); + SetCameraSpritePosition(data->width - (x - xOff + 1), yOff - y); return TRUE; } return FALSE; } -void sub_8129F20(void) +static void SetDecorRearrangementFlagIdIfFlagUnset(void) { u8 xOff; u8 yOff; u16 i; - xOff = gDecorationContext.pos[sDecorRearrangementDataBuffer[sCurDecorSelectedInRearrangement].idx] >> 4; - yOff = gDecorationContext.pos[sDecorRearrangementDataBuffer[sCurDecorSelectedInRearrangement].idx] & 0x0F; - for (i = 0; i < 0x40; i++) + xOff = sDecorationContext.pos[sDecorRearrangementDataBuffer[sCurDecorSelectedInRearrangement].idx] >> 4; + yOff = sDecorationContext.pos[sDecorRearrangementDataBuffer[sCurDecorSelectedInRearrangement].idx] & 0x0F; + for (i = 0; i < OBJECT_EVENT_TEMPLATES_COUNT; i++) { if (gSaveBlock1Ptr->objectEventTemplates[i].x == xOff && gSaveBlock1Ptr->objectEventTemplates[i].y == yOff && !FlagGet(gSaveBlock1Ptr->objectEventTemplates[i].flagId)) { @@ -2463,21 +2495,21 @@ void sub_8129F20(void) } } -bool8 sub_8129FC8(u8 taskId) +static bool8 AttemptMarkSpriteDecorUnderCursorForRemoval(u8 taskId) { u16 i; - for (i = 0; i < gDecorationContext.size; i++) + for (i = 0; i < sDecorationContext.size; i++) { - if (gDecorationContext.items[i] != 0) + if (sDecorationContext.items[i] != DECOR_NONE) { - if (gDecorations[gDecorationContext.items[i]].permission == DECORPERM_SPRITE) + if (gDecorations[sDecorationContext.items[i]].permission == DECORPERM_SPRITE) { - sub_8129D8C(gDecorationContext.items[i], sDecorRearrangementDataBuffer); - if (sub_8129E74(taskId, i, sDecorRearrangementDataBuffer) == TRUE) + SetDecorRearrangementShape(sDecorationContext.items[i], sDecorRearrangementDataBuffer); + if (DecorationIsUnderCursor(taskId, i, sDecorRearrangementDataBuffer) == TRUE) { sDecorRearrangementDataBuffer->idx = i; - sub_8129F20(); + SetDecorRearrangementFlagIdIfFlagUnset(); sCurDecorSelectedInRearrangement = 1; return TRUE; } @@ -2487,28 +2519,28 @@ bool8 sub_8129FC8(u8 taskId) return FALSE; } -void sub_812A040(u8 left, u8 top, u8 right, u8 bottom) +static void MarkSpriteDecorsInBoundsForRemoval(u8 left, u8 top, u8 right, u8 bottom) { u8 i; u8 xOff; u8 yOff; - u8 decorIdx; + u8 decor; - for (i = 0; i < gDecorationContext.size; i++) + for (i = 0; i < sDecorationContext.size; i++) { - decorIdx = gDecorationContext.items[i]; - xOff = gDecorationContext.pos[i] >> 4; - yOff = gDecorationContext.pos[i] & 0x0F; - if (decorIdx != 0 && gDecorations[decorIdx].permission == DECORPERM_SPRITE && left <= xOff && top <= yOff && right >= xOff && bottom >= yOff) + decor = sDecorationContext.items[i]; + xOff = sDecorationContext.pos[i] >> 4; + yOff = sDecorationContext.pos[i] & 0x0F; + if (decor != DECOR_NONE && gDecorations[decor].permission == DECORPERM_SPRITE && left <= xOff && top <= yOff && right >= xOff && bottom >= yOff) { sDecorRearrangementDataBuffer[sCurDecorSelectedInRearrangement].idx = i; - sub_8129F20(); + SetDecorRearrangementFlagIdIfFlagUnset(); sCurDecorSelectedInRearrangement++; } } } -void sub_812A0E8(u8 taskId) +static void AttemptMarkDecorUnderCursorForRemoval(u8 taskId) { u8 i; u8 xOff; @@ -2517,15 +2549,16 @@ void sub_812A0E8(u8 taskId) u32 var2; sCurDecorSelectedInRearrangement = 0; - if (sub_8129FC8(taskId) != TRUE) + if (AttemptMarkSpriteDecorUnderCursorForRemoval(taskId) != TRUE) { - for (i = 0; i < gDecorationContext.size; i++) + // Not a sprite. + for (i = 0; i < sDecorationContext.size; i++) { - var1 = gDecorationContext.items[i]; + var1 = sDecorationContext.items[i]; if (var1 != DECOR_NONE) { - sub_8129D8C(var1, &sDecorRearrangementDataBuffer[0]); - if (sub_8129E74(taskId, i, &sDecorRearrangementDataBuffer[0]) == TRUE) + SetDecorRearrangementShape(var1, &sDecorRearrangementDataBuffer[0]); + if (DecorationIsUnderCursor(taskId, i, &sDecorRearrangementDataBuffer[0]) == TRUE) { sDecorRearrangementDataBuffer[0].idx = i; sCurDecorSelectedInRearrangement++; @@ -2535,84 +2568,85 @@ void sub_812A0E8(u8 taskId) } if (sCurDecorSelectedInRearrangement != 0) { - xOff = gDecorationContext.pos[sDecorRearrangementDataBuffer[0].idx] >> 4; - yOff = gDecorationContext.pos[sDecorRearrangementDataBuffer[0].idx] & 0x0F; + xOff = sDecorationContext.pos[sDecorRearrangementDataBuffer[0].idx] >> 4; + yOff = sDecorationContext.pos[sDecorRearrangementDataBuffer[0].idx] & 0x0F; var1 = yOff - sDecorRearrangementDataBuffer[0].height + 1; var2 = sDecorRearrangementDataBuffer[0].width + xOff - 1; - sub_812A040(xOff, var1, var2, yOff); + // Remove any dolls/cushions on this decoration. + MarkSpriteDecorsInBoundsForRemoval(xOff, var1, var2, yOff); } } } -void ReturnDecorationPrompt(u8 taskId) +static void ReturnDecorationPrompt(u8 taskId) { DisplayYesNoMenuDefaultYes(); DoYesNoFuncWithChoice(taskId, &sReturnDecorationYesNoFunctions); } -void PutAwayDecoration(u8 taskId) +static void PutAwayDecoration(u8 taskId) { FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].data[2] = 0; - gTasks[taskId].func = sub_81298EC; + gTasks[taskId].tState = 0; + gTasks[taskId].func = Task_PutAwayDecoration; } -void StopPuttingAwayDecorationsPrompt(u8 taskId) +static void StopPuttingAwayDecorationsPrompt(u8 taskId) { DisplayYesNoMenuDefaultYes(); DoYesNoFuncWithChoice(taskId, &sStopPuttingAwayDecorationsYesNoFunctions); } -void StopPuttingAwayDecorations(u8 taskId) +static void StopPuttingAwayDecorations(u8 taskId) { ClearDialogWindowAndFrame(0, 0); - sub_812A22C(taskId); + StopPuttingAwayDecorations_(taskId); } -void sub_812A22C(u8 taskId) +static void StopPuttingAwayDecorations_(u8 taskId) { FadeScreen(FADE_TO_BLACK, 0); - gTasks[taskId].data[2] = 0; - gTasks[taskId].func = sub_812A25C; + gTasks[taskId].tState = 0; + gTasks[taskId].func = Task_StopPuttingAwayDecorations; } -void sub_812A25C(u8 taskId) +static void Task_StopPuttingAwayDecorations(u8 taskId) { - switch (gTasks[taskId].data[2]) + switch (gTasks[taskId].tState) { case 0: if (!gPaletteFade.active) { - sub_8127B04(taskId); - gTasks[taskId].data[2] = 1; + WarpToInitialPosition(taskId); + gTasks[taskId].tState = 1; } break; case 1: - sub_812A3C8(); - gFieldCallback = sub_812A334; + FreePlayerSpritePalette(); + gFieldCallback = FieldCB_StopPuttingAwayDecorations; SetMainCallback2(CB2_ReturnToField); DestroyTask(taskId); break; } } -void sub_812A2C4(u8 taskId) +static void Task_ReinitializeDecorationMenuHandler(u8 taskId) { s16 *data = gTasks[taskId].data; - switch (data[2]) + switch (tState) { case 0: HideSecretBaseDecorationSprites(); - data[2]++; + tState++; break; case 1: ScriptContext1_SetupScript(SecretBase_EventScript_InitDecorations); - data[2]++; + tState++; break; case 2: ScriptContext2_Enable(); - data[2]++; + tState++; break; case 3: if (IsWeatherNotFadingIn() == TRUE) @@ -2621,18 +2655,18 @@ void sub_812A2C4(u8 taskId) } } -void sub_812A334(void) +static void FieldCB_StopPuttingAwayDecorations(void) { u8 taskId; FadeInFromBlack(); DrawDialogueFrame(0, 1); InitDecorationActionsWindow(); - taskId = CreateTask(sub_812A2C4, 8); - gTasks[taskId].data[2] = 0; + taskId = CreateTask(Task_ReinitializeDecorationMenuHandler, 8); + gTasks[taskId].tState = 0; } -void sub_812A36C(struct Sprite *sprite) +static void InitializeCameraSprite1(struct Sprite *sprite) { sprite->data[0]++; sprite->data[0] &= 0x1F; @@ -2642,20 +2676,20 @@ void sub_812A36C(struct Sprite *sprite) sprite->invisible = FALSE; } -void sub_812A39C(void) +static void LoadPlayerSpritePalette(void) { if (gSaveBlock2Ptr->playerGender == MALE) - LoadSpritePalette(&gUnknown_085A73D8); + LoadSpritePalette(&sSpritePal_PuttingAwayCursorBrendan); else - LoadSpritePalette(&gUnknown_085A73E0); + LoadSpritePalette(&sSpritePal_PuttingAwayCursorMay); } -void sub_812A3C8(void) +static void FreePlayerSpritePalette(void) { FreeSpritePaletteByTag(PLACE_DECORATION_PLAYER_TAG); } -void sub_812A3D4(u8 taskId) +static void DecorationItemsMenuAction_AttemptToss(u8 taskId) { if (IsSelectedDecorInThePC() == TRUE) { @@ -2666,23 +2700,22 @@ void sub_812A3D4(u8 taskId) else { StringExpandPlaceholders(gStringVar4, gText_CantThrowAwayInUse); - DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C); + DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationItemsAfterInvalidSelection); } } -void TossDecorationPrompt(u8 taskId) +static void TossDecorationPrompt(u8 taskId) { DisplayYesNoMenuDefaultYes(); DoYesNoFuncWithChoice(taskId, &sTossDecorationYesNoFunctions); } -void TossDecoration(u8 taskId) +static void TossDecoration(u8 taskId) { gCurDecorationItems[gCurDecorationIndex] = DECOR_NONE; sNumOwnedDecorationsInCurCategory = GetNumOwnedDecorationsInCategory(sCurDecorationCategory); CondenseDecorationsInCategory(sCurDecorationCategory); IdentifyOwnedDecorationsCurrentlyInUseInternal(taskId); StringExpandPlaceholders(gStringVar4, gText_DecorationThrownAway); - DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C); + DisplayItemMessageOnField(taskId, gStringVar4, ReturnToDecorationItemsAfterInvalidSelection); } - diff --git a/src/decoration_inventory.c b/src/decoration_inventory.c index 80646c69c..af1071b1b 100644 --- a/src/decoration_inventory.c +++ b/src/decoration_inventory.c @@ -1,71 +1,51 @@ - -// Includes #include "global.h" #include "constants/decorations.h" #include "decoration.h" #include "decoration_inventory.h" -// Static type declarations - -// Static RAM declarations - -EWRAM_DATA struct DecorationInventory gDecorationInventories[8] = {}; - -// Static ROM declarations - -// .rodata - -// .text +EWRAM_DATA struct DecorationInventory gDecorationInventories[DECORCAT_COUNT] = {}; #define SET_DECOR_INV(i, ptr) {\ gDecorationInventories[i].items = ptr;\ - gDecorationInventories[i].size = sizeof(ptr);\ + gDecorationInventories[i].size = ARRAY_COUNT(ptr);\ } void SetDecorationInventoriesPointers(void) { - SET_DECOR_INV(0, gSaveBlock1Ptr->decorDesk); - SET_DECOR_INV(1, gSaveBlock1Ptr->decorChair); - SET_DECOR_INV(2, gSaveBlock1Ptr->decorPlant); - SET_DECOR_INV(3, gSaveBlock1Ptr->decorOrnament); - SET_DECOR_INV(4, gSaveBlock1Ptr->decorMat); - SET_DECOR_INV(5, gSaveBlock1Ptr->decorPoster); - SET_DECOR_INV(6, gSaveBlock1Ptr->decorDoll); - SET_DECOR_INV(7, gSaveBlock1Ptr->decorCushion); + SET_DECOR_INV(DECORCAT_DESK, gSaveBlock1Ptr->decorationDesks); + SET_DECOR_INV(DECORCAT_CHAIR, gSaveBlock1Ptr->decorationChairs); + SET_DECOR_INV(DECORCAT_PLANT, gSaveBlock1Ptr->decorationPlants); + SET_DECOR_INV(DECORCAT_ORNAMENT, gSaveBlock1Ptr->decorationOrnaments); + SET_DECOR_INV(DECORCAT_MAT, gSaveBlock1Ptr->decorationMats); + SET_DECOR_INV(DECORCAT_POSTER, gSaveBlock1Ptr->decorationPosters); + SET_DECOR_INV(DECORCAT_DOLL, gSaveBlock1Ptr->decorationDolls); + SET_DECOR_INV(DECORCAT_CUSHION, gSaveBlock1Ptr->decorationCushions); InitDecorationContextItems(); } -static void ClearDecorationInventory(u8 idx) +static void ClearDecorationInventory(u8 category) { u8 i; - - for (i = 0; i < gDecorationInventories[idx].size; i ++) - { - gDecorationInventories[idx].items[i] = DECOR_NONE; - } + for (i = 0; i < gDecorationInventories[category].size; i ++) + gDecorationInventories[category].items[i] = DECOR_NONE; } void ClearDecorationInventories(void) { - u8 idx; - - for (idx = 0; idx < 8; idx ++) - { - ClearDecorationInventory(idx); - } + u8 category; + for (category = 0; category < 8; category++) + ClearDecorationInventory(category); } -s8 GetFirstEmptyDecorSlot(u8 idx) +s8 GetFirstEmptyDecorSlot(u8 category) { s8 i; - - for (i = 0; i < (s8)gDecorationInventories[idx].size; i ++) + for (i = 0; i < (s8)gDecorationInventories[category].size; i++) { - if (gDecorationInventories[idx].items[i] == DECOR_NONE) - { + if (gDecorationInventories[category].items[i] == DECOR_NONE) return i; - } } + return -1; } @@ -78,10 +58,9 @@ bool8 CheckHasDecoration(u8 decor) for (i = 0; i < gDecorationInventories[category].size; i ++) { if (gDecorationInventories[category].items[i] == decor) - { return TRUE; - } } + return FALSE; } @@ -91,15 +70,11 @@ bool8 DecorationAdd(u8 decor) s8 idx; if (decor == DECOR_NONE) - { return FALSE; - } category = gDecorations[decor].category; idx = GetFirstEmptyDecorSlot(category); if (idx == -1) - { return FALSE; - } gDecorationInventories[category].items[idx] = decor; return TRUE; } @@ -107,13 +82,9 @@ bool8 DecorationAdd(u8 decor) bool8 DecorationCheckSpace(u8 decor) { if (decor == DECOR_NONE) - { return FALSE; - } if (GetFirstEmptyDecorSlot(gDecorations[decor].category) == -1) - { return FALSE; - } return TRUE; } @@ -124,9 +95,8 @@ s8 DecorationRemove(u8 decor) i = 0; if (decor == DECOR_NONE) - { return 0; - } + for (i = 0; i < gDecorationInventories[gDecorations[decor].category].size; i ++) { category = gDecorations[decor].category; @@ -137,6 +107,7 @@ s8 DecorationRemove(u8 decor) return 1; } } + return 0; } @@ -160,19 +131,18 @@ void CondenseDecorationsInCategory(u8 category) } } -u8 GetNumOwnedDecorationsInCategory(u8 idx) +u8 GetNumOwnedDecorationsInCategory(u8 category) { u8 i; u8 ct; ct = 0; - for (i = 0; i < gDecorationInventories[idx].size; i ++) + for (i = 0; i < gDecorationInventories[category].size; i++) { - if (gDecorationInventories[idx].items[i] != DECOR_NONE) - { - ct ++; - } + if (gDecorationInventories[category].items[i] != DECOR_NONE) + ct++; } + return ct; } diff --git a/src/secret_base.c b/src/secret_base.c index 31fd901e0..ec48e9b51 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -543,23 +543,23 @@ void InitSecretBaseDecorationSprites(void) objectEventId = 0; if (!CurMapIsSecretBase()) { - decorations = gSaveBlock1Ptr->playerRoomDecor; - decorationPositions = gSaveBlock1Ptr->playerRoomDecorPos; - numDecorations = 12; + decorations = gSaveBlock1Ptr->playerRoomDecorations; + decorationPositions = gSaveBlock1Ptr->playerRoomDecorationPositions; + numDecorations = DECOR_MAX_PLAYERS_HOUSE; } else { u16 secretBaseId = VarGet(VAR_CURRENT_SECRET_BASE); decorations = gSaveBlock1Ptr->secretBases[secretBaseId].decorations; decorationPositions = gSaveBlock1Ptr->secretBases[secretBaseId].decorationPositions; - numDecorations = 16; + numDecorations = DECOR_MAX_SECRET_BASE; } for (i = 0; i < numDecorations; i++) { if (decorations[i] == DECOR_NONE) continue; - + permission = gDecorations[decorations[i]].permission; category = gDecorations[decorations[i]].category; if (permission == DECORPERM_SPRITE) diff --git a/src/trader.c b/src/trader.c index e0b780d25..ac6a30df0 100644 --- a/src/trader.c +++ b/src/trader.c @@ -42,7 +42,7 @@ void TraderSetup(void) for (i = 0; i < 4; i++) { StringCopy(trader->playerNames[i], sDefaultTraderNames[i]); - trader->decorIds[i] = sDefaultTraderDecorations[i]; + trader->decorations[i] = sDefaultTraderDecorations[i]; trader->language[i] = GAME_LANGUAGE; } } @@ -64,10 +64,10 @@ void CreateAvailableDecorationsMenu(u8 taskId) for (i = 0; i < 4; i++) { s32 curWidth; - if (trader->decorIds[i] > NUM_DECORATIONS) + if (trader->decorations[i] > NUM_DECORATIONS) curWidth = fiveMarksWidth; else - curWidth = GetStringWidth(1, gDecorations[trader->decorIds[i]].name, 0); + curWidth = GetStringWidth(1, gDecorations[trader->decorations[i]].name, 0); if (curWidth > windowWidth) windowWidth = curWidth; } @@ -76,10 +76,10 @@ void CreateAvailableDecorationsMenu(u8 taskId) DrawStdFrameWithCustomTileAndPalette(data[3], FALSE, 0x214, 14); for (i = 0; i < 4; i++) { - if (trader->decorIds[i] > NUM_DECORATIONS) + if (trader->decorations[i] > NUM_DECORATIONS) AddTextPrinterParameterized(data[3], 1, gText_FiveMarks, 8, 16 * i + 1, 255, NULL); else - AddTextPrinterParameterized(data[3], 1, gDecorations[trader->decorIds[i]].name, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], 1, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, 255, NULL); } AddTextPrinterParameterized(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0); @@ -125,7 +125,7 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) gSpecialVar_0x8005 = input; StringCopy(gStringVar1, trader->playerNames[input]); ConvertInternationalString(gStringVar1, trader->language[input]); - Task_BufferDecorSelectionAndCloseWindow(taskId, trader->decorIds[input]); + Task_BufferDecorSelectionAndCloseWindow(taskId, trader->decorations[input]); break; } } @@ -167,7 +167,7 @@ void ScrSpecial_TraderMenuGiveDecoration(void) CreateTask(ShowDecorationCategoriesWindow, 0); } -void sub_8133DA0(u8 taskId) +void DecorationItemsMenuAction_Trade(u8 taskId) { if (IsSelectedDecorInThePC() == TRUE) { @@ -197,7 +197,7 @@ void ScrSpecial_TraderDoDecorationTrade(void) DecorationRemove(gSpecialVar_0x8006); DecorationAdd(gSpecialVar_0x8004); StringCopy(trader->playerNames[gSpecialVar_0x8005], gSaveBlock2Ptr->playerName); - trader->decorIds[gSpecialVar_0x8005] = gSpecialVar_0x8006; + trader->decorations[gSpecialVar_0x8005] = gSpecialVar_0x8006; trader->language[gSpecialVar_0x8005] = GAME_LANGUAGE; trader->alreadyTraded = TRUE; } From 31b0cbe9b40d84798e5f3ee2f77f3cdc3543c5c5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Mar 2020 13:24:22 -0400 Subject: [PATCH 04/34] Document pokedex.c --- common_syms/pokedex.txt | 2 +- graphics/pokedex/{text.pal => bg_hoenn.pal} | 0 .../{national_bg.pal => bg_national.pal} | 0 .../pokedex/{fade.pal => caught_screen.pal} | 0 .../pokedex/{tilemap9.bin => cry_screen.bin} | Bin .../pokedex/{tilemap8.bin => info_screen.bin} | Bin graphics/pokedex/{menu2.png => interface.png} | Bin graphics/pokedex/{tilemap3.bin => list.bin} | Bin .../{tilemap4.bin => list_underlay.bin} | Bin ...ilemap6.bin => screen_select_bar_main.bin} | Bin ...map7.bin => screen_select_bar_submenu.bin} | Bin .../{search2.bin => search_menu_hoenn.bin} | Bin .../{search1.bin => search_menu_national.bin} | Bin .../{hoenn_bg.pal => search_results_bg.pal} | 0 .../pokedex/{tilemap5.bin => size_screen.bin} | Bin .../{black.pal => size_silhouette.pal} | 0 .../{tilemap1.bin => start_menu_main.bin} | Bin ...map2.bin => start_menu_search_results.bin} | Bin include/constants/species.h | 1657 +++--- include/graphics.h | 33 +- include/pokedex.h | 10 +- include/pokedex_cry_screen.h | 14 +- src/battle_script_commands.c | 2 +- src/credits.c | 1 + src/graphics.c | 39 +- src/pokedex.c | 4998 +++++++++-------- src/pokedex_area_screen.c | 40 +- src/pokedex_cry_screen.c | 174 +- src/start_menu.c | 2 +- 29 files changed, 3668 insertions(+), 3304 deletions(-) rename graphics/pokedex/{text.pal => bg_hoenn.pal} (100%) rename graphics/pokedex/{national_bg.pal => bg_national.pal} (100%) rename graphics/pokedex/{fade.pal => caught_screen.pal} (100%) rename graphics/pokedex/{tilemap9.bin => cry_screen.bin} (100%) rename graphics/pokedex/{tilemap8.bin => info_screen.bin} (100%) rename graphics/pokedex/{menu2.png => interface.png} (100%) rename graphics/pokedex/{tilemap3.bin => list.bin} (100%) rename graphics/pokedex/{tilemap4.bin => list_underlay.bin} (100%) rename graphics/pokedex/{tilemap6.bin => screen_select_bar_main.bin} (100%) rename graphics/pokedex/{tilemap7.bin => screen_select_bar_submenu.bin} (100%) rename graphics/pokedex/{search2.bin => search_menu_hoenn.bin} (100%) rename graphics/pokedex/{search1.bin => search_menu_national.bin} (100%) rename graphics/pokedex/{hoenn_bg.pal => search_results_bg.pal} (100%) rename graphics/pokedex/{tilemap5.bin => size_screen.bin} (100%) rename graphics/pokedex/{black.pal => size_silhouette.pal} (100%) rename graphics/pokedex/{tilemap1.bin => start_menu_main.bin} (100%) rename graphics/pokedex/{tilemap2.bin => start_menu_search_results.bin} (100%) diff --git a/common_syms/pokedex.txt b/common_syms/pokedex.txt index 9aa48a74d..c7a297b2a 100644 --- a/common_syms/pokedex.txt +++ b/common_syms/pokedex.txt @@ -1,2 +1,2 @@ gUnusedPokedexU8 -gUnknown_030060B4 +gPokedexVBlankCB diff --git a/graphics/pokedex/text.pal b/graphics/pokedex/bg_hoenn.pal similarity index 100% rename from graphics/pokedex/text.pal rename to graphics/pokedex/bg_hoenn.pal diff --git a/graphics/pokedex/national_bg.pal b/graphics/pokedex/bg_national.pal similarity index 100% rename from graphics/pokedex/national_bg.pal rename to graphics/pokedex/bg_national.pal diff --git a/graphics/pokedex/fade.pal b/graphics/pokedex/caught_screen.pal similarity index 100% rename from graphics/pokedex/fade.pal rename to graphics/pokedex/caught_screen.pal diff --git a/graphics/pokedex/tilemap9.bin b/graphics/pokedex/cry_screen.bin similarity index 100% rename from graphics/pokedex/tilemap9.bin rename to graphics/pokedex/cry_screen.bin diff --git a/graphics/pokedex/tilemap8.bin b/graphics/pokedex/info_screen.bin similarity index 100% rename from graphics/pokedex/tilemap8.bin rename to graphics/pokedex/info_screen.bin diff --git a/graphics/pokedex/menu2.png b/graphics/pokedex/interface.png similarity index 100% rename from graphics/pokedex/menu2.png rename to graphics/pokedex/interface.png diff --git a/graphics/pokedex/tilemap3.bin b/graphics/pokedex/list.bin similarity index 100% rename from graphics/pokedex/tilemap3.bin rename to graphics/pokedex/list.bin diff --git a/graphics/pokedex/tilemap4.bin b/graphics/pokedex/list_underlay.bin similarity index 100% rename from graphics/pokedex/tilemap4.bin rename to graphics/pokedex/list_underlay.bin diff --git a/graphics/pokedex/tilemap6.bin b/graphics/pokedex/screen_select_bar_main.bin similarity index 100% rename from graphics/pokedex/tilemap6.bin rename to graphics/pokedex/screen_select_bar_main.bin diff --git a/graphics/pokedex/tilemap7.bin b/graphics/pokedex/screen_select_bar_submenu.bin similarity index 100% rename from graphics/pokedex/tilemap7.bin rename to graphics/pokedex/screen_select_bar_submenu.bin diff --git a/graphics/pokedex/search2.bin b/graphics/pokedex/search_menu_hoenn.bin similarity index 100% rename from graphics/pokedex/search2.bin rename to graphics/pokedex/search_menu_hoenn.bin diff --git a/graphics/pokedex/search1.bin b/graphics/pokedex/search_menu_national.bin similarity index 100% rename from graphics/pokedex/search1.bin rename to graphics/pokedex/search_menu_national.bin diff --git a/graphics/pokedex/hoenn_bg.pal b/graphics/pokedex/search_results_bg.pal similarity index 100% rename from graphics/pokedex/hoenn_bg.pal rename to graphics/pokedex/search_results_bg.pal diff --git a/graphics/pokedex/tilemap5.bin b/graphics/pokedex/size_screen.bin similarity index 100% rename from graphics/pokedex/tilemap5.bin rename to graphics/pokedex/size_screen.bin diff --git a/graphics/pokedex/black.pal b/graphics/pokedex/size_silhouette.pal similarity index 100% rename from graphics/pokedex/black.pal rename to graphics/pokedex/size_silhouette.pal diff --git a/graphics/pokedex/tilemap1.bin b/graphics/pokedex/start_menu_main.bin similarity index 100% rename from graphics/pokedex/tilemap1.bin rename to graphics/pokedex/start_menu_main.bin diff --git a/graphics/pokedex/tilemap2.bin b/graphics/pokedex/start_menu_search_results.bin similarity index 100% rename from graphics/pokedex/tilemap2.bin rename to graphics/pokedex/start_menu_search_results.bin diff --git a/include/constants/species.h b/include/constants/species.h index 02e5ea396..8fa5cf77b 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -449,836 +449,845 @@ // National Dex Index Defines -#define NATIONAL_DEX_NONE 0 -#define NATIONAL_DEX_BULBASAUR 1 -#define NATIONAL_DEX_IVYSAUR 2 -#define NATIONAL_DEX_VENUSAUR 3 -#define NATIONAL_DEX_CHARMANDER 4 -#define NATIONAL_DEX_CHARMELEON 5 -#define NATIONAL_DEX_CHARIZARD 6 -#define NATIONAL_DEX_SQUIRTLE 7 -#define NATIONAL_DEX_WARTORTLE 8 -#define NATIONAL_DEX_BLASTOISE 9 -#define NATIONAL_DEX_CATERPIE 10 -#define NATIONAL_DEX_METAPOD 11 -#define NATIONAL_DEX_BUTTERFREE 12 -#define NATIONAL_DEX_WEEDLE 13 -#define NATIONAL_DEX_KAKUNA 14 -#define NATIONAL_DEX_BEEDRILL 15 -#define NATIONAL_DEX_PIDGEY 16 -#define NATIONAL_DEX_PIDGEOTTO 17 -#define NATIONAL_DEX_PIDGEOT 18 -#define NATIONAL_DEX_RATTATA 19 -#define NATIONAL_DEX_RATICATE 20 -#define NATIONAL_DEX_SPEAROW 21 -#define NATIONAL_DEX_FEAROW 22 -#define NATIONAL_DEX_EKANS 23 -#define NATIONAL_DEX_ARBOK 24 -#define NATIONAL_DEX_PIKACHU 25 -#define NATIONAL_DEX_RAICHU 26 -#define NATIONAL_DEX_SANDSHREW 27 -#define NATIONAL_DEX_SANDSLASH 28 -#define NATIONAL_DEX_NIDORAN_F 29 -#define NATIONAL_DEX_NIDORINA 30 -#define NATIONAL_DEX_NIDOQUEEN 31 -#define NATIONAL_DEX_NIDORAN_M 32 -#define NATIONAL_DEX_NIDORINO 33 -#define NATIONAL_DEX_NIDOKING 34 -#define NATIONAL_DEX_CLEFAIRY 35 -#define NATIONAL_DEX_CLEFABLE 36 -#define NATIONAL_DEX_VULPIX 37 -#define NATIONAL_DEX_NINETALES 38 -#define NATIONAL_DEX_JIGGLYPUFF 39 -#define NATIONAL_DEX_WIGGLYTUFF 40 -#define NATIONAL_DEX_ZUBAT 41 -#define NATIONAL_DEX_GOLBAT 42 -#define NATIONAL_DEX_ODDISH 43 -#define NATIONAL_DEX_GLOOM 44 -#define NATIONAL_DEX_VILEPLUME 45 -#define NATIONAL_DEX_PARAS 46 -#define NATIONAL_DEX_PARASECT 47 -#define NATIONAL_DEX_VENONAT 48 -#define NATIONAL_DEX_VENOMOTH 49 -#define NATIONAL_DEX_DIGLETT 50 -#define NATIONAL_DEX_DUGTRIO 51 -#define NATIONAL_DEX_MEOWTH 52 -#define NATIONAL_DEX_PERSIAN 53 -#define NATIONAL_DEX_PSYDUCK 54 -#define NATIONAL_DEX_GOLDUCK 55 -#define NATIONAL_DEX_MANKEY 56 -#define NATIONAL_DEX_PRIMEAPE 57 -#define NATIONAL_DEX_GROWLITHE 58 -#define NATIONAL_DEX_ARCANINE 59 -#define NATIONAL_DEX_POLIWAG 60 -#define NATIONAL_DEX_POLIWHIRL 61 -#define NATIONAL_DEX_POLIWRATH 62 -#define NATIONAL_DEX_ABRA 63 -#define NATIONAL_DEX_KADABRA 64 -#define NATIONAL_DEX_ALAKAZAM 65 -#define NATIONAL_DEX_MACHOP 66 -#define NATIONAL_DEX_MACHOKE 67 -#define NATIONAL_DEX_MACHAMP 68 -#define NATIONAL_DEX_BELLSPROUT 69 -#define NATIONAL_DEX_WEEPINBELL 70 -#define NATIONAL_DEX_VICTREEBEL 71 -#define NATIONAL_DEX_TENTACOOL 72 -#define NATIONAL_DEX_TENTACRUEL 73 -#define NATIONAL_DEX_GEODUDE 74 -#define NATIONAL_DEX_GRAVELER 75 -#define NATIONAL_DEX_GOLEM 76 -#define NATIONAL_DEX_PONYTA 77 -#define NATIONAL_DEX_RAPIDASH 78 -#define NATIONAL_DEX_SLOWPOKE 79 -#define NATIONAL_DEX_SLOWBRO 80 -#define NATIONAL_DEX_MAGNEMITE 81 -#define NATIONAL_DEX_MAGNETON 82 -#define NATIONAL_DEX_FARFETCHD 83 -#define NATIONAL_DEX_DODUO 84 -#define NATIONAL_DEX_DODRIO 85 -#define NATIONAL_DEX_SEEL 86 -#define NATIONAL_DEX_DEWGONG 87 -#define NATIONAL_DEX_GRIMER 88 -#define NATIONAL_DEX_MUK 89 -#define NATIONAL_DEX_SHELLDER 90 -#define NATIONAL_DEX_CLOYSTER 91 -#define NATIONAL_DEX_GASTLY 92 -#define NATIONAL_DEX_HAUNTER 93 -#define NATIONAL_DEX_GENGAR 94 -#define NATIONAL_DEX_ONIX 95 -#define NATIONAL_DEX_DROWZEE 96 -#define NATIONAL_DEX_HYPNO 97 -#define NATIONAL_DEX_KRABBY 98 -#define NATIONAL_DEX_KINGLER 99 -#define NATIONAL_DEX_VOLTORB 100 -#define NATIONAL_DEX_ELECTRODE 101 -#define NATIONAL_DEX_EXEGGCUTE 102 -#define NATIONAL_DEX_EXEGGUTOR 103 -#define NATIONAL_DEX_CUBONE 104 -#define NATIONAL_DEX_MAROWAK 105 -#define NATIONAL_DEX_HITMONLEE 106 -#define NATIONAL_DEX_HITMONCHAN 107 -#define NATIONAL_DEX_LICKITUNG 108 -#define NATIONAL_DEX_KOFFING 109 -#define NATIONAL_DEX_WEEZING 110 -#define NATIONAL_DEX_RHYHORN 111 -#define NATIONAL_DEX_RHYDON 112 -#define NATIONAL_DEX_CHANSEY 113 -#define NATIONAL_DEX_TANGELA 114 -#define NATIONAL_DEX_KANGASKHAN 115 -#define NATIONAL_DEX_HORSEA 116 -#define NATIONAL_DEX_SEADRA 117 -#define NATIONAL_DEX_GOLDEEN 118 -#define NATIONAL_DEX_SEAKING 119 -#define NATIONAL_DEX_STARYU 120 -#define NATIONAL_DEX_STARMIE 121 -#define NATIONAL_DEX_MR_MIME 122 -#define NATIONAL_DEX_SCYTHER 123 -#define NATIONAL_DEX_JYNX 124 -#define NATIONAL_DEX_ELECTABUZZ 125 -#define NATIONAL_DEX_MAGMAR 126 -#define NATIONAL_DEX_PINSIR 127 -#define NATIONAL_DEX_TAUROS 128 -#define NATIONAL_DEX_MAGIKARP 129 -#define NATIONAL_DEX_GYARADOS 130 -#define NATIONAL_DEX_LAPRAS 131 -#define NATIONAL_DEX_DITTO 132 -#define NATIONAL_DEX_EEVEE 133 -#define NATIONAL_DEX_VAPOREON 134 -#define NATIONAL_DEX_JOLTEON 135 -#define NATIONAL_DEX_FLAREON 136 -#define NATIONAL_DEX_PORYGON 137 -#define NATIONAL_DEX_OMANYTE 138 -#define NATIONAL_DEX_OMASTAR 139 -#define NATIONAL_DEX_KABUTO 140 -#define NATIONAL_DEX_KABUTOPS 141 -#define NATIONAL_DEX_AERODACTYL 142 -#define NATIONAL_DEX_SNORLAX 143 -#define NATIONAL_DEX_ARTICUNO 144 -#define NATIONAL_DEX_ZAPDOS 145 -#define NATIONAL_DEX_MOLTRES 146 -#define NATIONAL_DEX_DRATINI 147 -#define NATIONAL_DEX_DRAGONAIR 148 -#define NATIONAL_DEX_DRAGONITE 149 -#define NATIONAL_DEX_MEWTWO 150 -#define NATIONAL_DEX_MEW 151 -#define NATIONAL_DEX_CHIKORITA 152 -#define NATIONAL_DEX_BAYLEEF 153 -#define NATIONAL_DEX_MEGANIUM 154 -#define NATIONAL_DEX_CYNDAQUIL 155 -#define NATIONAL_DEX_QUILAVA 156 -#define NATIONAL_DEX_TYPHLOSION 157 -#define NATIONAL_DEX_TOTODILE 158 -#define NATIONAL_DEX_CROCONAW 159 -#define NATIONAL_DEX_FERALIGATR 160 -#define NATIONAL_DEX_SENTRET 161 -#define NATIONAL_DEX_FURRET 162 -#define NATIONAL_DEX_HOOTHOOT 163 -#define NATIONAL_DEX_NOCTOWL 164 -#define NATIONAL_DEX_LEDYBA 165 -#define NATIONAL_DEX_LEDIAN 166 -#define NATIONAL_DEX_SPINARAK 167 -#define NATIONAL_DEX_ARIADOS 168 -#define NATIONAL_DEX_CROBAT 169 -#define NATIONAL_DEX_CHINCHOU 170 -#define NATIONAL_DEX_LANTURN 171 -#define NATIONAL_DEX_PICHU 172 -#define NATIONAL_DEX_CLEFFA 173 -#define NATIONAL_DEX_IGGLYBUFF 174 -#define NATIONAL_DEX_TOGEPI 175 -#define NATIONAL_DEX_TOGETIC 176 -#define NATIONAL_DEX_NATU 177 -#define NATIONAL_DEX_XATU 178 -#define NATIONAL_DEX_MAREEP 179 -#define NATIONAL_DEX_FLAAFFY 180 -#define NATIONAL_DEX_AMPHAROS 181 -#define NATIONAL_DEX_BELLOSSOM 182 -#define NATIONAL_DEX_MARILL 183 -#define NATIONAL_DEX_AZUMARILL 184 -#define NATIONAL_DEX_SUDOWOODO 185 -#define NATIONAL_DEX_POLITOED 186 -#define NATIONAL_DEX_HOPPIP 187 -#define NATIONAL_DEX_SKIPLOOM 188 -#define NATIONAL_DEX_JUMPLUFF 189 -#define NATIONAL_DEX_AIPOM 190 -#define NATIONAL_DEX_SUNKERN 191 -#define NATIONAL_DEX_SUNFLORA 192 -#define NATIONAL_DEX_YANMA 193 -#define NATIONAL_DEX_WOOPER 194 -#define NATIONAL_DEX_QUAGSIRE 195 -#define NATIONAL_DEX_ESPEON 196 -#define NATIONAL_DEX_UMBREON 197 -#define NATIONAL_DEX_MURKROW 198 -#define NATIONAL_DEX_SLOWKING 199 -#define NATIONAL_DEX_MISDREAVUS 200 -#define NATIONAL_DEX_UNOWN 201 -#define NATIONAL_DEX_WOBBUFFET 202 -#define NATIONAL_DEX_GIRAFARIG 203 -#define NATIONAL_DEX_PINECO 204 -#define NATIONAL_DEX_FORRETRESS 205 -#define NATIONAL_DEX_DUNSPARCE 206 -#define NATIONAL_DEX_GLIGAR 207 -#define NATIONAL_DEX_STEELIX 208 -#define NATIONAL_DEX_SNUBBULL 209 -#define NATIONAL_DEX_GRANBULL 210 -#define NATIONAL_DEX_QWILFISH 211 -#define NATIONAL_DEX_SCIZOR 212 -#define NATIONAL_DEX_SHUCKLE 213 -#define NATIONAL_DEX_HERACROSS 214 -#define NATIONAL_DEX_SNEASEL 215 -#define NATIONAL_DEX_TEDDIURSA 216 -#define NATIONAL_DEX_URSARING 217 -#define NATIONAL_DEX_SLUGMA 218 -#define NATIONAL_DEX_MAGCARGO 219 -#define NATIONAL_DEX_SWINUB 220 -#define NATIONAL_DEX_PILOSWINE 221 -#define NATIONAL_DEX_CORSOLA 222 -#define NATIONAL_DEX_REMORAID 223 -#define NATIONAL_DEX_OCTILLERY 224 -#define NATIONAL_DEX_DELIBIRD 225 -#define NATIONAL_DEX_MANTINE 226 -#define NATIONAL_DEX_SKARMORY 227 -#define NATIONAL_DEX_HOUNDOUR 228 -#define NATIONAL_DEX_HOUNDOOM 229 -#define NATIONAL_DEX_KINGDRA 230 -#define NATIONAL_DEX_PHANPY 231 -#define NATIONAL_DEX_DONPHAN 232 -#define NATIONAL_DEX_PORYGON2 233 -#define NATIONAL_DEX_STANTLER 234 -#define NATIONAL_DEX_SMEARGLE 235 -#define NATIONAL_DEX_TYROGUE 236 -#define NATIONAL_DEX_HITMONTOP 237 -#define NATIONAL_DEX_SMOOCHUM 238 -#define NATIONAL_DEX_ELEKID 239 -#define NATIONAL_DEX_MAGBY 240 -#define NATIONAL_DEX_MILTANK 241 -#define NATIONAL_DEX_BLISSEY 242 -#define NATIONAL_DEX_RAIKOU 243 -#define NATIONAL_DEX_ENTEI 244 -#define NATIONAL_DEX_SUICUNE 245 -#define NATIONAL_DEX_LARVITAR 246 -#define NATIONAL_DEX_PUPITAR 247 -#define NATIONAL_DEX_TYRANITAR 248 -#define NATIONAL_DEX_LUGIA 249 -#define NATIONAL_DEX_HO_OH 250 -#define NATIONAL_DEX_CELEBI 251 +#define NATIONAL_DEX_NONE 0 +#define NATIONAL_DEX_BULBASAUR 1 +#define NATIONAL_DEX_IVYSAUR 2 +#define NATIONAL_DEX_VENUSAUR 3 +#define NATIONAL_DEX_CHARMANDER 4 +#define NATIONAL_DEX_CHARMELEON 5 +#define NATIONAL_DEX_CHARIZARD 6 +#define NATIONAL_DEX_SQUIRTLE 7 +#define NATIONAL_DEX_WARTORTLE 8 +#define NATIONAL_DEX_BLASTOISE 9 +#define NATIONAL_DEX_CATERPIE 10 +#define NATIONAL_DEX_METAPOD 11 +#define NATIONAL_DEX_BUTTERFREE 12 +#define NATIONAL_DEX_WEEDLE 13 +#define NATIONAL_DEX_KAKUNA 14 +#define NATIONAL_DEX_BEEDRILL 15 +#define NATIONAL_DEX_PIDGEY 16 +#define NATIONAL_DEX_PIDGEOTTO 17 +#define NATIONAL_DEX_PIDGEOT 18 +#define NATIONAL_DEX_RATTATA 19 +#define NATIONAL_DEX_RATICATE 20 +#define NATIONAL_DEX_SPEAROW 21 +#define NATIONAL_DEX_FEAROW 22 +#define NATIONAL_DEX_EKANS 23 +#define NATIONAL_DEX_ARBOK 24 +#define NATIONAL_DEX_PIKACHU 25 +#define NATIONAL_DEX_RAICHU 26 +#define NATIONAL_DEX_SANDSHREW 27 +#define NATIONAL_DEX_SANDSLASH 28 +#define NATIONAL_DEX_NIDORAN_F 29 +#define NATIONAL_DEX_NIDORINA 30 +#define NATIONAL_DEX_NIDOQUEEN 31 +#define NATIONAL_DEX_NIDORAN_M 32 +#define NATIONAL_DEX_NIDORINO 33 +#define NATIONAL_DEX_NIDOKING 34 +#define NATIONAL_DEX_CLEFAIRY 35 +#define NATIONAL_DEX_CLEFABLE 36 +#define NATIONAL_DEX_VULPIX 37 +#define NATIONAL_DEX_NINETALES 38 +#define NATIONAL_DEX_JIGGLYPUFF 39 +#define NATIONAL_DEX_WIGGLYTUFF 40 +#define NATIONAL_DEX_ZUBAT 41 +#define NATIONAL_DEX_GOLBAT 42 +#define NATIONAL_DEX_ODDISH 43 +#define NATIONAL_DEX_GLOOM 44 +#define NATIONAL_DEX_VILEPLUME 45 +#define NATIONAL_DEX_PARAS 46 +#define NATIONAL_DEX_PARASECT 47 +#define NATIONAL_DEX_VENONAT 48 +#define NATIONAL_DEX_VENOMOTH 49 +#define NATIONAL_DEX_DIGLETT 50 +#define NATIONAL_DEX_DUGTRIO 51 +#define NATIONAL_DEX_MEOWTH 52 +#define NATIONAL_DEX_PERSIAN 53 +#define NATIONAL_DEX_PSYDUCK 54 +#define NATIONAL_DEX_GOLDUCK 55 +#define NATIONAL_DEX_MANKEY 56 +#define NATIONAL_DEX_PRIMEAPE 57 +#define NATIONAL_DEX_GROWLITHE 58 +#define NATIONAL_DEX_ARCANINE 59 +#define NATIONAL_DEX_POLIWAG 60 +#define NATIONAL_DEX_POLIWHIRL 61 +#define NATIONAL_DEX_POLIWRATH 62 +#define NATIONAL_DEX_ABRA 63 +#define NATIONAL_DEX_KADABRA 64 +#define NATIONAL_DEX_ALAKAZAM 65 +#define NATIONAL_DEX_MACHOP 66 +#define NATIONAL_DEX_MACHOKE 67 +#define NATIONAL_DEX_MACHAMP 68 +#define NATIONAL_DEX_BELLSPROUT 69 +#define NATIONAL_DEX_WEEPINBELL 70 +#define NATIONAL_DEX_VICTREEBEL 71 +#define NATIONAL_DEX_TENTACOOL 72 +#define NATIONAL_DEX_TENTACRUEL 73 +#define NATIONAL_DEX_GEODUDE 74 +#define NATIONAL_DEX_GRAVELER 75 +#define NATIONAL_DEX_GOLEM 76 +#define NATIONAL_DEX_PONYTA 77 +#define NATIONAL_DEX_RAPIDASH 78 +#define NATIONAL_DEX_SLOWPOKE 79 +#define NATIONAL_DEX_SLOWBRO 80 +#define NATIONAL_DEX_MAGNEMITE 81 +#define NATIONAL_DEX_MAGNETON 82 +#define NATIONAL_DEX_FARFETCHD 83 +#define NATIONAL_DEX_DODUO 84 +#define NATIONAL_DEX_DODRIO 85 +#define NATIONAL_DEX_SEEL 86 +#define NATIONAL_DEX_DEWGONG 87 +#define NATIONAL_DEX_GRIMER 88 +#define NATIONAL_DEX_MUK 89 +#define NATIONAL_DEX_SHELLDER 90 +#define NATIONAL_DEX_CLOYSTER 91 +#define NATIONAL_DEX_GASTLY 92 +#define NATIONAL_DEX_HAUNTER 93 +#define NATIONAL_DEX_GENGAR 94 +#define NATIONAL_DEX_ONIX 95 +#define NATIONAL_DEX_DROWZEE 96 +#define NATIONAL_DEX_HYPNO 97 +#define NATIONAL_DEX_KRABBY 98 +#define NATIONAL_DEX_KINGLER 99 +#define NATIONAL_DEX_VOLTORB 100 +#define NATIONAL_DEX_ELECTRODE 101 +#define NATIONAL_DEX_EXEGGCUTE 102 +#define NATIONAL_DEX_EXEGGUTOR 103 +#define NATIONAL_DEX_CUBONE 104 +#define NATIONAL_DEX_MAROWAK 105 +#define NATIONAL_DEX_HITMONLEE 106 +#define NATIONAL_DEX_HITMONCHAN 107 +#define NATIONAL_DEX_LICKITUNG 108 +#define NATIONAL_DEX_KOFFING 109 +#define NATIONAL_DEX_WEEZING 110 +#define NATIONAL_DEX_RHYHORN 111 +#define NATIONAL_DEX_RHYDON 112 +#define NATIONAL_DEX_CHANSEY 113 +#define NATIONAL_DEX_TANGELA 114 +#define NATIONAL_DEX_KANGASKHAN 115 +#define NATIONAL_DEX_HORSEA 116 +#define NATIONAL_DEX_SEADRA 117 +#define NATIONAL_DEX_GOLDEEN 118 +#define NATIONAL_DEX_SEAKING 119 +#define NATIONAL_DEX_STARYU 120 +#define NATIONAL_DEX_STARMIE 121 +#define NATIONAL_DEX_MR_MIME 122 +#define NATIONAL_DEX_SCYTHER 123 +#define NATIONAL_DEX_JYNX 124 +#define NATIONAL_DEX_ELECTABUZZ 125 +#define NATIONAL_DEX_MAGMAR 126 +#define NATIONAL_DEX_PINSIR 127 +#define NATIONAL_DEX_TAUROS 128 +#define NATIONAL_DEX_MAGIKARP 129 +#define NATIONAL_DEX_GYARADOS 130 +#define NATIONAL_DEX_LAPRAS 131 +#define NATIONAL_DEX_DITTO 132 +#define NATIONAL_DEX_EEVEE 133 +#define NATIONAL_DEX_VAPOREON 134 +#define NATIONAL_DEX_JOLTEON 135 +#define NATIONAL_DEX_FLAREON 136 +#define NATIONAL_DEX_PORYGON 137 +#define NATIONAL_DEX_OMANYTE 138 +#define NATIONAL_DEX_OMASTAR 139 +#define NATIONAL_DEX_KABUTO 140 +#define NATIONAL_DEX_KABUTOPS 141 +#define NATIONAL_DEX_AERODACTYL 142 +#define NATIONAL_DEX_SNORLAX 143 +#define NATIONAL_DEX_ARTICUNO 144 +#define NATIONAL_DEX_ZAPDOS 145 +#define NATIONAL_DEX_MOLTRES 146 +#define NATIONAL_DEX_DRATINI 147 +#define NATIONAL_DEX_DRAGONAIR 148 +#define NATIONAL_DEX_DRAGONITE 149 +#define NATIONAL_DEX_MEWTWO 150 +#define NATIONAL_DEX_MEW 151 -#define NATIONAL_DEX_OLD_UNOWN_B 387 -#define NATIONAL_DEX_OLD_UNOWN_C 388 -#define NATIONAL_DEX_OLD_UNOWN_D 389 -#define NATIONAL_DEX_OLD_UNOWN_E 390 -#define NATIONAL_DEX_OLD_UNOWN_F 391 -#define NATIONAL_DEX_OLD_UNOWN_G 392 -#define NATIONAL_DEX_OLD_UNOWN_H 393 -#define NATIONAL_DEX_OLD_UNOWN_I 394 -#define NATIONAL_DEX_OLD_UNOWN_J 395 -#define NATIONAL_DEX_OLD_UNOWN_K 396 -#define NATIONAL_DEX_OLD_UNOWN_L 397 -#define NATIONAL_DEX_OLD_UNOWN_M 398 -#define NATIONAL_DEX_OLD_UNOWN_N 399 -#define NATIONAL_DEX_OLD_UNOWN_O 400 -#define NATIONAL_DEX_OLD_UNOWN_P 401 -#define NATIONAL_DEX_OLD_UNOWN_Q 402 -#define NATIONAL_DEX_OLD_UNOWN_R 403 -#define NATIONAL_DEX_OLD_UNOWN_S 404 -#define NATIONAL_DEX_OLD_UNOWN_T 405 -#define NATIONAL_DEX_OLD_UNOWN_U 406 -#define NATIONAL_DEX_OLD_UNOWN_V 407 -#define NATIONAL_DEX_OLD_UNOWN_W 408 -#define NATIONAL_DEX_OLD_UNOWN_X 409 -#define NATIONAL_DEX_OLD_UNOWN_Y 410 -#define NATIONAL_DEX_OLD_UNOWN_Z 411 +#define KANTO_DEX_COUNT NATIONAL_DEX_MEW -#define NATIONAL_DEX_TREECKO 252 -#define NATIONAL_DEX_GROVYLE 253 -#define NATIONAL_DEX_SCEPTILE 254 -#define NATIONAL_DEX_TORCHIC 255 -#define NATIONAL_DEX_COMBUSKEN 256 -#define NATIONAL_DEX_BLAZIKEN 257 -#define NATIONAL_DEX_MUDKIP 258 -#define NATIONAL_DEX_MARSHTOMP 259 -#define NATIONAL_DEX_SWAMPERT 260 -#define NATIONAL_DEX_POOCHYENA 261 -#define NATIONAL_DEX_MIGHTYENA 262 -#define NATIONAL_DEX_ZIGZAGOON 263 -#define NATIONAL_DEX_LINOONE 264 -#define NATIONAL_DEX_WURMPLE 265 -#define NATIONAL_DEX_SILCOON 266 -#define NATIONAL_DEX_BEAUTIFLY 267 -#define NATIONAL_DEX_CASCOON 268 -#define NATIONAL_DEX_DUSTOX 269 -#define NATIONAL_DEX_LOTAD 270 -#define NATIONAL_DEX_LOMBRE 271 -#define NATIONAL_DEX_LUDICOLO 272 -#define NATIONAL_DEX_SEEDOT 273 -#define NATIONAL_DEX_NUZLEAF 274 -#define NATIONAL_DEX_SHIFTRY 275 -#define NATIONAL_DEX_NINCADA 290 -#define NATIONAL_DEX_NINJASK 291 -#define NATIONAL_DEX_SHEDINJA 292 -#define NATIONAL_DEX_TAILLOW 276 -#define NATIONAL_DEX_SWELLOW 277 -#define NATIONAL_DEX_SHROOMISH 285 -#define NATIONAL_DEX_BRELOOM 286 -#define NATIONAL_DEX_SPINDA 327 -#define NATIONAL_DEX_WINGULL 278 -#define NATIONAL_DEX_PELIPPER 279 -#define NATIONAL_DEX_SURSKIT 283 -#define NATIONAL_DEX_MASQUERAIN 284 -#define NATIONAL_DEX_WAILMER 320 -#define NATIONAL_DEX_WAILORD 321 -#define NATIONAL_DEX_SKITTY 300 -#define NATIONAL_DEX_DELCATTY 301 -#define NATIONAL_DEX_KECLEON 352 -#define NATIONAL_DEX_BALTOY 343 -#define NATIONAL_DEX_CLAYDOL 344 -#define NATIONAL_DEX_NOSEPASS 299 -#define NATIONAL_DEX_TORKOAL 324 -#define NATIONAL_DEX_SABLEYE 302 -#define NATIONAL_DEX_BARBOACH 339 -#define NATIONAL_DEX_WHISCASH 340 -#define NATIONAL_DEX_LUVDISC 370 -#define NATIONAL_DEX_CORPHISH 341 -#define NATIONAL_DEX_CRAWDAUNT 342 -#define NATIONAL_DEX_FEEBAS 349 -#define NATIONAL_DEX_MILOTIC 350 -#define NATIONAL_DEX_CARVANHA 318 -#define NATIONAL_DEX_SHARPEDO 319 -#define NATIONAL_DEX_TRAPINCH 328 -#define NATIONAL_DEX_VIBRAVA 329 -#define NATIONAL_DEX_FLYGON 330 -#define NATIONAL_DEX_MAKUHITA 296 -#define NATIONAL_DEX_HARIYAMA 297 -#define NATIONAL_DEX_ELECTRIKE 309 -#define NATIONAL_DEX_MANECTRIC 310 -#define NATIONAL_DEX_NUMEL 322 -#define NATIONAL_DEX_CAMERUPT 323 -#define NATIONAL_DEX_SPHEAL 363 -#define NATIONAL_DEX_SEALEO 364 -#define NATIONAL_DEX_WALREIN 365 -#define NATIONAL_DEX_CACNEA 331 -#define NATIONAL_DEX_CACTURNE 332 -#define NATIONAL_DEX_SNORUNT 361 -#define NATIONAL_DEX_GLALIE 362 -#define NATIONAL_DEX_LUNATONE 337 -#define NATIONAL_DEX_SOLROCK 338 -#define NATIONAL_DEX_AZURILL 298 -#define NATIONAL_DEX_SPOINK 325 -#define NATIONAL_DEX_GRUMPIG 326 -#define NATIONAL_DEX_PLUSLE 311 -#define NATIONAL_DEX_MINUN 312 -#define NATIONAL_DEX_MAWILE 303 -#define NATIONAL_DEX_MEDITITE 307 -#define NATIONAL_DEX_MEDICHAM 308 -#define NATIONAL_DEX_SWABLU 333 -#define NATIONAL_DEX_ALTARIA 334 -#define NATIONAL_DEX_WYNAUT 360 -#define NATIONAL_DEX_DUSKULL 355 -#define NATIONAL_DEX_DUSCLOPS 356 -#define NATIONAL_DEX_ROSELIA 315 -#define NATIONAL_DEX_SLAKOTH 287 -#define NATIONAL_DEX_VIGOROTH 288 -#define NATIONAL_DEX_SLAKING 289 -#define NATIONAL_DEX_GULPIN 316 -#define NATIONAL_DEX_SWALOT 317 -#define NATIONAL_DEX_TROPIUS 357 -#define NATIONAL_DEX_WHISMUR 293 -#define NATIONAL_DEX_LOUDRED 294 -#define NATIONAL_DEX_EXPLOUD 295 -#define NATIONAL_DEX_CLAMPERL 366 -#define NATIONAL_DEX_HUNTAIL 367 -#define NATIONAL_DEX_GOREBYSS 368 -#define NATIONAL_DEX_ABSOL 359 -#define NATIONAL_DEX_SHUPPET 353 -#define NATIONAL_DEX_BANETTE 354 -#define NATIONAL_DEX_SEVIPER 336 -#define NATIONAL_DEX_ZANGOOSE 335 -#define NATIONAL_DEX_RELICANTH 369 -#define NATIONAL_DEX_ARON 304 -#define NATIONAL_DEX_LAIRON 305 -#define NATIONAL_DEX_AGGRON 306 -#define NATIONAL_DEX_CASTFORM 351 -#define NATIONAL_DEX_VOLBEAT 313 -#define NATIONAL_DEX_ILLUMISE 314 -#define NATIONAL_DEX_LILEEP 345 -#define NATIONAL_DEX_CRADILY 346 -#define NATIONAL_DEX_ANORITH 347 -#define NATIONAL_DEX_ARMALDO 348 -#define NATIONAL_DEX_RALTS 280 -#define NATIONAL_DEX_KIRLIA 281 -#define NATIONAL_DEX_GARDEVOIR 282 -#define NATIONAL_DEX_BAGON 371 -#define NATIONAL_DEX_SHELGON 372 -#define NATIONAL_DEX_SALAMENCE 373 -#define NATIONAL_DEX_BELDUM 374 -#define NATIONAL_DEX_METANG 375 -#define NATIONAL_DEX_METAGROSS 376 -#define NATIONAL_DEX_REGIROCK 377 -#define NATIONAL_DEX_REGICE 378 -#define NATIONAL_DEX_REGISTEEL 379 -#define NATIONAL_DEX_KYOGRE 382 -#define NATIONAL_DEX_GROUDON 383 -#define NATIONAL_DEX_RAYQUAZA 384 -#define NATIONAL_DEX_LATIAS 380 -#define NATIONAL_DEX_LATIOS 381 -#define NATIONAL_DEX_JIRACHI 385 -#define NATIONAL_DEX_DEOXYS 386 -#define NATIONAL_DEX_CHIMECHO 358 +#define NATIONAL_DEX_CHIKORITA 152 +#define NATIONAL_DEX_BAYLEEF 153 +#define NATIONAL_DEX_MEGANIUM 154 +#define NATIONAL_DEX_CYNDAQUIL 155 +#define NATIONAL_DEX_QUILAVA 156 +#define NATIONAL_DEX_TYPHLOSION 157 +#define NATIONAL_DEX_TOTODILE 158 +#define NATIONAL_DEX_CROCONAW 159 +#define NATIONAL_DEX_FERALIGATR 160 +#define NATIONAL_DEX_SENTRET 161 +#define NATIONAL_DEX_FURRET 162 +#define NATIONAL_DEX_HOOTHOOT 163 +#define NATIONAL_DEX_NOCTOWL 164 +#define NATIONAL_DEX_LEDYBA 165 +#define NATIONAL_DEX_LEDIAN 166 +#define NATIONAL_DEX_SPINARAK 167 +#define NATIONAL_DEX_ARIADOS 168 +#define NATIONAL_DEX_CROBAT 169 +#define NATIONAL_DEX_CHINCHOU 170 +#define NATIONAL_DEX_LANTURN 171 +#define NATIONAL_DEX_PICHU 172 +#define NATIONAL_DEX_CLEFFA 173 +#define NATIONAL_DEX_IGGLYBUFF 174 +#define NATIONAL_DEX_TOGEPI 175 +#define NATIONAL_DEX_TOGETIC 176 +#define NATIONAL_DEX_NATU 177 +#define NATIONAL_DEX_XATU 178 +#define NATIONAL_DEX_MAREEP 179 +#define NATIONAL_DEX_FLAAFFY 180 +#define NATIONAL_DEX_AMPHAROS 181 +#define NATIONAL_DEX_BELLOSSOM 182 +#define NATIONAL_DEX_MARILL 183 +#define NATIONAL_DEX_AZUMARILL 184 +#define NATIONAL_DEX_SUDOWOODO 185 +#define NATIONAL_DEX_POLITOED 186 +#define NATIONAL_DEX_HOPPIP 187 +#define NATIONAL_DEX_SKIPLOOM 188 +#define NATIONAL_DEX_JUMPLUFF 189 +#define NATIONAL_DEX_AIPOM 190 +#define NATIONAL_DEX_SUNKERN 191 +#define NATIONAL_DEX_SUNFLORA 192 +#define NATIONAL_DEX_YANMA 193 +#define NATIONAL_DEX_WOOPER 194 +#define NATIONAL_DEX_QUAGSIRE 195 +#define NATIONAL_DEX_ESPEON 196 +#define NATIONAL_DEX_UMBREON 197 +#define NATIONAL_DEX_MURKROW 198 +#define NATIONAL_DEX_SLOWKING 199 +#define NATIONAL_DEX_MISDREAVUS 200 +#define NATIONAL_DEX_UNOWN 201 +#define NATIONAL_DEX_WOBBUFFET 202 +#define NATIONAL_DEX_GIRAFARIG 203 +#define NATIONAL_DEX_PINECO 204 +#define NATIONAL_DEX_FORRETRESS 205 +#define NATIONAL_DEX_DUNSPARCE 206 +#define NATIONAL_DEX_GLIGAR 207 +#define NATIONAL_DEX_STEELIX 208 +#define NATIONAL_DEX_SNUBBULL 209 +#define NATIONAL_DEX_GRANBULL 210 +#define NATIONAL_DEX_QWILFISH 211 +#define NATIONAL_DEX_SCIZOR 212 +#define NATIONAL_DEX_SHUCKLE 213 +#define NATIONAL_DEX_HERACROSS 214 +#define NATIONAL_DEX_SNEASEL 215 +#define NATIONAL_DEX_TEDDIURSA 216 +#define NATIONAL_DEX_URSARING 217 +#define NATIONAL_DEX_SLUGMA 218 +#define NATIONAL_DEX_MAGCARGO 219 +#define NATIONAL_DEX_SWINUB 220 +#define NATIONAL_DEX_PILOSWINE 221 +#define NATIONAL_DEX_CORSOLA 222 +#define NATIONAL_DEX_REMORAID 223 +#define NATIONAL_DEX_OCTILLERY 224 +#define NATIONAL_DEX_DELIBIRD 225 +#define NATIONAL_DEX_MANTINE 226 +#define NATIONAL_DEX_SKARMORY 227 +#define NATIONAL_DEX_HOUNDOUR 228 +#define NATIONAL_DEX_HOUNDOOM 229 +#define NATIONAL_DEX_KINGDRA 230 +#define NATIONAL_DEX_PHANPY 231 +#define NATIONAL_DEX_DONPHAN 232 +#define NATIONAL_DEX_PORYGON2 233 +#define NATIONAL_DEX_STANTLER 234 +#define NATIONAL_DEX_SMEARGLE 235 +#define NATIONAL_DEX_TYROGUE 236 +#define NATIONAL_DEX_HITMONTOP 237 +#define NATIONAL_DEX_SMOOCHUM 238 +#define NATIONAL_DEX_ELEKID 239 +#define NATIONAL_DEX_MAGBY 240 +#define NATIONAL_DEX_MILTANK 241 +#define NATIONAL_DEX_BLISSEY 242 +#define NATIONAL_DEX_RAIKOU 243 +#define NATIONAL_DEX_ENTEI 244 +#define NATIONAL_DEX_SUICUNE 245 +#define NATIONAL_DEX_LARVITAR 246 +#define NATIONAL_DEX_PUPITAR 247 +#define NATIONAL_DEX_TYRANITAR 248 +#define NATIONAL_DEX_LUGIA 249 +#define NATIONAL_DEX_HO_OH 250 +#define NATIONAL_DEX_CELEBI 251 + +#define JOHTO_DEX_COUNT NATIONAL_DEX_CELEBI + +#define NATIONAL_DEX_TREECKO 252 +#define NATIONAL_DEX_GROVYLE 253 +#define NATIONAL_DEX_SCEPTILE 254 +#define NATIONAL_DEX_TORCHIC 255 +#define NATIONAL_DEX_COMBUSKEN 256 +#define NATIONAL_DEX_BLAZIKEN 257 +#define NATIONAL_DEX_MUDKIP 258 +#define NATIONAL_DEX_MARSHTOMP 259 +#define NATIONAL_DEX_SWAMPERT 260 +#define NATIONAL_DEX_POOCHYENA 261 +#define NATIONAL_DEX_MIGHTYENA 262 +#define NATIONAL_DEX_ZIGZAGOON 263 +#define NATIONAL_DEX_LINOONE 264 +#define NATIONAL_DEX_WURMPLE 265 +#define NATIONAL_DEX_SILCOON 266 +#define NATIONAL_DEX_BEAUTIFLY 267 +#define NATIONAL_DEX_CASCOON 268 +#define NATIONAL_DEX_DUSTOX 269 +#define NATIONAL_DEX_LOTAD 270 +#define NATIONAL_DEX_LOMBRE 271 +#define NATIONAL_DEX_LUDICOLO 272 +#define NATIONAL_DEX_SEEDOT 273 +#define NATIONAL_DEX_NUZLEAF 274 +#define NATIONAL_DEX_SHIFTRY 275 +#define NATIONAL_DEX_TAILLOW 276 +#define NATIONAL_DEX_SWELLOW 277 +#define NATIONAL_DEX_WINGULL 278 +#define NATIONAL_DEX_PELIPPER 279 +#define NATIONAL_DEX_RALTS 280 +#define NATIONAL_DEX_KIRLIA 281 +#define NATIONAL_DEX_GARDEVOIR 282 +#define NATIONAL_DEX_SURSKIT 283 +#define NATIONAL_DEX_MASQUERAIN 284 +#define NATIONAL_DEX_SHROOMISH 285 +#define NATIONAL_DEX_BRELOOM 286 +#define NATIONAL_DEX_SLAKOTH 287 +#define NATIONAL_DEX_VIGOROTH 288 +#define NATIONAL_DEX_SLAKING 289 +#define NATIONAL_DEX_NINCADA 290 +#define NATIONAL_DEX_NINJASK 291 +#define NATIONAL_DEX_SHEDINJA 292 +#define NATIONAL_DEX_WHISMUR 293 +#define NATIONAL_DEX_LOUDRED 294 +#define NATIONAL_DEX_EXPLOUD 295 +#define NATIONAL_DEX_MAKUHITA 296 +#define NATIONAL_DEX_HARIYAMA 297 +#define NATIONAL_DEX_AZURILL 298 +#define NATIONAL_DEX_NOSEPASS 299 +#define NATIONAL_DEX_SKITTY 300 +#define NATIONAL_DEX_DELCATTY 301 +#define NATIONAL_DEX_SABLEYE 302 +#define NATIONAL_DEX_MAWILE 303 +#define NATIONAL_DEX_ARON 304 +#define NATIONAL_DEX_LAIRON 305 +#define NATIONAL_DEX_AGGRON 306 +#define NATIONAL_DEX_MEDITITE 307 +#define NATIONAL_DEX_MEDICHAM 308 +#define NATIONAL_DEX_ELECTRIKE 309 +#define NATIONAL_DEX_MANECTRIC 310 +#define NATIONAL_DEX_PLUSLE 311 +#define NATIONAL_DEX_MINUN 312 +#define NATIONAL_DEX_VOLBEAT 313 +#define NATIONAL_DEX_ILLUMISE 314 +#define NATIONAL_DEX_ROSELIA 315 +#define NATIONAL_DEX_GULPIN 316 +#define NATIONAL_DEX_SWALOT 317 +#define NATIONAL_DEX_CARVANHA 318 +#define NATIONAL_DEX_SHARPEDO 319 +#define NATIONAL_DEX_WAILMER 320 +#define NATIONAL_DEX_WAILORD 321 +#define NATIONAL_DEX_NUMEL 322 +#define NATIONAL_DEX_CAMERUPT 323 +#define NATIONAL_DEX_TORKOAL 324 +#define NATIONAL_DEX_SPOINK 325 +#define NATIONAL_DEX_GRUMPIG 326 +#define NATIONAL_DEX_SPINDA 327 +#define NATIONAL_DEX_TRAPINCH 328 +#define NATIONAL_DEX_VIBRAVA 329 +#define NATIONAL_DEX_FLYGON 330 +#define NATIONAL_DEX_CACNEA 331 +#define NATIONAL_DEX_CACTURNE 332 +#define NATIONAL_DEX_SWABLU 333 +#define NATIONAL_DEX_ALTARIA 334 +#define NATIONAL_DEX_ZANGOOSE 335 +#define NATIONAL_DEX_SEVIPER 336 +#define NATIONAL_DEX_LUNATONE 337 +#define NATIONAL_DEX_SOLROCK 338 +#define NATIONAL_DEX_BARBOACH 339 +#define NATIONAL_DEX_WHISCASH 340 +#define NATIONAL_DEX_CORPHISH 341 +#define NATIONAL_DEX_CRAWDAUNT 342 +#define NATIONAL_DEX_BALTOY 343 +#define NATIONAL_DEX_CLAYDOL 344 +#define NATIONAL_DEX_LILEEP 345 +#define NATIONAL_DEX_CRADILY 346 +#define NATIONAL_DEX_ANORITH 347 +#define NATIONAL_DEX_ARMALDO 348 +#define NATIONAL_DEX_FEEBAS 349 +#define NATIONAL_DEX_MILOTIC 350 +#define NATIONAL_DEX_CASTFORM 351 +#define NATIONAL_DEX_KECLEON 352 +#define NATIONAL_DEX_SHUPPET 353 +#define NATIONAL_DEX_BANETTE 354 +#define NATIONAL_DEX_DUSKULL 355 +#define NATIONAL_DEX_DUSCLOPS 356 +#define NATIONAL_DEX_TROPIUS 357 +#define NATIONAL_DEX_CHIMECHO 358 +#define NATIONAL_DEX_ABSOL 359 +#define NATIONAL_DEX_WYNAUT 360 +#define NATIONAL_DEX_SNORUNT 361 +#define NATIONAL_DEX_GLALIE 362 +#define NATIONAL_DEX_SPHEAL 363 +#define NATIONAL_DEX_SEALEO 364 +#define NATIONAL_DEX_WALREIN 365 +#define NATIONAL_DEX_CLAMPERL 366 +#define NATIONAL_DEX_HUNTAIL 367 +#define NATIONAL_DEX_GOREBYSS 368 +#define NATIONAL_DEX_RELICANTH 369 +#define NATIONAL_DEX_LUVDISC 370 +#define NATIONAL_DEX_BAGON 371 +#define NATIONAL_DEX_SHELGON 372 +#define NATIONAL_DEX_SALAMENCE 373 +#define NATIONAL_DEX_BELDUM 374 +#define NATIONAL_DEX_METANG 375 +#define NATIONAL_DEX_METAGROSS 376 +#define NATIONAL_DEX_REGIROCK 377 +#define NATIONAL_DEX_REGICE 378 +#define NATIONAL_DEX_REGISTEEL 379 +#define NATIONAL_DEX_LATIAS 380 +#define NATIONAL_DEX_LATIOS 381 +#define NATIONAL_DEX_KYOGRE 382 +#define NATIONAL_DEX_GROUDON 383 +#define NATIONAL_DEX_RAYQUAZA 384 +#define NATIONAL_DEX_JIRACHI 385 +#define NATIONAL_DEX_DEOXYS 386 + +#define NATIONAL_DEX_COUNT NATIONAL_DEX_DEOXYS + +#define NATIONAL_DEX_OLD_UNOWN_B 387 +#define NATIONAL_DEX_OLD_UNOWN_C 388 +#define NATIONAL_DEX_OLD_UNOWN_D 389 +#define NATIONAL_DEX_OLD_UNOWN_E 390 +#define NATIONAL_DEX_OLD_UNOWN_F 391 +#define NATIONAL_DEX_OLD_UNOWN_G 392 +#define NATIONAL_DEX_OLD_UNOWN_H 393 +#define NATIONAL_DEX_OLD_UNOWN_I 394 +#define NATIONAL_DEX_OLD_UNOWN_J 395 +#define NATIONAL_DEX_OLD_UNOWN_K 396 +#define NATIONAL_DEX_OLD_UNOWN_L 397 +#define NATIONAL_DEX_OLD_UNOWN_M 398 +#define NATIONAL_DEX_OLD_UNOWN_N 399 +#define NATIONAL_DEX_OLD_UNOWN_O 400 +#define NATIONAL_DEX_OLD_UNOWN_P 401 +#define NATIONAL_DEX_OLD_UNOWN_Q 402 +#define NATIONAL_DEX_OLD_UNOWN_R 403 +#define NATIONAL_DEX_OLD_UNOWN_S 404 +#define NATIONAL_DEX_OLD_UNOWN_T 405 +#define NATIONAL_DEX_OLD_UNOWN_U 406 +#define NATIONAL_DEX_OLD_UNOWN_V 407 +#define NATIONAL_DEX_OLD_UNOWN_W 408 +#define NATIONAL_DEX_OLD_UNOWN_X 409 +#define NATIONAL_DEX_OLD_UNOWN_Y 410 +#define NATIONAL_DEX_OLD_UNOWN_Z 411 // Hoenn Dex Index Defines -#define HOENN_DEX_NONE 0 -#define HOENN_DEX_BULBASAUR 203 -#define HOENN_DEX_IVYSAUR 204 -#define HOENN_DEX_VENUSAUR 205 -#define HOENN_DEX_CHARMANDER 206 -#define HOENN_DEX_CHARMELEON 207 -#define HOENN_DEX_CHARIZARD 208 -#define HOENN_DEX_SQUIRTLE 209 -#define HOENN_DEX_WARTORTLE 210 -#define HOENN_DEX_BLASTOISE 211 -#define HOENN_DEX_CATERPIE 212 -#define HOENN_DEX_METAPOD 213 -#define HOENN_DEX_BUTTERFREE 214 -#define HOENN_DEX_WEEDLE 215 -#define HOENN_DEX_KAKUNA 216 -#define HOENN_DEX_BEEDRILL 217 -#define HOENN_DEX_PIDGEY 218 -#define HOENN_DEX_PIDGEOTTO 219 -#define HOENN_DEX_PIDGEOT 220 -#define HOENN_DEX_RATTATA 221 -#define HOENN_DEX_RATICATE 222 -#define HOENN_DEX_SPEAROW 223 -#define HOENN_DEX_FEAROW 224 -#define HOENN_DEX_EKANS 225 -#define HOENN_DEX_ARBOK 226 -#define HOENN_DEX_PIKACHU 156 -#define HOENN_DEX_RAICHU 157 -#define HOENN_DEX_SANDSHREW 112 -#define HOENN_DEX_SANDSLASH 113 -#define HOENN_DEX_NIDORAN_F 227 -#define HOENN_DEX_NIDORINA 228 -#define HOENN_DEX_NIDOQUEEN 229 -#define HOENN_DEX_NIDORAN_M 230 -#define HOENN_DEX_NIDORINO 231 -#define HOENN_DEX_NIDOKING 232 -#define HOENN_DEX_CLEFAIRY 233 -#define HOENN_DEX_CLEFABLE 234 -#define HOENN_DEX_VULPIX 153 -#define HOENN_DEX_NINETALES 154 -#define HOENN_DEX_JIGGLYPUFF 138 -#define HOENN_DEX_WIGGLYTUFF 139 -#define HOENN_DEX_ZUBAT 63 -#define HOENN_DEX_GOLBAT 64 -#define HOENN_DEX_ODDISH 88 -#define HOENN_DEX_GLOOM 89 -#define HOENN_DEX_VILEPLUME 90 -#define HOENN_DEX_PARAS 235 -#define HOENN_DEX_PARASECT 236 -#define HOENN_DEX_VENONAT 237 -#define HOENN_DEX_VENOMOTH 238 -#define HOENN_DEX_DIGLETT 239 -#define HOENN_DEX_DUGTRIO 240 -#define HOENN_DEX_MEOWTH 241 -#define HOENN_DEX_PERSIAN 242 -#define HOENN_DEX_PSYDUCK 158 -#define HOENN_DEX_GOLDUCK 159 -#define HOENN_DEX_MANKEY 243 -#define HOENN_DEX_PRIMEAPE 244 -#define HOENN_DEX_GROWLITHE 245 -#define HOENN_DEX_ARCANINE 246 -#define HOENN_DEX_POLIWAG 247 -#define HOENN_DEX_POLIWHIRL 248 -#define HOENN_DEX_POLIWRATH 249 -#define HOENN_DEX_ABRA 39 -#define HOENN_DEX_KADABRA 40 -#define HOENN_DEX_ALAKAZAM 41 -#define HOENN_DEX_MACHOP 73 -#define HOENN_DEX_MACHOKE 74 -#define HOENN_DEX_MACHAMP 75 -#define HOENN_DEX_BELLSPROUT 250 -#define HOENN_DEX_WEEPINBELL 251 -#define HOENN_DEX_VICTREEBEL 252 -#define HOENN_DEX_TENTACOOL 66 -#define HOENN_DEX_TENTACRUEL 67 -#define HOENN_DEX_GEODUDE 57 -#define HOENN_DEX_GRAVELER 58 -#define HOENN_DEX_GOLEM 59 -#define HOENN_DEX_PONYTA 253 -#define HOENN_DEX_RAPIDASH 254 -#define HOENN_DEX_SLOWPOKE 255 -#define HOENN_DEX_SLOWBRO 256 -#define HOENN_DEX_MAGNEMITE 82 -#define HOENN_DEX_MAGNETON 83 -#define HOENN_DEX_FARFETCHD 257 -#define HOENN_DEX_DODUO 92 -#define HOENN_DEX_DODRIO 93 -#define HOENN_DEX_SEEL 258 -#define HOENN_DEX_DEWGONG 259 -#define HOENN_DEX_GRIMER 106 -#define HOENN_DEX_MUK 107 -#define HOENN_DEX_SHELLDER 260 -#define HOENN_DEX_CLOYSTER 261 -#define HOENN_DEX_GASTLY 262 -#define HOENN_DEX_HAUNTER 263 -#define HOENN_DEX_GENGAR 264 -#define HOENN_DEX_ONIX 265 -#define HOENN_DEX_DROWZEE 266 -#define HOENN_DEX_HYPNO 267 -#define HOENN_DEX_KRABBY 268 -#define HOENN_DEX_KINGLER 269 -#define HOENN_DEX_VOLTORB 84 -#define HOENN_DEX_ELECTRODE 85 -#define HOENN_DEX_EXEGGCUTE 270 -#define HOENN_DEX_EXEGGUTOR 271 -#define HOENN_DEX_CUBONE 272 -#define HOENN_DEX_MAROWAK 273 -#define HOENN_DEX_HITMONLEE 274 -#define HOENN_DEX_HITMONCHAN 275 -#define HOENN_DEX_LICKITUNG 276 -#define HOENN_DEX_KOFFING 108 -#define HOENN_DEX_WEEZING 109 -#define HOENN_DEX_RHYHORN 169 -#define HOENN_DEX_RHYDON 170 -#define HOENN_DEX_CHANSEY 277 -#define HOENN_DEX_TANGELA 278 -#define HOENN_DEX_KANGASKHAN 279 -#define HOENN_DEX_HORSEA 184 -#define HOENN_DEX_SEADRA 185 -#define HOENN_DEX_GOLDEEN 50 -#define HOENN_DEX_SEAKING 51 -#define HOENN_DEX_STARYU 143 -#define HOENN_DEX_STARMIE 144 -#define HOENN_DEX_MR_MIME 280 -#define HOENN_DEX_SCYTHER 281 -#define HOENN_DEX_JYNX 282 -#define HOENN_DEX_ELECTABUZZ 283 -#define HOENN_DEX_MAGMAR 284 -#define HOENN_DEX_PINSIR 167 -#define HOENN_DEX_TAUROS 285 -#define HOENN_DEX_MAGIKARP 52 -#define HOENN_DEX_GYARADOS 53 -#define HOENN_DEX_LAPRAS 286 -#define HOENN_DEX_DITTO 287 -#define HOENN_DEX_EEVEE 288 -#define HOENN_DEX_VAPOREON 289 -#define HOENN_DEX_JOLTEON 290 -#define HOENN_DEX_FLAREON 291 -#define HOENN_DEX_PORYGON 292 -#define HOENN_DEX_OMANYTE 293 -#define HOENN_DEX_OMASTAR 294 -#define HOENN_DEX_KABUTO 295 -#define HOENN_DEX_KABUTOPS 296 -#define HOENN_DEX_AERODACTYL 297 -#define HOENN_DEX_SNORLAX 298 -#define HOENN_DEX_ARTICUNO 299 -#define HOENN_DEX_ZAPDOS 300 -#define HOENN_DEX_MOLTRES 301 -#define HOENN_DEX_DRATINI 302 -#define HOENN_DEX_DRAGONAIR 303 -#define HOENN_DEX_DRAGONITE 304 -#define HOENN_DEX_MEWTWO 305 -#define HOENN_DEX_MEW 306 -#define HOENN_DEX_CHIKORITA 307 -#define HOENN_DEX_BAYLEEF 308 -#define HOENN_DEX_MEGANIUM 309 -#define HOENN_DEX_CYNDAQUIL 310 -#define HOENN_DEX_QUILAVA 311 -#define HOENN_DEX_TYPHLOSION 312 -#define HOENN_DEX_TOTODILE 313 -#define HOENN_DEX_CROCONAW 314 -#define HOENN_DEX_FERALIGATR 315 -#define HOENN_DEX_SENTRET 316 -#define HOENN_DEX_FURRET 317 -#define HOENN_DEX_HOOTHOOT 318 -#define HOENN_DEX_NOCTOWL 319 -#define HOENN_DEX_LEDYBA 320 -#define HOENN_DEX_LEDIAN 321 -#define HOENN_DEX_SPINARAK 322 -#define HOENN_DEX_ARIADOS 323 -#define HOENN_DEX_CROBAT 65 -#define HOENN_DEX_CHINCHOU 181 -#define HOENN_DEX_LANTURN 182 -#define HOENN_DEX_PICHU 155 -#define HOENN_DEX_CLEFFA 324 -#define HOENN_DEX_IGGLYBUFF 137 -#define HOENN_DEX_TOGEPI 325 -#define HOENN_DEX_TOGETIC 326 -#define HOENN_DEX_NATU 162 -#define HOENN_DEX_XATU 163 -#define HOENN_DEX_MAREEP 327 -#define HOENN_DEX_FLAAFFY 328 -#define HOENN_DEX_AMPHAROS 329 -#define HOENN_DEX_BELLOSSOM 91 -#define HOENN_DEX_MARILL 55 -#define HOENN_DEX_AZUMARILL 56 -#define HOENN_DEX_SUDOWOODO 330 -#define HOENN_DEX_POLITOED 331 -#define HOENN_DEX_HOPPIP 332 -#define HOENN_DEX_SKIPLOOM 333 -#define HOENN_DEX_JUMPLUFF 334 -#define HOENN_DEX_AIPOM 335 -#define HOENN_DEX_SUNKERN 336 -#define HOENN_DEX_SUNFLORA 337 -#define HOENN_DEX_YANMA 338 -#define HOENN_DEX_WOOPER 339 -#define HOENN_DEX_QUAGSIRE 340 -#define HOENN_DEX_ESPEON 341 -#define HOENN_DEX_UMBREON 342 -#define HOENN_DEX_MURKROW 343 -#define HOENN_DEX_SLOWKING 344 -#define HOENN_DEX_MISDREAVUS 345 -#define HOENN_DEX_UNOWN 346 -#define HOENN_DEX_WOBBUFFET 161 -#define HOENN_DEX_GIRAFARIG 164 -#define HOENN_DEX_PINECO 347 -#define HOENN_DEX_FORRETRESS 348 -#define HOENN_DEX_DUNSPARCE 349 -#define HOENN_DEX_GLIGAR 350 -#define HOENN_DEX_STEELIX 351 -#define HOENN_DEX_SNUBBULL 352 -#define HOENN_DEX_GRANBULL 353 -#define HOENN_DEX_QWILFISH 354 -#define HOENN_DEX_SCIZOR 355 -#define HOENN_DEX_SHUCKLE 356 -#define HOENN_DEX_HERACROSS 168 -#define HOENN_DEX_SNEASEL 357 -#define HOENN_DEX_TEDDIURSA 358 -#define HOENN_DEX_URSARING 359 -#define HOENN_DEX_SLUGMA 103 -#define HOENN_DEX_MAGCARGO 104 -#define HOENN_DEX_SWINUB 360 -#define HOENN_DEX_PILOSWINE 361 -#define HOENN_DEX_CORSOLA 180 -#define HOENN_DEX_REMORAID 362 -#define HOENN_DEX_OCTILLERY 363 -#define HOENN_DEX_DELIBIRD 364 -#define HOENN_DEX_MANTINE 365 -#define HOENN_DEX_SKARMORY 115 -#define HOENN_DEX_HOUNDOUR 366 -#define HOENN_DEX_HOUNDOOM 367 -#define HOENN_DEX_KINGDRA 186 -#define HOENN_DEX_PHANPY 165 -#define HOENN_DEX_DONPHAN 166 -#define HOENN_DEX_PORYGON2 368 -#define HOENN_DEX_STANTLER 369 -#define HOENN_DEX_SMEARGLE 370 -#define HOENN_DEX_TYROGUE 371 -#define HOENN_DEX_HITMONTOP 372 -#define HOENN_DEX_SMOOCHUM 373 -#define HOENN_DEX_ELEKID 374 -#define HOENN_DEX_MAGBY 375 -#define HOENN_DEX_MILTANK 376 -#define HOENN_DEX_BLISSEY 377 -#define HOENN_DEX_RAIKOU 378 -#define HOENN_DEX_ENTEI 379 -#define HOENN_DEX_SUICUNE 380 -#define HOENN_DEX_LARVITAR 381 -#define HOENN_DEX_PUPITAR 382 -#define HOENN_DEX_TYRANITAR 383 -#define HOENN_DEX_LUGIA 384 -#define HOENN_DEX_HO_OH 385 -#define HOENN_DEX_CELEBI 386 +#define HOENN_DEX_NONE 0 +#define HOENN_DEX_TREECKO 1 +#define HOENN_DEX_GROVYLE 2 +#define HOENN_DEX_SCEPTILE 3 +#define HOENN_DEX_TORCHIC 4 +#define HOENN_DEX_COMBUSKEN 5 +#define HOENN_DEX_BLAZIKEN 6 +#define HOENN_DEX_MUDKIP 7 +#define HOENN_DEX_MARSHTOMP 8 +#define HOENN_DEX_SWAMPERT 9 +#define HOENN_DEX_POOCHYENA 10 +#define HOENN_DEX_MIGHTYENA 11 +#define HOENN_DEX_ZIGZAGOON 12 +#define HOENN_DEX_LINOONE 13 +#define HOENN_DEX_WURMPLE 14 +#define HOENN_DEX_SILCOON 15 +#define HOENN_DEX_BEAUTIFLY 16 +#define HOENN_DEX_CASCOON 17 +#define HOENN_DEX_DUSTOX 18 +#define HOENN_DEX_LOTAD 19 +#define HOENN_DEX_LOMBRE 20 +#define HOENN_DEX_LUDICOLO 21 +#define HOENN_DEX_SEEDOT 22 +#define HOENN_DEX_NUZLEAF 23 +#define HOENN_DEX_SHIFTRY 24 +#define HOENN_DEX_TAILLOW 25 +#define HOENN_DEX_SWELLOW 26 +#define HOENN_DEX_WINGULL 27 +#define HOENN_DEX_PELIPPER 28 +#define HOENN_DEX_RALTS 29 +#define HOENN_DEX_KIRLIA 30 +#define HOENN_DEX_GARDEVOIR 31 +#define HOENN_DEX_SURSKIT 32 +#define HOENN_DEX_MASQUERAIN 33 +#define HOENN_DEX_SHROOMISH 34 +#define HOENN_DEX_BRELOOM 35 +#define HOENN_DEX_SLAKOTH 36 +#define HOENN_DEX_VIGOROTH 37 +#define HOENN_DEX_SLAKING 38 +#define HOENN_DEX_ABRA 39 +#define HOENN_DEX_KADABRA 40 +#define HOENN_DEX_ALAKAZAM 41 +#define HOENN_DEX_NINCADA 42 +#define HOENN_DEX_NINJASK 43 +#define HOENN_DEX_SHEDINJA 44 +#define HOENN_DEX_WHISMUR 45 +#define HOENN_DEX_LOUDRED 46 +#define HOENN_DEX_EXPLOUD 47 +#define HOENN_DEX_MAKUHITA 48 +#define HOENN_DEX_HARIYAMA 49 +#define HOENN_DEX_GOLDEEN 50 +#define HOENN_DEX_SEAKING 51 +#define HOENN_DEX_MAGIKARP 52 +#define HOENN_DEX_GYARADOS 53 +#define HOENN_DEX_AZURILL 54 +#define HOENN_DEX_MARILL 55 +#define HOENN_DEX_AZUMARILL 56 +#define HOENN_DEX_GEODUDE 57 +#define HOENN_DEX_GRAVELER 58 +#define HOENN_DEX_GOLEM 59 +#define HOENN_DEX_NOSEPASS 60 +#define HOENN_DEX_SKITTY 61 +#define HOENN_DEX_DELCATTY 62 +#define HOENN_DEX_ZUBAT 63 +#define HOENN_DEX_GOLBAT 64 +#define HOENN_DEX_CROBAT 65 +#define HOENN_DEX_TENTACOOL 66 +#define HOENN_DEX_TENTACRUEL 67 +#define HOENN_DEX_SABLEYE 68 +#define HOENN_DEX_MAWILE 69 +#define HOENN_DEX_ARON 70 +#define HOENN_DEX_LAIRON 71 +#define HOENN_DEX_AGGRON 72 +#define HOENN_DEX_MACHOP 73 +#define HOENN_DEX_MACHOKE 74 +#define HOENN_DEX_MACHAMP 75 +#define HOENN_DEX_MEDITITE 76 +#define HOENN_DEX_MEDICHAM 77 +#define HOENN_DEX_ELECTRIKE 78 +#define HOENN_DEX_MANECTRIC 79 +#define HOENN_DEX_PLUSLE 80 +#define HOENN_DEX_MINUN 81 +#define HOENN_DEX_MAGNEMITE 82 +#define HOENN_DEX_MAGNETON 83 +#define HOENN_DEX_VOLTORB 84 +#define HOENN_DEX_ELECTRODE 85 +#define HOENN_DEX_VOLBEAT 86 +#define HOENN_DEX_ILLUMISE 87 +#define HOENN_DEX_ODDISH 88 +#define HOENN_DEX_GLOOM 89 +#define HOENN_DEX_VILEPLUME 90 +#define HOENN_DEX_BELLOSSOM 91 +#define HOENN_DEX_DODUO 92 +#define HOENN_DEX_DODRIO 93 +#define HOENN_DEX_ROSELIA 94 +#define HOENN_DEX_GULPIN 95 +#define HOENN_DEX_SWALOT 96 +#define HOENN_DEX_CARVANHA 97 +#define HOENN_DEX_SHARPEDO 98 +#define HOENN_DEX_WAILMER 99 +#define HOENN_DEX_WAILORD 100 +#define HOENN_DEX_NUMEL 101 +#define HOENN_DEX_CAMERUPT 102 +#define HOENN_DEX_SLUGMA 103 +#define HOENN_DEX_MAGCARGO 104 +#define HOENN_DEX_TORKOAL 105 +#define HOENN_DEX_GRIMER 106 +#define HOENN_DEX_MUK 107 +#define HOENN_DEX_KOFFING 108 +#define HOENN_DEX_WEEZING 109 +#define HOENN_DEX_SPOINK 110 +#define HOENN_DEX_GRUMPIG 111 +#define HOENN_DEX_SANDSHREW 112 +#define HOENN_DEX_SANDSLASH 113 +#define HOENN_DEX_SPINDA 114 +#define HOENN_DEX_SKARMORY 115 +#define HOENN_DEX_TRAPINCH 116 +#define HOENN_DEX_VIBRAVA 117 +#define HOENN_DEX_FLYGON 118 +#define HOENN_DEX_CACNEA 119 +#define HOENN_DEX_CACTURNE 120 +#define HOENN_DEX_SWABLU 121 +#define HOENN_DEX_ALTARIA 122 +#define HOENN_DEX_ZANGOOSE 123 +#define HOENN_DEX_SEVIPER 124 +#define HOENN_DEX_LUNATONE 125 +#define HOENN_DEX_SOLROCK 126 +#define HOENN_DEX_BARBOACH 127 +#define HOENN_DEX_WHISCASH 128 +#define HOENN_DEX_CORPHISH 129 +#define HOENN_DEX_CRAWDAUNT 130 +#define HOENN_DEX_BALTOY 131 +#define HOENN_DEX_CLAYDOL 132 +#define HOENN_DEX_LILEEP 133 +#define HOENN_DEX_CRADILY 134 +#define HOENN_DEX_ANORITH 135 +#define HOENN_DEX_ARMALDO 136 +#define HOENN_DEX_IGGLYBUFF 137 +#define HOENN_DEX_JIGGLYPUFF 138 +#define HOENN_DEX_WIGGLYTUFF 139 +#define HOENN_DEX_FEEBAS 140 +#define HOENN_DEX_MILOTIC 141 +#define HOENN_DEX_CASTFORM 142 +#define HOENN_DEX_STARYU 143 +#define HOENN_DEX_STARMIE 144 +#define HOENN_DEX_KECLEON 145 +#define HOENN_DEX_SHUPPET 146 +#define HOENN_DEX_BANETTE 147 +#define HOENN_DEX_DUSKULL 148 +#define HOENN_DEX_DUSCLOPS 149 +#define HOENN_DEX_TROPIUS 150 +#define HOENN_DEX_CHIMECHO 151 +#define HOENN_DEX_ABSOL 152 +#define HOENN_DEX_VULPIX 153 +#define HOENN_DEX_NINETALES 154 +#define HOENN_DEX_PICHU 155 +#define HOENN_DEX_PIKACHU 156 +#define HOENN_DEX_RAICHU 157 +#define HOENN_DEX_PSYDUCK 158 +#define HOENN_DEX_GOLDUCK 159 +#define HOENN_DEX_WYNAUT 160 +#define HOENN_DEX_WOBBUFFET 161 +#define HOENN_DEX_NATU 162 +#define HOENN_DEX_XATU 163 +#define HOENN_DEX_GIRAFARIG 164 +#define HOENN_DEX_PHANPY 165 +#define HOENN_DEX_DONPHAN 166 +#define HOENN_DEX_PINSIR 167 +#define HOENN_DEX_HERACROSS 168 +#define HOENN_DEX_RHYHORN 169 +#define HOENN_DEX_RHYDON 170 +#define HOENN_DEX_SNORUNT 171 +#define HOENN_DEX_GLALIE 172 +#define HOENN_DEX_SPHEAL 173 +#define HOENN_DEX_SEALEO 174 +#define HOENN_DEX_WALREIN 175 +#define HOENN_DEX_CLAMPERL 176 +#define HOENN_DEX_HUNTAIL 177 +#define HOENN_DEX_GOREBYSS 178 +#define HOENN_DEX_RELICANTH 179 +#define HOENN_DEX_CORSOLA 180 +#define HOENN_DEX_CHINCHOU 181 +#define HOENN_DEX_LANTURN 182 +#define HOENN_DEX_LUVDISC 183 +#define HOENN_DEX_HORSEA 184 +#define HOENN_DEX_SEADRA 185 +#define HOENN_DEX_KINGDRA 186 +#define HOENN_DEX_BAGON 187 +#define HOENN_DEX_SHELGON 188 +#define HOENN_DEX_SALAMENCE 189 +#define HOENN_DEX_BELDUM 190 +#define HOENN_DEX_METANG 191 +#define HOENN_DEX_METAGROSS 192 +#define HOENN_DEX_REGIROCK 193 +#define HOENN_DEX_REGICE 194 +#define HOENN_DEX_REGISTEEL 195 +#define HOENN_DEX_LATIAS 196 +#define HOENN_DEX_LATIOS 197 +#define HOENN_DEX_KYOGRE 198 +#define HOENN_DEX_GROUDON 199 +#define HOENN_DEX_RAYQUAZA 200 +#define HOENN_DEX_JIRACHI 201 +#define HOENN_DEX_DEOXYS 202 -#define HOENN_DEX_OLD_UNOWN_B 387 -#define HOENN_DEX_OLD_UNOWN_C 388 -#define HOENN_DEX_OLD_UNOWN_D 389 -#define HOENN_DEX_OLD_UNOWN_E 390 -#define HOENN_DEX_OLD_UNOWN_F 391 -#define HOENN_DEX_OLD_UNOWN_G 392 -#define HOENN_DEX_OLD_UNOWN_H 393 -#define HOENN_DEX_OLD_UNOWN_I 394 -#define HOENN_DEX_OLD_UNOWN_J 395 -#define HOENN_DEX_OLD_UNOWN_K 396 -#define HOENN_DEX_OLD_UNOWN_L 397 -#define HOENN_DEX_OLD_UNOWN_M 398 -#define HOENN_DEX_OLD_UNOWN_N 399 -#define HOENN_DEX_OLD_UNOWN_O 400 -#define HOENN_DEX_OLD_UNOWN_P 401 -#define HOENN_DEX_OLD_UNOWN_Q 402 -#define HOENN_DEX_OLD_UNOWN_R 403 -#define HOENN_DEX_OLD_UNOWN_S 404 -#define HOENN_DEX_OLD_UNOWN_T 405 -#define HOENN_DEX_OLD_UNOWN_U 406 -#define HOENN_DEX_OLD_UNOWN_V 407 -#define HOENN_DEX_OLD_UNOWN_W 408 -#define HOENN_DEX_OLD_UNOWN_X 409 -#define HOENN_DEX_OLD_UNOWN_Y 410 -#define HOENN_DEX_OLD_UNOWN_Z 411 +#define HOENN_DEX_COUNT HOENN_DEX_DEOXYS -#define HOENN_DEX_TREECKO 1 -#define HOENN_DEX_GROVYLE 2 -#define HOENN_DEX_SCEPTILE 3 -#define HOENN_DEX_TORCHIC 4 -#define HOENN_DEX_COMBUSKEN 5 -#define HOENN_DEX_BLAZIKEN 6 -#define HOENN_DEX_MUDKIP 7 -#define HOENN_DEX_MARSHTOMP 8 -#define HOENN_DEX_SWAMPERT 9 -#define HOENN_DEX_POOCHYENA 10 -#define HOENN_DEX_MIGHTYENA 11 -#define HOENN_DEX_ZIGZAGOON 12 -#define HOENN_DEX_LINOONE 13 -#define HOENN_DEX_WURMPLE 14 -#define HOENN_DEX_SILCOON 15 -#define HOENN_DEX_BEAUTIFLY 16 -#define HOENN_DEX_CASCOON 17 -#define HOENN_DEX_DUSTOX 18 -#define HOENN_DEX_LOTAD 19 -#define HOENN_DEX_LOMBRE 20 -#define HOENN_DEX_LUDICOLO 21 -#define HOENN_DEX_SEEDOT 22 -#define HOENN_DEX_NUZLEAF 23 -#define HOENN_DEX_SHIFTRY 24 -#define HOENN_DEX_NINCADA 42 -#define HOENN_DEX_NINJASK 43 -#define HOENN_DEX_SHEDINJA 44 -#define HOENN_DEX_TAILLOW 25 -#define HOENN_DEX_SWELLOW 26 -#define HOENN_DEX_SHROOMISH 34 -#define HOENN_DEX_BRELOOM 35 -#define HOENN_DEX_SPINDA 114 -#define HOENN_DEX_WINGULL 27 -#define HOENN_DEX_PELIPPER 28 -#define HOENN_DEX_SURSKIT 32 -#define HOENN_DEX_MASQUERAIN 33 -#define HOENN_DEX_WAILMER 99 -#define HOENN_DEX_WAILORD 100 -#define HOENN_DEX_SKITTY 61 -#define HOENN_DEX_DELCATTY 62 -#define HOENN_DEX_KECLEON 145 -#define HOENN_DEX_BALTOY 131 -#define HOENN_DEX_CLAYDOL 132 -#define HOENN_DEX_NOSEPASS 60 -#define HOENN_DEX_TORKOAL 105 -#define HOENN_DEX_SABLEYE 68 -#define HOENN_DEX_BARBOACH 127 -#define HOENN_DEX_WHISCASH 128 -#define HOENN_DEX_LUVDISC 183 -#define HOENN_DEX_CORPHISH 129 -#define HOENN_DEX_CRAWDAUNT 130 -#define HOENN_DEX_FEEBAS 140 -#define HOENN_DEX_MILOTIC 141 -#define HOENN_DEX_CARVANHA 97 -#define HOENN_DEX_SHARPEDO 98 -#define HOENN_DEX_TRAPINCH 116 -#define HOENN_DEX_VIBRAVA 117 -#define HOENN_DEX_FLYGON 118 -#define HOENN_DEX_MAKUHITA 48 -#define HOENN_DEX_HARIYAMA 49 -#define HOENN_DEX_ELECTRIKE 78 -#define HOENN_DEX_MANECTRIC 79 -#define HOENN_DEX_NUMEL 101 -#define HOENN_DEX_CAMERUPT 102 -#define HOENN_DEX_SPHEAL 173 -#define HOENN_DEX_SEALEO 174 -#define HOENN_DEX_WALREIN 175 -#define HOENN_DEX_CACNEA 119 -#define HOENN_DEX_CACTURNE 120 -#define HOENN_DEX_SNORUNT 171 -#define HOENN_DEX_GLALIE 172 -#define HOENN_DEX_LUNATONE 125 -#define HOENN_DEX_SOLROCK 126 -#define HOENN_DEX_AZURILL 54 -#define HOENN_DEX_SPOINK 110 -#define HOENN_DEX_GRUMPIG 111 -#define HOENN_DEX_PLUSLE 80 -#define HOENN_DEX_MINUN 81 -#define HOENN_DEX_MAWILE 69 -#define HOENN_DEX_MEDITITE 76 -#define HOENN_DEX_MEDICHAM 77 -#define HOENN_DEX_SWABLU 121 -#define HOENN_DEX_ALTARIA 122 -#define HOENN_DEX_WYNAUT 160 -#define HOENN_DEX_DUSKULL 148 -#define HOENN_DEX_DUSCLOPS 149 -#define HOENN_DEX_ROSELIA 94 -#define HOENN_DEX_SLAKOTH 36 -#define HOENN_DEX_VIGOROTH 37 -#define HOENN_DEX_SLAKING 38 -#define HOENN_DEX_GULPIN 95 -#define HOENN_DEX_SWALOT 96 -#define HOENN_DEX_TROPIUS 150 -#define HOENN_DEX_WHISMUR 45 -#define HOENN_DEX_LOUDRED 46 -#define HOENN_DEX_EXPLOUD 47 -#define HOENN_DEX_CLAMPERL 176 -#define HOENN_DEX_HUNTAIL 177 -#define HOENN_DEX_GOREBYSS 178 -#define HOENN_DEX_ABSOL 152 -#define HOENN_DEX_SHUPPET 146 -#define HOENN_DEX_BANETTE 147 -#define HOENN_DEX_SEVIPER 124 -#define HOENN_DEX_ZANGOOSE 123 -#define HOENN_DEX_RELICANTH 179 -#define HOENN_DEX_ARON 70 -#define HOENN_DEX_LAIRON 71 -#define HOENN_DEX_AGGRON 72 -#define HOENN_DEX_CASTFORM 142 -#define HOENN_DEX_VOLBEAT 86 -#define HOENN_DEX_ILLUMISE 87 -#define HOENN_DEX_LILEEP 133 -#define HOENN_DEX_CRADILY 134 -#define HOENN_DEX_ANORITH 135 -#define HOENN_DEX_ARMALDO 136 -#define HOENN_DEX_RALTS 29 -#define HOENN_DEX_KIRLIA 30 -#define HOENN_DEX_GARDEVOIR 31 -#define HOENN_DEX_BAGON 187 -#define HOENN_DEX_SHELGON 188 -#define HOENN_DEX_SALAMENCE 189 -#define HOENN_DEX_BELDUM 190 -#define HOENN_DEX_METANG 191 -#define HOENN_DEX_METAGROSS 192 -#define HOENN_DEX_REGIROCK 193 -#define HOENN_DEX_REGICE 194 -#define HOENN_DEX_REGISTEEL 195 -#define HOENN_DEX_KYOGRE 198 -#define HOENN_DEX_GROUDON 199 -#define HOENN_DEX_RAYQUAZA 200 -#define HOENN_DEX_LATIAS 196 -#define HOENN_DEX_LATIOS 197 -#define HOENN_DEX_JIRACHI 201 -#define HOENN_DEX_DEOXYS 202 -#define HOENN_DEX_CHIMECHO 151 +#define HOENN_DEX_BULBASAUR 203 +#define HOENN_DEX_IVYSAUR 204 +#define HOENN_DEX_VENUSAUR 205 +#define HOENN_DEX_CHARMANDER 206 +#define HOENN_DEX_CHARMELEON 207 +#define HOENN_DEX_CHARIZARD 208 +#define HOENN_DEX_SQUIRTLE 209 +#define HOENN_DEX_WARTORTLE 210 +#define HOENN_DEX_BLASTOISE 211 +#define HOENN_DEX_CATERPIE 212 +#define HOENN_DEX_METAPOD 213 +#define HOENN_DEX_BUTTERFREE 214 +#define HOENN_DEX_WEEDLE 215 +#define HOENN_DEX_KAKUNA 216 +#define HOENN_DEX_BEEDRILL 217 +#define HOENN_DEX_PIDGEY 218 +#define HOENN_DEX_PIDGEOTTO 219 +#define HOENN_DEX_PIDGEOT 220 +#define HOENN_DEX_RATTATA 221 +#define HOENN_DEX_RATICATE 222 +#define HOENN_DEX_SPEAROW 223 +#define HOENN_DEX_FEAROW 224 +#define HOENN_DEX_EKANS 225 +#define HOENN_DEX_ARBOK 226 +#define HOENN_DEX_NIDORAN_F 227 +#define HOENN_DEX_NIDORINA 228 +#define HOENN_DEX_NIDOQUEEN 229 +#define HOENN_DEX_NIDORAN_M 230 +#define HOENN_DEX_NIDORINO 231 +#define HOENN_DEX_NIDOKING 232 +#define HOENN_DEX_CLEFAIRY 233 +#define HOENN_DEX_CLEFABLE 234 +#define HOENN_DEX_PARAS 235 +#define HOENN_DEX_PARASECT 236 +#define HOENN_DEX_VENONAT 237 +#define HOENN_DEX_VENOMOTH 238 +#define HOENN_DEX_DIGLETT 239 +#define HOENN_DEX_DUGTRIO 240 +#define HOENN_DEX_MEOWTH 241 +#define HOENN_DEX_PERSIAN 242 +#define HOENN_DEX_MANKEY 243 +#define HOENN_DEX_PRIMEAPE 244 +#define HOENN_DEX_GROWLITHE 245 +#define HOENN_DEX_ARCANINE 246 +#define HOENN_DEX_POLIWAG 247 +#define HOENN_DEX_POLIWHIRL 248 +#define HOENN_DEX_POLIWRATH 249 +#define HOENN_DEX_BELLSPROUT 250 +#define HOENN_DEX_WEEPINBELL 251 +#define HOENN_DEX_VICTREEBEL 252 +#define HOENN_DEX_PONYTA 253 +#define HOENN_DEX_RAPIDASH 254 +#define HOENN_DEX_SLOWPOKE 255 +#define HOENN_DEX_SLOWBRO 256 +#define HOENN_DEX_FARFETCHD 257 +#define HOENN_DEX_SEEL 258 +#define HOENN_DEX_DEWGONG 259 +#define HOENN_DEX_SHELLDER 260 +#define HOENN_DEX_CLOYSTER 261 +#define HOENN_DEX_GASTLY 262 +#define HOENN_DEX_HAUNTER 263 +#define HOENN_DEX_GENGAR 264 +#define HOENN_DEX_ONIX 265 +#define HOENN_DEX_DROWZEE 266 +#define HOENN_DEX_HYPNO 267 +#define HOENN_DEX_KRABBY 268 +#define HOENN_DEX_KINGLER 269 +#define HOENN_DEX_EXEGGCUTE 270 +#define HOENN_DEX_EXEGGUTOR 271 +#define HOENN_DEX_CUBONE 272 +#define HOENN_DEX_MAROWAK 273 +#define HOENN_DEX_HITMONLEE 274 +#define HOENN_DEX_HITMONCHAN 275 +#define HOENN_DEX_LICKITUNG 276 +#define HOENN_DEX_CHANSEY 277 +#define HOENN_DEX_TANGELA 278 +#define HOENN_DEX_KANGASKHAN 279 +#define HOENN_DEX_MR_MIME 280 +#define HOENN_DEX_SCYTHER 281 +#define HOENN_DEX_JYNX 282 +#define HOENN_DEX_ELECTABUZZ 283 +#define HOENN_DEX_MAGMAR 284 +#define HOENN_DEX_TAUROS 285 +#define HOENN_DEX_LAPRAS 286 +#define HOENN_DEX_DITTO 287 +#define HOENN_DEX_EEVEE 288 +#define HOENN_DEX_VAPOREON 289 +#define HOENN_DEX_JOLTEON 290 +#define HOENN_DEX_FLAREON 291 +#define HOENN_DEX_PORYGON 292 +#define HOENN_DEX_OMANYTE 293 +#define HOENN_DEX_OMASTAR 294 +#define HOENN_DEX_KABUTO 295 +#define HOENN_DEX_KABUTOPS 296 +#define HOENN_DEX_AERODACTYL 297 +#define HOENN_DEX_SNORLAX 298 +#define HOENN_DEX_ARTICUNO 299 +#define HOENN_DEX_ZAPDOS 300 +#define HOENN_DEX_MOLTRES 301 +#define HOENN_DEX_DRATINI 302 +#define HOENN_DEX_DRAGONAIR 303 +#define HOENN_DEX_DRAGONITE 304 +#define HOENN_DEX_MEWTWO 305 +#define HOENN_DEX_MEW 306 +#define HOENN_DEX_CHIKORITA 307 +#define HOENN_DEX_BAYLEEF 308 +#define HOENN_DEX_MEGANIUM 309 +#define HOENN_DEX_CYNDAQUIL 310 +#define HOENN_DEX_QUILAVA 311 +#define HOENN_DEX_TYPHLOSION 312 +#define HOENN_DEX_TOTODILE 313 +#define HOENN_DEX_CROCONAW 314 +#define HOENN_DEX_FERALIGATR 315 +#define HOENN_DEX_SENTRET 316 +#define HOENN_DEX_FURRET 317 +#define HOENN_DEX_HOOTHOOT 318 +#define HOENN_DEX_NOCTOWL 319 +#define HOENN_DEX_LEDYBA 320 +#define HOENN_DEX_LEDIAN 321 +#define HOENN_DEX_SPINARAK 322 +#define HOENN_DEX_ARIADOS 323 +#define HOENN_DEX_CLEFFA 324 +#define HOENN_DEX_TOGEPI 325 +#define HOENN_DEX_TOGETIC 326 +#define HOENN_DEX_MAREEP 327 +#define HOENN_DEX_FLAAFFY 328 +#define HOENN_DEX_AMPHAROS 329 +#define HOENN_DEX_SUDOWOODO 330 +#define HOENN_DEX_POLITOED 331 +#define HOENN_DEX_HOPPIP 332 +#define HOENN_DEX_SKIPLOOM 333 +#define HOENN_DEX_JUMPLUFF 334 +#define HOENN_DEX_AIPOM 335 +#define HOENN_DEX_SUNKERN 336 +#define HOENN_DEX_SUNFLORA 337 +#define HOENN_DEX_YANMA 338 +#define HOENN_DEX_WOOPER 339 +#define HOENN_DEX_QUAGSIRE 340 +#define HOENN_DEX_ESPEON 341 +#define HOENN_DEX_UMBREON 342 +#define HOENN_DEX_MURKROW 343 +#define HOENN_DEX_SLOWKING 344 +#define HOENN_DEX_MISDREAVUS 345 +#define HOENN_DEX_UNOWN 346 +#define HOENN_DEX_PINECO 347 +#define HOENN_DEX_FORRETRESS 348 +#define HOENN_DEX_DUNSPARCE 349 +#define HOENN_DEX_GLIGAR 350 +#define HOENN_DEX_STEELIX 351 +#define HOENN_DEX_SNUBBULL 352 +#define HOENN_DEX_GRANBULL 353 +#define HOENN_DEX_QWILFISH 354 +#define HOENN_DEX_SCIZOR 355 +#define HOENN_DEX_SHUCKLE 356 +#define HOENN_DEX_SNEASEL 357 +#define HOENN_DEX_TEDDIURSA 358 +#define HOENN_DEX_URSARING 359 +#define HOENN_DEX_SWINUB 360 +#define HOENN_DEX_PILOSWINE 361 +#define HOENN_DEX_REMORAID 362 +#define HOENN_DEX_OCTILLERY 363 +#define HOENN_DEX_DELIBIRD 364 +#define HOENN_DEX_MANTINE 365 +#define HOENN_DEX_HOUNDOUR 366 +#define HOENN_DEX_HOUNDOOM 367 +#define HOENN_DEX_PORYGON2 368 +#define HOENN_DEX_STANTLER 369 +#define HOENN_DEX_SMEARGLE 370 +#define HOENN_DEX_TYROGUE 371 +#define HOENN_DEX_HITMONTOP 372 +#define HOENN_DEX_SMOOCHUM 373 +#define HOENN_DEX_ELEKID 374 +#define HOENN_DEX_MAGBY 375 +#define HOENN_DEX_MILTANK 376 +#define HOENN_DEX_BLISSEY 377 +#define HOENN_DEX_RAIKOU 378 +#define HOENN_DEX_ENTEI 379 +#define HOENN_DEX_SUICUNE 380 +#define HOENN_DEX_LARVITAR 381 +#define HOENN_DEX_PUPITAR 382 +#define HOENN_DEX_TYRANITAR 383 +#define HOENN_DEX_LUGIA 384 +#define HOENN_DEX_HO_OH 385 +#define HOENN_DEX_CELEBI 386 + +#define HOENN_DEX_OLD_UNOWN_B 387 +#define HOENN_DEX_OLD_UNOWN_C 388 +#define HOENN_DEX_OLD_UNOWN_D 389 +#define HOENN_DEX_OLD_UNOWN_E 390 +#define HOENN_DEX_OLD_UNOWN_F 391 +#define HOENN_DEX_OLD_UNOWN_G 392 +#define HOENN_DEX_OLD_UNOWN_H 393 +#define HOENN_DEX_OLD_UNOWN_I 394 +#define HOENN_DEX_OLD_UNOWN_J 395 +#define HOENN_DEX_OLD_UNOWN_K 396 +#define HOENN_DEX_OLD_UNOWN_L 397 +#define HOENN_DEX_OLD_UNOWN_M 398 +#define HOENN_DEX_OLD_UNOWN_N 399 +#define HOENN_DEX_OLD_UNOWN_O 400 +#define HOENN_DEX_OLD_UNOWN_P 401 +#define HOENN_DEX_OLD_UNOWN_Q 402 +#define HOENN_DEX_OLD_UNOWN_R 403 +#define HOENN_DEX_OLD_UNOWN_S 404 +#define HOENN_DEX_OLD_UNOWN_T 405 +#define HOENN_DEX_OLD_UNOWN_U 406 +#define HOENN_DEX_OLD_UNOWN_V 407 +#define HOENN_DEX_OLD_UNOWN_W 408 +#define HOENN_DEX_OLD_UNOWN_X 409 +#define HOENN_DEX_OLD_UNOWN_Y 410 +#define HOENN_DEX_OLD_UNOWN_Z 411 #endif // GUARD_CONSTANTS_SPECIES_H diff --git a/include/graphics.h b/include/graphics.h index 161ef4271..dad8dc1f1 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3282,25 +3282,24 @@ extern const u32 gBattleTerrainPalette_StadiumDrake[]; extern const u32 gBattleTerrainPalette_StadiumWallace[]; // pokedex -extern const u32 gPokedexMenu2_Gfx[]; -extern const u16 gPokedexText_Pal[]; +extern const u32 gPokedexInterface_Gfx[]; +extern const u16 gPokedexBgHoenn_Pal[]; extern const u32 gPokedexMenu_Gfx[]; -extern const u8 gPokedexTilemap_Main[]; -extern const u8 gPokedexTilemap_MainUnderlay[]; -extern const u8 gPokedexTilemap_StartMenu1[]; -extern const u8 gPokedexTilemap_StartMenu2[]; -extern const u16 gPokedexHoennBg_Pal[]; -extern const u16 gPokedexText_Pal[]; -extern const u16 gPokedexNationalBg_Pal[]; -extern const u8 gPokedexTilemap_DescriptionScreen[]; -extern const u8 gPokedexTilemap_CryScreen[]; -extern const u8 gPokedexTilemap_SizeScreen[]; -extern const u8 gPokedexTilemap_ScreenSelectBar1[]; -extern const u8 gPokedexTilemap_ScreenSelectBar2[]; -extern const u16 gPokedexCaughtScreenFade_Pal[]; +extern const u8 gPokedexList_Tilemap[]; +extern const u8 gPokedexListUnderlay_Tilemap[]; +extern const u8 gPokedexStartMenuMain_Tilemap[]; +extern const u8 gPokedexStartMenuSearchResults_Tilemap[]; +extern const u16 gPokedexSearchResults_Pal[]; +extern const u16 gPokedexBgNational_Pal[]; +extern const u8 gPokedexInfoScreen_Tilemap[]; +extern const u8 gPokedexCryScreen_Tilemap[]; +extern const u8 gPokedexSizeScreen_Tilemap[]; +extern const u8 gPokedexScreenSelectBarMain_Tilemap[]; +extern const u8 gPokedexScreenSelectBarSubmenu_Tilemap[]; +extern const u16 gPokedexCaughtScreen_Pal[]; extern const u32 gPokedexSearchMenu_Gfx[]; -extern const u32 gPokedexSearch2_Tilemap[]; -extern const u32 gPokedexSearch1_Tilemap[]; +extern const u32 gPokedexSearchMenuHoenn_Tilemap[]; +extern const u32 gPokedexSearchMenuNational_Tilemap[]; extern const u16 gPokedexSearchMenu_Pal[]; // berry tag screen diff --git a/include/pokedex.h b/include/pokedex.h index 532c823ee..36a48da1e 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -2,11 +2,7 @@ #define GUARD_POKEDEX_H extern u8 gUnusedPokedexU8; -extern void (*gUnknown_030060B4)(void); - -#define KANTO_DEX_COUNT 151 -#define HOENN_DEX_COUNT 202 -#define NATIONAL_DEX_COUNT 386 +extern void (*gPokedexVBlankCB)(void); enum { @@ -39,12 +35,12 @@ void ResetPokedex(void); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); -u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality); +u8 DisplayCaughtMonDexPage(u16 dexNum, u32 otId, u32 personality); s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); u16 CreateMonSpriteFromNationalDexNumber(u16, s16, s16, u16); bool16 HasAllHoennMons(void); void ResetPokedexScrollPositions(void); bool16 HasAllMons(void); -void CB2_Pokedex(void); +void CB2_OpenPokedex(void); #endif // GUARD_POKEDEX_H diff --git a/include/pokedex_cry_screen.h b/include/pokedex_cry_screen.h index 93f1b02a5..db995624c 100755 --- a/include/pokedex_cry_screen.h +++ b/include/pokedex_cry_screen.h @@ -3,8 +3,8 @@ struct CryRelatedStruct { - u16 unk0; - u8 unk2; + u16 unk0; // Assigned to val that's never read + u8 unk2; // Never read u8 paletteNo; u8 xPos; u8 yPos; @@ -12,10 +12,10 @@ struct CryRelatedStruct extern u8 gDexCryScreenState; -bool8 sub_8145354(struct CryRelatedStruct*, u8); -void sub_814545C(u8); -void sub_8145534(u16); -bool8 sub_8145850(struct CryRelatedStruct*, u8); -void sub_8145914(void); +bool8 LoadCryWaveformWindow(struct CryRelatedStruct*, u8); +void UpdateCryWaveformWindow(u8); +void CryScreenPlayButton(u16); +bool8 LoadCryMeter(struct CryRelatedStruct*, u8); +void FreeCryScreen(void); #endif diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 17f76f1a1..1a0ec1ceb 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10263,7 +10263,7 @@ static void Cmd_displaydexinfo(void) if (!gPaletteFade.active) { FreeAllWindowBuffers(); - gBattleCommunication[TASK_ID] = CreateDexDisplayMonDataTask(SpeciesToNationalPokedexNum(species), + gBattleCommunication[TASK_ID] = DisplayCaughtMonDexPage(SpeciesToNationalPokedexNum(species), gBattleMons[gBattlerTarget].otId, gBattleMons[gBattlerTarget].personality); gBattleCommunication[0]++; diff --git a/src/credits.c b/src/credits.c index a8bed9a3f..dd1166d82 100644 --- a/src/credits.c +++ b/src/credits.c @@ -23,6 +23,7 @@ #include "constants/vars.h" #include "event_data.h" #include "random.h" +#include "constants/species.h" enum { diff --git a/src/graphics.c b/src/graphics.c index c21db9abf..8a39f177e 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1257,32 +1257,27 @@ const u16 gFrontierPassMapCursor_Pal[] = INCBIN_U16("graphics/frontier_pass/map_ const u16 gFrontierPassMedalsSilver_Pal[] = INCBIN_U16("graphics/frontier_pass/silver.gbapal"); const u16 gFrontierPassMedalsGold_Pal[] = INCBIN_U16("graphics/frontier_pass/gold.gbapal"); -const u16 gPokedexText_Pal[] = INCBIN_U16("graphics/pokedex/text.gbapal"); - -const u16 gPokedexCaughtScreenFade_Pal[] = INCBIN_U16("graphics/pokedex/fade.gbapal"); - -const u16 gPokedexHoennBg_Pal[] = INCBIN_U16("graphics/pokedex/hoenn_bg.gbapal"); -const u16 gPokedexNationalBg_Pal[] = INCBIN_U16("graphics/pokedex/national_bg.gbapal"); - +// Pokedex +const u16 gPokedexBgHoenn_Pal[] = INCBIN_U16("graphics/pokedex/bg_hoenn.gbapal"); +const u16 gPokedexCaughtScreen_Pal[] = INCBIN_U16("graphics/pokedex/caught_screen.gbapal"); +const u16 gPokedexSearchResults_Pal[] = INCBIN_U16("graphics/pokedex/search_results_bg.gbapal"); +const u16 gPokedexBgNational_Pal[] = INCBIN_U16("graphics/pokedex/bg_national.gbapal"); const u32 gPokedexMenu_Gfx[] = INCBIN_U32("graphics/pokedex/menu.4bpp.lz"); -const u32 gPokedexMenu2_Gfx[] = INCBIN_U32("graphics/pokedex/menu2.4bpp.lz"); - +const u32 gPokedexInterface_Gfx[] = INCBIN_U32("graphics/pokedex/interface.4bpp.lz"); const u32 gUnused_PokedexNoBall[] = INCBIN_U32("graphics/pokedex/noball_unused.4bpp.lz"); - -const u32 gPokedexTilemap_StartMenu1[] = INCBIN_U32("graphics/pokedex/tilemap1.bin.lz"); -const u32 gPokedexTilemap_StartMenu2[] = INCBIN_U32("graphics/pokedex/tilemap2.bin.lz"); -const u32 gPokedexTilemap_Main[] = INCBIN_U32("graphics/pokedex/tilemap3.bin.lz"); -const u32 gPokedexTilemap_MainUnderlay[] = INCBIN_U32("graphics/pokedex/tilemap4.bin.lz"); -const u32 gPokedexTilemap_SizeScreen[] = INCBIN_U32("graphics/pokedex/tilemap5.bin.lz"); -const u32 gPokedexTilemap_ScreenSelectBar1[] = INCBIN_U32("graphics/pokedex/tilemap6.bin.lz"); -const u32 gPokedexTilemap_ScreenSelectBar2[] = INCBIN_U32("graphics/pokedex/tilemap7.bin.lz"); -const u32 gPokedexTilemap_DescriptionScreen[] = INCBIN_U32("graphics/pokedex/tilemap8.bin.lz"); -const u32 gPokedexTilemap_CryScreen[] = INCBIN_U32("graphics/pokedex/tilemap9.bin.lz"); - +const u32 gPokedexStartMenuMain_Tilemap[] = INCBIN_U32("graphics/pokedex/start_menu_main.bin.lz"); +const u32 gPokedexStartMenuSearchResults_Tilemap[] = INCBIN_U32("graphics/pokedex/start_menu_search_results.bin.lz"); +const u32 gPokedexList_Tilemap[] = INCBIN_U32("graphics/pokedex/list.bin.lz"); +const u32 gPokedexListUnderlay_Tilemap[] = INCBIN_U32("graphics/pokedex/list_underlay.bin.lz"); +const u32 gPokedexSizeScreen_Tilemap[] = INCBIN_U32("graphics/pokedex/size_screen.bin.lz"); +const u32 gPokedexScreenSelectBarMain_Tilemap[] = INCBIN_U32("graphics/pokedex/screen_select_bar_main.bin.lz"); +const u32 gPokedexScreenSelectBarSubmenu_Tilemap[] = INCBIN_U32("graphics/pokedex/screen_select_bar_submenu.bin.lz"); +const u32 gPokedexInfoScreen_Tilemap[] = INCBIN_U32("graphics/pokedex/info_screen.bin.lz"); +const u32 gPokedexCryScreen_Tilemap[] = INCBIN_U32("graphics/pokedex/cry_screen.bin.lz"); const u16 gPokedexSearchMenu_Pal[] = INCBIN_U16("graphics/pokedex/search_menu.gbapal"); const u32 gPokedexSearchMenu_Gfx[] = INCBIN_U32("graphics/pokedex/search_menu.4bpp.lz"); -const u32 gPokedexSearch1_Tilemap[] = INCBIN_U32("graphics/pokedex/search1.bin.lz"); -const u32 gPokedexSearch2_Tilemap[] = INCBIN_U32("graphics/pokedex/search2.bin.lz"); +const u32 gPokedexSearchMenuNational_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_national.bin.lz"); +const u32 gPokedexSearchMenuHoenn_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_hoenn.bin.lz"); const u16 gSummaryScreenPowAcc_Tilemap[] = INCBIN_U16("graphics/interface/powacc_tilemap.bin"); diff --git a/src/pokedex.c b/src/pokedex.c index bd766fbf7..7532f0c99 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -30,48 +30,123 @@ #include "constants/songs.h" #include "constants/species.h" +enum +{ + PAGE_MAIN, + PAGE_INFO, + PAGE_SEARCH, + PAGE_SEARCH_RESULTS, + PAGE_UNK, + PAGE_AREA, + PAGE_CRY, + PAGE_SIZE +}; + +enum +{ + AREA_SCREEN, + CRY_SCREEN, + SIZE_SCREEN, + CANCEL_SCREEN, + SCREEN_COUNT +}; + +enum +{ + SEARCH_NAME, + SEARCH_COLOR, + SEARCH_TYPE_LEFT, + SEARCH_TYPE_RIGHT, + SEARCH_ORDER, + SEARCH_MODE, + SEARCH_OK, + SEARCH_COUNT +}; + +enum +{ + SEARCH_TOPBAR_SEARCH, + SEARCH_TOPBAR_SHIFT, + SEARCH_TOPBAR_CANCEL, + SEARCH_TOPBAR_COUNT +}; + +enum +{ + ORDER_NUMERICAL, + ORDER_ALPHABETICAL, + ORDER_HEAVIEST, + ORDER_LIGHTEST, + ORDER_TALLEST, + ORDER_SMALLEST +}; + +enum +{ + NAME_ABC = 1, + NAME_DEF, + NAME_GHI, + NAME_JKL, + NAME_MNO, + NAME_PQR, + NAME_STU, + NAME_VWX, + NAME_YZ, +}; + +// For scrolling search parameter +#define MAX_SEARCH_PARAM_ON_SCREEN 6 +#define MAX_SEARCH_PARAM_CURSOR_POS (MAX_SEARCH_PARAM_ON_SCREEN - 1) + +#define MAX_MONS_ON_SCREEN 4 + +#define LIST_SCROLL_STEP 16 + +#define POKEBALL_ROTATION_TOP 64 +#define POKEBALL_ROTATION_BOTTOM (POKEBALL_ROTATION_TOP - 16) + // EWRAM static EWRAM_DATA struct PokedexView *sPokedexView = NULL; -static EWRAM_DATA u16 gUnknown_02039B50 = 0; -static EWRAM_DATA u8 gUnknown_02039B52 = 0; +static EWRAM_DATA u16 sLastSelectedPokemon = 0; +static EWRAM_DATA u8 sPokeBallRotation = 0; static EWRAM_DATA struct PokedexListItem *sPokedexListItem = NULL; // IWRAM common // This is written to, but never read. u8 gUnusedPokedexU8; -void (*gUnknown_030060B4)(void); +void (*gPokedexVBlankCB)(void); -struct PokedexOption +struct SearchOptionText { const u8 *description; const u8 *title; }; -struct UnknownStruct1 +struct SearchOption { - const struct PokedexOption *pokedexList; - u8 unk4; - u8 unk5; + const struct SearchOptionText *texts; + u8 taskDataCursorPos; + u8 taskDataScrollOffset; u16 numOptions; }; -struct UnknownStruct3 +struct SearchMenuTopBarItem { - const u8 *text; - u8 unk4; - u8 unk5; - u8 unk6; + const u8 *description; + u8 highlightX; + u8 highlightY; + u8 highlightWidth; }; -struct UnknownStruct4 +struct SearchMenuItem { - const u8 *text; - u8 unk4; - u8 unk5; - u8 unk6; - u8 unk7; - u8 unk8; - u8 unk9; + const u8 *description; + u8 titleBgX; + u8 titleBgY; + u8 titleBgWidth; + u8 selectionBgX; + u8 selectionBgY; + u8 selectionBgWidth; }; extern struct MusicPlayerInfo gMPlayInfo_BGM; @@ -85,163 +160,151 @@ struct PokedexListItem struct PokedexView { - struct PokedexListItem pokedexList[NATIONAL_DEX_COUNT]; - u16 unk608; - u8 unk60A_1:1; - u8 unk60A_2:1; - u8 unk60B; + struct PokedexListItem pokedexList[NATIONAL_DEX_COUNT + 1]; u16 pokemonListCount; u16 selectedPokemon; - u16 unk610; + u16 selectedPokemonBackup; u16 dexMode; - u16 unk614; + u16 dexModeBackup; u16 dexOrder; - u16 unk618; + u16 dexOrderBackup; u16 seenCount; u16 ownCount; - u16 monSpriteIds[4]; + u16 monSpriteIds[MAX_MONS_ON_SCREEN]; u16 selectedMonSpriteId; - u16 unk628; - u16 unk62A; - u8 unk62C; + u16 pokeBallRotationStep; + u16 pokeBallRotationBackup; + u8 pokeBallRotation; u8 initialVOffset; - u8 unk62E; - u8 unk62F; - s16 unk630; - s16 unk632; - u16 unk634; - u16 unk636; - u16 unk638; - u16 unk63A[4]; - u8 filler642[8]; - u8 unk64A; - u8 unk64B; - u8 unk64C_1:1; + u8 scrollTimer; + u8 scrollDirection; + s16 listVOffset; + s16 listMovingVOffset; + u16 scrollMonIncrement; + u16 maxScrollTimer; + u16 scrollSpeed; + u16 unkArr1[4]; // Cleared, never read + u8 filler[8]; + u8 currentPage; + u8 currentPageBackup; + bool8 isSearchResults:1; u8 selectedScreen; - u8 unk64E; - u8 menuIsOpen; //menuIsOpen - u16 menuCursorPos; //Menu cursor position + u8 screenSwitchState; + u8 menuIsOpen; + u16 menuCursorPos; s16 menuY; //Menu Y position (inverted because we use REG_BG0VOFS for this) - u8 unk654[8]; - u8 unk65C[8]; -}; - -enum -{ - AREA_SCREEN, - CRY_SCREEN, - SIZE_SCREEN, - CANCEL_SCREEN, + u8 unkArr2[8]; // Cleared, never read + u8 unkArr3[8]; // Cleared, never read }; // this file's functions -void sub_80BB774(void); -void sub_80BB78C(u8); -void sub_80BB7D4(u8); -void sub_80BBA28(u8); -void sub_80BBA78(u8); -void LoadPageOnceMonFinishedMoving(u8); -void sub_80BBC74(u8); -void sub_80BBD1C(u8); -void sub_80BBDE8(u8); -void sub_80BBE70(u8); -void sub_80BBEB8(u8); -void sub_80BC0A8(u8); -static void HandleButtonPress_StartMenu(u8); -void sub_80BC2D4(u8); -void sub_80BC360(u8); -void sub_80BC3DC(u8); -void sub_80BC47C(u8); -bool8 sub_80BC514(u8); -static void LoadPokedexBgPalette(u8); +static void CB2_Pokedex(void); +static void Task_OpenPokedexMainPage(u8); +static void Task_HandlePokedexInput(u8); +static void Task_WaitForScroll(u8); +static void Task_HandlePokedexStartMenuInput(u8); +static void Task_OpenInfoScreenAfterMonMovement(u8); +static void Task_WaitForExitInfoScreen(u8); +static void Task_WaitForExitSearch(u8); +static void Task_ClosePokedex(u8); +static void Task_OpenSearchResults(u8); +static void Task_HandleSearchResultsInput(u8); +static void Task_WaitForSearchResultsScroll(u8); +static void Task_HandleSearchResultsStartMenuInput(u8); +static void Task_OpenSearchResultsInfoScreenAfterMonMovement(u8); +static void Task_WaitForExitSearchResultsInfoScreen(u8); +static void Task_ReturnToPokedexFromSearchResults(u8); +static void Task_ClosePokedexFromSearchResultsStartMenu(u8); +static bool8 LoadPokedexListPage(u8); +static void LoadPokedexBgPalette(bool8); static void FreeWindowAndBgBuffers(void); -static void CreatePokedexList(u8 dexMode, u8 sortMode); +static void CreatePokedexList(u8, u8); static void CreateMonDexNum(u16, u8, u8, u16); static void CreateCaughtBall(u16, u8, u8, u16); static u8 CreateMonName(u16, u8, u8); static void ClearMonListEntry(u8 x, u8 y, u16 unused); -static void CreateInitialPokemonSprites(u16, u16); -bool8 sub_80BD404(u8, u8, u8); -u16 sub_80BD69C(u16, u16); +static void CreateMonSpritesAtPos(u16, u16); +static bool8 UpdateDexListScroll(u8, u8, u8); +static u16 TryDoPokedexScroll(u16, u16); static void UpdateSelectedMonSpriteId(void); -static bool8 UpdateSelectedMon(void); +static bool8 TryDoInfoScreenScroll(void); static u8 ClearMonSprites(void); -u16 GetPokemonSpriteToDisplay(u16); -u32 sub_80BDACC(u16, s16, s16); +static u16 GetPokemonSpriteToDisplay(u16); +static u32 CreatePokedexMonSprite(u16, s16, s16); static void CreateInterfaceSprites(u8); -void MoveMonIntoPosition(struct Sprite *sprite); +static void SpriteCB_MoveMonForInfoScreen(struct Sprite *sprite); static void SpriteCB_Scrollbar(struct Sprite *sprite); -void sub_80BE658(struct Sprite *sprite); -void sub_80BE758(struct Sprite *sprite); -void sub_80BE780(struct Sprite *sprite); -void sub_80BE44C(struct Sprite *sprite); -void sub_80BE834(struct Sprite *sprite); -void sub_80BE4E0(struct Sprite *sprite); -u8 SetupInfoScreen(struct PokedexListItem*, u8 monSpriteId); -bool8 sub_80BE9C4(u8); -u8 sub_80BE9F8(struct PokedexListItem*, u8); -void LoadInfoScreen(u8); -void ChangePokedexScreen(u8); -void LoadSelectedScreen(u8); -void BeginChangeInfoScreen(u8); -void BeginReturnToPokedex(u8); -void LoadAreaScreen(u8); -static void WaitForAreaScreenInput(u8 taskId); -void sub_80BF1EC(u8); -void LoadCryScreen(u8); -void sub_80BF5CC(u8); -void sub_80BF790(u8); -void sub_80BF7FC(u8); -void LoadSizeScreen(u8); -void sub_80BFBB0(u8); -void sub_80BFC78(u8); -void sub_80BFCDC(u16); -void sub_80BFCF4(u16); -void sub_80BFD0C(u8, u16); -void sub_80BFD7C(u8, u16); -static void Task_DisplayNewMonData(u8); -void sub_80C0088(u8); -void blockset_load_palette_to_gpu(u8); -void sub_80C01CC(struct Sprite *sprite); +static void SpriteCB_ScrollArrow(struct Sprite *sprite); +static void SpriteCB_DexListInterfaceText(struct Sprite *sprite); +static void SpriteCB_RotatingPokeBall(struct Sprite *sprite); +static void SpriteCB_SeenOwnInfo(struct Sprite *sprite); +static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite); +static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite); +static u8 LoadInfoScreen(struct PokedexListItem*, u8 monSpriteId); +static bool8 IsInfoScreenScrolling(u8); +static u8 sub_80BE9F8(struct PokedexListItem*, u8); +static void Task_LoadInfoScreen(u8); +static void Task_HandleInfoScreenInput(u8); +static void Task_SwitchScreensFromInfoScreen(u8); +static void Task_LoadInfoScreenWaitForFade(u8); +static void Task_ExitInfoScreen(u8); +static void Task_LoadAreaScreen(u8); +static void Task_WaitForAreaScreenInput(u8 taskId); +static void Task_SwitchScreensFromAreaScreen(u8); +static void Task_LoadCryScreen(u8); +static void Task_HandleCryScreenInput(u8); +static void Task_SwitchScreensFromCryScreen(u8); +static void LoadPlayArrowPalette(bool8); +static void Task_LoadSizeScreen(u8); +static void Task_HandleSizeScreenInput(u8); +static void Task_SwitchScreensFromSizeScreen(u8); +static void LoadScreenSelectBarMain(u16); +static void LoadScreenSelectBarSubmenu(u16); +static void HighlightScreenSelectBarItem(u8, u16); +static void HighlightSubmenuScreenSelectBarItem(u8, u16); +static void Task_DisplayCaughtMonDexPage(u8); +static void Task_HandleCaughtMonPageInput(u8); +static void Task_ExitCaughtMonPage(u8); +static void SpriteCB_SlideCaughtMonToCenter(struct Sprite *sprite); static void PrintMonInfo(u32 num, u32, u32 owned, u32 newEntry); static void PrintMonHeight(u16 height, u8 left, u8 top); static void PrintMonWeight(u16 weight, u8 left, u8 top); static void ResetOtherVideoRegisters(u16); -u8 sub_80C0B44(u8, u16, u8, u8); +static u8 PrintCryScreenSpeciesName(u8, u16, u8, u8); static void PrintFootprint(u8 windowId, u16 dexNum); -u16 sub_80C0EF8(u16, s16, s16, s8); -u16 sub_80C0E0C(u8, u16, u16, u16); -u8 LoadSearchMenu(void); -void Task_LoadSearchMenu(u8); -void sub_80C1570(u8); -void sub_80C15B0(u8); -void sub_80C16CC(u8); -void sub_80C170C(u8); -void sub_80C19A4(u8); -void sub_80C1A4C(u8); -void sub_80C1AB8(u8); -void sub_80C1B64(u8); -void sub_80C1BCC(u8); -void sub_80C1D38(u8); -void sub_80C1D70(u8); -void sub_80C2040(u8); -void sub_80C2064(u8, u8); -void sub_80C20F8(u8); -void sub_80C21D4(u8); -void sub_80C2294(u8); +static u16 CreateSizeScreenTrainerPic(u16, s16, s16, s8); +static u16 GetNextPosition(u8, u16, u16, u16); +static u8 LoadSearchMenu(void); +static void Task_LoadSearchMenu(u8); +static void Task_SwitchToSearchMenuTopBar(u8); +static void Task_HandleSearchTopBarInput(u8); +static void Task_SwitchToSearchMenu(u8); +static void Task_HandleSearchMenuInput(u8); +static void Task_StartPokedexSearch(u8); +static void Task_WaitAndCompleteSearch(u8); +static void Task_SearchCompleteWaitForInput(u8); +static void Task_SelectSearchMenuItem(u8); +static void Task_HandleSearchParameterInput(u8); +static void Task_ExitSearch(u8); +static void Task_ExitSearchWaitForFade(u8); +static void HighlightSelectedSearchTopBarItem(u8); +static void HighlightSelectedSearchMenuItem(u8, u8); +static void PrintSelectedSearchParameters(u8); +static void DrawOrEraseSearchParameterBox(bool8); +static void PrintSearchParameterText(u8); static u8 GetSearchModeSelection(u8 taskId, u8 option); -void sub_80C23B8(u8); -void sub_80C2594(u8); -void sub_80C2618(const u8*); -void sub_80C2638(u32); -void sub_80C2650(u32); -void sub_80C2668(u32, const u8*); -void sub_80C267C(void); +static void SetDefaultSearchModeAndOrder(u8); +static void CreateSearchParameterScrollArrows(u8); +static void EraseAndPrintSearchTextBox(const u8*); +static void EraseSelectorArrow(u32); +static void PrintSelectorArrow(u32); +static void PrintSearchParameterTitle(u32, const u8*); +static void ClearSearchParameterBoxText(void); // const rom data #include "data/pokemon/pokedex_orders.h" -static const struct OamData sOamData_855CFE4 = +static const struct OamData sOamData_ScrollBar = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -258,7 +321,7 @@ static const struct OamData sOamData_855CFE4 = .affineParam = 0 }; -static const struct OamData sOamData_855CFEC = +static const struct OamData sOamData_ScrollArrow = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -275,7 +338,7 @@ static const struct OamData sOamData_855CFEC = .affineParam = 0 }; -static const struct OamData sOamData_855CFF4 = +static const struct OamData sOamData_InterfaceText = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -292,7 +355,7 @@ static const struct OamData sOamData_855CFF4 = .affineParam = 0 }; -static const struct OamData sOamData_855CFFC = +static const struct OamData sOamData_RotatingPokeBall = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -309,7 +372,7 @@ static const struct OamData sOamData_855CFFC = .affineParam = 0 }; -static const struct OamData sOamData_855D004 = +static const struct OamData sOamData_SeenOwnText = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -326,7 +389,7 @@ static const struct OamData sOamData_855D004 = .affineParam = 0 }; -static const struct OamData sOamData_855D00C = +static const struct OamData sOamData_Dex8x16 = { .y = 160, .affineMode = ST_OAM_AFFINE_OFF, @@ -343,379 +406,380 @@ static const struct OamData sOamData_855D00C = .affineParam = 0 }; -static const union AnimCmd sSpriteAnim_855D014[] = +static const union AnimCmd sSpriteAnim_ScrollBar[] = { ANIMCMD_FRAME(3, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D01C[] = +static const union AnimCmd sSpriteAnim_ScrollArrow[] = { ANIMCMD_FRAME(1, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D024[] = +static const union AnimCmd sSpriteAnim_RotatingPokeBall[] = { ANIMCMD_FRAME(16, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D02C[] = +static const union AnimCmd sSpriteAnim_StartButton[] = { ANIMCMD_FRAME(48, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D034[] = +static const union AnimCmd sSpriteAnim_SearchText[] = { ANIMCMD_FRAME(40, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D03C[] = +static const union AnimCmd sSpriteAnim_SelectButton[] = { ANIMCMD_FRAME(32, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D044[] = +static const union AnimCmd sSpriteAnim_MenuText[] = { ANIMCMD_FRAME(56, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D04C[] = +static const union AnimCmd sSpriteAnim_SeenText[] = { ANIMCMD_FRAME(64, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D054[] = +static const union AnimCmd sSpriteAnim_OwnText[] = { ANIMCMD_FRAME(96, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D05C[] = +static const union AnimCmd sSpriteAnim_HoennText[] = { ANIMCMD_FRAME(160, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D064[] = +static const union AnimCmd sSpriteAnim_NationalText[] = { ANIMCMD_FRAME(168, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D06C[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit0[] = { ANIMCMD_FRAME(128, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D074[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit1[] = { ANIMCMD_FRAME(130, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D07C[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit2[] = { ANIMCMD_FRAME(132, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D084[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit3[] = { ANIMCMD_FRAME(134, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D08C[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit4[] = { ANIMCMD_FRAME(136, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D094[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit5[] = { ANIMCMD_FRAME(138, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D09C[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit6[] = { ANIMCMD_FRAME(140, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0A4[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit7[] = { ANIMCMD_FRAME(142, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0AC[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit8[] = { ANIMCMD_FRAME(144, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0B4[] = +static const union AnimCmd sSpriteAnim_HoennSeenOwnDigit9[] = { ANIMCMD_FRAME(146, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0BC[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit0[] = { ANIMCMD_FRAME(176, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0C4[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit1[] = { ANIMCMD_FRAME(178, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0CC[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit2[] = { ANIMCMD_FRAME(180, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0D4[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit3[] = { ANIMCMD_FRAME(182, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0DC[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit4[] = { ANIMCMD_FRAME(184, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0E4[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit5[] = { ANIMCMD_FRAME(186, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0EC[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit6[] = { ANIMCMD_FRAME(188, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0F4[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit7[] = { ANIMCMD_FRAME(190, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D0FC[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit8[] = { ANIMCMD_FRAME(192, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D104[] = +static const union AnimCmd sSpriteAnim_NationalSeenOwnDigit9[] = { ANIMCMD_FRAME(194, 30), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_855D10C[] = +static const union AnimCmd sSpriteAnim_DexListStartMenuCursor[] = { ANIMCMD_FRAME(4, 30), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_855D114[] = +static const union AnimCmd *const sSpriteAnimTable_ScrollBar[] = { - sSpriteAnim_855D014 + sSpriteAnim_ScrollBar }; -static const union AnimCmd *const sSpriteAnimTable_855D118[] = +static const union AnimCmd *const sSpriteAnimTable_ScrollArrow[] = { - sSpriteAnim_855D01C + sSpriteAnim_ScrollArrow }; -static const union AnimCmd *const sSpriteAnimTable_855D11C[] = +static const union AnimCmd *const sSpriteAnimTable_RotatingPokeBall[] = { - sSpriteAnim_855D024 + sSpriteAnim_RotatingPokeBall }; -static const union AnimCmd *const sSpriteAnimTable_855D120[] = +static const union AnimCmd *const sSpriteAnimTable_InterfaceText[] = { - sSpriteAnim_855D02C, - sSpriteAnim_855D034, - sSpriteAnim_855D03C, - sSpriteAnim_855D044 + sSpriteAnim_StartButton, + sSpriteAnim_SearchText, + sSpriteAnim_SelectButton, + sSpriteAnim_MenuText }; -static const union AnimCmd *const sSpriteAnimTable_855D130[] = +static const union AnimCmd *const sSpriteAnimTable_SeenOwnText[] = { - sSpriteAnim_855D04C, - sSpriteAnim_855D054 + sSpriteAnim_SeenText, + sSpriteAnim_OwnText }; -static const union AnimCmd *const sSpriteAnimTable_855D138[] = +static const union AnimCmd *const sSpriteAnimTable_HoennNationalText[] = { - sSpriteAnim_855D05C, - sSpriteAnim_855D064 + sSpriteAnim_HoennText, + sSpriteAnim_NationalText }; -static const union AnimCmd *const sSpriteAnimTable_855D140[] = +static const union AnimCmd *const sSpriteAnimTable_HoennSeenOwnNumber[] = { - sSpriteAnim_855D06C, - sSpriteAnim_855D074, - sSpriteAnim_855D07C, - sSpriteAnim_855D084, - sSpriteAnim_855D08C, - sSpriteAnim_855D094, - sSpriteAnim_855D09C, - sSpriteAnim_855D0A4, - sSpriteAnim_855D0AC, - sSpriteAnim_855D0B4 + sSpriteAnim_HoennSeenOwnDigit0, + sSpriteAnim_HoennSeenOwnDigit1, + sSpriteAnim_HoennSeenOwnDigit2, + sSpriteAnim_HoennSeenOwnDigit3, + sSpriteAnim_HoennSeenOwnDigit4, + sSpriteAnim_HoennSeenOwnDigit5, + sSpriteAnim_HoennSeenOwnDigit6, + sSpriteAnim_HoennSeenOwnDigit7, + sSpriteAnim_HoennSeenOwnDigit8, + sSpriteAnim_HoennSeenOwnDigit9 }; -static const union AnimCmd *const sSpriteAnimTable_855D168[] = +static const union AnimCmd *const sSpriteAnimTable_NationalSeenOwnNumber[] = { - sSpriteAnim_855D0BC, - sSpriteAnim_855D0C4, - sSpriteAnim_855D0CC, - sSpriteAnim_855D0D4, - sSpriteAnim_855D0DC, - sSpriteAnim_855D0E4, - sSpriteAnim_855D0EC, - sSpriteAnim_855D0F4, - sSpriteAnim_855D0FC, - sSpriteAnim_855D104 + sSpriteAnim_NationalSeenOwnDigit0, + sSpriteAnim_NationalSeenOwnDigit1, + sSpriteAnim_NationalSeenOwnDigit2, + sSpriteAnim_NationalSeenOwnDigit3, + sSpriteAnim_NationalSeenOwnDigit4, + sSpriteAnim_NationalSeenOwnDigit5, + sSpriteAnim_NationalSeenOwnDigit6, + sSpriteAnim_NationalSeenOwnDigit7, + sSpriteAnim_NationalSeenOwnDigit8, + sSpriteAnim_NationalSeenOwnDigit9 }; -static const union AnimCmd *const sSpriteAnimTable_855D190[] = +static const union AnimCmd *const sSpriteAnimTable_DexListStartMenuCursor[] = { - sSpriteAnim_855D10C + sSpriteAnim_DexListStartMenuCursor }; static const struct SpriteTemplate sScrollBarSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855CFE4, - .anims = sSpriteAnimTable_855D114, + .oam = &sOamData_ScrollBar, + .anims = sSpriteAnimTable_ScrollBar, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_Scrollbar, }; -static const struct SpriteTemplate sArrowSpriteTemplate = +static const struct SpriteTemplate sScrollArrowSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855CFEC, - .anims = sSpriteAnimTable_855D118, + .oam = &sOamData_ScrollArrow, + .anims = sSpriteAnimTable_ScrollArrow, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE658, + .callback = SpriteCB_ScrollArrow, }; static const struct SpriteTemplate sInterfaceTextSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855CFF4, - .anims = sSpriteAnimTable_855D120, + .oam = &sOamData_InterfaceText, + .anims = sSpriteAnimTable_InterfaceText, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE758, + .callback = SpriteCB_DexListInterfaceText, }; -static const struct SpriteTemplate sRotatingPokeballSpriteTemplate = +static const struct SpriteTemplate sRotatingPokeBallSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855CFFC, - .anims = sSpriteAnimTable_855D11C, + .oam = &sOamData_RotatingPokeBall, + .anims = sSpriteAnimTable_RotatingPokeBall, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE780, + .callback = SpriteCB_RotatingPokeBall, }; static const struct SpriteTemplate sSeenOwnTextSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855D004, - .anims = sSpriteAnimTable_855D130, + .oam = &sOamData_SeenOwnText, + .anims = sSpriteAnimTable_SeenOwnText, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE44C, + .callback = SpriteCB_SeenOwnInfo, }; -static const struct SpriteTemplate gUnknown_0855D20C = +static const struct SpriteTemplate sHoennNationalTextSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855CFF4, - .anims = sSpriteAnimTable_855D138, + .oam = &sOamData_InterfaceText, + .anims = sSpriteAnimTable_HoennNationalText, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE44C, + .callback = SpriteCB_SeenOwnInfo, }; -static const struct SpriteTemplate gUnknown_0855D224 = +static const struct SpriteTemplate sHoennDexSeenOwnNumberSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855D00C, - .anims = sSpriteAnimTable_855D140, + .oam = &sOamData_Dex8x16, + .anims = sSpriteAnimTable_HoennSeenOwnNumber, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE44C, + .callback = SpriteCB_SeenOwnInfo, }; -static const struct SpriteTemplate gUnknown_0855D23C = +static const struct SpriteTemplate sNationalDexSeenOwnNumberSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855D00C, - .anims = sSpriteAnimTable_855D168, + .oam = &sOamData_Dex8x16, + .anims = sSpriteAnimTable_NationalSeenOwnNumber, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE44C, + .callback = SpriteCB_SeenOwnInfo, }; -static const struct SpriteTemplate gUnknown_0855D254 = +static const struct SpriteTemplate sDexListStartMenuCursorSpriteTemplate = { .tileTag = 4096, .paletteTag = 4096, - .oam = &sOamData_855D00C, - .anims = sSpriteAnimTable_855D190, + .oam = &sOamData_Dex8x16, + .anims = sSpriteAnimTable_DexListStartMenuCursor, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80BE834, + .callback = SpriteCB_DexListStartMenuCursor, }; static const struct CompressedSpriteSheet sInterfaceSpriteSheet[] = { - {gPokedexMenu2_Gfx, 0x2000, 4096}, + {gPokedexInterface_Gfx, 0x2000, 4096}, {0} }; static const struct SpritePalette sInterfaceSpritePalette[] = { - {gPokedexText_Pal, 4096}, + {gPokedexBgHoenn_Pal, 4096}, {0} }; -static const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20}; -static const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1}; +// By scroll speed. Last element of each unused +static const u8 sScrollMonIncrements[] = {4, 8, 16, 32, 32}; +static const u8 sScrollTimers[] = {8, 4, 2, 1, 1}; static const struct BgTemplate sPokedex_BgTemplate[] = { @@ -772,7 +836,7 @@ static const struct WindowTemplate sPokemonList_WindowTemplate[] = }; static const u8 sText_No000[] = _("{NO}000"); -static const u8 gUnknown_0855D2BE[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp"); +static const u8 sCaughtBall_Gfx[] = INCBIN_U8("graphics/pokedex/caught_ball.4bpp"); static const u8 sText_TenDashes[] = _("----------"); ALIGNED(4) static const u8 gExpandedPlaceholder_PokedexDescription[] = _(""); @@ -780,7 +844,7 @@ ALIGNED(4) static const u8 gExpandedPlaceholder_PokedexDescription[] = _(""); #include "data/pokemon/pokedex_text.h" #include "data/pokemon/pokedex_entries.h" -static const u16 gUnknown_0856E610[] = INCBIN_U16("graphics/pokedex/black.gbapal"); +static const u16 sSizeScreenSilhouette_Pal[] = INCBIN_U16("graphics/pokedex/size_silhouette.gbapal"); static const struct BgTemplate sInfoScreen_BgTemplate[] = { @@ -829,41 +893,45 @@ static const struct BgTemplate sInfoScreen_BgTemplate[] = static const struct WindowTemplate sInfoScreen_WindowTemplates[] = { - { // WIN_INFO + [WIN_INFO] = + { .bg = 2, .tilemapLeft = 0, .tilemapTop = 0, .width = 32, .height = 20, .paletteNum = 0, - .baseBlock = 0x0001, + .baseBlock = 1, }, - { // WIN_FOOTPRINT + [WIN_FOOTPRINT] = + { .bg = 2, .tilemapLeft = 25, .tilemapTop = 8, .width = 2, .height = 2, .paletteNum = 15, - .baseBlock = 0x0281, + .baseBlock = 641, }, - { // WIN_CRY_WAVE + [WIN_CRY_WAVE] = + { .bg = 0, .tilemapLeft = 0, .tilemapTop = 12, .width = 32, .height = 7, .paletteNum = 8, - .baseBlock = 0x0285, + .baseBlock = 645, }, - { // WIN_VU_METER + [WIN_VU_METER] = + { .bg = 2, .tilemapLeft = 18, .tilemapTop = 3, .width = 10, .height = 8, .paletteNum = 9, - .baseBlock = 0x0365, + .baseBlock = 869, }, DUMMY_WIN_TEMPLATE }; @@ -892,23 +960,25 @@ static const struct BgTemplate sNewEntryInfoScreen_BgTemplate[] = static const struct WindowTemplate sNewEntryInfoScreen_WindowTemplates[] = { - { // WIN_INFO + [WIN_INFO] = + { .bg = 2, .tilemapLeft = 0, .tilemapTop = 0, .width = 32, .height = 20, .paletteNum = 0, - .baseBlock = 0x0001, + .baseBlock = 1, }, - { // WIN_FOOTPRINT + [WIN_FOOTPRINT] = + { .bg = 2, .tilemapLeft = 25, .tilemapTop = 8, .width = 2, .height = 2, .paletteNum = 15, - .baseBlock = 0x0281, + .baseBlock = 641, }, DUMMY_WIN_TEMPLATE }; @@ -917,203 +987,392 @@ static const u8 sText_TenDashes2[] = _("----------"); #include "data/pokemon_graphics/footprint_table.h" -static const u8 gUnknown_0856ED08[][4] = +// First character in range followed by number of characters in range for upper and lowercase +static const u8 sLetterSearchRanges[][4] = { - {0x00, 0x00, 0x00, 0x00}, - {0xbb, 0x03, 0xd5, 0x03}, - {0xbe, 0x03, 0xd8, 0x03}, - {0xc1, 0x03, 0xdb, 0x03}, - {0xc4, 0x03, 0xde, 0x03}, - {0xc7, 0x03, 0xe1, 0x03}, - {0xca, 0x03, 0xe4, 0x03}, - {0xcd, 0x03, 0xe7, 0x03}, - {0xd0, 0x03, 0xea, 0x03}, - {0xd3, 0x02, 0xed, 0x02}, + {}, // Name not specified, shouldn't be reached + [NAME_ABC] = {CHAR_A, 3, CHAR_a, 3}, + [NAME_DEF] = {CHAR_D, 3, CHAR_d, 3}, + [NAME_GHI] = {CHAR_G, 3, CHAR_g, 3}, + [NAME_JKL] = {CHAR_J, 3, CHAR_j, 3}, + [NAME_MNO] = {CHAR_M, 3, CHAR_m, 3}, + [NAME_PQR] = {CHAR_P, 3, CHAR_p, 3}, + [NAME_STU] = {CHAR_S, 3, CHAR_s, 3}, + [NAME_VWX] = {CHAR_V, 3, CHAR_v, 3}, + [NAME_YZ] = {CHAR_Y, 2, CHAR_y, 2}, }; -static const struct UnknownStruct3 gUnknown_0856ED30[] = +#define LETTER_IN_RANGE_UPPER(letter, range) \ + ((letter) >= sLetterSearchRanges[range][0] \ + && (letter) < sLetterSearchRanges[range][0] + sLetterSearchRanges[range][1]) \ + +#define LETTER_IN_RANGE_LOWER(letter, range) \ + ((letter) >= sLetterSearchRanges[range][2] \ + && (letter) < sLetterSearchRanges[range][2] + sLetterSearchRanges[range][3]) \ + +static const struct SearchMenuTopBarItem sSearchMenuTopBarItems[SEARCH_TOPBAR_COUNT] = { + [SEARCH_TOPBAR_SEARCH] = { - .text = gText_SearchForPkmnBasedOnParameters, - .unk4 = 0, - .unk5 = 0, - .unk6 = 5, + .description = gText_SearchForPkmnBasedOnParameters, + .highlightX = 0, + .highlightY = 0, + .highlightWidth = 5, }, + [SEARCH_TOPBAR_SHIFT] = { - .text = gText_SwitchPokedexListings, - .unk4 = 6, - .unk5 = 0, - .unk6 = 5, + .description = gText_SwitchPokedexListings, + .highlightX = 6, + .highlightY = 0, + .highlightWidth = 5, }, + [SEARCH_TOPBAR_CANCEL] = { - .text = gText_ReturnToPokedex, - .unk4 = 12, - .unk5 = 0, - .unk6 = 5, + .description = gText_ReturnToPokedex, + .highlightX = 12, + .highlightY = 0, + .highlightWidth = 5, }, }; -static const struct UnknownStruct4 gUnknown_0856ED48[] = +static const struct SearchMenuItem sSearchMenuItems[SEARCH_COUNT] = { + [SEARCH_NAME] = { - .text = gText_ListByFirstLetter, - .unk4 = 0, - .unk5 = 2, - .unk6 = 5, - .unk7 = 5, - .unk8 = 2, - .unk9 = 12, + .description = gText_ListByFirstLetter, + .titleBgX = 0, + .titleBgY = 2, + .titleBgWidth = 5, + .selectionBgX = 5, + .selectionBgY = 2, + .selectionBgWidth = 12, }, + [SEARCH_COLOR] = { - .text = gText_ListByBodyColor, - .unk4 = 0, - .unk5 = 4, - .unk6 = 5, - .unk7 = 5, - .unk8 = 4, - .unk9 = 12, + .description = gText_ListByBodyColor, + .titleBgX = 0, + .titleBgY = 4, + .titleBgWidth = 5, + .selectionBgX = 5, + .selectionBgY = 4, + .selectionBgWidth = 12, }, + [SEARCH_TYPE_LEFT] = { - .text = gText_ListByType, - .unk4 = 0, - .unk5 = 6, - .unk6 = 5, - .unk7 = 5, - .unk8 = 6, - .unk9 = 6, + .description = gText_ListByType, + .titleBgX = 0, + .titleBgY = 6, + .titleBgWidth = 5, + .selectionBgX = 5, + .selectionBgY = 6, + .selectionBgWidth = 6, }, + [SEARCH_TYPE_RIGHT] = { - .text = gText_ListByType, - .unk4 = 0, - .unk5 = 6, - .unk6 = 5, - .unk7 = 11, - .unk8 = 6, - .unk9 = 6, + .description = gText_ListByType, + .titleBgX = 0, + .titleBgY = 6, + .titleBgWidth = 5, + .selectionBgX = 11, + .selectionBgY = 6, + .selectionBgWidth = 6, }, + [SEARCH_ORDER] = { - .text = gText_SelectPokedexListingMode, - .unk4 = 0, - .unk5 = 8, - .unk6 = 5, - .unk7 = 5, - .unk8 = 8, - .unk9 = 12, + .description = gText_SelectPokedexListingMode, + .titleBgX = 0, + .titleBgY = 8, + .titleBgWidth = 5, + .selectionBgX = 5, + .selectionBgY = 8, + .selectionBgWidth = 12, }, + [SEARCH_MODE] = { - .text = gText_SelectPokedexMode, - .unk4 = 0, - .unk5 = 10, - .unk6 = 5, - .unk7 = 5, - .unk8 = 10, - .unk9 = 12, + .description = gText_SelectPokedexMode, + .titleBgX = 0, + .titleBgY = 10, + .titleBgWidth = 5, + .selectionBgX = 5, + .selectionBgY = 10, + .selectionBgWidth = 12, }, + [SEARCH_OK] = { - .text = gText_ExecuteSearchSwitch, - .unk4 = 0, - .unk5 = 12, - .unk6 = 5, - .unk7 = 0, - .unk8 = 0, - .unk9 = 0, + .description = gText_ExecuteSearchSwitch, + .titleBgX = 0, + .titleBgY = 12, + .titleBgWidth = 5, + .selectionBgX = 0, + .selectionBgY = 0, + .selectionBgWidth = 0, }, }; -static const u8 gUnknown_0856ED9C[][4] = +// Left, Right, Up, Down +static const u8 sSearchMovementMap_SearchNatDex[SEARCH_COUNT][4] = { - {0xFF, 0xFF, 0xFF, 1}, - {0xFF, 0xFF, 0, 2}, - {0xFF, 3, 1, 4}, - { 2, 0xFF, 1, 4}, - {0xFF, 0xFF, 2, 5}, - {0xFF, 0xFF, 4, 6}, - {0xFF, 0xFF, 5, 0xFF}, + [SEARCH_NAME] = + { + 0xFF, + 0xFF, + 0xFF, + SEARCH_COLOR + }, + [SEARCH_COLOR] = + { + 0xFF, + 0xFF, + SEARCH_NAME, + SEARCH_TYPE_LEFT + }, + [SEARCH_TYPE_LEFT] = + { + 0xFF, + SEARCH_TYPE_RIGHT, + SEARCH_COLOR, + SEARCH_ORDER + }, + [SEARCH_TYPE_RIGHT] = + { SEARCH_TYPE_LEFT, + 0xFF, + SEARCH_COLOR, + SEARCH_ORDER + }, + [SEARCH_ORDER] = + { + 0xFF, + 0xFF, + SEARCH_TYPE_LEFT, + SEARCH_MODE + }, + [SEARCH_MODE] = + { + 0xFF, + 0xFF, + SEARCH_ORDER, + SEARCH_OK + }, + [SEARCH_OK] = + { + 0xFF, + 0xFF, + SEARCH_MODE, + 0xFF + }, }; -static const u8 gUnknown_0856EDB8[][4] = +// Left, Right, Up, Down +static const u8 sSearchMovementMap_ShiftNatDex[SEARCH_COUNT][4] = { - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 5}, - {0xFF, 0xFF, 4, 6}, - {0xFF, 0xFF, 5, 0xFF}, + [SEARCH_NAME] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_COLOR] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_TYPE_LEFT] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_TYPE_RIGHT] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_ORDER] = + { + 0xFF, + 0xFF, + 0xFF, + SEARCH_MODE + }, + [SEARCH_MODE] = + { + 0xFF, + 0xFF, + SEARCH_ORDER, + SEARCH_OK + }, + [SEARCH_OK] = + { + 0xFF, + 0xFF, + SEARCH_MODE, + 0xFF + }, }; -static const u8 gUnknown_0856EDD4[][4] = +// Left, Right, Up, Down +static const u8 sSearchMovementMap_SearchHoennDex[SEARCH_COUNT][4] = { - {0xFF, 0xFF, 0xFF, 1}, - {0xFF, 0xFF, 0, 2}, - {0xFF, 3, 1, 4}, - { 2, 0xFF, 1, 4}, - {0xFF, 0xFF, 2, 6}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 4, 0xFF}, + [SEARCH_NAME] = + { + 0xFF, + 0xFF, + 0xFF, + SEARCH_COLOR + }, + [SEARCH_COLOR] = + { + 0xFF, + 0xFF, + SEARCH_NAME, + SEARCH_TYPE_LEFT + }, + [SEARCH_TYPE_LEFT] = + { + 0xFF, + SEARCH_TYPE_RIGHT, + SEARCH_COLOR, + SEARCH_ORDER + }, + [SEARCH_TYPE_RIGHT] = + { SEARCH_TYPE_LEFT, + 0xFF, + SEARCH_COLOR, + SEARCH_ORDER + }, + [SEARCH_ORDER] = + { + 0xFF, + 0xFF, + SEARCH_TYPE_LEFT, + SEARCH_OK + }, + [SEARCH_MODE] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_OK] = + { + 0xFF, + 0xFF, + SEARCH_ORDER, + 0xFF + }, }; -static const u8 gUnknown_0856EDF0[][4] = +// Left, Right, Up, Down +static const u8 sSearchMovementMap_ShiftHoennDex[SEARCH_COUNT][4] = { - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF, 6}, - {0xFF, 0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 4, 0xFF}, + [SEARCH_NAME] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_COLOR] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_TYPE_LEFT] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_TYPE_RIGHT] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_ORDER] = + { + 0xFF, + 0xFF, + 0xFF, + SEARCH_OK + }, + [SEARCH_MODE] = + { + 0xFF, + 0xFF, + 0xFF, + 0xFF + }, + [SEARCH_OK] = + { + 0xFF, + 0xFF, + SEARCH_ORDER, + 0xFF + }, }; -static const struct PokedexOption gDexModeOptions[] = +static const struct SearchOptionText sDexModeOptions[] = { - {gText_DexHoennDescription, gText_DexHoennTitle}, - {gText_DexNatDescription, gText_DexNatTitle}, - {NULL, NULL}, + [DEX_MODE_HOENN] = {gText_DexHoennDescription, gText_DexHoennTitle}, + [DEX_MODE_NATIONAL] = {gText_DexNatDescription, gText_DexNatTitle}, + {}, }; -static const struct PokedexOption gDexSortOptions[] = +static const struct SearchOptionText sDexOrderOptions[] = { - {gText_DexSortNumericalDescription, gText_DexSortNumericalTitle}, - {gText_DexSortAtoZDescription, gText_DexSortAtoZTitle}, - {gText_DexSortHeaviestDescription, gText_DexSortHeaviestTitle}, - {gText_DexSortLightestDescription, gText_DexSortLightestTitle}, - {gText_DexSortTallestDescription, gText_DexSortTallestTitle}, - {gText_DexSortSmallestDescription, gText_DexSortSmallestTitle}, - {NULL, NULL}, + [ORDER_NUMERICAL] = {gText_DexSortNumericalDescription, gText_DexSortNumericalTitle}, + [ORDER_ALPHABETICAL] = {gText_DexSortAtoZDescription, gText_DexSortAtoZTitle}, + [ORDER_HEAVIEST] = {gText_DexSortHeaviestDescription, gText_DexSortHeaviestTitle}, + [ORDER_LIGHTEST] = {gText_DexSortLightestDescription, gText_DexSortLightestTitle}, + [ORDER_TALLEST] = {gText_DexSortTallestDescription, gText_DexSortTallestTitle}, + [ORDER_SMALLEST] = {gText_DexSortSmallestDescription, gText_DexSortSmallestTitle}, + {}, }; -static const struct PokedexOption gDexSearchAlphaOptions[] = +static const struct SearchOptionText sDexSearchNameOptions[] = { {gText_DexEmptyString, gText_DexSearchDontSpecify}, - {gText_DexEmptyString, gText_DexSearchAlphaABC}, - {gText_DexEmptyString, gText_DexSearchAlphaDEF}, - {gText_DexEmptyString, gText_DexSearchAlphaGHI}, - {gText_DexEmptyString, gText_DexSearchAlphaJKL}, - {gText_DexEmptyString, gText_DexSearchAlphaMNO}, - {gText_DexEmptyString, gText_DexSearchAlphaPQR}, - {gText_DexEmptyString, gText_DexSearchAlphaSTU}, - {gText_DexEmptyString, gText_DexSearchAlphaVWX}, - {gText_DexEmptyString, gText_DexSearchAlphaYZ}, - {NULL, NULL}, + [NAME_ABC] = {gText_DexEmptyString, gText_DexSearchAlphaABC}, + [NAME_DEF] = {gText_DexEmptyString, gText_DexSearchAlphaDEF}, + [NAME_GHI] = {gText_DexEmptyString, gText_DexSearchAlphaGHI}, + [NAME_JKL] = {gText_DexEmptyString, gText_DexSearchAlphaJKL}, + [NAME_MNO] = {gText_DexEmptyString, gText_DexSearchAlphaMNO}, + [NAME_PQR] = {gText_DexEmptyString, gText_DexSearchAlphaPQR}, + [NAME_STU] = {gText_DexEmptyString, gText_DexSearchAlphaSTU}, + [NAME_VWX] = {gText_DexEmptyString, gText_DexSearchAlphaVWX}, + [NAME_YZ] = {gText_DexEmptyString, gText_DexSearchAlphaYZ}, + {}, }; -static const struct PokedexOption gDexSearchColorOptions[] = +static const struct SearchOptionText sDexSearchColorOptions[] = { {gText_DexEmptyString, gText_DexSearchDontSpecify}, - {gText_DexEmptyString, gText_DexSearchColorRed}, - {gText_DexEmptyString, gText_DexSearchColorBlue}, - {gText_DexEmptyString, gText_DexSearchColorYellow}, - {gText_DexEmptyString, gText_DexSearchColorGreen}, - {gText_DexEmptyString, gText_DexSearchColorBlack}, - {gText_DexEmptyString, gText_DexSearchColorBrown}, - {gText_DexEmptyString, gText_DexSearchColorPurple}, - {gText_DexEmptyString, gText_DexSearchColorGray}, - {gText_DexEmptyString, gText_DexSearchColorWhite}, - {gText_DexEmptyString, gText_DexSearchColorPink}, - {NULL, NULL}, + [BODY_COLOR_RED + 1] = {gText_DexEmptyString, gText_DexSearchColorRed}, + [BODY_COLOR_BLUE + 1] = {gText_DexEmptyString, gText_DexSearchColorBlue}, + [BODY_COLOR_YELLOW + 1] = {gText_DexEmptyString, gText_DexSearchColorYellow}, + [BODY_COLOR_GREEN + 1] = {gText_DexEmptyString, gText_DexSearchColorGreen}, + [BODY_COLOR_BLACK + 1] = {gText_DexEmptyString, gText_DexSearchColorBlack}, + [BODY_COLOR_BROWN + 1] = {gText_DexEmptyString, gText_DexSearchColorBrown}, + [BODY_COLOR_PURPLE + 1] = {gText_DexEmptyString, gText_DexSearchColorPurple}, + [BODY_COLOR_GRAY + 1] = {gText_DexEmptyString, gText_DexSearchColorGray}, + [BODY_COLOR_WHITE + 1] = {gText_DexEmptyString, gText_DexSearchColorWhite}, + [BODY_COLOR_PINK + 1] = {gText_DexEmptyString, gText_DexSearchColorPink}, + {}, }; -static const struct PokedexOption gDexSearchTypeOptions[] = +static const struct SearchOptionText sDexSearchTypeOptions[] = { {gText_DexEmptyString, gText_DexSearchTypeNone}, {gText_DexEmptyString, gTypeNames[TYPE_NORMAL]}, @@ -1133,36 +1392,21 @@ static const struct PokedexOption gDexSearchTypeOptions[] = {gText_DexEmptyString, gTypeNames[TYPE_ICE]}, {gText_DexEmptyString, gTypeNames[TYPE_DRAGON]}, {gText_DexEmptyString, gTypeNames[TYPE_DARK]}, - {NULL, NULL}, + {}, }; - -#define SEARCH_NAME 0 -#define SEARCH_COLOR 1 -#define SEARCH_TYPE_1 2 -#define SEARCH_TYPE_2 3 -#define SEARCH_ORDER 4 -#define SEARCH_DEX_MODE 5 - -#define SORT_NUMERICAL 0 -#define SORT_ALPHABETICAL 1 -#define SORT_HEAVIEST 2 -#define SORT_LIGHTEST 3 -#define SORT_TALLEST 4 -#define SORT_SMALLEST 5 - static const u8 sPokedexModes[] = {DEX_MODE_HOENN, DEX_MODE_NATIONAL}; -static const u8 sSortOptions[] = +static const u8 sOrderOptions[] = { - SORT_NUMERICAL, - SORT_ALPHABETICAL, - SORT_HEAVIEST, - SORT_LIGHTEST, - SORT_TALLEST, - SORT_SMALLEST, + ORDER_NUMERICAL, + ORDER_ALPHABETICAL, + ORDER_HEAVIEST, + ORDER_LIGHTEST, + ORDER_TALLEST, + ORDER_SMALLEST, }; -static const u8 gDexSearchTypeIds[] = +static const u8 sDexSearchTypeIds[] = { TYPE_NONE, TYPE_NORMAL, @@ -1184,14 +1428,16 @@ static const u8 gDexSearchTypeIds[] = TYPE_DARK, }; -static const struct UnknownStruct1 sSearchOptions[] = +// Number pairs are the task data for tracking the cursor pos and scroll offset of each option list +// See task data defines above Task_LoadSearchMenu +static const struct SearchOption sSearchOptions[] = { - {gDexSearchAlphaOptions, 6, 7, 10}, - {gDexSearchColorOptions, 8, 9, 11}, - {gDexSearchTypeOptions, 10, 11, NUMBER_OF_MON_TYPES}, - {gDexSearchTypeOptions, 12, 13, NUMBER_OF_MON_TYPES}, - {gDexSortOptions, 4, 5, 6}, - {gDexModeOptions, 2, 3, 2}, + [SEARCH_NAME] = {sDexSearchNameOptions, 6, 7, ARRAY_COUNT(sDexSearchNameOptions) - 1}, + [SEARCH_COLOR] = {sDexSearchColorOptions, 8, 9, ARRAY_COUNT(sDexSearchColorOptions) - 1}, + [SEARCH_TYPE_LEFT] = {sDexSearchTypeOptions, 10, 11, ARRAY_COUNT(sDexSearchTypeOptions) - 1}, + [SEARCH_TYPE_RIGHT] = {sDexSearchTypeOptions, 12, 13, ARRAY_COUNT(sDexSearchTypeOptions) - 1}, + [SEARCH_ORDER] = {sDexOrderOptions, 4, 5, ARRAY_COUNT(sDexOrderOptions) - 1}, + [SEARCH_MODE] = {sDexModeOptions, 2, 3, ARRAY_COUNT(sDexModeOptions) - 1}, }; static const struct BgTemplate sSearchMenu_BgTemplate[] = @@ -1254,8 +1500,8 @@ void ResetPokedex(void) { u16 i; - gUnknown_02039B50 = 0; - gUnknown_02039B52 = 64; + sLastSelectedPokemon = 0; + sPokeBallRotation = POKEBALL_ROTATION_TOP; gUnusedPokedexU8 = 0; gSaveBlock2Ptr->pokedex.mode = DEX_MODE_HOENN; gSaveBlock2Ptr->pokedex.order = 0; @@ -1276,11 +1522,11 @@ void ResetPokedex(void) void ResetPokedexScrollPositions(void) { - gUnknown_02039B50 = 0; - gUnknown_02039B52 = 64; + sLastSelectedPokemon = 0; + sPokeBallRotation = POKEBALL_ROTATION_TOP; } -void sub_80BB370(void) +static void VBlankCB_Pokedex(void) { LoadOam(); ProcessSpriteCopyRequests(); @@ -1294,111 +1540,111 @@ static void ResetPokedexView(struct PokedexView *pokedexView) for (i = 0; i < NATIONAL_DEX_COUNT; i++) { pokedexView->pokedexList[i].dexNum = 0xFFFF; - pokedexView->pokedexList[i].seen = 0; - pokedexView->pokedexList[i].owned = 0; + pokedexView->pokedexList[i].seen = FALSE; + pokedexView->pokedexList[i].owned = FALSE; } - pokedexView->unk608 = 0; - pokedexView->unk60A_1 = 0; - pokedexView->unk60A_2 = 0; + pokedexView->pokedexList[NATIONAL_DEX_COUNT].dexNum = 0; + pokedexView->pokedexList[NATIONAL_DEX_COUNT].seen = FALSE; + pokedexView->pokedexList[NATIONAL_DEX_COUNT].owned = FALSE; pokedexView->pokemonListCount = 0; pokedexView->selectedPokemon = 0; - pokedexView->unk610 = 0; - pokedexView->dexMode = 0; - pokedexView->unk614 = 0; - pokedexView->dexOrder = 0; - pokedexView->unk618 = 0; + pokedexView->selectedPokemonBackup = 0; + pokedexView->dexMode = DEX_MODE_HOENN; + pokedexView->dexModeBackup = DEX_MODE_HOENN; + pokedexView->dexOrder = ORDER_NUMERICAL; + pokedexView->dexOrderBackup = ORDER_NUMERICAL; pokedexView->seenCount = 0; pokedexView->ownCount = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) pokedexView->monSpriteIds[i] = 0xFFFF; - pokedexView->unk628 = 0; - pokedexView->unk62A = 0; - pokedexView->unk62C = 0; + pokedexView->pokeBallRotationStep = 0; + pokedexView->pokeBallRotationBackup = 0; + pokedexView->pokeBallRotation = 0; pokedexView->initialVOffset = 0; - pokedexView->unk62E = 0; - pokedexView->unk62F = 0; - pokedexView->unk630 = 0; - pokedexView->unk632 = 0; - pokedexView->unk634 = 0; - pokedexView->unk636 = 0; - pokedexView->unk638 = 0; - for (i = 0; i <= 3; i++) - pokedexView->unk63A[i] = 0; - pokedexView->unk64A = 0; - pokedexView->unk64B = 0; - pokedexView->unk64C_1 = 0; - pokedexView->selectedScreen = 0; - pokedexView->unk64E = 0; + pokedexView->scrollTimer = 0; + pokedexView->scrollDirection = 0; + pokedexView->listVOffset = 0; + pokedexView->listMovingVOffset = 0; + pokedexView->scrollMonIncrement = 0; + pokedexView->maxScrollTimer = 0; + pokedexView->scrollSpeed = 0; + for (i = 0; i < ARRAY_COUNT(pokedexView->unkArr1); i++) + pokedexView->unkArr1[i] = 0; + pokedexView->currentPage = PAGE_MAIN; + pokedexView->currentPageBackup = PAGE_MAIN; + pokedexView->isSearchResults = FALSE; + pokedexView->selectedScreen = AREA_SCREEN; + pokedexView->screenSwitchState = 0; pokedexView->menuIsOpen = 0; pokedexView->menuCursorPos = 0; pokedexView->menuY = 0; - for (i = 0; i <= 7; i++) - pokedexView->unk654[i] = 0; - for (i = 0; i <= 7; i++) - pokedexView->unk65C[i] = 0; + for (i = 0; i < ARRAY_COUNT(pokedexView->unkArr2); i++) + pokedexView->unkArr2[i] = 0; + for (i = 0; i < ARRAY_COUNT(pokedexView->unkArr3); i++) + pokedexView->unkArr3[i] = 0; } -void CB2_Pokedex(void) +void CB2_OpenPokedex(void) { u8 *addr; u32 size; switch (gMain.state) { - case 0: - default: - SetVBlankCallback(NULL); - ResetOtherVideoRegisters(0); - DmaFillLarge16(3, 0, (u8 *)VRAM, VRAM_SIZE, 0x1000); - DmaClear32(3, OAM, OAM_SIZE); - DmaClear16(3, PLTT, PLTT_SIZE); - gMain.state = 1; - break; - case 1: - ScanlineEffect_Stop(); - ResetTasks(); - ResetSpriteData(); - ResetPaletteFade(); - FreeAllSpritePalettes(); - gReservedSpritePaletteCount = 8; - ResetAllPicSprites(); - gMain.state++; - break; - case 2: - sPokedexView = AllocZeroed(sizeof(struct PokedexView)); - ResetPokedexView(sPokedexView); - CreateTask(sub_80BB78C, 0); - sPokedexView->dexMode = gSaveBlock2Ptr->pokedex.mode; - if (!IsNationalPokedexEnabled()) - sPokedexView->dexMode = DEX_MODE_HOENN; - sPokedexView->dexOrder = gSaveBlock2Ptr->pokedex.order; - sPokedexView->selectedPokemon = gUnknown_02039B50; - sPokedexView->unk62C = gUnknown_02039B52; - sPokedexView->selectedScreen = 0; - if (!IsNationalPokedexEnabled()) - { - sPokedexView->seenCount = GetHoennPokedexCount(FLAG_GET_SEEN); - sPokedexView->ownCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); - } - else - { - sPokedexView->seenCount = GetNationalPokedexCount(FLAG_GET_SEEN); - sPokedexView->ownCount = GetNationalPokedexCount(FLAG_GET_CAUGHT); - } - sPokedexView->initialVOffset = 8; - gMain.state++; - break; - case 3: - EnableInterrupts(1); - SetVBlankCallback(sub_80BB370); - SetMainCallback2(sub_80BB774); - CreatePokedexList(sPokedexView->dexMode, sPokedexView->dexOrder); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); - break; + case 0: + default: + SetVBlankCallback(NULL); + ResetOtherVideoRegisters(0); + DmaFillLarge16(3, 0, (u8 *)VRAM, VRAM_SIZE, 0x1000); + DmaClear32(3, OAM, OAM_SIZE); + DmaClear16(3, PLTT, PLTT_SIZE); + gMain.state = 1; + break; + case 1: + ScanlineEffect_Stop(); + ResetTasks(); + ResetSpriteData(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 8; + ResetAllPicSprites(); + gMain.state++; + break; + case 2: + sPokedexView = AllocZeroed(sizeof(struct PokedexView)); + ResetPokedexView(sPokedexView); + CreateTask(Task_OpenPokedexMainPage, 0); + sPokedexView->dexMode = gSaveBlock2Ptr->pokedex.mode; + if (!IsNationalPokedexEnabled()) + sPokedexView->dexMode = DEX_MODE_HOENN; + sPokedexView->dexOrder = gSaveBlock2Ptr->pokedex.order; + sPokedexView->selectedPokemon = sLastSelectedPokemon; + sPokedexView->pokeBallRotation = sPokeBallRotation; + sPokedexView->selectedScreen = AREA_SCREEN; + if (!IsNationalPokedexEnabled()) + { + sPokedexView->seenCount = GetHoennPokedexCount(FLAG_GET_SEEN); + sPokedexView->ownCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); + } + else + { + sPokedexView->seenCount = GetNationalPokedexCount(FLAG_GET_SEEN); + sPokedexView->ownCount = GetNationalPokedexCount(FLAG_GET_CAUGHT); + } + sPokedexView->initialVOffset = 8; + gMain.state++; + break; + case 3: + EnableInterrupts(1); + SetVBlankCallback(VBlankCB_Pokedex); + SetMainCallback2(CB2_Pokedex); + CreatePokedexList(sPokedexView->dexMode, sPokedexView->dexOrder); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); + break; } } -void sub_80BB774(void) +static void CB2_Pokedex(void) { RunTasks(); AnimateSprites(); @@ -1406,14 +1652,16 @@ void sub_80BB774(void) UpdatePaletteFade(); } -void sub_80BB78C(u8 taskId) +void Task_OpenPokedexMainPage(u8 taskId) { - sPokedexView->unk64C_1 = FALSE; - if (sub_80BC514(0)) - gTasks[taskId].func = sub_80BB7D4; + sPokedexView->isSearchResults = FALSE; + if (LoadPokedexListPage(PAGE_MAIN)) + gTasks[taskId].func = Task_HandlePokedexInput; } -void sub_80BB7D4(u8 taskId) +#define tTaskId data[0] + +static void Task_HandlePokedexInput(u8 taskId) { SetGpuReg(REG_OFFSET_BG0VOFS, sPokedexView->menuY); @@ -1427,57 +1675,56 @@ void sub_80BB7D4(u8 taskId) { UpdateSelectedMonSpriteId(); BeginNormalPaletteFade(~(1 << (gSprites[sPokedexView->selectedMonSpriteId].oam.paletteNum + 16)), 0, 0, 0x10, RGB_BLACK); - gSprites[sPokedexView->selectedMonSpriteId].callback = MoveMonIntoPosition; - gTasks[taskId].func = LoadPageOnceMonFinishedMoving; + gSprites[sPokedexView->selectedMonSpriteId].callback = SpriteCB_MoveMonForInfoScreen; + gTasks[taskId].func = Task_OpenInfoScreenAfterMonMovement; PlaySE(SE_PIN); FreeWindowAndBgBuffers(); } else if (gMain.newKeys & START_BUTTON) { - //Open menu sPokedexView->menuY = 0; - sPokedexView->menuIsOpen = 1; + sPokedexView->menuIsOpen = TRUE; sPokedexView->menuCursorPos = 0; - gTasks[taskId].func = sub_80BBA78; + gTasks[taskId].func = Task_HandlePokedexStartMenuInput; PlaySE(SE_SELECT); } else if (gMain.newKeys & SELECT_BUTTON) { PlaySE(SE_SELECT); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].data[0] = LoadSearchMenu(); - sPokedexView->unk64E = 0; - sPokedexView->unk62A = sPokedexView->unk62C; - sPokedexView->unk610 = sPokedexView->selectedPokemon; - sPokedexView->unk614 = sPokedexView->dexMode; - sPokedexView->unk618 = sPokedexView->dexOrder; - gTasks[taskId].func = sub_80BBD1C; + gTasks[taskId].tTaskId = LoadSearchMenu(); + sPokedexView->screenSwitchState = 0; + sPokedexView->pokeBallRotationBackup = sPokedexView->pokeBallRotation; + sPokedexView->selectedPokemonBackup = sPokedexView->selectedPokemon; + sPokedexView->dexModeBackup = sPokedexView->dexMode; + sPokedexView->dexOrderBackup = sPokedexView->dexOrder; + gTasks[taskId].func = Task_WaitForExitSearch; PlaySE(SE_PC_LOGIN); FreeWindowAndBgBuffers(); } else if (gMain.newKeys & B_BUTTON) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BBDE8; + gTasks[taskId].func = Task_ClosePokedex; PlaySE(SE_PC_OFF); } else { //Handle D-pad - sPokedexView->selectedPokemon = sub_80BD69C(sPokedexView->selectedPokemon, 0xE); - if (sPokedexView->unk62E) - gTasks[taskId].func = sub_80BBA28; + sPokedexView->selectedPokemon = TryDoPokedexScroll(sPokedexView->selectedPokemon, 0xE); + if (sPokedexView->scrollTimer) + gTasks[taskId].func = Task_WaitForScroll; } } } -void sub_80BBA28(u8 taskId) +static void Task_WaitForScroll(u8 taskId) { - if (sub_80BD404(sPokedexView->unk62F, sPokedexView->unk634, sPokedexView->unk636)) - gTasks[taskId].func = sub_80BB7D4; + if (UpdateDexListScroll(sPokedexView->scrollDirection, sPokedexView->scrollMonIncrement, sPokedexView->maxScrollTimer)) + gTasks[taskId].func = Task_HandlePokedexInput; } -void sub_80BBA78(u8 taskId) +static void Task_HandlePokedexStartMenuInput(u8 taskId) { SetGpuReg(REG_OFFSET_BG0VOFS, sPokedexView->menuY); @@ -1492,37 +1739,37 @@ void sub_80BBA78(u8 taskId) { switch (sPokedexView->menuCursorPos) { - case 0: //BACK TO LIST - default: - gMain.newKeys |= START_BUTTON; //Exit menu - break; - case 1: //LIST TOP - sPokedexView->selectedPokemon = 0; - sPokedexView->unk62C = 0x40; - ClearMonSprites(); - CreateInitialPokemonSprites(sPokedexView->selectedPokemon, 0xE); - gMain.newKeys |= START_BUTTON; //Exit menu - break; - case 2: //LIST BOTTOM - sPokedexView->selectedPokemon = sPokedexView->pokemonListCount - 1; - sPokedexView->unk62C = sPokedexView->pokemonListCount * 16 + 0x30; - ClearMonSprites(); - CreateInitialPokemonSprites(sPokedexView->selectedPokemon, 0xE); - gMain.newKeys |= START_BUTTON; //Exit menu - break; - case 3: //CLOSE POKEDEX - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BBDE8; - PlaySE(SE_PC_OFF); - break; + case 0: //BACK TO LIST + default: + gMain.newKeys |= START_BUTTON; //Exit menu + break; + case 1: //LIST TOP + sPokedexView->selectedPokemon = 0; + sPokedexView->pokeBallRotation = POKEBALL_ROTATION_TOP; + ClearMonSprites(); + CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); + gMain.newKeys |= START_BUTTON; //Exit menu + break; + case 2: //LIST BOTTOM + sPokedexView->selectedPokemon = sPokedexView->pokemonListCount - 1; + sPokedexView->pokeBallRotation = sPokedexView->pokemonListCount * 16 + POKEBALL_ROTATION_BOTTOM; + ClearMonSprites(); + CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); + gMain.newKeys |= START_BUTTON; //Exit menu + break; + case 3: //CLOSE POKEDEX + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Task_ClosePokedex; + PlaySE(SE_PC_OFF); + break; } } //Exit menu when Start or B is pressed if (gMain.newKeys & (START_BUTTON | B_BUTTON)) { - sPokedexView->menuIsOpen = 0; - gTasks[taskId].func = sub_80BB7D4; + sPokedexView->menuIsOpen = FALSE; + gTasks[taskId].func = Task_HandlePokedexInput; PlaySE(SE_SELECT); } else if ((gMain.newAndRepeatedKeys & DPAD_UP) && sPokedexView->menuCursorPos != 0) @@ -1530,7 +1777,7 @@ void sub_80BBA78(u8 taskId) sPokedexView->menuCursorPos--; PlaySE(SE_SELECT); } - else if ((gMain.newAndRepeatedKeys & DPAD_DOWN) && sPokedexView->menuCursorPos <= 2) + else if ((gMain.newAndRepeatedKeys & DPAD_DOWN) && sPokedexView->menuCursorPos < 3) { sPokedexView->menuCursorPos++; PlaySE(SE_SELECT); @@ -1538,56 +1785,59 @@ void sub_80BBA78(u8 taskId) } } -void LoadPageOnceMonFinishedMoving(u8 taskId) +static void Task_OpenInfoScreenAfterMonMovement(u8 taskId) { if (gSprites[sPokedexView->selectedMonSpriteId].pos1.x == 48 && gSprites[sPokedexView->selectedMonSpriteId].pos1.y == 56) { - sPokedexView->unk64B = sPokedexView->unk64A; - gTasks[taskId].data[0] = SetupInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); - gTasks[taskId].func = sub_80BBC74; + sPokedexView->currentPageBackup = sPokedexView->currentPage; + gTasks[taskId].tTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); + gTasks[taskId].func = Task_WaitForExitInfoScreen; } } -void sub_80BBC74(u8 taskId) +static void Task_WaitForExitInfoScreen(u8 taskId) { - if (gTasks[gTasks[taskId].data[0]].isActive) + if (gTasks[gTasks[taskId].tTaskId].isActive) { - if (sPokedexView->unk64A == 1 && !sub_80BE9C4(gTasks[taskId].data[0]) && UpdateSelectedMon()) - sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].data[0]); + if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tTaskId) && TryDoInfoScreenScroll()) + sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tTaskId); } else { - gUnknown_02039B50 = sPokedexView->selectedPokemon; - gUnknown_02039B52 = sPokedexView->unk62C; - gTasks[taskId].func = sub_80BB78C; + sLastSelectedPokemon = sPokedexView->selectedPokemon; + sPokeBallRotation = sPokedexView->pokeBallRotation; + gTasks[taskId].func = Task_OpenPokedexMainPage; } } -void sub_80BBD1C(u8 taskId) +static void Task_WaitForExitSearch(u8 taskId) { - if (!gTasks[gTasks[taskId].data[0]].isActive) + if (!gTasks[gTasks[taskId].tTaskId].isActive) { ClearMonSprites(); - if (sPokedexView->unk64E != 0) + + // Search produced results + if (sPokedexView->screenSwitchState != 0) { sPokedexView->selectedPokemon = 0; - sPokedexView->unk62C = 0x40; - gTasks[taskId].func = sub_80BBE70; + sPokedexView->pokeBallRotation = POKEBALL_ROTATION_TOP; + gTasks[taskId].func = Task_OpenSearchResults; } + // Search didn't produce results else { - sPokedexView->unk62C = sPokedexView->unk62A; - sPokedexView->selectedPokemon = sPokedexView->unk610; - sPokedexView->dexMode = sPokedexView->unk614; + sPokedexView->pokeBallRotation = sPokedexView->pokeBallRotationBackup; + sPokedexView->selectedPokemon = sPokedexView->selectedPokemonBackup; + sPokedexView->dexMode = sPokedexView->dexModeBackup; if (!IsNationalPokedexEnabled()) sPokedexView->dexMode = DEX_MODE_HOENN; - sPokedexView->dexOrder = sPokedexView->unk618; - gTasks[taskId].func = sub_80BB78C; + sPokedexView->dexOrder = sPokedexView->dexOrderBackup; + gTasks[taskId].func = Task_OpenPokedexMainPage; } } } -void sub_80BBDE8(u8 taskId) +static void Task_ClosePokedex(u8 taskId) { if (!gPaletteFade.active) { @@ -1604,14 +1854,14 @@ void sub_80BBDE8(u8 taskId) } } -void sub_80BBE70(u8 taskId) +static void Task_OpenSearchResults(u8 taskId) { - sPokedexView->unk64C_1 = TRUE; - if (sub_80BC514(3)) - gTasks[taskId].func = sub_80BBEB8; + sPokedexView->isSearchResults = TRUE; + if (LoadPokedexListPage(PAGE_SEARCH_RESULTS)) + gTasks[taskId].func = Task_HandleSearchResultsInput; } -void sub_80BBEB8(u8 taskId) +static void Task_HandleSearchResultsInput(u8 taskId) { SetGpuReg(REG_OFFSET_BG0VOFS, sPokedexView->menuY); @@ -1627,52 +1877,52 @@ void sub_80BBEB8(u8 taskId) UpdateSelectedMonSpriteId(); a = (1 << (gSprites[sPokedexView->selectedMonSpriteId].oam.paletteNum + 16)); - gSprites[sPokedexView->selectedMonSpriteId].callback = MoveMonIntoPosition; + gSprites[sPokedexView->selectedMonSpriteId].callback = SpriteCB_MoveMonForInfoScreen; BeginNormalPaletteFade(~a, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BC2D4; + gTasks[taskId].func = Task_OpenSearchResultsInfoScreenAfterMonMovement; PlaySE(SE_PIN); FreeWindowAndBgBuffers(); } else if (gMain.newKeys & START_BUTTON) { sPokedexView->menuY = 0; - sPokedexView->menuIsOpen = 1; + sPokedexView->menuIsOpen = TRUE; sPokedexView->menuCursorPos = 0; - gTasks[taskId].func = HandleButtonPress_StartMenu; + gTasks[taskId].func = Task_HandleSearchResultsStartMenuInput; PlaySE(SE_SELECT); } else if (gMain.newKeys & SELECT_BUTTON) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].data[0] = LoadSearchMenu(); - sPokedexView->unk64E = 0; - gTasks[taskId].func = sub_80BBD1C; + gTasks[taskId].tTaskId = LoadSearchMenu(); + sPokedexView->screenSwitchState = 0; + gTasks[taskId].func = Task_WaitForExitSearch; PlaySE(SE_PC_LOGIN); FreeWindowAndBgBuffers(); } else if (gMain.newKeys & B_BUTTON) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BC3DC; + gTasks[taskId].func = Task_ReturnToPokedexFromSearchResults; PlaySE(SE_PC_OFF); } else { //Handle D-pad - sPokedexView->selectedPokemon = sub_80BD69C(sPokedexView->selectedPokemon, 0xE); - if (sPokedexView->unk62E) - gTasks[taskId].func = sub_80BC0A8; + sPokedexView->selectedPokemon = TryDoPokedexScroll(sPokedexView->selectedPokemon, 0xE); + if (sPokedexView->scrollTimer) + gTasks[taskId].func = Task_WaitForSearchResultsScroll; } } } -void sub_80BC0A8(u8 taskId) +static void Task_WaitForSearchResultsScroll(u8 taskId) { - if (sub_80BD404(sPokedexView->unk62F, sPokedexView->unk634, sPokedexView->unk636)) - gTasks[taskId].func = sub_80BBEB8; + if (UpdateDexListScroll(sPokedexView->scrollDirection, sPokedexView->scrollMonIncrement, sPokedexView->maxScrollTimer)) + gTasks[taskId].func = Task_HandleSearchResultsInput; } -static void HandleButtonPress_StartMenu(u8 taskId) +static void Task_HandleSearchResultsStartMenuInput(u8 taskId) { SetGpuReg(REG_OFFSET_BG0VOFS, sPokedexView->menuY); @@ -1687,41 +1937,41 @@ static void HandleButtonPress_StartMenu(u8 taskId) switch (sPokedexView->menuCursorPos) { case 0: //BACK TO LIST - default: - gMain.newKeys |= START_BUTTON; - break; - case 1: //LIST TOP - sPokedexView->selectedPokemon = 0; - sPokedexView->unk62C = 0x40; - ClearMonSprites(); - CreateInitialPokemonSprites(sPokedexView->selectedPokemon, 0xE); - gMain.newKeys |= START_BUTTON; - break; - case 2: //LIST BOTTOM - sPokedexView->selectedPokemon = sPokedexView->pokemonListCount - 1; - sPokedexView->unk62C = sPokedexView->pokemonListCount * 16 + 0x30; - ClearMonSprites(); - CreateInitialPokemonSprites(sPokedexView->selectedPokemon, 0xE); - gMain.newKeys |= START_BUTTON; - break; - case 3: //BACK TO POKEDEX - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BC3DC; - PlaySE(SE_TRACK_DOOR); - break; - case 4: //CLOSE POKEDEX - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = sub_80BC47C; - PlaySE(SE_PC_OFF); - break; + default: + gMain.newKeys |= START_BUTTON; + break; + case 1: //LIST TOP + sPokedexView->selectedPokemon = 0; + sPokedexView->pokeBallRotation = POKEBALL_ROTATION_TOP; + ClearMonSprites(); + CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); + gMain.newKeys |= START_BUTTON; + break; + case 2: //LIST BOTTOM + sPokedexView->selectedPokemon = sPokedexView->pokemonListCount - 1; + sPokedexView->pokeBallRotation = sPokedexView->pokemonListCount * 16 + POKEBALL_ROTATION_BOTTOM; + ClearMonSprites(); + CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); + gMain.newKeys |= START_BUTTON; + break; + case 3: //BACK TO POKEDEX + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Task_ReturnToPokedexFromSearchResults; + PlaySE(SE_TRACK_DOOR); + break; + case 4: //CLOSE POKEDEX + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Task_ClosePokedexFromSearchResultsStartMenu; + PlaySE(SE_PC_OFF); + break; } } //Exit menu when Start or B is pressed if (gMain.newKeys & (START_BUTTON | B_BUTTON)) { - sPokedexView->menuIsOpen = 0; - gTasks[taskId].func = sub_80BBEB8; + sPokedexView->menuIsOpen = FALSE; + gTasks[taskId].func = Task_HandleSearchResultsInput; PlaySE(SE_SELECT); } else if ((gMain.newAndRepeatedKeys & DPAD_UP) && sPokedexView->menuCursorPos) @@ -1729,7 +1979,7 @@ static void HandleButtonPress_StartMenu(u8 taskId) sPokedexView->menuCursorPos--; PlaySE(SE_SELECT); } - else if ((gMain.newAndRepeatedKeys & DPAD_DOWN) && sPokedexView->menuCursorPos <= 3) + else if ((gMain.newAndRepeatedKeys & DPAD_DOWN) && sPokedexView->menuCursorPos < 4) { sPokedexView->menuCursorPos++; PlaySE(SE_SELECT); @@ -1737,162 +1987,165 @@ static void HandleButtonPress_StartMenu(u8 taskId) } } -void sub_80BC2D4(u8 taskId) +static void Task_OpenSearchResultsInfoScreenAfterMonMovement(u8 taskId) { if (gSprites[sPokedexView->selectedMonSpriteId].pos1.x == 48 && gSprites[sPokedexView->selectedMonSpriteId].pos1.y == 56) { - sPokedexView->unk64B = sPokedexView->unk64A; - gTasks[taskId].data[0] = SetupInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); + sPokedexView->currentPageBackup = sPokedexView->currentPage; + gTasks[taskId].tTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); sPokedexView->selectedMonSpriteId = -1; - gTasks[taskId].func = sub_80BC360; + gTasks[taskId].func = Task_WaitForExitSearchResultsInfoScreen; } } -void sub_80BC360(u8 taskId) +static void Task_WaitForExitSearchResultsInfoScreen(u8 taskId) { - if (gTasks[gTasks[taskId].data[0]].isActive) + if (gTasks[gTasks[taskId].tTaskId].isActive) { - if (sPokedexView->unk64A == 1 && !sub_80BE9C4(gTasks[taskId].data[0]) && UpdateSelectedMon()) - sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].data[0]); + if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tTaskId) && TryDoInfoScreenScroll()) + sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tTaskId); } else { - gTasks[taskId].func = sub_80BBE70; + gTasks[taskId].func = Task_OpenSearchResults; } } -void sub_80BC3DC(u8 taskId) +static void Task_ReturnToPokedexFromSearchResults(u8 taskId) { if (!gPaletteFade.active) { - sPokedexView->unk62C = sPokedexView->unk62A; - sPokedexView->selectedPokemon = sPokedexView->unk610; - sPokedexView->dexMode = sPokedexView->unk614; + sPokedexView->pokeBallRotation = sPokedexView->pokeBallRotationBackup; + sPokedexView->selectedPokemon = sPokedexView->selectedPokemonBackup; + sPokedexView->dexMode = sPokedexView->dexModeBackup; if (!IsNationalPokedexEnabled()) sPokedexView->dexMode = DEX_MODE_HOENN; - sPokedexView->dexOrder = sPokedexView->unk618; - gTasks[taskId].func = sub_80BB78C; + sPokedexView->dexOrder = sPokedexView->dexOrderBackup; + gTasks[taskId].func = Task_OpenPokedexMainPage; ClearMonSprites(); FreeWindowAndBgBuffers(); } } -void sub_80BC47C(u8 taskId) +static void Task_ClosePokedexFromSearchResultsStartMenu(u8 taskId) { if (!gPaletteFade.active) { - sPokedexView->unk62C = sPokedexView->unk62A; - sPokedexView->selectedPokemon = sPokedexView->unk610; - sPokedexView->dexMode = sPokedexView->unk614; + sPokedexView->pokeBallRotation = sPokedexView->pokeBallRotationBackup; + sPokedexView->selectedPokemon = sPokedexView->selectedPokemonBackup; + sPokedexView->dexMode = sPokedexView->dexModeBackup; if (!IsNationalPokedexEnabled()) sPokedexView->dexMode = DEX_MODE_HOENN; - sPokedexView->dexOrder = sPokedexView->unk618; - gTasks[taskId].func = sub_80BBDE8; + sPokedexView->dexOrder = sPokedexView->dexOrderBackup; + gTasks[taskId].func = Task_ClosePokedex; } } -bool8 sub_80BC514(u8 a) +#undef tTaskId + +// For loading main pokedex page or pokedex search results +static bool8 LoadPokedexListPage(u8 page) { switch (gMain.state) { - case 0: - default: - if (gPaletteFade.active) - return 0; - SetVBlankCallback(NULL); - sPokedexView->unk64A = a; - ResetOtherVideoRegisters(0); - SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset); - ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sPokedex_BgTemplate, 4); - SetBgTilemapBuffer(3, AllocZeroed(0x800)); - SetBgTilemapBuffer(2, AllocZeroed(0x800)); - SetBgTilemapBuffer(1, AllocZeroed(0x800)); - SetBgTilemapBuffer(0, AllocZeroed(0x800)); - DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(1, gPokedexTilemap_Main, 0, 0); - CopyToBgTilemapBuffer(3, gPokedexTilemap_MainUnderlay, 0, 0); - if (a == 0) - CopyToBgTilemapBuffer(0, gPokedexTilemap_StartMenu1, 0, 0x280); - else - CopyToBgTilemapBuffer(0, gPokedexTilemap_StartMenu2, 0, 0x280); - ResetPaletteFade(); - if (a == 0) - sPokedexView->unk64C_1 = FALSE; - else - sPokedexView->unk64C_1 = TRUE; - LoadPokedexBgPalette(sPokedexView->unk64C_1); - InitWindows(sPokemonList_WindowTemplate); - DeactivateAllTextPrinters(); - PutWindowTilemap(0); - CopyWindowToVram(0, 3); - gMain.state = 1; - break; - case 1: - ResetSpriteData(); - FreeAllSpritePalettes(); - gReservedSpritePaletteCount = 8; - LoadCompressedSpriteSheet(&sInterfaceSpriteSheet[0]); - LoadSpritePalettes(sInterfaceSpritePalette); - CreateInterfaceSprites(a); - gMain.state++; - break; - case 2: - gMain.state++; - break; - case 3: - if (a == 0) - CreatePokedexList(sPokedexView->dexMode, sPokedexView->dexOrder); - CreateInitialPokemonSprites(sPokedexView->selectedPokemon, 0xE); - sPokedexView->menuIsOpen = 0; - sPokedexView->menuY = 0; - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - gMain.state++; - break; - case 4: - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); - SetVBlankCallback(sub_80BB370); - gMain.state++; - break; - case 5: - SetGpuReg(REG_OFFSET_WININ, 0x3F3F); - SetGpuReg(REG_OFFSET_WINOUT, 0x1D3F); - SetGpuReg(REG_OFFSET_WIN0H, 0); - SetGpuReg(REG_OFFSET_WIN0V, 0); - SetGpuReg(REG_OFFSET_WIN1H, 0); - SetGpuReg(REG_OFFSET_WIN1V, 0); - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON | DISPCNT_OBJWIN_ON); - ShowBg(0); - ShowBg(1); - ShowBg(2); - ShowBg(3); - gMain.state++; - break; - case 6: - if (!gPaletteFade.active) - { - gMain.state = 0; - return TRUE; - } - break; + case 0: + default: + if (gPaletteFade.active) + return 0; + SetVBlankCallback(NULL); + sPokedexView->currentPage = page; + ResetOtherVideoRegisters(0); + SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, sPokedex_BgTemplate, ARRAY_COUNT(sPokedex_BgTemplate)); + SetBgTilemapBuffer(3, AllocZeroed(0x800)); + SetBgTilemapBuffer(2, AllocZeroed(0x800)); + SetBgTilemapBuffer(1, AllocZeroed(0x800)); + SetBgTilemapBuffer(0, AllocZeroed(0x800)); + DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(1, gPokedexList_Tilemap, 0, 0); + CopyToBgTilemapBuffer(3, gPokedexListUnderlay_Tilemap, 0, 0); + if (page == PAGE_MAIN) + CopyToBgTilemapBuffer(0, gPokedexStartMenuMain_Tilemap, 0, 0x280); + else + CopyToBgTilemapBuffer(0, gPokedexStartMenuSearchResults_Tilemap, 0, 0x280); + ResetPaletteFade(); + if (page == PAGE_MAIN) + sPokedexView->isSearchResults = FALSE; + else + sPokedexView->isSearchResults = TRUE; + LoadPokedexBgPalette(sPokedexView->isSearchResults); + InitWindows(sPokemonList_WindowTemplate); + DeactivateAllTextPrinters(); + PutWindowTilemap(0); + CopyWindowToVram(0, 3); + gMain.state = 1; + break; + case 1: + ResetSpriteData(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 8; + LoadCompressedSpriteSheet(&sInterfaceSpriteSheet[0]); + LoadSpritePalettes(sInterfaceSpritePalette); + CreateInterfaceSprites(page); + gMain.state++; + break; + case 2: + gMain.state++; + break; + case 3: + if (page == PAGE_MAIN) + CreatePokedexList(sPokedexView->dexMode, sPokedexView->dexOrder); + CreateMonSpritesAtPos(sPokedexView->selectedPokemon, 0xE); + sPokedexView->menuIsOpen = FALSE; + sPokedexView->menuY = 0; + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + gMain.state++; + break; + case 4: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); + SetVBlankCallback(VBlankCB_Pokedex); + gMain.state++; + break; + case 5: + SetGpuReg(REG_OFFSET_WININ, 0x3F3F); + SetGpuReg(REG_OFFSET_WINOUT, 0x1D3F); + SetGpuReg(REG_OFFSET_WIN0H, 0); + SetGpuReg(REG_OFFSET_WIN0V, 0); + SetGpuReg(REG_OFFSET_WIN1H, 0); + SetGpuReg(REG_OFFSET_WIN1V, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON | DISPCNT_OBJWIN_ON); + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 6: + if (!gPaletteFade.active) + { + gMain.state = 0; + return TRUE; + } + break; } return FALSE; } -static void LoadPokedexBgPalette(u8 a) +static void LoadPokedexBgPalette(bool8 isSearchResults) { - if (a == 1) - LoadPalette(gPokedexHoennBg_Pal + 1, 1, 0xBE); + if (isSearchResults == TRUE) + LoadPalette(gPokedexSearchResults_Pal + 1, 1, 0xBE); else if (!IsNationalPokedexEnabled()) - LoadPalette(gPokedexText_Pal + 1, 1, 0xBE); + LoadPalette(gPokedexBgHoenn_Pal + 1, 1, 0xBE); else - LoadPalette(gPokedexNationalBg_Pal + 1, 1, 0xBE); + LoadPalette(gPokedexBgNational_Pal + 1, 1, 0xBE); LoadPalette(GetOverworldTextboxPalettePtr(), 0xF0, 32); } @@ -1915,7 +2168,7 @@ static void FreeWindowAndBgBuffers(void) Free(tilemapBuffer); } -static void CreatePokedexList(u8 dexMode, u8 sortMode) +static void CreatePokedexList(u8 dexMode, u8 order) { u16 vars[3]; //I have no idea why three regular variables are stored in an array, but whatever. #define temp_dexCount vars[0] @@ -1927,134 +2180,134 @@ static void CreatePokedexList(u8 dexMode, u8 sortMode) switch (dexMode) { - default: - case DEX_MODE_HOENN: + default: + case DEX_MODE_HOENN: + temp_dexCount = HOENN_DEX_COUNT; + temp_isHoennDex = TRUE; + break; + case DEX_MODE_NATIONAL: + if (IsNationalPokedexEnabled()) + { + temp_dexCount = NATIONAL_DEX_COUNT; + temp_isHoennDex = FALSE; + } + else + { temp_dexCount = HOENN_DEX_COUNT; temp_isHoennDex = TRUE; - break; - case DEX_MODE_NATIONAL: - if (IsNationalPokedexEnabled()) - { - temp_dexCount = NATIONAL_DEX_COUNT; - temp_isHoennDex = FALSE; - } - else - { - temp_dexCount = HOENN_DEX_COUNT; - temp_isHoennDex = TRUE; - } - break; + } + break; } - switch (sortMode) + switch (order) { - case SORT_NUMERICAL: - if (temp_isHoennDex) + case ORDER_NUMERICAL: + if (temp_isHoennDex) + { + for (i = 0; i < temp_dexCount; i++) { - for (i = 0; i < temp_dexCount; i++) - { - temp_dexNum = HoennToNationalOrder(i + 1); - sPokedexView->pokedexList[i].dexNum = temp_dexNum; - sPokedexView->pokedexList[i].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN); - sPokedexView->pokedexList[i].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); - if (sPokedexView->pokedexList[i].seen) - sPokedexView->pokemonListCount = i + 1; - } + temp_dexNum = HoennToNationalOrder(i + 1); + sPokedexView->pokedexList[i].dexNum = temp_dexNum; + sPokedexView->pokedexList[i].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN); + sPokedexView->pokedexList[i].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); + if (sPokedexView->pokedexList[i].seen) + sPokedexView->pokemonListCount = i + 1; } - else - { - bool32 r10; - s16 r5; + } + else + { + bool32 r10; + s16 r5; - r10 = r5 = i = 0; - for (i = 0; i < temp_dexCount; i++) - { - temp_dexNum = i + 1; - if (GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) - r10 = 1; - if (r10) - { - asm(""); //Needed to match for some reason - sPokedexView->pokedexList[r5].dexNum = temp_dexNum; - sPokedexView->pokedexList[r5].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN); - sPokedexView->pokedexList[r5].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); - if (sPokedexView->pokedexList[r5].seen) - sPokedexView->pokemonListCount = r5 + 1; - r5++; - } - } - } - break; - case SORT_ALPHABETICAL: - for (i = 0; i < POKEMON_SLOTS_NUMBER - 1; i++) + r10 = r5 = i = 0; + for (i = 0; i < temp_dexCount; i++) { - temp_dexNum = gPokedexOrder_Alphabetical[i]; - - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) + temp_dexNum = i + 1; + if (GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) + r10 = 1; + if (r10) { - sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); - sPokedexView->pokemonListCount++; + asm(""); //Needed to match for some reason + sPokedexView->pokedexList[r5].dexNum = temp_dexNum; + sPokedexView->pokedexList[r5].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN); + sPokedexView->pokedexList[r5].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); + if (sPokedexView->pokedexList[r5].seen) + sPokedexView->pokemonListCount = r5 + 1; + r5++; } } - break; - case SORT_HEAVIEST: - for (i = NATIONAL_DEX_COUNT - 1; i >= 0; i--) + } + break; + case ORDER_ALPHABETICAL: + for (i = 0; i < NUM_SPECIES - 1; i++) + { + temp_dexNum = gPokedexOrder_Alphabetical[i]; + + if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) { - temp_dexNum = gPokedexOrder_Weight[i]; - - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) - { - sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; - sPokedexView->pokemonListCount++; - } + sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT); + sPokedexView->pokemonListCount++; } - break; - case SORT_LIGHTEST: - for (i = 0; i < NATIONAL_DEX_COUNT; i++) + } + break; + case ORDER_HEAVIEST: + for (i = NATIONAL_DEX_COUNT - 1; i >= 0; i--) + { + temp_dexNum = gPokedexOrder_Weight[i]; + + if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { - temp_dexNum = gPokedexOrder_Weight[i]; - - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) - { - sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; - sPokedexView->pokemonListCount++; - } + sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; + sPokedexView->pokemonListCount++; } - break; - case SORT_TALLEST: - for (i = NATIONAL_DEX_COUNT - 1; i >= 0; i--) + } + break; + case ORDER_LIGHTEST: + for (i = 0; i < NATIONAL_DEX_COUNT; i++) + { + temp_dexNum = gPokedexOrder_Weight[i]; + + if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { - temp_dexNum = gPokedexOrder_Height[i]; - - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) - { - sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; - sPokedexView->pokemonListCount++; - } + sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; + sPokedexView->pokemonListCount++; } - break; - case SORT_SMALLEST: - for (i = 0; i < NATIONAL_DEX_COUNT; i++) + } + break; + case ORDER_TALLEST: + for (i = NATIONAL_DEX_COUNT - 1; i >= 0; i--) + { + temp_dexNum = gPokedexOrder_Height[i]; + + if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { - temp_dexNum = gPokedexOrder_Height[i]; - - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) - { - sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; - sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; - sPokedexView->pokemonListCount++; - } + sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; + sPokedexView->pokemonListCount++; } - break; + } + break; + case ORDER_SMALLEST: + for (i = 0; i < NATIONAL_DEX_COUNT; i++) + { + temp_dexNum = gPokedexOrder_Height[i]; + + if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) + { + sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; + sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = TRUE; + sPokedexView->pokemonListCount++; + } + } + break; } for (i = sPokedexView->pokemonListCount; i < NATIONAL_DEX_COUNT; i++) @@ -2069,118 +2322,119 @@ static void PrintMonDexNumAndName(u8 windowId, u8 fontId, const u8* str, u8 left { u8 color[3]; - color[0] = 0; - color[1] = 15; - color[2] = 3; + color[0] = TEXT_COLOR_TRANSPARENT; + color[1] = TEXT_DYNAMIC_COLOR_6; + color[2] = TEXT_COLOR_LIGHT_GREY; AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, -1, str); } -static void CreateMonListEntry(u8 direction, u16 b, u16 c) +// u16 ignored is passed but never used +static void CreateMonListEntry(u8 position, u16 b, u16 ignored) { - s16 _b; + s16 entryNum; u16 i; - u16 r2; + u16 vOffset; - switch (direction) + switch (position) { - case 0: // Initial - default: - _b = b - 5; - for (i = 0; i <= 10; i++) + case 0: // Initial + default: + entryNum = b - 5; + for (i = 0; i <= 10; i++) + { + if (entryNum < 0 || entryNum >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[entryNum].dexNum == 0xFFFF) { - if (_b < 0 || _b >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[_b].dexNum == 0xFFFF) - { - ClearMonListEntry(0x11, i * 2, c); - } - else - { - ClearMonListEntry(0x11, i * 2, c); - if (sPokedexView->pokedexList[_b].seen) - { - CreateMonDexNum(_b, 0x12, i * 2, c); - CreateCaughtBall(sPokedexView->pokedexList[_b].owned, 0x11, i * 2, c); - CreateMonName(sPokedexView->pokedexList[_b].dexNum, 0x16, i * 2); - } - else - { - CreateMonDexNum(_b, 0x12, i * 2, c); - CreateCaughtBall(0, 0x11, i * 2, c); - CreateMonName(0, 0x16, i * 2); - } - } - _b++; - } - break; - case 1: // Up - _b = b - 5; - if (_b < 0 || _b >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[_b].dexNum == 0xFFFF) - { - ClearMonListEntry(0x11, sPokedexView->unk630 * 2, c); + ClearMonListEntry(17, i * 2, ignored); } else { - ClearMonListEntry(0x11, sPokedexView->unk630 * 2, c); - if (sPokedexView->pokedexList[_b].seen) + ClearMonListEntry(17, i * 2, ignored); + if (sPokedexView->pokedexList[entryNum].seen) { - CreateMonDexNum(_b, 0x12, sPokedexView->unk630 * 2, c); - CreateCaughtBall(sPokedexView->pokedexList[_b].owned, 0x11, sPokedexView->unk630 * 2, c); - CreateMonName(sPokedexView->pokedexList[_b].dexNum, 0x16, sPokedexView->unk630 * 2); + CreateMonDexNum(entryNum, 0x12, i * 2, ignored); + CreateCaughtBall(sPokedexView->pokedexList[entryNum].owned, 0x11, i * 2, ignored); + CreateMonName(sPokedexView->pokedexList[entryNum].dexNum, 0x16, i * 2); } else { - CreateMonDexNum(_b, 0x12, sPokedexView->unk630 * 2, c); - CreateCaughtBall(0, 0x11, sPokedexView->unk630 * 2, c); - CreateMonName(0, 0x16, sPokedexView->unk630 * 2); + CreateMonDexNum(entryNum, 0x12, i * 2, ignored); + CreateCaughtBall(FALSE, 0x11, i * 2, ignored); + CreateMonName(0, 0x16, i * 2); } } - break; - case 2: // Down - _b = b + 5; - r2 = sPokedexView->unk630 + 10; - if (r2 > 15) - r2 -= 16; - if (_b < 0 || _b >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[_b].dexNum == 0xFFFF) - ClearMonListEntry(0x11, r2 * 2, c); + entryNum++; + } + break; + case 1: // Up + entryNum = b - 5; + if (entryNum < 0 || entryNum >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[entryNum].dexNum == 0xFFFF) + { + ClearMonListEntry(17, sPokedexView->listVOffset * 2, ignored); + } + else + { + ClearMonListEntry(17, sPokedexView->listVOffset * 2, ignored); + if (sPokedexView->pokedexList[entryNum].seen) + { + CreateMonDexNum(entryNum, 18, sPokedexView->listVOffset * 2, ignored); + CreateCaughtBall(sPokedexView->pokedexList[entryNum].owned, 0x11, sPokedexView->listVOffset * 2, ignored); + CreateMonName(sPokedexView->pokedexList[entryNum].dexNum, 0x16, sPokedexView->listVOffset * 2); + } else { - ClearMonListEntry(0x11, r2 * 2, c); - if (sPokedexView->pokedexList[_b].seen) - { - CreateMonDexNum(_b, 0x12, r2 * 2, c); - CreateCaughtBall(sPokedexView->pokedexList[_b].owned, 0x11, r2 * 2, c); - CreateMonName(sPokedexView->pokedexList[_b].dexNum, 0x16, r2 * 2); - } - else - { - CreateMonDexNum(_b, 0x12, r2 * 2, c); - CreateCaughtBall(0, 0x11, r2 * 2, c); - CreateMonName(0, 0x16, r2 * 2); - } + CreateMonDexNum(entryNum, 18, sPokedexView->listVOffset * 2, ignored); + CreateCaughtBall(FALSE, 17, sPokedexView->listVOffset * 2, ignored); + CreateMonName(0, 0x16, sPokedexView->listVOffset * 2); } - break; + } + break; + case 2: // Down + entryNum = b + 5; + vOffset = sPokedexView->listVOffset + 10; + if (vOffset >= LIST_SCROLL_STEP) + vOffset -= LIST_SCROLL_STEP; + if (entryNum < 0 || entryNum >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[entryNum].dexNum == 0xFFFF) + ClearMonListEntry(17, vOffset * 2, ignored); + else + { + ClearMonListEntry(17, vOffset * 2, ignored); + if (sPokedexView->pokedexList[entryNum].seen) + { + CreateMonDexNum(entryNum, 18, vOffset * 2, ignored); + CreateCaughtBall(sPokedexView->pokedexList[entryNum].owned, 0x11, vOffset * 2, ignored); + CreateMonName(sPokedexView->pokedexList[entryNum].dexNum, 0x16, vOffset * 2); + } + else + { + CreateMonDexNum(entryNum, 18, vOffset * 2, ignored); + CreateCaughtBall(FALSE, 0x11, vOffset * 2, ignored); + CreateMonName(0, 0x16, vOffset * 2); + } + } + break; } CopyWindowToVram(0, 2); } -static void CreateMonDexNum(u16 a, u8 left, u8 top, u16 unused) +static void CreateMonDexNum(u16 entryNum, u8 left, u8 top, u16 unused) { u8 text[6]; - u16 r6; + u16 dexNum; - memcpy(text, sText_No000, 6); - r6 = sPokedexView->pokedexList[a].dexNum; + memcpy(text, sText_No000, ARRAY_COUNT(text)); + dexNum = sPokedexView->pokedexList[entryNum].dexNum; if (sPokedexView->dexMode == DEX_MODE_HOENN) - r6 = NationalToHoennOrder(r6); - text[2] = CHAR_0 + r6 / 100; - text[3] = CHAR_0 + (r6 % 100) / 10; - text[4] = CHAR_0 + (r6 % 100) % 10; + dexNum = NationalToHoennOrder(dexNum); + text[2] = CHAR_0 + dexNum / 100; + text[3] = CHAR_0 + (dexNum % 100) / 10; + text[4] = CHAR_0 + (dexNum % 100) % 10; PrintMonDexNumAndName(0, 7, text, left, top); } -static void CreateCaughtBall(u16 a, u8 x, u8 y, u16 unused) +static void CreateCaughtBall(bool16 owned, u8 x, u8 y, u16 unused) { - if (a) - BlitBitmapToWindow(0, gUnknown_0855D2BE, x * 8, y * 8, 8, 16); + if (owned) + BlitBitmapToWindow(0, sCaughtBall_Gfx, x * 8, y * 8, 8, 16); else FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 8, 16); } @@ -2203,190 +2457,196 @@ static void ClearMonListEntry(u8 x, u8 y, u16 unused) FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 0x60, 16); } -static void CreateInitialPokemonSprites(u16 selectedMon, u16 b) +// u16 ignored is passed but never used +static void CreateMonSpritesAtPos(u16 selectedMon, u16 ignored) { u8 i; - u16 unk; + u16 dexNum; u8 spriteId; gPaletteFade.bufferTransferDisabled = TRUE; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) sPokedexView->monSpriteIds[i] = 0xFFFF; sPokedexView->selectedMonSpriteId = 0xFFFF; - unk = GetPokemonSpriteToDisplay(selectedMon - 1); - if (unk != 0xFFFF) + // Create top mon sprite + dexNum = GetPokemonSpriteToDisplay(selectedMon - 1); + if (dexNum != 0xFFFF) { - spriteId = sub_80BDACC(unk, 0x60, 0x50); - gSprites[spriteId].callback = sub_80BE4E0; + spriteId = CreatePokedexMonSprite(dexNum, 0x60, 0x50); + gSprites[spriteId].callback = SpriteCB_PokedexListMonSprite; gSprites[spriteId].data[5] = -32; } - unk = GetPokemonSpriteToDisplay(selectedMon); - if (unk != 0xFFFF) + // Create mid mon sprite + dexNum = GetPokemonSpriteToDisplay(selectedMon); + if (dexNum != 0xFFFF) { - spriteId = sub_80BDACC(unk, 0x60, 0x50); - gSprites[spriteId].callback = sub_80BE4E0; + spriteId = CreatePokedexMonSprite(dexNum, 0x60, 0x50); + gSprites[spriteId].callback = SpriteCB_PokedexListMonSprite; gSprites[spriteId].data[5] = 0; } - unk = GetPokemonSpriteToDisplay(selectedMon + 1); - if (unk != 0xFFFF) + // Create bottom mon sprite + dexNum = GetPokemonSpriteToDisplay(selectedMon + 1); + if (dexNum != 0xFFFF) { - spriteId = sub_80BDACC(unk, 0x60, 0x50); - gSprites[spriteId].callback = sub_80BE4E0; + spriteId = CreatePokedexMonSprite(dexNum, 0x60, 0x50); + gSprites[spriteId].callback = SpriteCB_PokedexListMonSprite; gSprites[spriteId].data[5] = 32; } - CreateMonListEntry(0, selectedMon, b); + CreateMonListEntry(0, selectedMon, ignored); SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset); - sPokedexView->unk630 = 0; - sPokedexView->unk632 = 0; + sPokedexView->listVOffset = 0; + sPokedexView->listMovingVOffset = 0; gPaletteFade.bufferTransferDisabled = FALSE; } -bool8 sub_80BD404(u8 a, u8 b, u8 c) +static bool8 UpdateDexListScroll(u8 direction, u8 monMoveIncrement, u8 scrollTimerMax) { u16 i; - u8 foo; + u8 step; - if (sPokedexView->unk62E) + if (sPokedexView->scrollTimer) { - sPokedexView->unk62E--; - switch (a) + sPokedexView->scrollTimer--; + switch (direction) { - case 1: - for (i = 0; i < 4; i++) - { - if (sPokedexView->monSpriteIds[i] != 0xFFFF) - gSprites[sPokedexView->monSpriteIds[i]].data[5] += b; - } - foo = 16 * (c - sPokedexView->unk62E) / c; - SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->unk632 * 16 - foo); - sPokedexView->unk62C -= sPokedexView->unk628; - break; - case 2: - for (i = 0; i < 4; i++) - { - if (sPokedexView->monSpriteIds[i] != 0xFFFF) - gSprites[sPokedexView->monSpriteIds[i]].data[5] -= b; - } - foo = 16 * (c - sPokedexView->unk62E) / c; - SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->unk632 * 16 + foo); - sPokedexView->unk62C += sPokedexView->unk628; - break; + case 1: // Up + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) + { + if (sPokedexView->monSpriteIds[i] != 0xFFFF) + gSprites[sPokedexView->monSpriteIds[i]].data[5] += monMoveIncrement; + } + step = LIST_SCROLL_STEP * (scrollTimerMax - sPokedexView->scrollTimer) / scrollTimerMax; + SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->listMovingVOffset * LIST_SCROLL_STEP - step); + sPokedexView->pokeBallRotation -= sPokedexView->pokeBallRotationStep; + break; + case 2: // Down + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) + { + if (sPokedexView->monSpriteIds[i] != 0xFFFF) + gSprites[sPokedexView->monSpriteIds[i]].data[5] -= monMoveIncrement; + } + step = LIST_SCROLL_STEP * (scrollTimerMax - sPokedexView->scrollTimer) / scrollTimerMax; + SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->listMovingVOffset * LIST_SCROLL_STEP + step); + sPokedexView->pokeBallRotation += sPokedexView->pokeBallRotationStep; + break; } return FALSE; } else { - SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->unk630 * 16); + SetGpuReg(REG_OFFSET_BG2VOFS, sPokedexView->initialVOffset + sPokedexView->listVOffset * LIST_SCROLL_STEP); return TRUE; } } -static void CreateNewPokemonSprite(u8 direction, u16 selectedMon) +static void CreateScrollingPokemonSprite(u8 direction, u16 selectedMon) { - u16 unk; + u16 dexNum; u8 spriteId; - sPokedexView->unk632 = sPokedexView->unk630; + sPokedexView->listMovingVOffset = sPokedexView->listVOffset; switch (direction) { - case 1: // up - unk = GetPokemonSpriteToDisplay(selectedMon - 1); - if (unk != 0xFFFF) - { - spriteId = sub_80BDACC(unk, 0x60, 0x50); - gSprites[spriteId].callback = sub_80BE4E0; - gSprites[spriteId].data[5] = -64; - } - if (sPokedexView->unk630 > 0) - sPokedexView->unk630--; - else - sPokedexView->unk630 = 15; - break; - case 2: // down - unk = GetPokemonSpriteToDisplay(selectedMon + 1); - if (unk != 0xFFFF) - { - spriteId = sub_80BDACC(unk, 0x60, 0x50); - gSprites[spriteId].callback = sub_80BE4E0; - gSprites[spriteId].data[5] = 0x40; - } - if (sPokedexView->unk630 <= 0xE) - sPokedexView->unk630++; - else - sPokedexView->unk630 = 0; - break; + case 1: // up + dexNum = GetPokemonSpriteToDisplay(selectedMon - 1); + if (dexNum != 0xFFFF) + { + spriteId = CreatePokedexMonSprite(dexNum, 0x60, 0x50); + gSprites[spriteId].callback = SpriteCB_PokedexListMonSprite; + gSprites[spriteId].data[5] = -64; + } + if (sPokedexView->listVOffset > 0) + sPokedexView->listVOffset--; + else + sPokedexView->listVOffset = LIST_SCROLL_STEP - 1; + break; + case 2: // down + dexNum = GetPokemonSpriteToDisplay(selectedMon + 1); + if (dexNum != 0xFFFF) + { + spriteId = CreatePokedexMonSprite(dexNum, 0x60, 0x50); + gSprites[spriteId].callback = SpriteCB_PokedexListMonSprite; + gSprites[spriteId].data[5] = 64; + } + if (sPokedexView->listVOffset < LIST_SCROLL_STEP - 1) + sPokedexView->listVOffset++; + else + sPokedexView->listVOffset = 0; + break; } } -u16 sub_80BD69C(u16 selectedMon, u16 b) +// u16 ignored is passed but never used +static u16 TryDoPokedexScroll(u16 selectedMon, u16 ignored) { - u8 r3; - u8 r5; + u8 scrollTimer; + u8 scrollMonIncrement; u8 i; - u16 r6; - u8 r10 = 0; + u16 startingPos; + u8 scrollDir = 0; if ((gMain.heldKeys & DPAD_UP) && (selectedMon > 0)) { - r10 = 1; - selectedMon = sub_80C0E0C(1, selectedMon, 0, sPokedexView->pokemonListCount - 1); - CreateNewPokemonSprite(1, selectedMon); - CreateMonListEntry(1, selectedMon, b); + scrollDir = 1; + selectedMon = GetNextPosition(1, selectedMon, 0, sPokedexView->pokemonListCount - 1); + CreateScrollingPokemonSprite(1, selectedMon); + CreateMonListEntry(1, selectedMon, ignored); PlaySE(SE_Z_SCROLL); } else if ((gMain.heldKeys & DPAD_DOWN) && (selectedMon < sPokedexView->pokemonListCount - 1)) { - r10 = 2; - selectedMon = sub_80C0E0C(0, selectedMon, 0, sPokedexView->pokemonListCount - 1); - CreateNewPokemonSprite(2, selectedMon); - CreateMonListEntry(2, selectedMon, b); + scrollDir = 2; + selectedMon = GetNextPosition(0, selectedMon, 0, sPokedexView->pokemonListCount - 1); + CreateScrollingPokemonSprite(2, selectedMon); + CreateMonListEntry(2, selectedMon, ignored); PlaySE(SE_Z_SCROLL); } else if ((gMain.newKeys & DPAD_LEFT) && (selectedMon > 0)) { - r6 = selectedMon; + startingPos = selectedMon; for (i = 0; i < 7; i++) - selectedMon = sub_80C0E0C(1, selectedMon, 0, sPokedexView->pokemonListCount - 1); - sPokedexView->unk62C += 16 * (selectedMon - r6); + selectedMon = GetNextPosition(1, selectedMon, 0, sPokedexView->pokemonListCount - 1); + sPokedexView->pokeBallRotation += 16 * (selectedMon - startingPos); ClearMonSprites(); - CreateInitialPokemonSprites(selectedMon, 0xE); + CreateMonSpritesAtPos(selectedMon, 0xE); PlaySE(SE_Z_PAGE); } else if ((gMain.newKeys & DPAD_RIGHT) && (selectedMon < sPokedexView->pokemonListCount - 1)) { - r6 = selectedMon; + startingPos = selectedMon; for (i = 0; i < 7; i++) - selectedMon = sub_80C0E0C(0, selectedMon, 0, sPokedexView->pokemonListCount - 1); - sPokedexView->unk62C += (selectedMon - r6) * 16; + selectedMon = GetNextPosition(0, selectedMon, 0, sPokedexView->pokemonListCount - 1); + sPokedexView->pokeBallRotation += 16 * (selectedMon - startingPos); ClearMonSprites(); - CreateInitialPokemonSprites(selectedMon, 0xE); + CreateMonSpritesAtPos(selectedMon, 0xE); PlaySE(SE_Z_PAGE); } - if (r10 == 0) + if (scrollDir == 0) { - sPokedexView->unk638 = 0; + // Left/right input just snaps up/down, no scrolling + sPokedexView->scrollSpeed = 0; return selectedMon; } - r5 = gUnknown_0855D28C[sPokedexView->unk638 / 4]; - r3 = gUnknown_0855D291[sPokedexView->unk638 / 4]; - sPokedexView->unk62E = r3; - sPokedexView->unk636 = r3; - sPokedexView->unk634 = r5; - sPokedexView->unk62F = r10; - sPokedexView->unk628 = r5 / 2; - sub_80BD404(sPokedexView->unk62F, sPokedexView->unk634, sPokedexView->unk636); - if (sPokedexView->unk638 <= 0xB) - sPokedexView->unk638++; + scrollMonIncrement = sScrollMonIncrements[sPokedexView->scrollSpeed / 4]; + scrollTimer = sScrollTimers[sPokedexView->scrollSpeed / 4]; + sPokedexView->scrollTimer = scrollTimer; + sPokedexView->maxScrollTimer = scrollTimer; + sPokedexView->scrollMonIncrement = scrollMonIncrement; + sPokedexView->scrollDirection = scrollDir; + sPokedexView->pokeBallRotationStep = scrollMonIncrement / 2; + UpdateDexListScroll(sPokedexView->scrollDirection, sPokedexView->scrollMonIncrement, sPokedexView->maxScrollTimer); + if (sPokedexView->scrollSpeed < 12) + sPokedexView->scrollSpeed++; return selectedMon; } @@ -2394,7 +2654,7 @@ static void UpdateSelectedMonSpriteId(void) { u16 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) { u16 spriteId = sPokedexView->monSpriteIds[i]; @@ -2403,54 +2663,54 @@ static void UpdateSelectedMonSpriteId(void) } } -static bool8 UpdateSelectedMon(void) +static bool8 TryDoInfoScreenScroll(void) { - u16 r2; - u16 r4 = sPokedexView->selectedPokemon; + u16 nextPokemon; + u16 selectedPokemon = sPokedexView->selectedPokemon; - if ((gMain.newKeys & DPAD_UP) && r4) + if ((gMain.newKeys & DPAD_UP) && selectedPokemon) { - r2 = r4; - while (r2 != 0) + nextPokemon = selectedPokemon; + while (nextPokemon != 0) { - r2 = sub_80C0E0C(1, r2, 0, sPokedexView->pokemonListCount - 1); + nextPokemon = GetNextPosition(1, nextPokemon, 0, sPokedexView->pokemonListCount - 1); - if (sPokedexView->pokedexList[r2].seen) + if (sPokedexView->pokedexList[nextPokemon].seen) { - r4 = r2; + selectedPokemon = nextPokemon; break; } } - if (sPokedexView->selectedPokemon == r4) + if (sPokedexView->selectedPokemon == selectedPokemon) return FALSE; else { - sPokedexView->selectedPokemon = r4; - sPokedexView->unk62C -= 16; + sPokedexView->selectedPokemon = selectedPokemon; + sPokedexView->pokeBallRotation -= 16; return TRUE; } } - else if ((gMain.newKeys & DPAD_DOWN) && r4 < sPokedexView->pokemonListCount - 1) + else if ((gMain.newKeys & DPAD_DOWN) && selectedPokemon < sPokedexView->pokemonListCount - 1) { - r2 = r4; - while (r2 < sPokedexView->pokemonListCount - 1) + nextPokemon = selectedPokemon; + while (nextPokemon < sPokedexView->pokemonListCount - 1) { - r2 = sub_80C0E0C(0, r2, 0, sPokedexView->pokemonListCount - 1); + nextPokemon = GetNextPosition(0, nextPokemon, 0, sPokedexView->pokemonListCount - 1); - if (sPokedexView->pokedexList[r2].seen) + if (sPokedexView->pokedexList[nextPokemon].seen) { - r4 = r2; + selectedPokemon = nextPokemon; break; } } - if (sPokedexView->selectedPokemon == r4) + if (sPokedexView->selectedPokemon == selectedPokemon) return FALSE; else { - sPokedexView->selectedPokemon = r4; - sPokedexView->unk62C += 16; + sPokedexView->selectedPokemon = selectedPokemon; + sPokedexView->pokeBallRotation += 16; return TRUE; } } @@ -2461,7 +2721,7 @@ static u8 ClearMonSprites(void) { u16 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) { if (sPokedexView->monSpriteIds[i] != 0xFFFF) { @@ -2472,7 +2732,7 @@ static u8 ClearMonSprites(void) return FALSE; } -u16 GetPokemonSpriteToDisplay(u16 species) +static u16 GetPokemonSpriteToDisplay(u16 species) { if (species >= NATIONAL_DEX_COUNT || sPokedexView->pokedexList[species].dexNum == 0xFFFF) return 0xFFFF; @@ -2482,11 +2742,11 @@ u16 GetPokemonSpriteToDisplay(u16 species) return 0; } -u32 sub_80BDACC(u16 num, s16 x, s16 y) +static u32 CreatePokedexMonSprite(u16 num, s16 x, s16 y) { u8 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MONS_ON_SCREEN; i++) { if (sPokedexView->monSpriteIds[i] == 0xFFFF) { @@ -2504,223 +2764,245 @@ u32 sub_80BDACC(u16 num, s16 x, s16 y) return 0xFFFF; } -static void CreateInterfaceSprites(u8 a) +#define sIsDownArrow data[1] + +static void CreateInterfaceSprites(u8 page) { u8 spriteId; - u16 r5; -// Up arrow - spriteId = CreateSprite(&sArrowSpriteTemplate, 184, 4, 0); - gSprites[spriteId].data[1] = 0; -// Down arrow - spriteId = CreateSprite(&sArrowSpriteTemplate, 184, 156, 0); - gSprites[spriteId].data[1] = 1; + u16 digitNum; + + // Scroll arrows + spriteId = CreateSprite(&sScrollArrowSpriteTemplate, 184, 4, 0); + gSprites[spriteId].sIsDownArrow = FALSE; + spriteId = CreateSprite(&sScrollArrowSpriteTemplate, 184, 156, 0); + gSprites[spriteId].sIsDownArrow = TRUE; gSprites[spriteId].vFlip = TRUE; CreateSprite(&sScrollBarSpriteTemplate, 230, 20, 0); -// Start button + // Start button CreateSprite(&sInterfaceTextSpriteTemplate, 16, 120, 0); -// Menu text + // Menu text spriteId = CreateSprite(&sInterfaceTextSpriteTemplate, 48, 120, 0); StartSpriteAnim(&gSprites[spriteId], 3); -// Select button + // Select button spriteId = CreateSprite(&sInterfaceTextSpriteTemplate, 16, 144, 0); StartSpriteAnim(&gSprites[spriteId], 2); gSprites[spriteId].data[2] = 0x80; -// Search text + // Search text spriteId = CreateSprite(&sInterfaceTextSpriteTemplate, 48, 144, 0); StartSpriteAnim(&gSprites[spriteId], 1); - spriteId = CreateSprite(&sRotatingPokeballSpriteTemplate, 0, 80, 2); + spriteId = CreateSprite(&sRotatingPokeBallSpriteTemplate, 0, 80, 2); gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 30; - gSprites[spriteId].data[0] = 0x1E; + gSprites[spriteId].data[0] = 30; gSprites[spriteId].data[1] = 0; - spriteId = CreateSprite(&sRotatingPokeballSpriteTemplate, 0, 80, 2); + spriteId = CreateSprite(&sRotatingPokeBallSpriteTemplate, 0, 80, 2); gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 31; - gSprites[spriteId].data[0] = 0x1F; - gSprites[spriteId].data[1] = 0x80; + gSprites[spriteId].data[0] = 31; + gSprites[spriteId].data[1] = 128; - if (a == 0) + if (page == PAGE_MAIN) { - u32 _a; + bool32 drawNextDigit; if (!IsNationalPokedexEnabled()) { -// Seen text + // Seen text CreateSprite(&sSeenOwnTextSpriteTemplate, 32, 40, 1); -// Own text + // Own text spriteId = CreateSprite(&sSeenOwnTextSpriteTemplate, 32, 72, 1); StartSpriteAnim(&gSprites[spriteId], 1); - _a = 0; -// Seen value - 100s - spriteId = CreateSprite(&gUnknown_0855D224, 24, 48, 1); - r5 = sPokedexView->seenCount / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + + // Seen value - 100s + drawNextDigit = FALSE; + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 24, 48, 1); + digitNum = sPokedexView->seenCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; -// Seen value - 10s - spriteId = CreateSprite(&gUnknown_0855D224, 32, 48, 1); - r5 = (sPokedexView->seenCount % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + + // Seen value - 10s + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 32, 48, 1); + digitNum = (sPokedexView->seenCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; -// Seen value - 1s - spriteId = CreateSprite(&gUnknown_0855D224, 40, 48, 1); - r5 = (sPokedexView->seenCount % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); - _a = 0; -// Owned value - 100s - spriteId = CreateSprite(&gUnknown_0855D224, 24, 80, 1); - r5 = sPokedexView->ownCount / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + + // Seen value - 1s + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 40, 48, 1); + digitNum = (sPokedexView->seenCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); + + // Owned value - 100s + drawNextDigit = FALSE; + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 24, 80, 1); + digitNum = sPokedexView->ownCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; -// Owned value - 10s - spriteId = CreateSprite(&gUnknown_0855D224, 32, 80, 1); - r5 = (sPokedexView->ownCount % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + + // Owned value - 10s + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 32, 80, 1); + digitNum = (sPokedexView->ownCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; -// Owned value -1s - spriteId = CreateSprite(&gUnknown_0855D224, 40, 80, 1); - r5 = (sPokedexView->ownCount % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); + + // Owned value - 1s + spriteId = CreateSprite(&sHoennDexSeenOwnNumberSpriteTemplate, 40, 80, 1); + digitNum = (sPokedexView->ownCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); } else { - u16 r6; + u16 seenOwnedCount; + // Seen text CreateSprite(&sSeenOwnTextSpriteTemplate, 32, 40, 1); - + // Own text spriteId = CreateSprite(&sSeenOwnTextSpriteTemplate, 32, 76, 1); StartSpriteAnim(&gSprites[spriteId], 1); - CreateSprite(&gUnknown_0855D20C, 17, 45, 1); + // Hoenn text (seen) + CreateSprite(&sHoennNationalTextSpriteTemplate, 17, 45, 1); - spriteId = CreateSprite(&gUnknown_0855D20C, 17, 55, 1); + // National text (seen) + spriteId = CreateSprite(&sHoennNationalTextSpriteTemplate, 17, 55, 1); StartSpriteAnim(&gSprites[spriteId], 1); - CreateSprite(&gUnknown_0855D20C, 17, 81, 1); + // Hoenn text (own) + CreateSprite(&sHoennNationalTextSpriteTemplate, 17, 81, 1); - spriteId = CreateSprite(&gUnknown_0855D20C, 17, 91, 1); + // National text (own) + spriteId = CreateSprite(&sHoennNationalTextSpriteTemplate, 17, 91, 1); StartSpriteAnim(&gSprites[spriteId], 1); - r6 = GetHoennPokedexCount(FLAG_GET_SEEN); - _a = 0; - - spriteId = CreateSprite(&gUnknown_0855D23C, 40, 45, 1); - r5 = r6 / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + // Hoenn seen value - 100s + seenOwnedCount = GetHoennPokedexCount(FLAG_GET_SEEN); + drawNextDigit = FALSE; + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 40, 45, 1); + digitNum = seenOwnedCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 48, 45, 1); - r5 = (r6 % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + // Hoenn seen value - 10s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 48, 45, 1); + digitNum = (seenOwnedCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 56, 45, 1); - r5 = (r6 % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); + // Hoenn seen value - 1s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 56, 45, 1); + digitNum = (seenOwnedCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); - _a = 0; - - spriteId = CreateSprite(&gUnknown_0855D23C, 40, 55, 1); - r5 = sPokedexView->seenCount / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + // National seen value - 100s + drawNextDigit = FALSE; + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 40, 55, 1); + digitNum = sPokedexView->seenCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 48, 55, 1); - r5 = (sPokedexView->seenCount % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + // National seen value - 10s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 48, 55, 1); + digitNum = (sPokedexView->seenCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 56, 55, 1); - r5 = (sPokedexView->seenCount % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); + // National seen value - 1s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 56, 55, 1); + digitNum = (sPokedexView->seenCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); - r6 = GetHoennPokedexCount(FLAG_GET_CAUGHT); - _a = 0; + seenOwnedCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); - spriteId = CreateSprite(&gUnknown_0855D23C, 40, 81, 1); - r5 = r6 / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + // Hoenn owned value - 100s + drawNextDigit = FALSE; + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 40, 81, 1); + digitNum = seenOwnedCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 48, 81, 1); - r5 = (r6 % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + // Hoenn owned value - 10s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 48, 81, 1); + digitNum = (seenOwnedCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 56, 81, 1); - r5 = (r6 % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); + // Hoenn owned value - 1s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 56, 81, 1); + digitNum = (seenOwnedCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); - _a = 0; - - spriteId = CreateSprite(&gUnknown_0855D23C, 40, 91, 1); - r5 = sPokedexView->ownCount / 100; - StartSpriteAnim(&gSprites[spriteId], r5); - if (r5 != 0) - _a = 1; + // National owned value - 100s + drawNextDigit = FALSE; + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 40, 91, 1); + digitNum = sPokedexView->ownCount / 100; + StartSpriteAnim(&gSprites[spriteId], digitNum); + if (digitNum != 0) + drawNextDigit = TRUE; else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 48, 91, 1); - r5 = (sPokedexView->ownCount % 100) / 10; - if (r5 != 0 || _a != 0) - StartSpriteAnim(&gSprites[spriteId], r5); + // National owned value - 10s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 48, 91, 1); + digitNum = (sPokedexView->ownCount % 100) / 10; + if (digitNum != 0 || drawNextDigit) + StartSpriteAnim(&gSprites[spriteId], digitNum); else gSprites[spriteId].invisible = TRUE; - spriteId = CreateSprite(&gUnknown_0855D23C, 56, 91, 1); - r5 = (sPokedexView->ownCount % 100) % 10; - StartSpriteAnim(&gSprites[spriteId], r5); + // National owned value - 1s + spriteId = CreateSprite(&sNationalDexSeenOwnNumberSpriteTemplate, 56, 91, 1); + digitNum = (sPokedexView->ownCount % 100) % 10; + StartSpriteAnim(&gSprites[spriteId], digitNum); } - spriteId = CreateSprite(&gUnknown_0855D254, 136, 96, 1); + spriteId = CreateSprite(&sDexListStartMenuCursorSpriteTemplate, 136, 96, 1); gSprites[spriteId].invisible = TRUE; } - else + else // PAGE_SEARCH_RESULTS { - spriteId = CreateSprite(&gUnknown_0855D254, 136, 80, 1); + spriteId = CreateSprite(&sDexListStartMenuCursorSpriteTemplate, 136, 80, 1); gSprites[spriteId].invisible = TRUE; } } -void nullsub_38(struct Sprite *sprite) +static void SpriteCB_EndMoveMonForInfoScreen(struct Sprite *sprite) { + // Once mon is done moving there's nothing left to do } -void sub_80BE44C(struct Sprite *sprite) +static void SpriteCB_SeenOwnInfo(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0) + if (sPokedexView->currentPage != PAGE_MAIN) DestroySprite(sprite); } -//Move Pokemon into position for description page -void MoveMonIntoPosition(struct Sprite *sprite) +void SpriteCB_MoveMonForInfoScreen(struct Sprite *sprite) { sprite->oam.priority = 0; sprite->oam.affineMode = ST_OAM_AFFINE_OFF; @@ -2740,29 +3022,29 @@ void MoveMonIntoPosition(struct Sprite *sprite) } else { - sprite->callback = nullsub_38; + sprite->callback = SpriteCB_EndMoveMonForInfoScreen; } } -void sub_80BE4E0(struct Sprite *sprite) +static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite) { - u8 data1 = sprite->data[1]; + u8 monId = sprite->data[1]; - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) { - FreeAndDestroyMonPicSprite(sPokedexView->monSpriteIds[data1]); - sPokedexView->monSpriteIds[data1] = 0xFFFF; + FreeAndDestroyMonPicSprite(sPokedexView->monSpriteIds[monId]); + sPokedexView->monSpriteIds[monId] = 0xFFFF; } else { u32 var; sprite->pos2.y = gSineTable[(u8)sprite->data[5]] * 76 / 256; - var = 0x10000 / gSineTable[sprite->data[5] + 0x40]; + var = 0x10000 / gSineTable[sprite->data[5] + 64]; if (var > 0xFFFF) var = 0xFFFF; SetOamMatrix(sprite->data[1] + 1, 0x100, 0, 0, var); - sprite->oam.matrixNum = data1 + 1; + sprite->oam.matrixNum = monId + 1; if (sprite->data[5] > -64 && sprite->data[5] < 64) { @@ -2776,23 +3058,23 @@ void sub_80BE4E0(struct Sprite *sprite) if ((sprite->data[5] <= -64 || sprite->data[5] >= 64) && sprite->data[0] != 0) { - FreeAndDestroyMonPicSprite(sPokedexView->monSpriteIds[data1]); - sPokedexView->monSpriteIds[data1] = 0xFFFF; + FreeAndDestroyMonPicSprite(sPokedexView->monSpriteIds[monId]); + sPokedexView->monSpriteIds[monId] = 0xFFFF; } } } static void SpriteCB_Scrollbar(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) DestroySprite(sprite); else sprite->pos2.y = sPokedexView->selectedPokemon * 120 / (sPokedexView->pokemonListCount - 1); } -void sub_80BE658(struct Sprite *sprite) +static void SpriteCB_ScrollArrow(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) { DestroySprite(sprite); } @@ -2800,7 +3082,7 @@ void sub_80BE658(struct Sprite *sprite) { u8 r0; - if (sprite->data[1] != 0) + if (sprite->sIsDownArrow) { if (sPokedexView->selectedPokemon == sPokedexView->pokemonListCount - 1) sprite->invisible = TRUE; @@ -2818,22 +3100,22 @@ void sub_80BE658(struct Sprite *sprite) } sprite->pos2.y = gSineTable[r0] / 64; sprite->data[2] = sprite->data[2] + 8; - if (sPokedexView->menuIsOpen == 0 && sPokedexView->menuY == 0 && sprite->invisible == 0) + if (sPokedexView->menuIsOpen == FALSE && sPokedexView->menuY == 0 && sprite->invisible == FALSE) sprite->invisible = FALSE; else sprite->invisible = TRUE; } } -void sub_80BE758(struct Sprite *sprite) +static void SpriteCB_DexListInterfaceText(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) DestroySprite(sprite); } -void sub_80BE780(struct Sprite *sprite) +static void SpriteCB_RotatingPokeBall(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) { DestroySprite(sprite); } @@ -2843,30 +3125,30 @@ void sub_80BE780(struct Sprite *sprite) s16 r3; s16 r0; - val = sPokedexView->unk62C + sprite->data[1]; + val = sPokedexView->pokeBallRotation + sprite->data[1]; r3 = gSineTable[val]; - r0 = gSineTable[val + 0x40]; + r0 = gSineTable[val + 64]; SetOamMatrix(sprite->data[0], r0, r3, -r3, r0); - val = sPokedexView->unk62C + (sprite->data[1] + 0x40); + val = sPokedexView->pokeBallRotation + (sprite->data[1] + 64); r3 = gSineTable[val]; - r0 = gSineTable[val + 0x40]; + r0 = gSineTable[val + 64]; sprite->pos2.x = r0 * 40 / 256; sprite->pos2.y = r3 * 40 / 256; } } -void sub_80BE834(struct Sprite *sprite) +static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite) { - if (sPokedexView->unk64A != 0 && sPokedexView->unk64A != 3) + if (sPokedexView->currentPage != PAGE_MAIN && sPokedexView->currentPage != PAGE_SEARCH_RESULTS) { DestroySprite(sprite); } else { - u16 r1 = sPokedexView->unk64A == 0 ? 80 : 96; + u16 r1 = sPokedexView->currentPage == PAGE_MAIN ? 80 : 96; - if (sPokedexView->menuIsOpen != 0 && sPokedexView->menuY == r1) + if (sPokedexView->menuIsOpen && sPokedexView->menuY == r1) { sprite->invisible = FALSE; sprite->pos2.y = sPokedexView->menuCursorPos * 16; @@ -2880,24 +3162,24 @@ void sub_80BE834(struct Sprite *sprite) } } -static void PrintInfoPageText(const u8* str, u8 left, u8 top) +static void PrintInfoScreenText(const u8* str, u8 left, u8 top) { u8 color[3]; - color[0] = 0; - color[1] = 15; - color[2] = 3; + color[0] = TEXT_COLOR_TRANSPARENT; + color[1] = TEXT_DYNAMIC_COLOR_6; + color[2] = TEXT_COLOR_LIGHT_GREY; AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str); } #define tMonSpriteId data[4] -u8 SetupInfoScreen(struct PokedexListItem* item, u8 monSpriteId) +static u8 LoadInfoScreen(struct PokedexListItem* item, u8 monSpriteId) { u8 taskId; sPokedexListItem = item; - taskId = CreateTask(LoadInfoScreen, 0); + taskId = CreateTask(Task_LoadInfoScreen, 0); gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 1; gTasks[taskId].data[2] = 0; @@ -2905,7 +3187,7 @@ u8 SetupInfoScreen(struct PokedexListItem* item, u8 monSpriteId) gTasks[taskId].tMonSpriteId = monSpriteId; gTasks[taskId].data[5] = 255; ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sInfoScreen_BgTemplate, 4); + InitBgsFromTemplates(0, sInfoScreen_BgTemplate, ARRAY_COUNT(sInfoScreen_BgTemplate)); SetBgTilemapBuffer(3, AllocZeroed(0x800)); SetBgTilemapBuffer(2, AllocZeroed(0x800)); SetBgTilemapBuffer(1, AllocZeroed(0x800)); @@ -2916,168 +3198,170 @@ u8 SetupInfoScreen(struct PokedexListItem* item, u8 monSpriteId) return taskId; } -bool8 sub_80BE9C4(u8 taskId) +static bool8 IsInfoScreenScrolling(u8 taskId) { - if (gTasks[taskId].data[0] == 0 && gTasks[taskId].func == ChangePokedexScreen) + if (gTasks[taskId].data[0] == 0 && gTasks[taskId].func == Task_HandleInfoScreenInput) return FALSE; else return TRUE; } -u8 sub_80BE9F8(struct PokedexListItem *item, u8 b) +static u8 sub_80BE9F8(struct PokedexListItem *item, u8 taskId) { sPokedexListItem = item; - gTasks[b].data[0] = 1; - gTasks[b].data[1] = 0; - gTasks[b].data[2] = 0; - gTasks[b].data[3] = 0; - return b; + gTasks[taskId].data[0] = 1; + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = 0; + gTasks[taskId].data[3] = 0; + return taskId; } -void LoadInfoScreen(u8 taskId) +static void Task_LoadInfoScreen(u8 taskId) { switch (gMain.state) { - case 0: - default: - if (!gPaletteFade.active) - { - u16 r2; + case 0: + default: + if (!gPaletteFade.active) + { + u16 r2; - sPokedexView->unk64A = 1; - gUnknown_030060B4 = gMain.vblankCallback; - SetVBlankCallback(NULL); - r2 = 0; - if (gTasks[taskId].data[1] != 0) - r2 += DISPCNT_OBJ_ON; - if (gTasks[taskId].data[2] != 0) - r2 |= DISPCNT_BG1_ON; - ResetOtherVideoRegisters(r2); - gMain.state = 1; - } - break; - case 1: - DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0); - FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PutWindowTilemap(WIN_INFO); - PutWindowTilemap(WIN_FOOTPRINT); - PrintFootprint(WIN_FOOTPRINT, sPokedexListItem->dexNum); - CopyWindowToVram(WIN_FOOTPRINT, 2); - gMain.state++; - break; - case 2: - sub_80BFCDC(0xD); - sub_80BFD0C(sPokedexView->selectedScreen, 0xD); - LoadPokedexBgPalette(sPokedexView->unk64C_1); - gMain.state++; - break; - case 3: - gMain.state++; - break; - case 4: - PrintMonInfo(sPokedexListItem->dexNum, sPokedexView->dexMode == 0 ? 0 : 1, sPokedexListItem->owned, 0); - if (!sPokedexListItem->owned) - LoadPalette(gPlttBufferUnfaded + 1, 0x31, 0x1E); - CopyWindowToVram(WIN_INFO, 3); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - gMain.state++; - break; - case 5: - if (gTasks[taskId].data[1] == 0) - { - gTasks[taskId].tMonSpriteId = (u16)CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); - gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; - } - gMain.state++; - break; - case 6: - { - u32 preservedPalettes = 0; + sPokedexView->currentPage = PAGE_INFO; + gPokedexVBlankCB = gMain.vblankCallback; + SetVBlankCallback(NULL); + r2 = 0; + if (gTasks[taskId].data[1] != 0) + r2 += DISPCNT_OBJ_ON; + if (gTasks[taskId].data[2] != 0) + r2 |= DISPCNT_BG1_ON; + ResetOtherVideoRegisters(r2); + gMain.state = 1; + } + break; + case 1: + DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(3, gPokedexInfoScreen_Tilemap, 0, 0); + FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); + PutWindowTilemap(WIN_INFO); + PutWindowTilemap(WIN_FOOTPRINT); + PrintFootprint(WIN_FOOTPRINT, sPokedexListItem->dexNum); + CopyWindowToVram(WIN_FOOTPRINT, 2); + gMain.state++; + break; + case 2: + LoadScreenSelectBarMain(0xD); + HighlightScreenSelectBarItem(sPokedexView->selectedScreen, 0xD); + LoadPokedexBgPalette(sPokedexView->isSearchResults); + gMain.state++; + break; + case 3: + gMain.state++; + break; + case 4: + PrintMonInfo(sPokedexListItem->dexNum, sPokedexView->dexMode == DEX_MODE_HOENN ? FALSE : TRUE, sPokedexListItem->owned, 0); + if (!sPokedexListItem->owned) + LoadPalette(gPlttBufferUnfaded + 1, 0x31, 0x1E); + CopyWindowToVram(WIN_INFO, 3); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + gMain.state++; + break; + case 5: + if (gTasks[taskId].data[1] == 0) + { + gTasks[taskId].tMonSpriteId = (u16)CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); + gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; + } + gMain.state++; + break; + case 6: + { + u32 preservedPalettes = 0; - if (gTasks[taskId].data[2] != 0) - preservedPalettes = 0x14; // each bit represents a palette index - if (gTasks[taskId].data[1] != 0) - preservedPalettes |= (1 << (gSprites[gTasks[taskId].tMonSpriteId].oam.paletteNum + 16)); - BeginNormalPaletteFade(~preservedPalettes, 0, 16, 0, RGB_BLACK); - SetVBlankCallback(gUnknown_030060B4); - gMain.state++; - } - break; - case 7: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - HideBg(0); - ShowBg(1); - ShowBg(2); - ShowBg(3); + if (gTasks[taskId].data[2] != 0) + preservedPalettes = 0x14; // each bit represents a palette index + if (gTasks[taskId].data[1] != 0) + preservedPalettes |= (1 << (gSprites[gTasks[taskId].tMonSpriteId].oam.paletteNum + 16)); + BeginNormalPaletteFade(~preservedPalettes, 0, 16, 0, RGB_BLACK); + SetVBlankCallback(gPokedexVBlankCB); gMain.state++; - break; - case 8: - if (!gPaletteFade.active) + } + break; + case 7: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + HideBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 8: + if (!gPaletteFade.active) + { + gMain.state++; + if (gTasks[taskId].data[3] == 0) + { + StopCryAndClearCrySongs(); + PlayCry2(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, 0x7D, 0xA); + } + else { gMain.state++; - if (gTasks[taskId].data[3] == 0) - { - StopCryAndClearCrySongs(); - PlayCry2(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, 0x7D, 0xA); - } - else - { - gMain.state++; - } } - break; - case 9: - if (!IsCryPlayingOrClearCrySongs()) - gMain.state++; - break; - case 10: - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = 1; - gTasks[taskId].data[3] = 1; - gTasks[taskId].func = ChangePokedexScreen; - gMain.state = 0; - break; + } + break; + case 9: + if (!IsCryPlayingOrClearCrySongs()) + gMain.state++; + break; + case 10: + gTasks[taskId].data[0] = 0; + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = 1; + gTasks[taskId].data[3] = 1; + gTasks[taskId].func = Task_HandleInfoScreenInput; + gMain.state = 0; + break; } } -static void FreeWindowAndBgBuffers_(void) +static void FreeInfoScreenWindowAndBgBuffers(void) { - void *r0; + void *tilemapBuffer; + FreeAllWindowBuffers(); - r0 = GetBgTilemapBuffer(0); - if (r0) - Free(r0); - r0 = GetBgTilemapBuffer(1); - if (r0) - Free(r0); - r0 = GetBgTilemapBuffer(2); - if (r0) - Free(r0); - r0 = GetBgTilemapBuffer(3); - if (r0) - Free(r0); + tilemapBuffer = GetBgTilemapBuffer(0); + if (tilemapBuffer) + Free(tilemapBuffer); + tilemapBuffer = GetBgTilemapBuffer(1); + if (tilemapBuffer) + Free(tilemapBuffer); + tilemapBuffer = GetBgTilemapBuffer(2); + if (tilemapBuffer) + Free(tilemapBuffer); + tilemapBuffer = GetBgTilemapBuffer(3); + if (tilemapBuffer) + Free(tilemapBuffer); } -void ChangePokedexScreen(u8 taskId) +static void Task_HandleInfoScreenInput(u8 taskId) { if (gTasks[taskId].data[0] != 0) { + // Scroll up/down BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - gTasks[taskId].func = BeginChangeInfoScreen; + gTasks[taskId].func = Task_LoadInfoScreenWaitForFade; PlaySE(SE_Z_SCROLL); return; } if (gMain.newKeys & B_BUTTON) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - gTasks[taskId].func = BeginReturnToPokedex; + gTasks[taskId].func = Task_ExitInfoScreen; PlaySE(SE_PC_OFF); return; } @@ -3085,36 +3369,36 @@ void ChangePokedexScreen(u8 taskId) { switch (sPokedexView->selectedScreen) { - case AREA_SCREEN: - BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB_BLACK); - sPokedexView->unk64E = 1; - gTasks[taskId].func = LoadSelectedScreen; - PlaySE(SE_PIN); - break; - case CRY_SCREEN: + case AREA_SCREEN: + BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB_BLACK); + sPokedexView->screenSwitchState = 1; + gTasks[taskId].func = Task_SwitchScreensFromInfoScreen; + PlaySE(SE_PIN); + break; + case CRY_SCREEN: + BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); + sPokedexView->screenSwitchState = 2; + gTasks[taskId].func = Task_SwitchScreensFromInfoScreen; + PlaySE(SE_PIN); + break; + case SIZE_SCREEN: + if (!sPokedexListItem->owned) + { + PlaySE(SE_HAZURE); + } + else + { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); - sPokedexView->unk64E = 2; - gTasks[taskId].func = LoadSelectedScreen; + sPokedexView->screenSwitchState = 3; + gTasks[taskId].func = Task_SwitchScreensFromInfoScreen; PlaySE(SE_PIN); - break; - case SIZE_SCREEN: - if (!sPokedexListItem->owned) - { - PlaySE(SE_HAZURE); - } - else - { - BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); - sPokedexView->unk64E = 3; - gTasks[taskId].func = LoadSelectedScreen; - PlaySE(SE_PIN); - } - break; - case CANCEL_SCREEN: - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = BeginReturnToPokedex; - PlaySE(SE_PC_OFF); - break; + } + break; + case CANCEL_SCREEN: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Task_ExitInfoScreen; + PlaySE(SE_PC_OFF); + break; } return; } @@ -3123,235 +3407,235 @@ void ChangePokedexScreen(u8 taskId) && sPokedexView->selectedScreen > 0) { sPokedexView->selectedScreen--; - sub_80BFD0C(sPokedexView->selectedScreen, 0xD); + HighlightScreenSelectBarItem(sPokedexView->selectedScreen, 0xD); PlaySE(SE_Z_PAGE); return; } if (((gMain.newKeys & DPAD_RIGHT) || ((gMain.newKeys & R_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) - && sPokedexView->selectedScreen < 3) + && sPokedexView->selectedScreen < CANCEL_SCREEN) { sPokedexView->selectedScreen++; - sub_80BFD0C(sPokedexView->selectedScreen, 0xD); + HighlightScreenSelectBarItem(sPokedexView->selectedScreen, 0xD); PlaySE(SE_Z_PAGE); return; } } -void LoadSelectedScreen(u8 taskId) +static void Task_SwitchScreensFromInfoScreen(u8 taskId) { if (!gPaletteFade.active) { FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); - switch (sPokedexView->unk64E) + switch (sPokedexView->screenSwitchState) { - case 1: - default: - gTasks[taskId].func = LoadAreaScreen; - break; - case 2: - gTasks[taskId].func = LoadCryScreen; - break; - case 3: - gTasks[taskId].func = LoadSizeScreen; - break; + case 1: + default: + gTasks[taskId].func = Task_LoadAreaScreen; + break; + case 2: + gTasks[taskId].func = Task_LoadCryScreen; + break; + case 3: + gTasks[taskId].func = Task_LoadSizeScreen; + break; } } } -void BeginChangeInfoScreen(u8 taskId) +static void Task_LoadInfoScreenWaitForFade(u8 taskId) { if (!gPaletteFade.active) { FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); - gTasks[taskId].func = LoadInfoScreen; + gTasks[taskId].func = Task_LoadInfoScreen; } } -void BeginReturnToPokedex(u8 taskId) +static void Task_ExitInfoScreen(u8 taskId) { if (!gPaletteFade.active) { FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); - FreeWindowAndBgBuffers_(); + FreeInfoScreenWindowAndBgBuffers(); DestroyTask(taskId); } } -void LoadAreaScreen(u8 taskId) +static void Task_LoadAreaScreen(u8 taskId) { switch (gMain.state) { - case 0: - default: - if (!gPaletteFade.active) - { - sPokedexView->unk64A = 5; - gUnknown_030060B4 = gMain.vblankCallback; - SetVBlankCallback(NULL); - ResetOtherVideoRegisters(DISPCNT_BG1_ON); - sPokedexView->selectedScreen = AREA_SCREEN; - gMain.state = 1; - } - break; - case 1: - sub_80BFCF4(0xD); - sub_80BFD7C(0, 0xD); - LoadPokedexBgPalette(sPokedexView->unk64C_1); - SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256); - gMain.state++; - break; - case 2: - ShowPokedexAreaScreen(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), &sPokedexView->unk64E); - SetVBlankCallback(gUnknown_030060B4); - sPokedexView->unk64E = 0; - gMain.state = 0; - gTasks[taskId].func = WaitForAreaScreenInput; - break; + case 0: + default: + if (!gPaletteFade.active) + { + sPokedexView->currentPage = PAGE_AREA; + gPokedexVBlankCB = gMain.vblankCallback; + SetVBlankCallback(NULL); + ResetOtherVideoRegisters(DISPCNT_BG1_ON); + sPokedexView->selectedScreen = AREA_SCREEN; + gMain.state = 1; + } + break; + case 1: + LoadScreenSelectBarSubmenu(0xD); + HighlightSubmenuScreenSelectBarItem(0, 0xD); + LoadPokedexBgPalette(sPokedexView->isSearchResults); + SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256); + gMain.state++; + break; + case 2: + ShowPokedexAreaScreen(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), &sPokedexView->screenSwitchState); + SetVBlankCallback(gPokedexVBlankCB); + sPokedexView->screenSwitchState = 0; + gMain.state = 0; + gTasks[taskId].func = Task_WaitForAreaScreenInput; + break; } } -static void WaitForAreaScreenInput(u8 taskId) +static void Task_WaitForAreaScreenInput(u8 taskId) { -// See Task_PokedexAreaScreen_1() in pokedex_area_screen.c - if (sPokedexView->unk64E != 0) - gTasks[taskId].func = sub_80BF1EC; +// See Task_HandlePokedexAreaScreenInput() in pokedex_area_screen.c + if (sPokedexView->screenSwitchState != 0) + gTasks[taskId].func = Task_SwitchScreensFromAreaScreen; } -void sub_80BF1EC(u8 taskId) +static void Task_SwitchScreensFromAreaScreen(u8 taskId) { if (!gPaletteFade.active) { - switch (sPokedexView->unk64E) + switch (sPokedexView->screenSwitchState) { - case 1: - default: - gTasks[taskId].func = LoadInfoScreen; - break; - case 2: - gTasks[taskId].func = LoadCryScreen; - break; + case 1: + default: + gTasks[taskId].func = Task_LoadInfoScreen; + break; + case 2: + gTasks[taskId].func = Task_LoadCryScreen; + break; } } } -void LoadCryScreen(u8 taskId) +static void Task_LoadCryScreen(u8 taskId) { switch (gMain.state) { - case 0: - default: - if (!gPaletteFade.active) - { - m4aMPlayStop(&gMPlayInfo_BGM); - sPokedexView->unk64A = 6; - gUnknown_030060B4 = gMain.vblankCallback; - SetVBlankCallback(NULL); - ResetOtherVideoRegisters(DISPCNT_BG1_ON); - sPokedexView->selectedScreen = CRY_SCREEN; - gMain.state = 1; - } - break; - case 1: - DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(3, &gPokedexTilemap_CryScreen, 0, 0); - FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PutWindowTilemap(WIN_INFO); - PutWindowTilemap(WIN_VU_METER); - PutWindowTilemap(WIN_CRY_WAVE); - gMain.state++; - break; - case 2: - sub_80BFCF4(0xD); - sub_80BFD7C(1, 0xD); - LoadPokedexBgPalette(sPokedexView->unk64C_1); - gMain.state++; - break; - case 3: - ResetPaletteFade(); - gMain.state++; - break; - case 4: - PrintInfoPageText(gText_CryOf, 0x52, 33); - sub_80C0B44(0, sPokedexListItem->dexNum, 0x52, 49); - gMain.state++; - break; - case 5: - gTasks[taskId].tMonSpriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); - gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; - gDexCryScreenState = 0; - gMain.state++; - break; - case 6: - { - struct CryRelatedStruct sp4; + case 0: + default: + if (!gPaletteFade.active) + { + m4aMPlayStop(&gMPlayInfo_BGM); + sPokedexView->currentPage = PAGE_CRY; + gPokedexVBlankCB = gMain.vblankCallback; + SetVBlankCallback(NULL); + ResetOtherVideoRegisters(DISPCNT_BG1_ON); + sPokedexView->selectedScreen = CRY_SCREEN; + gMain.state = 1; + } + break; + case 1: + DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(3, &gPokedexCryScreen_Tilemap, 0, 0); + FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); + PutWindowTilemap(WIN_INFO); + PutWindowTilemap(WIN_VU_METER); + PutWindowTilemap(WIN_CRY_WAVE); + gMain.state++; + break; + case 2: + LoadScreenSelectBarSubmenu(0xD); + HighlightSubmenuScreenSelectBarItem(1, 0xD); + LoadPokedexBgPalette(sPokedexView->isSearchResults); + gMain.state++; + break; + case 3: + ResetPaletteFade(); + gMain.state++; + break; + case 4: + PrintInfoScreenText(gText_CryOf, 82, 33); + PrintCryScreenSpeciesName(0, sPokedexListItem->dexNum, 82, 49); + gMain.state++; + break; + case 5: + gTasks[taskId].tMonSpriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); + gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; + gDexCryScreenState = 0; + gMain.state++; + break; + case 6: + { + struct CryRelatedStruct sp4; - sp4.unk0 = 0x4020; - sp4.unk2 = 0x1F; - sp4.paletteNo = 8; - sp4.yPos = 0x1E; - sp4.xPos = 0xC; - if (sub_8145354(&sp4, 2) != 0) - { - gMain.state++; - gDexCryScreenState = 0; - } - } - break; - case 7: + sp4.unk0 = 0x4020; + sp4.unk2 = 0x1F; + sp4.paletteNo = 8; + sp4.yPos = 0x1E; + sp4.xPos = 0xC; + if (LoadCryWaveformWindow(&sp4, 2)) { - struct CryRelatedStruct spC; - - spC.paletteNo = 9; - spC.xPos = 0x12; - spC.yPos = 3; - if (sub_8145850(&spC, 3) != 0) - gMain.state++; - CopyWindowToVram(WIN_VU_METER, 2); - CopyWindowToVram(WIN_INFO, 3); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); + gMain.state++; + gDexCryScreenState = 0; } - break; - case 8: - BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK); - SetVBlankCallback(gUnknown_030060B4); - gMain.state++; - break; - case 9: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - ShowBg(0); - ShowBg(1); - ShowBg(2); - ShowBg(3); - gMain.state++; - break; - case 10: - sPokedexView->unk64E = 0; - gMain.state = 0; - gTasks[taskId].func = sub_80BF5CC; - break; + } + break; + case 7: + { + struct CryRelatedStruct spC; + + spC.paletteNo = 9; + spC.xPos = 0x12; + spC.yPos = 3; + if (LoadCryMeter(&spC, 3)) + gMain.state++; + CopyWindowToVram(WIN_VU_METER, 2); + CopyWindowToVram(WIN_INFO, 3); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + } + break; + case 8: + BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK); + SetVBlankCallback(gPokedexVBlankCB); + gMain.state++; + break; + case 9: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 10: + sPokedexView->screenSwitchState = 0; + gMain.state = 0; + gTasks[taskId].func = Task_HandleCryScreenInput; + break; } } -void sub_80BF5CC(u8 taskId) +static void Task_HandleCryScreenInput(u8 taskId) { - sub_814545C(2); + UpdateCryWaveformWindow(2); if (IsCryPlaying()) - sub_80BF7FC(1); + LoadPlayArrowPalette(TRUE); else - sub_80BF7FC(0); + LoadPlayArrowPalette(FALSE); if (gMain.newKeys & A_BUTTON) { - sub_80BF7FC(1); - sub_8145534(NationalPokedexNumToSpecies(sPokedexListItem->dexNum)); + LoadPlayArrowPalette(TRUE); + CryScreenPlayButton(NationalPokedexNumToSpecies(sPokedexListItem->dexNum)); return; } else if (!gPaletteFade.active) @@ -3360,8 +3644,8 @@ void sub_80BF5CC(u8 taskId) { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); m4aMPlayContinue(&gMPlayInfo_BGM); - sPokedexView->unk64E = 1; - gTasks[taskId].func = sub_80BF790; + sPokedexView->screenSwitchState = 1; + gTasks[taskId].func = Task_SwitchScreensFromCryScreen; PlaySE(SE_PC_OFF); return; } @@ -3370,8 +3654,8 @@ void sub_80BF5CC(u8 taskId) { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); m4aMPlayContinue(&gMPlayInfo_BGM); - sPokedexView->unk64E = 2; - gTasks[taskId].func = sub_80BF790; + sPokedexView->screenSwitchState = 2; + gTasks[taskId].func = Task_SwitchScreensFromCryScreen; PlaySE(SE_Z_PAGE); return; } @@ -3386,8 +3670,8 @@ void sub_80BF5CC(u8 taskId) { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); m4aMPlayContinue(&gMPlayInfo_BGM); - sPokedexView->unk64E = 3; - gTasks[taskId].func = sub_80BF790; + sPokedexView->screenSwitchState = 3; + gTasks[taskId].func = Task_SwitchScreensFromCryScreen; PlaySE(SE_Z_PAGE); } return; @@ -3395,199 +3679,201 @@ void sub_80BF5CC(u8 taskId) } } -void sub_80BF790(u8 taskId) +static void Task_SwitchScreensFromCryScreen(u8 taskId) { if (!gPaletteFade.active) { - sub_8145914(); + FreeCryScreen(); FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); - switch (sPokedexView->unk64E) + switch (sPokedexView->screenSwitchState) { - default: - case 1: - gTasks[taskId].func = LoadInfoScreen; - break; - case 2: - gTasks[taskId].func = LoadAreaScreen; - break; - case 3: - gTasks[taskId].func = LoadSizeScreen; - break; + default: + case 1: + gTasks[taskId].func = Task_LoadInfoScreen; + break; + case 2: + gTasks[taskId].func = Task_LoadAreaScreen; + break; + case 3: + gTasks[taskId].func = Task_LoadSizeScreen; + break; } } } -void sub_80BF7FC(u8 a) +static void LoadPlayArrowPalette(bool8 cryPlaying) { - u16 unk; + u16 color; - if (a != 0) - unk = RGB(18, 28, 0); + if (cryPlaying) + color = RGB(18, 28, 0); else - unk = RGB(15, 21, 0); - LoadPalette(&unk, 0x5D, 2); + color = RGB(15, 21, 0); + LoadPalette(&color, 0x5D, 2); } -void LoadSizeScreen(u8 taskId) +static void Task_LoadSizeScreen(u8 taskId) { u8 spriteId; switch (gMain.state) { - default: - case 0: - if (!gPaletteFade.active) - { - sPokedexView->unk64A = 7; - gUnknown_030060B4 = gMain.vblankCallback; - SetVBlankCallback(NULL); - ResetOtherVideoRegisters(DISPCNT_BG1_ON); - sPokedexView->selectedScreen = SIZE_SCREEN; - gMain.state = 1; - } - break; - case 1: - DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(3, gPokedexTilemap_SizeScreen, 0, 0); - FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PutWindowTilemap(WIN_INFO); - gMain.state++; - break; - case 2: - sub_80BFCF4(0xD); - sub_80BFD7C(2, 0xD); - LoadPokedexBgPalette(sPokedexView->unk64C_1); - gMain.state++; - break; - case 3: - { - u8 string[0x40]; //I hope this is the correct size + default: + case 0: + if (!gPaletteFade.active) + { + sPokedexView->currentPage = PAGE_SIZE; + gPokedexVBlankCB = gMain.vblankCallback; + SetVBlankCallback(NULL); + ResetOtherVideoRegisters(DISPCNT_BG1_ON); + sPokedexView->selectedScreen = SIZE_SCREEN; + gMain.state = 1; + } + break; + case 1: + DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(3, gPokedexSizeScreen_Tilemap, 0, 0); + FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); + PutWindowTilemap(WIN_INFO); + gMain.state++; + break; + case 2: + LoadScreenSelectBarSubmenu(0xD); + HighlightSubmenuScreenSelectBarItem(2, 0xD); + LoadPokedexBgPalette(sPokedexView->isSearchResults); + gMain.state++; + break; + case 3: + { + u8 string[64]; - StringCopy(string, gText_SizeComparedTo); - StringAppend(string, gSaveBlock2Ptr->playerName); - PrintInfoPageText(string, GetStringCenterAlignXOffset(1, string, 0xF0), 0x79); - gMain.state++; - } - break; - case 4: - ResetPaletteFade(); + StringCopy(string, gText_SizeComparedTo); + StringAppend(string, gSaveBlock2Ptr->playerName); + PrintInfoScreenText(string, GetStringCenterAlignXOffset(1, string, 0xF0), 0x79); gMain.state++; - break; - case 5: - spriteId = sub_80C0EF8(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), 152, 56, 0); - gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; - gSprites[spriteId].oam.matrixNum = 1; - gSprites[spriteId].oam.priority = 0; - gSprites[spriteId].pos2.y = gPokedexEntries[sPokedexListItem->dexNum].trainerOffset; - SetOamMatrix(1, gPokedexEntries[sPokedexListItem->dexNum].trainerScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].trainerScale); - LoadPalette(gUnknown_0856E610, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); - gTasks[taskId].data[5] = spriteId; - gMain.state++; - break; - case 6: - spriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 88, 56, 1); - gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; - gSprites[spriteId].oam.matrixNum = 2; - gSprites[spriteId].oam.priority = 0; - gSprites[spriteId].pos2.y = gPokedexEntries[sPokedexListItem->dexNum].pokemonOffset; - SetOamMatrix(2, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale); - LoadPalette(gUnknown_0856E610, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); - gTasks[taskId].tMonSpriteId = spriteId; - CopyWindowToVram(WIN_INFO, 3); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - gMain.state++; - break; - case 7: - BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK); - SetVBlankCallback(gUnknown_030060B4); - gMain.state++; - break; - case 8: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - HideBg(0); - ShowBg(1); - ShowBg(2); - ShowBg(3); - gMain.state++; - break; - case 9: - if (!gPaletteFade.active) - { - sPokedexView->unk64E = 0; - gMain.state = 0; - gTasks[taskId].func = sub_80BFBB0; - } - break; + } + break; + case 4: + ResetPaletteFade(); + gMain.state++; + break; + case 5: + spriteId = CreateSizeScreenTrainerPic(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), 152, 56, 0); + gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; + gSprites[spriteId].oam.matrixNum = 1; + gSprites[spriteId].oam.priority = 0; + gSprites[spriteId].pos2.y = gPokedexEntries[sPokedexListItem->dexNum].trainerOffset; + SetOamMatrix(1, gPokedexEntries[sPokedexListItem->dexNum].trainerScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].trainerScale); + LoadPalette(sSizeScreenSilhouette_Pal, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); + gTasks[taskId].data[5] = spriteId; + gMain.state++; + break; + case 6: + spriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 88, 56, 1); + gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; + gSprites[spriteId].oam.matrixNum = 2; + gSprites[spriteId].oam.priority = 0; + gSprites[spriteId].pos2.y = gPokedexEntries[sPokedexListItem->dexNum].pokemonOffset; + SetOamMatrix(2, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale); + LoadPalette(sSizeScreenSilhouette_Pal, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); + gTasks[taskId].tMonSpriteId = spriteId; + CopyWindowToVram(WIN_INFO, 3); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + gMain.state++; + break; + case 7: + BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK); + SetVBlankCallback(gPokedexVBlankCB); + gMain.state++; + break; + case 8: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + HideBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 9: + if (!gPaletteFade.active) + { + sPokedexView->screenSwitchState = 0; + gMain.state = 0; + gTasks[taskId].func = Task_HandleSizeScreenInput; + } + break; } } -void sub_80BFBB0(u8 taskId) +static void Task_HandleSizeScreenInput(u8 taskId) { if (gMain.newKeys & B_BUTTON) { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); - sPokedexView->unk64E = 1; - gTasks[taskId].func = sub_80BFC78; + sPokedexView->screenSwitchState = 1; + gTasks[taskId].func = Task_SwitchScreensFromSizeScreen; PlaySE(SE_PC_OFF); } else if ((gMain.newKeys & DPAD_LEFT) || ((gMain.newKeys & L_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) { BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK); - sPokedexView->unk64E = 2; - gTasks[taskId].func = sub_80BFC78; + sPokedexView->screenSwitchState = 2; + gTasks[taskId].func = Task_SwitchScreensFromSizeScreen; PlaySE(SE_Z_PAGE); } } -void sub_80BFC78(u8 taskId) +static void Task_SwitchScreensFromSizeScreen(u8 taskId) { if (!gPaletteFade.active) { FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); FreeAndDestroyTrainerPicSprite(gTasks[taskId].data[5]); - switch (sPokedexView->unk64E) + switch (sPokedexView->screenSwitchState) { - default: - case 1: - gTasks[taskId].func = LoadInfoScreen; - break; - case 2: - gTasks[taskId].func = LoadCryScreen; - break; + default: + case 1: + gTasks[taskId].func = Task_LoadInfoScreen; + break; + case 2: + gTasks[taskId].func = Task_LoadCryScreen; + break; } } } -void sub_80BFCDC(u16 a) +#undef tMonSpriteId + +static void LoadScreenSelectBarMain(u16 unused) { - CopyToBgTilemapBuffer(1, gPokedexTilemap_ScreenSelectBar1, 0, 0); + CopyToBgTilemapBuffer(1, gPokedexScreenSelectBarMain_Tilemap, 0, 0); } -void sub_80BFCF4(u16 a) +static void LoadScreenSelectBarSubmenu(u16 unused) { - CopyToBgTilemapBuffer(1, gPokedexTilemap_ScreenSelectBar2, 0, 0); + CopyToBgTilemapBuffer(1, gPokedexScreenSelectBarSubmenu_Tilemap, 0, 0); } #ifdef NONMATCHING // This doesn't match because gcc flips the naming of the r3 and r4 // registers. -void sub_80BFD0C(u8 a, u16 unused) +static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) { u8 i; u8 j; u16* ptr = GetBgTilemapBuffer(1); - for (i = 0; i < 4; i++) + for (i = 0; i < SCREEN_COUNT; i++) { u8 row = (i * 7) + 1; u16 newPalette = 0x4000; - if (i == a) + if (i == selectedScreen) newPalette = 0x2000; for (j = 0; j < 7; j++) @@ -3600,7 +3886,7 @@ void sub_80BFD0C(u8 a, u16 unused) } #else __attribute__((naked)) -void sub_80BFD0C(u8 a, u16 unused) +static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -3666,7 +3952,7 @@ _080BFD3E:\n\ #ifdef NONMATCHING // This doesn't match because gcc flips the naming of the r3 and r4 // registers. -void sub_80BFD7C(u8 a, u16 b) +static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) { u8 i; u8 j; @@ -3692,7 +3978,7 @@ void sub_80BFD7C(u8 a, u16 b) } #else __attribute__((naked)) -void sub_80BFD7C(u8 a, u16 b) +static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -3760,111 +4046,121 @@ _080BFDB4:\n\ } #endif -u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 b, u32 c) -{ - u8 taskId = CreateTask(Task_DisplayNewMonData, 0); +#define tState data[0] +#define tDexNum data[1] +#define tPalTimer data[2] +#define tMonSpriteId data[3] +#define tOtIdLo data[12] +#define tOtIdHi data[13] +#define tPersonalityLo data[14] +#define tPersonalityHi data[15] - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = dexNum; - gTasks[taskId].data[12] = b; - gTasks[taskId].data[13] = b >> 16; - gTasks[taskId].data[14] = c; - gTasks[taskId].data[15] = c >> 16; +u8 DisplayCaughtMonDexPage(u16 dexNum, u32 otId, u32 personality) +{ + u8 taskId = CreateTask(Task_DisplayCaughtMonDexPage, 0); + + gTasks[taskId].tState = 0; + gTasks[taskId].tDexNum = dexNum; + gTasks[taskId].tOtIdLo = otId; + gTasks[taskId].tOtIdHi = otId >> 16; + gTasks[taskId].tPersonalityLo = personality; + gTasks[taskId].tPersonalityHi = personality >> 16; return taskId; } -static void Task_DisplayNewMonData(u8 taskId) +static void Task_DisplayCaughtMonDexPage(u8 taskId) { u8 spriteId; - u16 dexNum = gTasks[taskId].data[1]; + u16 dexNum = gTasks[taskId].tDexNum; - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { - case 0: - default: - if (!gPaletteFade.active) - { - gUnknown_030060B4 = gMain.vblankCallback; - SetVBlankCallback(NULL); - ResetOtherVideoRegisters(DISPCNT_BG0_ON); - ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sNewEntryInfoScreen_BgTemplate, 2); - SetBgTilemapBuffer(3, AllocZeroed(0x800)); - SetBgTilemapBuffer(2, AllocZeroed(0x800)); - InitWindows(sNewEntryInfoScreen_WindowTemplates); - DeactivateAllTextPrinters(); - gTasks[taskId].data[0] = 1; - } - break; - case 1: - DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0); - FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PutWindowTilemap(WIN_INFO); - PutWindowTilemap(WIN_FOOTPRINT); - PrintFootprint(WIN_FOOTPRINT, gTasks[taskId].data[1]); - CopyWindowToVram(WIN_FOOTPRINT, 2); - ResetPaletteFade(); - LoadPokedexBgPalette(0); - gTasks[taskId].data[0]++; - break; - case 2: - gTasks[taskId].data[0]++; - break; - case 3: - PrintMonInfo(dexNum, IsNationalPokedexEnabled(), 1, 1); - CopyWindowToVram(WIN_INFO, 3); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - gTasks[taskId].data[0]++; - break; - case 4: - spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, 48, 56, 0); - gSprites[spriteId].oam.priority = 0; - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); - SetVBlankCallback(gUnknown_030060B4); - gTasks[taskId].data[3] = spriteId; - gTasks[taskId].data[0]++; - break; - case 5: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - ShowBg(2); - ShowBg(3); - gTasks[taskId].data[0]++; - break; - case 6: - if (!gPaletteFade.active) - { - PlayCry1(NationalPokedexNumToSpecies(dexNum), 0); - gTasks[taskId].data[2] = 0; - gTasks[taskId].func = sub_80C0088; - } - break; + case 0: + default: + if (!gPaletteFade.active) + { + gPokedexVBlankCB = gMain.vblankCallback; + SetVBlankCallback(NULL); + ResetOtherVideoRegisters(DISPCNT_BG0_ON); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, sNewEntryInfoScreen_BgTemplate, ARRAY_COUNT(sNewEntryInfoScreen_BgTemplate)); + SetBgTilemapBuffer(3, AllocZeroed(0x800)); + SetBgTilemapBuffer(2, AllocZeroed(0x800)); + InitWindows(sNewEntryInfoScreen_WindowTemplates); + DeactivateAllTextPrinters(); + gTasks[taskId].tState = 1; + } + break; + case 1: + DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(3, gPokedexInfoScreen_Tilemap, 0, 0); + FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); + PutWindowTilemap(WIN_INFO); + PutWindowTilemap(WIN_FOOTPRINT); + PrintFootprint(WIN_FOOTPRINT, gTasks[taskId].tDexNum); + CopyWindowToVram(WIN_FOOTPRINT, 2); + ResetPaletteFade(); + LoadPokedexBgPalette(FALSE); + gTasks[taskId].tState++; + break; + case 2: + gTasks[taskId].tState++; + break; + case 3: + PrintMonInfo(dexNum, IsNationalPokedexEnabled(), 1, 1); + CopyWindowToVram(WIN_INFO, 3); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + gTasks[taskId].tState++; + break; + case 4: + spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, 48, 56, 0); + gSprites[spriteId].oam.priority = 0; + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); + SetVBlankCallback(gPokedexVBlankCB); + gTasks[taskId].tMonSpriteId = spriteId; + gTasks[taskId].tState++; + break; + case 5: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + ShowBg(2); + ShowBg(3); + gTasks[taskId].tState++; + break; + case 6: + if (!gPaletteFade.active) + { + PlayCry1(NationalPokedexNumToSpecies(dexNum), 0); + gTasks[taskId].tPalTimer = 0; + gTasks[taskId].func = Task_HandleCaughtMonPageInput; + } + break; } } -void sub_80C0088(u8 taskId) +static void Task_HandleCaughtMonPageInput(u8 taskId) { if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { BeginNormalPaletteFade(0x0000FFFF, 0, 0, 16, RGB_BLACK); - gSprites[gTasks[taskId].data[3]].callback = sub_80C01CC; - gTasks[taskId].func = blockset_load_palette_to_gpu; + gSprites[gTasks[taskId].tMonSpriteId].callback = SpriteCB_SlideCaughtMonToCenter; + gTasks[taskId].func = Task_ExitCaughtMonPage; } - else if (++gTasks[taskId].data[2] & 0x10) + // Flicker caught screen color + else if (++gTasks[taskId].tPalTimer & 16) { - LoadPalette(gPokedexText_Pal + 1, 0x31, 14); + LoadPalette(gPokedexBgHoenn_Pal + 1, 0x31, 14); } else { - LoadPalette(gPokedexCaughtScreenFade_Pal + 1, 0x31, 14); + LoadPalette(gPokedexCaughtScreen_Pal + 1, 0x31, 14); } } -void blockset_load_palette_to_gpu(u8 taskId) +static void Task_ExitCaughtMonPage(u8 taskId) { if (!gPaletteFade.active) { @@ -3884,17 +4180,17 @@ void blockset_load_palette_to_gpu(u8 taskId) if (buffer) Free(buffer); - species = NationalPokedexNumToSpecies(gTasks[taskId].data[1]); - otId = ((u16)gTasks[taskId].data[13] << 16) | (u16)gTasks[taskId].data[12]; - personality = ((u16)gTasks[taskId].data[15] << 16) | (u16)gTasks[taskId].data[14]; - paletteNum = gSprites[gTasks[taskId].data[3]].oam.paletteNum; + species = NationalPokedexNumToSpecies(gTasks[taskId].tDexNum); + otId = ((u16)gTasks[taskId].tOtIdHi << 16) | (u16)gTasks[taskId].tOtIdLo; + personality = ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo; + paletteNum = gSprites[gTasks[taskId].tMonSpriteId].oam.paletteNum; lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); LoadCompressedPalette(lzPaletteData, 0x100 | paletteNum * 16, 32); DestroyTask(taskId); } } -void sub_80C01CC(struct Sprite *sprite) +static void SpriteCB_SlideCaughtMonToCenter(struct Sprite *sprite) { if (sprite->pos1.x < 0x78) sprite->pos1.x += 2; @@ -3907,41 +4203,51 @@ void sub_80C01CC(struct Sprite *sprite) sprite->pos1.y -= 1; } +#undef tState +#undef tDexNum +#undef tPalTimer +#undef tMonSpriteId +#undef tOtIdLo +#undef tOtIdHi +#undef tPersonalityLo +#undef tPersonalityHi + +// u32 value is re-used, but passed as a bool that's TRUE if national dex is enabled static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry) { - u8 str[0x10]; - u8 str2[0x20]; + u8 str[16]; + u8 str2[32]; u16 natNum; - const u8 *text; - const u8 *text2; - const u8 *text3; + const u8 *name; + const u8 *category; + const u8 *description; if (newEntry) - PrintInfoPageText(gText_PokedexRegistration, GetStringCenterAlignXOffset(1, gText_PokedexRegistration, 0xF0), 0); + PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(1, gText_PokedexRegistration, 0xF0), 0); if (value == 0) value = NationalToHoennOrder(num); else value = num; ConvertIntToDecimalStringN(StringCopy(str, gText_NumberClear01), value, STR_CONV_MODE_LEADING_ZEROS, 3); - PrintInfoPageText(str, 0x60, 0x19); + PrintInfoScreenText(str, 0x60, 0x19); natNum = NationalPokedexNumToSpecies(num); if (natNum) - text = gSpeciesNames[natNum]; + name = gSpeciesNames[natNum]; else - text = sText_TenDashes2; - PrintInfoPageText(text, 0x84, 0x19); + name = sText_TenDashes2; + PrintInfoScreenText(name, 0x84, 0x19); if (owned) { CopyMonCategoryText(num, str2); - text2 = str2; + category = str2; } else { - text2 = gText_5MarksPokemon; + category = gText_5MarksPokemon; } - PrintInfoPageText(text2, 0x64, 0x29); - PrintInfoPageText(gText_HTHeight, 0x60, 0x39); - PrintInfoPageText(gText_WTWeight, 0x60, 0x49); + PrintInfoScreenText(category, 0x64, 0x29); + PrintInfoScreenText(gText_HTHeight, 0x60, 0x39); + PrintInfoScreenText(gText_WTWeight, 0x60, 0x49); if (owned) { PrintMonHeight(gPokedexEntries[num].height, 0x81, 0x39); @@ -3949,14 +4255,14 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry) } else { - PrintInfoPageText(gText_UnkHeight, 0x81, 0x39); - PrintInfoPageText(gText_UnkWeight, 0x81, 0x49); + PrintInfoScreenText(gText_UnkHeight, 0x81, 0x39); + PrintInfoScreenText(gText_UnkWeight, 0x81, 0x49); } if (owned) - text3 = gPokedexEntries[num].description; + description = gPokedexEntries[num].description; else - text3 = gExpandedPlaceholder_PokedexDescription; - PrintInfoPageText(text3, GetStringCenterAlignXOffset(1, text3, 0xF0), 0x5F); + description = gExpandedPlaceholder_PokedexDescription; + PrintInfoScreenText(description, GetStringCenterAlignXOffset(1, description, 0xF0), 0x5F); } static void PrintMonHeight(u16 height, u8 left, u8 top) @@ -3989,7 +4295,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top) buffer[i++] = (inches % 10) + CHAR_0; buffer[i++] = CHAR_DBL_QUOT_RIGHT; buffer[i++] = EOS; - PrintInfoPageText(buffer, left, top); + PrintInfoScreenText(buffer, left, top); } #ifdef NONMATCHING @@ -4051,7 +4357,7 @@ static void PrintMonWeight(u16 weight, u8 left, u8 top) buffer[i++] = CHAR_s; buffer[i++] = CHAR_PERIOD; buffer[i++] = EOS; - PrintInfoPageText(buffer, left, top); + PrintInfoScreenText(buffer, left, top); } #else __attribute__((naked)) @@ -4260,7 +4566,7 @@ _080C0552:\n\ mov r0, sp\n\ mov r1, r10\n\ ldr r2, [sp, 0x10]\n\ - bl PrintInfoPageText\n\ + bl PrintInfoScreenText\n\ add sp, 0x14\n\ pop {r3-r5}\n\ mov r8, r3\n\ @@ -4419,6 +4725,7 @@ bool16 HasAllHoennMons(void) { u16 i; + // -2 excludes Jirachi and Deoxys for (i = 0; i < HOENN_DEX_COUNT - 2; i++) { if (!GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT)) @@ -4431,6 +4738,7 @@ bool8 HasAllKantoMons(void) { u16 i; + // -1 excludes Mew for (i = 0; i < KANTO_DEX_COUNT - 1; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) @@ -4443,17 +4751,22 @@ bool16 HasAllMons(void) { u16 i; - for (i = 0; i < NATIONAL_DEX_MEWTWO; i++) + // -1 excludes Mew + for (i = 0; i < KANTO_DEX_COUNT - 1; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) return FALSE; } - for (i = NATIONAL_DEX_MEW; i < NATIONAL_DEX_TYRANITAR; i++) + + // -3 excludes Lugia, Ho-Oh, and Celebi + for (i = KANTO_DEX_COUNT; i < JOHTO_DEX_COUNT - 3; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) return FALSE; } - for (i = NATIONAL_DEX_CELEBI; i < NATIONAL_DEX_RAYQUAZA; i++) + + // -2 excludes Jirachi and Deoxys + for (i = JOHTO_DEX_COUNT; i < NATIONAL_DEX_COUNT - 2; i++) { if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) return FALSE; @@ -4500,67 +4813,67 @@ static void ResetOtherVideoRegisters(u16 a) } } -void sub_80C0A88(u8 windowId, const u8 *str, u8 left, u8 top) +static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top) { u8 color[3]; - color[0] = 0; - color[1] = 15; - color[2] = 3; + color[0] = TEXT_COLOR_TRANSPARENT; + color[1] = TEXT_DYNAMIC_COLOR_6; + color[2] = TEXT_COLOR_LIGHT_GREY; AddTextPrinterParameterized4(windowId, 1, left, top, 0, 0, color, -1, str); } -void sub_80C0AC4(u8 windowId, u16 order, u8 left, u8 top) // unused +static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top) { u8 str[4]; - str[0] = CHAR_0 + order / 100; - str[1] = CHAR_0 + (order % 100) / 10; - str[2] = CHAR_0 + (order % 100) % 10; + str[0] = CHAR_0 + num / 100; + str[1] = CHAR_0 + (num % 100) / 10; + str[2] = CHAR_0 + (num % 100) % 10; str[3] = EOS; - sub_80C0A88(windowId, str, left, top); + PrintInfoSubMenuText(windowId, str, left, top); } -u8 sub_80C0B44(u8 windowId, u16 num, u8 left, u8 top) +static u8 PrintCryScreenSpeciesName(u8 windowId, u16 num, u8 left, u8 top) { - u8 str[11]; + u8 str[POKEMON_NAME_LENGTH + 1]; u8 i; - for (i = 0; i < 11; i++) + for (i = 0; i < ARRAY_COUNT(str); i++) str[i] = EOS; num = NationalPokedexNumToSpecies(num); switch (num) { - default: - for (i = 0; gSpeciesNames[num][i] != EOS && i < 10; i++) - str[i] = gSpeciesNames[num][i]; - break; - case 0: - for (i = 0; i < 5; i++) - str[i] = CHAR_HYPHEN; - break; + default: + for (i = 0; gSpeciesNames[num][i] != EOS && i < POKEMON_NAME_LENGTH; i++) + str[i] = gSpeciesNames[num][i]; + break; + case 0: + for (i = 0; i < 5; i++) + str[i] = CHAR_HYPHEN; + break; } - sub_80C0A88(windowId, str, left, top); + PrintInfoSubMenuText(windowId, str, left, top); return i; } -void sub_80C0BF0(u8 windowId, const u8* str, u8 left, u8 top) // unused +static void UnusedPrintMonName(u8 windowId, const u8* name, u8 left, u8 top) { - u8 str2[11]; + u8 str[POKEMON_NAME_LENGTH + 1]; u8 i; - u8 count; + u8 nameLength; - for (i = 0; i < 11; i++) - str2[i] = CHAR_SPACE; - for (count = 0; str[count] != CHAR_SPACE && count < 11; count++) + for (i = 0; i < ARRAY_COUNT(str); i++) + str[i] = CHAR_SPACE; + for (nameLength = 0; name[nameLength] != CHAR_SPACE && nameLength < ARRAY_COUNT(str); nameLength++) ; - for (i = 0; i < count; i++) - str2[11 - count + i] = str[i]; - str2[11] = EOS; - sub_80C0A88(windowId, str2, left, top); + for (i = 0; i < nameLength; i++) + str[ARRAY_COUNT(str) - nameLength + i] = name[i]; + str[ARRAY_COUNT(str)] = EOS; + PrintInfoSubMenuText(windowId, str, left, top); } -void sub_80C0C6C(u8 windowId, u16 b, u8 left, u8 top) // unused +static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top) { u8 str[6]; bool8 outputted = FALSE; @@ -4594,7 +4907,7 @@ void sub_80C0C6C(u8 windowId, u16 b, u8 left, u8 top) // unused str[3] = CHAR_PERIOD; str[4] = CHAR_0 + ((b % 1000) % 100) % 10; str[5] = EOS; - sub_80C0A88(windowId, str, left, top); + PrintInfoSubMenuText(windowId, str, left, top); } static void PrintFootprint(u8 windowId, u16 dexNum) @@ -4620,6 +4933,7 @@ static void PrintFootprint(u8 windowId, u16 dexNum) CopyToWindowPixelBuffer(windowId, image, sizeof(image), 0); } +// Unused void sub_80C0DC0(u16 a, u16 b) { *(u16 *)(VRAM + a * 0x800 + 0x232) = 0xF000 + b + 0; @@ -4628,39 +4942,41 @@ void sub_80C0DC0(u16 a, u16 b) *(u16 *)(VRAM + a * 0x800 + 0x274) = 0xF000 + b + 3; } -u16 sub_80C0E0C(u8 a, u16 b, u16 c, u16 d) +static u16 GetNextPosition(u8 direction, u16 position, u16 min, u16 max) { - switch (a) + switch (direction) { - case 1: - if (b > c) - b--; - break; - case 0: - if (b < d) - b++; - break; - case 3: - if (b > c) - b--; - else - b = d; - break; - case 2: - if (b < d) - b++; - else - b = c; - break; + case 1: // Up/Left + if (position > min) + position--; + break; + case 0: // Down/Right + if (position < max) + position++; + break; + case 3: // Up/Left with loop (unused) + if (position > min) + position--; + else + position = max; + break; + case 2: // Down/Right with loop (unused) + if (position < max) + position++; + else + position = min; + break; } - return b; + return position; } -u32 sub_80C0E68(u16 a) +// Unown and Spinda use the personality of the first seen individual of that species +// All others use personality 0 +static u32 GetPokedexMonPersonality(u16 species) { - if (a == SPECIES_UNOWN || a == SPECIES_SPINDA) + if (species == SPECIES_UNOWN || species == SPECIES_SPINDA) { - if (a == SPECIES_UNOWN) + if (species == SPECIES_UNOWN) return gSaveBlock2Ptr->pokedex.unownPersonality; else return gSaveBlock2Ptr->pokedex.spindaPersonality; @@ -4674,22 +4990,22 @@ u32 sub_80C0E68(u16 a) u16 CreateMonSpriteFromNationalDexNumber(u16 nationalNum, s16 x, s16 y, u16 paletteSlot) { nationalNum = NationalPokedexNumToSpecies(nationalNum); - return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, sub_80C0E68(nationalNum), TRUE, x, y, paletteSlot, 0xFFFF); + return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, GetPokedexMonPersonality(nationalNum), TRUE, x, y, paletteSlot, 0xFFFF); } -u16 sub_80C0EF8(u16 species, s16 x, s16 y, s8 paletteSlot) +static u16 CreateSizeScreenTrainerPic(u16 species, s16 x, s16 y, s8 paletteSlot) { return CreateTrainerPicSprite(species, TRUE, x, y, paletteSlot, 0xFFFF); } -int sub_80C0F30(u8 dexMode, u8 sortMode, u8 abcGroup, u8 bodyColor, u8 type1, u8 type2) +static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 type1, u8 type2) { u16 species; u16 i; u16 resultsCount; u8 types[2]; - CreatePokedexList(dexMode, sortMode); + CreatePokedexList(dexMode, order); for (i = 0, resultsCount = 0; i < NATIONAL_DEX_COUNT; i++) { @@ -4706,12 +5022,11 @@ int sub_80C0F30(u8 dexMode, u8 sortMode, u8 abcGroup, u8 bodyColor, u8 type1, u8 { for (i = 0, resultsCount = 0; i < sPokedexView->pokemonListCount; i++) { - u8 r3; + u8 firstLetter; species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum); - r3 = gSpeciesNames[species][0]; - if ((r3 >= gUnknown_0856ED08[abcGroup][0] && r3 < gUnknown_0856ED08[abcGroup][0] + gUnknown_0856ED08[abcGroup][1]) - || (r3 >= gUnknown_0856ED08[abcGroup][2] && r3 < gUnknown_0856ED08[abcGroup][2] + gUnknown_0856ED08[abcGroup][3])) + firstLetter = gSpeciesNames[species][0]; + if (LETTER_IN_RANGE_UPPER(firstLetter, abcGroup) || LETTER_IN_RANGE_LOWER(firstLetter, abcGroup)) { sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i]; resultsCount++; @@ -4797,98 +5112,116 @@ int sub_80C0F30(u8 dexMode, u8 sortMode, u8 abcGroup, u8 bodyColor, u8 type1, u8 return resultsCount; } -u8 LoadSearchMenu(void) +static u8 LoadSearchMenu(void) { return CreateTask(Task_LoadSearchMenu, 0); } -void sub_80C1270(const u8 *str, u32 left, u32 top) +static void PrintSearchText(const u8 *str, u32 x, u32 y) { u8 color[3]; - color[0] = 0; - color[1] = 15; - color[2] = 2; - AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str); + color[0] = TEXT_COLOR_TRANSPARENT; + color[1] = TEXT_DYNAMIC_COLOR_6; + color[2] = TEXT_COLOR_DARK_GREY; + AddTextPrinterParameterized4(0, 1, x, y, 0, 0, color, -1, str); } -void sub_80C12B0(u32 x, u32 y, u32 width, u32 height) +static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height) { FillWindowPixelRect(0, PIXEL_FILL(0), x, y, width, height); } -void Task_LoadSearchMenu(u8 taskId) +// Search task data +#define tTopBarItem data[0] +#define tMenuItem data[1] +#define tCursorPos_Mode data[2] +#define tScrollOffset_Mode data[3] +#define tCursorPos_Order data[4] +#define tScrollOffset_Order data[5] +#define tCursorPos_Name data[6] +#define tScrollOffset_Name data[7] +#define tCursorPos_Color data[8] +#define tScrollOffset_Color data[9] +#define tCursorPos_TypeLeft data[10] +#define tScrollOffset_TypeLeft data[11] +#define tCursorPos_TypeRight data[12] +#define tScrollOffset_TypeRight data[13] +#define tCursorPos data[14] +#define tScrollOffset data[15] + +static void Task_LoadSearchMenu(u8 taskId) { u16 i; switch (gMain.state) { - default: - case 0: - if (!gPaletteFade.active) - { - sPokedexView->unk64A = 2; - ResetOtherVideoRegisters(0); - ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sSearchMenu_BgTemplate, 4); - SetBgTilemapBuffer(3, AllocZeroed(0x800)); - SetBgTilemapBuffer(2, AllocZeroed(0x800)); - SetBgTilemapBuffer(1, AllocZeroed(0x800)); - SetBgTilemapBuffer(0, AllocZeroed(0x800)); - InitWindows(sSearchMenu_WindowTemplate); - DeactivateAllTextPrinters(); - PutWindowTilemap(0); - DecompressAndLoadBgGfxUsingHeap(3, gPokedexSearchMenu_Gfx, 0x2000, 0, 0); + default: + case 0: + if (!gPaletteFade.active) + { + sPokedexView->currentPage = PAGE_SEARCH; + ResetOtherVideoRegisters(0); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, sSearchMenu_BgTemplate, ARRAY_COUNT(sSearchMenu_BgTemplate)); + SetBgTilemapBuffer(3, AllocZeroed(0x800)); + SetBgTilemapBuffer(2, AllocZeroed(0x800)); + SetBgTilemapBuffer(1, AllocZeroed(0x800)); + SetBgTilemapBuffer(0, AllocZeroed(0x800)); + InitWindows(sSearchMenu_WindowTemplate); + DeactivateAllTextPrinters(); + PutWindowTilemap(0); + DecompressAndLoadBgGfxUsingHeap(3, gPokedexSearchMenu_Gfx, 0x2000, 0, 0); - if (!IsNationalPokedexEnabled()) - CopyToBgTilemapBuffer(3, gPokedexSearch2_Tilemap, 0, 0); - else - CopyToBgTilemapBuffer(3, gPokedexSearch1_Tilemap, 0, 0); - LoadPalette(gPokedexSearchMenu_Pal + 1, 1, 0x7E); - gMain.state = 1; - } - break; - case 1: - LoadCompressedSpriteSheet(sInterfaceSpriteSheet); - LoadSpritePalettes(sInterfaceSpritePalette); - sub_80C2594(taskId); - for (i = 0; i < 16; i++) - gTasks[taskId].data[i] = 0; - sub_80C23B8(taskId); - sub_80C2040(0); - sub_80C20F8(taskId); - CopyWindowToVram(0, 3); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - gMain.state++; - break; - case 2: - BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); - gMain.state++; - break; - case 3: - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); - HideBg(0); - ShowBg(1); - ShowBg(2); - ShowBg(3); - gMain.state++; - break; - case 4: - if (!gPaletteFade.active) - { - gTasks[taskId].func = sub_80C1570; - gMain.state = 0; - } - break; + if (!IsNationalPokedexEnabled()) + CopyToBgTilemapBuffer(3, gPokedexSearchMenuHoenn_Tilemap, 0, 0); + else + CopyToBgTilemapBuffer(3, gPokedexSearchMenuNational_Tilemap, 0, 0); + LoadPalette(gPokedexSearchMenu_Pal + 1, 1, 0x7E); + gMain.state = 1; + } + break; + case 1: + LoadCompressedSpriteSheet(sInterfaceSpriteSheet); + LoadSpritePalettes(sInterfaceSpritePalette); + CreateSearchParameterScrollArrows(taskId); + for (i = 0; i < NUM_TASK_DATA; i++) + gTasks[taskId].data[i] = 0; + SetDefaultSearchModeAndOrder(taskId); + HighlightSelectedSearchTopBarItem(SEARCH_TOPBAR_SEARCH); + PrintSelectedSearchParameters(taskId); + CopyWindowToVram(0, 3); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + gMain.state++; + break; + case 2: + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); + gMain.state++; + break; + case 3: + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); + HideBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 4: + if (!gPaletteFade.active) + { + gTasks[taskId].func = Task_SwitchToSearchMenuTopBar; + gMain.state = 0; + } + break; } } -void sub_80C152C(void) +static void FreeSearchWindowAndBgBuffers(void) { void* tilemapBuffer; @@ -4907,120 +5240,121 @@ void sub_80C152C(void) Free(tilemapBuffer); } -void sub_80C1570(u8 taskId) +static void Task_SwitchToSearchMenuTopBar(u8 taskId) { - sub_80C2040(gTasks[taskId].data[0]); - sub_80C20F8(taskId); + HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); + PrintSelectedSearchParameters(taskId); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); - gTasks[taskId].func = sub_80C15B0; + gTasks[taskId].func = Task_HandleSearchTopBarInput; } -void sub_80C15B0(u8 taskId) +static void Task_HandleSearchTopBarInput(u8 taskId) { if (gMain.newKeys & B_BUTTON) { PlaySE(SE_PC_OFF); - gTasks[taskId].func = sub_80C1D38; + gTasks[taskId].func = Task_ExitSearch; return; } if (gMain.newKeys & A_BUTTON) { - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tTopBarItem) { - case 0: - PlaySE(SE_PIN); - gTasks[taskId].data[1] = 0; - gTasks[taskId].func = sub_80C16CC; - break; - case 1: - PlaySE(SE_PIN); - gTasks[taskId].data[1] = 4; - gTasks[taskId].func = sub_80C16CC; - break; - case 2: - PlaySE(SE_PC_OFF); - gTasks[taskId].func = sub_80C1D38; - break; + case SEARCH_TOPBAR_SEARCH: + PlaySE(SE_PIN); + gTasks[taskId].tMenuItem = SEARCH_NAME; + gTasks[taskId].func = Task_SwitchToSearchMenu; + break; + case SEARCH_TOPBAR_SHIFT: + PlaySE(SE_PIN); + gTasks[taskId].tMenuItem = SEARCH_ORDER; + gTasks[taskId].func = Task_SwitchToSearchMenu; + break; + case SEARCH_TOPBAR_CANCEL: + PlaySE(SE_PC_OFF); + gTasks[taskId].func = Task_ExitSearch; + break; } return; } - if ((gMain.newKeys & DPAD_LEFT) && gTasks[taskId].data[0] > 0) + if ((gMain.newKeys & DPAD_LEFT) && gTasks[taskId].tTopBarItem > SEARCH_TOPBAR_SEARCH) { PlaySE(SE_Z_PAGE); - gTasks[taskId].data[0]--; - sub_80C2040(gTasks[taskId].data[0]); + gTasks[taskId].tTopBarItem--; + HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((gMain.newKeys & DPAD_RIGHT) && gTasks[taskId].data[0] < 2) + if ((gMain.newKeys & DPAD_RIGHT) && gTasks[taskId].tTopBarItem < SEARCH_TOPBAR_CANCEL) { PlaySE(SE_Z_PAGE); - gTasks[taskId].data[0]++; - sub_80C2040(gTasks[taskId].data[0]); + gTasks[taskId].tTopBarItem++; + HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } } -void sub_80C16CC(u8 taskId) +static void Task_SwitchToSearchMenu(u8 taskId) { - sub_80C2064(gTasks[taskId].data[0], gTasks[taskId].data[1]); - sub_80C20F8(taskId); + HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); + PrintSelectedSearchParameters(taskId); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); - gTasks[taskId].func = sub_80C170C; + gTasks[taskId].func = Task_HandleSearchMenuInput; } -void sub_80C170C(u8 taskId) +// Input for main search menu +static void Task_HandleSearchMenuInput(u8 taskId) { - const u8 (*r6)[4]; + const u8 (*movementMap)[4]; - if (gTasks[taskId].data[0] != 0) + if (gTasks[taskId].tTopBarItem != SEARCH_TOPBAR_SEARCH) { if (!IsNationalPokedexEnabled()) - r6 = gUnknown_0856EDF0; + movementMap = sSearchMovementMap_ShiftHoennDex; else - r6 = gUnknown_0856EDB8; + movementMap = sSearchMovementMap_ShiftNatDex; } else { if (!IsNationalPokedexEnabled()) - r6 = gUnknown_0856EDD4; + movementMap = sSearchMovementMap_SearchHoennDex; else - r6 = gUnknown_0856ED9C; + movementMap = sSearchMovementMap_SearchNatDex; } if (gMain.newKeys & B_BUTTON) { PlaySE(SE_BOWA); - sub_80C23B8(taskId); - gTasks[taskId].func = sub_80C1570; + SetDefaultSearchModeAndOrder(taskId); + gTasks[taskId].func = Task_SwitchToSearchMenuTopBar; return; } if (gMain.newKeys & A_BUTTON) { - if (gTasks[taskId].data[1] == 6) + if (gTasks[taskId].tMenuItem == SEARCH_OK) { - if (gTasks[taskId].data[0] != 0) + if (gTasks[taskId].tTopBarItem != SEARCH_TOPBAR_SEARCH) { - gUnknown_02039B52 = 0x40; - sPokedexView->unk62A = 0x40; - gUnknown_02039B50 = 0; - sPokedexView->unk610 = 0; - gSaveBlock2Ptr->pokedex.mode = GetSearchModeSelection(taskId, SEARCH_DEX_MODE); + sPokeBallRotation = POKEBALL_ROTATION_TOP; + sPokedexView->pokeBallRotationBackup = POKEBALL_ROTATION_TOP; + sLastSelectedPokemon = 0; + sPokedexView->selectedPokemonBackup = 0; + gSaveBlock2Ptr->pokedex.mode = GetSearchModeSelection(taskId, SEARCH_MODE); if (!IsNationalPokedexEnabled()) gSaveBlock2Ptr->pokedex.mode = DEX_MODE_HOENN; - sPokedexView->unk614 = gSaveBlock2Ptr->pokedex.mode; + sPokedexView->dexModeBackup = gSaveBlock2Ptr->pokedex.mode; gSaveBlock2Ptr->pokedex.order = GetSearchModeSelection(taskId, SEARCH_ORDER); - sPokedexView->unk618 = gSaveBlock2Ptr->pokedex.order; + sPokedexView->dexOrderBackup = gSaveBlock2Ptr->pokedex.order; PlaySE(SE_PC_OFF); - gTasks[taskId].func = sub_80C1D38; + gTasks[taskId].func = Task_ExitSearch; } else { - sub_80C2618(gText_SearchingPleaseWait); - gTasks[taskId].func = sub_80C19A4; + EraseAndPrintSearchTextBox(gText_SearchingPleaseWait); + gTasks[taskId].func = Task_StartPokedexSearch; PlaySE(SE_Z_SEARCH); CopyWindowToVram(0, 2); } @@ -5028,136 +5362,138 @@ void sub_80C170C(u8 taskId) else { PlaySE(SE_PIN); - gTasks[taskId].func = sub_80C1B64; + gTasks[taskId].func = Task_SelectSearchMenuItem; } return; } - if ((gMain.newKeys & DPAD_LEFT) && r6[gTasks[taskId].data[1]][0] != 0xFF) + if ((gMain.newKeys & DPAD_LEFT) && movementMap[gTasks[taskId].tMenuItem][0] != 0xFF) { PlaySE(SE_SELECT); - gTasks[taskId].data[1] = r6[gTasks[taskId].data[1]][0]; - sub_80C2064(gTasks[taskId].data[0], gTasks[taskId].data[1]); + gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][0]; + HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((gMain.newKeys & DPAD_RIGHT) && r6[gTasks[taskId].data[1]][1] != 0xFF) + if ((gMain.newKeys & DPAD_RIGHT) && movementMap[gTasks[taskId].tMenuItem][1] != 0xFF) { PlaySE(SE_SELECT); - gTasks[taskId].data[1] = r6[gTasks[taskId].data[1]][1]; - sub_80C2064(gTasks[taskId].data[0], gTasks[taskId].data[1]); + gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][1]; + HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((gMain.newKeys & DPAD_UP) && r6[gTasks[taskId].data[1]][2] != 0xFF) + if ((gMain.newKeys & DPAD_UP) && movementMap[gTasks[taskId].tMenuItem][2] != 0xFF) { PlaySE(SE_SELECT); - gTasks[taskId].data[1] = r6[gTasks[taskId].data[1]][2]; - sub_80C2064(gTasks[taskId].data[0], gTasks[taskId].data[1]); + gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][2]; + HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((gMain.newKeys & DPAD_DOWN) && r6[gTasks[taskId].data[1]][3] != 0xFF) + if ((gMain.newKeys & DPAD_DOWN) && movementMap[gTasks[taskId].tMenuItem][3] != 0xFF) { PlaySE(SE_SELECT); - gTasks[taskId].data[1] = r6[gTasks[taskId].data[1]][3]; - sub_80C2064(gTasks[taskId].data[0], gTasks[taskId].data[1]); + gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][3]; + HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } } -void sub_80C19A4(u8 taskId) +static void Task_StartPokedexSearch(u8 taskId) { - u8 dexMode = GetSearchModeSelection(taskId, SEARCH_DEX_MODE); - u8 sortMode = GetSearchModeSelection(taskId, SEARCH_ORDER); + u8 dexMode = GetSearchModeSelection(taskId, SEARCH_MODE); + u8 order = GetSearchModeSelection(taskId, SEARCH_ORDER); u8 abcGroup = GetSearchModeSelection(taskId, SEARCH_NAME); u8 bodyColor = GetSearchModeSelection(taskId, SEARCH_COLOR); - u8 type1 = GetSearchModeSelection(taskId, SEARCH_TYPE_1); - u8 type2 = GetSearchModeSelection(taskId, SEARCH_TYPE_2); + u8 type1 = GetSearchModeSelection(taskId, SEARCH_TYPE_LEFT); + u8 type2 = GetSearchModeSelection(taskId, SEARCH_TYPE_RIGHT); - sub_80C0F30(dexMode, sortMode, abcGroup, bodyColor, type1, type2); - gTasks[taskId].func = sub_80C1A4C; + DoPokedexSearch(dexMode, order, abcGroup, bodyColor, type1, type2); + gTasks[taskId].func = Task_WaitAndCompleteSearch; } -void sub_80C1A4C(u8 taskId) +static void Task_WaitAndCompleteSearch(u8 taskId) { if (!IsSEPlaying()) { if (sPokedexView->pokemonListCount != 0) { PlaySE(SE_SEIKAI); - sub_80C2618(gText_SearchCompleted); + EraseAndPrintSearchTextBox(gText_SearchCompleted); } else { PlaySE(SE_HAZURE); - sub_80C2618(gText_NoMatchingPkmnWereFound); + EraseAndPrintSearchTextBox(gText_NoMatchingPkmnWereFound); } - gTasks[taskId].func = sub_80C1AB8; + gTasks[taskId].func = Task_SearchCompleteWaitForInput; CopyWindowToVram(0, 2); } } -void sub_80C1AB8(u8 taskId) +static void Task_SearchCompleteWaitForInput(u8 taskId) { if (gMain.newKeys & A_BUTTON) { if (sPokedexView->pokemonListCount != 0) { - sPokedexView->unk64E = 1; - sPokedexView->dexMode = GetSearchModeSelection(taskId, SEARCH_DEX_MODE); + // Return to dex list and show search results + sPokedexView->screenSwitchState = 1; + sPokedexView->dexMode = GetSearchModeSelection(taskId, SEARCH_MODE); sPokedexView->dexOrder = GetSearchModeSelection(taskId, SEARCH_ORDER); - gTasks[taskId].func = sub_80C1D38; + gTasks[taskId].func = Task_ExitSearch; PlaySE(SE_PC_OFF); } else { - gTasks[taskId].func = sub_80C16CC; + gTasks[taskId].func = Task_SwitchToSearchMenu; PlaySE(SE_BOWA); } } } -void sub_80C1B64(u8 taskId) +static void Task_SelectSearchMenuItem(u8 taskId) { - u8 r0; - u16 *p1; - u16 *p2; + u8 menuItem; + u16 *cursorPos; + u16 *scrollOffset; - sub_80C21D4(0); - r0 = gTasks[taskId].data[1]; - p1 = &gTasks[taskId].data[sSearchOptions[r0].unk4]; - p2 = &gTasks[taskId].data[sSearchOptions[r0].unk5]; - gTasks[taskId].data[14] = *p1; - gTasks[taskId].data[15] = *p2; - sub_80C2294(taskId); - sub_80C2650(*p1); - gTasks[taskId].func = sub_80C1BCC; + DrawOrEraseSearchParameterBox(FALSE); + menuItem = gTasks[taskId].tMenuItem; + cursorPos = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataCursorPos]; + scrollOffset = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataScrollOffset]; + gTasks[taskId].tCursorPos = *cursorPos; + gTasks[taskId].tScrollOffset = *scrollOffset; + PrintSearchParameterText(taskId); + PrintSelectorArrow(*cursorPos); + gTasks[taskId].func = Task_HandleSearchParameterInput; CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } -void sub_80C1BCC(u8 taskId) +// Input for scrolling parameter box in right column +static void Task_HandleSearchParameterInput(u8 taskId) { - u8 r1; - const struct PokedexOption *r8; - u16 *p1; - u16 *p2; - u16 r2; - bool8 r3; + u8 menuItem; + const struct SearchOptionText *texts; + u16 *cursorPos; + u16 *scrollOffset; + u16 maxOption; + bool8 moved; - r1 = gTasks[taskId].data[1]; - r8 = sSearchOptions[r1].pokedexList; - p1 = &gTasks[taskId].data[sSearchOptions[r1].unk4]; - p2 = &gTasks[taskId].data[sSearchOptions[r1].unk5]; - r2 = sSearchOptions[r1].numOptions - 1; + menuItem = gTasks[taskId].tMenuItem; + texts = sSearchOptions[menuItem].texts; + cursorPos = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataCursorPos]; + scrollOffset = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataScrollOffset]; + maxOption = sSearchOptions[menuItem].numOptions - 1; if (gMain.newKeys & A_BUTTON) { PlaySE(SE_PIN); - sub_80C267C(); - sub_80C21D4(1); - gTasks[taskId].func = sub_80C16CC; + ClearSearchParameterBoxText(); + DrawOrEraseSearchParameterBox(TRUE); + gTasks[taskId].func = Task_SwitchToSearchMenu; CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); return; @@ -5165,77 +5501,81 @@ void sub_80C1BCC(u8 taskId) if (gMain.newKeys & B_BUTTON) { PlaySE(SE_BOWA); - sub_80C267C(); - sub_80C21D4(1); - *p1 = gTasks[taskId].data[14]; - *p2 = gTasks[taskId].data[15]; - gTasks[taskId].func = sub_80C16CC; + ClearSearchParameterBoxText(); + DrawOrEraseSearchParameterBox(TRUE); + *cursorPos = gTasks[taskId].tCursorPos; + *scrollOffset = gTasks[taskId].tScrollOffset; + gTasks[taskId].func = Task_SwitchToSearchMenu; CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); return; } - r3 = FALSE; + moved = FALSE; if (gMain.newAndRepeatedKeys & DPAD_UP) { - if (*p1 != 0) + if (*cursorPos != 0) { - sub_80C2638(*p1); - (*p1)--; - sub_80C2650(*p1); - r3 = TRUE; + // Move cursor up + EraseSelectorArrow(*cursorPos); + (*cursorPos)--; + PrintSelectorArrow(*cursorPos); + moved = TRUE; } - else if (*p2 != 0) + else if (*scrollOffset != 0) { - (*p2)--; - sub_80C2294(taskId); - sub_80C2650(*p1); - r3 = TRUE; + // Scroll up + (*scrollOffset)--; + PrintSearchParameterText(taskId); + PrintSelectorArrow(*cursorPos); + moved = TRUE; } - if (r3) + if (moved) { PlaySE(SE_SELECT); - sub_80C2618(r8[*p1 + *p2].description); + EraseAndPrintSearchTextBox(texts[*cursorPos + *scrollOffset].description); CopyWindowToVram(0, 2); } return; } if (gMain.newAndRepeatedKeys & DPAD_DOWN) { - if (*p1 < 5 && *p1 < r2) + if (*cursorPos < MAX_SEARCH_PARAM_CURSOR_POS && *cursorPos < maxOption) { - sub_80C2638(*p1); - (*p1)++; - sub_80C2650(*p1); - r3 = TRUE; + // Move cursor down + EraseSelectorArrow(*cursorPos); + (*cursorPos)++; + PrintSelectorArrow(*cursorPos); + moved = TRUE; } - else if (r2 > 5 && *p2 < r2 - 5) + else if (maxOption > MAX_SEARCH_PARAM_CURSOR_POS && *scrollOffset < maxOption - MAX_SEARCH_PARAM_CURSOR_POS) { - (*p2)++; - sub_80C2294(taskId); - sub_80C2650(5); - r3 = TRUE; + // Scroll down + (*scrollOffset)++; + PrintSearchParameterText(taskId); + PrintSelectorArrow(5); + moved = TRUE; } - if (r3) + if (moved) { PlaySE(SE_SELECT); - sub_80C2618(r8[*p1 + *p2].description); + EraseAndPrintSearchTextBox(texts[*cursorPos + *scrollOffset].description); CopyWindowToVram(0, 2); } return; } } -void sub_80C1D38(u8 taskId) +static void Task_ExitSearch(u8 taskId) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK); - gTasks[taskId].func = sub_80C1D70; + gTasks[taskId].func = Task_ExitSearchWaitForFade; } -void sub_80C1D70(u8 taskId) +static void Task_ExitSearchWaitForFade(u8 taskId) { if (!gPaletteFade.active) { - sub_80C152C(); + FreeSearchWindowAndBgBuffers(); DestroyTask(taskId); } } @@ -5243,27 +5583,27 @@ void sub_80C1D70(u8 taskId) #ifdef NONMATCHING // This doesn't match because gcc flips the naming of the r7 and r6 // registers. It also does one of the additions backwards. -void sub_80C1D98(u8 a, u8 b, u8 c, u8 d) +void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width) { u16 i; u16* ptr = GetBgTilemapBuffer(3); u16* temp; - for (i = 0; i < d; i++) + for (i = 0; i < width; i++) { // This addition is supposed to be done in this order; however, - // gcc will always do it in ptr + (c << 5) order. - temp = (c << 5) + ptr; - temp[b + i] %= 0x1000; - temp[b + i] |= a * 4096; + // gcc will always do it in ptr + (y * 32) order. + temp = (y * 32) + ptr; + temp[x + i] %= 0x1000; + temp[x + i] |= flags * 0x1000; - temp[b + i + 32] %= 0x1000; - temp[b + i + 32] |= a * 4096; + temp[x + i + 32] %= 0x1000; + temp[x + i + 32] |= flags * 0x1000; } } #else __attribute__((naked)) -void sub_80C1D98(u8 a, u8 b, u8 c, u8 d) +void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -5319,158 +5659,171 @@ _080C1DEC:\n\ } #endif -void sub_80C1DFC(u8 a, u8 b, u8 c) -{ - u8 r5 = (b & 1) | ((c & 1) << 1); +#define SEARCH_BG_SEARCH SEARCH_TOPBAR_SEARCH +#define SEARCH_BG_SHIFT SEARCH_TOPBAR_SHIFT +#define SEARCH_BG_CANCEL SEARCH_TOPBAR_CANCEL +#define SEARCH_BG_NAME (SEARCH_NAME + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_COLOR (SEARCH_COLOR + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_TYPE_SELECTION_LEFT (SEARCH_TYPE_LEFT + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_TYPE_SELECTION_RIGHT (SEARCH_TYPE_RIGHT + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_ORDER (SEARCH_ORDER + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_MODE (SEARCH_MODE + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_OK (SEARCH_OK + SEARCH_TOPBAR_COUNT) +#define SEARCH_BG_TYPE_TITLE (SEARCH_COUNT + SEARCH_TOPBAR_COUNT) - switch (a) +static void DrawSearchMenuItemBgHighlight(u8 searchBg, bool8 unselected, bool8 disabled) +{ + u8 highlightFlags = (unselected & 1) | ((disabled & 1) << 1); + + switch (searchBg) { - case 0: - case 1: - case 2: - sub_80C1D98(r5, gUnknown_0856ED30[a].unk4, gUnknown_0856ED30[a].unk5, gUnknown_0856ED30[a].unk6); - break; - case 3: - case 4: - case 7: - case 8: - sub_80C1D98(r5, gUnknown_0856ED48[a - 3].unk4, gUnknown_0856ED48[a - 3].unk5, gUnknown_0856ED48[a - 3].unk6); - // fall through - case 5: - case 6: - sub_80C1D98(r5, gUnknown_0856ED48[a - 3].unk7, gUnknown_0856ED48[a - 3].unk8, gUnknown_0856ED48[a - 3].unk9); - break; - case 10: - sub_80C1D98(r5, gUnknown_0856ED48[2].unk4, gUnknown_0856ED48[2].unk5, gUnknown_0856ED48[2].unk6); - break; - case 9: - if (!IsNationalPokedexEnabled()) - sub_80C1D98(r5, gUnknown_0856ED48[a - 3].unk4, gUnknown_0856ED48[a - 3].unk5 - 2, gUnknown_0856ED48[a - 3].unk6); - else - sub_80C1D98(r5, gUnknown_0856ED48[a - 3].unk4, gUnknown_0856ED48[a - 3].unk5, gUnknown_0856ED48[a - 3].unk6); - break; + case SEARCH_BG_SEARCH: + case SEARCH_BG_SHIFT: + case SEARCH_BG_CANCEL: + SetSearchRectHighlight(highlightFlags, sSearchMenuTopBarItems[searchBg].highlightX, sSearchMenuTopBarItems[searchBg].highlightY, sSearchMenuTopBarItems[searchBg].highlightWidth); + break; + case SEARCH_BG_NAME: + case SEARCH_BG_COLOR: + case SEARCH_BG_ORDER: + case SEARCH_BG_MODE: + SetSearchRectHighlight(highlightFlags, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgX, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgY, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgWidth); + // fall through, draw selectionBg for above + case SEARCH_BG_TYPE_SELECTION_LEFT: + case SEARCH_BG_TYPE_SELECTION_RIGHT: + SetSearchRectHighlight(highlightFlags, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].selectionBgX, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].selectionBgY, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].selectionBgWidth); + break; + case SEARCH_BG_TYPE_TITLE: + SetSearchRectHighlight(highlightFlags, sSearchMenuItems[SEARCH_TYPE_LEFT].titleBgX, sSearchMenuItems[SEARCH_TYPE_LEFT].titleBgY, sSearchMenuItems[SEARCH_TYPE_LEFT].titleBgWidth); + break; + case SEARCH_BG_OK: + if (!IsNationalPokedexEnabled()) + SetSearchRectHighlight(highlightFlags, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgX, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgY - 2, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgWidth); + else + SetSearchRectHighlight(highlightFlags, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgX, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgY, sSearchMenuItems[searchBg - SEARCH_TOPBAR_COUNT].titleBgWidth); + break; } } -void sub_80C1EF4(u8 a) +static void SetInitialSearchMenuBgHighlights(u8 topBarItem) { - switch (a) + switch (topBarItem) { - case 0: - sub_80C1DFC(0, 0, 0); - sub_80C1DFC(1, 1, 0); - sub_80C1DFC(2, 1, 0); - sub_80C1DFC(3, 1, 0); - sub_80C1DFC(4, 1, 0); - sub_80C1DFC(10, 1, 0); - sub_80C1DFC(5, 1, 0); - sub_80C1DFC(6, 1, 0); - sub_80C1DFC(7, 1, 0); - sub_80C1DFC(8, 1, 0); - sub_80C1DFC(9, 1, 0); - break; - case 1: - sub_80C1DFC(0, 1, 0); - sub_80C1DFC(1, 0, 0); - sub_80C1DFC(2, 1, 0); - sub_80C1DFC(3, 1, 1); - sub_80C1DFC(4, 1, 1); - sub_80C1DFC(10, 1, 1); - sub_80C1DFC(5, 1, 1); - sub_80C1DFC(6, 1, 1); - sub_80C1DFC(7, 1, 0); - sub_80C1DFC(8, 1, 0); - sub_80C1DFC(9, 1, 0); - break; - case 2: - sub_80C1DFC(0, 1, 0); - sub_80C1DFC(1, 1, 0); - sub_80C1DFC(2, 0, 0); - sub_80C1DFC(3, 1, 1); - sub_80C1DFC(4, 1, 1); - sub_80C1DFC(10, 1, 1); - sub_80C1DFC(5, 1, 1); - sub_80C1DFC(6, 1, 1); - sub_80C1DFC(7, 1, 1); - sub_80C1DFC(8, 1, 1); - sub_80C1DFC(9, 1, 1); - break; + case SEARCH_TOPBAR_SEARCH: + DrawSearchMenuItemBgHighlight(SEARCH_BG_SEARCH, FALSE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_SHIFT, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_CANCEL, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_NAME, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_COLOR, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_TITLE, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_LEFT, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_RIGHT, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_ORDER, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_MODE, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_OK, TRUE, FALSE); + break; + case SEARCH_TOPBAR_SHIFT: + DrawSearchMenuItemBgHighlight(SEARCH_BG_SEARCH, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_SHIFT, FALSE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_CANCEL, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_NAME, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_COLOR, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_TITLE, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_LEFT, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_RIGHT, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_ORDER, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_MODE, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_OK, TRUE, FALSE); + break; + case SEARCH_TOPBAR_CANCEL: + DrawSearchMenuItemBgHighlight(SEARCH_BG_SEARCH, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_SHIFT, TRUE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_CANCEL, FALSE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_NAME, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_COLOR, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_TITLE, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_LEFT, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_RIGHT, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_ORDER, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_MODE, TRUE, TRUE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_OK, TRUE, TRUE); + break; } } -void sub_80C2040(u8 a) +static void HighlightSelectedSearchTopBarItem(u8 topBarItem) { - sub_80C1EF4(a); - sub_80C2618(gUnknown_0856ED30[a].text); + SetInitialSearchMenuBgHighlights(topBarItem); + EraseAndPrintSearchTextBox(sSearchMenuTopBarItems[topBarItem].description); } -void sub_80C2064(u8 a, u8 b) +static void HighlightSelectedSearchMenuItem(u8 topBarItem, u8 menuItem) { - sub_80C1EF4(a); - switch (b) + SetInitialSearchMenuBgHighlights(topBarItem); + switch (menuItem) { - case 0: - sub_80C1DFC(3, 0, 0); - break; - case 1: - sub_80C1DFC(4, 0, 0); - break; - case 2: - sub_80C1DFC(10, 0, 0); - sub_80C1DFC(5, 0, 0); - break; - case 3: - sub_80C1DFC(10, 0, 0); - sub_80C1DFC(6, 0, 0); - break; - case 4: - sub_80C1DFC(7, 0, 0); - break; - case 5: - sub_80C1DFC(8, 0, 0); - break; - case 6: - sub_80C1DFC(9, 0, 0); - break; + case SEARCH_NAME: + DrawSearchMenuItemBgHighlight(SEARCH_BG_NAME, FALSE, FALSE); + break; + case SEARCH_COLOR: + DrawSearchMenuItemBgHighlight(SEARCH_BG_COLOR, FALSE, FALSE); + break; + case SEARCH_TYPE_LEFT: + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_TITLE, FALSE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_LEFT, FALSE, FALSE); + break; + case SEARCH_TYPE_RIGHT: + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_TITLE, FALSE, FALSE); + DrawSearchMenuItemBgHighlight(SEARCH_BG_TYPE_SELECTION_RIGHT, FALSE, FALSE); + break; + case SEARCH_ORDER: + DrawSearchMenuItemBgHighlight(SEARCH_BG_ORDER, FALSE, FALSE); + break; + case SEARCH_MODE: + DrawSearchMenuItemBgHighlight(SEARCH_BG_MODE, FALSE, FALSE); + break; + case SEARCH_OK: + DrawSearchMenuItemBgHighlight(SEARCH_BG_OK, FALSE, FALSE); + break; } - sub_80C2618(gUnknown_0856ED48[b].text); + EraseAndPrintSearchTextBox(sSearchMenuItems[menuItem].description); } -void sub_80C20F8(u8 taskId) +// Prints the currently selected search parameters in the search menu selection boxes +static void PrintSelectedSearchParameters(u8 taskId) { - u16 var; + u16 searchParamId; - sub_80C12B0(0x28, 0x10, 0x60, 0x50); + ClearSearchMenuRect(40, 16, 96, 80); - var = gTasks[taskId].data[6] + gTasks[taskId].data[7]; - sub_80C1270(gDexSearchAlphaOptions[var].title, 0x2D, 0x11); + searchParamId = gTasks[taskId].tCursorPos_Name + gTasks[taskId].tScrollOffset_Name; + PrintSearchText(sDexSearchNameOptions[searchParamId].title, 0x2D, 0x11); - var = gTasks[taskId].data[8] + gTasks[taskId].data[9]; - sub_80C1270(gDexSearchColorOptions[var].title, 0x2D, 0x21); + searchParamId = gTasks[taskId].tCursorPos_Color + gTasks[taskId].tScrollOffset_Color; + PrintSearchText(sDexSearchColorOptions[searchParamId].title, 0x2D, 0x21); - var = gTasks[taskId].data[10] + gTasks[taskId].data[11]; - sub_80C1270(gDexSearchTypeOptions[var].title, 0x2D, 0x31); + searchParamId = gTasks[taskId].tCursorPos_TypeLeft + gTasks[taskId].tScrollOffset_TypeLeft; + PrintSearchText(sDexSearchTypeOptions[searchParamId].title, 0x2D, 0x31); - var = gTasks[taskId].data[12] + gTasks[taskId].data[13]; - sub_80C1270(gDexSearchTypeOptions[var].title, 0x5D, 0x31); + searchParamId = gTasks[taskId].tCursorPos_TypeRight + gTasks[taskId].tScrollOffset_TypeRight; + PrintSearchText(sDexSearchTypeOptions[searchParamId].title, 0x5D, 0x31); - var = gTasks[taskId].data[4] + gTasks[taskId].data[5]; - sub_80C1270(gDexSortOptions[var].title, 0x2D, 0x41); + searchParamId = gTasks[taskId].tCursorPos_Order + gTasks[taskId].tScrollOffset_Order; + PrintSearchText(sDexOrderOptions[searchParamId].title, 0x2D, 0x41); if (IsNationalPokedexEnabled()) { - var = gTasks[taskId].data[2] + gTasks[taskId].data[3]; - sub_80C1270(gDexModeOptions[var].title, 0x2D, 0x51); + searchParamId = gTasks[taskId].tCursorPos_Mode + gTasks[taskId].tScrollOffset_Mode; + PrintSearchText(sDexModeOptions[searchParamId].title, 0x2D, 0x51); } } -void sub_80C21D4(u8 a) +static void DrawOrEraseSearchParameterBox(bool8 erase) { u16 i; u16 j; u16* ptr = GetBgTilemapBuffer(3); - if (a == 0) + if (!erase) { *(ptr + 0x11) = 0xC0B; for (i = 0x12; i < 0x1F; i++) @@ -5497,136 +5850,142 @@ void sub_80C21D4(u8 a) } } -void sub_80C2294(u8 taskId) +// Prints the currently viewable search parameter titles in the right-hand text box +// and the currently selected search parameter description in the bottom text box +static void PrintSearchParameterText(u8 taskId) { - const struct PokedexOption *r6 = sSearchOptions[gTasks[taskId].data[1]].pokedexList; - const u16 *r8 = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].data[1]].unk4]; - const u16 *r7 = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].data[1]].unk5]; + const struct SearchOptionText *texts = sSearchOptions[gTasks[taskId].tMenuItem].texts; + const u16 *cursorPos = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].tMenuItem].taskDataCursorPos]; + const u16 *scrollOffset = &gTasks[taskId].data[sSearchOptions[gTasks[taskId].tMenuItem].taskDataScrollOffset]; u16 i; u16 j; - sub_80C267C(); - for (i = 0, j = *r7; i < 6 && r6[j].title != NULL; i++, j++) - sub_80C2668(i, r6[j].title); - sub_80C2618(r6[*r8 + *r7].description); + ClearSearchParameterBoxText(); + + for (i = 0, j = *scrollOffset; i < MAX_SEARCH_PARAM_ON_SCREEN && texts[j].title != NULL; i++, j++) + PrintSearchParameterTitle(i, texts[j].title); + + EraseAndPrintSearchTextBox(texts[*cursorPos + *scrollOffset].description); } static u8 GetSearchModeSelection(u8 taskId, u8 option) { - const u16 *ptr1 = &gTasks[taskId].data[sSearchOptions[option].unk4]; - const u16 *ptr2 = &gTasks[taskId].data[sSearchOptions[option].unk5]; - u16 type = *ptr1 + *ptr2; + const u16 *cursorPos = &gTasks[taskId].data[sSearchOptions[option].taskDataCursorPos]; + const u16 *scrollOffset = &gTasks[taskId].data[sSearchOptions[option].taskDataScrollOffset]; + u16 id = *cursorPos + *scrollOffset; switch (option) { - default: - return 0; - case SEARCH_DEX_MODE: - return sPokedexModes[type]; - case SEARCH_ORDER: - return sSortOptions[type]; - case SEARCH_NAME: - if (type == 0) - return 0xFF; - else - return type; - case SEARCH_COLOR: - if (type == 0) - return 0xFF; - else - return type - 1; - case SEARCH_TYPE_1: - case SEARCH_TYPE_2: - return gDexSearchTypeIds[type]; + default: + return 0; + case SEARCH_MODE: + return sPokedexModes[id]; + case SEARCH_ORDER: + return sOrderOptions[id]; + case SEARCH_NAME: + if (id == 0) + return 0xFF; + else + return id; + case SEARCH_COLOR: + if (id == 0) + return 0xFF; + else + return id - 1; + case SEARCH_TYPE_LEFT: + case SEARCH_TYPE_RIGHT: + return sDexSearchTypeIds[id]; } } -void sub_80C23B8(u8 taskId) +static void SetDefaultSearchModeAndOrder(u8 taskId) { - u16 r3; + u16 selected; - switch (sPokedexView->unk614) + switch (sPokedexView->dexModeBackup) { - default: - case 0: - r3 = 0; - break; - case 1: - r3 = 1; - break; + default: + case DEX_MODE_HOENN: + selected = DEX_MODE_HOENN; + break; + case DEX_MODE_NATIONAL: + selected = DEX_MODE_NATIONAL; + break; } - gTasks[taskId].data[2] = r3; + gTasks[taskId].tCursorPos_Mode = selected; - switch (sPokedexView->unk618) + switch (sPokedexView->dexOrderBackup) { - default: - case 0: - r3 = 0; - break; - case 1: - r3 = 1; - break; - case 2: - r3 = 2; - break; - case 3: - r3 = 3; - break; - case 4: - r3 = 4; - break; - case 5: - r3 = 5; - break; + default: + case ORDER_NUMERICAL: + selected = ORDER_NUMERICAL; + break; + case ORDER_ALPHABETICAL: + selected = ORDER_ALPHABETICAL; + break; + case ORDER_HEAVIEST: + selected = ORDER_HEAVIEST; + break; + case ORDER_LIGHTEST: + selected = ORDER_LIGHTEST; + break; + case ORDER_TALLEST: + selected = ORDER_TALLEST; + break; + case ORDER_SMALLEST: + selected = ORDER_SMALLEST; + break; } - gTasks[taskId].data[4] = r3; + gTasks[taskId].tCursorPos_Order = selected; } -bool8 sub_80C244C(u8 taskId) +static bool8 SearchParamCantScrollUp(u8 taskId) { - u8 val1 = gTasks[taskId].data[1]; - const u16 *ptr = &gTasks[taskId].data[sSearchOptions[val1].unk5]; - u16 val2 = sSearchOptions[val1].numOptions - 1; + u8 menuItem = gTasks[taskId].tMenuItem; + const u16 *scrollOffset = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataScrollOffset]; + u16 lastOption = sSearchOptions[menuItem].numOptions - 1; - if (val2 > 5 && *ptr != 0) + if (lastOption > MAX_SEARCH_PARAM_CURSOR_POS && *scrollOffset != 0) return FALSE; else return TRUE; } -bool8 sub_80C2494(u8 taskId) +static bool8 SearchParamCantScrollDown(u8 taskId) { - u8 val1 = gTasks[taskId].data[1]; - const u16 *ptr = &gTasks[taskId].data[sSearchOptions[val1].unk5]; - u16 val2 = sSearchOptions[val1].numOptions - 1; + u8 menuItem = gTasks[taskId].tMenuItem; + const u16 *scrollOffset = &gTasks[taskId].data[sSearchOptions[menuItem].taskDataScrollOffset]; + u16 lastOption = sSearchOptions[menuItem].numOptions - 1; - if (val2 > 5 && *ptr < val2 - 5) + if (lastOption > MAX_SEARCH_PARAM_CURSOR_POS && *scrollOffset < lastOption - MAX_SEARCH_PARAM_CURSOR_POS) return FALSE; else return TRUE; } -void sub_80C24E0(struct Sprite *sprite) +#define sTaskId data[0] + +static void SpriteCB_SearchParameterScrollArrow(struct Sprite *sprite) { - if (gTasks[sprite->data[0]].func == sub_80C1BCC) + if (gTasks[sprite->sTaskId].func == Task_HandleSearchParameterInput) { u8 val; - if (sprite->data[1] != 0) + if (sprite->sIsDownArrow) { - if (sub_80C2494(sprite->data[0])) + if (SearchParamCantScrollDown(sprite->sTaskId)) sprite->invisible = TRUE; else sprite->invisible = FALSE; } else { - if (sub_80C244C(sprite->data[0])) + if (SearchParamCantScrollUp(sprite->sTaskId)) sprite->invisible = TRUE; else sprite->invisible = FALSE; } - val = sprite->data[2] + sprite->data[1] * 128; + val = sprite->data[2] + sprite->sIsDownArrow * 128; sprite->pos2.y = gSineTable[val] / 128; sprite->data[2] += 8; } @@ -5636,44 +5995,47 @@ void sub_80C24E0(struct Sprite *sprite) } } -void sub_80C2594(u8 taskId) +static void CreateSearchParameterScrollArrows(u8 taskId) { u8 spriteId; - spriteId = CreateSprite(&sArrowSpriteTemplate, 184, 4, 0); - gSprites[spriteId].data[0] = taskId; - gSprites[spriteId].data[1] = 0; - gSprites[spriteId].callback = sub_80C24E0; + spriteId = CreateSprite(&sScrollArrowSpriteTemplate, 184, 4, 0); + gSprites[spriteId].sTaskId = taskId; + gSprites[spriteId].sIsDownArrow = FALSE; + gSprites[spriteId].callback = SpriteCB_SearchParameterScrollArrow; - spriteId = CreateSprite(&sArrowSpriteTemplate, 184, 108, 0); - gSprites[spriteId].data[0] = taskId; - gSprites[spriteId].data[1] = 1; + spriteId = CreateSprite(&sScrollArrowSpriteTemplate, 184, 108, 0); + gSprites[spriteId].sTaskId = taskId; + gSprites[spriteId].sIsDownArrow = TRUE; gSprites[spriteId].vFlip = TRUE; - gSprites[spriteId].callback = sub_80C24E0; + gSprites[spriteId].callback = SpriteCB_SearchParameterScrollArrow; } -void sub_80C2618(const u8* str) +#undef sTaskId +#undef sIsDownArrow + +static void EraseAndPrintSearchTextBox(const u8* str) { - sub_80C12B0(8, 0x78, 0xE0, 0x20); - sub_80C1270(str, 8, 0x79); + ClearSearchMenuRect(8, 120, 224, 32); + PrintSearchText(str, 8, 121); } -void sub_80C2638(u32 y) +static void EraseSelectorArrow(u32 y) { - sub_80C12B0(0x90, y * 16 + 8, 8, 16); + ClearSearchMenuRect(144, y * 16 + 8, 8, 16); } -void sub_80C2650(u32 left) +static void PrintSelectorArrow(u32 y) { - sub_80C1270(gText_SelectorArrow, 0x90, left * 16 + 9); + PrintSearchText(gText_SelectorArrow, 144, y * 16 + 9); } -void sub_80C2668(u32 left, const u8* str) +static void PrintSearchParameterTitle(u32 y, const u8* str) { - sub_80C1270(str, 0x98, left * 16 + 9); + PrintSearchText(str, 152, y * 16 + 9); } -void sub_80C267C(void) +static void ClearSearchParameterBoxText(void) { - sub_80C12B0(0x90, 8, 0x60, 0x60); + ClearSearchMenuRect(144, 8, 96, 96); } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 697fdb792..75fe13f77 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -66,7 +66,7 @@ struct PokeDexAreaScreen /*0x6E0*/ u16 numAreaMarkerSprites; /*0x6E2*/ u16 unk6E2; /*0x6E4*/ u16 unk6E4; - /*0x6E8*/ u8 *errno; + /*0x6E8*/ u8 *screenSwitchState; /*0x6EC*/ struct RegionMap regionMap; /*0xF70*/ u8 charBuffer[0x40]; /*0xFB0*/ struct Sprite * areaUnknownSprites[3]; @@ -83,11 +83,11 @@ static u16 GetRegionMapSectionId(u8, u8); static bool8 MapHasMon(const struct WildPokemonHeader *, u16); static bool8 MonListHasMon(const struct WildPokemonInfo *, u16, u16); static void DoAreaGlow(void); -static void Task_PokedexAreaScreen_0(u8); +static void Task_ShowPokedexAreaScreen(u8); static void CreateAreaMarkerSprites(void); static void LoadAreaUnknownGraphics(void); static void CreateAreaUnknownSprites(void); -static void Task_PokedexAreaScreen_1(u8); +static void Task_HandlePokedexAreaScreenInput(u8); static void sub_813D6B4(void); static void DestroyAreaMarkerSprites(void); @@ -637,21 +637,23 @@ static void DoAreaGlow(void) } } -void ShowPokedexAreaScreen(u16 species, u8 *errno) +#define tState data[0] + +void ShowPokedexAreaScreen(u16 species, u8 *screenSwitchState) { u8 taskId; sPokedexAreaScreen = AllocZeroed(sizeof(*sPokedexAreaScreen)); sPokedexAreaScreen->species = species; - sPokedexAreaScreen->errno = errno; - errno[0] = 0; - taskId = CreateTask(Task_PokedexAreaScreen_0, 0); - gTasks[taskId].data[0] = 0; + sPokedexAreaScreen->screenSwitchState = screenSwitchState; + screenSwitchState[0] = 0; + taskId = CreateTask(Task_ShowPokedexAreaScreen, 0); + gTasks[taskId].tState = 0; } -static void Task_PokedexAreaScreen_0(u8 taskId) +static void Task_ShowPokedexAreaScreen(u8 taskId) { - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { case 0: ResetSpriteData(); @@ -702,21 +704,21 @@ static void Task_PokedexAreaScreen_0(u8 taskId) SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON); break; case 11: - gTasks[taskId].func = Task_PokedexAreaScreen_1; - gTasks[taskId].data[0] = 0; + gTasks[taskId].func = Task_HandlePokedexAreaScreenInput; + gTasks[taskId].tState = 0; return; } - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; } -static void Task_PokedexAreaScreen_1(u8 taskId) +static void Task_HandlePokedexAreaScreenInput(u8 taskId) { DoAreaGlow(); - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { default: - gTasks[taskId].data[0] = 0; + gTasks[taskId].tState = 0; // fall through case 0: if (gPaletteFade.active) @@ -737,13 +739,13 @@ static void Task_PokedexAreaScreen_1(u8 taskId) return; break; case 2: - BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB(0, 0, 0)); + BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB_BLACK); break; case 3: if (gPaletteFade.active) return; DestroyAreaMarkerSprites(); - sPokedexAreaScreen->errno[0] = gTasks[taskId].data[1]; + sPokedexAreaScreen->screenSwitchState[0] = gTasks[taskId].data[1]; sub_813D6B4(); DestroyTask(taskId); sub_81C4EB4(); @@ -751,7 +753,7 @@ static void Task_PokedexAreaScreen_1(u8 taskId) return; } - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; } static void sub_813D6B4(void) diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index 0b35b00ee..02ce18d05 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -29,14 +29,14 @@ struct PokedexCryScreen u8 unk1B; }; -static void sub_8145588(u16); +static void PlayCryScreenCry(u16); static void sub_81455A8(void); -static void sub_814560C(void); +static void DrawWaveformFlatline(void); static void sub_8145648(u8); -static void sub_81456A8(u8, u8); +static void DrawWaveformSegment(u8, u8); static void sub_8145814(u8); static void sub_8145824(u8, s16, u8); -static void sub_814596C(struct Sprite *); +static void SpriteCB_CryMeterNeedle(struct Sprite *); static void sub_8145B24(s8); // IWRAM common @@ -47,12 +47,12 @@ static EWRAM_DATA struct PokedexCryScreen *sDexCryScreen = NULL; static EWRAM_DATA u8 *sCryWaveformWindowTiledata = NULL; static EWRAM_DATA struct PokedexCryVolumeMeter *sCryVolumeMeter = NULL; -const u16 CryMeterNeedlePalette[] = INCBIN_U16("graphics/pokedex/cry_meter_needle.gbapal"); -const u8 CryMeterNeedleTiles[] = INCBIN_U8("graphics/pokedex/cry_meter_needle.4bpp"); +static const u16 sCryMeterNeedle_Pal[] = INCBIN_U16("graphics/pokedex/cry_meter_needle.gbapal"); +static const u8 sCryMeterNeedle_Gfx[] = INCBIN_U8("graphics/pokedex/cry_meter_needle.4bpp"); -const u16 gUnknown_085B8378[] = INCBIN_U16("graphics/pokedex/cry_meter_map.bin"); -const u16 gUnknown_085B8418[] = INCBIN_U16("graphics/pokedex/cry_meter.gbapal"); -const u8 gUnknown_085B8438[] = INCBIN_U8("graphics/pokedex/cry_meter.4bpp.lz"); +static const u16 sCryMeter_Tilemap[] = INCBIN_U16("graphics/pokedex/cry_meter_map.bin"); // Unused +static const u16 sCryMeter_Pal[] = INCBIN_U16("graphics/pokedex/cry_meter.gbapal"); +static const u8 sCryMeter_Gfx[] = INCBIN_U8("graphics/pokedex/cry_meter.4bpp.lz"); const u16 gUnknown_085B8770[][72] = { @@ -139,8 +139,8 @@ const u16 gUnknown_085B8770[][72] = } }; -const u16 gUnknown_085B8BF0[] = INCBIN_U16("graphics/pokedex/85B8C10.gbapal"); -const u8 gUnknown_085B8C10[] = INCBIN_U8("graphics/pokedex/85B8C10.4bpp"); +static const u16 sCryScreenBg_Pal[] = INCBIN_U16("graphics/pokedex/85B8C10.gbapal"); +static const u8 sCryScreenBg_Gfx[] = INCBIN_U8("graphics/pokedex/85B8C10.4bpp"); const u8 gUnknown_085B8C30[] = {0xF0, 0x0F}; const u8 gUnknown_085B8C32[][16] = @@ -154,18 +154,18 @@ const u8 gUnknown_085B8C32[][16] = } }; -const union AnimCmd gSpriteAnim_85B8C54[] = +static const union AnimCmd sSpriteAnim_CryMeterNeedle[] = { ANIMCMD_FRAME(0, 30), ANIMCMD_END }; -const union AnimCmd *const gSpriteAnimTable_85B8C5C[] = +static const union AnimCmd *const sSpriteAnimTable_CryMeterNeedle[] = { - gSpriteAnim_85B8C54 + sSpriteAnim_CryMeterNeedle }; -const struct OamData gOamData_85B8C60 = +static const struct OamData sOamData_CryMeterNeedle = { .y = 160, .affineMode = ST_OAM_AFFINE_NORMAL, @@ -179,33 +179,33 @@ const struct OamData gOamData_85B8C60 = .paletteNum = 0, }; -const struct SpriteTemplate gUnknown_085B8C68 = +static const struct SpriteTemplate sCryMeterNeedleSpriteTemplate = { - 0x2000, - 0x2000, - &gOamData_85B8C60, - gSpriteAnimTable_85B8C5C, - NULL, - gDummySpriteAffineAnimTable, - sub_814596C + .tileTag = 0x2000, + .paletteTag = 0x2000, + .oam = &sOamData_CryMeterNeedle, + .anims = sSpriteAnimTable_CryMeterNeedle, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_CryMeterNeedle }; -const struct SpriteSheet gCryMeterNeedleSpriteSheets[] = +static const struct SpriteSheet sCryMeterNeedleSpriteSheets[] = { - {CryMeterNeedleTiles, 0x800, 0x2000}, + {sCryMeterNeedle_Gfx, 0x800, 0x2000}, {} }; -const struct SpritePalette gCryMeterNeedleSpritePalettes[] = +static const struct SpritePalette sCryMeterNeedleSpritePalettes[] = { - {CryMeterNeedlePalette, 0x2000}, + {sCryMeterNeedle_Pal, 0x2000}, {} }; -bool8 sub_8145354(struct CryRelatedStruct *arg0, u8 windowId) +bool8 LoadCryWaveformWindow(struct CryRelatedStruct *arg0, u8 windowId) { u8 i; - u8 retVal = FALSE; + u8 finished = FALSE; switch (gDexCryScreenState) { @@ -225,27 +225,27 @@ bool8 sub_8145354(struct CryRelatedStruct *arg0, u8 windowId) sDexCryScreen->unk11 = 0; sub_8145824(windowId, -8 * arg0->xPos, 1); for (i = 0; i < 224; i++) - CopyToWindowPixelBuffer(windowId, gUnknown_085B8C10, TILE_SIZE_4BPP, i); + CopyToWindowPixelBuffer(windowId, sCryScreenBg_Gfx, TILE_SIZE_4BPP, i); gDexCryScreenState++; break; case 1: for (i = 0; i < sDexCryScreen->unk16 * 8; i++) - sub_81456A8(i, 0); + DrawWaveformSegment(i, 0); gDexCryScreenState++; break; case 2: sub_8145814(windowId); - LoadPalette(gUnknown_085B8BF0, arg0->paletteNo * 16, 32); - retVal = TRUE; + LoadPalette(sCryScreenBg_Pal, arg0->paletteNo * 16, 32); + finished = TRUE; break; } - return retVal; + return finished; } -void sub_814545C(u8 windowId) +void UpdateCryWaveformWindow(u8 windowId) { u8 var0; @@ -259,15 +259,15 @@ void sub_814545C(u8 windowId) sDexCryScreen->unk1A--; if (!sDexCryScreen->unk1A) { - sub_8145588(sDexCryScreen->species); - sub_814560C(); + PlayCryScreenCry(sDexCryScreen->species); + DrawWaveformFlatline(); return; } } if (sDexCryScreen->unk10 == 0) { - sub_814560C(); + DrawWaveformFlatline(); return; } @@ -279,7 +279,7 @@ void sub_814545C(u8 windowId) { if (!IsCryPlaying()) { - sub_814560C(); + DrawWaveformFlatline(); sDexCryScreen->unk10 = 0; return; } @@ -289,12 +289,12 @@ void sub_814545C(u8 windowId) } var0 = 2 * (sDexCryScreen->unk10 - 1); - sub_81456A8(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, sDexCryScreen->unk0[var0]); - sub_81456A8(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, sDexCryScreen->unk0[var0 + 1]); + DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, sDexCryScreen->unk0[var0]); + DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, sDexCryScreen->unk0[var0 + 1]); sDexCryScreen->unk10++; } -void sub_8145534(u16 species) +void CryScreenPlayButton(u16 species) { if (gMPlayInfo_BGM.status & MUSICPLAYER_STATUS_PAUSE && !sDexCryScreen->unk1A) { @@ -309,13 +309,13 @@ void sub_8145534(u16 species) } else { - sub_8145588(species); + PlayCryScreenCry(species); } } } } -static void sub_8145588(u16 species) +static void PlayCryScreenCry(u16 species) { PlayCry2(species, 0, 0x7d, 10); sDexCryScreen->unk10 = 1; @@ -333,14 +333,14 @@ static void sub_81455A8(void) baseBuffer = gSoundInfo.pcmBuffer + (gSoundInfo.pcmDmaPeriod + 1 - gPcmDmaCounter) * gSoundInfo.pcmSamplesPerVBlank; buffer = baseBuffer + 0x630; - for (i = 0; i < 16; i++) + for (i = 0; i < ARRAY_COUNT(sDexCryScreen->unk0); i++) sDexCryScreen->unk0[i] = buffer[i * 2] * 2; } -static void sub_814560C(void) +static void DrawWaveformFlatline(void) { - sub_81456A8(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, 0); - sub_81456A8(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, 0); + DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, 0); + DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, 0); } static void sub_8145648(u8 windowId) @@ -352,10 +352,10 @@ static void sub_8145648(u8 windowId) sDexCryScreen->unk11 += 2; offset = (sDexCryScreen->unk11 / 8 + sDexCryScreen->unk16 + 1) % 32; for (i = 0; i < 7; i++) - CopyToWindowPixelBuffer(windowId, gUnknown_085B8C10, TILE_SIZE_4BPP, offset + (i * TILE_SIZE_4BPP)); + CopyToWindowPixelBuffer(windowId, sCryScreenBg_Gfx, TILE_SIZE_4BPP, offset + (i * TILE_SIZE_4BPP)); } -static void sub_81456A8(u8 a0, u8 a1) +static void DrawWaveformSegment(u8 a0, u8 a1) { u8 sp0; u8 r6; @@ -408,9 +408,9 @@ static void sub_8145824(u8 windowId, s16 arg1, u8 arg2) } } -bool8 sub_8145850(struct CryRelatedStruct *arg0, u8 windowId) +bool8 LoadCryMeter(struct CryRelatedStruct *arg0, u8 windowId) { - int retVal = FALSE; + bool8 finished = FALSE; switch (gDexCryScreenState) { @@ -418,25 +418,25 @@ bool8 sub_8145850(struct CryRelatedStruct *arg0, u8 windowId) if (!sCryVolumeMeter) sCryVolumeMeter = AllocZeroed(sizeof(*sCryVolumeMeter)); - CopyToWindowPixelBuffer(windowId, gUnknown_085B8438, 0, 0); - LoadPalette(gUnknown_085B8418, arg0->paletteNo * 16, 32); + CopyToWindowPixelBuffer(windowId, sCryMeter_Gfx, 0, 0); + LoadPalette(sCryMeter_Pal, arg0->paletteNo * 16, 32); gDexCryScreenState++; break; case 1: - LoadSpriteSheets(gCryMeterNeedleSpriteSheets); - LoadSpritePalettes(gCryMeterNeedleSpritePalettes); - sCryVolumeMeter->needleSpriteId = CreateSprite(&gUnknown_085B8C68, 40 + arg0->xPos * 8, 56 + arg0->yPos * 8, 1); - sCryVolumeMeter->unk0 = 0x20; - sCryVolumeMeter->unk1 = 0x20; + LoadSpriteSheets(sCryMeterNeedleSpriteSheets); + LoadSpritePalettes(sCryMeterNeedleSpritePalettes); + sCryVolumeMeter->needleSpriteId = CreateSprite(&sCryMeterNeedleSpriteTemplate, 40 + arg0->xPos * 8, 56 + arg0->yPos * 8, 1); + sCryVolumeMeter->unk0 = 32; + sCryVolumeMeter->unk1 = 32; sCryVolumeMeter->unk2 = 0; - retVal = TRUE; + finished = TRUE; break; } - return retVal; + return finished; } -void sub_8145914(void) +void FreeCryScreen(void) { FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[sCryVolumeMeter->needleSpriteId].oam.paletteNum)); DestroySprite(gSprites + sCryVolumeMeter->needleSpriteId); @@ -444,7 +444,7 @@ void sub_8145914(void) FREE_AND_SET_NULL(sCryVolumeMeter); } -static void sub_814596C(struct Sprite *sprite) +static void SpriteCB_CryMeterNeedle(struct Sprite *sprite) { u16 i; s8 r3; @@ -458,29 +458,29 @@ static void sub_814596C(struct Sprite *sprite) gSprites[sCryVolumeMeter->needleSpriteId].oam.affineParam = 0; switch (sDexCryScreen->unk10) { - case 0: - sCryVolumeMeter->unk1 = 0x20; - if (sCryVolumeMeter->unk0 > 0) - { - if (sCryVolumeMeter->unk2 != 1) - sCryVolumeMeter->unk2--; - } - else - sCryVolumeMeter->unk2 = 5; - break; - case 2: - r3 = 0; - for (i = 0; i < 16; i++) - { - if (r3 < sDexCryScreen->unk0[i]) - r3 = sDexCryScreen->unk0[i]; - } - sub_8145B24(r3 * 0xd0 / 0x100); - break; - case 6: - var0 = &sDexCryScreen->unk0[10]; - sub_8145B24(*var0 * 0xd0 / 0x100); - break; + case 0: + sCryVolumeMeter->unk1 = 32; + if (sCryVolumeMeter->unk0 > 0) + { + if (sCryVolumeMeter->unk2 != 1) + sCryVolumeMeter->unk2--; + } + else + sCryVolumeMeter->unk2 = 5; + break; + case 2: + r3 = 0; + for (i = 0; i < ARRAY_COUNT(sDexCryScreen->unk0); i++) + { + if (r3 < sDexCryScreen->unk0[i]) + r3 = sDexCryScreen->unk0[i]; + } + sub_8145B24(r3 * 0xd0 / 0x100); + break; + case 6: + var0 = &sDexCryScreen->unk0[10]; + sub_8145B24(*var0 * 0xd0 / 0x100); + break; } if (sCryVolumeMeter->unk0 == sCryVolumeMeter->unk1) @@ -512,7 +512,7 @@ static void sub_814596C(struct Sprite *sprite) ObjAffineSet(&affine, &matrix, 1, 2); SetOamMatrix(0, matrix.a, matrix.b, matrix.c, matrix.d); x = gSineTable[((sCryVolumeMeter->unk0 + 0x7F) & 0xFF)]; - y = gSineTable[((sCryVolumeMeter->unk0 + 0x7F) & 0xFF) + 0x40]; + y = gSineTable[((sCryVolumeMeter->unk0 + 0x7F) & 0xFF) + 64]; sprite->pos2.x = x * 24 / 256; sprite->pos2.y = y * 24 / 256; } diff --git a/src/start_menu.c b/src/start_menu.c index a6e7ae5d8..4b6fce57b 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -603,7 +603,7 @@ static bool8 StartMenuPokedexCallback(void) PlayRainStoppingSoundEffect(); RemoveExtraStartMenuWindows(); CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(CB2_Pokedex); + SetMainCallback2(CB2_OpenPokedex); return TRUE; } From a495379ff06f8976cc51b2d6f31a3b4277469537 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 10 Mar 2020 14:02:03 -0400 Subject: [PATCH 05/34] Document pokedex cry screen --- graphics/pokedex/cry_screen_bg | Bin 0 -> 32 bytes .../{85B8C10.png => cry_screen_bg.png} | Bin include/pokedex_cry_screen.h | 6 +- src/pokedex.c | 24 +- src/pokedex_cry_screen.c | 355 ++++++++++-------- 5 files changed, 217 insertions(+), 168 deletions(-) create mode 100644 graphics/pokedex/cry_screen_bg rename graphics/pokedex/{85B8C10.png => cry_screen_bg.png} (100%) diff --git a/graphics/pokedex/cry_screen_bg b/graphics/pokedex/cry_screen_bg new file mode 100644 index 0000000000000000000000000000000000000000..e786232d9356dd9ce26322a734551f9c59264253 GIT binary patch literal 32 gcmZQzVDMmYVt|97y5hR6b>HhO>#OVc*8i^u09E!0U;qFB literal 0 HcmV?d00001 diff --git a/graphics/pokedex/85B8C10.png b/graphics/pokedex/cry_screen_bg.png similarity index 100% rename from graphics/pokedex/85B8C10.png rename to graphics/pokedex/cry_screen_bg.png diff --git a/include/pokedex_cry_screen.h b/include/pokedex_cry_screen.h index db995624c..4d2043292 100755 --- a/include/pokedex_cry_screen.h +++ b/include/pokedex_cry_screen.h @@ -1,7 +1,7 @@ #ifndef GUARD_POKEDEX_CRY_SCREEN_H #define GUARD_POKEDEX_CRY_SCREEN_H -struct CryRelatedStruct +struct CryScreenWindow { u16 unk0; // Assigned to val that's never read u8 unk2; // Never read @@ -12,10 +12,10 @@ struct CryRelatedStruct extern u8 gDexCryScreenState; -bool8 LoadCryWaveformWindow(struct CryRelatedStruct*, u8); +bool8 LoadCryWaveformWindow(struct CryScreenWindow*, u8); void UpdateCryWaveformWindow(u8); void CryScreenPlayButton(u16); -bool8 LoadCryMeter(struct CryRelatedStruct*, u8); +bool8 LoadCryMeter(struct CryScreenWindow*, u8); void FreeCryScreen(void); #endif diff --git a/src/pokedex.c b/src/pokedex.c index 7532f0c99..ba05969ae 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3568,14 +3568,14 @@ static void Task_LoadCryScreen(u8 taskId) break; case 6: { - struct CryRelatedStruct sp4; + struct CryScreenWindow waveformWindow; - sp4.unk0 = 0x4020; - sp4.unk2 = 0x1F; - sp4.paletteNo = 8; - sp4.yPos = 0x1E; - sp4.xPos = 0xC; - if (LoadCryWaveformWindow(&sp4, 2)) + waveformWindow.unk0 = 0x4020; + waveformWindow.unk2 = 31; + waveformWindow.paletteNo = 8; + waveformWindow.yPos = 30; + waveformWindow.xPos = 12; + if (LoadCryWaveformWindow(&waveformWindow, 2)) { gMain.state++; gDexCryScreenState = 0; @@ -3584,12 +3584,12 @@ static void Task_LoadCryScreen(u8 taskId) break; case 7: { - struct CryRelatedStruct spC; + struct CryScreenWindow cryMeter; - spC.paletteNo = 9; - spC.xPos = 0x12; - spC.yPos = 3; - if (LoadCryMeter(&spC, 3)) + cryMeter.paletteNo = 9; + cryMeter.xPos = 18; + cryMeter.yPos = 3; + if (LoadCryMeter(&cryMeter, 3)) gMain.state++; CopyWindowToVram(WIN_VU_METER, 2); CopyWindowToVram(WIN_INFO, 3); diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index 02ce18d05..0a6f639ae 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -9,35 +9,53 @@ #include "trig.h" #include "window.h" -struct PokedexCryVolumeMeter { - s8 unk0; - s8 unk1; - u8 unk2; - u16 needleSpriteId; +// Cry meter needle positions +// +// 0 +// 32 . . -32 +// . . +// 64 . . -64 +// . . +// . . +// 96 . . -96 +// 127 +// +#define MIN_NEEDLE_POS 32 +#define MAX_NEEDLE_POS -32 + +#define NEEDLE_MOVE_INCREMENT 5 + +#define WAVEFORM_WINDOW_HEIGHT 56 + +struct PokedexCryMeterNeedle { + s8 rotation; + s8 targetRotation; + u8 moveIncrement; + u16 spriteId; }; struct PokedexCryScreen { - u8 unk0[16]; - u8 unk10; - u8 unk11; - u8 unk12; - u16 unk14; - u8 unk16; + u8 cryWaveformBuffer[16]; + u8 cryState; + u8 playhead; + u8 waveformPreviousY; + u16 unk; // Never read + u8 playStartPos; u16 species; - u8 unk1A; - u8 unk1B; + u8 cryOverrideCountdown; + u8 cryRepeatDelay; }; static void PlayCryScreenCry(u16); -static void sub_81455A8(void); +static void BufferCryWaveformSegment(void); static void DrawWaveformFlatline(void); -static void sub_8145648(u8); +static void AdvancePlayhead(u8); static void DrawWaveformSegment(u8, u8); -static void sub_8145814(u8); -static void sub_8145824(u8, s16, u8); +static void DrawWaveformWindow(u8); +static void ShiftWaveformOver(u8, s16, bool8); static void SpriteCB_CryMeterNeedle(struct Sprite *); -static void sub_8145B24(s8); +static void SetCryMeterNeedleTarget(s8); // IWRAM common u8 gDexCryScreenState; @@ -45,7 +63,7 @@ u8 gDexCryScreenState; // EWRAM vars static EWRAM_DATA struct PokedexCryScreen *sDexCryScreen = NULL; static EWRAM_DATA u8 *sCryWaveformWindowTiledata = NULL; -static EWRAM_DATA struct PokedexCryVolumeMeter *sCryVolumeMeter = NULL; +static EWRAM_DATA struct PokedexCryMeterNeedle *sCryMeterNeedle = NULL; static const u16 sCryMeterNeedle_Pal[] = INCBIN_U16("graphics/pokedex/cry_meter_needle.gbapal"); static const u8 sCryMeterNeedle_Gfx[] = INCBIN_U8("graphics/pokedex/cry_meter_needle.4bpp"); @@ -54,7 +72,7 @@ static const u16 sCryMeter_Tilemap[] = INCBIN_U16("graphics/pokedex/cry_meter_ma static const u16 sCryMeter_Pal[] = INCBIN_U16("graphics/pokedex/cry_meter.gbapal"); static const u8 sCryMeter_Gfx[] = INCBIN_U8("graphics/pokedex/cry_meter.4bpp.lz"); -const u16 gUnknown_085B8770[][72] = +static const u16 sWaveformOffsets[][72] = { { 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, @@ -139,18 +157,21 @@ const u16 gUnknown_085B8770[][72] = } }; -static const u16 sCryScreenBg_Pal[] = INCBIN_U16("graphics/pokedex/85B8C10.gbapal"); -static const u8 sCryScreenBg_Gfx[] = INCBIN_U8("graphics/pokedex/85B8C10.4bpp"); +static const u16 sCryScreenBg_Pal[] = INCBIN_U16("graphics/pokedex/cry_screen_bg.gbapal"); +static const u8 sCryScreenBg_Gfx[] = INCBIN_U8("graphics/pokedex/cry_screen_bg.4bpp"); -const u8 gUnknown_085B8C30[] = {0xF0, 0x0F}; -const u8 gUnknown_085B8C32[][16] = +static const u8 sWaveformTileDataNybbleMasks[] = {0xF0, 0x0F}; + +// Waveform is blue in the middle (8) grading to white at peaks (15) +// Split into two arrays for the two vertical slice halves +static const u8 sWaveformColor[][16] = { { - 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F + 15, 14, 13, 12, 11, 10, 9, 8, + 8, 9, 10, 11, 12, 13, 14, 15, }, { - 0xF0, 0xE0, 0xD0, 0xC0, 0xB0, 0xA0, 0x90, 0x80, - 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0 + 15 << 4, 14 << 4, 13 << 4, 12 << 4, 11 << 4, 10 << 4, 9 << 4, 8 << 4, + 8 << 4, 9 << 4, 10 << 4, 11 << 4, 12 << 4, 13 << 4, 14 << 4, 15 << 4, } }; @@ -202,7 +223,7 @@ static const struct SpritePalette sCryMeterNeedleSpritePalettes[] = {} }; -bool8 LoadCryWaveformWindow(struct CryRelatedStruct *arg0, u8 windowId) +bool8 LoadCryWaveformWindow(struct CryScreenWindow *window, u8 windowId) { u8 i; u8 finished = FALSE; @@ -216,28 +237,28 @@ bool8 LoadCryWaveformWindow(struct CryRelatedStruct *arg0, u8 windowId) sCryWaveformWindowTiledata = (u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA); } - sDexCryScreen->unk14 = arg0->unk0; - sDexCryScreen->unk16 = arg0->yPos; - sDexCryScreen->unk1A = 0; - sDexCryScreen->unk1B = 0; - sDexCryScreen->unk10 = 0; - sDexCryScreen->unk12 = 28; - sDexCryScreen->unk11 = 0; - sub_8145824(windowId, -8 * arg0->xPos, 1); + sDexCryScreen->unk = window->unk0; + sDexCryScreen->playStartPos = window->yPos; + sDexCryScreen->cryOverrideCountdown = 0; + sDexCryScreen->cryRepeatDelay = 0; + sDexCryScreen->cryState = 0; + sDexCryScreen->waveformPreviousY = WAVEFORM_WINDOW_HEIGHT / 2; + sDexCryScreen->playhead = 0; + ShiftWaveformOver(windowId, -8 * window->xPos, TRUE); // Does nothing for (i = 0; i < 224; i++) CopyToWindowPixelBuffer(windowId, sCryScreenBg_Gfx, TILE_SIZE_4BPP, i); gDexCryScreenState++; break; case 1: - for (i = 0; i < sDexCryScreen->unk16 * 8; i++) + for (i = 0; i < sDexCryScreen->playStartPos * 8; i++) DrawWaveformSegment(i, 0); gDexCryScreenState++; break; case 2: - sub_8145814(windowId); - LoadPalette(sCryScreenBg_Pal, arg0->paletteNo * 16, 32); + DrawWaveformWindow(windowId); + LoadPalette(sCryScreenBg_Pal, window->paletteNo * 16, 32); finished = TRUE; break; } @@ -247,17 +268,20 @@ bool8 LoadCryWaveformWindow(struct CryRelatedStruct *arg0, u8 windowId) void UpdateCryWaveformWindow(u8 windowId) { - u8 var0; + u8 waveformIdx; - sub_8145814(windowId); - sub_8145648(windowId); - if (sDexCryScreen->unk1B) - sDexCryScreen->unk1B--; + DrawWaveformWindow(windowId); + AdvancePlayhead(windowId); - if (sDexCryScreen->unk1A) + // Cry cant be replayed until this counter is done + if (sDexCryScreen->cryRepeatDelay) + sDexCryScreen->cryRepeatDelay--; + + // Once a cry replay has started, it waits for this countdown before playing + if (sDexCryScreen->cryOverrideCountdown) { - sDexCryScreen->unk1A--; - if (!sDexCryScreen->unk1A) + sDexCryScreen->cryOverrideCountdown--; + if (!sDexCryScreen->cryOverrideCountdown) { PlayCryScreenCry(sDexCryScreen->species); DrawWaveformFlatline(); @@ -265,47 +289,51 @@ void UpdateCryWaveformWindow(u8 windowId) } } - if (sDexCryScreen->unk10 == 0) + // No cry playing + if (sDexCryScreen->cryState == 0) { DrawWaveformFlatline(); return; } - if (sDexCryScreen->unk10 == 1) + // Cry playing, buffer waveform + if (sDexCryScreen->cryState == 1) { - sub_81455A8(); + BufferCryWaveformSegment(); } - else if (sDexCryScreen->unk10 > 8) + else if (sDexCryScreen->cryState > 8) { + // Buffered waveform exhausted, end or buffer more if (!IsCryPlaying()) { DrawWaveformFlatline(); - sDexCryScreen->unk10 = 0; + sDexCryScreen->cryState = 0; return; } - sub_81455A8(); - sDexCryScreen->unk10 = 1; + BufferCryWaveformSegment(); + sDexCryScreen->cryState = 1; } - var0 = 2 * (sDexCryScreen->unk10 - 1); - DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, sDexCryScreen->unk0[var0]); - DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, sDexCryScreen->unk0[var0 + 1]); - sDexCryScreen->unk10++; + // Draw cry + waveformIdx = 2 * (sDexCryScreen->cryState - 1); + DrawWaveformSegment(sDexCryScreen->playStartPos * 8 + sDexCryScreen->playhead - 2, sDexCryScreen->cryWaveformBuffer[waveformIdx]); + DrawWaveformSegment(sDexCryScreen->playStartPos * 8 + sDexCryScreen->playhead - 1, sDexCryScreen->cryWaveformBuffer[waveformIdx + 1]); + sDexCryScreen->cryState++; } void CryScreenPlayButton(u16 species) { - if (gMPlayInfo_BGM.status & MUSICPLAYER_STATUS_PAUSE && !sDexCryScreen->unk1A) + if (gMPlayInfo_BGM.status & MUSICPLAYER_STATUS_PAUSE && !sDexCryScreen->cryOverrideCountdown) { - if (!sDexCryScreen->unk1B) + if (!sDexCryScreen->cryRepeatDelay) { - sDexCryScreen->unk1B = 4; + sDexCryScreen->cryRepeatDelay = 4; if (IsCryPlaying() == TRUE) { StopCry(); sDexCryScreen->species = species; - sDexCryScreen->unk1A = 2; + sDexCryScreen->cryOverrideCountdown = 2; } else { @@ -317,11 +345,11 @@ void CryScreenPlayButton(u16 species) static void PlayCryScreenCry(u16 species) { - PlayCry2(species, 0, 0x7d, 10); - sDexCryScreen->unk10 = 1; + PlayCry2(species, 0, 125, 10); + sDexCryScreen->cryState = 1; } -static void sub_81455A8(void) +static void BufferCryWaveformSegment(void) { u8 i; s8 *baseBuffer; @@ -333,102 +361,113 @@ static void sub_81455A8(void) baseBuffer = gSoundInfo.pcmBuffer + (gSoundInfo.pcmDmaPeriod + 1 - gPcmDmaCounter) * gSoundInfo.pcmSamplesPerVBlank; buffer = baseBuffer + 0x630; - for (i = 0; i < ARRAY_COUNT(sDexCryScreen->unk0); i++) - sDexCryScreen->unk0[i] = buffer[i * 2] * 2; + for (i = 0; i < ARRAY_COUNT(sDexCryScreen->cryWaveformBuffer); i++) + sDexCryScreen->cryWaveformBuffer[i] = buffer[i * 2] * 2; } static void DrawWaveformFlatline(void) { - DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 2, 0); - DrawWaveformSegment(sDexCryScreen->unk16 * 8 + sDexCryScreen->unk11 - 1, 0); + DrawWaveformSegment(sDexCryScreen->playStartPos * 8 + sDexCryScreen->playhead - 2, 0); + DrawWaveformSegment(sDexCryScreen->playStartPos * 8 + sDexCryScreen->playhead - 1, 0); } -static void sub_8145648(u8 windowId) +static void AdvancePlayhead(u8 windowId) { u8 i; u16 offset; - sub_8145824(windowId, sDexCryScreen->unk11, 0); - sDexCryScreen->unk11 += 2; - offset = (sDexCryScreen->unk11 / 8 + sDexCryScreen->unk16 + 1) % 32; + ShiftWaveformOver(windowId, sDexCryScreen->playhead, FALSE); + sDexCryScreen->playhead += 2; + offset = (sDexCryScreen->playhead / 8 + sDexCryScreen->playStartPos + 1) % 32; for (i = 0; i < 7; i++) CopyToWindowPixelBuffer(windowId, sCryScreenBg_Gfx, TILE_SIZE_4BPP, offset + (i * TILE_SIZE_4BPP)); } -static void DrawWaveformSegment(u8 a0, u8 a1) +// Waveform segments are drawn in alternate vertical slices +// Note that the waveform isnt put on screen until DrawWaveformWindow +static void DrawWaveformSegment(u8 position, u8 amplitude) { - u8 sp0; - u8 r6; - u8 r8; - u16 offset; - u16 r1; - u8 i; + // Position is a bitfield containing the play start pos, the playhead pos, and which vertical slice half to draw + #define PLAY_START_POS (position >> 3) + #define PLAYHEAD_POS (position & ((1 << 3) - 1)) + #define VERT_SLICE (position & 1) - r1 = (a1 + 127) * 256; - i = r1 / 1152.0; - if (i > 55) - i = 55; - sp0 = i; - r6 = a0 & 1; - if (i > sDexCryScreen->unk12) + u8 currentPointY; + u8 nybble; + u16 offset; + u16 temp; + u8 y; + + temp = (amplitude + 127) * 256; + y = temp / 1152.0; + if (y > WAVEFORM_WINDOW_HEIGHT - 1) + y = WAVEFORM_WINDOW_HEIGHT - 1; + currentPointY = y; + nybble = VERT_SLICE; + if (y > sDexCryScreen->waveformPreviousY) { + // Current point lower than previous point, draw point and draw line up to previous do { - offset = gUnknown_085B8770[a0 & 0x7][i] + (a0 / 8) * TILE_SIZE_4BPP; - sCryWaveformWindowTiledata[offset] &= gUnknown_085B8C30[r6]; - sCryWaveformWindowTiledata[offset] |= gUnknown_085B8C32[r6][((i / 3) - 1) & 0x0F]; - i--; - } while (i > sDexCryScreen->unk12); + offset = sWaveformOffsets[PLAYHEAD_POS][y] + PLAY_START_POS * TILE_SIZE_4BPP; + sCryWaveformWindowTiledata[offset] &= sWaveformTileDataNybbleMasks[nybble]; + sCryWaveformWindowTiledata[offset] |= sWaveformColor[nybble][((y / 3) - 1) & 0x0F]; + y--; + } while (y > sDexCryScreen->waveformPreviousY); } else { + // Current point higher than previous point, draw point and draw line down to previous do { - offset = gUnknown_085B8770[a0 & 0x7][i] + (a0 / 8) * TILE_SIZE_4BPP; - sCryWaveformWindowTiledata[offset] &= gUnknown_085B8C30[r6]; - sCryWaveformWindowTiledata[offset] |= gUnknown_085B8C32[r6][((i / 3) - 1) & 0x0F]; - i++; - } while (i < sDexCryScreen->unk12); + offset = sWaveformOffsets[PLAYHEAD_POS][y] + PLAY_START_POS * TILE_SIZE_4BPP; + sCryWaveformWindowTiledata[offset] &= sWaveformTileDataNybbleMasks[nybble]; + sCryWaveformWindowTiledata[offset] |= sWaveformColor[nybble][((y / 3) - 1) & 0x0F]; + y++; + } while (y < sDexCryScreen->waveformPreviousY); } - sDexCryScreen->unk12 = sp0; + sDexCryScreen->waveformPreviousY = currentPointY; } -static void sub_8145814(u8 windowId) +static void DrawWaveformWindow(u8 windowId) { CopyWindowToVram(windowId, 2); } -static void sub_8145824(u8 windowId, s16 arg1, u8 arg2) +// rsVertical is leftover from a very different version of this function in RS +// In RS, when TRUE it would use VOFS and when FALSE it would use HOFS (only FALSE was used) +// Here when TRUE it does nothing +static void ShiftWaveformOver(u8 windowId, s16 offset, bool8 rsVertical) { - if (!arg2) + if (!rsVertical) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); - ChangeBgX(bg, arg1 << 8, 0); + ChangeBgX(bg, offset << 8, 0); } } -bool8 LoadCryMeter(struct CryRelatedStruct *arg0, u8 windowId) +bool8 LoadCryMeter(struct CryScreenWindow *window, u8 windowId) { bool8 finished = FALSE; switch (gDexCryScreenState) { case 0: - if (!sCryVolumeMeter) - sCryVolumeMeter = AllocZeroed(sizeof(*sCryVolumeMeter)); + if (!sCryMeterNeedle) + sCryMeterNeedle = AllocZeroed(sizeof(*sCryMeterNeedle)); CopyToWindowPixelBuffer(windowId, sCryMeter_Gfx, 0, 0); - LoadPalette(sCryMeter_Pal, arg0->paletteNo * 16, 32); + LoadPalette(sCryMeter_Pal, window->paletteNo * 16, 32); gDexCryScreenState++; break; case 1: LoadSpriteSheets(sCryMeterNeedleSpriteSheets); LoadSpritePalettes(sCryMeterNeedleSpritePalettes); - sCryVolumeMeter->needleSpriteId = CreateSprite(&sCryMeterNeedleSpriteTemplate, 40 + arg0->xPos * 8, 56 + arg0->yPos * 8, 1); - sCryVolumeMeter->unk0 = 32; - sCryVolumeMeter->unk1 = 32; - sCryVolumeMeter->unk2 = 0; + sCryMeterNeedle->spriteId = CreateSprite(&sCryMeterNeedleSpriteTemplate, 40 + window->xPos * 8, 56 + window->yPos * 8, 1); + sCryMeterNeedle->rotation = MIN_NEEDLE_POS; + sCryMeterNeedle->targetRotation = MIN_NEEDLE_POS; + sCryMeterNeedle->moveIncrement = 0; finished = TRUE; break; } @@ -438,92 +477,102 @@ bool8 LoadCryMeter(struct CryRelatedStruct *arg0, u8 windowId) void FreeCryScreen(void) { - FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[sCryVolumeMeter->needleSpriteId].oam.paletteNum)); - DestroySprite(gSprites + sCryVolumeMeter->needleSpriteId); + FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[sCryMeterNeedle->spriteId].oam.paletteNum)); + DestroySprite(gSprites + sCryMeterNeedle->spriteId); FREE_AND_SET_NULL(sDexCryScreen); - FREE_AND_SET_NULL(sCryVolumeMeter); + FREE_AND_SET_NULL(sCryMeterNeedle); } static void SpriteCB_CryMeterNeedle(struct Sprite *sprite) { u16 i; - s8 r3; + s8 peakAmplitude; s16 x; s16 y; struct ObjAffineSrcData affine; struct OamMatrix matrix; - u8 *var0; + u8 amplitude; - gSprites[sCryVolumeMeter->needleSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; - gSprites[sCryVolumeMeter->needleSpriteId].oam.affineParam = 0; - switch (sDexCryScreen->unk10) + gSprites[sCryMeterNeedle->spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; + gSprites[sCryMeterNeedle->spriteId].oam.affineParam = 0; + + // While no cry is playing, cryState is 0 + // While cry is playing, cryState loops 1-8 + switch (sDexCryScreen->cryState) { case 0: - sCryVolumeMeter->unk1 = 32; - if (sCryVolumeMeter->unk0 > 0) + sCryMeterNeedle->targetRotation = MIN_NEEDLE_POS; + if (sCryMeterNeedle->rotation > 0) { - if (sCryVolumeMeter->unk2 != 1) - sCryVolumeMeter->unk2--; + if (sCryMeterNeedle->moveIncrement != 1) + sCryMeterNeedle->moveIncrement--; } else - sCryVolumeMeter->unk2 = 5; + { + sCryMeterNeedle->moveIncrement = NEEDLE_MOVE_INCREMENT; + } break; case 2: - r3 = 0; - for (i = 0; i < ARRAY_COUNT(sDexCryScreen->unk0); i++) + peakAmplitude = 0; + for (i = 0; i < ARRAY_COUNT(sDexCryScreen->cryWaveformBuffer); i++) { - if (r3 < sDexCryScreen->unk0[i]) - r3 = sDexCryScreen->unk0[i]; + if (peakAmplitude < sDexCryScreen->cryWaveformBuffer[i]) + peakAmplitude = sDexCryScreen->cryWaveformBuffer[i]; } - sub_8145B24(r3 * 0xd0 / 0x100); + SetCryMeterNeedleTarget(peakAmplitude * 208 / 256); break; case 6: - var0 = &sDexCryScreen->unk0[10]; - sub_8145B24(*var0 * 0xd0 / 0x100); + // To introduce some randomness, needle jumps to set pos in waveform rather than peak + amplitude = sDexCryScreen->cryWaveformBuffer[10]; + SetCryMeterNeedleTarget(amplitude * 208 / 256); break; } - if (sCryVolumeMeter->unk0 == sCryVolumeMeter->unk1) + if (sCryMeterNeedle->rotation == sCryMeterNeedle->targetRotation) { - // empty block + // Empty, needle has reached target } - else if (sCryVolumeMeter->unk0 < sCryVolumeMeter->unk1) + else if (sCryMeterNeedle->rotation < sCryMeterNeedle->targetRotation) { - sCryVolumeMeter->unk0 += sCryVolumeMeter->unk2; - if (sCryVolumeMeter->unk0 > sCryVolumeMeter->unk1) + // Rotate needle left + sCryMeterNeedle->rotation += sCryMeterNeedle->moveIncrement; + if (sCryMeterNeedle->rotation > sCryMeterNeedle->targetRotation) { - sCryVolumeMeter->unk0 = sCryVolumeMeter->unk1; - sCryVolumeMeter->unk1 = 0; + sCryMeterNeedle->rotation = sCryMeterNeedle->targetRotation; + sCryMeterNeedle->targetRotation = 0; } } else { - sCryVolumeMeter->unk0 -= sCryVolumeMeter->unk2; - if (sCryVolumeMeter->unk0 < sCryVolumeMeter->unk1) + // Rotate needle right + sCryMeterNeedle->rotation -= sCryMeterNeedle->moveIncrement; + if (sCryMeterNeedle->rotation < sCryMeterNeedle->targetRotation) { - sCryVolumeMeter->unk0 = sCryVolumeMeter->unk1; - sCryVolumeMeter->unk1 = 0; + sCryMeterNeedle->rotation = sCryMeterNeedle->targetRotation; + sCryMeterNeedle->targetRotation = 0; } } - affine.xScale = 0x100; - affine.yScale = 0x100; - affine.rotation = sCryVolumeMeter->unk0 * 256; + affine.xScale = 256; + affine.yScale = 256; + affine.rotation = sCryMeterNeedle->rotation * 256; ObjAffineSet(&affine, &matrix, 1, 2); SetOamMatrix(0, matrix.a, matrix.b, matrix.c, matrix.d); - x = gSineTable[((sCryVolumeMeter->unk0 + 0x7F) & 0xFF)]; - y = gSineTable[((sCryVolumeMeter->unk0 + 0x7F) & 0xFF) + 64]; + x = gSineTable[((sCryMeterNeedle->rotation + 0x7F) & 0xFF)]; + y = gSineTable[((sCryMeterNeedle->rotation + 0x7F) & 0xFF) + 64]; sprite->pos2.x = x * 24 / 256; sprite->pos2.y = y * 24 / 256; } -static void sub_8145B24(s8 a0) +static void SetCryMeterNeedleTarget(s8 offset) { - u16 r2 = (0x20 - a0) & 0xff; - if (r2 > 0x20 && r2 < 0xe0) - r2 = 0xe0; + u16 rotation = (MIN_NEEDLE_POS - offset) & 0xFF; - sCryVolumeMeter->unk1 = r2; - sCryVolumeMeter->unk2 = 5; + // Min is positive, max is negative. Make sure needle hasnt moved out of bounds + if (rotation > MIN_NEEDLE_POS && rotation < (u8)MAX_NEEDLE_POS) + rotation = (u8)MAX_NEEDLE_POS; + + sCryMeterNeedle->targetRotation = rotation; + sCryMeterNeedle->moveIncrement = NEEDLE_MOVE_INCREMENT; } From ab87c909986a73d2d131d791d8ad146281ef7a8c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 17 Mar 2020 12:08:05 -0400 Subject: [PATCH 06/34] Revert city_zoom_tiles.png name --- .../pokenav/{city_zoom_tiles.png => zoom_tiles.png} | Bin src/graphics.c | 2 +- src/pokenav_region_map.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename graphics/pokenav/{city_zoom_tiles.png => zoom_tiles.png} (100%) diff --git a/graphics/pokenav/city_zoom_tiles.png b/graphics/pokenav/zoom_tiles.png similarity index 100% rename from graphics/pokenav/city_zoom_tiles.png rename to graphics/pokenav/zoom_tiles.png diff --git a/src/graphics.c b/src/graphics.c index 9548d37c8..83fab7dee 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1348,7 +1348,7 @@ const u16 gPokenavMessageBox_Pal[] = INCBIN_U16("graphics/pokenav/message.gbapal const u32 gPokenavMessageBox_Gfx[] = INCBIN_U32("graphics/pokenav/message.4bpp.lz"); const u32 gPokenavMessageBox_Tilemap[] = INCBIN_U32("graphics/pokenav/message.bin.lz"); -const u16 gRegionMapCityZoomTiles_Pal[] = INCBIN_U16("graphics/pokenav/city_zoom_tiles.gbapal"); +const u16 gRegionMapCityZoomTiles_Pal[] = INCBIN_U16("graphics/pokenav/zoom_tiles.gbapal"); const u32 gRegionMapCityZoomText_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_text.4bpp.lz"); const u16 gPokenavConditionCancel_Pal[] = INCBIN_U16("graphics/pokenav/cancel.gbapal"); diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 59eaf6b71..dff6b8c6c 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -75,7 +75,7 @@ extern const u16 gRegionMapCityZoomTiles_Pal[]; extern const u32 gRegionMapCityZoomText_Gfx[]; static const u16 sMapSecInfoWindow_Pal[] = INCBIN_U16("graphics/pokenav/region_map_info_window.gbapal"); -static const u32 sRegionMapCityZoomTiles_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_tiles.4bpp.lz"); +static const u32 sRegionMapCityZoomTiles_Gfx[] = INCBIN_U32("graphics/pokenav/zoom_tiles.4bpp.lz"); #include "data/region_map/city_map_tilemaps.h" From f45336c546373b908ea5c42dae1dbad80fad8d83 Mon Sep 17 00:00:00 2001 From: AsparagusEduardo Date: Tue, 17 Mar 2020 22:11:14 -0300 Subject: [PATCH 07/34] Using Battle Action constants --- src/battle_main.c | 4 ++-- src/battle_script_commands.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_main.c b/src/battle_main.c index 0f6ec40a4..e3eea60d0 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4425,7 +4425,7 @@ static void HandleTurnActionSelectionState(void) RecordedBattle_ClearBattlerAction(gActiveBattler, 1); gBattleCommunication[gActiveBattler] = STATE_SELECTION_SCRIPT; *(gBattleStruct->selectionScriptFinished + gActiveBattler) = FALSE; - gBattleBufferB[gActiveBattler][1] = 0; + gBattleBufferB[gActiveBattler][1] = B_ACTION_USE_MOVE; *(gBattleStruct->stateIdAfterSelScript + gActiveBattler) = STATE_WAIT_ACTION_CHOSEN; return; } @@ -4553,7 +4553,7 @@ static void HandleTurnActionSelectionState(void) case STATE_SELECTION_SCRIPT_MAY_RUN: if (*(gBattleStruct->selectionScriptFinished + gActiveBattler)) { - if (gBattleBufferB[gActiveBattler][1] == 13) + if (gBattleBufferB[gActiveBattler][1] == B_ACTION_NOTHING_FAINTED) { gHitMarker |= HITMARKER_RUN; gChosenActionByBattler[gActiveBattler] = B_ACTION_RUN; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 729cce0c9..84f2b1f4d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8925,7 +8925,7 @@ static void Cmd_jumpifnopursuitswitchdmg(void) for (i = 0; i < gBattlersCount; i++) { if (gBattlerByTurnOrder[i] == gBattlerTarget) - gActionsByTurnOrder[i] = 11; + gActionsByTurnOrder[i] = B_ACTION_TRY_FINISH; } gCurrentMove = MOVE_PURSUIT; @@ -10005,7 +10005,7 @@ static void Cmd_pursuitrelated(void) if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gAbsentBattlerFlags & gBitTable[gActiveBattler]) - && gChosenActionByBattler[gActiveBattler] == 0 + && gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_MOVE && gChosenMoveByBattler[gActiveBattler] == MOVE_PURSUIT) { gActionsByTurnOrder[gActiveBattler] = 11; From 8e4b9876999cbe91088a38dea7406854adc33ffa Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Mar 2020 03:22:07 -0400 Subject: [PATCH 08/34] Revert more porymap-breaking changes --- data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc | 2 +- data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc | 2 +- include/constants/heal_locations.h | 8 ++++---- src/region_map.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index 333bffc37..95be20f75 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -4,7 +4,7 @@ EverGrandeCity_PokemonCenter_1F_MapScripts:: @ 8229A34 .byte 0 EverGrandeCity_PokemonCenter_1F_OnTransition: @ 8229A3F - setrespawn HEAL_LOCATION_EVER_GRANDE_CITY + setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_1 call_if_unset FLAG_MET_SCOTT_IN_EVERGRANDE, EverGrandeCity_PokemonCenter_1F_EventScript_TryShowScott end diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index c69c28d8b..72c069243 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -4,7 +4,7 @@ EverGrandeCity_PokemonLeague_1F_MapScripts:: @ 82295D2 .byte 0 EverGrandeCity_PokemonLeague_1F_OnTransition: @ 82295DD - setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE + setrespawn HEAL_LOCATION_EVER_GRANDE_CITY_2 setflag FLAG_LANDMARK_POKEMON_LEAGUE call_if_unset FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_1F_EventScript_GuardsBlockDoor end diff --git a/include/constants/heal_locations.h b/include/constants/heal_locations.h index 272a69dfa..64c8956a9 100644 --- a/include/constants/heal_locations.h +++ b/include/constants/heal_locations.h @@ -11,16 +11,16 @@ #define HEAL_LOCATION_LILYCOVE_CITY 8 #define HEAL_LOCATION_MOSSDEEP_CITY 9 #define HEAL_LOCATION_SOOTOPOLIS_CITY 10 -#define HEAL_LOCATION_EVER_GRANDE_CITY 11 -#define HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE 12 -#define HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE 13 +#define HEAL_LOCATION_EVER_GRANDE_CITY_1 11 +#define HEAL_LOCATION_LITTLEROOT_TOWN_1 12 +#define HEAL_LOCATION_LITTLEROOT_TOWN_2 13 #define HEAL_LOCATION_OLDALE_TOWN 14 #define HEAL_LOCATION_DEWFORD_TOWN 15 #define HEAL_LOCATION_LAVARIDGE_TOWN 16 #define HEAL_LOCATION_FALLARBOR_TOWN 17 #define HEAL_LOCATION_VERDANTURF_TOWN 18 #define HEAL_LOCATION_PACIFIDLOG_TOWN 19 -#define HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE 20 +#define HEAL_LOCATION_EVER_GRANDE_CITY_2 20 #define HEAL_LOCATION_SOUTHERN_ISLAND_EXTERIOR 21 #define HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST 22 diff --git a/src/region_map.c b/src/region_map.c index e183261b9..8a15ca30d 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -301,7 +301,7 @@ static const u8 sMapHealLocations[][3] = {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY}, {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY}, {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY}, - {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY}, + {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY_1}, {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0}, {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0}, {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0}, @@ -1998,10 +1998,10 @@ static void CB_ExitFlyMap(void) SetWarpDestinationToHealLocation(HEAL_LOCATION_BATTLE_FRONTIER_OUTSIDE_EAST); break; case MAPSEC_LITTLEROOT_TOWN: - SetWarpDestinationToHealLocation(gSaveBlock2Ptr->playerGender == MALE ? HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE : HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE); + SetWarpDestinationToHealLocation(gSaveBlock2Ptr->playerGender == MALE ? HEAL_LOCATION_LITTLEROOT_TOWN_1 : HEAL_LOCATION_LITTLEROOT_TOWN_2); break; case MAPSEC_EVER_GRANDE_CITY: - SetWarpDestinationToHealLocation(FlagGet(FLAG_LANDMARK_POKEMON_LEAGUE) && sFlyMap->regionMap.posWithinMapSec == 0 ? HEAL_LOCATION_EVER_GRANDE_CITY_POKEMON_LEAGUE : HEAL_LOCATION_EVER_GRANDE_CITY); + SetWarpDestinationToHealLocation(FlagGet(FLAG_LANDMARK_POKEMON_LEAGUE) && sFlyMap->regionMap.posWithinMapSec == 0 ? HEAL_LOCATION_EVER_GRANDE_CITY_2 : HEAL_LOCATION_EVER_GRANDE_CITY_1); break; default: if (sMapHealLocations[sFlyMap->regionMap.mapSecId][2] != 0) From 685f120b5e7d9c2694d843d56d47f15af32a12f3 Mon Sep 17 00:00:00 2001 From: Sewef Date: Fri, 27 Mar 2020 14:50:15 +0100 Subject: [PATCH 09/34] Fix 'AnimMovmentWaves' typo --- src/battle_anim_effects_2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index cf85e697a..133742446 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -79,8 +79,8 @@ static void AnimAngel(struct Sprite *); static void AnimPinkHeart(struct Sprite *); static void AnimDevil(struct Sprite *); static void AnimFurySwipes(struct Sprite *); -static void AnimMovmentWaves(struct Sprite *); -static void AnimMovmentWaves_Step(struct Sprite *); +static void AnimMovementWaves(struct Sprite *); +static void AnimMovementWaves_Step(struct Sprite *); static void AnimJaggedMusicNote(struct Sprite *); static void AnimJaggedMusicNote_Step(struct Sprite *); static void AnimPerishSongMusicNote2(struct Sprite *); @@ -1163,7 +1163,7 @@ const struct SpriteTemplate gMovementWavesSpriteTemplate = .anims = gMovementWavesAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimMovmentWaves, + .callback = AnimMovementWaves, }; static const union AffineAnimCmd sAffineAnims_UproarDistortion[] = @@ -3606,7 +3606,7 @@ static void AnimFurySwipes(struct Sprite *sprite) } } -static void AnimMovmentWaves(struct Sprite *sprite) +static void AnimMovementWaves(struct Sprite *sprite) { if (!gBattleAnimArgs[2]) { @@ -3633,11 +3633,11 @@ static void AnimMovmentWaves(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[1]; StartSpriteAnim(sprite, sprite->data[1]); - sprite->callback = AnimMovmentWaves_Step; + sprite->callback = AnimMovementWaves_Step; } } -static void AnimMovmentWaves_Step(struct Sprite *sprite) +static void AnimMovementWaves_Step(struct Sprite *sprite) { if (sprite->animEnded) { From 487080b4252e6173a2c6cc34cbbe0267877b986f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 1 Apr 2020 02:54:26 -0400 Subject: [PATCH 10/34] Minor player avatar doc --- include/field_player_avatar.h | 2 +- include/global.fieldmap.h | 2 +- src/event_object_movement.c | 2 +- src/field_player_avatar.c | 130 +++++++++++++++++----------------- src/fldeff_misc.c | 2 +- src/item_use.c | 4 +- 6 files changed, 71 insertions(+), 71 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 5e5a2361f..1dbe171bc 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -48,7 +48,7 @@ bool8 PartyHasMonWithSurf(void); bool8 IsPlayerFacingSurfableFishableWater(void); bool8 IsPlayerSurfingNorth(void); void sub_808C228(u8 direction); -u8 sub_808BCD0(void); +u8 GetPlayerAvatarFlags(void); void sub_808B578(void); u8 GetFRLGAvatarGraphicsIdByGender(u8); u8 GetRSAvatarGraphicsIdByGender(u8); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index af2be9c77..2e451a368 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -304,7 +304,7 @@ enum struct PlayerAvatar { /*0x00*/ u8 flags; - /*0x01*/ u8 unk1; // used to be named bike, but its definitely not that. seems to be some transition flags + /*0x01*/ u8 transitionFlags; // used to be named bike, but its definitely not that. seems to be some transition flags /*0x02*/ u8 runningState; // this is a static running state. 00 is not moving, 01 is turn direction, 02 is moving. /*0x03*/ u8 tileTransitionState; // this is a transition running state: 00 is not moving, 01 is transition between tiles, 02 means you are on the frame in which you have centered on a tile but are about to keep moving, even if changing directions. 2 is also used for a ledge hop, since you are transitioning. /*0x04*/ u8 spriteId; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 464e6acec..09cdd94cd 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1754,7 +1754,7 @@ static void SetPlayerAvatarObjectEventIdAndObjectId(u8 objectEventId, u8 spriteI gPlayerAvatar.objectEventId = objectEventId; gPlayerAvatar.spriteId = spriteId; gPlayerAvatar.gender = GetPlayerAvatarGenderByGraphicsId(gObjectEvents[objectEventId].graphicsId); - SetPlayerAvatarExtraStateTransition(gObjectEvents[objectEventId].graphicsId, 0x20); + SetPlayerAvatarExtraStateTransition(gObjectEvents[objectEventId].graphicsId, PLAYER_AVATAR_FLAG_5); } void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u8 graphicsId) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index ebab51ed8..35bbb1e03 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -59,8 +59,8 @@ static bool8 ForcedMovement_SlideSouth(void); static bool8 ForcedMovement_SlideNorth(void); static bool8 ForcedMovement_SlideWest(void); static bool8 ForcedMovement_SlideEast(void); -static bool8 ForcedMovement_0xBB(void); -static bool8 ForcedMovement_0xBC(void); +static bool8 ForcedMovement_MatJump(void); +static bool8 ForcedMovement_MatSpin(void); static bool8 ForcedMovement_MuddySlope(void); static void MovePlayerNotOnBike(u8, u16); @@ -99,10 +99,10 @@ static void PlayCollisionSoundIfNotFacingWarp(u8 a); static void sub_808C280(struct ObjectEvent *); static void StartStrengthAnim(u8, u8); -static void Task_BumpBoulder(u8 taskId); -static u8 sub_808C3A4(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); -static u8 do_boulder_dust(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); -static u8 sub_808C484(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); +static void Task_PushBoulder(u8 taskId); +static u8 PushBoulder_Start(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); +static u8 PushBoulder_Move(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); +static u8 PushBoulder_End(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject); static void DoPlayerMatJump(void); static void DoPlayerAvatarSecretBaseMatJump(u8 taskId); @@ -182,8 +182,8 @@ static bool8 (*const sForcedMovementFuncs[])(void) = ForcedMovement_SlideWest, ForcedMovement_SlideEast, ForcedMovement_PushedSouthByCurrent, - ForcedMovement_0xBB, - ForcedMovement_0xBC, + ForcedMovement_MatJump, + ForcedMovement_MatSpin, ForcedMovement_MuddySlope, }; @@ -211,16 +211,16 @@ static const u8 sAcroBikeTrickCollisionTypes[] = { COLLISION_HORIZONTAL_RAIL, }; -static void (*const gUnknown_084974B8[])(struct ObjectEvent *) = +static void (*const sPlayerAvatarTransitionFuncs[])(struct ObjectEvent *) = { - PlayerAvatarTransition_Normal, - PlayerAvatarTransition_MachBike, - PlayerAvatarTransition_AcroBike, - PlayerAvatarTransition_Surfing, - PlayerAvatarTransition_Underwater, - PlayerAvatarTransition_ReturnToField, - PlayerAvatarTransition_Dummy, - PlayerAvatarTransition_Dummy, + [PLAYER_AVATAR_STATE_NORMAL] = PlayerAvatarTransition_Normal, + [PLAYER_AVATAR_STATE_MACH_BIKE] = PlayerAvatarTransition_MachBike, + [PLAYER_AVATAR_STATE_ACRO_BIKE] = PlayerAvatarTransition_AcroBike, + [PLAYER_AVATAR_STATE_SURFING] = PlayerAvatarTransition_Surfing, + [PLAYER_AVATAR_STATE_UNDERWATER] = PlayerAvatarTransition_Underwater, + [PLAYER_AVATAR_STATE_FIELD_MOVE] = PlayerAvatarTransition_ReturnToField, + [PLAYER_AVATAR_STATE_FISHING] = PlayerAvatarTransition_Dummy, + [PLAYER_AVATAR_STATE_WATERING] = PlayerAvatarTransition_Dummy, }; static bool8 (*const sArrowWarpMetatileBehaviorChecks[])(u8) = @@ -259,23 +259,23 @@ static const u8 sFRLGAvatarGfxIds[] = {OBJ_EVENT_GFX_RED, OBJ_EVENT_GFX_LEAF}; static const u8 sRSAvatarGfxIds[] = {OBJ_EVENT_GFX_LINK_RS_BRENDAN, OBJ_EVENT_GFX_LINK_RS_MAY}; -static const u8 gUnknown_0849750C[2][5][2] = +static const u8 sPlayerAvatarGfxToStateFlag[2][5][2] = { - //male + [MALE] = { - {OBJ_EVENT_GFX_BRENDAN_NORMAL, 1}, - {OBJ_EVENT_GFX_BRENDAN_MACH_BIKE, 2}, - {OBJ_EVENT_GFX_BRENDAN_ACRO_BIKE, 4}, - {OBJ_EVENT_GFX_BRENDAN_SURFING, 8}, - {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, 16}, + {OBJ_EVENT_GFX_BRENDAN_NORMAL, PLAYER_AVATAR_FLAG_ON_FOOT}, + {OBJ_EVENT_GFX_BRENDAN_MACH_BIKE, PLAYER_AVATAR_FLAG_MACH_BIKE}, + {OBJ_EVENT_GFX_BRENDAN_ACRO_BIKE, PLAYER_AVATAR_FLAG_ACRO_BIKE}, + {OBJ_EVENT_GFX_BRENDAN_SURFING, PLAYER_AVATAR_FLAG_SURFING}, + {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, PLAYER_AVATAR_FLAG_UNDERWATER}, }, - //female + [FEMALE] = { - {OBJ_EVENT_GFX_MAY_NORMAL, 1}, - {OBJ_EVENT_GFX_MAY_MACH_BIKE, 2}, - {OBJ_EVENT_GFX_MAY_ACRO_BIKE, 4}, - {OBJ_EVENT_GFX_MAY_SURFING, 8}, - {OBJ_EVENT_GFX_MAY_UNDERWATER, 16}, + {OBJ_EVENT_GFX_MAY_NORMAL, PLAYER_AVATAR_FLAG_ON_FOOT}, + {OBJ_EVENT_GFX_MAY_MACH_BIKE, PLAYER_AVATAR_FLAG_MACH_BIKE}, + {OBJ_EVENT_GFX_MAY_ACRO_BIKE, PLAYER_AVATAR_FLAG_ACRO_BIKE}, + {OBJ_EVENT_GFX_MAY_SURFING, PLAYER_AVATAR_FLAG_SURFING}, + {OBJ_EVENT_GFX_MAY_UNDERWATER, PLAYER_AVATAR_FLAG_UNDERWATER}, } }; @@ -287,11 +287,11 @@ static bool8 (*const sArrowWarpMetatileBehaviorChecks2[])(u8) = //Duplicate of MetatileBehavior_IsEastArrowWarp, }; -static bool8 (*const gUnknown_08497530[])(struct Task *, struct ObjectEvent *, struct ObjectEvent *) = +static bool8 (*const sPushBoulderFuncs[])(struct Task *, struct ObjectEvent *, struct ObjectEvent *) = { - sub_808C3A4, - do_boulder_dust, - sub_808C484, + PushBoulder_Start, + PushBoulder_Move, + PushBoulder_End, }; static bool8 (*const sPlayerAvatarSecretBaseMatJump[])(struct Task *, struct ObjectEvent *) = @@ -547,13 +547,13 @@ static bool8 ForcedMovement_SlideEast(void) return ForcedMovement_Slide(DIR_EAST, PlayerGoSpeed2); } -static bool8 ForcedMovement_0xBB(void) +static bool8 ForcedMovement_MatJump(void) { DoPlayerMatJump(); return TRUE; } -static bool8 ForcedMovement_0xBC(void) +static bool8 ForcedMovement_MatSpin(void) { DoPlayerMatSpin(); return TRUE; @@ -807,23 +807,23 @@ bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction) void SetPlayerAvatarTransitionFlags(u16 transitionFlags) { - gPlayerAvatar.unk1 |= transitionFlags; + gPlayerAvatar.transitionFlags |= transitionFlags; DoPlayerAvatarTransition(); } static void DoPlayerAvatarTransition(void) { u8 i; - u8 flags = gPlayerAvatar.unk1; + u8 flags = gPlayerAvatar.transitionFlags; if (flags != 0) { - for (i = 0; i < 8; i++, flags >>= 1) + for (i = 0; i < ARRAY_COUNT(sPlayerAvatarTransitionFuncs); i++, flags >>= 1) { if (flags & 1) - gUnknown_084974B8[i](&gObjectEvents[gPlayerAvatar.objectEventId]); + sPlayerAvatarTransitionFuncs[i](&gObjectEvents[gPlayerAvatar.objectEventId]); } - gPlayerAvatar.unk1 = 0; + gPlayerAvatar.transitionFlags = 0; } } @@ -1186,12 +1186,12 @@ void sub_808BC90(s16 x, s16 y) MoveObjectEventToMapCoords(&gObjectEvents[gPlayerAvatar.objectEventId], x, y); } -u8 TestPlayerAvatarFlags(u8 a) +u8 TestPlayerAvatarFlags(u8 flag) { - return gPlayerAvatar.flags & a; + return gPlayerAvatar.flags & flag; } -u8 sub_808BCD0(void) +u8 GetPlayerAvatarFlags(void) { return gPlayerAvatar.flags; } @@ -1335,32 +1335,32 @@ static u8 GetPlayerAvatarStateTransitionByGraphicsId(u8 graphicsId, u8 gender) { u8 i; - for (i = 0; i < 5; i++) + for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++) { - if (gUnknown_0849750C[gender][i][0] == graphicsId) - return gUnknown_0849750C[gender][i][1]; + if (sPlayerAvatarGfxToStateFlag[gender][i][0] == graphicsId) + return sPlayerAvatarGfxToStateFlag[gender][i][1]; } - return 1; + return PLAYER_AVATAR_FLAG_ON_FOOT; } u8 GetPlayerAvatarGraphicsIdByCurrentState(void) { u8 i; - u8 r5 = gPlayerAvatar.flags; + u8 flags = gPlayerAvatar.flags; - for (i = 0; i < 5; i++) + for (i = 0; i < ARRAY_COUNT(sPlayerAvatarGfxToStateFlag[0]); i++) { - if (gUnknown_0849750C[gPlayerAvatar.gender][i][1] & r5) - return gUnknown_0849750C[gPlayerAvatar.gender][i][0]; + if (sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i][1] & flags) + return sPlayerAvatarGfxToStateFlag[gPlayerAvatar.gender][i][0]; } return 0; } -void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 b) +void SetPlayerAvatarExtraStateTransition(u8 graphicsId, u8 transitionFlag) { - u8 unk = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender); + u8 stateFlag = GetPlayerAvatarStateTransitionByGraphicsId(graphicsId, gPlayerAvatar.gender); - gPlayerAvatar.unk1 |= unk | b; + gPlayerAvatar.transitionFlags |= stateFlag | transitionFlag; DoPlayerAvatarTransition(); } @@ -1384,7 +1384,7 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender) playerObjEventTemplate.flagId = 0; objectEventId = SpawnSpecialObjectEvent(&playerObjEventTemplate); objectEvent = &gObjectEvents[objectEventId]; - objectEvent->isPlayer = 1; + objectEvent->isPlayer = TRUE; objectEvent->warpArrowSpriteId = CreateWarpArrowSprite(); ObjectEventTurn(objectEvent, direction); ClearPlayerAvatarInfo(); @@ -1453,22 +1453,22 @@ static void sub_808C280(struct ObjectEvent *objectEvent) static void StartStrengthAnim(u8 a, u8 b) { - u8 taskId = CreateTask(Task_BumpBoulder, 0xFF); + u8 taskId = CreateTask(Task_PushBoulder, 0xFF); gTasks[taskId].data[1] = a; gTasks[taskId].data[2] = b; - Task_BumpBoulder(taskId); + Task_PushBoulder(taskId); } -static void Task_BumpBoulder(u8 taskId) +static void Task_PushBoulder(u8 taskId) { - while (gUnknown_08497530[gTasks[taskId].data[0]](&gTasks[taskId], + while (sPushBoulderFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gObjectEvents[gTasks[taskId].data[1]])) ; } -static bool8 sub_808C3A4(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) +static bool8 PushBoulder_Start(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) { ScriptContext2_Enable(); gPlayerAvatar.preventStep = TRUE; @@ -1476,7 +1476,7 @@ static bool8 sub_808C3A4(struct Task *task, struct ObjectEvent *playerObject, st return FALSE; } -static bool8 do_boulder_dust(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) +static bool8 PushBoulder_Move(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) { if (ObjectEventIsHeldMovementActive(playerObject)) { @@ -1506,7 +1506,7 @@ static bool8 do_boulder_dust(struct Task *task, struct ObjectEvent *playerObject return FALSE; } -static bool8 sub_808C484(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) +static bool8 PushBoulder_End(struct Task *task, struct ObjectEvent *playerObject, struct ObjectEvent *strengthObject) { if (ObjectEventCheckHeldMovementStatus(playerObject) && ObjectEventCheckHeldMovementStatus(strengthObject)) @@ -1515,7 +1515,7 @@ static bool8 sub_808C484(struct Task *task, struct ObjectEvent *playerObject, st ObjectEventClearHeldMovementIfFinished(strengthObject); gPlayerAvatar.preventStep = FALSE; ScriptContext2_Disable(); - DestroyTask(FindTaskIdByFunc(Task_BumpBoulder)); + DestroyTask(FindTaskIdByFunc(Task_PushBoulder)); } return FALSE; } @@ -1545,7 +1545,7 @@ static u8 PlayerAvatar_DoSecretBaseMatJump(struct Task *task, struct ObjectEvent if (task->data[1] > 1) { gPlayerAvatar.preventStep = FALSE; - gPlayerAvatar.unk1 |= 0x20; + gPlayerAvatar.transitionFlags |= PLAYER_AVATAR_FLAG_5; DestroyTask(FindTaskIdByFunc(DoPlayerAvatarSecretBaseMatJump)); } } diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index 60d1ea072..def86ab1b 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -1260,7 +1260,7 @@ static void Task_WateringBerryTreeAnim_2(u8 taskId) static void Task_WateringBerryTreeAnim_3(u8 taskId) { - SetPlayerAvatarTransitionFlags(sub_808BCD0()); + SetPlayerAvatarTransitionFlags(GetPlayerAvatarFlags()); DestroyTask(taskId); EnableBothScriptContexts(); } diff --git a/src/item_use.c b/src/item_use.c index 954d4b26f..73d6f6ffe 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -221,9 +221,9 @@ void ItemUseOutOfBattle_Bike(u8 taskId) static void ItemUseOnFieldCB_Bike(u8 taskId) { if (!ItemId_GetSecondaryId(gSpecialVar_ItemId)) - GetOnOffBike(2); + GetOnOffBike(PLAYER_AVATAR_FLAG_MACH_BIKE); else - GetOnOffBike(4); + GetOnOffBike(PLAYER_AVATAR_FLAG_ACRO_BIKE); ScriptUnfreezeObjectEvents(); ScriptContext2_Disable(); DestroyTask(taskId); From 3d2c42adfe9d36c00b03b360e45f1e5e1781560e Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 2 Apr 2020 01:03:25 +0800 Subject: [PATCH 11/34] HighlightScreenSelectBarItem --- src/pokedex.c | 70 ++------------------------------------------------- 1 file changed, 2 insertions(+), 68 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index ba05969ae..0bc3c297c 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3859,9 +3859,7 @@ static void LoadScreenSelectBarSubmenu(u16 unused) { CopyToBgTilemapBuffer(1, gPokedexScreenSelectBarSubmenu_Tilemap, 0, 0); } -#ifdef NONMATCHING -// This doesn't match because gcc flips the naming of the r3 and r4 -// registers. + static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) { u8 i; @@ -3874,7 +3872,7 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) u16 newPalette = 0x4000; if (i == selectedScreen) - newPalette = 0x2000; + do newPalette = 0x2000; while (0); for (j = 0; j < 7; j++) { @@ -3884,70 +3882,6 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) } CopyBgTilemapBufferToVram(1); } -#else -__attribute__((naked)) -static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r8, r0\n\ - movs r0, 0x1\n\ - bl GetBgTilemapBuffer\n\ - adds r7, r0, 0\n\ - movs r1, 0\n\ -_080BFD22:\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - movs r3, 0x80\n\ - lsls r3, 7\n\ - cmp r1, r8\n\ - bne _080BFD38\n\ - movs r3, 0x80\n\ - lsls r3, 6\n\ -_080BFD38:\n\ - movs r2, 0\n\ - adds r6, r1, 0x1\n\ - ldr r4, =0x00000fff\n\ -_080BFD3E:\n\ - adds r1, r5, r2\n\ - lsls r1, 1\n\ - adds r1, r7\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r1, 0x40\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x6\n\ - bls _080BFD3E\n\ - lsls r0, r6, 24\n\ - lsrs r1, r0, 24\n\ - cmp r1, 0x3\n\ - bls _080BFD22\n\ - movs r0, 0x1\n\ - bl CopyBgTilemapBufferToVram\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided\n"); -} -#endif #ifdef NONMATCHING // This doesn't match because gcc flips the naming of the r3 and r4 From 69f6d2afad3f62d4e281aa2bffb492cfc7231760 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 2 Apr 2020 01:03:36 +0800 Subject: [PATCH 12/34] HighlightSubmenuScreenSelectBarItem --- src/pokedex.c | 83 +++++---------------------------------------------- 1 file changed, 7 insertions(+), 76 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 0bc3c297c..908ccfe6a 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3883,9 +3883,6 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) CopyBgTilemapBufferToVram(1); } -#ifdef NONMATCHING -// This doesn't match because gcc flips the naming of the r3 and r4 -// registers. static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) { u8 i; @@ -3897,10 +3894,13 @@ static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) u8 row = i * 7 + 1; u32 newPalette; - if (i == a || i == 3) - newPalette = 0x2000; - else - newPalette = 0x4000; + do + { + if (i == a || i == 3) + newPalette = 0x2000; + else + newPalette = 0x4000; + } while (0); for (j = 0; j < 7; j++) { @@ -3910,75 +3910,6 @@ static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) } CopyBgTilemapBufferToVram(1); } -#else -__attribute__((naked)) -static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r8, r0\n\ - movs r0, 0x1\n\ - bl GetBgTilemapBuffer\n\ - adds r7, r0, 0\n\ - movs r1, 0\n\ -_080BFD92:\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - cmp r1, r8\n\ - beq _080BFDA4\n\ - cmp r1, 0x3\n\ - bne _080BFDAA\n\ -_080BFDA4:\n\ - movs r3, 0x80\n\ - lsls r3, 6\n\ - b _080BFDAE\n\ -_080BFDAA:\n\ - movs r3, 0x80\n\ - lsls r3, 7\n\ -_080BFDAE:\n\ - movs r2, 0\n\ - adds r5, r1, 0x1\n\ - ldr r4, =0x00000fff\n\ -_080BFDB4:\n\ - adds r1, r6, r2\n\ - lsls r1, 1\n\ - adds r1, r7\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r1, 0x40\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x6\n\ - bls _080BFDB4\n\ - lsls r0, r5, 24\n\ - lsrs r1, r0, 24\n\ - cmp r1, 0x3\n\ - bls _080BFD92\n\ - movs r0, 0x1\n\ - bl CopyBgTilemapBufferToVram\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided\n"); -} -#endif #define tState data[0] #define tDexNum data[1] From cd60736e366edd0e76524a699bfb22bbb382dd44 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 2 Apr 2020 01:30:18 +0800 Subject: [PATCH 13/34] PrintMonWeight --- src/pokedex.c | 227 ++------------------------------------------------ 1 file changed, 6 insertions(+), 221 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 908ccfe6a..49dfaed00 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4163,11 +4163,12 @@ static void PrintMonHeight(u16 height, u8 left, u8 top) PrintInfoScreenText(buffer, left, top); } -#ifdef NONMATCHING -// This doesn't match because gcc manages to avoid using the stack -// to store local variables. static void PrintMonWeight(u16 weight, u8 left, u8 top) { +#ifndef NONMATCHING + asm("":::"r9"); +{ +#endif u8 buffer[16]; bool8 output; u8 i = 0; @@ -4223,226 +4224,10 @@ static void PrintMonWeight(u16 weight, u8 left, u8 top) buffer[i++] = CHAR_PERIOD; buffer[i++] = EOS; PrintInfoScreenText(buffer, left, top); -} -#else -__attribute__((naked)) -static void PrintMonWeight(u16 weight, u8 left, u8 top) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x14\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - lsls r1, 24\n\ - lsrs r1, 24\n\ - mov r10, r1\n\ - lsls r2, 24\n\ - lsrs r2, 24\n\ - str r2, [sp, 0x10]\n\ - ldr r5, =0x000186a0\n\ - muls r0, r5\n\ - ldr r1, =0x000011b8\n\ - bl __divsi3\n\ - adds r7, r0, 0\n\ - movs r1, 0xA\n\ - bl __umodsi3\n\ - cmp r0, 0x4\n\ - bls _080C0494\n\ - adds r7, 0xA\n\ -_080C0494:\n\ - movs r0, 0\n\ - mov r8, r0\n\ - mov r4, sp\n\ - adds r0, r7, 0\n\ - adds r1, r5, 0\n\ - bl __udivsi3\n\ - adds r0, 0xA1\n\ - strb r0, [r4]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r0, 0xA1\n\ - bne _080C04C0\n\ - movs r6, 0x1\n\ - mov r1, sp\n\ - movs r0, 0x77\n\ - strb r0, [r1]\n\ - b _080C04C6\n\ - .pool\n\ -_080C04C0:\n\ - movs r1, 0x1\n\ - mov r8, r1\n\ - movs r6, 0x1\n\ -_080C04C6:\n\ - ldr r1, =0x000186a0\n\ - adds r0, r7, 0\n\ - bl __umodsi3\n\ - adds r7, r0, 0\n\ - mov r4, sp\n\ - adds r4, 0x1\n\ - ldr r1, =0x00002710\n\ - bl __udivsi3\n\ - adds r0, 0xA1\n\ - strb r0, [r4]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r0, 0xA1\n\ - bne _080C0504\n\ - mov r2, r8\n\ - cmp r2, 0\n\ - bne _080C0504\n\ - adds r1, r6, 0\n\ - adds r0, r1, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - add r1, sp\n\ - movs r0, 0x77\n\ - strb r0, [r1]\n\ - b _080C050E\n\ - .pool\n\ -_080C0504:\n\ - movs r3, 0x1\n\ - mov r8, r3\n\ - adds r0, r6, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ -_080C050E:\n\ - ldr r1, =0x00002710\n\ - adds r0, r7, 0\n\ - bl __umodsi3\n\ - adds r7, r0, 0\n\ - mov r0, sp\n\ - adds r4, r0, r6\n\ - movs r1, 0xFA\n\ - lsls r1, 2\n\ - adds r0, r7, 0\n\ - bl __udivsi3\n\ - adds r0, 0xA1\n\ - strb r0, [r4]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r0, 0xA1\n\ - bne _080C054C\n\ - mov r1, r8\n\ - cmp r1, 0\n\ - bne _080C054C\n\ - adds r1, r6, 0\n\ - adds r0, r1, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - add r1, sp\n\ - movs r0, 0x77\n\ - strb r0, [r1]\n\ - b _080C0552\n\ - .pool\n\ -_080C054C:\n\ - adds r0, r6, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ -_080C0552:\n\ - movs r1, 0xFA\n\ - lsls r1, 2\n\ - adds r0, r7, 0\n\ - bl __umodsi3\n\ - adds r7, r0, 0\n\ - adds r1, r6, 0\n\ - adds r0, r1, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r5, r6, 0\n\ - mov r2, sp\n\ - adds r4, r2, r1\n\ - adds r0, r7, 0\n\ - movs r1, 0x64\n\ - bl __udivsi3\n\ - adds r0, 0xA1\n\ - movs r3, 0\n\ - mov r9, r3\n\ - strb r0, [r4]\n\ - adds r0, r7, 0\n\ - movs r1, 0x64\n\ - bl __umodsi3\n\ - adds r7, r0, 0\n\ - adds r0, r5, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r1, r6, 0\n\ - mov r2, sp\n\ - adds r0, r2, r5\n\ - movs r3, 0xAD\n\ - mov r8, r3\n\ - mov r2, r8\n\ - strb r2, [r0]\n\ - adds r0, r1, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r5, r6, 0\n\ - mov r3, sp\n\ - adds r4, r3, r1\n\ - adds r0, r7, 0\n\ - movs r1, 0xA\n\ - bl __udivsi3\n\ - adds r0, 0xA1\n\ - strb r0, [r4]\n\ - adds r0, r5, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r1, r6, 0\n\ - mov r2, sp\n\ - adds r0, r2, r5\n\ - mov r3, r9\n\ - strb r3, [r0]\n\ - adds r0, r1, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r2, r6, 0\n\ - add r1, sp\n\ - movs r0, 0xE0\n\ - strb r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r3, r6, 0\n\ - mov r0, sp\n\ - adds r1, r0, r2\n\ - movs r0, 0xD6\n\ - strb r0, [r1]\n\ - adds r0, r3, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - adds r2, r6, 0\n\ - mov r0, sp\n\ - adds r1, r0, r3\n\ - movs r0, 0xE7\n\ - strb r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r3, sp\n\ - adds r1, r3, r2\n\ - mov r2, r8\n\ - strb r2, [r1]\n\ - adds r1, r3, r0\n\ - movs r0, 0xFF\n\ - strb r0, [r1]\n\ - mov r0, sp\n\ - mov r1, r10\n\ - ldr r2, [sp, 0x10]\n\ - bl PrintInfoScreenText\n\ - add sp, 0x14\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .syntax divided\n"); +#ifndef NONMATCHING } #endif +} const u8 *GetPokedexCategoryName(u16 dexNum) // unused { From 0fe5ff34dc4d7c0f8dc159514bc477a4b5763435 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 2 Apr 2020 13:37:22 +0800 Subject: [PATCH 14/34] Pokeblock_BufferEnhancedStatText --- src/use_pokeblock.c | 58 ++++++++------------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index a0c8d8e2d..5079edb37 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -937,62 +937,24 @@ void Pokeblock_MenuWindowTextPrint(const u8 *message) AddTextPrinterParameterized(2, 1, gStringVar4, 0, 1, 0, NULL); } -// This function is a joke. -#ifdef NONMATCHING void Pokeblock_BufferEnhancedStatText(u8 *dest, u8 statId, s16 a2) { - if (a2 != 0) + switch (a2) { + case 1 ... 32767: + a2 = 0; + // fallthrough + case -32768 ... -1: + if (a2) + dest[(u16)a2] += 0; // something you can't imagine StringCopy(dest, sContestStatNames[statId]); StringAppend(dest, gText_WasEnhanced); - } - else - { + break; + case 0: StringCopy(dest, gText_NothingChanged); + break; } } -#else -NAKED -void Pokeblock_BufferEnhancedStatText(u8 *dest, u8 statId, s16 a2) -{ - asm(".syntax unified\n\ -push {r4,lr}\n\ - adds r4, r0, 0\n\ - lsls r1, 24\n\ - lsrs r3, r1, 24\n\ - lsls r2, 16\n\ - lsrs r0, r2, 16\n\ - asrs r2, 16\n\ - cmp r2, 0\n\ - beq _08167010\n\ - cmp r2, 0\n\ - ble _08166FEC\n\ - movs r0, 0\n\ -_08166FEC:\n\ - lsls r0, 16\n\ - ldr r1, =sContestStatNames\n\ - lsls r0, r3, 2\n\ - adds r0, r1\n\ - ldr r1, [r0]\n\ - adds r0, r4, 0\n\ - bl StringCopy\n\ - ldr r1, =gText_WasEnhanced\n\ - adds r0, r4, 0\n\ - bl StringAppend\n\ - b _08167018\n\ - .pool\n\ -_08167010:\n\ - ldr r1, =gText_NothingChanged\n\ - adds r0, r4, 0\n\ - bl StringCopy\n\ -_08167018:\n\ - pop {r4}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided\n"); -} -#endif void Pokeblock_GetMonContestStats(struct Pokemon *mon, u8 *data) { From 096e57f56c47ad933167c11b11371bff4154f9d0 Mon Sep 17 00:00:00 2001 From: Sewef Date: Thu, 2 Apr 2020 13:11:18 +0200 Subject: [PATCH 15/34] Match HighlightScreenSelectBarItem --- src/pokedex.c | 69 ++------------------------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index ba05969ae..841d6c85b 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3859,9 +3859,7 @@ static void LoadScreenSelectBarSubmenu(u16 unused) { CopyToBgTilemapBuffer(1, gPokedexScreenSelectBarSubmenu_Tilemap, 0, 0); } -#ifdef NONMATCHING -// This doesn't match because gcc flips the naming of the r3 and r4 -// registers. + static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) { u8 i; @@ -3878,76 +3876,13 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) for (j = 0; j < 7; j++) { + j++;j--; ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette; ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette; } } CopyBgTilemapBufferToVram(1); } -#else -__attribute__((naked)) -static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r8, r0\n\ - movs r0, 0x1\n\ - bl GetBgTilemapBuffer\n\ - adds r7, r0, 0\n\ - movs r1, 0\n\ -_080BFD22:\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - movs r3, 0x80\n\ - lsls r3, 7\n\ - cmp r1, r8\n\ - bne _080BFD38\n\ - movs r3, 0x80\n\ - lsls r3, 6\n\ -_080BFD38:\n\ - movs r2, 0\n\ - adds r6, r1, 0x1\n\ - ldr r4, =0x00000fff\n\ -_080BFD3E:\n\ - adds r1, r5, r2\n\ - lsls r1, 1\n\ - adds r1, r7\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r1, 0x40\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x6\n\ - bls _080BFD3E\n\ - lsls r0, r6, 24\n\ - lsrs r1, r0, 24\n\ - cmp r1, 0x3\n\ - bls _080BFD22\n\ - movs r0, 0x1\n\ - bl CopyBgTilemapBufferToVram\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided\n"); -} -#endif #ifdef NONMATCHING // This doesn't match because gcc flips the naming of the r3 and r4 From 1c895bb8d07332dbe1311031c186d9276d1b2333 Mon Sep 17 00:00:00 2001 From: Sewef Date: Thu, 2 Apr 2020 13:17:33 +0200 Subject: [PATCH 16/34] Match HighlightSubmenuScreenSelectBarItem --- src/pokedex.c | 73 +-------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 841d6c85b..3d458fcb2 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3884,9 +3884,6 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) CopyBgTilemapBufferToVram(1); } -#ifdef NONMATCHING -// This doesn't match because gcc flips the naming of the r3 and r4 -// registers. static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) { u8 i; @@ -3905,81 +3902,13 @@ static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) for (j = 0; j < 7; j++) { + j++;j--; ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette; ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette; } } CopyBgTilemapBufferToVram(1); } -#else -__attribute__((naked)) -static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - mov r8, r0\n\ - movs r0, 0x1\n\ - bl GetBgTilemapBuffer\n\ - adds r7, r0, 0\n\ - movs r1, 0\n\ -_080BFD92:\n\ - lsls r0, r1, 3\n\ - subs r0, r1\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - cmp r1, r8\n\ - beq _080BFDA4\n\ - cmp r1, 0x3\n\ - bne _080BFDAA\n\ -_080BFDA4:\n\ - movs r3, 0x80\n\ - lsls r3, 6\n\ - b _080BFDAE\n\ -_080BFDAA:\n\ - movs r3, 0x80\n\ - lsls r3, 7\n\ -_080BFDAE:\n\ - movs r2, 0\n\ - adds r5, r1, 0x1\n\ - ldr r4, =0x00000fff\n\ -_080BFDB4:\n\ - adds r1, r6, r2\n\ - lsls r1, 1\n\ - adds r1, r7\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r1, 0x40\n\ - ldrh r0, [r1]\n\ - ands r0, r4\n\ - orrs r0, r3\n\ - strh r0, [r1]\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x6\n\ - bls _080BFDB4\n\ - lsls r0, r5, 24\n\ - lsrs r1, r0, 24\n\ - cmp r1, 0x3\n\ - bls _080BFD92\n\ - movs r0, 0x1\n\ - bl CopyBgTilemapBufferToVram\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided\n"); -} -#endif #define tState data[0] #define tDexNum data[1] From afdcb69bf4cd6f3f7f0bad66801108384ab596c1 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 2 Apr 2020 20:30:31 +0800 Subject: [PATCH 17/34] better matching approach than upstream --- src/pokedex.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 5b2856301..080548553 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3869,14 +3869,17 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused) for (i = 0; i < SCREEN_COUNT; i++) { u8 row = (i * 7) + 1; - u16 newPalette = 0x4000; + u16 newPalette; - if (i == selectedScreen) - do newPalette = 0x2000; while (0); + do + { + newPalette = 0x4000; + if (i == selectedScreen) + newPalette = 0x2000; + } while (0); for (j = 0; j < 7; j++) { - j++;j--; ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette; ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette; } @@ -3905,7 +3908,6 @@ static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b) for (j = 0; j < 7; j++) { - j++;j--; ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette; ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette; } From 097ddb06779c004ace31b0add6b0b60e70647e84 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 2 Apr 2020 11:18:47 -0400 Subject: [PATCH 18/34] Re-export tileset anim pngs to use palettes --- .../primary/building/anim/tv_turned_on/0.png | Bin 179 -> 179 bytes .../primary/building/anim/tv_turned_on/1.png | Bin 180 -> 180 bytes .../primary/general/anim/flower/0.png | Bin 239 -> 239 bytes .../primary/general/anim/flower/1.png | Bin 238 -> 238 bytes .../primary/general/anim/flower/2.png | Bin 241 -> 241 bytes .../general/anim/land_water_edge/0.png | Bin 333 -> 333 bytes .../general/anim/land_water_edge/1.png | Bin 341 -> 341 bytes .../general/anim/land_water_edge/2.png | Bin 342 -> 342 bytes .../general/anim/land_water_edge/3.png | Bin 360 -> 360 bytes .../general/anim/sand_water_edge/0.png | Bin 259 -> 259 bytes .../general/anim/sand_water_edge/1.png | Bin 293 -> 293 bytes .../general/anim/sand_water_edge/2.png | Bin 303 -> 303 bytes .../general/anim/sand_water_edge/3.png | Bin 320 -> 320 bytes .../general/anim/sand_water_edge/4.png | Bin 281 -> 281 bytes .../general/anim/sand_water_edge/5.png | Bin 261 -> 261 bytes .../general/anim/sand_water_edge/6.png | Bin 249 -> 249 bytes .../tilesets/primary/general/anim/water/0.png | Bin 608 -> 608 bytes .../tilesets/primary/general/anim/water/1.png | Bin 651 -> 651 bytes .../tilesets/primary/general/anim/water/2.png | Bin 597 -> 597 bytes .../tilesets/primary/general/anim/water/3.png | Bin 610 -> 610 bytes .../tilesets/primary/general/anim/water/4.png | Bin 534 -> 534 bytes .../tilesets/primary/general/anim/water/5.png | Bin 538 -> 538 bytes .../tilesets/primary/general/anim/water/6.png | Bin 554 -> 554 bytes .../tilesets/primary/general/anim/water/7.png | Bin 612 -> 612 bytes .../primary/general/anim/waterfall/0.png | Bin 199 -> 199 bytes .../primary/general/anim/waterfall/1.png | Bin 214 -> 214 bytes .../primary/general/anim/waterfall/2.png | Bin 195 -> 195 bytes .../primary/general/anim/waterfall/3.png | Bin 191 -> 191 bytes .../anim/flag/0.png | Bin 230 -> 230 bytes .../anim/flag/1.png | Bin 227 -> 227 bytes .../anim/flag/2.png | Bin 225 -> 225 bytes .../anim/flag/3.png | Bin 228 -> 228 bytes .../anim/flag/0.png | Bin 230 -> 230 bytes .../anim/flag/1.png | Bin 227 -> 227 bytes .../anim/flag/2.png | Bin 225 -> 225 bytes .../anim/flag/3.png | Bin 228 -> 228 bytes .../battle_pyramid/anim/statue_shadow/0.png | Bin 303 -> 303 bytes .../battle_pyramid/anim/statue_shadow/1.png | Bin 307 -> 307 bytes .../battle_pyramid/anim/statue_shadow/2.png | Bin 303 -> 303 bytes .../secondary/battle_pyramid/anim/torch/0.png | Bin 265 -> 265 bytes .../secondary/battle_pyramid/anim/torch/1.png | Bin 259 -> 259 bytes .../secondary/battle_pyramid/anim/torch/2.png | Bin 254 -> 254 bytes .../bike_shop/anim/blinking_lights/0.png | Bin 290 -> 290 bytes .../bike_shop/anim/blinking_lights/1.png | Bin 286 -> 286 bytes data/tilesets/secondary/cave/anim/lava/0.png | Bin 157 -> 157 bytes data/tilesets/secondary/cave/anim/lava/1.png | Bin 181 -> 181 bytes data/tilesets/secondary/cave/anim/lava/2.png | Bin 173 -> 173 bytes data/tilesets/secondary/cave/anim/lava/3.png | Bin 175 -> 175 bytes data/tilesets/secondary/cave/anim/lava/4.png | Bin 157 -> 157 bytes data/tilesets/secondary/cave/anim/lava/5.png | Bin 177 -> 177 bytes data/tilesets/secondary/cave/anim/lava/6.png | Bin 173 -> 173 bytes data/tilesets/secondary/cave/anim/lava/7.png | Bin 171 -> 171 bytes .../secondary/dewford/anim/flag/0.png | Bin 224 -> 224 bytes .../secondary/dewford/anim/flag/1.png | Bin 222 -> 222 bytes .../secondary/dewford/anim/flag/2.png | Bin 228 -> 228 bytes .../secondary/dewford/anim/flag/3.png | Bin 234 -> 234 bytes .../elite_four/anim/floor_light/0.png | Bin 171 -> 171 bytes .../elite_four/anim/floor_light/1.png | Bin 129 -> 129 bytes .../elite_four/anim/wall_lights/0.png | Bin 152 -> 152 bytes .../elite_four/anim/wall_lights/1.png | Bin 152 -> 152 bytes .../elite_four/anim/wall_lights/2.png | Bin 152 -> 152 bytes .../elite_four/anim/wall_lights/3.png | Bin 152 -> 152 bytes .../secondary/ever_grande/anim/flowers/0.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/1.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/2.png | Bin 253 -> 253 bytes .../secondary/ever_grande/anim/flowers/3.png | Bin 255 -> 255 bytes .../secondary/ever_grande/anim/flowers/4.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/5.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/6.png | Bin 254 -> 254 bytes .../secondary/ever_grande/anim/flowers/7.png | Bin 254 -> 254 bytes .../secondary/lavaridge/anim/steam/0.png | Bin 140 -> 153 bytes .../secondary/lavaridge/anim/steam/1.png | Bin 147 -> 160 bytes .../secondary/lavaridge/anim/steam/2.png | Bin 143 -> 156 bytes .../secondary/lavaridge/anim/steam/3.png | Bin 153 -> 166 bytes .../secondary/mauville/anim/flower_1/0.png | Bin 234 -> 234 bytes .../secondary/mauville/anim/flower_1/1.png | Bin 229 -> 229 bytes .../secondary/mauville/anim/flower_1/2.png | Bin 224 -> 224 bytes .../secondary/mauville/anim/flower_1/3.png | Bin 216 -> 216 bytes .../secondary/mauville/anim/flower_1/4.png | Bin 232 -> 232 bytes .../secondary/mauville/anim/flower_2/0.png | Bin 234 -> 234 bytes .../secondary/mauville/anim/flower_2/1.png | Bin 229 -> 229 bytes .../secondary/mauville/anim/flower_2/2.png | Bin 224 -> 224 bytes .../secondary/mauville/anim/flower_2/3.png | Bin 216 -> 216 bytes .../secondary/mauville/anim/flower_2/4.png | Bin 232 -> 232 bytes .../mauville_gym/anim/electric_gates/0.png | Bin 243 -> 256 bytes .../mauville_gym/anim/electric_gates/1.png | Bin 242 -> 255 bytes .../pacifidlog/anim/log_bridges/0.png | Bin 631 -> 631 bytes .../pacifidlog/anim/log_bridges/1.png | Bin 655 -> 655 bytes .../pacifidlog/anim/log_bridges/2.png | Bin 664 -> 664 bytes .../pacifidlog/anim/water_currents/0.png | Bin 263 -> 263 bytes .../pacifidlog/anim/water_currents/1.png | Bin 271 -> 271 bytes .../pacifidlog/anim/water_currents/2.png | Bin 284 -> 284 bytes .../pacifidlog/anim/water_currents/3.png | Bin 266 -> 266 bytes .../pacifidlog/anim/water_currents/4.png | Bin 200 -> 200 bytes .../pacifidlog/anim/water_currents/5.png | Bin 200 -> 200 bytes .../pacifidlog/anim/water_currents/6.png | Bin 200 -> 200 bytes .../pacifidlog/anim/water_currents/7.png | Bin 261 -> 261 bytes .../secondary/rustboro/anim/fountain/0.png | Bin 252 -> 252 bytes .../secondary/rustboro/anim/fountain/1.png | Bin 247 -> 247 bytes .../secondary/rustboro/anim/windy_water/0.png | Bin 180 -> 180 bytes .../secondary/rustboro/anim/windy_water/1.png | Bin 170 -> 170 bytes .../secondary/rustboro/anim/windy_water/2.png | Bin 132 -> 132 bytes .../secondary/rustboro/anim/windy_water/3.png | Bin 132 -> 132 bytes .../secondary/rustboro/anim/windy_water/4.png | Bin 132 -> 132 bytes .../secondary/rustboro/anim/windy_water/5.png | Bin 132 -> 132 bytes .../secondary/rustboro/anim/windy_water/6.png | Bin 132 -> 132 bytes .../secondary/rustboro/anim/windy_water/7.png | Bin 132 -> 132 bytes .../secondary/slateport/anim/balloons/0.png | Bin 227 -> 227 bytes .../secondary/slateport/anim/balloons/1.png | Bin 234 -> 234 bytes .../secondary/slateport/anim/balloons/2.png | Bin 231 -> 231 bytes .../secondary/slateport/anim/balloons/3.png | Bin 234 -> 234 bytes .../sootopolis/anim/stormy_water/0.png | Bin 1135 -> 1135 bytes .../sootopolis/anim/stormy_water/1.png | Bin 1155 -> 1155 bytes .../sootopolis/anim/stormy_water/2.png | Bin 1155 -> 1155 bytes .../sootopolis/anim/stormy_water/3.png | Bin 1112 -> 1112 bytes .../sootopolis/anim/stormy_water/4.png | Bin 1124 -> 1124 bytes .../sootopolis/anim/stormy_water/5.png | Bin 1149 -> 1149 bytes .../sootopolis/anim/stormy_water/6.png | Bin 1097 -> 1097 bytes .../sootopolis/anim/stormy_water/7.png | Bin 1093 -> 1093 bytes .../sootopolis_gym/anim/front_waterfall/0.png | Bin 363 -> 363 bytes .../sootopolis_gym/anim/front_waterfall/1.png | Bin 372 -> 372 bytes .../sootopolis_gym/anim/front_waterfall/2.png | Bin 385 -> 385 bytes .../sootopolis_gym/anim/side_waterfall/0.png | Bin 341 -> 341 bytes .../sootopolis_gym/anim/side_waterfall/1.png | Bin 339 -> 339 bytes .../sootopolis_gym/anim/side_waterfall/2.png | Bin 340 -> 340 bytes .../secondary/underwater/anim/seaweed/0.png | Bin 231 -> 231 bytes .../secondary/underwater/anim/seaweed/1.png | Bin 236 -> 236 bytes .../secondary/underwater/anim/seaweed/2.png | Bin 238 -> 238 bytes .../secondary/underwater/anim/seaweed/3.png | Bin 234 -> 234 bytes 129 files changed, 0 insertions(+), 0 deletions(-) diff --git a/data/tilesets/primary/building/anim/tv_turned_on/0.png b/data/tilesets/primary/building/anim/tv_turned_on/0.png index 1d98f3621c424be43d62cd95fe644ac67f1f72bc..65645fb73cce6885892043ee5762bf20ac33f786 100644 GIT binary patch delta 62 zcmV-E0KxyW0kZ*+DKr280AgZ$l$4as&Bg!!|9g94l$3+Cw4~8~^|S delta 62 zcmV-E0KxyW0kZ*+DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXR$6@?e*gdg diff --git a/data/tilesets/primary/building/anim/tv_turned_on/1.png b/data/tilesets/primary/building/anim/tv_turned_on/1.png index 6798473b72b895b55593417e591f5c5523148649..6ecb516e3bc039b037e946d5e88710756e540bb1 100644 GIT binary patch delta 62 zcmV-E0KxyX0ki>-DKr280AgZ$l$4as&Bg!!|9g94l$3+Cw4~OV delta 62 zcmV-E0KxyX0ki>-DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXS6cWUf&c&j diff --git a/data/tilesets/primary/general/anim/flower/0.png b/data/tilesets/primary/general/anim/flower/0.png index 1254a7655c7c2ea173eb7f4ea17dbb39aad4253e..106b75af5a5d340640b7fb8958eff9c649707c5b 100644 GIT binary patch delta 62 zcmV-E0Kxz70q+5jDKr=5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ffl#85m UbAwu1VnI@K#iST0*%Ogn@FI92TL1t6 delta 62 zcmV-E0Kxyw0?h)DDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX@MrTMPXGV_ diff --git a/data/tilesets/primary/general/anim/land_water_edge/1.png b/data/tilesets/primary/general/anim/land_water_edge/1.png index 48274c9a0af3a4c6ee32b6a38e05e3f62db8f951..75aea1193a11a5ea8b56665a217fdb5b2dfb8d88 100644 GIT binary patch delta 62 zcmV-E0Kxy&0@VVLDKr280RR90)z#I#y}hKQq=SQtL9~OU)x|+ELGIPf-n68>l#85m UbAwu1VnI@K#iST0*%Ogn_$E*xa{vGU delta 62 zcmV-E0Kxy&0@VVLDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX_-o4_X8-^I diff --git a/data/tilesets/primary/general/anim/land_water_edge/2.png b/data/tilesets/primary/general/anim/land_water_edge/2.png index 9e1f98c1bccb9e0787364ec2bf383d8ec1cdcd17..bafda3aa276e632cfc59a05784d957dc57b7f157 100644 GIT binary patch delta 62 zcmV-E0Kxy(0@ebMDKr280RR90)z#I#y}hKQq=SQtL9~OU)x|+ELGIPf-n68>l#85m UbAwu1VnI@K#iST0*%Ogn`6kODb^rhX delta 62 zcmV-E0Kxy(0@ebMDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX`D{iXY5)KL diff --git a/data/tilesets/primary/general/anim/land_water_edge/3.png b/data/tilesets/primary/general/anim/land_water_edge/3.png index c5b446f655e9a7a739dac7c0a49a8e73f8584d4d..8d9645f6b7399511e0dd0ef5739898876bd1bc2a 100644 GIT binary patch delta 63 zcmV-F0Kos~0_XyeDKr280RR90)z#I#y}hKQq=SQtL9~OU)x|+ELGIPf-n68>l#85m VbAwu1VnI@K#iST0*%Pr{3jt4_Ak6>( delta 63 zcmV-F0Kos~0_XyeDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%3jvc29>D+r diff --git a/data/tilesets/primary/general/anim/sand_water_edge/0.png b/data/tilesets/primary/general/anim/sand_water_edge/0.png index 80c99c47397b2136d322cf4a56f9de8efd8b841a..46dcf9088d0ed0e8daa729ea422863dec25b619c 100644 GIT binary patch delta 62 zcmV-E0Kxx*0)qmODKr=rX@%sbN~PV delta 62 zcmV-E0Kxx*0)qmODK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXrbJ~PaR2}S diff --git a/data/tilesets/primary/general/anim/sand_water_edge/1.png b/data/tilesets/primary/general/anim/sand_water_edge/1.png index 52051f056bf2f943e6cc5d01b65f9e9cbb048ed3..4188eefbe39729fb34b4ee6cc4530429c5092255 100644 GIT binary patch delta 62 zcmV-E0KxyI0;K|wDKr=$TglK+5i9m delta 62 zcmV-E0KxyI0;K|wDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX$W*%?*8l(j diff --git a/data/tilesets/primary/general/anim/sand_water_edge/2.png b/data/tilesets/primary/general/anim/sand_water_edge/2.png index 39c6e2f873dabaa99f30db8bab05707e60487d0d..f414a71ae4d2baca95ce74c0e5f8fc45586640ef 100644 GIT binary patch delta 62 zcmV-E0KxyS0(mHG+_y7O^ delta 62 zcmV-E0KxyS0 diff --git a/data/tilesets/primary/general/anim/sand_water_edge/3.png b/data/tilesets/primary/general/anim/sand_water_edge/3.png index abb5ff362e5e59d515681f562a14385fac10be82..0a8fc0514e7ef80618afb61be334afe0ac247303 100644 GIT binary patch delta 62 zcmV-E0Kxyj0>A>0DKr=<3g7sD*ylh delta 62 zcmV-E0Kxyj0>A>0DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX<6*QPC;$Ke diff --git a/data/tilesets/primary/general/anim/sand_water_edge/4.png b/data/tilesets/primary/general/anim/sand_water_edge/4.png index a7bde983714b6a9f682c19e0870a7a381b956adf..202cf97d528a7a149dd05276bda5e2052bb7f24d 100644 GIT binary patch delta 62 zcmV-E0Kxy60+|AkDKr=yf4}!wg3PC delta 62 zcmV-E0Kxy60+|AkDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXyiWHXvj6}9 diff --git a/data/tilesets/primary/general/anim/sand_water_edge/5.png b/data/tilesets/primary/general/anim/sand_water_edge/5.png index 05f88d81e81b39ba73ee3796cdbb0e21958d195e..3f984d0acfbdc95aacf95bb34d652bc0bb66a8b0 100644 GIT binary patch delta 62 zcmV-E0Kxx-0)+yQDKr=s3txldH?_b delta 62 zcmV-E0Kxx-0)+yQDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXs6|^IcK`qY diff --git a/data/tilesets/primary/general/anim/sand_water_edge/6.png b/data/tilesets/primary/general/anim/sand_water_edge/6.png index 01f9c203ded54b8f6d2e5ecda300649bb6b60b8c..9c60501deb380be93ef21adf53e2db64faa1a39c 100644 GIT binary patch delta 62 zcmV-E0KxzH0r>%tDKr=oLvGVQ~&?~ delta 62 zcmV-E0KxzH0r>%tDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXoO~Z2Q2+n{ diff --git a/data/tilesets/primary/general/anim/water/0.png b/data/tilesets/primary/general/anim/water/0.png index d3f2ea0da6cf3a594b2181a57a991df8074e81c8..209b93b291c558d26684a3983bc203ac2c6c726e 100644 GIT binary patch delta 63 zcmaFB@_=Q6rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb P_~?>NVGg_-W0{!%Y~La8 delta 63 zcmV-F0Kos?1mFaaDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%0|Jl|9*|SUn~HM1vu6 delta 63 zcmV-F0Kor?1&alcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%E&^w^9x(s_ diff --git a/data/tilesets/primary/general/anim/water/2.png b/data/tilesets/primary/general/anim/water/2.png index d2302180e20152da5f4e107a0b65d7e053339ae5..28fc4de47151f4b2ff15c03979d10f0f53acb64e 100644 GIT binary patch delta 63 zcmcc0a+PI*rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb Q_~?>NVGg_-V}CFL0BLk0%>V!Z delta 63 zcmV-F0Kos%1l0tPDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%_yLTkAB+G1 diff --git a/data/tilesets/primary/general/anim/water/3.png b/data/tilesets/primary/general/anim/water/3.png index f757f8253ec37f22bd9ad73b7769ee48931d1a01..3440c0970aaef117f12925b801e008be4a7c51b2 100644 GIT binary patch delta 63 zcmaFF@`z=Erip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb P_~?>NVGg_-V_BI1ZQCLB delta 63 zcmV-F0Kos^1mXmcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%1p<){9<%@e diff --git a/data/tilesets/primary/general/anim/water/4.png b/data/tilesets/primary/general/anim/water/4.png index 950b885850e4ac3efb411f22af725a442ed002b8..994d08a12a0392906af82c2936a35a9240a89319 100644 GIT binary patch delta 63 zcmbQnGL2<|rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb Q_~?>NVGg_-V|OwF07`Nq5C8xG delta 63 zcmV-F0Kos21eOGlDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%xdCmZ9?t*( diff --git a/data/tilesets/primary/general/anim/water/5.png b/data/tilesets/primary/general/anim/water/5.png index 4de7d4225e19c73497900fca6f776ef6a4312320..227dbaed885b1b8eb7b0b63ffa0d93f9812c5f43 100644 GIT binary patch delta 63 zcmbQmGK*z`rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb Q_~?>NVGg_-WA`!w08DBk8~^|S delta 63 zcmV-F0Kos61eyepDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%y#a5X9@_u_ diff --git a/data/tilesets/primary/general/anim/water/6.png b/data/tilesets/primary/general/anim/water/6.png index 73c1cabdd22a140682ce56d28dfb88e7c57661cc..05e05510e8c5bf3c45ebed24595c1981b62fe55a 100644 GIT binary patch delta 63 zcmZ3*vWjJbrip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb Q_~?>NVGg_-W6v@I08~mMOaK4? delta 63 zcmV-F0KosM1gZp(DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%%>j3P9}55g diff --git a/data/tilesets/primary/general/anim/water/7.png b/data/tilesets/primary/general/anim/water/7.png index 827fd8b740de1dc9fee739e4b3420409e0d75a45..fa295f8524a2f57d879153b7d3d9c6e4b051ada4 100644 GIT binary patch delta 63 zcmaFD@`PoArip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb P_~?>NVGg_-W7(MiZr36E delta 63 zcmV-F0Kos`1mpyeDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%2Lh4`9=ZSk diff --git a/data/tilesets/primary/general/anim/waterfall/0.png b/data/tilesets/primary/general/anim/waterfall/0.png index e307d81aa7552fc80c4b32c27e171dec42937881..f69a4686b32c436bf9dc9cee744c953ec9ba3a56 100644 GIT binary patch delta 62 zcmX@kc${&9rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb O_~?>NVGg_#W3vD~r6K$P delta 62 zcmV-E0Kxyq0mlK5DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXYGfH6y8r+H diff --git a/data/tilesets/primary/general/anim/waterfall/1.png b/data/tilesets/primary/general/anim/waterfall/1.png index df6aaf3bca791269a23a11eb4e2d4a20c43f97ec..9a3c68c8f4cbb6fb4ec9a9d9ffac64844c10c2d4 100644 GIT binary patch delta 62 zcmcb{c#Uy_rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb O_~?>NVGg_#V=Dnf+9D|c delta 62 zcmV-E0Kxy(0oDPKDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXd23D{=l}o! diff --git a/data/tilesets/primary/general/anim/waterfall/2.png b/data/tilesets/primary/general/anim/waterfall/2.png index 560f89d0663a832552f94a0ca3d03304d26f7e25..4d09e8de9bd5fa0d252f22ae7b6c2ccdec459a18 100644 GIT binary patch delta 62 zcmX@ic$jg5rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb O_~?>NVGg_#W77aTxgqcX delta 62 zcmV-E0Kxym0mA{1DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXW@0TKuK)l5 diff --git a/data/tilesets/primary/general/anim/waterfall/3.png b/data/tilesets/primary/general/anim/waterfall/3.png index a8db289aee32410c3bb2dfd1d466e549536dcbe0..0c50e43fb0559773ae5e3fceef0cadf056f33377 100644 GIT binary patch delta 62 zcmdnbxSw%?rip}R(EtDc?>&3>pW#0Q%~`THDC??Y)LzS=Ihu~$YmPqaUUDz1`6^Jb O_~?>NVGg_#W0L?m%^~Cf delta 62 zcmV-E0Kxyi0lxu|DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXVqifYqW}N^ diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/0.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/0.png index 98f1a928387b0f09e42849d5210d9e4a48746f31..b5621be76ec6cc1aa1ca7eeda66abbc15fce1a72 100644 GIT binary patch delta 62 zcmaFH_>6Iarip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY$pI_lOxms delta 62 zcmV-E0Kxy}0p&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY#RV&A|uNH delta 62 zcmV-E0Kxy`0pkIXDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXhH;G_4*&oF diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/2.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/2.png index 1be9641b86d65feb6b7a0944b7a50b5a542a1a03..e51f5b531217847abbdf0e3874d2e698e5edc278 100644 GIT binary patch delta 62 zcmaFJ_>ggerip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AYzqKnEF;AL delta 62 zcmV-E0Kxy^0pS6VDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXgm9N12><{9 diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/3.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/3.png index 7a536f24c09d696a56d0bb78a51241c7182f0817..3ec6ff703c7eb5017e114b14d4170da2be3dadcc 100644 GIT binary patch delta 62 zcmaFD_=ItSrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY&!sDog>Zw delta 62 zcmV-E0Kxy{0ptOYDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXhjIuX5&!@I diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/0.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/0.png index 98f1a928387b0f09e42849d5210d9e4a48746f31..b5621be76ec6cc1aa1ca7eeda66abbc15fce1a72 100644 GIT binary patch delta 62 zcmaFH_>6Iarip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY$pI_lOxms delta 62 zcmV-E0Kxy}0p&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY#RV&A|uNH delta 62 zcmV-E0Kxy`0pkIXDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXhH;G_4*&oF diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/2.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/2.png index 1be9641b86d65feb6b7a0944b7a50b5a542a1a03..e51f5b531217847abbdf0e3874d2e698e5edc278 100644 GIT binary patch delta 62 zcmaFJ_>ggerip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AYzqKnEF;AL delta 62 zcmV-E0Kxy^0pS6VDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXgm9N12><{9 diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/3.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/3.png index 7a536f24c09d696a56d0bb78a51241c7182f0817..3ec6ff703c7eb5017e114b14d4170da2be3dadcc 100644 GIT binary patch delta 62 zcmaFD_=ItSrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY&!sDog>Zw delta 62 zcmV-E0Kxy{0ptOYDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXhjIuX5&!@I diff --git a/data/tilesets/secondary/battle_pyramid/anim/statue_shadow/0.png b/data/tilesets/secondary/battle_pyramid/anim/statue_shadow/0.png index c135df8246045300fd415fc8a8583990f92b584e..552bdbe0c9f04bd470bb74f16331bfaad104ac0f 100644 GIT binary patch delta 62 zcmV-E0KxyS0 diff --git a/data/tilesets/secondary/battle_pyramid/anim/statue_shadow/1.png b/data/tilesets/secondary/battle_pyramid/anim/statue_shadow/1.png index 2588bdac065914ac1e4cc64094ac12078ffd3915..3b6f481e8813768921a85b4c664cc8884771ffdc 100644 GIT binary patch delta 62 zcmV-E0KxyW0 diff --git a/data/tilesets/secondary/battle_pyramid/anim/torch/0.png b/data/tilesets/secondary/battle_pyramid/anim/torch/0.png index 04bb8ad849a62d6b55ec44f8eaabebef92e5e0bc..4becd1edcfeac71415db40e1f853fff747d77a20 100644 GIT binary patch delta 62 zcmV-E0Kxx>0*L~UDKt3%2vSmNQttLCob~`p|1mLxT2gz9dwaB;d*;P^|K_a!oB*72 UIYCl${|Es8<^WHK=d+PrtV>ZHd;kCd delta 62 zcmV-E0Kxx>0*L~UDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXtVc&4g8%>k diff --git a/data/tilesets/secondary/battle_pyramid/anim/torch/1.png b/data/tilesets/secondary/battle_pyramid/anim/torch/1.png index e292686f98b81527f49b40396eca5952a7e67b1f..91bdf8ac50c85a0a3b3b2710de6f582139ad44d8 100644 GIT binary patch delta 62 zcmV-E0Kxx*0)qmODKt3%2vSmNQttLCob~`p|1mLxT2gz9dwaB;d*;P^|K_a!oB*72 UIYCl${|Es8<^WHK=d+PrrburcY5)KL delta 62 zcmV-E0Kxx*0)qmODK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXrbJ~PaR2}S diff --git a/data/tilesets/secondary/battle_pyramid/anim/torch/2.png b/data/tilesets/secondary/battle_pyramid/anim/torch/2.png index fa24db001c87dc4b2dd6ed801ef2f817cbecb93e..fb6153b4fc005f29754b308013ab455f788a4a67 100644 GIT binary patch delta 62 zcmV-E0KxzM0saAyDKt3%2vSmNQttLCob~`p|1mLxT2gz9dwaB;d*;P^|K_a!oB*72 UIYCl${|Es8<^WHK=d+Prp@NVeSpWb4 delta 62 zcmV-E0KxzM0saAyDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXp?-!RU;qFB diff --git a/data/tilesets/secondary/bike_shop/anim/blinking_lights/0.png b/data/tilesets/secondary/bike_shop/anim/blinking_lights/0.png index 127ed4e47af0f083cfcb98c44d277be3a854f108..f8bafb21b8fe643a3b0470a9be47cf703a74bf7a 100644 GIT binary patch delta 62 zcmV-E0KxyF0-^$tDKr280RR8y-rmKuw4{4`YC%eB)$XK})q8`ads>`Q?!AlVoI$j6 UL5pfZoU}@;|2bhl4wjK!#p$ykJpcdz delta 62 zcmV-E0KxyF0-^$tDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX#ZyWi&Hw-a diff --git a/data/tilesets/secondary/bike_shop/anim/blinking_lights/1.png b/data/tilesets/secondary/bike_shop/anim/blinking_lights/1.png index 71f12a74608b0b12568318934e1db9e25b62f5bb..d5e22861d527ba02d03d74b18eddb6891aa07f35 100644 GIT binary patch delta 62 zcmV-E0KxyB0-gepDKr280RR8y-rmKuw4{4`YC%eB)$XK})q8`ads>`Q?!AlVoI$j6 UL5pfZoU}@;|2bhl4wjK!!RN;yF#rGn delta 62 zcmV-E0KxyB0-gepDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX!BJiw!TxR!B(rU?TB!`ZV-)~xBC(p_9!?DfCc@maCsmZYd9K|yB?8KxLAe3Ov)HU+2( N3M$xsW=@O^000wB7Q+Al delta 62 zcmV-E0KxyQ0j&X$DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXP*rU?TB!`ZV-)~xBC(p_9!?DfCc@maCsmZYd9K|yB?8KxLAe3Ov)HU+2( N3M$xsW=@O^0ss_47Rdkr delta 62 zcmV-E0KxyS0j~j&DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXQdp55a{vGU diff --git a/data/tilesets/secondary/cave/anim/lava/4.png b/data/tilesets/secondary/cave/anim/lava/4.png index cea6ece8573814ce8f6e59e64485e80424f0932b..a3d77615aae9080e2d27d57c27187f5affadd235 100644 GIT binary patch delta 62 zcmbQsIG1sPrU?TB!`ZV-)~xBC(p_9!?DfCc@maCsmZYd9K|yB?8KxLAe3Ov)HU+2( N3M$xsW=@QC000Y}7Lxz~ delta 62 zcmV-E0KxyA0i6MmDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXKu_x)Jpcdz diff --git a/data/tilesets/secondary/cave/anim/lava/5.png b/data/tilesets/secondary/cave/anim/lava/5.png index 01d8a300ab6e8a498d20b2969e2621fb9d35bfca..c1469938af03ba9f4b59492a258f6491df2d092c 100644 GIT binary patch delta 62 zcmdnUxRG&!rU?TB!`ZV-)~xBC(p_9!?DfCc@maCsmZYd9K|yB?8KxLAe3Ov)HU+2( N3M$xsW=@O^0RR;_7S8|x delta 62 zcmV-E0KxyU0kHv)DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXR9S}}c>n+a diff --git a/data/tilesets/secondary/cave/anim/lava/6.png b/data/tilesets/secondary/cave/anim/lava/6.png index ba13bda8cc55b91fa76f620698de9cfe925b442b..41afe9d1fac8d07d28c76f49ea97a4650f1178db 100644 GIT binary patch delta 62 zcmZ3>xR!B(rU?TB!`ZV-)~xBC(p_9!?DfCc@maCsmZYd9K|yB?8KxLAe3Ov)HU+2( N3M$xsW=@O^000wB7Q+Al delta 62 zcmV-E0KxyQ0j&X$DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXP*0p00p0Px# diff --git a/data/tilesets/secondary/elite_four/anim/wall_lights/0.png b/data/tilesets/secondary/elite_four/anim/wall_lights/0.png index 108a2099be48e6da116df82ff935c7125bf8c1f0..3ce30e90b3caa7212f6ef19afd5b473256ea76da 100644 GIT binary patch delta 62 zcmV-E0Kxy50hj@hDKui7#X(AHl$@N+-tPbZ|MtC7_F^%tQbF$K0DHyuO0?BMd!#XH Ud&R}Y|E!CYy|g+eXnv7hJ1!+6Qvd(} delta 62 zcmV-E0Kxy50hj@hDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXJ57WhE&u=k diff --git a/data/tilesets/secondary/elite_four/anim/wall_lights/1.png b/data/tilesets/secondary/elite_four/anim/wall_lights/1.png index 64b23f06139ef86f6db57805183930c15c687475..d28ff551522ffc358b2ae8634ae32c16058b1d43 100644 GIT binary patch delta 62 zcmV-E0Kxy50hj@hDKui7#X(AHl$@N+-tPbZ|MtC7_F^%tQbF$K0DHyuO0?BMd!#XH Ud&R}Y|E!CYy|g+eXnv7hJ1!+6Qvd(} delta 62 zcmV-E0Kxy50hj@hDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXJ57WhE&u=k diff --git a/data/tilesets/secondary/elite_four/anim/wall_lights/2.png b/data/tilesets/secondary/elite_four/anim/wall_lights/2.png index 0d9f603fc3db4421a22af6e716ed48ad683e1ba0..9a18c5c46fbec34863f89292f16b87e6490113f3 100644 GIT binary patch delta 62 zcmV-E0Kxy50hj@hDKui7#X(AHl$@N+-tPbZ|MtC7_F^%tQbF$K0DHyuO0?BMd!#XH Ud&R}Y|E!CYy|g+eXnv7hJ1!+6Qvd(} delta 62 zcmV-E0Kxy50hj@hDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXJ57WhE&u=k diff --git a/data/tilesets/secondary/elite_four/anim/wall_lights/3.png b/data/tilesets/secondary/elite_four/anim/wall_lights/3.png index 64b23f06139ef86f6db57805183930c15c687475..d28ff551522ffc358b2ae8634ae32c16058b1d43 100644 GIT binary patch delta 62 zcmV-E0Kxy50hj@hDKui7#X(AHl$@N+-tPbZ|MtC7_F^%tQbF$K0DHyuO0?BMd!#XH Ud&R}Y|E!CYy|g+eXnv7hJ1!+6Qvd(} delta 62 zcmV-E0Kxy50hj@hDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXJ57WhE&u=k diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/0.png b/data/tilesets/secondary/ever_grande/anim/flowers/0.png index ac03df40bbcf2203484f12bd27721b377d24f13a..6493e2e8217eaeef04ad9798ef20816610ebe025 100644 GIT binary patch delta 62 zcmV-E0Kxx(0)YaMDKr=5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff<{9 delta 62 zcmV-E0KxzL0sR4xDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXpneMt<8 diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/3.png b/data/tilesets/secondary/ever_grande/anim/flowers/3.png index f120dee16e0898dfee858bf3e66ed8be1d1d21f2..edc7220b8fecd4939433a784ddadb90ea7598fba 100644 GIT binary patch delta 62 zcmV-E0KxzN0sjGzDKr=5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff4*&oF delta 62 zcmV-E0KxzN0sjGzDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXqJIG&V*mgE diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/4.png b/data/tilesets/secondary/ever_grande/anim/flowers/4.png index ac03df40bbcf2203484f12bd27721b377d24f13a..6493e2e8217eaeef04ad9798ef20816610ebe025 100644 GIT binary patch delta 62 zcmV-E0Kxx(0)YaMDKr=5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff^*a3;+NC delta 62 zcmV-E0KxzM0saAyDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXp?-!RU;qFB diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/7.png b/data/tilesets/secondary/ever_grande/anim/flowers/7.png index d7cfd452941f4eaaf87d6aca5a3538d8d87b4fa8..4d43dfd0a9d6c1de80dd68476f017fcc0e91ea56 100644 GIT binary patch delta 62 zcmV-E0KxzM0saAyDKr=5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-ww%ff^*a3;+NC delta 62 zcmV-E0KxzM0saAyDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXp?-!RU;qFB diff --git a/data/tilesets/secondary/lavaridge/anim/steam/0.png b/data/tilesets/secondary/lavaridge/anim/steam/0.png index 434041fbd8a974762b23803736cf26b8bd8e3792..adf450afd721e470cd607650e9ee7a6c64a6ead3 100644 GIT binary patch delta 75 zcmeBSoXI#r)A4AM<^TWx?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ fUd3yQk1m;KFZhgsfq}6k$S;_|;n|I}iLv?sNo6Nu delta 62 zcmV-E0Kxy60gM5VDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkFG~O(Bme*a diff --git a/data/tilesets/secondary/lavaridge/anim/steam/1.png b/data/tilesets/secondary/lavaridge/anim/steam/1.png index ebc028ed49574458ed0360d2d3bd31d66ddbae35..df7ad341957523b51dbcfb6b00a5ed811bbc3f75 100644 GIT binary patch delta 75 zcmbQtxPWnjrsL5h%m4rX-+T6M@7ZT_w%luO?oLXocJ#{n&+xx^@3*8i??B{|dqLet fy^7ZqA6+ufUho+M0|R48kY6x^!?PP{6JyN)O?W4F delta 62 zcmV-E0KxyD0h0lcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkHcnk0IRF3v diff --git a/data/tilesets/secondary/lavaridge/anim/steam/2.png b/data/tilesets/secondary/lavaridge/anim/steam/2.png index aee227f05db4c7281442141750ccb840d9beae46..2a8c8a28cadd39addc35d7296114e96c92160615 100644 GIT binary patch delta 75 zcmeBYoWnRl)A4AM<^TWx?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ fUd3yQk1m;KFZhgsfq}6k$S;_|;n|I}iLpiiOC%?2 delta 62 zcmV-E0Kxy90gnNYDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkGE8wEEdT%j diff --git a/data/tilesets/secondary/lavaridge/anim/steam/3.png b/data/tilesets/secondary/lavaridge/anim/steam/3.png index 99149ae625c0292f2c1ff055bb4cf0e90adffb33..8dcaa6c82ce5460004ca599797b462733a977922 100644 GIT binary patch delta 75 zcmbQqxQuavrsL5h%m4rX-+T6M@7ZT_w%luO?oLXocJ#{n&+xx^@3*8i??B{|dqLet fy^7ZqA6+ufUho+M0|R48kY6x^!?PP{6Ju=vQ1&N@ delta 62 zcmV-E0KxyJ0hs}iDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkJW)R$O8@`> diff --git a/data/tilesets/secondary/mauville/anim/flower_1/0.png b/data/tilesets/secondary/mauville/anim/flower_1/0.png index b20c5470ee26c6d96e5a2e52e025071ea207ddb7..263dba07005dcc43d5e370683470e641ec9071dc 100644 GIT binary patch delta 62 zcmV-E0Kxz20qOyeDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&jjZe*(EtDd delta 62 zcmV-E0Kxz20qOyeDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXjdbcCBme*a diff --git a/data/tilesets/secondary/mauville/anim/flower_1/1.png b/data/tilesets/secondary/mauville/anim/flower_1/1.png index 0587295fc5925a9c080f9b7691c4acf203373834..66179f13ddb7dc36b7aca8f1009bccbaf2d2423a 100644 GIT binary patch delta 62 zcmV-E0Kxy|0p$UZDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&h^mDi!T5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&gQy-Jvj6}9 delta 62 zcmV-E0Kxy@0pJ0UDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXgK!)l1^@s6 diff --git a/data/tilesets/secondary/mauville/anim/flower_1/3.png b/data/tilesets/secondary/mauville/anim/flower_1/3.png index bc132f2ef534edc05cc17653f3f16d436e972597..b1015d370bd22dcb8b04909c86c127c82300ce73 100644 GIT binary patch delta 62 zcmV-E0Kxy*0oVbMDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&d!$Aln*aa+ delta 62 zcmV-E0Kxy*0oVbMDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXdu&7=?f?J) diff --git a/data/tilesets/secondary/mauville/anim/flower_1/4.png b/data/tilesets/secondary/mauville/anim/flower_1/4.png index 911b980a3c648015665f0f4969ccf87e7e550c0c..1e8cb84afec50d85cd062fdddf380b8507150bc4 100644 GIT binary patch delta 62 zcmV-E0Kxz00q6mcDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&i>vk?%K!iX delta 62 zcmV-E0Kxz00q6mcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXi*xiJ9smFU diff --git a/data/tilesets/secondary/mauville/anim/flower_2/0.png b/data/tilesets/secondary/mauville/anim/flower_2/0.png index b20c5470ee26c6d96e5a2e52e025071ea207ddb7..263dba07005dcc43d5e370683470e641ec9071dc 100644 GIT binary patch delta 62 zcmV-E0Kxz20qOyeDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&jjZe*(EtDd delta 62 zcmV-E0Kxz20qOyeDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXjdbcCBme*a diff --git a/data/tilesets/secondary/mauville/anim/flower_2/1.png b/data/tilesets/secondary/mauville/anim/flower_2/1.png index 0587295fc5925a9c080f9b7691c4acf203373834..66179f13ddb7dc36b7aca8f1009bccbaf2d2423a 100644 GIT binary patch delta 62 zcmV-E0Kxy|0p$UZDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&h^mDi!T5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&gQy-Jvj6}9 delta 62 zcmV-E0Kxy@0pJ0UDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXgK!)l1^@s6 diff --git a/data/tilesets/secondary/mauville/anim/flower_2/3.png b/data/tilesets/secondary/mauville/anim/flower_2/3.png index bc132f2ef534edc05cc17653f3f16d436e972597..b1015d370bd22dcb8b04909c86c127c82300ce73 100644 GIT binary patch delta 62 zcmV-E0Kxy*0oVbMDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&d!$Aln*aa+ delta 62 zcmV-E0Kxy*0oVbMDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXdu&7=?f?J) diff --git a/data/tilesets/secondary/mauville/anim/flower_2/4.png b/data/tilesets/secondary/mauville/anim/flower_2/4.png index 911b980a3c648015665f0f4969ccf87e7e550c0c..1e8cb84afec50d85cd062fdddf380b8507150bc4 100644 GIT binary patch delta 62 zcmV-E0Kxz00q6mcDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&i>vk?%K!iX delta 62 zcmV-E0Kxz00q6mcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXi*xiJ9smFU diff --git a/data/tilesets/secondary/mauville_gym/anim/electric_gates/0.png b/data/tilesets/secondary/mauville_gym/anim/electric_gates/0.png index ebf603978cc14bfa71786761a3b17e5da72c3c1e..91659efd1a3254050898a62dc7f77848e4259455 100644 GIT binary patch delta 75 vcmey&*uXSF)3JKXUItv?|9=LrEHue;+Wu)kA;yv*zhDN3XE)L&#!dqO*y|1r delta 62 zcmV-E0Kxx&0`mcoDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkmR-6Y+5i9m diff --git a/data/tilesets/secondary/mauville_gym/anim/electric_gates/1.png b/data/tilesets/secondary/mauville_gym/anim/electric_gates/1.png index 34072707ff6e87c68c2d028ee461310f37920faf..f766cc8e5ea085bb95e7bae4a2fc04eeb807765d 100644 GIT binary patch delta 75 vcmeyw_@8ltrepP%y$ra(|NjhLS!j~ywEfe7LX0Ire!&b5&u*kmjGYPq{EiNZ delta 62 zcmV-E0KxzN0rCNmDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwkm3#spRsaA1 diff --git a/data/tilesets/secondary/pacifidlog/anim/log_bridges/0.png b/data/tilesets/secondary/pacifidlog/anim/log_bridges/0.png index 316eb500e3a9d2617a332428d02d3581e3ca88ec..f7aa47448a46fa18710c0c108d6d0752bdc4f3d9 100644 GIT binary patch delta 63 zcmey)@||UZrU?TB!~g&P?>&3B=IFETCHJzLuLfmZb@a+oPzZYWY{|Q$NoVI+E~%Et TveX2s1WE;OmR*DG#Cr=*P delta 63 zcmV-F0KotE1os4xDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%8UmYS9`gVI diff --git a/data/tilesets/secondary/pacifidlog/anim/log_bridges/1.png b/data/tilesets/secondary/pacifidlog/anim/log_bridges/1.png index ee9d4316e11ceee8fffb03ab3fd14a9b081feb98..d0ae0b0a51a7864a3f2cc40510f358e5cc86848a 100644 GIT binary patch delta 63 zcmeBY?Pr~!X~Mw3@c;k+d(YmjIr^-7$-S)Rt3g>;9lf#?6oTG8Tk`H`(%CtdOR6QZ TEH!~Dfl@)SCzfoCHDUq)^@<)N delta 63 zcmV-F0Kor`1&;-gDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%G6HF?9z6g6 diff --git a/data/tilesets/secondary/pacifidlog/anim/log_bridges/2.png b/data/tilesets/secondary/pacifidlog/anim/log_bridges/2.png index 221a715854e68973205c345942ebf61767d66ac5..014654cf6471c302cf90315ee80d62822c7951af 100644 GIT binary patch delta 63 zcmbQiI)inBrU?TB!~g&P?>&3B=IFETCHJzLuLfmZb@a+oPzZYWY{|Q$NoVI+E~%Et TveX2s1WE;Om)|v?b`S>0_ delta 63 zcmV-F0Kos41(*epDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%I|6PT9#{YX diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/0.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/0.png index 6d432eb25cb95188cf911fc61187dff3403767ed..6b692db41f95995d0b3a0972b4c0155d9b934157 100644 GIT binary patch delta 62 zcmZo?YG<0DX(FK+^#A|=d(YneXZR0CL0MNFqxM<`Eiv?(vgYWs?j`rKny&%{i;ph3 LdSsXS#Mo5;DYPR7 delta 62 zcmV-E0Kxx<0*3;SDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXszy;BeESvmuX(FK+^#A|=d(YneXZR0CL0MNFqxM<`Eiv?(vgYWs?j`rKny&%{i;ph3 LdSsXS#Mn&$EsP@` delta 62 zcmV-E0Kxx{0*?ZaDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXvPvl)l>h($ diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/2.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/2.png index 2a11e5065eb3898ba3da68641e1d1e75e7a3cc11..bf4c33de944c229e77f3d16a425423336687009b 100644 GIT binary patch delta 62 zcmbQkG>2(|rip}R(EtDc?>&3>pW#0o1!Y}zjM{4%w8YSB%9^9kx|iI`YQ72-EIzvA M>XBXQ6Jz%S05i)YMF0Q* delta 62 zcmV-E0Kxy90-OSnDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXzffo%yZ`_I diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/3.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/3.png index be4089ff40de4dc94f2d13c2fcfd0a4c07fb4dc0..67b816d3875597418fcf995c3572a4c4f4a0a075 100644 GIT binary patch delta 62 zcmeBT>SCIpX(FK+^#A|=d(YneXZR0CL0MNFqxM<`Eiv?(vgYWs?j`rKny&%{i;ph3 LdSsXS#Mrd}D&3>pW#0o1!Y}zjM{4%w8YSB%9^9kx|iI`YQ72-EIzvA L>XBXQ6JxUhNB1K~ delta 62 zcmV-E0Kxyr0muQ6DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXYh;ujz5oCK diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/5.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/5.png index 93bbc63750b4e3aeb32c69a38896351c6e1293bb..eee9756e302ec3bcc27a8fd19251d6d4568a41ae 100644 GIT binary patch delta 62 zcmX@Xc!F_)rip}R(EtDc?>&3>pW#0o1!Y}zjM{4%w8YSB%9^9kx|iI`YQ72-EIzvA L>XBXQ6JxUhNB1K~ delta 62 zcmV-E0Kxyr0muQ6DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXYh;ujz5oCK diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/6.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/6.png index b08f5a0d976bc48c45a48493e0f85665fc75a043..1ba88117fda5d9b15505d22bbd3e29c5960fccc3 100644 GIT binary patch delta 62 zcmX@Xc!F_)rip}R(EtDc?>&3>pW#0o1!Y}zjM{4%w8YSB%9^9kx|iI`YQ72-EIzvA L>XBXQ6JxUhNB1K~ delta 62 zcmV-E0Kxyr0muQ6DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXYh;ujz5oCK diff --git a/data/tilesets/secondary/pacifidlog/anim/water_currents/7.png b/data/tilesets/secondary/pacifidlog/anim/water_currents/7.png index 1a5f0ae5c4d048553b5132e857fc5cd8bac61fce..2c3c079b90d4f8a43fc623466f1fad06babe6d37 100644 GIT binary patch delta 62 zcmZo=YGs~r_5kfW@7Zrrb+S9CIA2bzjyE6nk{>~r_5kfW@7 diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/0.png b/data/tilesets/secondary/rustboro/anim/windy_water/0.png index af00b97c7942a22c4d94d3272fa51033485397dc..2e648b8348f2d6c8fd3d6245be1281d94d77a73e 100644 GIT binary patch delta 62 zcmdnOxP@_orb+S9CIA2bzxV9j-m}l-DK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXS6cWUf&c&j diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/1.png b/data/tilesets/secondary/rustboro/anim/windy_water/1.png index 20b1ef630ab3daa630ba0add04d4114d3bf0b9c5..143e9d12d5dc6c1acc33e9965222e8b824571c63 100644 GIT binary patch delta 62 zcmZ3*xQcOtrb+S9CIA2bzxV9j-m}lpF diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/2.png b/data/tilesets/secondary/rustboro/anim/windy_water/2.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/3.png b/data/tilesets/secondary/rustboro/anim/windy_water/3.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/4.png b/data/tilesets/secondary/rustboro/anim/windy_water/4.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/5.png b/data/tilesets/secondary/rustboro/anim/windy_water/5.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/6.png b/data/tilesets/secondary/rustboro/anim/windy_water/6.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/rustboro/anim/windy_water/7.png b/data/tilesets/secondary/rustboro/anim/windy_water/7.png index 44c4b2cdc273c0231983b6808fc9bea28192731d..94820fcb0f98edf6d023803c38dbfb2d583fc4c6 100644 GIT binary patch delta 62 zcmZo+Y+;&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ RUd3yGihr3lhfa)D2LOK|BohDt delta 62 zcmV-E0Kxx+0fYgNDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXCqw8R@&Et; diff --git a/data/tilesets/secondary/slateport/anim/balloons/0.png b/data/tilesets/secondary/slateport/anim/balloons/0.png index 28bf60f26a9a602b467f4a481a2e15a4ef38e59f..eb98084677b77d6e296fcd24f82bac82473877cf 100644 GIT binary patch delta 62 zcmV-E0Kxy`0pkIXDKr=-3$y2-NoH&mfZX1<#^A_@~D^L8ZXT$UYbGO TN4<*I0A-^+4IDSds<8k7GP@XO delta 63 zcmV-F0Kor)34;lcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%CIn@$9wPt% diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/2.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/2.png index 85598e14598d9e83f098924e64b0dd81b3694d6b..aaaabb7b4e418ddd69404c9d86e0bf0e5ad6df21 100644 GIT binary patch delta 63 zcmZqXZ04MxX;OT2Nq2Epaa2&0qvM(>-3$y2-NoH&mfZX1<#^A_@~D^L8ZXT$UYbGO TN4<*I0A-^+4IDSds<8k7GP@XO delta 63 zcmV-F0Kor)34;lcDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%CIn@$9wPt% diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/3.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/3.png index c7aad10c7dd4c00b184e991787a6ea8bb2b8096e..8010dc5b776cb3a6790ccae9bde8c1d21d53cebe 100644 GIT binary patch delta 63 zcmcb?af4%mrb+S9CEdkY#Zf^~j*e@lbTcq8bQgE8S#s~2m*YJz%cEX~YrHh4cxeW8 TAN49;1C)*SG;rJ)`NmDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%2LzM!9>f3u diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/5.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/5.png index cbe1769c08f7b9c87b879cd37897afcead822276..3439d90d0c8fb226d4e1260dccbf2c0423b6f295 100644 GIT binary patch delta 63 zcmey%@t0$Qrb+S9CEdkY#Zf^~j*e@lbTcq8bQgE8S#s~2m*YJz%cEX~YrHh4cxeW8 TAN49;1C)*SG;rJ)tH1&PZA}?d delta 63 zcmV-F0KotK2>l3;s6YA94Ty diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/7.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/7.png index e4026a02f82a9e1e3d58e80deba3979b03c24e28..fe921b21a9e5c9cbdf58ee7f9570bb56052b89e1 100644 GIT binary patch delta 63 zcmX@gag<|%rb+S9CEdkY#Zf^~j*e@lbTcq8bQgE8S#s~2m*YJz%cEX~YrHh4cxeW8 TAN49;1C)*SG;rJ)`+^w&Q@k0f delta 63 zcmV-F0Kosn2*n7HDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%=mUnaA7%gm diff --git a/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/0.png b/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/0.png index dc6cf500e1f4b4d15a1b5f2b731a35ccad5bfe09..edac313cab89a5b315100e264db5b31f97b64ad8 100644 GIT binary patch delta 63 zcmV-F0Kot20_y^hDKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Vz3$$m&Bcqow0qX}$u6;74gn6HCy4+6 delta 63 zcmV-F0Kot20_y^hDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%4gr*h9?Ad! diff --git a/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/1.png b/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/1.png index 93dd79753022da4b91b3e156198401890008fa96..83adf5f3ea6f61357b0f9ae720bf79aca4d4c521 100644 GIT binary patch delta 63 zcmV-F0KotB0`vlqDKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Vz3$$m&Bcqow0qX}$u6;77XcFtC!_!X delta 63 zcmV-F0KotB0`vlqDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%7Xg^{9_0W4 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/2.png b/data/tilesets/secondary/sootopolis_gym/anim/front_waterfall/2.png index 30961482cb0e0636aa79e391510070a92748f153..0f4daa7a55ce5d720621495e2cb198d79a676197 100644 GIT binary patch delta 63 zcmV-F0Kor&1AzmODKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Vz3$$m&Bcqow0qX}$u6;7BmvvqCd~i< delta 63 zcmV-F0Kor&1AzmODK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw VF(4oy5D*Xm002Yu;rg*%BmrU79u5Ei diff --git a/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/0.png b/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/0.png index 180b5522eda19be459e08a320206161c0d5d5b11..75b24e1c5c452386830725807bb8ce49f688e1f8 100644 GIT binary patch delta 62 zcmV-E0Kxy&0@VVLDKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Uz3$$m&Bcqow0qX}$u5yy_}vsJCIA2c delta 62 zcmV-E0Kxy&0@VVLDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX_-o4_X8-^I diff --git a/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/1.png b/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/1.png index af3ab12d2e64dbeb2df3e1708e4a09d1aab4c29e..e24fc8ab27b71141cc9db7fc52c811ec9a0fd43f 100644 GIT binary patch delta 62 zcmV-E0Kxy$0@DJJDKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Uz3$$m&Bcqow0qX}$u5yy_S_yQAOHXW delta 62 zcmV-E0Kxy$0@DJJDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX_G;B1VE_OC diff --git a/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/2.png b/data/tilesets/secondary/sootopolis_gym/anim/side_waterfall/2.png index 8481c0cde88d1ffe64d992b05a4cd9143fe297d7..1a1e4114d0ab9964a8afb0cf4927b2d1e292e225 100644 GIT binary patch delta 62 zcmV-E0Kxy%0@MPKDKvYuz5oCJ)$Z=B-sXeN-derYIjqgi&Bc_Ilwx9gK}u?*oMQIw Uz3$$m&Bcqow0qX}$u5yy_uQE%BLDyZ delta 62 zcmV-E0Kxy%0@MPKDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwX_iIoeWB>pF diff --git a/data/tilesets/secondary/underwater/anim/seaweed/0.png b/data/tilesets/secondary/underwater/anim/seaweed/0.png index fab28e54f32345432f244313960c13cf014f0fe2..0bc01624f8232113a8170b75e0b2c9e1d19f3626 100644 GIT binary patch delta 62 zcmaFP_?&TqrU?TBL-UfeNzH4#lBO6sR{v-C4?&uSQ4mJ4*VQ1+y_Nz?6d1ZStKXe+ K{ckWawhI7i>Kw!X delta 62 zcmV-E0Kxy~0p|gbDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXigS4%8vpOUcrU?TBL-UfeNzH4#lBO6sR{v-C4?&uSQ4mJ4*VQ1+y_Nz?6d1ZStKXe+ K{ckWab|L_7M;zGz delta 62 zcmV-E0Kxz60qy~iDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXk#^P}FaQ7m diff --git a/data/tilesets/secondary/underwater/anim/seaweed/3.png b/data/tilesets/secondary/underwater/anim/seaweed/3.png index 0c13920112ead944564c2457e10e8f3530851235..28b0081ff0edc572bb4e624da7dddaec5c091a5a 100644 GIT binary patch delta 62 zcmaFG_=<6YrU?TBL-UfeNzH4#lBO6sR{v-C4?&uSQ4mJ4*VQ1+y_Nz?6d1ZStKXe+ K{ckWawif_wTO7>* delta 62 zcmV-E0Kxz20qOyeDK!88|L*SY-rnBL&CR{Ny{xRPoSdACi;Ht}b7Ep*Qc_YuK|wJw UF(4oy5D*Xm002Yu;rfwXjdbcCBme*a From 055d13fa3897167a1bd11f7d9ef1cbed8eef6c09 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 4 Apr 2020 16:09:36 -0400 Subject: [PATCH 19/34] Bump devkitARM --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e9964105e..8d39be503 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,10 @@ cache: apt: true install: - pushd $HOME - - travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r50/devkitARM_r50-linux.tar.xz + - travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r52/devkitARM_r52-linux.tar.xz - tar xJf devkitARM*.tar.xz + - travis_retry wget https://github.com/devkitPro/devkitarm-rules/releases/download/v1.0.0/devkitarm-rules-1.0.0.tar.xz + - tar xJf devkitarm-rules-*.tar.xz -C $DEVKITARM - travis_retry git clone https://github.com/pret/agbcc.git - cd agbcc && ./build.sh && ./install.sh $TRAVIS_BUILD_DIR - popd From 8853588af07169ac61a5fe22ab928d94c92a05ea Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 8 Apr 2020 16:24:30 -0400 Subject: [PATCH 20/34] Sync digit_obj_util --- include/digit_obj_util.h | 26 +++ include/rom_8034C54.h | 26 --- ld_script.txt | 4 +- src/battle_bg.c | 19 ++ src/berry_crush.c | 44 ++-- src/digit_obj_util.c | 450 ++++++++++++++++++++++++++++++++++++++ src/pokemon_jump.c | 28 +-- src/rom_8034C54.c | 453 --------------------------------------- src/rom_81520A8.c | 4 +- sym_bss.txt | 2 +- sym_ewram.txt | 2 +- 11 files changed, 537 insertions(+), 521 deletions(-) create mode 100644 include/digit_obj_util.h delete mode 100644 include/rom_8034C54.h create mode 100644 src/digit_obj_util.c delete mode 100644 src/rom_8034C54.c diff --git a/include/digit_obj_util.h b/include/digit_obj_util.h new file mode 100644 index 000000000..aca97e2c7 --- /dev/null +++ b/include/digit_obj_util.h @@ -0,0 +1,26 @@ +#ifndef GUARD_DIGIT_OBJ_UTIL_H +#define GUARD_DIGIT_OBJ_UTIL_H + +struct DigitObjUtilTemplate +{ + u8 strConvMode:2; + u8 shape:2; + u8 size:2; + u8 priority:2; + u8 oamCount; + u8 xDelta; + s16 x; + s16 y; + const struct SpriteSheet *spriteSheet; + const struct SpritePalette *spritePal; +}; + +bool32 DigitObjUtil_Init(u32 count); +void DigitObjUtil_Free(void); +bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template); +void DigitObjUtil_PrintNumOn(u32 id, s32 arg1); +void DigitObjUtil_DeletePrinter(u32 id); +void DigitObjUtil_HideOrShow(u32 id, bool32 arg1); +u8 GetTilesPerImage(u32 shape, u32 size); + +#endif // GUARD_DIGIT_OBJ_UTIL_H diff --git a/include/rom_8034C54.h b/include/rom_8034C54.h deleted file mode 100644 index 4da324dd1..000000000 --- a/include/rom_8034C54.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef GUARD_ROM_8034C54_H -#define GUARD_ROM_8034C54_H - -struct UnkStruct3 -{ - u8 field_0_0:2; - u8 shape:2; - u8 size:2; - u8 priority:2; - u8 field_1; - u8 xDelta; - s16 x; - s16 y; - const struct SpriteSheet *spriteSheet; - const struct SpritePalette *spritePal; -}; - -bool32 sub_8034C54(u32 count); -void sub_8034CC8(void); -bool32 sub_8034D14(u32 id, s32 arg1, const struct UnkStruct3 *arg2); -void sub_8035044(u32 id, s32 arg1); -void sub_80353DC(u32 id); -void sub_803547C(u32 id, bool32 arg1); -u8 sub_80355F8(u32 shape, u32 size); - -#endif // GUARD_ROM_8034C54_H diff --git a/ld_script.txt b/ld_script.txt index 1c4db64cc..c98eb6442 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -81,7 +81,7 @@ SECTIONS { src/main_menu.o(.text); src/battle_controllers.o(.text); src/decompress.o(.text); - src/rom_8034C54.o(.text); + src/digit_obj_util.o(.text); src/battle_bg.o(.text); src/battle_main.o(.text); src/battle_util.o(.text); @@ -463,7 +463,7 @@ SECTIONS { src/rtc.o(.rodata); src/main_menu.o(.rodata); src/battle_controllers.o(.rodata); - src/rom_8034C54.o(.rodata); + src/digit_obj_util.o(.rodata); src/data.o(.rodata); src/battle_bg.o(.rodata); src/battle_main.o(.rodata); diff --git a/src/battle_bg.c b/src/battle_bg.c index 01d05e68d..00c504bfd 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -691,6 +691,25 @@ static const struct BattleBackground gBattleTerrainTable[] = }, }; +static void sub_8035648(void); + +// Unused +static void sub_8035608(void) +{ + u8 spriteId; + + ResetSpriteData(); + spriteId = CreateSprite(&gUnknown_0831AC88, 0, 0, 0); + gSprites[spriteId].invisible = TRUE; + SetMainCallback2(sub_8035648); +} + +static void sub_8035648(void) +{ + AnimateSprites(); + BuildOamBuffer(); +} + void BattleInitBgsAndWindows(void) { ResetBgsAndClearDma3BusyFlags(0); diff --git a/src/berry_crush.c b/src/berry_crush.c index 542888631..0985fce9a 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -21,7 +21,7 @@ #include "palette.h" #include "pokemon_jump.h" #include "random.h" -#include "rom_8034C54.h" +#include "digit_obj_util.h" #include "save.h" #include "scanline_effect.h" #include "script.h" @@ -714,14 +714,14 @@ static const struct SpriteTemplate gUnknown_082F436C = .callback = SpriteCallbackDummy }; -static const struct UnkStruct3 gUnknown_082F4384[] = +static const struct DigitObjUtilTemplate gUnknown_082F4384[] = { { - .field_0_0 = 1, + .strConvMode = 1, .shape = 2, .size = 0, .priority = 0, - .field_1 = 2, + .oamCount = 2, .xDelta = 8, .x = 156, .y = 0, @@ -729,11 +729,11 @@ static const struct UnkStruct3 gUnknown_082F4384[] = .spritePal = gUnknown_082F422C, }, { - .field_0_0 = 0, + .strConvMode = 0, .shape = 2, .size = 0, .priority = 0, - .field_1 = 2, + .oamCount = 2, .xDelta = 8, .x = 180, .y = 0, @@ -741,11 +741,11 @@ static const struct UnkStruct3 gUnknown_082F4384[] = .spritePal = gUnknown_082F422C, }, { - .field_0_0 = 0, + .strConvMode = 0, .shape = 2, .size = 0, .priority = 0, - .field_1 = 2, + .oamCount = 2, .xDelta = 8, .x = 204, .y = 0, @@ -1036,7 +1036,7 @@ int sub_802104C(void) case 1: CpuFill16(0, (void *)OAM, OAM_SIZE); gReservedSpritePaletteCount = 0; - sub_8034C54(3); + DigitObjUtil_Init(3); break; case 2: ResetPaletteFade(); @@ -1165,7 +1165,7 @@ int sub_802130C(void) case 6: DestroyWirelessStatusIndicatorSprite(); sub_8022960(var0); - sub_8034CC8(); + DigitObjUtil_Free(); break; case 7: var0->unkC = 0; @@ -1701,18 +1701,18 @@ void ShowBerryCrushRankings(void) void sub_8022524(struct BerryCrushGame_138 *r4, u16 r1) { sub_8021944(r4, r1); - sub_8035044(0, r4->unk4); - sub_8035044(1, r4->unk6); - sub_8035044(2, r4->unk8); + DigitObjUtil_PrintNumOn(0, r4->unk4); + DigitObjUtil_PrintNumOn(1, r4->unk6); + DigitObjUtil_PrintNumOn(2, r4->unk8); } void sub_8022554(struct BerryCrushGame_138 *r0) { r0->unk78[0]->invisible = TRUE; r0->unk78[1]->invisible = TRUE; - sub_803547C(2, 1); - sub_803547C(1, 1); - sub_803547C(0, 1); + DigitObjUtil_HideOrShow(2, 1); + DigitObjUtil_HideOrShow(1, 1); + DigitObjUtil_HideOrShow(0, 1); } void sub_8022588(struct BerryCrushGame *r5) @@ -1855,9 +1855,9 @@ void sub_8022730(struct BerryCrushGame *r6) r6->unk138.unk78[r5]->invisible = FALSE; r6->unk138.unk78[r5]->animPaused = FALSE; } - sub_8034D14(0, 0, &gUnknown_082F4384[0]); - sub_8034D14(1, 0, &gUnknown_082F4384[1]); - sub_8034D14(2, 0, &gUnknown_082F4384[2]); + DigitObjUtil_CreatePrinter(0, 0, &gUnknown_082F4384[0]); + DigitObjUtil_CreatePrinter(1, 0, &gUnknown_082F4384[1]); + DigitObjUtil_CreatePrinter(2, 0, &gUnknown_082F4384[2]); if (r6->unk12 == 1) sub_8022554(&r6->unk138); } @@ -1875,9 +1875,9 @@ void sub_8022960(struct BerryCrushGame *r5) FreeSpritePaletteByTag(1); for (; r4 < ARRAY_COUNT(r5->unk138.unk78); ++r4) DestroySprite(r5->unk138.unk78[r4]); - sub_80353DC(2); - sub_80353DC(1); - sub_80353DC(0); + DigitObjUtil_DeletePrinter(2); + DigitObjUtil_DeletePrinter(1); + DigitObjUtil_DeletePrinter(0); for (r4 = 0; r4 < ARRAY_COUNT(r5->unk138.unk4C); ++r4) DestroySprite(r5->unk138.unk4C[r4]); for (r4 = 0; r4 < r5->unk9; ++r4) diff --git a/src/digit_obj_util.c b/src/digit_obj_util.c new file mode 100644 index 000000000..fe5d49e69 --- /dev/null +++ b/src/digit_obj_util.c @@ -0,0 +1,450 @@ +#include "global.h" +#include "digit_obj_util.h" +#include "malloc.h" +#include "decompress.h" +#include "main.h" +#include "battle_main.h" + +struct DigitPrinter +{ + bool8 isActive; + u8 firstOamId; + u8 strConvMode; + u8 oamCount; + u8 palTagIndex; + u8 size; + u8 shape; + u8 priority; + u8 xDelta; + u8 tilesPerImage; + u16 tileStart; + s16 x; + s16 y; + u16 tileTag; + u16 palTag; + u32 pow10; + s32 lastPrinted; +}; + +struct DigitPrinterAlloc +{ + u32 count; + struct DigitPrinter *array; +}; + +// this file's functions +static u8 GetFirstOamId(u8 oamCount);; +static void CopyWorkToOam(struct DigitPrinter *objWork); +static void DrawNumObjsLeadingZeros(struct DigitPrinter *objWork, s32 num, bool32 sign); +static void DrawNumObjsMinusInFront(struct DigitPrinter *objWork, s32 num, bool32 sign); +static void DrawNumObjsMinusInBack(struct DigitPrinter *objWork, s32 num, bool32 sign); +static bool32 SharesTileWithAnyActive(u32 id); +static bool32 SharesPalWithAnyActive(u32 id); + +// ewram +static EWRAM_DATA struct DigitPrinterAlloc *sOamWork = {0}; + +// const rom data +static const u8 sTilesPerImage[4][4] = +{ + [ST_OAM_SQUARE] = { + [ST_OAM_SIZE_0] = 0x01, // SPRITE_SIZE_8x8 + [ST_OAM_SIZE_1] = 0x04, // SPRITE_SIZE_16x16 + [ST_OAM_SIZE_2] = 0x10, // SPRITE_SIZE_32x32 + [ST_OAM_SIZE_3] = 0x40 // SPRITE_SIZE_64x64 + }, + [ST_OAM_H_RECTANGLE] = { + [ST_OAM_SIZE_0] = 0x02, // SPRITE_SIZE_16x8 + [ST_OAM_SIZE_1] = 0x04, // SPRITE_SIZE_32x8 + [ST_OAM_SIZE_2] = 0x08, // SPRITE_SIZE_32x16 + [ST_OAM_SIZE_3] = 0x20 // SPRITE_SIZE_64x32 + }, + [ST_OAM_V_RECTANGLE] = { + [ST_OAM_SIZE_0] = 0x02, // SPRITE_SIZE_8x16 + [ST_OAM_SIZE_1] = 0x04, // SPRITE_SIZE_8x32 + [ST_OAM_SIZE_2] = 0x08, // SPRITE_SIZE_16x32 + [ST_OAM_SIZE_3] = 0x20 // SPRITE_SIZE_32x64 + } +}; + +// code +bool32 DigitObjUtil_Init(u32 count) +{ + u32 i; + + if (sOamWork != NULL) + DigitObjUtil_Free(); + + sOamWork = Alloc(sizeof(*sOamWork)); + if (sOamWork == NULL) + return FALSE; + + sOamWork->array = Alloc(sizeof(struct DigitPrinter) * count); + if (sOamWork->array == NULL) + { + Free(sOamWork); + return FALSE; + } + + sOamWork->count = count; + for (i = 0; i < count; i++) + { + sOamWork->array[i].isActive = FALSE; + sOamWork->array[i].firstOamId = 0xFF; + } + + return TRUE; +} + +void DigitObjUtil_Free(void) +{ + if (sOamWork != NULL) + { + if (sOamWork->array != NULL) + { + u32 i; + + for (i = 0; i < sOamWork->count; i++) + DigitObjUtil_DeletePrinter(i); + + Free(sOamWork->array); + } + + FREE_AND_SET_NULL(sOamWork); + } +} + +bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template) +{ + u32 i; + + if (sOamWork == NULL) + return FALSE; + if (sOamWork->array[id].isActive) + return FALSE; + + sOamWork->array[id].firstOamId = GetFirstOamId(template->oamCount); + if (sOamWork->array[id].firstOamId == 0xFF) + return FALSE; + + sOamWork->array[id].tileStart = GetSpriteTileStartByTag(template->spriteSheet->tag); + if (sOamWork->array[id].tileStart == 0xFFFF) + { + if (template->spriteSheet->size != 0) + { + sOamWork->array[id].tileStart = LoadSpriteSheet(template->spriteSheet); + } + else + { + struct CompressedSpriteSheet compSpriteSheet; + + compSpriteSheet = *(struct CompressedSpriteSheet*)(template->spriteSheet); + compSpriteSheet.size = GetDecompressedDataSize(template->spriteSheet->data); + sOamWork->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet); + } + + if (sOamWork->array[id].tileStart == 0xFFFF) + return FALSE; + } + + sOamWork->array[id].palTagIndex = IndexOfSpritePaletteTag(template->spritePal->tag); + if (sOamWork->array[id].palTagIndex == 0xFF) + sOamWork->array[id].palTagIndex = LoadSpritePalette(template->spritePal); + + sOamWork->array[id].strConvMode = template->strConvMode; + sOamWork->array[id].oamCount = template->oamCount; + sOamWork->array[id].x = template->x; + sOamWork->array[id].y = template->y; + sOamWork->array[id].shape = template->shape; + sOamWork->array[id].size = template->size; + sOamWork->array[id].priority = template->priority; + sOamWork->array[id].xDelta = template->xDelta; + sOamWork->array[id].tilesPerImage = GetTilesPerImage(template->shape, template->size); + sOamWork->array[id].tileTag = template->spriteSheet->tag; + sOamWork->array[id].palTag = template->spritePal->tag; + sOamWork->array[id].isActive = TRUE; + + // Decimal left shift + sOamWork->array[id].pow10 = 1; + for (i = 1; i < template->oamCount; i++) + sOamWork->array[id].pow10 *= 10; + + CopyWorkToOam(&sOamWork->array[id]); + DigitObjUtil_PrintNumOn(id, num); + + return TRUE; +} + +static void CopyWorkToOam(struct DigitPrinter *objWork) +{ + u32 i; + u32 oamId = objWork->firstOamId; + u32 x = objWork->x; + u32 oamCount = objWork->oamCount + 1; + + CpuFill16(0, &gMain.oamBuffer[oamId], sizeof(struct OamData) * oamCount); + for (i = 0, oamId = objWork->firstOamId; i < oamCount; i++, oamId++) + { + gMain.oamBuffer[oamId].y = objWork->y; + gMain.oamBuffer[oamId].x = x; + gMain.oamBuffer[oamId].shape = objWork->shape; + gMain.oamBuffer[oamId].size = objWork->size; + gMain.oamBuffer[oamId].tileNum = objWork->tileStart; + gMain.oamBuffer[oamId].priority = objWork->priority; + gMain.oamBuffer[oamId].paletteNum = objWork->palTagIndex; + + x += objWork->xDelta; + } + + oamId--; + gMain.oamBuffer[oamId].x = objWork->x - objWork->xDelta; + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + gMain.oamBuffer[oamId].tileNum = objWork->tileStart + (objWork->tilesPerImage * 10); +} + +void DigitObjUtil_PrintNumOn(u32 id, s32 num) +{ + bool32 sign; + + if (sOamWork == NULL) + return; + if (!sOamWork->array[id].isActive) + return; + + sOamWork->array[id].lastPrinted = num; + if (num < 0) + { + sign = TRUE; + num *= -1; + } + else + { + sign = FALSE; + } + + switch (sOamWork->array[id].strConvMode) + { + case 0: + default: + DrawNumObjsLeadingZeros(&sOamWork->array[id], num, sign); + break; + case 1: + DrawNumObjsMinusInFront(&sOamWork->array[id], num, sign); + break; + case 2: + DrawNumObjsMinusInBack(&sOamWork->array[id], num, sign); + break; + } +} + +static void DrawNumObjsLeadingZeros(struct DigitPrinter *objWork, s32 num, bool32 sign) +{ + u32 pow10 = objWork->pow10; + u32 oamId = objWork->firstOamId; + + while (pow10 != 0) + { + u32 digit = num / pow10; + num -= (digit * pow10); + pow10 /= 10; + + gMain.oamBuffer[oamId].tileNum = (digit * objWork->tilesPerImage) + objWork->tileStart; + oamId++; + } + + if (sign) + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + else + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; +} + +static void DrawNumObjsMinusInFront(struct DigitPrinter *objWork, s32 num, bool32 sign) +{ + u32 pow10 = objWork->pow10; + static int oamId; + static int curDigit; + static int firstDigit; + + oamId = objWork->firstOamId; + curDigit = 0; + firstDigit = -1; + + while (pow10 != 0) + { + u32 digit = num / pow10; + num -= (digit * pow10); + pow10 /= 10; + + if (digit != 0 || firstDigit != -1 || pow10 == 0) + { + gMain.oamBuffer[oamId].tileNum = (digit * objWork->tilesPerImage) + objWork->tileStart; + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + + if (firstDigit == -1) + firstDigit = curDigit; + } + else + { + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + } + + oamId++; + curDigit++; + } + + if (sign) + { + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + gMain.oamBuffer[oamId].x = objWork->x + ((firstDigit - 1) * objWork->xDelta); + } + else + { + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + } +} + +static void DrawNumObjsMinusInBack(struct DigitPrinter *objWork, s32 num, bool32 sign) +{ + u32 pow10 = objWork->pow10; + u32 oamId = objWork->firstOamId; + bool32 printingDigits = FALSE; + s32 nsprites = 0; + + while (pow10 != 0) + { + u32 digit = num / pow10; + num -= (digit * pow10); + pow10 /= 10; + + if (digit != 0 || printingDigits || pow10 == 0) + { + printingDigits = TRUE; + gMain.oamBuffer[oamId].tileNum = (digit * objWork->tilesPerImage) + objWork->tileStart; + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + + oamId++; + nsprites++; + } + } + + while (nsprites < objWork->oamCount) + { + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + oamId++; + nsprites++; + } + + if (sign) + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + else + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; +} + +void DigitObjUtil_DeletePrinter(u32 id) +{ + s32 oamId, oamCount, i; + + if (sOamWork == NULL) + return; + if (!sOamWork->array[id].isActive) + return; + + oamCount = sOamWork->array[id].oamCount + 1; + oamId = sOamWork->array[id].firstOamId; + + for (i = 0; i < oamCount; i++, oamId++) + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + + if (!SharesTileWithAnyActive(id)) + FreeSpriteTilesByTag(sOamWork->array[id].tileTag); + if (!SharesPalWithAnyActive(id)) + FreeSpritePaletteByTag(sOamWork->array[id].palTag); + + sOamWork->array[id].isActive = FALSE; +} + +void DigitObjUtil_HideOrShow(u32 id, bool32 hide) +{ + s32 oamId, oamCount, i; + + if (sOamWork == NULL) + return; + if (!sOamWork->array[id].isActive) + return; + + oamCount = sOamWork->array[id].oamCount + 1; + oamId = sOamWork->array[id].firstOamId; + if (hide) + { + for (i = 0; i < oamCount; i++, oamId++) + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; + } + else + { + for (i = 0; i < oamCount; i++, oamId++) + gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; + + DigitObjUtil_PrintNumOn(id, sOamWork->array[id].lastPrinted); + } +} + +static u8 GetFirstOamId(u8 oamCount) +{ + u32 i; + u16 firstOamId = 64; + + for (i = 0; i < sOamWork->count; i++) + { + if (!sOamWork->array[i].isActive) + { + if (sOamWork->array[i].firstOamId != 0xFF && sOamWork->array[i].oamCount <= oamCount) + return sOamWork->array[i].firstOamId; + } + else + { + firstOamId += 1 + sOamWork->array[i].oamCount; + } + } + + if (firstOamId + oamCount + 1 > 128) + return 0xFF; + else + return firstOamId; +} + +static bool32 SharesTileWithAnyActive(u32 id) +{ + u32 i; + + for (i = 0; i < sOamWork->count; i++) + { + if (sOamWork->array[i].isActive && i != id + && sOamWork->array[i].tileTag == sOamWork->array[id].tileTag) + { + return TRUE; + } + } + + return FALSE; +} + +static bool32 SharesPalWithAnyActive(u32 id) +{ + u32 i; + + for (i = 0; i < sOamWork->count; i++) + { + if (sOamWork->array[i].isActive && i != id + && sOamWork->array[i].palTag == sOamWork->array[id].palTag) + { + return TRUE; + } + } + + return FALSE; +} + +u8 GetTilesPerImage(u32 shape, u32 size) +{ + return sTilesPerImage[shape][size]; +} diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 6c76b15a6..51520cae8 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -14,7 +14,7 @@ #include "menu.h" #include "palette.h" #include "random.h" -#include "rom_8034C54.h" +#include "digit_obj_util.h" #include "save.h" #include "script.h" #include "sound.h" @@ -2831,7 +2831,7 @@ static void sub_802D074(struct PokemonJump2 *arg0) static void sub_802D0AC(void) { FreeAllWindowBuffers(); - sub_8034CC8(); + DigitObjUtil_Free(); } static void sub_802D0BC(struct PokemonJump2 *arg0) @@ -3515,37 +3515,37 @@ static int sub_802DCCC(u8 flags) static void sub_802DD08(void) { - struct UnkStruct3 unkStruct; - struct UnkStruct3 *ptr = &unkStruct; // This temp variable is needed to match, don't ask me why. + struct DigitObjUtilTemplate template; + struct DigitObjUtilTemplate *ptr = &template; // This temp variable is needed to match, don't ask me why. ptr->shape = SPRITE_SHAPE(8x8); ptr->size = SPRITE_SIZE(8x8); - ptr->field_0_0 = 0; + ptr->strConvMode = 0; ptr->priority = 1; - ptr->field_1 = 5; + ptr->oamCount = 5; ptr->xDelta = 8; ptr->x = 108; ptr->y = 6; ptr->spriteSheet = (void*) &gUnknown_082FE1EC; ptr->spritePal = &gUnknown_082FE1F4; - sub_8034C54(2); - sub_8034D14(0, 0, ptr); + DigitObjUtil_Init(2); + DigitObjUtil_CreatePrinter(0, 0, ptr); - unkStruct.field_1 = 4; - unkStruct.x = 30; - unkStruct.y = 6; - sub_8034D14(1, 0, &unkStruct); + template.oamCount = 4; + template.x = 30; + template.y = 6; + DigitObjUtil_CreatePrinter(1, 0, &template); } static void sub_802DD64(int arg0) { - sub_8035044(0, arg0); + DigitObjUtil_PrintNumOn(0, arg0); } static void sub_802DD74(u16 arg0) { - sub_8035044(1, arg0); + DigitObjUtil_PrintNumOn(1, arg0); } static void sub_802DD88(u8 multiplayerId) diff --git a/src/rom_8034C54.c b/src/rom_8034C54.c deleted file mode 100644 index 029696526..000000000 --- a/src/rom_8034C54.c +++ /dev/null @@ -1,453 +0,0 @@ -#include "global.h" -#include "rom_8034C54.h" -#include "malloc.h" -#include "decompress.h" -#include "main.h" -#include "battle_main.h" - -struct UnkStruct2 -{ - bool8 isActive; - u8 firstOamId; - u8 field_2; - u8 oamCount; - u8 palTagIndex; - u8 size; - u8 shape; - u8 priority; - u8 xDelta; - u8 field_9; - u16 tileStart; - s16 x; - s16 y; - u16 tileTag; - u16 palTag; - u32 field_14; - s32 field_18; -}; - -struct UnkStruct1 -{ - u32 count; - struct UnkStruct2 *array; -}; - -// this file's functions -static u8 sub_8035518(u8 arg0);; -static void sub_8034EFC(struct UnkStruct2 *arg0); -static void sub_80350B0(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2); -static void sub_8035164(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2); -static void sub_80352C0(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2); -static bool32 SharesTileWithAnyActive(u32 id); -static bool32 SharesPalWithAnyActive(u32 id); -static void sub_8035648(void); - -// iwram -static s32 gUnknown_03000DD4; -static s32 gUnknown_03000DD8; -static s32 gUnknown_03000DDC; - -// ewram -static EWRAM_DATA struct UnkStruct1 *gUnknown_02022E10 = {0}; - -// const rom data -static const u8 gUnknown_082FF1C8[][4] = -{ - {0x01, 0x04, 0x10, 0x40}, - {0x02, 0x04, 0x08, 0x20}, - {0x02, 0x04, 0x08, 0x20}, - {0x00, 0x00, 0x00, 0x00} -}; - -// code -bool32 sub_8034C54(u32 count) -{ - u32 i; - - if (gUnknown_02022E10 != NULL) - sub_8034CC8(); - - gUnknown_02022E10 = Alloc(sizeof(*gUnknown_02022E10)); - if (gUnknown_02022E10 == NULL) - return FALSE; - - gUnknown_02022E10->array = Alloc(sizeof(struct UnkStruct2) * count); - if (gUnknown_02022E10->array == NULL) - { - Free(gUnknown_02022E10); - return FALSE; - } - - gUnknown_02022E10->count = count; - for (i = 0; i < count; i++) - { - gUnknown_02022E10->array[i].isActive = FALSE; - gUnknown_02022E10->array[i].firstOamId = 0xFF; - } - - return TRUE; -} - -void sub_8034CC8(void) -{ - if (gUnknown_02022E10 != NULL) - { - if (gUnknown_02022E10->array != NULL) - { - u32 i; - - for (i = 0; i < gUnknown_02022E10->count; i++) - sub_80353DC(i); - - Free(gUnknown_02022E10->array); - } - - FREE_AND_SET_NULL(gUnknown_02022E10); - } -} - -bool32 sub_8034D14(u32 id, s32 arg1, const struct UnkStruct3 *arg2) -{ - u32 i; - - if (gUnknown_02022E10 == NULL) - return FALSE; - if (gUnknown_02022E10->array[id].isActive) - return FALSE; - - gUnknown_02022E10->array[id].firstOamId = sub_8035518(arg2->field_1); - if (gUnknown_02022E10->array[id].firstOamId == 0xFF) - return FALSE; - - gUnknown_02022E10->array[id].tileStart = GetSpriteTileStartByTag(arg2->spriteSheet->tag); - if (gUnknown_02022E10->array[id].tileStart == 0xFFFF) - { - if (arg2->spriteSheet->size != 0) - { - gUnknown_02022E10->array[id].tileStart = LoadSpriteSheet(arg2->spriteSheet); - } - else - { - struct CompressedSpriteSheet compSpriteSheet; - - compSpriteSheet = *(struct CompressedSpriteSheet*)(arg2->spriteSheet); - compSpriteSheet.size = GetDecompressedDataSize(arg2->spriteSheet->data); - gUnknown_02022E10->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet); - } - - if (gUnknown_02022E10->array[id].tileStart == 0xFFFF) - return FALSE; - } - - gUnknown_02022E10->array[id].palTagIndex = IndexOfSpritePaletteTag(arg2->spritePal->tag); - if (gUnknown_02022E10->array[id].palTagIndex == 0xFF) - gUnknown_02022E10->array[id].palTagIndex = LoadSpritePalette(arg2->spritePal); - - gUnknown_02022E10->array[id].field_2 = arg2->field_0_0; - gUnknown_02022E10->array[id].oamCount = arg2->field_1; - gUnknown_02022E10->array[id].x = arg2->x; - gUnknown_02022E10->array[id].y = arg2->y; - gUnknown_02022E10->array[id].shape = arg2->shape; - gUnknown_02022E10->array[id].size = arg2->size; - gUnknown_02022E10->array[id].priority = arg2->priority; - gUnknown_02022E10->array[id].xDelta = arg2->xDelta; - gUnknown_02022E10->array[id].field_9 = sub_80355F8(arg2->shape, arg2->size); - gUnknown_02022E10->array[id].tileTag = arg2->spriteSheet->tag; - gUnknown_02022E10->array[id].palTag = arg2->spritePal->tag; - gUnknown_02022E10->array[id].isActive = TRUE; - gUnknown_02022E10->array[id].field_14 = 1; - - for (i = 1; i < arg2->field_1; i++) - gUnknown_02022E10->array[id].field_14 *= 10; - - sub_8034EFC(&gUnknown_02022E10->array[id]); - sub_8035044(id, arg1); - - return TRUE; -} - -static void sub_8034EFC(struct UnkStruct2 *arg0) -{ - u32 i; - u32 oamId = arg0->firstOamId; - u32 x = arg0->x; - u32 oamCount = arg0->oamCount + 1; - - CpuFill16(0, &gMain.oamBuffer[oamId], sizeof(struct OamData) * oamCount); - for (i = 0, oamId = arg0->firstOamId; i < oamCount; i++, oamId++) - { - gMain.oamBuffer[oamId].y = arg0->y; - gMain.oamBuffer[oamId].x = x; - gMain.oamBuffer[oamId].shape = arg0->shape; - gMain.oamBuffer[oamId].size = arg0->size; - gMain.oamBuffer[oamId].tileNum = arg0->tileStart; - gMain.oamBuffer[oamId].priority = arg0->priority; - gMain.oamBuffer[oamId].paletteNum = arg0->palTagIndex; - - x += arg0->xDelta; - } - - oamId--; - gMain.oamBuffer[oamId].x = arg0->x - arg0->xDelta; - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; - gMain.oamBuffer[oamId].tileNum = arg0->tileStart + (arg0->field_9 * 10); -} - -void sub_8035044(u32 id, s32 arg1) -{ - bool32 r2; - - if (gUnknown_02022E10 == NULL) - return; - if (!gUnknown_02022E10->array[id].isActive) - return; - - gUnknown_02022E10->array[id].field_18 = arg1; - if (arg1 < 0) - { - r2 = TRUE; - arg1 *= -1; - } - else - { - r2 = FALSE; - } - - switch (gUnknown_02022E10->array[id].field_2) - { - case 0: - default: - sub_80350B0(&gUnknown_02022E10->array[id], arg1, r2); - break; - case 1: - sub_8035164(&gUnknown_02022E10->array[id], arg1, r2); - break; - case 2: - sub_80352C0(&gUnknown_02022E10->array[id], arg1, r2); - break; - } -} - -static void sub_80350B0(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2) -{ - u32 r5 = arg0->field_14; - u32 oamId = arg0->firstOamId; - - while (r5 != 0) - { - u32 r4 = arg1 / r5; - arg1 -= (r4 * r5); - r5 /= 10; - - gMain.oamBuffer[oamId].tileNum = (r4 * arg0->field_9) + arg0->tileStart; - oamId++; - } - - if (arg2) - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; - else - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; -} - -static void sub_8035164(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2) -{ - u32 r5 = arg0->field_14; - gUnknown_03000DD4 = arg0->firstOamId; - gUnknown_03000DD8 = 0; - gUnknown_03000DDC = -1; - - while (r5 != 0) - { - u32 r4 = arg1 / r5; - arg1 -= (r4 * r5); - r5 /= 10; - - if (r4 != 0 || gUnknown_03000DDC != -1 || r5 == 0) - { - gMain.oamBuffer[gUnknown_03000DD4].tileNum = (r4 * arg0->field_9) + arg0->tileStart; - gMain.oamBuffer[gUnknown_03000DD4].affineMode = ST_OAM_AFFINE_OFF; - - if (gUnknown_03000DDC == -1) - gUnknown_03000DDC = gUnknown_03000DD8; - } - else - { - gMain.oamBuffer[gUnknown_03000DD4].affineMode = ST_OAM_AFFINE_ERASE; - } - - gUnknown_03000DD4++; - gUnknown_03000DD8++; - } - - if (arg2) - { - gMain.oamBuffer[gUnknown_03000DD4].affineMode = ST_OAM_AFFINE_OFF; - gMain.oamBuffer[gUnknown_03000DD4].x = arg0->x + ((gUnknown_03000DDC - 1) * arg0->xDelta); - } - else - { - gMain.oamBuffer[gUnknown_03000DD4].affineMode = ST_OAM_AFFINE_ERASE; - } -} - -static void sub_80352C0(struct UnkStruct2 *arg0, s32 arg1, bool32 arg2) -{ - u32 r5 = arg0->field_14; - u32 oamId = arg0->firstOamId; - u32 var_28 = 0; - s32 r9 = 0; - - while (r5 != 0) - { - u32 r4 = arg1 / r5; - arg1 -= (r4 * r5); - r5 /= 10; - - if (r4 != 0 || var_28 != 0 || r5 == 0) - { - var_28 = 1; - gMain.oamBuffer[oamId].tileNum = (r4 * arg0->field_9) + arg0->tileStart; - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; - - oamId++; - r9++; - } - } - - while (r9 < arg0->oamCount) - { - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; - oamId++; - r9++; - } - - if (arg2) - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; - else - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; -} - -void sub_80353DC(u32 id) -{ - s32 oamId, oamCount, i; - - if (gUnknown_02022E10 == NULL) - return; - if (!gUnknown_02022E10->array[id].isActive) - return; - - oamCount = gUnknown_02022E10->array[id].oamCount + 1; - oamId = gUnknown_02022E10->array[id].firstOamId; - - for (i = 0; i < oamCount; i++, oamId++) - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; - - if (!SharesTileWithAnyActive(id)) - FreeSpriteTilesByTag(gUnknown_02022E10->array[id].tileTag); - if (!SharesPalWithAnyActive(id)) - FreeSpritePaletteByTag(gUnknown_02022E10->array[id].palTag); - - gUnknown_02022E10->array[id].isActive = FALSE; -} - -void sub_803547C(u32 id, bool32 arg1) -{ - s32 oamId, oamCount, i; - - if (gUnknown_02022E10 == NULL) - return; - if (!gUnknown_02022E10->array[id].isActive) - return; - - oamCount = gUnknown_02022E10->array[id].oamCount + 1; - oamId = gUnknown_02022E10->array[id].firstOamId; - if (arg1) - { - for (i = 0; i < oamCount; i++, oamId++) - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_ERASE; - } - else - { - for (i = 0; i < oamCount; i++, oamId++) - gMain.oamBuffer[oamId].affineMode = ST_OAM_AFFINE_OFF; - - sub_8035044(id, gUnknown_02022E10->array[id].field_18); - } -} - -static u8 sub_8035518(u8 arg0) -{ - u32 i; - u16 oamCount = 64; - - for (i = 0; i < gUnknown_02022E10->count; i++) - { - if (!gUnknown_02022E10->array[i].isActive) - { - if (gUnknown_02022E10->array[i].firstOamId != 0xFF && gUnknown_02022E10->array[i].oamCount <= arg0) - return gUnknown_02022E10->array[i].firstOamId; - } - else - { - oamCount += 1 + gUnknown_02022E10->array[i].oamCount; - } - } - - if (oamCount + arg0 + 1 > 128) - return 0xFF; - else - return oamCount; -} - -static bool32 SharesTileWithAnyActive(u32 id) -{ - u32 i; - - for (i = 0; i < gUnknown_02022E10->count; i++) - { - if (gUnknown_02022E10->array[i].isActive && i != id - && gUnknown_02022E10->array[i].tileTag == gUnknown_02022E10->array[id].tileTag) - { - return TRUE; - } - } - - return FALSE; -} - -static bool32 SharesPalWithAnyActive(u32 id) -{ - u32 i; - - for (i = 0; i < gUnknown_02022E10->count; i++) - { - if (gUnknown_02022E10->array[i].isActive && i != id - && gUnknown_02022E10->array[i].palTag == gUnknown_02022E10->array[id].palTag) - { - return TRUE; - } - } - - return FALSE; -} - -u8 sub_80355F8(u32 shape, u32 size) -{ - return gUnknown_082FF1C8[shape][size]; -} - -static void sub_8035608(void) -{ - u8 spriteId; - - ResetSpriteData(); - spriteId = CreateSprite(&gUnknown_0831AC88, 0, 0, 0); - gSprites[spriteId].invisible = TRUE; - SetMainCallback2(sub_8035648); -} - -static void sub_8035648(void) -{ - AnimateSprites(); - BuildOamBuffer(); -} diff --git a/src/rom_81520A8.c b/src/rom_81520A8.c index f6d14d49c..8b10d44d0 100644 --- a/src/rom_81520A8.c +++ b/src/rom_81520A8.c @@ -2,7 +2,7 @@ #include "rom_81520A8.h" #include "malloc.h" #include "main.h" -#include "rom_8034C54.h" +#include "digit_obj_util.h" static EWRAM_DATA struct { @@ -138,7 +138,7 @@ static bool32 sub_81523F4(struct UnkStruct_81520A8 *structPtr, u8 arg1) return FALSE; structPtr->unk18 = arg1; - structPtr->tileNum = (sub_80355F8(structPtr->oam.shape, structPtr->oam.size) * arg1) + tileStart; + structPtr->tileNum = (GetTilesPerImage(structPtr->oam.shape, structPtr->oam.size) * arg1) + tileStart; return TRUE; } diff --git a/sym_bss.txt b/sym_bss.txt index 1c58146f6..aad8c8f14 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -14,7 +14,7 @@ .include "src/dodrio_berry_picking.o" .include "src/rtc.o" .include "src/main_menu.o" - .include "src/rom_8034C54.o" + .include "src/digit_obj_util.o" .include "src/egg_hatch.o" .include "src/berry_blender.o" .include "src/play_time.o" diff --git a/sym_ewram.txt b/sym_ewram.txt index c5cb123c5..d00f7953c 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -23,7 +23,7 @@ .include "src/pokemon_jump.o" .include "src/main_menu.o" .include "src/battle_controllers.o" - .include "src/rom_8034C54.o" + .include "src/digit_obj_util.o" .include "src/battle_main.o" .include "src/pokemon.o" .include "src/random.o" From e485857df303cde99b16e717132945631cbdcade Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 8 Apr 2020 17:23:32 -0400 Subject: [PATCH 21/34] Sync minigame_countdown --- .../{pkmnjump_321start2.png => 321start.png} | Bin ...{pkmnjump_321start1.png => 321start_2.png} | Bin include/minigame_countdown.h | 7 + include/pokemon_jump.h | 2 - ld_script.txt | 2 + src/berry_crush.c | 6 +- src/dodrio_berry_picking.c | 6 +- src/minigame_countdown.c | 636 ++++++++++++++++++ src/pokemon_jump.c | 626 +---------------- 9 files changed, 654 insertions(+), 631 deletions(-) rename graphics/link_games/{pkmnjump_321start2.png => 321start.png} (100%) rename graphics/link_games/{pkmnjump_321start1.png => 321start_2.png} (100%) create mode 100644 include/minigame_countdown.h create mode 100644 src/minigame_countdown.c diff --git a/graphics/link_games/pkmnjump_321start2.png b/graphics/link_games/321start.png similarity index 100% rename from graphics/link_games/pkmnjump_321start2.png rename to graphics/link_games/321start.png diff --git a/graphics/link_games/pkmnjump_321start1.png b/graphics/link_games/321start_2.png similarity index 100% rename from graphics/link_games/pkmnjump_321start1.png rename to graphics/link_games/321start_2.png diff --git a/include/minigame_countdown.h b/include/minigame_countdown.h new file mode 100644 index 000000000..930205218 --- /dev/null +++ b/include/minigame_countdown.h @@ -0,0 +1,7 @@ +#ifndef GUARD_MINIGAME_COUNTDOWN_H +#define GUARD_MINIGAME_COUNTDOWN_H + +void StartMinigameCountdown(u16 tilesTag, u16 palTag, s16 x, s16 y, u8 subpriority); +bool32 IsMinigameCountdownRunning(void); + +#endif //GUARD_MINIGAME_COUNTDOWN_H diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index dde59aac5..9cf65212f 100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -8,7 +8,5 @@ bool32 IsSpeciesAllowedInPokemonJump(u16 species); void IsPokemonJumpSpeciesInParty(void); void ResetPokeJumpResults(void); void ShowPokemonJumpRecords(void); -void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority); -bool32 sub_802EB84(void); #endif // GUARD_POKEMON_JUMP_H diff --git a/ld_script.txt b/ld_script.txt index c98eb6442..74d9f6ae6 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -77,6 +77,7 @@ SECTIONS { src/berry_powder.o(.text); src/dodrio_berry_picking.o(.text); src/pokemon_jump.o(.text); + src/minigame_countdown.o(.text); src/rtc.o(.text); src/main_menu.o(.text); src/battle_controllers.o(.text); @@ -460,6 +461,7 @@ SECTIONS { src/berry_powder.o(.rodata); src/dodrio_berry_picking.o(.rodata); src/pokemon_jump.o(.rodata); + src/minigame_countdown.o(.rodata); src/rtc.o(.rodata); src/main_menu.o(.rodata); src/battle_controllers.o(.rodata); diff --git a/src/berry_crush.c b/src/berry_crush.c index 0985fce9a..a67d1548e 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -19,7 +19,7 @@ #include "menu.h" #include "overworld.h" #include "palette.h" -#include "pokemon_jump.h" +#include "minigame_countdown.h" #include "random.h" #include "digit_obj_util.h" #include "save.h" @@ -2317,10 +2317,10 @@ static u32 sub_80232EC(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r case 1: if (!IsLinkTaskFinished()) return 0; - sub_802EB24(0x1000, 0x1000, 120, 80, 0); + StartMinigameCountdown(0x1000, 0x1000, 120, 80, 0); break; case 2: - if (sub_802EB84()) + if (IsMinigameCountdownRunning()) return 0; // fallthrough case 0: diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 40074e0af..936c1828f 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -12,7 +12,7 @@ #include "m4a.h" #include "main.h" #include "palette.h" -#include "pokemon_jump.h" +#include "minigame_countdown.h" #include "random.h" #include "save.h" #include "script.h" @@ -667,7 +667,7 @@ static void sub_8024E38(void) switch (gUnknown_02022C98->unk10) { case 0: - sub_802EB24(7, 8, 120, 80, 0); + StartMinigameCountdown(7, 8, 120, 80, 0); gUnknown_02022C98->unk10++; break; case 1: @@ -682,7 +682,7 @@ static void sub_8024E38(void) } break; case 3: - if (!sub_802EB84()) + if (!IsMinigameCountdownRunning()) { gUnknown_02022C98->unk10++; } diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c new file mode 100644 index 000000000..be1c42e29 --- /dev/null +++ b/src/minigame_countdown.c @@ -0,0 +1,636 @@ +#include "global.h" +#include "decompress.h" +#include "link.h" +#include "link_rfu.h" +#include "sound.h" +#include "task.h" +#include "trig.h" +#include "constants/songs.h" + +extern const struct OamData gOamData_AffineOff_ObjNormal_32x32; + +static void sub_802E6D0(u8 taskId); +static void sub_802E83C(u8 taskId); +static void sub_802E8C8(u8 taskId); +static void sub_802EA50(u8 taskId); +static void sub_802EAB0(u8 taskId); +static void sub_802EB98(u8 taskId); +static void Task_MinigameCountdown(u8 taskId); +static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId); +static bool32 IsStartGraphicAnimRunning(u8 spriteId); +static void Load321StartGfx(u16 tileTag, u16 palTag); +static u8 CreateNumberSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority); +static void CreateStartSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2); +static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3); +static void SpriteCB_Start(struct Sprite *sprite); + +static const u16 sSpritePal_321Start_2[] = INCBIN_U16("graphics/link_games/321start_2.gbapal"); +static const u32 sSpriteSheet_321Start_2[] = INCBIN_U32("graphics/link_games/321start_2.4bpp.lz"); + +static const struct CompressedSpriteSheet gUnknown_082FE6C8[] = +{ + {sSpriteSheet_321Start_2, 0xC00, 0x2000}, + {}, +}; + +static const struct SpritePalette gUnknown_082FE6D8[] = +{ + {sSpritePal_321Start_2, 0x2000}, + {}, +}; + +static const union AnimCmd sSpriteAnim_82FE6E8[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_82FE6F0[] = +{ + ANIMCMD_FRAME(16, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_82FE6F8[] = +{ + ANIMCMD_FRAME(32, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_82FE700[] = +{ + ANIMCMD_FRAME(64, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_82FE708[] = +{ + ANIMCMD_FRAME(48, 0), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_82FE710[] = +{ + ANIMCMD_FRAME(80, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_82FE718[] = +{ + sSpriteAnim_82FE6E8, + sSpriteAnim_82FE6F0, + sSpriteAnim_82FE6F8, + sSpriteAnim_82FE700, + sSpriteAnim_82FE708, + sSpriteAnim_82FE710 +}; + +static const struct SpriteTemplate gUnknown_082FE730[] = +{ + { + .tileTag = 0x2000, + .paletteTag = 0x2000, + .oam = &gOamData_AffineOff_ObjNormal_32x32, + .anims = sSpriteAnimTable_82FE718, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, + }, +}; + +static const TaskFunc gUnknown_082FE748[][4] = +{ + { + sub_802E83C, + sub_802E8C8, + sub_802EA50, + sub_802EAB0 + }, +}; + +static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/link_games/321start.gbapal"); +static const u32 sSpriteSheet_321Start[] = INCBIN_U32("graphics/link_games/321start.4bpp.lz"); + +// Unused +static u32 sub_802E63C(u8 funcSetId, u8 taskPriority) +{ + u8 taskId = CreateTask(sub_802E6D0, taskPriority); + struct Task *task = &gTasks[taskId]; + + task->data[0] = 1; + task->data[1] = funcSetId; + gUnknown_082FE748[funcSetId][0](taskId); + return taskId; +} + +static bool32 sub_802E688(void) +{ + u8 taskId = FindTaskIdByFunc(sub_802E6D0); + if (taskId == 0xFF) + return FALSE; + + gTasks[taskId].data[0] = 2; + return TRUE; +} + +static bool32 sub_802E6BC(void) +{ + return FuncIsActiveTask(sub_802E6D0); +} + +static void sub_802E6D0(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + + switch (data[0]) + { + case 2: + gUnknown_082FE748[data[1]][2](taskId); + data[0] = 3; + break; + case 3: + gUnknown_082FE748[data[1]][3](taskId); + break; + case 4: + gUnknown_082FE748[data[1]][1](taskId); + DestroyTask(taskId); + break; + } +} + +static void sub_802E75C(u8 taskId, s16 *data) +{ + u8 i; + struct Sprite *sprite; + + LoadCompressedSpriteSheet(&gUnknown_082FE6C8[data[3]]); + LoadSpritePalette(&gUnknown_082FE6D8[data[4]]); + for (i = 0; i < data[8]; i++) + data[13 + i] = CreateSprite(&gUnknown_082FE730[data[2]], data[9], data[10], data[7]); + for (i = 0; i < data[8]; i++) + { + sprite = &gSprites[data[13 + i]]; + sprite->oam.priority = data[6]; + sprite->invisible = TRUE; + sprite->data[1] = data[5]; + sprite->data[3] = taskId; + sprite->data[4] = i; + sprite->data[5] = data[13]; + } +} + +static void sub_802E83C(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + data[2] = 0; + data[3] = 0; + data[4] = 0; + data[5] = 60; + data[6] = 0; + data[7] = 0; + data[8] = 3; + data[9] = 120; + data[10] = 88; + sub_802E75C(taskId, data); + + StartSpriteAnim(&gSprites[data[14]], 4); + gSprites[data[14]].pos2.x = -32; + + StartSpriteAnim(&gSprites[data[15]], 5); + gSprites[data[15]].pos2.x = 32; +} + +static void sub_802E8C8(u8 taskId) +{ + u8 i = 0; + s16 *data = gTasks[taskId].data; + + for (i = 0; i < data[8]; i++) + DestroySprite(&gSprites[data[13 + i]]); + FreeSpriteTilesByTag(gUnknown_082FE6C8[data[3]].tag); + FreeSpritePaletteByTag(gUnknown_082FE6D8[data[4]].tag); +} + +static void sub_802E938(struct Sprite *sprite) +{ + s16 *data = gTasks[sprite->data[3]].data; + + if (data[11] % data[5] != 0) + return; + if (data[11] == data[10]) + return; + + data[10] = data[11]; + switch (sprite->data[2]) + { + case 0: + sprite->invisible = FALSE; + case 1: + case 2: + PlaySE(SE_KON); + StartSpriteAnim(sprite, sprite->data[2]); + break; + case 3: + PlaySE(SE_PIN); + StartSpriteAnim(sprite, sprite->data[2]); + gSprites[data[14]].invisible = FALSE; + gSprites[data[15]].invisible = FALSE; + break; + case 4: + sprite->invisible = TRUE; + gSprites[data[14]].invisible = TRUE; + gSprites[data[15]].invisible = TRUE; + data[0] = 4; + return; + } + sprite->data[2]++; +} + +static void sub_802EA50(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + PlaySE(SE_KON); + gSprites[data[13]].callback = sub_802E938; + gSprites[data[13]].invisible = FALSE; + gTasks[taskId].data[0] = 3; +} + +static void sub_802EAB0(u8 taskId) +{ + u16 packet[6]; + s16 *data = gTasks[taskId].data; + + if (gReceivedRemoteLinkPlayers != 0) + { + if (gRecvCmds[0][1] == 0x7FFF) + data[11] = gRecvCmds[0][2]; + if (GetMultiplayerId() == 0) + { + data[12]++; + memset(packet, 0, sizeof(packet)); + packet[0] = 0x7FFF; + packet[1] = data[12]; + sub_800FE50(packet); + } + } + else + { + data[11]++; + } +} + +#define tState data[0] +#define tTilesTag data[2] +#define tPalTag data[3] +#define tX data[4] +#define tY data[5] +#define tSubpriority data[6] +#define tSpriteId1 data[7] +#define tSpriteId2 data[8] +#define tSpriteId3 data[9] + +void StartMinigameCountdown(s16 tilesTag, s16 palTag, s16 x, s16 y, u8 subpriority) +{ + u8 taskId = CreateTask(Task_MinigameCountdown, 80); + gTasks[taskId].tTilesTag = tilesTag; + gTasks[taskId].tPalTag = palTag; + gTasks[taskId].tX = x; + gTasks[taskId].tY = y; + gTasks[taskId].tSubpriority = subpriority; +} + +bool32 IsMinigameCountdownRunning(void) +{ + return FuncIsActiveTask(Task_MinigameCountdown); +} + +static void Task_MinigameCountdown(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + + switch (tState) + { + case 0: + Load321StartGfx(tTilesTag, tPalTag); + tSpriteId1 = CreateNumberSprite(tTilesTag, tPalTag, tX, tY, tSubpriority); + CreateStartSprite(tTilesTag, tPalTag, tX, tY, tSubpriority, &tSpriteId2, &tSpriteId3); + tState++; + break; + case 1: + if (!RunMinigameCountdownDigitsAnim(tSpriteId1)) + { + InitStartGraphic(tSpriteId1, tSpriteId2, tSpriteId3); + FreeSpriteOamMatrix(&gSprites[tSpriteId1]); + DestroySprite(&gSprites[tSpriteId1]); + tState++; + } + break; + case 2: + if (!IsStartGraphicAnimRunning(tSpriteId2)) + { + DestroySprite(&gSprites[tSpriteId2]); + DestroySprite(&gSprites[tSpriteId3]); + FreeSpriteTilesByTag(tTilesTag); + FreeSpritePaletteByTag(tPalTag); + DestroyTask(taskId); + } + break; + } +} + +static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId) +{ + struct Sprite *sprite = &gSprites[spriteId]; + + switch (sprite->data[0]) + { + case 0: + sub_8007E18(sprite, 0x800, 0x1A); + sprite->data[0]++; + // fallthrough + case 1: + if (sprite->data[2] == 0) + PlaySE(SE_KON2); + if (++sprite->data[2] >= 20) + { + sprite->data[2] = 0; + StartSpriteAffineAnim(sprite, 1); + sprite->data[0]++; + } + break; + case 2: + if (sprite->affineAnimEnded) + sprite->data[0]++; + break; + case 3: + if (++sprite->data[2] >= 4) + { + sprite->data[2] = 0; + sprite->data[0]++; + StartSpriteAffineAnim(sprite, 2); + } + break; + case 4: + sprite->pos1.y -= 4; + if (++sprite->data[2] >= 8) + { + if (sprite->data[4] <= 1) + { + StartSpriteAnim(sprite, sprite->data[4] + 1); + sprite->data[2] = 0; + sprite->data[0]++; + } + else + { + sprite->data[0] = 7; + return FALSE; + } + } + break; + case 5: + sprite->pos1.y += 4; + if (++sprite->data[2] >= 8) + { + sprite->data[2] = 0; + StartSpriteAffineAnim(sprite, 3); + sprite->data[0]++; + } + break; + case 6: + if (sprite->affineAnimEnded) + { + sprite->data[4]++; + sprite->data[0] = 1; + } + break; + case 7: + return FALSE; + } + + return TRUE; +} + +// First argument is unused. +static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3) +{ + gSprites[spriteId2].pos2.y = -40; + gSprites[spriteId3].pos2.y = -40; + gSprites[spriteId2].invisible = FALSE; + gSprites[spriteId3].invisible = FALSE; + gSprites[spriteId2].callback = SpriteCB_Start; + gSprites[spriteId3].callback = SpriteCB_Start; +} + +static bool32 IsStartGraphicAnimRunning(u8 spriteId) +{ + return gSprites[spriteId].callback == SpriteCB_Start; +} + +static void SpriteCB_Start(struct Sprite *sprite) +{ + int y; + s16 *data = sprite->data; + + switch (data[0]) + { + case 0: + data[4] = 64; + data[5] = sprite->pos2.y << 4; + data[0]++; + case 1: + data[5] += data[4]; + data[4]++; + sprite->pos2.y = data[5] >> 4; + if (sprite->pos2.y >= 0) + { + PlaySE(SE_KON2); + sprite->pos2.y = 0; + data[0]++; + } + break; + case 2: + data[1] += 12; + if (data[1] >= 128) + { + PlaySE(SE_KON2); + data[1] = 0; + data[0]++; + } + y = gSineTable[data[1]]; + sprite->pos2.y = -(y >> 4); + break; + case 3: + data[1] += 16; + if (data[1] >= 128) + { + PlaySE(SE_KON2); + data[1] = 0; + data[0]++; + } + sprite->pos2.y = -(gSineTable[data[1]] >> 5); + break; + case 4: + if (++data[1] > 40) + sprite->callback = SpriteCallbackDummy; + break; + } +} + +static void Load321StartGfx(u16 tileTag, u16 palTag) +{ + struct CompressedSpriteSheet spriteSheet = {sSpriteSheet_321Start, 0xE00, 0}; + struct SpritePalette spritePalette = {sSpritePal_321Start, 0}; + + spriteSheet.tag = tileTag; + spritePalette.tag = palTag; + + LoadCompressedSpriteSheet(&spriteSheet); + LoadSpritePalette(&spritePalette); +} + +static const struct OamData sOamData_Numbers = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = 0, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0 +}; + +static const struct OamData sOamData_Start = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = 0, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0 +}; + +static const union AnimCmd sAnim_Numbers_Three[] = +{ + ANIMCMD_FRAME(0, 1), + ANIMCMD_END +}; + +static const union AnimCmd sAnim_Numbers_Two[] = +{ + ANIMCMD_FRAME(16, 1), + ANIMCMD_END +}; + +static const union AnimCmd sAnim_Numbers_One[] = +{ + ANIMCMD_FRAME(32, 1), + ANIMCMD_END +}; + +static const union AnimCmd *const sAnimTable_Numbers[] = +{ + sAnim_Numbers_Three, + sAnim_Numbers_Two, + sAnim_Numbers_One +}; + +static const union AnimCmd sAnim_StartLeft[] = +{ + ANIMCMD_FRAME(48, 1), + ANIMCMD_END +}; + +static const union AnimCmd sAnim_StartRight[] = +{ + ANIMCMD_FRAME(80, 1), + ANIMCMD_END +}; + +static const union AnimCmd *const sAnimTable_Start[] = +{ + sAnim_StartLeft, + sAnim_StartRight +}; + +static const union AffineAnimCmd sAffineAnim_Numbers_0[] = +{ + AFFINEANIMCMD_FRAME(256, 256, 0, 0), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sAffineAnim_Numbers_1[] = +{ + AFFINEANIMCMD_FRAME(256, 256, 0, 0), + AFFINEANIMCMD_FRAME(16, -16, 0, 8), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sAffineAnim_Numbers_2[] = +{ + AFFINEANIMCMD_FRAME(-18, 18, 0, 8), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd sAffineAnim_Numbers_3[] = +{ + AFFINEANIMCMD_FRAME( 6, -6, 0, 8), + AFFINEANIMCMD_FRAME( -4, 4, 0, 8), + AFFINEANIMCMD_FRAME(256, 256, 0, 0), + AFFINEANIMCMD_END +}; + +static const union AffineAnimCmd *const sAffineAnimTable_Numbers[] = +{ + sAffineAnim_Numbers_0, + sAffineAnim_Numbers_1, + sAffineAnim_Numbers_2, + sAffineAnim_Numbers_3 +}; + +static u8 CreateNumberSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority) +{ + struct SpriteTemplate spriteTemplate = + { + .oam = &sOamData_Numbers, + .anims = sAnimTable_Numbers, + .affineAnims = sAffineAnimTable_Numbers, + .callback = SpriteCallbackDummy, + }; + + spriteTemplate.tileTag = tileTag; + spriteTemplate.paletteTag = palTag; + return CreateSprite(&spriteTemplate, x, y, subpriority); +} + +static void CreateStartSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2) +{ + struct SpriteTemplate spriteTemplate = + { + .oam = &sOamData_Start, + .anims = sAnimTable_Start, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, + }; + + spriteTemplate.tileTag = tileTag; + spriteTemplate.paletteTag = palTag; + *spriteId1 = CreateSprite(&spriteTemplate, x - 32, y, subpriority); + *spriteId2 = CreateSprite(&spriteTemplate, x + 32, y, subpriority); + + gSprites[*spriteId1].invisible = TRUE; + gSprites[*spriteId2].invisible = TRUE; + StartSpriteAnim(&gSprites[*spriteId2], 1); +} diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 51520cae8..f2f416c35 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -12,6 +12,7 @@ #include "link_rfu.h" #include "main.h" #include "menu.h" +#include "minigame_countdown.h" #include "palette.h" #include "random.h" #include "digit_obj_util.h" @@ -289,21 +290,8 @@ static void sub_802D5E4(void); static void sub_802D72C(void); static void sub_802D688(void); static void Task_ShowPokemonJumpRecords(u8 taskId); -static void sub_802E6D0(u8 taskId); -static void sub_802EB98(u8 taskId); static void sub_802E500(u16 windowId, int width); static void TruncateToFirstWordOnly(u8 *str); -static void sub_802EF50(u16 tileTag, u16 palTag); -static u8 sub_802EFA8(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority); -static void sub_802EFFC(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2); -static bool32 sub_802EC98(u8 spriteId); -static bool32 sub_802EE30(u8 spriteId); -static void sub_802EDCC(u8 spriteId1, u8 spriteId2, u8 spriteId3); -static void sub_802EE5C(struct Sprite *sprite); -static void sub_802E83C(u8 taskId); -static void sub_802E8C8(u8 taskId); -static void sub_802EA50(u8 taskId); -static void sub_802EAB0(u8 taskId); EWRAM_DATA static struct PokemonJump1 *gUnknown_02022CFC = NULL; EWRAM_DATA static struct PokemonJump2 *gUnknown_02022D00 = NULL; @@ -2807,13 +2795,13 @@ static void sub_802CF50(struct PokemonJump2 *arg0, int arg1) static void sub_802D044(struct PokemonJump2 *arg0) { - sub_802EB24(9, 7, 120, 80, 0); + StartMinigameCountdown(9, 7, 120, 80, 0); sub_802CD3C(arg0); } static bool32 sub_802D068(void) { - return sub_802EB84(); + return IsMinigameCountdownRunning(); } static void sub_802D074(struct PokemonJump2 *arg0) @@ -3987,611 +3975,3 @@ static void TruncateToFirstWordOnly(u8 *str) } } } - -static const u16 gPkmnJump321StartPal1[] = INCBIN_U16("graphics/link_games/pkmnjump_321start1.gbapal"); -static const u32 gPkmnJump321StartGfx1[] = INCBIN_U32("graphics/link_games/pkmnjump_321start1.4bpp.lz"); - -static const struct CompressedSpriteSheet gUnknown_082FE6C8[] = -{ - {gPkmnJump321StartGfx1, 0xC00, 0x2000}, - {}, -}; - -static const struct SpritePalette gUnknown_082FE6D8[] = -{ - {gPkmnJump321StartPal1, 0x2000}, - {}, -}; - -static const union AnimCmd sSpriteAnim_82FE6E8[] = -{ - ANIMCMD_FRAME(0, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FE6F0[] = -{ - ANIMCMD_FRAME(16, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FE6F8[] = -{ - ANIMCMD_FRAME(32, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FE700[] = -{ - ANIMCMD_FRAME(64, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FE708[] = -{ - ANIMCMD_FRAME(48, 0), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FE710[] = -{ - ANIMCMD_FRAME(80, 0), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_82FE718[] = -{ - sSpriteAnim_82FE6E8, - sSpriteAnim_82FE6F0, - sSpriteAnim_82FE6F8, - sSpriteAnim_82FE700, - sSpriteAnim_82FE708, - sSpriteAnim_82FE710 -}; - -static const struct SpriteTemplate gUnknown_082FE730[] = -{ - { - .tileTag = 0x2000, - .paletteTag = 0x2000, - .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = sSpriteAnimTable_82FE718, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallbackDummy, - }, -}; - -static const TaskFunc gUnknown_082FE748[][4] = -{ - { - sub_802E83C, - sub_802E8C8, - sub_802EA50, - sub_802EAB0 - }, -}; - -// There's only set of task functions. -static u32 sub_802E63C(u8 funcSetId, u8 taskPriority) -{ - u8 taskId = CreateTask(sub_802E6D0, taskPriority); - struct Task *task = &gTasks[taskId]; - - task->data[0] = 1; - task->data[1] = funcSetId; - gUnknown_082FE748[funcSetId][0](taskId); - return taskId; -} - -static bool32 sub_802E688(void) -{ - u8 taskId = FindTaskIdByFunc(sub_802E6D0); - if (taskId == 0xFF) - return FALSE; - - gTasks[taskId].data[0] = 2; - return TRUE; -} - -static bool32 sub_802E6BC(void) -{ - return FuncIsActiveTask(sub_802E6D0); -} - -static void sub_802E6D0(u8 taskId) -{ - s16 *data = gTasks[taskId].data; - - switch (data[0]) - { - case 2: - gUnknown_082FE748[data[1]][2](taskId); - data[0] = 3; - break; - case 3: - gUnknown_082FE748[data[1]][3](taskId); - break; - case 4: - gUnknown_082FE748[data[1]][1](taskId); - DestroyTask(taskId); - break; - } -} - -static void sub_802E75C(u8 taskId, s16 *data) -{ - u8 i; - struct Sprite *sprite; - - LoadCompressedSpriteSheet(&gUnknown_082FE6C8[data[3]]); - LoadSpritePalette(&gUnknown_082FE6D8[data[4]]); - for (i = 0; i < data[8]; i++) - data[13 + i] = CreateSprite(&gUnknown_082FE730[data[2]], data[9], data[10], data[7]); - for (i = 0; i < data[8]; i++) - { - sprite = &gSprites[data[13 + i]]; - sprite->oam.priority = data[6]; - sprite->invisible = TRUE; - sprite->data[1] = data[5]; - sprite->data[3] = taskId; - sprite->data[4] = i; - sprite->data[5] = data[13]; - } -} - -static void sub_802E83C(u8 taskId) -{ - s16 *data = gTasks[taskId].data; - data[2] = 0; - data[3] = 0; - data[4] = 0; - data[5] = 60; - data[6] = 0; - data[7] = 0; - data[8] = 3; - data[9] = 120; - data[10] = 88; - sub_802E75C(taskId, data); - - StartSpriteAnim(&gSprites[data[14]], 4); - gSprites[data[14]].pos2.x = -32; - - StartSpriteAnim(&gSprites[data[15]], 5); - gSprites[data[15]].pos2.x = 32; -} - -static void sub_802E8C8(u8 taskId) -{ - u8 i = 0; - s16 *data = gTasks[taskId].data; - - for (i = 0; i < data[8]; i++) - DestroySprite(&gSprites[data[13 + i]]); - FreeSpriteTilesByTag(gUnknown_082FE6C8[data[3]].tag); - FreeSpritePaletteByTag(gUnknown_082FE6D8[data[4]].tag); -} - -static void sub_802E938(struct Sprite *sprite) -{ - s16 *data = gTasks[sprite->data[3]].data; - - if (data[11] % data[5] != 0) - return; - if (data[11] == data[10]) - return; - - data[10] = data[11]; - switch (sprite->data[2]) - { - case 0: - sprite->invisible = FALSE; - case 1: - case 2: - PlaySE(SE_KON); - StartSpriteAnim(sprite, sprite->data[2]); - break; - case 3: - PlaySE(SE_PIN); - StartSpriteAnim(sprite, sprite->data[2]); - gSprites[data[14]].invisible = FALSE; - gSprites[data[15]].invisible = FALSE; - break; - case 4: - sprite->invisible = TRUE; - gSprites[data[14]].invisible = TRUE; - gSprites[data[15]].invisible = TRUE; - data[0] = 4; - return; - } - sprite->data[2]++; -} - -static void sub_802EA50(u8 taskId) -{ - s16 *data = gTasks[taskId].data; - PlaySE(SE_KON); - gSprites[data[13]].callback = sub_802E938; - gSprites[data[13]].invisible = FALSE; - gTasks[taskId].data[0] = 3; -} - -static void sub_802EAB0(u8 taskId) -{ - u16 packet[6]; - s16 *data = gTasks[taskId].data; - - if (gReceivedRemoteLinkPlayers != 0) - { - if (gRecvCmds[0][1] == 0x7FFF) - data[11] = gRecvCmds[0][2]; - if (GetMultiplayerId() == 0) - { - data[12]++; - memset(packet, 0, sizeof(packet)); - packet[0] = 0x7FFF; - packet[1] = data[12]; - sub_800FE50(packet); - } - } - else - { - data[11]++; - } -} - -void sub_802EB24(s16 tileTag, s16 palTag, s16 x, s16 y, u8 subpriority) -{ - u8 taskId = CreateTask(sub_802EB98, 0x50); - gTasks[taskId].data[2] = tileTag; - gTasks[taskId].data[3] = palTag; - gTasks[taskId].data[4] = x; - gTasks[taskId].data[5] = y; - gTasks[taskId].data[6] = subpriority; -} - -bool32 sub_802EB84(void) -{ - return FuncIsActiveTask(sub_802EB98); -} - -static void sub_802EB98(u8 taskId) -{ - s16 *data = gTasks[taskId].data; - - switch (data[0]) - { - case 0: - sub_802EF50(data[2], data[3]); - data[7] = sub_802EFA8(data[2], data[3], data[4], data[5], data[6]); - sub_802EFFC(data[2], data[3], data[4], data[5], data[6], &data[8], &data[9]); - data[0]++; - break; - case 1: - if (!sub_802EC98(data[7])) - { - sub_802EDCC(data[7], data[8], data[9]); - FreeSpriteOamMatrix(&gSprites[data[7]]); - DestroySprite(&gSprites[data[7]]); - data[0]++; - } - break; - case 2: - if (!sub_802EE30(data[8])) - { - DestroySprite(&gSprites[data[8]]); - DestroySprite(&gSprites[data[9]]); - FreeSpriteTilesByTag(data[2]); - FreeSpritePaletteByTag(data[3]); - DestroyTask(taskId); - } - break; - } -} - -static bool32 sub_802EC98(u8 spriteId) -{ - struct Sprite *sprite = &gSprites[spriteId]; - - switch (sprite->data[0]) - { - case 0: - sub_8007E18(sprite, 0x800, 0x1A); - sprite->data[0]++; - case 1: - if (sprite->data[2] == 0) - PlaySE(SE_KON2); - if (++sprite->data[2] >= 20) - { - sprite->data[2] = 0; - StartSpriteAffineAnim(sprite, 1); - sprite->data[0]++; - } - break; - case 2: - if (sprite->affineAnimEnded) - sprite->data[0]++; - break; - case 3: - if (++sprite->data[2] >= 4) - { - sprite->data[2] = 0; - sprite->data[0]++; - StartSpriteAffineAnim(sprite, 2); - } - break; - case 4: - sprite->pos1.y -= 4; - if (++sprite->data[2] >= 8) - { - if (sprite->data[4] <= 1) - { - StartSpriteAnim(sprite, sprite->data[4] + 1); - sprite->data[2] = 0; - sprite->data[0]++; - } - else - { - sprite->data[0] = 7; - return FALSE; - } - } - break; - case 5: - sprite->pos1.y += 4; - if (++sprite->data[2] >= 8) - { - sprite->data[2] = 0; - StartSpriteAffineAnim(sprite, 3); - sprite->data[0]++; - } - break; - case 6: - if (sprite->affineAnimEnded) - { - sprite->data[4]++; - sprite->data[0] = 1; - } - break; - case 7: - return FALSE; - } - - return TRUE; -} - -// First argument is unused. -static void sub_802EDCC(u8 spriteId1, u8 spriteId2, u8 spriteId3) -{ - gSprites[spriteId2].pos2.y = -40; - gSprites[spriteId3].pos2.y = -40; - gSprites[spriteId2].invisible = FALSE; - gSprites[spriteId3].invisible = FALSE; - gSprites[spriteId2].callback = sub_802EE5C; - gSprites[spriteId3].callback = sub_802EE5C; -} - -static bool32 sub_802EE30(u8 spriteId) -{ - return (gSprites[spriteId].callback == sub_802EE5C); -} - -static void sub_802EE5C(struct Sprite *sprite) -{ - int y; - s16 *data = sprite->data; - - switch (data[0]) - { - case 0: - data[4] = 64; - data[5] = sprite->pos2.y << 4; - data[0]++; - case 1: - data[5] += data[4]; - data[4]++; - sprite->pos2.y = data[5] >> 4; - if (sprite->pos2.y >= 0) - { - PlaySE(SE_KON2); - sprite->pos2.y = 0; - data[0]++; - } - break; - case 2: - data[1] += 12; - if (data[1] >= 128) - { - PlaySE(SE_KON2); - data[1] = 0; - data[0]++; - } - y = gSineTable[data[1]]; - sprite->pos2.y = -(y >> 4); - break; - case 3: - data[1] += 16; - if (data[1] >= 128) - { - PlaySE(SE_KON2); - data[1] = 0; - data[0]++; - } - sprite->pos2.y = -(gSineTable[data[1]] >> 5); - break; - case 4: - if (++data[1] > 40) - sprite->callback = SpriteCallbackDummy; - break; - } -} - -static const u16 gPkmnJump321StartPal2[] = INCBIN_U16("graphics/link_games/pkmnjump_321start2.gbapal"); -static const u32 gPkmnJump321StartGfx2[] = INCBIN_U32("graphics/link_games/pkmnjump_321start2.4bpp.lz"); - -static void sub_802EF50(u16 tileTag, u16 palTag) -{ - struct CompressedSpriteSheet sprSheet = {gPkmnJump321StartGfx2, 0xE00, 0}; - struct SpritePalette sprPal = {gPkmnJump321StartPal2, 0}; - - sprSheet.tag = tileTag; - sprPal.tag = palTag; - - LoadCompressedSpriteSheet(&sprSheet); - LoadSpritePalette(&sprPal); -} - -static const struct OamData sOamData_82FEBDC = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 0, - .paletteNum = 0, - .affineParam = 0 -}; - -static const struct OamData sOamData_82FEBE4 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .matrixNum = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 0, - .paletteNum = 0, - .affineParam = 0 -}; - -static const union AnimCmd sSpriteAnim_82FEBEC[] = -{ - ANIMCMD_FRAME(0, 1), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FEBF4[] = -{ - ANIMCMD_FRAME(16, 1), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FEBFC[] = -{ - ANIMCMD_FRAME(32, 1), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_82FEC04[] = -{ - sSpriteAnim_82FEBEC, - sSpriteAnim_82FEBF4, - sSpriteAnim_82FEBFC -}; - -static const union AnimCmd sSpriteAnim_82FEC10[] = -{ - ANIMCMD_FRAME(48, 1), - ANIMCMD_END -}; - -static const union AnimCmd sSpriteAnim_82FEC18[] = -{ - ANIMCMD_FRAME(80, 1), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_82FEC20[] = -{ - sSpriteAnim_82FEC10, - sSpriteAnim_82FEC18 -}; - -static const union AffineAnimCmd sSpriteAffineAnim_82FEC28[] = -{ - AFFINEANIMCMD_FRAME(256, 256, 0, 0), - AFFINEANIMCMD_END -}; - -static const union AffineAnimCmd sSpriteAffineAnim_82FEC38[] = -{ - AFFINEANIMCMD_FRAME(256, 256, 0, 0), - AFFINEANIMCMD_FRAME(16, -16, 0, 8), - AFFINEANIMCMD_END -}; - -static const union AffineAnimCmd sSpriteAffineAnim_82FEC50[] = -{ - AFFINEANIMCMD_FRAME(-18, 18, 0, 8), - AFFINEANIMCMD_END -}; - -static const union AffineAnimCmd sSpriteAffineAnim_82FEC60[] = -{ - AFFINEANIMCMD_FRAME(6, -6, 0, 8), - AFFINEANIMCMD_FRAME(-4, 4, 0, 8), - AFFINEANIMCMD_FRAME(256, 256, 0, 0), - AFFINEANIMCMD_END -}; - -static const union AffineAnimCmd *const sSpriteAffineAnimTable_82FEC80[] = -{ - sSpriteAffineAnim_82FEC28, - sSpriteAffineAnim_82FEC38, - sSpriteAffineAnim_82FEC50, - sSpriteAffineAnim_82FEC60 -}; - -static u8 sub_802EFA8(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority) -{ - u8 spriteId; - struct SpriteTemplate sprTemplate = - { - .tileTag = 0, - .paletteTag = 0, - .oam = &sOamData_82FEBDC, - .anims = sSpriteAnimTable_82FEC04, - .images = NULL, - .affineAnims = sSpriteAffineAnimTable_82FEC80, - .callback = SpriteCallbackDummy, - }; - - sprTemplate.tileTag = tileTag; - sprTemplate.paletteTag = palTag; - spriteId = CreateSprite(&sprTemplate, x, y, subpriority); - return spriteId; -} - -static void sub_802EFFC(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 *spriteId1, s16 *spriteId2) -{ - struct SpriteTemplate sprTemplate = - { - .tileTag = 0, - .paletteTag = 0, - .oam = &sOamData_82FEBE4, - .anims = sSpriteAnimTable_82FEC20, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCallbackDummy, - }; - - sprTemplate.tileTag = tileTag; - sprTemplate.paletteTag = palTag; - *spriteId1 = CreateSprite(&sprTemplate, x - 32, y, subpriority); - *spriteId2 = CreateSprite(&sprTemplate, x + 32, y, subpriority); - - gSprites[*spriteId1].invisible = TRUE; - gSprites[*spriteId2].invisible = TRUE; - StartSpriteAnim(&gSprites[*spriteId2], 1); -} From 7a5deff0bc0f9ab00981e34680015c84618155b9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 9 Apr 2020 15:18:53 -0400 Subject: [PATCH 22/34] Add misc party constant usage --- include/constants/global.h | 1 + include/party_menu.h | 4 +-- src/battle_dome.c | 2 +- src/battle_pike.c | 26 +++++++++---------- src/battle_tower.c | 53 +++++++++++++++++++------------------- src/frontier_util.c | 6 ++--- src/hall_of_fame.c | 8 +++--- src/party_menu.c | 10 +++---- src/pokemon.c | 6 ++--- src/union_room_battle.c | 6 ++--- 10 files changed, 62 insertions(+), 60 deletions(-) diff --git a/include/constants/global.h b/include/constants/global.h index 7c96de511..c7063d71c 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -67,6 +67,7 @@ #define FRONTIER_DOUBLES_PARTY_SIZE 4 #define FRONTIER_MULTI_PARTY_SIZE 2 #define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE +#define UNION_ROOM_PARTY_SIZE 2 // string lengths #define ITEM_NAME_LENGTH 14 diff --git a/include/party_menu.h b/include/party_menu.h index 126931762..7f51d08c9 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -24,8 +24,8 @@ extern struct PartyMenu gPartyMenu; extern bool8 gPartyMenuUseExitCallback; extern u8 gSelectedMonPartyId; extern MainCallback gPostMenuFieldCallback; -extern u8 gSelectedOrderFromParty[4]; -extern u8 gBattlePartyCurrentOrder[3]; +extern u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE]; +extern u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2]; extern void (*gItemUseCB)(u8, TaskFunc); diff --git a/src/battle_dome.c b/src/battle_dome.c index 746d195d9..e4947825d 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2578,7 +2578,7 @@ static void CreateDomeOpponentMons(u16 tournamentTrainerId) // Create mon if it was selected, starting from back for (i = FRONTIER_PARTY_SIZE - 1; i >= 0; i--) { - if (selectedMonBits & 4) + if (selectedMonBits & (1 << (FRONTIER_PARTY_SIZE - 1))) { CreateDomeOpponentMon(monsCount, tournamentTrainerId, i, otId); monsCount++; diff --git a/src/battle_pike.c b/src/battle_pike.c index 9bc7254ec..6b31419a5 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -874,20 +874,20 @@ static bool8 TryInflictRandomStatus(void) { u8 j, i; u8 count; - u8 indices[3]; + u8 indices[FRONTIER_PARTY_SIZE]; u32 status; u16 species; bool8 statusChosen; struct Pokemon *mon; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) indices[i] = i; for (j = 0; j < 10; j++) { u8 temp, id; - i = Random() % 3; - id = Random() % 3; + i = Random() % FRONTIER_PARTY_SIZE; + id = Random() % FRONTIER_PARTY_SIZE; SWAP(indices[i], indices[id], temp); } @@ -921,7 +921,7 @@ static bool8 TryInflictRandomStatus(void) { status = sStatusFlags; j = 0; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { mon = &gPlayerParty[indices[i]]; if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE @@ -963,7 +963,7 @@ static bool8 TryInflictRandomStatus(void) } j = 0; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { mon = &gPlayerParty[indices[i]]; if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE @@ -995,7 +995,7 @@ static bool8 AtLeastOneHealthyMon(void) count = 3; healthyMonsCount = 0; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { struct Pokemon *mon = &gPlayerParty[i]; if (GetAilmentFromStatus(GetMonData(mon, MON_DATA_STATUS)) == AILMENT_NONE @@ -1262,23 +1262,23 @@ static void Task_DoStatusInflictionScreenFlash(u8 taskId) static void TryHealMons(u8 healCount) { u8 j, i, k; - u8 indices[3]; + u8 indices[FRONTIER_PARTY_SIZE]; if (healCount == 0) return; - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) indices[i] = i; for (k = 0; k < 10; k++) { u8 temp; - i = Random() % 3; - j = Random() % 3; + i = Random() % FRONTIER_PARTY_SIZE; + j = Random() % FRONTIER_PARTY_SIZE; SWAP(indices[i], indices[j], temp); } - for (i = 0; i < 3; i++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++) { bool32 canBeHealed = FALSE; struct Pokemon *mon = &gPlayerParty[indices[i]]; @@ -1483,7 +1483,7 @@ static bool8 AtLeastTwoAliveMons(void) mon = &gPlayerParty[0]; countDead = 0; - for (i = 0; i < 3; i++, mon++) + for (i = 0; i < FRONTIER_PARTY_SIZE; i++, mon++) { if (GetMonData(mon, MON_DATA_HP) == 0) countDead++; diff --git a/src/battle_tower.c b/src/battle_tower.c index 4890e7a05..4695d9aa0 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -24,6 +24,7 @@ #include "tv.h" #include "battle_factory.h" #include "constants/apprentice.h" +#include "constants/battle_dome.h" #include "constants/battle_frontier.h" #include "constants/battle_frontier_mons.h" #include "constants/battle_tent_mons.h" @@ -2054,7 +2055,7 @@ void DoSpecialTrainerBattle(void) if (VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_DOUBLES) gBattleTypeFlags |= BATTLE_TYPE_DOUBLE; if (gTrainerBattleOpponent_A == TRAINER_FRONTIER_BRAIN) - FillFrontierTrainerParty(2); + FillFrontierTrainerParty(DOME_BATTLE_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); sub_806E694(0); BattleTransition_StartOnField(sub_80B100C(3)); @@ -2211,12 +2212,12 @@ static void nullsub_116(void) static void GetApprenticeMultiPartnerParty(u16 trainerId) { s32 i, count; - u32 validSpecies[3]; + u32 validSpecies[MULTI_PARTY_SIZE]; u16 species1 = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES, NULL); u16 species2 = GetMonData(&gPlayerParty[1], MON_DATA_SPECIES, NULL); count = 0; - for (i = 0; i < 3; i++) + for (i = 0; i < MULTI_PARTY_SIZE; i++) { u16 apprenticeSpecies = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[i].species; if (apprenticeSpecies != species1 && apprenticeSpecies != species2) @@ -2340,7 +2341,7 @@ static void LoadMultiPartnerCandidatesData(void) && gSaveBlock2Ptr->apprentices[i].lvlMode - 1 == lvlMode) { k = 0; - for (j = 0; j < 3; j++) + for (j = 0; j < MULTI_PARTY_SIZE; j++) { if (species1 != gSaveBlock2Ptr->apprentices[i].party[j].species && species2 != gSaveBlock2Ptr->apprentices[i].party[j].species) @@ -2948,26 +2949,26 @@ static void FillPartnerParty(u16 trainerId) if (trainerId == TRAINER_STEVEN_PARTNER) { - for (i = 0; i < 3; i++) + for (i = 0; i < MULTI_PARTY_SIZE; i++) { do { j = Random32(); } while (IsShinyOtIdPersonality(STEVEN_OTID, j) || sStevenMons[i].nature != GetNatureFromPersonality(j)); - CreateMon(&gPlayerParty[3 + i], + CreateMon(&gPlayerParty[MULTI_PARTY_SIZE + i], sStevenMons[i].species, sStevenMons[i].level, sStevenMons[i].fixedIV, TRUE, i, // BUG: personality was stored in the 'j' variable. As a result, Steven's pokemon do not have the intended natures. OT_ID_PRESET, STEVEN_OTID); for (j = 0; j < PARTY_SIZE; j++) - SetMonData(&gPlayerParty[3 + i], MON_DATA_HP_EV + j, &sStevenMons[i].evs[j]); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_HP_EV + j, &sStevenMons[i].evs[j]); for (j = 0; j < MAX_MON_MOVES; j++) - SetMonMoveSlot(&gPlayerParty[3 + i], sStevenMons[i].moves[j], j); - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_NAME, gTrainers[TRAINER_STEVEN].trainerName); + SetMonMoveSlot(&gPlayerParty[MULTI_PARTY_SIZE + i], sStevenMons[i].moves[j], j); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_NAME, gTrainers[TRAINER_STEVEN].trainerName); j = MALE; - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_GENDER, &j); - CalculateMonStats(&gPlayerParty[3 + i]); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j); + CalculateMonStats(&gPlayerParty[MULTI_PARTY_SIZE + i]); } } else if (trainerId == TRAINER_EREADER) @@ -2980,10 +2981,10 @@ static void FillPartnerParty(u16 trainerId) level = SetFacilityPtrsGetLevel(); ivs = GetFrontierTrainerFixedIvs(trainerId); otID = Random32(); - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_MULTI_PARTY_SIZE; i++) { monId = gSaveBlock2Ptr->frontier.trainerIds[i + 18]; - CreateMonWithEVSpreadNatureOTID(&gPlayerParty[3 + i], + CreateMonWithEVSpreadNatureOTID(&gPlayerParty[MULTI_PARTY_SIZE + i], gFacilityTrainerMons[monId].species, level, gFacilityTrainerMons[monId].nature, @@ -2993,23 +2994,23 @@ static void FillPartnerParty(u16 trainerId) friendship = MAX_FRIENDSHIP; for (j = 0; j < MAX_MON_MOVES; j++) { - SetMonMoveSlot(&gPlayerParty[3 + i], gFacilityTrainerMons[monId].moves[j], j); + SetMonMoveSlot(&gPlayerParty[MULTI_PARTY_SIZE + i], gFacilityTrainerMons[monId].moves[j], j); if (gFacilityTrainerMons[monId].moves[j] == MOVE_FRUSTRATION) friendship = 0; } - SetMonData(&gPlayerParty[3 + i], MON_DATA_FRIENDSHIP, &friendship); - SetMonData(&gPlayerParty[3 + i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_FRIENDSHIP, &friendship); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]); for (j = 0; j < PLAYER_NAME_LENGTH + 1; j++) trainerName[j] = gFacilityTrainers[trainerId].trainerName[j]; - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_NAME, &trainerName); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_NAME, &trainerName); j = IsFrontierTrainerFemale(trainerId); - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_GENDER, &j); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j); } } else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE) { trainerId -= TRAINER_RECORD_MIXING_FRIEND; - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_MULTI_PARTY_SIZE; i++) { struct EmeraldBattleTowerRecord *record = &gSaveBlock2Ptr->frontier.towerRecords[trainerId]; struct BattleTowerPokemon monData = record->party[gSaveBlock2Ptr->frontier.trainerIds[18 + i]]; @@ -3027,20 +3028,20 @@ static void FillPartnerParty(u16 trainerId) if (monData.nickname[0] == EXT_CTRL_CODE_BEGIN && monData.nickname[1] == EXT_CTRL_CODE_JPN) trainerName[5] = EOS; } - CreateBattleTowerMon2(&gPlayerParty[3 + i], &monData, TRUE); - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_NAME, trainerName); + CreateBattleTowerMon2(&gPlayerParty[MULTI_PARTY_SIZE + i], &monData, TRUE); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_NAME, trainerName); j = IsFrontierTrainerFemale(trainerId + TRAINER_RECORD_MIXING_FRIEND); - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_GENDER, &j); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j); } } else { trainerId -= TRAINER_RECORD_MIXING_APPRENTICE; - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_MULTI_PARTY_SIZE; i++) { - CreateApprenticeMon(&gPlayerParty[3 + i], &gSaveBlock2Ptr->apprentices[trainerId], gSaveBlock2Ptr->frontier.trainerIds[18 + i]); + CreateApprenticeMon(&gPlayerParty[MULTI_PARTY_SIZE + i], &gSaveBlock2Ptr->apprentices[trainerId], gSaveBlock2Ptr->frontier.trainerIds[18 + i]); j = IsFrontierTrainerFemale(trainerId + TRAINER_RECORD_MIXING_APPRENTICE); - SetMonData(&gPlayerParty[3 + i], MON_DATA_OT_GENDER, &j); + SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j); } } } @@ -3351,7 +3352,7 @@ static void SetNextBattleTentOpponent(void) static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) { s32 i, j; - u16 chosenMonIndices[4]; + u16 chosenMonIndices[MAX_FRONTIER_PARTY_SIZE]; u8 friendship; u8 level = SetTentPtrsGetLevel(); u8 fixedIV = 0; diff --git a/src/frontier_util.c b/src/frontier_util.c index f46c60391..668771375 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -94,7 +94,7 @@ static const u8 sFrontierBrainStreakAppearances[NUM_FRONTIER_FACILITIES][4] = [FRONTIER_FACILITY_PYRAMID] = {21, 70, 35, 0}, }; -static const struct FrontierBrainMon sFrontierBrainsMons[][2][3] = +static const struct FrontierBrainMon sFrontierBrainsMons[][2][FRONTIER_PARTY_SIZE] = { [FRONTIER_FACILITY_TOWER] = { @@ -1778,9 +1778,9 @@ void ResetWinStreaks(void) s32 battleMode, lvlMode; gSaveBlock2Ptr->frontier.winStreakActiveFlags = 0; - for (battleMode = 0; battleMode < 4; battleMode++) + for (battleMode = 0; battleMode < FRONTIER_MODE_COUNT; battleMode++) { - for (lvlMode = 0; lvlMode < 2; lvlMode++) + for (lvlMode = 0; lvlMode < FRONTIER_LVL_TENT; lvlMode++) { gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] = 0; if (battleMode < FRONTIER_MODE_MULTIS) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 065d25582..05e4ed0aa 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -155,7 +155,7 @@ static const struct CompressedSpritePalette sHallOfFame_ConfettiSpritePalette[] {}, }; -static const s16 sHallOfFame_MonFullTeamPositions[6][4] = +static const s16 sHallOfFame_MonFullTeamPositions[PARTY_SIZE][4] = { {120, 210, 120, 40}, {326, 220, 56, 40}, @@ -165,7 +165,7 @@ static const s16 sHallOfFame_MonFullTeamPositions[6][4] = {310, -92, 40, 88} }; -static const s16 sHallOfFame_MonHalfTeamPositions[3][4] = +static const s16 sHallOfFame_MonHalfTeamPositions[PARTY_SIZE / 2][4] = { {120, 234, 120, 64}, {326, 244, 56, 64}, @@ -544,7 +544,7 @@ static void Task_Hof_DisplayMon(u8 taskId) u16 currMonId = gTasks[taskId].tDisplayedMonId; struct HallofFameMon* currMon = &sHofMonPtr->mon[currMonId]; - if (gTasks[taskId].tMonNumber > 3) + if (gTasks[taskId].tMonNumber > PARTY_SIZE / 2) { xPos = sHallOfFame_MonFullTeamPositions[currMonId][0]; yPos = sHallOfFame_MonFullTeamPositions[currMonId][1]; @@ -893,7 +893,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId) u16 spriteId; s16 posX, posY; - if (gTasks[taskId].tMonNo > 3) + if (gTasks[taskId].tMonNo > PARTY_SIZE / 2) { posX = sHallOfFame_MonFullTeamPositions[i][2]; posY = sHallOfFame_MonFullTeamPositions[i][3]; diff --git a/src/party_menu.c b/src/party_menu.c index 0a119f03d..43bdc46ec 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -152,7 +152,7 @@ EWRAM_DATA u8 gSelectedMonPartyId = 0; EWRAM_DATA MainCallback gPostMenuFieldCallback = NULL; static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // -EWRAM_DATA u8 gSelectedOrderFromParty[4] = {0}; +EWRAM_DATA u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE] = {0}; static EWRAM_DATA u16 sPartyMenuItemId = 0; static EWRAM_DATA u16 sUnused_0203CEFE = 0; EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on @@ -5624,9 +5624,9 @@ static u8 GetMaxBattleEntries(void) switch (VarGet(VAR_FRONTIER_FACILITY)) { case FACILITY_MULTI_OR_EREADER: - return 3; + return MULTI_PARTY_SIZE; case FACILITY_UNION_ROOM: - return 2; + return UNION_ROOM_PARTY_SIZE; default: // Battle Frontier return gSpecialVar_0x8005; } @@ -5639,7 +5639,7 @@ static u8 GetMinBattleEntries(void) case FACILITY_MULTI_OR_EREADER: return 1; case FACILITY_UNION_ROOM: - return 2; + return UNION_ROOM_PARTY_SIZE; default: // Battle Frontier return gSpecialVar_0x8005; } @@ -6074,7 +6074,7 @@ static void Task_MultiPartnerPartySlideIn(u8 taskId) SlideMultiPartyMenuBoxSpritesOneStep(taskId); if (tXPos == 0) { - for (i = 3; i < PARTY_SIZE; i++) + for (i = MULTI_PARTY_SIZE; i < PARTY_SIZE; i++) { if (gMultiPartnerParty[i - MULTI_PARTY_SIZE].species != SPECIES_NONE) AnimateSelectedPartyIcon(sPartyMenuBoxes[i].monSpriteId, 0); diff --git a/src/pokemon.c b/src/pokemon.c index ec29af02d..87ea2551f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4394,7 +4394,7 @@ u8 CalculatePlayerPartyCount(void) { gPlayerPartyCount = 0; - while (gPlayerPartyCount < 6 + while (gPlayerPartyCount < PARTY_SIZE && GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gPlayerPartyCount++; @@ -4407,7 +4407,7 @@ u8 CalculateEnemyPartyCount(void) { gEnemyPartyCount = 0; - while (gEnemyPartyCount < 6 + while (gEnemyPartyCount < PARTY_SIZE && GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gEnemyPartyCount++; @@ -4494,7 +4494,7 @@ void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord) SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleResources->secretBase->party.heldItems[i]); - for (j = 0; j < 6; j++) + for (j = 0; j < NUM_STATS; j++) SetMonData(&gEnemyParty[i], MON_DATA_HP_EV + j, &gBattleResources->secretBase->party.EVs[i]); for (j = 0; j < MAX_MON_MOVES; j++) diff --git a/src/union_room_battle.c b/src/union_room_battle.c index c80340da3..18dd7c320 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -451,15 +451,15 @@ void sub_801AAD4(void) { s32 i; sub_8014210(10); - for (i = 0; i < 2; i++) + for (i = 0; i < UNION_ROOM_PARTY_SIZE; i++) { gEnemyParty[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1]; } - for (i = 0; i < 6; i++) + for (i = 0; i < PARTY_SIZE; i++) { ZeroMonData(&gPlayerParty[i]); } - for (i = 0; i < 2; i++) + for (i = 0; i < UNION_ROOM_PARTY_SIZE; i++) { gPlayerParty[i] = gEnemyParty[i]; } From 2615a6838e5cfcfdc40564e099c7e88e9ab253bf Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 9 Apr 2020 19:23:39 -0400 Subject: [PATCH 23/34] Label unknown anims --- src/data/pokemon_graphics/front_pic_anims.h | 3 + src/data/pokemon_graphics/unknown_anims.h | 2256 ++++++++++--------- 2 files changed, 1134 insertions(+), 1125 deletions(-) diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index 4c97af1a7..671fc5fad 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -7391,3 +7391,6 @@ const union AnimCmd *const *const gMonFrontAnimsPtrTable[] = ANIM_CMD(UNOWN_EMARK), ANIM_CMD(UNOWN_QMARK), }; + +#undef ANIM_CMD +#undef ANIM_CMD_FULL diff --git a/src/data/pokemon_graphics/unknown_anims.h b/src/data/pokemon_graphics/unknown_anims.h index bb4862d09..ea7ab34a2 100644 --- a/src/data/pokemon_graphics/unknown_anims.h +++ b/src/data/pokemon_graphics/unknown_anims.h @@ -1,5 +1,5 @@ // unused and unkown -static const union AnimCmd gUnknown_082FF71C[] = +static const union AnimCmd sUnknownAnim_BLAZIKEN_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(1, 25), @@ -9,7 +9,7 @@ static const union AnimCmd gUnknown_082FF71C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF734[] = +static const union AnimCmd sUnknownAnim_BLAZIKEN_2[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(2, 8), @@ -17,20 +17,20 @@ static const union AnimCmd gUnknown_082FF734[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF744[] = +static const union AnimCmd sUnknownAnim_BLAZIKEN_3[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(2, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF750[] = +static const union AnimCmd sUnknownAnim_BLAZIKEN_4[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF758[] = +static const union AnimCmd sUnknownAnim_MARSHTOMP_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(1, 5), @@ -41,7 +41,7 @@ static const union AnimCmd gUnknown_082FF758[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF774[] = +static const union AnimCmd sUnknownAnim_MARSHTOMP_2[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(2, 12), @@ -52,14 +52,14 @@ static const union AnimCmd gUnknown_082FF774[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF790[] = +static const union AnimCmd sUnknownAnim_MARSHTOMP_3[] = { ANIMCMD_FRAME(0, 14), ANIMCMD_FRAME(2, 12), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF79C[] = +static const union AnimCmd sUnknownAnim_POOCHYENA_1[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(1, 10), @@ -68,7 +68,7 @@ static const union AnimCmd gUnknown_082FF79C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7B0[] = +static const union AnimCmd sUnknownAnim_POOCHYENA_2[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(2, 10), @@ -77,193 +77,193 @@ static const union AnimCmd gUnknown_082FF7B0[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7C4[] = +static const union AnimCmd sUnknownAnim_MIGHTYENA_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7CC[] = +static const union AnimCmd sUnknownAnim_ZIGZAGOON_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7D4[] = +static const union AnimCmd sUnknownAnim_LINOONE_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7DC[] = +static const union AnimCmd sUnknownAnim_WURMPLE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7E4[] = +static const union AnimCmd sUnknownAnim_WURMPLE_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7EC[] = +static const union AnimCmd sUnknownAnim_SILCOON_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7F4[] = +static const union AnimCmd sUnknownAnim_SILCOON_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF7FC[] = +static const union AnimCmd sUnknownAnim_BEAUTIFLY_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF804[] = +static const union AnimCmd sUnknownAnim_BEAUTIFLY_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF80C[] = +static const union AnimCmd sUnknownAnim_CASCOON_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF814[] = +static const union AnimCmd sUnknownAnim_CASCOON_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF81C[] = +static const union AnimCmd sUnknownAnim_DUSTOX_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF824[] = +static const union AnimCmd sUnknownAnim_DUSTOX_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF82C[] = +static const union AnimCmd sUnknownAnim_LOMBRE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF834[] = +static const union AnimCmd sUnknownAnim_LUDICOLO_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF83C[] = +static const union AnimCmd sUnknownAnim_LUDICOLO_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF844[] = +static const union AnimCmd sUnknownAnim_SEEDOT_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF84C[] = +static const union AnimCmd sUnknownAnim_NUZLEAF_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF854[] = +static const union AnimCmd sUnknownAnim_SHIFTRY_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF85C[] = +static const union AnimCmd sUnknownAnim_SHIFTRY_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF864[] = +static const union AnimCmd sUnknownAnim_TAILLOW_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF86C[] = +static const union AnimCmd sUnknownAnim_SWELLOW_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF874[] = +static const union AnimCmd sUnknownAnim_SHROOMISH_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF87C[] = +static const union AnimCmd sUnknownAnim_BRELOOM_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF884[] = +static const union AnimCmd sUnknownAnim_WINGULL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF88C[] = +static const union AnimCmd sUnknownAnim_PELIPPER_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF894[] = +static const union AnimCmd sUnknownAnim_PELIPPER_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF89C[] = +static const union AnimCmd sUnknownAnim_SURSKIT_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF8A4[] = +static const union AnimCmd sUnknownAnim_SURSKIT_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF8AC[] = +static const union AnimCmd sUnknownAnim_MASQUERAIN_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF8B4[] = +static const union AnimCmd sUnknownAnim_MASQUERAIN_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF8BC[] = +static const union AnimCmd sUnknownAnim_WAILMER_1[] = { ANIMCMD_FRAME(0, 15), ANIMCMD_FRAME(8, 15), @@ -283,7 +283,7 @@ static const union AnimCmd gUnknown_082FF8BC[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF8FC[] = +static const union AnimCmd sUnknownAnim_WAILMER_2[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(8, 15), @@ -295,7 +295,7 @@ static const union AnimCmd gUnknown_082FF8FC[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF91C[] = +static const union AnimCmd sUnknownAnim_WAILMER_3[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(9, 10), @@ -304,26 +304,26 @@ static const union AnimCmd gUnknown_082FF91C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF930[] = +static const union AnimCmd sUnknownAnim_WAILMER_4[] = { ANIMCMD_FRAME(0, 15), ANIMCMD_FRAME(11, 15), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF93C[] = +static const union AnimCmd sUnknownAnim_SKITTY_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF944[] = +static const union AnimCmd sUnknownAnim_DELCATTY_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF94C[] = +static const union AnimCmd sUnknownAnim_KECLEON_1[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_FRAME(1, 7), @@ -350,7 +350,7 @@ static const union AnimCmd gUnknown_082FF94C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF9A8[] = +static const union AnimCmd sUnknownAnim_KECLEON_2[] = { ANIMCMD_FRAME(0, 12), ANIMCMD_FRAME(7, 12), @@ -376,7 +376,7 @@ static const union AnimCmd gUnknown_082FF9A8[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA00[] = +static const union AnimCmd sUnknownAnim_KECLEON_3[] = { ANIMCMD_FRAME(0, 12), ANIMCMD_FRAME(7, 12), @@ -402,182 +402,182 @@ static const union AnimCmd gUnknown_082FFA00[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA58[] = +static const union AnimCmd sUnknownAnim_KECLEON_4[] = { ANIMCMD_FRAME(0,18), ANIMCMD_FRAME(10, 18), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA64[] = +static const union AnimCmd sUnknownAnim_BALTOY_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA6C[] = +static const union AnimCmd sUnknownAnim_CLAYDOL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA74[] = +static const union AnimCmd sUnknownAnim_NOSEPASS_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA7C[] = +static const union AnimCmd sUnknownAnim_SABLEYE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA84[] = +static const union AnimCmd sUnknownAnim_SABLEYE_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA8C[] = +static const union AnimCmd sUnknownAnim_LUVDISC_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA94[] = +static const union AnimCmd sUnknownAnim_LUVDISC_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFA9C[] = +static const union AnimCmd sUnknownAnim_FEEBAS_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAA4[] = +static const union AnimCmd sUnknownAnim_FEEBAS_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAAC[] = +static const union AnimCmd sUnknownAnim_MILOTIC_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAB4[] = +static const union AnimCmd sUnknownAnim_MILOTIC_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFABC[] = +static const union AnimCmd sUnknownAnim_CARVANHA_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAC4[] = +static const union AnimCmd sUnknownAnim_CARVANHA_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFACC[] = +static const union AnimCmd sUnknownAnim_SHARPEDO_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAD4[] = +static const union AnimCmd sUnknownAnim_SHARPEDO_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFADC[] = +static const union AnimCmd sUnknownAnim_TRAPINCH_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAE4[] = +static const union AnimCmd sUnknownAnim_VIBRAVA_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAEC[] = +static const union AnimCmd sUnknownAnim_FLYGON_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAF4[] = +static const union AnimCmd sUnknownAnim_MAKUHITA_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFAFC[] = +static const union AnimCmd sUnknownAnim_HARIYAMA_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB04[] = +static const union AnimCmd sUnknownAnim_ELECTRIKE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB0C[] = +static const union AnimCmd sUnknownAnim_ELECTRIKE_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB14[] = +static const union AnimCmd sUnknownAnim_MANECTRIC_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB1C[] = +static const union AnimCmd sUnknownAnim_NUMEL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB24[] = +static const union AnimCmd sUnknownAnim_NUMEL_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB2C[] = +static const union AnimCmd sUnknownAnim_CAMERUPT_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB34[] = +static const union AnimCmd sUnknownAnim_SPHEAL_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB3C[] = +static const union AnimCmd sUnknownAnim_SEALEO_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB44[] = +static const union AnimCmd sUnknownAnim_WALREIN_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(1, 18), @@ -588,7 +588,7 @@ static const union AnimCmd gUnknown_082FFB44[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB60[] = +static const union AnimCmd sUnknownAnim_WALREIN_2[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(2, 18), @@ -599,7 +599,7 @@ static const union AnimCmd gUnknown_082FFB60[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFB7C[] = +static const union AnimCmd sUnknownAnim_AZURILL_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(2, 5), @@ -619,7 +619,7 @@ static const union AnimCmd gUnknown_082FFB7C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFBBC[] = +static const union AnimCmd sUnknownAnim_AZURILL_2[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(1, 6), @@ -632,7 +632,7 @@ static const union AnimCmd gUnknown_082FFBBC[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFBE0[] = +static const union AnimCmd sUnknownAnim_AZURILL_3[] = { ANIMCMD_FRAME(0, 12), ANIMCMD_FRAME(5, 12), @@ -641,61 +641,61 @@ static const union AnimCmd gUnknown_082FFBE0[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFBF4[] = +static const union AnimCmd sUnknownAnim_AZURILL_4[] = { ANIMCMD_FRAME(7, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFBFC[] = +static const union AnimCmd sUnknownAnim_SPOINK_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC04[] = +static const union AnimCmd sUnknownAnim_SPOINK_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC0C[] = +static const union AnimCmd sUnknownAnim_GRUMPIG_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC14[] = +static const union AnimCmd sUnknownAnim_PLUSLE_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC1C[] = +static const union AnimCmd sUnknownAnim_MINUN_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC24[] = +static const union AnimCmd sUnknownAnim_MAWILE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC2C[] = +static const union AnimCmd sUnknownAnim_MEDITITE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC34[] = +static const union AnimCmd sUnknownAnim_MEDICHAM_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC3C[] = +static const union AnimCmd sUnknownAnim_SWABLU_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(1, 10), @@ -706,7 +706,7 @@ static const union AnimCmd gUnknown_082FFC3C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC58[] = +static const union AnimCmd sUnknownAnim_SWABLU_2[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(2, 8), @@ -717,217 +717,217 @@ static const union AnimCmd gUnknown_082FFC58[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC74[] = +static const union AnimCmd sUnknownAnim_ALTARIA_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC7C[] = +static const union AnimCmd sUnknownAnim_WYNAUT_1[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC84[] = +static const union AnimCmd sUnknownAnim_WYNAUT_2[] = { ANIMCMD_FRAME(1, 9), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC8C[] = +static const union AnimCmd sUnknownAnim_DUSKULL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC94[] = +static const union AnimCmd sUnknownAnim_DUSKULL_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFC9C[] = +static const union AnimCmd sUnknownAnim_DUSCLOPS_1[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCA4[] = +static const union AnimCmd sUnknownAnim_DUSCLOPS_2[] = { ANIMCMD_FRAME(1, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCAC[] = +static const union AnimCmd sUnknownAnim_SLAKOTH_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCB4[] = +static const union AnimCmd sUnknownAnim_VIGOROTH_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCBC[] = +static const union AnimCmd sUnknownAnim_SLAKING_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCC4[] = +static const union AnimCmd sUnknownAnim_GULPIN_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCCC[] = +static const union AnimCmd sUnknownAnim_SWALOT_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCD4[] = +static const union AnimCmd sUnknownAnim_TROPIUS_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCDC[] = +static const union AnimCmd sUnknownAnim_CLAMPERL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCE4[] = +static const union AnimCmd sUnknownAnim_ABSOL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCEC[] = +static const union AnimCmd sUnknownAnim_SHUPPET_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCF4[] = +static const union AnimCmd sUnknownAnim_SHUPPET_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFCFC[] = +static const union AnimCmd sUnknownAnim_BANETTE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD04[] = +static const union AnimCmd sUnknownAnim_ARON_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD0C[] = +static const union AnimCmd sUnknownAnim_LAIRON_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD14[] = +static const union AnimCmd sUnknownAnim_AGGRON_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD1C[] = +static const union AnimCmd sUnknownAnim_CASTFORM_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD24[] = +static const union AnimCmd sUnknownAnim_CASTFORM_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD2C[] = +static const union AnimCmd sUnknownAnim_CASTFORM_3[] = { ANIMCMD_FRAME(2, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD34[] = +static const union AnimCmd sUnknownAnim_CASTFORM_4[] = { ANIMCMD_FRAME(3, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD3C[] = +static const union AnimCmd sUnknownAnim_VOLBEAT_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD44[] = +static const union AnimCmd sUnknownAnim_ILLUMISE_1[] = { ANIMCMD_FRAME(0, 63), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD4C[] = +static const union AnimCmd sUnknownAnim_BAGON_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD54[] = +static const union AnimCmd sUnknownAnim_BAGON_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD5C[] = +static const union AnimCmd sUnknownAnim_SALAMENCE_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD64[] = +static const union AnimCmd sUnknownAnim_SALAMENCE_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD6C[] = +static const union AnimCmd sUnknownAnim_REGIROCK_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD74[] = +static const union AnimCmd sUnknownAnim_REGICE_1[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD7C[] = +static const union AnimCmd sUnknownAnim_REGISTEEL_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD84[] = +static const union AnimCmd sUnknownAnim_REGISTEEL_2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFD8C[] = +static const union AnimCmd sUnknownAnim_RAYQUAZA_1[] = { ANIMCMD_FRAME(0, 20), ANIMCMD_FRAME(1, 30), @@ -936,7 +936,7 @@ static const union AnimCmd gUnknown_082FFD8C[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFDA0[] = +static const union AnimCmd sUnknownAnim_RAYQUAZA_2[] = { ANIMCMD_FRAME(0, 20), ANIMCMD_FRAME(2, 20), @@ -945,1372 +945,1378 @@ static const union AnimCmd gUnknown_082FFDA0[] = ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFDB4[] = +static const union AnimCmd sUnknownAnim_Unused1[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFDBC[] = +static const union AnimCmd sUnknownAnim_Unused2[] = { ANIMCMD_FRAME(0, 10), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FFDC4[] = +static const union AnimCmd sUnknownAnim_JIRACHI_1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -static const union AnimCmd *const gUnknown_082FFDCC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDD0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDD4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDD8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDDC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDE0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDE4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDE8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDEC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDF0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDF4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDF8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFDFC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE00[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE04[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE08[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE0C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE10[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE14[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE18[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE1C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE20[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE24[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE28[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE2C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE30[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE34[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE38[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE3C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE40[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE44[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE48[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE4C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE50[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE54[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE58[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE5C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE60[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE64[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE68[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE6C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE70[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE74[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE78[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE7C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE80[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE84[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE88[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE8C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE90[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE94[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE98[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFE9C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEA0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEA4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEA8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEAC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEB0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEB4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEB8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEBC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEC0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEC4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEC8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFECC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFED0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFED4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFED8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEDC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEE0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEE4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEE8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEEC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEF0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEF4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEF8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFEFC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF00[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF04[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF08[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF0C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF10[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF14[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF18[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF1C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF20[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF24[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF28[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF2C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF30[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF34[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF38[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF3C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF40[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF44[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF48[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF4C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF50[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF54[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF58[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF5C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF60[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF64[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF68[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF6C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF70[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF74[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF78[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF7C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF80[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF84[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF88[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF8C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF90[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF94[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF98[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFF9C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFA0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFA4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFA8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFAC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFB0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFB4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFB8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFBC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFC0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFC4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFC8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFCC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFD0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFD4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFD8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFDC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFE0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFE4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFE8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFEC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFF0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFF4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFF8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_082FFFFC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300000[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300004[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300008[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830000C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300010[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300014[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300018[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830001C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300020[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300024[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300028[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830002C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300030[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300034[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300038[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830003C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300040[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300044[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300048[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830004C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300050[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300054[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300058[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830005C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300060[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300064[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300068[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830006C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300070[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300074[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300078[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830007C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300080[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300084[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300088[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830008C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300090[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300094[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300098[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830009C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000A0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000A4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000A8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000AC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000B0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000B4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000B8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000BC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000C0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000C4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000C8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000CC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000D0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000D4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000D8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000DC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000E0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000E4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000E8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000EC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000F0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000F4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000F8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083000FC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300100[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300104[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300108[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830010C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300110[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300114[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300118[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830011C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300120[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300124[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300128[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830012C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300130[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300134[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300138[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830013C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300140[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300144[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300148[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830014C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300150[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300154[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300158[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830015C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300160[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300164[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300168[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830016C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300170[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300174[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300178[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830017C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300180[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300184[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300188[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830018C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300190[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300194[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300198[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830019C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001A0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001A4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001A8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001AC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001B0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001B4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001B8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001BC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001C0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001C4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001C8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001CC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001D0[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NONE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BULBASAUR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_IVYSAUR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VENUSAUR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHARMANDER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHARMELEON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHARIZARD[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SQUIRTLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WARTORTLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BLASTOISE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CATERPIE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_METAPOD[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BUTTERFREE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WEEDLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KAKUNA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BEEDRILL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PIDGEY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PIDGEOTTO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PIDGEOT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RATTATA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RATICATE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SPEAROW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FEAROW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EKANS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ARBOK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PIKACHU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RAICHU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SANDSHREW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SANDSLASH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDORAN_F[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDORINA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDOQUEEN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDORAN_M[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDORINO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NIDOKING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CLEFAIRY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CLEFABLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VULPIX[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NINETALES[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_JIGGLYPUFF[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WIGGLYTUFF[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ZUBAT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GOLBAT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ODDISH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GLOOM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VILEPLUME[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PARAS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PARASECT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VENONAT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VENOMOTH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DIGLETT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DUGTRIO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MEOWTH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PERSIAN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PSYDUCK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GOLDUCK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MANKEY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PRIMEAPE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GROWLITHE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ARCANINE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_POLIWAG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_POLIWHIRL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_POLIWRATH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ABRA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KADABRA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ALAKAZAM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MACHOP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MACHOKE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MACHAMP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BELLSPROUT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WEEPINBELL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VICTREEBEL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TENTACOOL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TENTACRUEL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GEODUDE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GRAVELER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GOLEM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PONYTA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RAPIDASH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SLOWPOKE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SLOWBRO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGNEMITE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGNETON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FARFETCHD[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DODUO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DODRIO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SEEL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DEWGONG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GRIMER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MUK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SHELLDER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CLOYSTER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GASTLY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HAUNTER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GENGAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ONIX[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DROWZEE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HYPNO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KRABBY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KINGLER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VOLTORB[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ELECTRODE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EXEGGCUTE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EXEGGUTOR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CUBONE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAROWAK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HITMONLEE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HITMONCHAN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LICKITUNG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KOFFING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WEEZING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RHYHORN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RHYDON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHANSEY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TANGELA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KANGASKHAN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HORSEA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SEADRA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GOLDEEN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SEAKING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_STARYU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_STARMIE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MR_MIME[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SCYTHER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_JYNX[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ELECTABUZZ[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGMAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PINSIR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TAUROS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGIKARP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GYARADOS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LAPRAS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DITTO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EEVEE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_VAPOREON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_JOLTEON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FLAREON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PORYGON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_OMANYTE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_OMASTAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KABUTO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KABUTOPS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_AERODACTYL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SNORLAX[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ARTICUNO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ZAPDOS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MOLTRES[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DRATINI[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DRAGONAIR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DRAGONITE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MEWTWO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MEW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHIKORITA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BAYLEEF[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MEGANIUM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CYNDAQUIL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_QUILAVA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TYPHLOSION[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TOTODILE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CROCONAW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FERALIGATR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SENTRET[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FURRET[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HOOTHOOT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NOCTOWL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LEDYBA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LEDIAN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SPINARAK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ARIADOS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CROBAT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHINCHOU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LANTURN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PICHU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CLEFFA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_IGGLYBUFF[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TOGEPI[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TOGETIC[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NATU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_XATU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAREEP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FLAAFFY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_AMPHAROS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BELLOSSOM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MARILL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_AZUMARILL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SUDOWOODO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_POLITOED[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HOPPIP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SKIPLOOM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_JUMPLUFF[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_AIPOM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SUNKERN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SUNFLORA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_YANMA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WOOPER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_QUAGSIRE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ESPEON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UMBREON[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MURKROW[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SLOWKING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MISDREAVUS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WOBBUFFET[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GIRAFARIG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PINECO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_FORRETRESS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DUNSPARCE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GLIGAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_STEELIX[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SNUBBULL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GRANBULL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_QWILFISH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SCIZOR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SHUCKLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HERACROSS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SNEASEL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TEDDIURSA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_URSARING[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SLUGMA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGCARGO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SWINUB[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PILOSWINE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CORSOLA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_REMORAID[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_OCTILLERY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DELIBIRD[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MANTINE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SKARMORY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HOUNDOUR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HOUNDOOM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KINGDRA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PHANPY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_DONPHAN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PORYGON2[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_STANTLER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SMEARGLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TYROGUE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HITMONTOP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SMOOCHUM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ELEKID[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MAGBY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MILTANK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BLISSEY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RAIKOU[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ENTEI[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SUICUNE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LARVITAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_PUPITAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TYRANITAR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LUGIA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HO_OH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CELEBI[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_OLD_UNOWN[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TREECKO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GROVYLE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SCEPTILE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TORCHIC[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_COMBUSKEN[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001D4[] = +static const union AnimCmd *const sUnknownAnims_BLAZIKEN[] = { sAnim_GeneralFrame0, - gUnknown_082FF71C, - gUnknown_082FF734, - gUnknown_082FF744, - gUnknown_082FF750, + sUnknownAnim_BLAZIKEN_1, + sUnknownAnim_BLAZIKEN_2, + sUnknownAnim_BLAZIKEN_3, + sUnknownAnim_BLAZIKEN_4, }; -static const union AnimCmd *const gUnknown_083001E8[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_MUDKIP[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083001EC[] = +static const union AnimCmd *const sUnknownAnims_MARSHTOMP[] = { sAnim_GeneralFrame0, - gUnknown_082FF758, - gUnknown_082FF774, - gUnknown_082FF790, + sUnknownAnim_MARSHTOMP_1, + sUnknownAnim_MARSHTOMP_2, + sUnknownAnim_MARSHTOMP_3, }; -static const union AnimCmd *const gUnknown_083001FC[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SWAMPERT[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300200[] = +static const union AnimCmd *const sUnknownAnims_POOCHYENA[] = { sAnim_GeneralFrame0, - gUnknown_082FF79C, - gUnknown_082FF7B0, + sUnknownAnim_POOCHYENA_1, + sUnknownAnim_POOCHYENA_2, }; -static const union AnimCmd *const gUnknown_0830020C[] = +static const union AnimCmd *const sUnknownAnims_MIGHTYENA[] = { sAnim_GeneralFrame0, - gUnknown_082FF7C4, + sUnknownAnim_MIGHTYENA_1, }; -static const union AnimCmd *const gUnknown_08300214[] = +static const union AnimCmd *const sUnknownAnims_ZIGZAGOON[] = { sAnim_GeneralFrame0, - gUnknown_082FF7CC, + sUnknownAnim_ZIGZAGOON_1, }; -static const union AnimCmd *const gUnknown_0830021C[] = +static const union AnimCmd *const sUnknownAnims_LINOONE[] = { sAnim_GeneralFrame0, - gUnknown_082FF7D4, + sUnknownAnim_LINOONE_1, }; -static const union AnimCmd *const gUnknown_08300224[] = +static const union AnimCmd *const sUnknownAnims_WURMPLE[] = { sAnim_GeneralFrame0, - gUnknown_082FF7DC, - gUnknown_082FF7E4, + sUnknownAnim_WURMPLE_1, + sUnknownAnim_WURMPLE_2, }; -static const union AnimCmd *const gUnknown_08300230[] = +static const union AnimCmd *const sUnknownAnims_SILCOON[] = { sAnim_GeneralFrame0, - gUnknown_082FF7EC, - gUnknown_082FF7F4, + sUnknownAnim_SILCOON_1, + sUnknownAnim_SILCOON_2, }; -static const union AnimCmd *const gUnknown_0830023C[] = +static const union AnimCmd *const sUnknownAnims_BEAUTIFLY[] = { sAnim_GeneralFrame0, - gUnknown_082FF7FC, - gUnknown_082FF804, + sUnknownAnim_BEAUTIFLY_1, + sUnknownAnim_BEAUTIFLY_2, }; -static const union AnimCmd *const gUnknown_08300248[] = +static const union AnimCmd *const sUnknownAnims_CASCOON[] = { sAnim_GeneralFrame0, - gUnknown_082FF80C, - gUnknown_082FF814, + sUnknownAnim_CASCOON_1, + sUnknownAnim_CASCOON_2, }; -static const union AnimCmd *const gUnknown_08300254[] = +static const union AnimCmd *const sUnknownAnims_DUSTOX[] = { sAnim_GeneralFrame0, - gUnknown_082FF81C, - gUnknown_082FF824, + sUnknownAnim_DUSTOX_1, + sUnknownAnim_DUSTOX_2, }; -static const union AnimCmd *const gUnknown_08300260[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LOTAD[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300264[] = +static const union AnimCmd *const sUnknownAnims_LOMBRE[] = { sAnim_GeneralFrame0, - gUnknown_082FF82C, + sUnknownAnim_LOMBRE_1, }; -static const union AnimCmd *const gUnknown_0830026C[] = +static const union AnimCmd *const sUnknownAnims_LUDICOLO[] = { sAnim_GeneralFrame0, - gUnknown_082FF834, - gUnknown_082FF83C, + sUnknownAnim_LUDICOLO_1, + sUnknownAnim_LUDICOLO_2, }; -static const union AnimCmd *const gUnknown_08300278[] = +static const union AnimCmd *const sUnknownAnims_SEEDOT[] = { sAnim_GeneralFrame0, - gUnknown_082FF844, + sUnknownAnim_SEEDOT_1, }; -static const union AnimCmd *const gUnknown_08300280[] = +static const union AnimCmd *const sUnknownAnims_NUZLEAF[] = { sAnim_GeneralFrame0, - gUnknown_082FF84C, + sUnknownAnim_NUZLEAF_1, }; -static const union AnimCmd *const gUnknown_08300288[] = +static const union AnimCmd *const sUnknownAnims_SHIFTRY[] = { sAnim_GeneralFrame0, - gUnknown_082FF854, - gUnknown_082FF85C, + sUnknownAnim_SHIFTRY_1, + sUnknownAnim_SHIFTRY_2, }; -static const union AnimCmd *const gUnknown_08300294[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300298[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830029C[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NINCADA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_NINJASK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SHEDINJA[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083002A0[] = +static const union AnimCmd *const sUnknownAnims_TAILLOW[] = { sAnim_GeneralFrame0, - gUnknown_082FF864, + sUnknownAnim_TAILLOW_1, }; -static const union AnimCmd *const gUnknown_083002A8[] = +static const union AnimCmd *const sUnknownAnims_SWELLOW[] = { sAnim_GeneralFrame0, - gUnknown_082FF86C, + sUnknownAnim_SWELLOW_1, }; -static const union AnimCmd *const gUnknown_083002B0[] = +static const union AnimCmd *const sUnknownAnims_SHROOMISH[] = { sAnim_GeneralFrame0, - gUnknown_082FF874, + sUnknownAnim_SHROOMISH_1, }; -static const union AnimCmd *const gUnknown_083002B8[] = +static const union AnimCmd *const sUnknownAnims_BRELOOM[] = { sAnim_GeneralFrame0, - gUnknown_082FF87C, + sUnknownAnim_BRELOOM_1, }; -static const union AnimCmd *const gUnknown_083002C0[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SPINDA[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083002C4[] = +static const union AnimCmd *const sUnknownAnims_WINGULL[] = { sAnim_GeneralFrame0, - gUnknown_082FF884, + sUnknownAnim_WINGULL_1, }; -static const union AnimCmd *const gUnknown_083002CC[] = +static const union AnimCmd *const sUnknownAnims_PELIPPER[] = { sAnim_GeneralFrame0, - gUnknown_082FF88C, - gUnknown_082FF894, + sUnknownAnim_PELIPPER_1, + sUnknownAnim_PELIPPER_2, }; -static const union AnimCmd *const gUnknown_083002D8[] = +static const union AnimCmd *const sUnknownAnims_SURSKIT[] = { sAnim_GeneralFrame0, - gUnknown_082FF89C, - gUnknown_082FF8A4, + sUnknownAnim_SURSKIT_1, + sUnknownAnim_SURSKIT_2, }; -static const union AnimCmd *const gUnknown_083002E4[] = +static const union AnimCmd *const sUnknownAnims_MASQUERAIN[] = { sAnim_GeneralFrame0, - gUnknown_082FF8AC, - gUnknown_082FF8B4, + sUnknownAnim_MASQUERAIN_1, + sUnknownAnim_MASQUERAIN_2, }; -static const union AnimCmd *const gUnknown_083002F0[] = +static const union AnimCmd *const sUnknownAnims_WAILMER[] = { sAnim_GeneralFrame0, - gUnknown_082FF8BC, - gUnknown_082FF8FC, - gUnknown_082FF91C, - gUnknown_082FF930, + sUnknownAnim_WAILMER_1, + sUnknownAnim_WAILMER_2, + sUnknownAnim_WAILMER_3, + sUnknownAnim_WAILMER_4, }; -static const union AnimCmd *const gUnknown_08300304[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WAILORD[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300308[] = +static const union AnimCmd *const sUnknownAnims_SKITTY[] = { sAnim_GeneralFrame0, - gUnknown_082FF93C, + sUnknownAnim_SKITTY_1, }; -static const union AnimCmd *const gUnknown_08300310[] = +static const union AnimCmd *const sUnknownAnims_DELCATTY[] = { sAnim_GeneralFrame0, - gUnknown_082FF944, + sUnknownAnim_DELCATTY_1, }; -static const union AnimCmd *const gUnknown_08300318[] = +static const union AnimCmd *const sUnknownAnims_KECLEON[] = { sAnim_GeneralFrame0, - gUnknown_082FF94C, - gUnknown_082FF9A8, - gUnknown_082FFA00, - gUnknown_082FFA58, + sUnknownAnim_KECLEON_1, + sUnknownAnim_KECLEON_2, + sUnknownAnim_KECLEON_3, + sUnknownAnim_KECLEON_4, }; -static const union AnimCmd *const gUnknown_0830032C[] = +static const union AnimCmd *const sUnknownAnims_BALTOY[] = { sAnim_GeneralFrame0, - gUnknown_082FFA64, + sUnknownAnim_BALTOY_1, }; -static const union AnimCmd *const gUnknown_08300334[] = +static const union AnimCmd *const sUnknownAnims_CLAYDOL[] = { sAnim_GeneralFrame0, - gUnknown_082FFA6C, + sUnknownAnim_CLAYDOL_1, }; -static const union AnimCmd *const gUnknown_0830033C[] = +static const union AnimCmd *const sUnknownAnims_NOSEPASS[] = { sAnim_GeneralFrame0, - gUnknown_082FFA74, + sUnknownAnim_NOSEPASS_1, }; -static const union AnimCmd *const gUnknown_08300344[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_TORKOAL[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300348[] = +static const union AnimCmd *const sUnknownAnims_SABLEYE[] = { sAnim_GeneralFrame0, - gUnknown_082FFA7C, - gUnknown_082FFA84, + sUnknownAnim_SABLEYE_1, + sUnknownAnim_SABLEYE_2, }; -static const union AnimCmd *const gUnknown_08300354[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300358[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BARBOACH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WHISCASH[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830035C[] = +static const union AnimCmd *const sUnknownAnims_LUVDISC[] = { sAnim_GeneralFrame0, - gUnknown_082FFA8C, - gUnknown_082FFA94, + sUnknownAnim_LUVDISC_1, + sUnknownAnim_LUVDISC_2, }; -static const union AnimCmd *const gUnknown_08300368[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830036C[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CORPHISH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CRAWDAUNT[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300370[] = +static const union AnimCmd *const sUnknownAnims_FEEBAS[] = { sAnim_GeneralFrame0, - gUnknown_082FFA9C, - gUnknown_082FFAA4, + sUnknownAnim_FEEBAS_1, + sUnknownAnim_FEEBAS_2, }; -static const union AnimCmd *const gUnknown_0830037C[] = +static const union AnimCmd *const sUnknownAnims_MILOTIC[] = { sAnim_GeneralFrame0, - gUnknown_082FFAAC, - gUnknown_082FFAB4, + sUnknownAnim_MILOTIC_1, + sUnknownAnim_MILOTIC_2, }; -static const union AnimCmd *const gUnknown_08300388[] = +static const union AnimCmd *const sUnknownAnims_CARVANHA[] = { sAnim_GeneralFrame0, - gUnknown_082FFABC, - gUnknown_082FFAC4, + sUnknownAnim_CARVANHA_1, + sUnknownAnim_CARVANHA_2, }; -static const union AnimCmd *const gUnknown_08300394[] = +static const union AnimCmd *const sUnknownAnims_SHARPEDO[] = { sAnim_GeneralFrame0, - gUnknown_082FFACC, - gUnknown_082FFAD4, + sUnknownAnim_SHARPEDO_1, + sUnknownAnim_SHARPEDO_2, }; -static const union AnimCmd *const gUnknown_083003A0[] = +static const union AnimCmd *const sUnknownAnims_TRAPINCH[] = { sAnim_GeneralFrame0, - gUnknown_082FFADC, + sUnknownAnim_TRAPINCH_1, }; -static const union AnimCmd *const gUnknown_083003A8[] = +static const union AnimCmd *const sUnknownAnims_VIBRAVA[] = { sAnim_GeneralFrame0, - gUnknown_082FFAE4, + sUnknownAnim_VIBRAVA_1, }; -static const union AnimCmd *const gUnknown_083003B0[] = +static const union AnimCmd *const sUnknownAnims_FLYGON[] = { sAnim_GeneralFrame0, - gUnknown_082FFAEC, + sUnknownAnim_FLYGON_1, }; -static const union AnimCmd *const gUnknown_083003B8[] = +static const union AnimCmd *const sUnknownAnims_MAKUHITA[] = { sAnim_GeneralFrame0, - gUnknown_082FFAF4, + sUnknownAnim_MAKUHITA_1, }; -static const union AnimCmd *const gUnknown_083003C0[] = +static const union AnimCmd *const sUnknownAnims_HARIYAMA[] = { sAnim_GeneralFrame0, - gUnknown_082FFAFC, + sUnknownAnim_HARIYAMA_1, }; -static const union AnimCmd *const gUnknown_083003C8[] = +static const union AnimCmd *const sUnknownAnims_ELECTRIKE[] = { sAnim_GeneralFrame0, - gUnknown_082FFB04, - gUnknown_082FFB0C, + sUnknownAnim_ELECTRIKE_1, + sUnknownAnim_ELECTRIKE_2, }; -static const union AnimCmd *const gUnknown_083003D4[] = +static const union AnimCmd *const sUnknownAnims_MANECTRIC[] = { sAnim_GeneralFrame0, - gUnknown_082FFB14, + sUnknownAnim_MANECTRIC_1, }; -static const union AnimCmd *const gUnknown_083003DC[] = +static const union AnimCmd *const sUnknownAnims_NUMEL[] = { sAnim_GeneralFrame0, - gUnknown_082FFB1C, - gUnknown_082FFB24, + sUnknownAnim_NUMEL_1, + sUnknownAnim_NUMEL_2, }; -static const union AnimCmd *const gUnknown_083003E8[] = +static const union AnimCmd *const sUnknownAnims_CAMERUPT[] = { sAnim_GeneralFrame0, - gUnknown_082FFB2C, + sUnknownAnim_CAMERUPT_1, }; -static const union AnimCmd *const gUnknown_083003F0[] = +static const union AnimCmd *const sUnknownAnims_SPHEAL[] = { sAnim_GeneralFrame0, - gUnknown_082FFB34, + sUnknownAnim_SPHEAL_1, }; -static const union AnimCmd *const gUnknown_083003F8[] = +static const union AnimCmd *const sUnknownAnims_SEALEO[] = { sAnim_GeneralFrame0, - gUnknown_082FFB3C, + sUnknownAnim_SEALEO_1, }; -static const union AnimCmd *const gUnknown_08300400[] = +static const union AnimCmd *const sUnknownAnims_WALREIN[] = { sAnim_GeneralFrame0, - gUnknown_082FFB44, - gUnknown_082FFB60, + sUnknownAnim_WALREIN_1, + sUnknownAnim_WALREIN_2, }; -static const union AnimCmd *const gUnknown_0830040C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300410[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300414[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300418[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830041C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300420[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CACNEA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CACTURNE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SNORUNT[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GLALIE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LUNATONE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SOLROCK[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300424[] = +static const union AnimCmd *const sUnknownAnims_AZURILL[] = { sAnim_GeneralFrame0, - gUnknown_082FFB7C, - gUnknown_082FFBBC, - gUnknown_082FFBE0, - gUnknown_082FFBF4, + sUnknownAnim_AZURILL_1, + sUnknownAnim_AZURILL_2, + sUnknownAnim_AZURILL_3, + sUnknownAnim_AZURILL_4, }; -static const union AnimCmd *const gUnknown_08300438[] = +static const union AnimCmd *const sUnknownAnims_SPOINK[] = { sAnim_GeneralFrame0, - gUnknown_082FFBFC, - gUnknown_082FFC04, + sUnknownAnim_SPOINK_1, + sUnknownAnim_SPOINK_2, }; -static const union AnimCmd *const gUnknown_08300444[] = +static const union AnimCmd *const sUnknownAnims_GRUMPIG[] = { sAnim_GeneralFrame0, - gUnknown_082FFC0C, + sUnknownAnim_GRUMPIG_1, }; -static const union AnimCmd *const gUnknown_0830044C[] = +static const union AnimCmd *const sUnknownAnims_PLUSLE[] = { sAnim_GeneralFrame0, - gUnknown_082FFC14, + sUnknownAnim_PLUSLE_1, }; -static const union AnimCmd *const gUnknown_08300454[] = +static const union AnimCmd *const sUnknownAnims_MINUN[] = { sAnim_GeneralFrame0, - gUnknown_082FFC1C, + sUnknownAnim_MINUN_1, }; -static const union AnimCmd *const gUnknown_0830045C[] = +static const union AnimCmd *const sUnknownAnims_MAWILE[] = { sAnim_GeneralFrame0, - gUnknown_082FFC24, + sUnknownAnim_MAWILE_1, }; -static const union AnimCmd *const gUnknown_08300464[] = +static const union AnimCmd *const sUnknownAnims_MEDITITE[] = { sAnim_GeneralFrame0, - gUnknown_082FFC2C, + sUnknownAnim_MEDITITE_1, }; -static const union AnimCmd *const gUnknown_0830046C[] = +static const union AnimCmd *const sUnknownAnims_MEDICHAM[] = { sAnim_GeneralFrame0, - gUnknown_082FFC34, + sUnknownAnim_MEDICHAM_1, }; -static const union AnimCmd *const gUnknown_08300474[] = +static const union AnimCmd *const sUnknownAnims_SWABLU[] = { sAnim_GeneralFrame0, - gUnknown_082FFC3C, - gUnknown_082FFC58, + sUnknownAnim_SWABLU_1, + sUnknownAnim_SWABLU_2, }; -static const union AnimCmd *const gUnknown_08300480[] = +static const union AnimCmd *const sUnknownAnims_ALTARIA[] = { sAnim_GeneralFrame0, - gUnknown_082FFC74, + sUnknownAnim_ALTARIA_1, }; -static const union AnimCmd *const gUnknown_08300488[] = +static const union AnimCmd *const sUnknownAnims_WYNAUT[] = { sAnim_GeneralFrame0, - gUnknown_082FFC7C, - gUnknown_082FFC84, + sUnknownAnim_WYNAUT_1, + sUnknownAnim_WYNAUT_2, }; -static const union AnimCmd *const gUnknown_08300494[] = +static const union AnimCmd *const sUnknownAnims_DUSKULL[] = { sAnim_GeneralFrame0, - gUnknown_082FFC8C, - gUnknown_082FFC94, + sUnknownAnim_DUSKULL_1, + sUnknownAnim_DUSKULL_2, }; -static const union AnimCmd *const gUnknown_083004A0[] = +static const union AnimCmd *const sUnknownAnims_DUSCLOPS[] = { sAnim_GeneralFrame0, - gUnknown_082FFC9C, - gUnknown_082FFCA4, + sUnknownAnim_DUSCLOPS_1, + sUnknownAnim_DUSCLOPS_2, }; -static const union AnimCmd *const gUnknown_083004AC[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ROSELIA[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004B0[] = +static const union AnimCmd *const sUnknownAnims_SLAKOTH[] = { sAnim_GeneralFrame0, - gUnknown_082FFCAC, + sUnknownAnim_SLAKOTH_1, }; -static const union AnimCmd *const gUnknown_083004B8[] = +static const union AnimCmd *const sUnknownAnims_VIGOROTH[] = { sAnim_GeneralFrame0, - gUnknown_082FFCB4, + sUnknownAnim_VIGOROTH_1, }; -static const union AnimCmd *const gUnknown_083004C0[] = +static const union AnimCmd *const sUnknownAnims_SLAKING[] = { sAnim_GeneralFrame0, - gUnknown_082FFCBC, + sUnknownAnim_SLAKING_1, }; -static const union AnimCmd *const gUnknown_083004C8[] = +static const union AnimCmd *const sUnknownAnims_GULPIN[] = { sAnim_GeneralFrame0, - gUnknown_082FFCC4, + sUnknownAnim_GULPIN_1, }; -static const union AnimCmd *const gUnknown_083004D0[] = +static const union AnimCmd *const sUnknownAnims_SWALOT[] = { sAnim_GeneralFrame0, - gUnknown_082FFCCC, + sUnknownAnim_SWALOT_1, }; -static const union AnimCmd *const gUnknown_083004D8[] = +static const union AnimCmd *const sUnknownAnims_TROPIUS[] = { sAnim_GeneralFrame0, - gUnknown_082FFCD4, + sUnknownAnim_TROPIUS_1, }; -static const union AnimCmd *const gUnknown_083004E0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004E4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004E8[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_WHISMUR[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LOUDRED[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EXPLOUD[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004EC[] = +static const union AnimCmd *const sUnknownAnims_CLAMPERL[] = { sAnim_GeneralFrame0, - gUnknown_082FFCDC, + sUnknownAnim_CLAMPERL_1, }; -static const union AnimCmd *const gUnknown_083004F4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004F8[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_HUNTAIL[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GOREBYSS[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083004FC[] = +static const union AnimCmd *const sUnknownAnims_ABSOL[] = { sAnim_GeneralFrame0, - gUnknown_082FFCE4, + sUnknownAnim_ABSOL_1, }; -static const union AnimCmd *const gUnknown_08300504[] = +static const union AnimCmd *const sUnknownAnims_SHUPPET[] = { sAnim_GeneralFrame0, - gUnknown_082FFCEC, - gUnknown_082FFCF4, + sUnknownAnim_SHUPPET_1, + sUnknownAnim_SHUPPET_2, }; -static const union AnimCmd *const gUnknown_08300510[] = +static const union AnimCmd *const sUnknownAnims_BANETTE[] = { sAnim_GeneralFrame0, - gUnknown_082FFCFC, + sUnknownAnim_BANETTE_1, }; -static const union AnimCmd *const gUnknown_08300518[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830051C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300520[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SEVIPER[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ZANGOOSE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RELICANTH[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300524[] = +static const union AnimCmd *const sUnknownAnims_ARON[] = { sAnim_GeneralFrame0, - gUnknown_082FFD04, + sUnknownAnim_ARON_1, }; -static const union AnimCmd *const gUnknown_0830052C[] = +static const union AnimCmd *const sUnknownAnims_LAIRON[] = { sAnim_GeneralFrame0, - gUnknown_082FFD0C, + sUnknownAnim_LAIRON_1, }; -static const union AnimCmd *const gUnknown_08300534[] = +static const union AnimCmd *const sUnknownAnims_AGGRON[] = { sAnim_GeneralFrame0, - gUnknown_082FFD14, + sUnknownAnim_AGGRON_1, }; -static const union AnimCmd *const gUnknown_0830053C[] = +static const union AnimCmd *const sUnknownAnims_CASTFORM[] = { sAnim_GeneralFrame0, - gUnknown_082FFD1C, - gUnknown_082FFD24, - gUnknown_082FFD2C, - gUnknown_082FFD34, + sUnknownAnim_CASTFORM_1, + sUnknownAnim_CASTFORM_2, + sUnknownAnim_CASTFORM_3, + sUnknownAnim_CASTFORM_4, }; -static const union AnimCmd *const gUnknown_08300550[] = +static const union AnimCmd *const sUnknownAnims_VOLBEAT[] = { sAnim_GeneralFrame0, - gUnknown_082FFD3C, + sUnknownAnim_VOLBEAT_1, }; -static const union AnimCmd *const gUnknown_08300558[] = +static const union AnimCmd *const sUnknownAnims_ILLUMISE[] = { sAnim_GeneralFrame0, - gUnknown_082FFD44, + sUnknownAnim_ILLUMISE_1, }; -static const union AnimCmd *const gUnknown_08300560[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300564[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300568[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830056C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300570[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300574[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300578[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LILEEP[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CRADILY[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ANORITH[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_ARMALDO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_RALTS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KIRLIA[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GARDEVOIR[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830057C[] = +static const union AnimCmd *const sUnknownAnims_BAGON[] = { sAnim_GeneralFrame0, - gUnknown_082FFD4C, - gUnknown_082FFD54, + sUnknownAnim_BAGON_1, + sUnknownAnim_BAGON_2, }; -static const union AnimCmd *const gUnknown_08300588[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_SHELGON[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830058C[] = +static const union AnimCmd *const sUnknownAnims_SALAMENCE[] = { sAnim_GeneralFrame0, - gUnknown_082FFD5C, - gUnknown_082FFD64, + sUnknownAnim_SALAMENCE_1, + sUnknownAnim_SALAMENCE_2, }; -static const union AnimCmd *const gUnknown_08300598[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830059C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005A0[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_BELDUM[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_METANG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_METAGROSS[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005A4[] = +static const union AnimCmd *const sUnknownAnims_REGIROCK[] = { sAnim_GeneralFrame0, - gUnknown_082FFD6C, + sUnknownAnim_REGIROCK_1, }; -static const union AnimCmd *const gUnknown_083005AC[] = +static const union AnimCmd *const sUnknownAnims_REGICE[] = { sAnim_GeneralFrame0, - gUnknown_082FFD74, + sUnknownAnim_REGICE_1, }; -static const union AnimCmd *const gUnknown_083005B4[] = +static const union AnimCmd *const sUnknownAnims_REGISTEEL[] = { sAnim_GeneralFrame0, - gUnknown_082FFD7C, - gUnknown_082FFD84, + sUnknownAnim_REGISTEEL_1, + sUnknownAnim_REGISTEEL_2, }; -static const union AnimCmd *const gUnknown_083005C0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005C4[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_KYOGRE[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_GROUDON[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005C8[] = +static const union AnimCmd *const sUnknownAnims_RAYQUAZA[] = { sAnim_GeneralFrame0, - gUnknown_082FFD8C, - gUnknown_082FFDA0, + sUnknownAnim_RAYQUAZA_1, + sUnknownAnim_RAYQUAZA_2, }; -static const union AnimCmd *const gUnknown_083005D4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005D8[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LATIAS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_LATIOS[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005DC[] = +static const union AnimCmd *const sUnknownAnims_JIRACHI[] = { sAnim_GeneralFrame0, - gUnknown_082FFDC4, + sUnknownAnim_JIRACHI_1, }; -static const union AnimCmd *const gUnknown_083005E4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005E8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005EC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005F0[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005F4[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005F8[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_083005FC[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300600[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300604[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300608[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830060C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300610[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300614[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300618[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830061C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300620[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300624[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300628[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830062C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300630[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300634[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300638[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830063C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300640[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300644[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300648[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_0830064C[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300650[] = {sAnim_GeneralFrame0}; -static const union AnimCmd *const gUnknown_08300654[] = {sAnim_GeneralFrame0}; - -const union AnimCmd *const *const gUnknownAnimsTable[] = -{ - gUnknown_082FFDCC, - gUnknown_082FFDD0, - gUnknown_082FFDD4, - gUnknown_082FFDD8, - gUnknown_082FFDDC, - gUnknown_082FFDE0, - gUnknown_082FFDE4, - gUnknown_082FFDE8, - gUnknown_082FFDEC, - gUnknown_082FFDF0, - gUnknown_082FFDF4, - gUnknown_082FFDF8, - gUnknown_082FFDFC, - gUnknown_082FFE00, - gUnknown_082FFE04, - gUnknown_082FFE08, - gUnknown_082FFE0C, - gUnknown_082FFE10, - gUnknown_082FFE14, - gUnknown_082FFE18, - gUnknown_082FFE1C, - gUnknown_082FFE20, - gUnknown_082FFE24, - gUnknown_082FFE28, - gUnknown_082FFE2C, - gUnknown_082FFE30, - gUnknown_082FFE34, - gUnknown_082FFE38, - gUnknown_082FFE3C, - gUnknown_082FFE40, - gUnknown_082FFE44, - gUnknown_082FFE48, - gUnknown_082FFE4C, - gUnknown_082FFE50, - gUnknown_082FFE54, - gUnknown_082FFE58, - gUnknown_082FFE5C, - gUnknown_082FFE60, - gUnknown_082FFE64, - gUnknown_082FFE68, - gUnknown_082FFE6C, - gUnknown_082FFE70, - gUnknown_082FFE74, - gUnknown_082FFE78, - gUnknown_082FFE7C, - gUnknown_082FFE80, - gUnknown_082FFE84, - gUnknown_082FFE88, - gUnknown_082FFE8C, - gUnknown_082FFE90, - gUnknown_082FFE94, - gUnknown_082FFE98, - gUnknown_082FFE9C, - gUnknown_082FFEA0, - gUnknown_082FFEA4, - gUnknown_082FFEA8, - gUnknown_082FFEAC, - gUnknown_082FFEB0, - gUnknown_082FFEB4, - gUnknown_082FFEB8, - gUnknown_082FFEBC, - gUnknown_082FFEC0, - gUnknown_082FFEC4, - gUnknown_082FFEC8, - gUnknown_082FFECC, - gUnknown_082FFED0, - gUnknown_082FFED4, - gUnknown_082FFED8, - gUnknown_082FFEDC, - gUnknown_082FFEE0, - gUnknown_082FFEE4, - gUnknown_082FFEE8, - gUnknown_082FFEEC, - gUnknown_082FFEF0, - gUnknown_082FFEF4, - gUnknown_082FFEF8, - gUnknown_082FFEFC, - gUnknown_082FFF00, - gUnknown_082FFF04, - gUnknown_082FFF08, - gUnknown_082FFF0C, - gUnknown_082FFF10, - gUnknown_082FFF14, - gUnknown_082FFF18, - gUnknown_082FFF1C, - gUnknown_082FFF20, - gUnknown_082FFF24, - gUnknown_082FFF28, - gUnknown_082FFF2C, - gUnknown_082FFF30, - gUnknown_082FFF34, - gUnknown_082FFF38, - gUnknown_082FFF3C, - gUnknown_082FFF40, - gUnknown_082FFF44, - gUnknown_082FFF48, - gUnknown_082FFF4C, - gUnknown_082FFF50, - gUnknown_082FFF54, - gUnknown_082FFF58, - gUnknown_082FFF5C, - gUnknown_082FFF60, - gUnknown_082FFF64, - gUnknown_082FFF68, - gUnknown_082FFF6C, - gUnknown_082FFF70, - gUnknown_082FFF74, - gUnknown_082FFF78, - gUnknown_082FFF7C, - gUnknown_082FFF80, - gUnknown_082FFF84, - gUnknown_082FFF88, - gUnknown_082FFF8C, - gUnknown_082FFF90, - gUnknown_082FFF94, - gUnknown_082FFF98, - gUnknown_082FFF9C, - gUnknown_082FFFA0, - gUnknown_082FFFA4, - gUnknown_082FFFA8, - gUnknown_082FFFAC, - gUnknown_082FFFB0, - gUnknown_082FFFB4, - gUnknown_082FFFB8, - gUnknown_082FFFBC, - gUnknown_082FFFC0, - gUnknown_082FFFC4, - gUnknown_082FFFC8, - gUnknown_082FFFCC, - gUnknown_082FFFD0, - gUnknown_082FFFD4, - gUnknown_082FFFD8, - gUnknown_082FFFDC, - gUnknown_082FFFE0, - gUnknown_082FFFE4, - gUnknown_082FFFE8, - gUnknown_082FFFEC, - gUnknown_082FFFF0, - gUnknown_082FFFF4, - gUnknown_082FFFF8, - gUnknown_082FFFFC, - gUnknown_08300000, - gUnknown_08300004, - gUnknown_08300008, - gUnknown_0830000C, - gUnknown_08300010, - gUnknown_08300014, - gUnknown_08300018, - gUnknown_0830001C, - gUnknown_08300020, - gUnknown_08300024, - gUnknown_08300028, - gUnknown_0830002C, - gUnknown_08300030, - gUnknown_08300034, - gUnknown_08300038, - gUnknown_0830003C, - gUnknown_08300040, - gUnknown_08300044, - gUnknown_08300048, - gUnknown_0830004C, - gUnknown_08300050, - gUnknown_08300054, - gUnknown_08300058, - gUnknown_0830005C, - gUnknown_08300060, - gUnknown_08300064, - gUnknown_08300068, - gUnknown_0830006C, - gUnknown_08300070, - gUnknown_08300074, - gUnknown_08300078, - gUnknown_0830007C, - gUnknown_08300080, - gUnknown_08300084, - gUnknown_08300088, - gUnknown_0830008C, - gUnknown_08300090, - gUnknown_08300094, - gUnknown_08300098, - gUnknown_0830009C, - gUnknown_083000A0, - gUnknown_083000A4, - gUnknown_083000A8, - gUnknown_083000AC, - gUnknown_083000B0, - gUnknown_083000B4, - gUnknown_083000B8, - gUnknown_083000BC, - gUnknown_083000C0, - gUnknown_083000C4, - gUnknown_083000C8, - gUnknown_083000CC, - gUnknown_083000D0, - gUnknown_083000D4, - gUnknown_083000D8, - gUnknown_083000DC, - gUnknown_083000E0, - gUnknown_083000E4, - gUnknown_083000E8, - gUnknown_083000EC, - gUnknown_083000F0, - gUnknown_083000F4, - gUnknown_083000F8, - gUnknown_083000FC, - gUnknown_08300100, - gUnknown_08300104, - gUnknown_08300108, - gUnknown_0830010C, - gUnknown_08300110, - gUnknown_08300114, - gUnknown_08300118, - gUnknown_0830011C, - gUnknown_08300120, - gUnknown_08300124, - gUnknown_08300128, - gUnknown_0830012C, - gUnknown_08300130, - gUnknown_08300134, - gUnknown_08300138, - gUnknown_0830013C, - gUnknown_08300140, - gUnknown_08300144, - gUnknown_08300148, - gUnknown_0830014C, - gUnknown_08300150, - gUnknown_08300154, - gUnknown_08300158, - gUnknown_0830015C, - gUnknown_08300160, - gUnknown_08300164, - gUnknown_08300168, - gUnknown_0830016C, - gUnknown_08300170, - gUnknown_08300174, - gUnknown_08300178, - gUnknown_0830017C, - gUnknown_08300180, - gUnknown_08300184, - gUnknown_08300188, - gUnknown_0830018C, - gUnknown_08300190, - gUnknown_08300194, - gUnknown_08300198, - gUnknown_0830019C, - gUnknown_083001A0, - gUnknown_083001A4, - gUnknown_083001A8, - gUnknown_083001AC, - gUnknown_083001B0, - gUnknown_083001B4, - gUnknown_083001B8, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001BC, - gUnknown_083001C0, - gUnknown_083001C4, - gUnknown_083001C8, - gUnknown_083001CC, - gUnknown_083001D0, - gUnknown_083001D4, - gUnknown_083001E8, - gUnknown_083001EC, - gUnknown_083001FC, - gUnknown_08300200, - gUnknown_0830020C, - gUnknown_08300214, - gUnknown_0830021C, - gUnknown_08300224, - gUnknown_08300230, - gUnknown_0830023C, - gUnknown_08300248, - gUnknown_08300254, - gUnknown_08300260, - gUnknown_08300264, - gUnknown_0830026C, - gUnknown_08300278, - gUnknown_08300280, - gUnknown_08300288, - gUnknown_08300294, - gUnknown_08300298, - gUnknown_0830029C, - gUnknown_083002A0, - gUnknown_083002A8, - gUnknown_083002B0, - gUnknown_083002B8, - gUnknown_083002C0, - gUnknown_083002C4, - gUnknown_083002CC, - gUnknown_083002D8, - gUnknown_083002E4, - gUnknown_083002F0, - gUnknown_08300304, - gUnknown_08300308, - gUnknown_08300310, - gUnknown_08300318, - gUnknown_0830032C, - gUnknown_08300334, - gUnknown_0830033C, - gUnknown_08300344, - gUnknown_08300348, - gUnknown_08300354, - gUnknown_08300358, - gUnknown_0830035C, - gUnknown_08300368, - gUnknown_0830036C, - gUnknown_08300370, - gUnknown_0830037C, - gUnknown_08300388, - gUnknown_08300394, - gUnknown_083003A0, - gUnknown_083003A8, - gUnknown_083003B0, - gUnknown_083003B8, - gUnknown_083003C0, - gUnknown_083003C8, - gUnknown_083003D4, - gUnknown_083003DC, - gUnknown_083003E8, - gUnknown_083003F0, - gUnknown_083003F8, - gUnknown_08300400, - gUnknown_0830040C, - gUnknown_08300410, - gUnknown_08300414, - gUnknown_08300418, - gUnknown_0830041C, - gUnknown_08300420, - gUnknown_08300424, - gUnknown_08300438, - gUnknown_08300444, - gUnknown_0830044C, - gUnknown_08300454, - gUnknown_0830045C, - gUnknown_08300464, - gUnknown_0830046C, - gUnknown_08300474, - gUnknown_08300480, - gUnknown_08300488, - gUnknown_08300494, - gUnknown_083004A0, - gUnknown_083004AC, - gUnknown_083004B0, - gUnknown_083004B8, - gUnknown_083004C0, - gUnknown_083004C8, - gUnknown_083004D0, - gUnknown_083004D8, - gUnknown_083004E0, - gUnknown_083004E4, - gUnknown_083004E8, - gUnknown_083004EC, - gUnknown_083004F4, - gUnknown_083004F8, - gUnknown_083004FC, - gUnknown_08300504, - gUnknown_08300510, - gUnknown_08300518, - gUnknown_0830051C, - gUnknown_08300520, - gUnknown_08300524, - gUnknown_0830052C, - gUnknown_08300534, - gUnknown_0830053C, - gUnknown_08300550, - gUnknown_08300558, - gUnknown_08300560, - gUnknown_08300564, - gUnknown_08300568, - gUnknown_0830056C, - gUnknown_08300570, - gUnknown_08300574, - gUnknown_08300578, - gUnknown_0830057C, - gUnknown_08300588, - gUnknown_0830058C, - gUnknown_08300598, - gUnknown_0830059C, - gUnknown_083005A0, - gUnknown_083005A4, - gUnknown_083005AC, - gUnknown_083005B4, - gUnknown_083005C0, - gUnknown_083005C4, - gUnknown_083005C8, - gUnknown_083005D4, - gUnknown_083005D8, - gUnknown_083005DC, - gUnknown_083005E4, - gUnknown_083005E8, - gUnknown_083005EC, - gUnknown_083005EC, - gUnknown_083005F0, - gUnknown_083005F4, - gUnknown_083005F8, - gUnknown_083005FC, - gUnknown_08300600, - gUnknown_08300604, - gUnknown_08300608, - gUnknown_0830060C, - gUnknown_08300610, - gUnknown_08300614, - gUnknown_08300618, - gUnknown_0830061C, - gUnknown_08300620, - gUnknown_08300624, - gUnknown_08300628, - gUnknown_0830062C, - gUnknown_08300630, - gUnknown_08300634, - gUnknown_08300638, - gUnknown_0830063C, - gUnknown_08300640, - gUnknown_08300644, - gUnknown_08300648, - gUnknown_0830064C, - gUnknown_08300650, - gUnknown_08300654, -}; +static const union AnimCmd *const sUnknownAnims_DEOXYS[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_CHIMECHO[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_EGG[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_C[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_D[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_E[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_F[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_G[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_H[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_I[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_J[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_K[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_L[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_M[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_N[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_O[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_P[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_Q[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_R[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_S[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_T[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_U[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_V[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_W[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_X[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_Y[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_Z[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_EMARK[] = {sAnim_GeneralFrame0}; +static const union AnimCmd *const sUnknownAnims_UNOWN_QMARK[] = {sAnim_GeneralFrame0}; + +#define ANIM_CMD(name) [SPECIES_##name] = sUnknownAnims_##name +#define ANIM_CMD_FULL(name, anims) [SPECIES_##name] = anims + +static const union AnimCmd *const *const sUnknownAnimsTable[] = +{ + ANIM_CMD(NONE), + ANIM_CMD(BULBASAUR), + ANIM_CMD(IVYSAUR), + ANIM_CMD(VENUSAUR), + ANIM_CMD(CHARMANDER), + ANIM_CMD(CHARMELEON), + ANIM_CMD(CHARIZARD), + ANIM_CMD(SQUIRTLE), + ANIM_CMD(WARTORTLE), + ANIM_CMD(BLASTOISE), + ANIM_CMD(CATERPIE), + ANIM_CMD(METAPOD), + ANIM_CMD(BUTTERFREE), + ANIM_CMD(WEEDLE), + ANIM_CMD(KAKUNA), + ANIM_CMD(BEEDRILL), + ANIM_CMD(PIDGEY), + ANIM_CMD(PIDGEOTTO), + ANIM_CMD(PIDGEOT), + ANIM_CMD(RATTATA), + ANIM_CMD(RATICATE), + ANIM_CMD(SPEAROW), + ANIM_CMD(FEAROW), + ANIM_CMD(EKANS), + ANIM_CMD(ARBOK), + ANIM_CMD(PIKACHU), + ANIM_CMD(RAICHU), + ANIM_CMD(SANDSHREW), + ANIM_CMD(SANDSLASH), + ANIM_CMD(NIDORAN_F), + ANIM_CMD(NIDORINA), + ANIM_CMD(NIDOQUEEN), + ANIM_CMD(NIDORAN_M), + ANIM_CMD(NIDORINO), + ANIM_CMD(NIDOKING), + ANIM_CMD(CLEFAIRY), + ANIM_CMD(CLEFABLE), + ANIM_CMD(VULPIX), + ANIM_CMD(NINETALES), + ANIM_CMD(JIGGLYPUFF), + ANIM_CMD(WIGGLYTUFF), + ANIM_CMD(ZUBAT), + ANIM_CMD(GOLBAT), + ANIM_CMD(ODDISH), + ANIM_CMD(GLOOM), + ANIM_CMD(VILEPLUME), + ANIM_CMD(PARAS), + ANIM_CMD(PARASECT), + ANIM_CMD(VENONAT), + ANIM_CMD(VENOMOTH), + ANIM_CMD(DIGLETT), + ANIM_CMD(DUGTRIO), + ANIM_CMD(MEOWTH), + ANIM_CMD(PERSIAN), + ANIM_CMD(PSYDUCK), + ANIM_CMD(GOLDUCK), + ANIM_CMD(MANKEY), + ANIM_CMD(PRIMEAPE), + ANIM_CMD(GROWLITHE), + ANIM_CMD(ARCANINE), + ANIM_CMD(POLIWAG), + ANIM_CMD(POLIWHIRL), + ANIM_CMD(POLIWRATH), + ANIM_CMD(ABRA), + ANIM_CMD(KADABRA), + ANIM_CMD(ALAKAZAM), + ANIM_CMD(MACHOP), + ANIM_CMD(MACHOKE), + ANIM_CMD(MACHAMP), + ANIM_CMD(BELLSPROUT), + ANIM_CMD(WEEPINBELL), + ANIM_CMD(VICTREEBEL), + ANIM_CMD(TENTACOOL), + ANIM_CMD(TENTACRUEL), + ANIM_CMD(GEODUDE), + ANIM_CMD(GRAVELER), + ANIM_CMD(GOLEM), + ANIM_CMD(PONYTA), + ANIM_CMD(RAPIDASH), + ANIM_CMD(SLOWPOKE), + ANIM_CMD(SLOWBRO), + ANIM_CMD(MAGNEMITE), + ANIM_CMD(MAGNETON), + ANIM_CMD(FARFETCHD), + ANIM_CMD(DODUO), + ANIM_CMD(DODRIO), + ANIM_CMD(SEEL), + ANIM_CMD(DEWGONG), + ANIM_CMD(GRIMER), + ANIM_CMD(MUK), + ANIM_CMD(SHELLDER), + ANIM_CMD(CLOYSTER), + ANIM_CMD(GASTLY), + ANIM_CMD(HAUNTER), + ANIM_CMD(GENGAR), + ANIM_CMD(ONIX), + ANIM_CMD(DROWZEE), + ANIM_CMD(HYPNO), + ANIM_CMD(KRABBY), + ANIM_CMD(KINGLER), + ANIM_CMD(VOLTORB), + ANIM_CMD(ELECTRODE), + ANIM_CMD(EXEGGCUTE), + ANIM_CMD(EXEGGUTOR), + ANIM_CMD(CUBONE), + ANIM_CMD(MAROWAK), + ANIM_CMD(HITMONLEE), + ANIM_CMD(HITMONCHAN), + ANIM_CMD(LICKITUNG), + ANIM_CMD(KOFFING), + ANIM_CMD(WEEZING), + ANIM_CMD(RHYHORN), + ANIM_CMD(RHYDON), + ANIM_CMD(CHANSEY), + ANIM_CMD(TANGELA), + ANIM_CMD(KANGASKHAN), + ANIM_CMD(HORSEA), + ANIM_CMD(SEADRA), + ANIM_CMD(GOLDEEN), + ANIM_CMD(SEAKING), + ANIM_CMD(STARYU), + ANIM_CMD(STARMIE), + ANIM_CMD(MR_MIME), + ANIM_CMD(SCYTHER), + ANIM_CMD(JYNX), + ANIM_CMD(ELECTABUZZ), + ANIM_CMD(MAGMAR), + ANIM_CMD(PINSIR), + ANIM_CMD(TAUROS), + ANIM_CMD(MAGIKARP), + ANIM_CMD(GYARADOS), + ANIM_CMD(LAPRAS), + ANIM_CMD(DITTO), + ANIM_CMD(EEVEE), + ANIM_CMD(VAPOREON), + ANIM_CMD(JOLTEON), + ANIM_CMD(FLAREON), + ANIM_CMD(PORYGON), + ANIM_CMD(OMANYTE), + ANIM_CMD(OMASTAR), + ANIM_CMD(KABUTO), + ANIM_CMD(KABUTOPS), + ANIM_CMD(AERODACTYL), + ANIM_CMD(SNORLAX), + ANIM_CMD(ARTICUNO), + ANIM_CMD(ZAPDOS), + ANIM_CMD(MOLTRES), + ANIM_CMD(DRATINI), + ANIM_CMD(DRAGONAIR), + ANIM_CMD(DRAGONITE), + ANIM_CMD(MEWTWO), + ANIM_CMD(MEW), + ANIM_CMD(CHIKORITA), + ANIM_CMD(BAYLEEF), + ANIM_CMD(MEGANIUM), + ANIM_CMD(CYNDAQUIL), + ANIM_CMD(QUILAVA), + ANIM_CMD(TYPHLOSION), + ANIM_CMD(TOTODILE), + ANIM_CMD(CROCONAW), + ANIM_CMD(FERALIGATR), + ANIM_CMD(SENTRET), + ANIM_CMD(FURRET), + ANIM_CMD(HOOTHOOT), + ANIM_CMD(NOCTOWL), + ANIM_CMD(LEDYBA), + ANIM_CMD(LEDIAN), + ANIM_CMD(SPINARAK), + ANIM_CMD(ARIADOS), + ANIM_CMD(CROBAT), + ANIM_CMD(CHINCHOU), + ANIM_CMD(LANTURN), + ANIM_CMD(PICHU), + ANIM_CMD(CLEFFA), + ANIM_CMD(IGGLYBUFF), + ANIM_CMD(TOGEPI), + ANIM_CMD(TOGETIC), + ANIM_CMD(NATU), + ANIM_CMD(XATU), + ANIM_CMD(MAREEP), + ANIM_CMD(FLAAFFY), + ANIM_CMD(AMPHAROS), + ANIM_CMD(BELLOSSOM), + ANIM_CMD(MARILL), + ANIM_CMD(AZUMARILL), + ANIM_CMD(SUDOWOODO), + ANIM_CMD(POLITOED), + ANIM_CMD(HOPPIP), + ANIM_CMD(SKIPLOOM), + ANIM_CMD(JUMPLUFF), + ANIM_CMD(AIPOM), + ANIM_CMD(SUNKERN), + ANIM_CMD(SUNFLORA), + ANIM_CMD(YANMA), + ANIM_CMD(WOOPER), + ANIM_CMD(QUAGSIRE), + ANIM_CMD(ESPEON), + ANIM_CMD(UMBREON), + ANIM_CMD(MURKROW), + ANIM_CMD(SLOWKING), + ANIM_CMD(MISDREAVUS), + ANIM_CMD(UNOWN), + ANIM_CMD(WOBBUFFET), + ANIM_CMD(GIRAFARIG), + ANIM_CMD(PINECO), + ANIM_CMD(FORRETRESS), + ANIM_CMD(DUNSPARCE), + ANIM_CMD(GLIGAR), + ANIM_CMD(STEELIX), + ANIM_CMD(SNUBBULL), + ANIM_CMD(GRANBULL), + ANIM_CMD(QWILFISH), + ANIM_CMD(SCIZOR), + ANIM_CMD(SHUCKLE), + ANIM_CMD(HERACROSS), + ANIM_CMD(SNEASEL), + ANIM_CMD(TEDDIURSA), + ANIM_CMD(URSARING), + ANIM_CMD(SLUGMA), + ANIM_CMD(MAGCARGO), + ANIM_CMD(SWINUB), + ANIM_CMD(PILOSWINE), + ANIM_CMD(CORSOLA), + ANIM_CMD(REMORAID), + ANIM_CMD(OCTILLERY), + ANIM_CMD(DELIBIRD), + ANIM_CMD(MANTINE), + ANIM_CMD(SKARMORY), + ANIM_CMD(HOUNDOUR), + ANIM_CMD(HOUNDOOM), + ANIM_CMD(KINGDRA), + ANIM_CMD(PHANPY), + ANIM_CMD(DONPHAN), + ANIM_CMD(PORYGON2), + ANIM_CMD(STANTLER), + ANIM_CMD(SMEARGLE), + ANIM_CMD(TYROGUE), + ANIM_CMD(HITMONTOP), + ANIM_CMD(SMOOCHUM), + ANIM_CMD(ELEKID), + ANIM_CMD(MAGBY), + ANIM_CMD(MILTANK), + ANIM_CMD(BLISSEY), + ANIM_CMD(RAIKOU), + ANIM_CMD(ENTEI), + ANIM_CMD(SUICUNE), + ANIM_CMD(LARVITAR), + ANIM_CMD(PUPITAR), + ANIM_CMD(TYRANITAR), + ANIM_CMD(LUGIA), + ANIM_CMD(HO_OH), + ANIM_CMD(CELEBI), + ANIM_CMD_FULL(OLD_UNOWN_B, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_C, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_D, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_E, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_F, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_G, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_H, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_I, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_J, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_K, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_L, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_M, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_N, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_O, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_P, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_Q, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_R, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_S, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_T, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_U, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_V, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_W, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_X, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_Y, sUnknownAnims_OLD_UNOWN), + ANIM_CMD_FULL(OLD_UNOWN_Z, sUnknownAnims_OLD_UNOWN), + ANIM_CMD(TREECKO), + ANIM_CMD(GROVYLE), + ANIM_CMD(SCEPTILE), + ANIM_CMD(TORCHIC), + ANIM_CMD(COMBUSKEN), + ANIM_CMD(BLAZIKEN), + ANIM_CMD(MUDKIP), + ANIM_CMD(MARSHTOMP), + ANIM_CMD(SWAMPERT), + ANIM_CMD(POOCHYENA), + ANIM_CMD(MIGHTYENA), + ANIM_CMD(ZIGZAGOON), + ANIM_CMD(LINOONE), + ANIM_CMD(WURMPLE), + ANIM_CMD(SILCOON), + ANIM_CMD(BEAUTIFLY), + ANIM_CMD(CASCOON), + ANIM_CMD(DUSTOX), + ANIM_CMD(LOTAD), + ANIM_CMD(LOMBRE), + ANIM_CMD(LUDICOLO), + ANIM_CMD(SEEDOT), + ANIM_CMD(NUZLEAF), + ANIM_CMD(SHIFTRY), + ANIM_CMD(NINCADA), + ANIM_CMD(NINJASK), + ANIM_CMD(SHEDINJA), + ANIM_CMD(TAILLOW), + ANIM_CMD(SWELLOW), + ANIM_CMD(SHROOMISH), + ANIM_CMD(BRELOOM), + ANIM_CMD(SPINDA), + ANIM_CMD(WINGULL), + ANIM_CMD(PELIPPER), + ANIM_CMD(SURSKIT), + ANIM_CMD(MASQUERAIN), + ANIM_CMD(WAILMER), + ANIM_CMD(WAILORD), + ANIM_CMD(SKITTY), + ANIM_CMD(DELCATTY), + ANIM_CMD(KECLEON), + ANIM_CMD(BALTOY), + ANIM_CMD(CLAYDOL), + ANIM_CMD(NOSEPASS), + ANIM_CMD(TORKOAL), + ANIM_CMD(SABLEYE), + ANIM_CMD(BARBOACH), + ANIM_CMD(WHISCASH), + ANIM_CMD(LUVDISC), + ANIM_CMD(CORPHISH), + ANIM_CMD(CRAWDAUNT), + ANIM_CMD(FEEBAS), + ANIM_CMD(MILOTIC), + ANIM_CMD(CARVANHA), + ANIM_CMD(SHARPEDO), + ANIM_CMD(TRAPINCH), + ANIM_CMD(VIBRAVA), + ANIM_CMD(FLYGON), + ANIM_CMD(MAKUHITA), + ANIM_CMD(HARIYAMA), + ANIM_CMD(ELECTRIKE), + ANIM_CMD(MANECTRIC), + ANIM_CMD(NUMEL), + ANIM_CMD(CAMERUPT), + ANIM_CMD(SPHEAL), + ANIM_CMD(SEALEO), + ANIM_CMD(WALREIN), + ANIM_CMD(CACNEA), + ANIM_CMD(CACTURNE), + ANIM_CMD(SNORUNT), + ANIM_CMD(GLALIE), + ANIM_CMD(LUNATONE), + ANIM_CMD(SOLROCK), + ANIM_CMD(AZURILL), + ANIM_CMD(SPOINK), + ANIM_CMD(GRUMPIG), + ANIM_CMD(PLUSLE), + ANIM_CMD(MINUN), + ANIM_CMD(MAWILE), + ANIM_CMD(MEDITITE), + ANIM_CMD(MEDICHAM), + ANIM_CMD(SWABLU), + ANIM_CMD(ALTARIA), + ANIM_CMD(WYNAUT), + ANIM_CMD(DUSKULL), + ANIM_CMD(DUSCLOPS), + ANIM_CMD(ROSELIA), + ANIM_CMD(SLAKOTH), + ANIM_CMD(VIGOROTH), + ANIM_CMD(SLAKING), + ANIM_CMD(GULPIN), + ANIM_CMD(SWALOT), + ANIM_CMD(TROPIUS), + ANIM_CMD(WHISMUR), + ANIM_CMD(LOUDRED), + ANIM_CMD(EXPLOUD), + ANIM_CMD(CLAMPERL), + ANIM_CMD(HUNTAIL), + ANIM_CMD(GOREBYSS), + ANIM_CMD(ABSOL), + ANIM_CMD(SHUPPET), + ANIM_CMD(BANETTE), + ANIM_CMD(SEVIPER), + ANIM_CMD(ZANGOOSE), + ANIM_CMD(RELICANTH), + ANIM_CMD(ARON), + ANIM_CMD(LAIRON), + ANIM_CMD(AGGRON), + ANIM_CMD(CASTFORM), + ANIM_CMD(VOLBEAT), + ANIM_CMD(ILLUMISE), + ANIM_CMD(LILEEP), + ANIM_CMD(CRADILY), + ANIM_CMD(ANORITH), + ANIM_CMD(ARMALDO), + ANIM_CMD(RALTS), + ANIM_CMD(KIRLIA), + ANIM_CMD(GARDEVOIR), + ANIM_CMD(BAGON), + ANIM_CMD(SHELGON), + ANIM_CMD(SALAMENCE), + ANIM_CMD(BELDUM), + ANIM_CMD(METANG), + ANIM_CMD(METAGROSS), + ANIM_CMD(REGIROCK), + ANIM_CMD(REGICE), + ANIM_CMD(REGISTEEL), + ANIM_CMD(KYOGRE), + ANIM_CMD(GROUDON), + ANIM_CMD(RAYQUAZA), + ANIM_CMD(LATIAS), + ANIM_CMD(LATIOS), + ANIM_CMD(JIRACHI), + ANIM_CMD(DEOXYS), + ANIM_CMD(CHIMECHO), + ANIM_CMD(EGG), + ANIM_CMD_FULL(UNOWN_B, sUnknownAnims_EGG), + ANIM_CMD(UNOWN_C), + ANIM_CMD(UNOWN_D), + ANIM_CMD(UNOWN_E), + ANIM_CMD(UNOWN_F), + ANIM_CMD(UNOWN_G), + ANIM_CMD(UNOWN_H), + ANIM_CMD(UNOWN_I), + ANIM_CMD(UNOWN_J), + ANIM_CMD(UNOWN_K), + ANIM_CMD(UNOWN_L), + ANIM_CMD(UNOWN_M), + ANIM_CMD(UNOWN_N), + ANIM_CMD(UNOWN_O), + ANIM_CMD(UNOWN_P), + ANIM_CMD(UNOWN_Q), + ANIM_CMD(UNOWN_R), + ANIM_CMD(UNOWN_S), + ANIM_CMD(UNOWN_T), + ANIM_CMD(UNOWN_U), + ANIM_CMD(UNOWN_V), + ANIM_CMD(UNOWN_W), + ANIM_CMD(UNOWN_X), + ANIM_CMD(UNOWN_Y), + ANIM_CMD(UNOWN_Z), + ANIM_CMD(UNOWN_EMARK), + ANIM_CMD(UNOWN_QMARK), +}; + +#undef ANIM_CMD +#undef ANIM_CMD_FULL From 1472a3a7d4f877657ee59d1c84e794d146bb6851 Mon Sep 17 00:00:00 2001 From: brain_face Date: Sun, 12 Apr 2020 14:38:18 +0200 Subject: [PATCH 24/34] Renamed sub_808B980 -> PlayerWheelieInPlace --- include/field_player_avatar.h | 2 +- src/bike.c | 4 ++-- src/field_player_avatar.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 1dbe171bc..0a39a0895 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -52,7 +52,7 @@ u8 GetPlayerAvatarFlags(void); void sub_808B578(void); u8 GetFRLGAvatarGraphicsIdByGender(u8); u8 GetRSAvatarGraphicsIdByGender(u8); -void sub_808B980(u8 direction); +void PlayerWheelieInPlace(u8 direction); void sub_808B9BC(u8 direction); void sub_808B9A4(u8 direction); void sub_808C1B4(u8 direction); diff --git a/src/bike.c b/src/bike.c index 15857778c..45598e83c 100644 --- a/src/bike.c +++ b/src/bike.c @@ -696,7 +696,7 @@ static void AcroBikeTransition_WheelieMoving(u8 direction) if (MetatileBehavior_IsBumpySlope(playerObjEvent->currentMetatileBehavior)) PlayerIdleWheelie(direction); else - sub_808B980(direction); //hit wall? + PlayerWheelieInPlace(direction); //hit wall? } return; } @@ -730,7 +730,7 @@ static void AcroBikeTransition_WheelieRisingMoving(u8 direction) if (MetatileBehavior_IsBumpySlope(playerObjEvent->currentMetatileBehavior)) PlayerIdleWheelie(direction); else - sub_808B980(direction); //hit wall? + PlayerWheelieInPlace(direction); //hit wall? } return; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 35bbb1e03..40086eab7 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1079,7 +1079,7 @@ void PlayerAcroTurnJump(u8 direction) PlayerSetAnimId(GetJumpInPlaceTurnAroundMovementAction(direction), 1); } -void sub_808B980(u8 direction) +void PlayerWheelieInPlace(u8 direction) { PlaySE(SE_WALL_HIT); PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), 2); From 1be48a61c1a20b5c9087c1a68346c5efe33685c8 Mon Sep 17 00:00:00 2001 From: brain_face Date: Sun, 12 Apr 2020 15:31:11 +0200 Subject: [PATCH 25/34] Renamed sub_808B9BC -> PlayerWheelieMove --- include/field_player_avatar.h | 2 +- src/bike.c | 2 +- src/field_player_avatar.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 0a39a0895..45e0a6676 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -53,7 +53,7 @@ void sub_808B578(void); u8 GetFRLGAvatarGraphicsIdByGender(u8); u8 GetRSAvatarGraphicsIdByGender(u8); void PlayerWheelieInPlace(u8 direction); -void sub_808B9BC(u8 direction); +void PlayerWheelieMove(u8 direction); void sub_808B9A4(u8 direction); void sub_808C1B4(u8 direction); void sub_808B9D4(u8 direction); diff --git a/src/bike.c b/src/bike.c index 45598e83c..711c18cd7 100644 --- a/src/bike.c +++ b/src/bike.c @@ -700,7 +700,7 @@ static void AcroBikeTransition_WheelieMoving(u8 direction) } return; } - sub_808B9BC(direction); + PlayerWheelieMove(direction); gPlayerAvatar.runningState = MOVING; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 40086eab7..4baf0c64f 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -261,7 +261,7 @@ static const u8 sRSAvatarGfxIds[] = {OBJ_EVENT_GFX_LINK_RS_BRENDAN, OBJ_EVENT_GF static const u8 sPlayerAvatarGfxToStateFlag[2][5][2] = { - [MALE] = + [MALE] = { {OBJ_EVENT_GFX_BRENDAN_NORMAL, PLAYER_AVATAR_FLAG_ON_FOOT}, {OBJ_EVENT_GFX_BRENDAN_MACH_BIKE, PLAYER_AVATAR_FLAG_MACH_BIKE}, @@ -269,7 +269,7 @@ static const u8 sPlayerAvatarGfxToStateFlag[2][5][2] = {OBJ_EVENT_GFX_BRENDAN_SURFING, PLAYER_AVATAR_FLAG_SURFING}, {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, PLAYER_AVATAR_FLAG_UNDERWATER}, }, - [FEMALE] = + [FEMALE] = { {OBJ_EVENT_GFX_MAY_NORMAL, PLAYER_AVATAR_FLAG_ON_FOOT}, {OBJ_EVENT_GFX_MAY_MACH_BIKE, PLAYER_AVATAR_FLAG_MACH_BIKE}, @@ -1090,7 +1090,7 @@ void sub_808B9A4(u8 direction) PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), 2); } -void sub_808B9BC(u8 direction) +void PlayerWheelieMove(u8 direction) { PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), 2); } From ce2fe10bec6c83c108ddf3034ecfb09beee5c198 Mon Sep 17 00:00:00 2001 From: brain_face Date: Sun, 12 Apr 2020 15:35:38 +0200 Subject: [PATCH 26/34] Renamed sub_808B9A4 -> PlayerPopWheelieWhileMoving --- include/field_player_avatar.h | 2 +- src/bike.c | 2 +- src/field_player_avatar.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 45e0a6676..b79aed4ff 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -54,7 +54,7 @@ u8 GetFRLGAvatarGraphicsIdByGender(u8); u8 GetRSAvatarGraphicsIdByGender(u8); void PlayerWheelieInPlace(u8 direction); void PlayerWheelieMove(u8 direction); -void sub_808B9A4(u8 direction); +void PlayerPopWheelieWhileMoving(u8 direction); void sub_808C1B4(u8 direction); void sub_808B9D4(u8 direction); void sub_808D194(void); diff --git a/src/bike.c b/src/bike.c index 711c18cd7..6f758f803 100644 --- a/src/bike.c +++ b/src/bike.c @@ -734,7 +734,7 @@ static void AcroBikeTransition_WheelieRisingMoving(u8 direction) } return; } - sub_808B9A4(direction); + PlayerPopWheelieWhileMoving(direction); gPlayerAvatar.runningState = MOVING; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 4baf0c64f..fd17b0807 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1085,7 +1085,7 @@ void PlayerWheelieInPlace(u8 direction) PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), 2); } -void sub_808B9A4(u8 direction) +void PlayerPopWheelieWhileMoving(u8 direction) { PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), 2); } From 007a03803122b2605f089106c110a2f85e53f79d Mon Sep 17 00:00:00 2001 From: brain_face Date: Sun, 12 Apr 2020 15:43:45 +0200 Subject: [PATCH 27/34] Renamed sub_808B9D4 -> PlayerEndWheelieWhileMoving --- include/field_player_avatar.h | 2 +- src/bike.c | 2 +- src/field_player_avatar.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index b79aed4ff..12f41c0f8 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -56,7 +56,7 @@ void PlayerWheelieInPlace(u8 direction); void PlayerWheelieMove(u8 direction); void PlayerPopWheelieWhileMoving(u8 direction); void sub_808C1B4(u8 direction); -void sub_808B9D4(u8 direction); +void PlayerEndWheelieWhileMoving(u8 direction); void sub_808D194(void); void sub_808D1C8(void); bool32 sub_808D1B4(void); diff --git a/src/bike.c b/src/bike.c index 6f758f803..ebf2c7a50 100644 --- a/src/bike.c +++ b/src/bike.c @@ -757,7 +757,7 @@ static void AcroBikeTransition_WheelieLoweringMoving(u8 direction) PlayerEndWheelie(direction); return; } - sub_808B9D4(direction); + PlayerEndWheelieWhileMoving(direction); } void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index fd17b0807..9fef51bec 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1095,7 +1095,7 @@ void PlayerWheelieMove(u8 direction) PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), 2); } -void sub_808B9D4(u8 direction) +void PlayerEndWheelieWhileMoving(u8 direction) { PlayerSetAnimId(GetAcroEndWheelieMoveDirectionMovementAction(direction), 2); } From 9abda59bd1e08ede1f6fce18d2f2f2bb230327f6 Mon Sep 17 00:00:00 2001 From: brain_face Date: Sun, 12 Apr 2020 16:22:03 +0200 Subject: [PATCH 28/34] Renamed sub_808C1B4 -> PlayerUseAcroBikeOnBumpySlope --- include/field_player_avatar.h | 2 +- src/bike.c | 2 +- src/field_player_avatar.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 12f41c0f8..bcee339d5 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -55,7 +55,7 @@ u8 GetRSAvatarGraphicsIdByGender(u8); void PlayerWheelieInPlace(u8 direction); void PlayerWheelieMove(u8 direction); void PlayerPopWheelieWhileMoving(u8 direction); -void sub_808C1B4(u8 direction); +void PlayerUseAcroBikeOnBumpySlope(u8 direction); void PlayerEndWheelieWhileMoving(u8 direction); void sub_808D194(void); void sub_808D1C8(void); diff --git a/src/bike.c b/src/bike.c index ebf2c7a50..e66d6b6e1 100644 --- a/src/bike.c +++ b/src/bike.c @@ -1049,7 +1049,7 @@ void Bike_HandleBumpySlopeJump(void) if (MetatileBehavior_IsBumpySlope(tileBehavior)) { gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING; - sub_808C1B4(GetPlayerMovementDirection()); + PlayerUseAcroBikeOnBumpySlope(GetPlayerMovementDirection()); } } } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 9fef51bec..6d44f4b51 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1415,7 +1415,7 @@ void sub_808C15C(u8 direction) StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingDirectionAnimNum(direction)); } -void sub_808C1B4(u8 direction) +void PlayerUseAcroBikeOnBumpySlope(u8 direction) { ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_ACRO_BIKE)); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetAcroWheelieDirectionAnimNum(direction)); From d478156ad9297bdf520822c42863854095ad63a2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 12 Apr 2020 13:04:05 -0400 Subject: [PATCH 29/34] Split stormy_water png for kyogre/groudon --- .../sootopolis/anim/stormy_water/0.png | Bin 1135 -> 0 bytes .../anim/stormy_water/0_groudon.png | Bin 0 -> 8139 bytes .../sootopolis/anim/stormy_water/0_kyogre.png | Bin 0 -> 4925 bytes .../sootopolis/anim/stormy_water/1.png | Bin 1155 -> 0 bytes .../anim/stormy_water/1_groudon.png | Bin 0 -> 8059 bytes .../sootopolis/anim/stormy_water/1_kyogre.png | Bin 0 -> 5182 bytes .../sootopolis/anim/stormy_water/2.png | Bin 1155 -> 0 bytes .../anim/stormy_water/2_groudon.png | Bin 0 -> 8049 bytes .../sootopolis/anim/stormy_water/2_kyogre.png | Bin 0 -> 5239 bytes .../sootopolis/anim/stormy_water/3.png | Bin 1112 -> 0 bytes .../anim/stormy_water/3_groudon.png | Bin 0 -> 7962 bytes .../sootopolis/anim/stormy_water/3_kyogre.png | Bin 0 -> 5050 bytes .../sootopolis/anim/stormy_water/4.png | Bin 1124 -> 0 bytes .../anim/stormy_water/4_groudon.png | Bin 0 -> 7959 bytes .../sootopolis/anim/stormy_water/4_kyogre.png | Bin 0 -> 4904 bytes .../sootopolis/anim/stormy_water/5.png | Bin 1149 -> 0 bytes .../anim/stormy_water/5_groudon.png | Bin 0 -> 7961 bytes .../sootopolis/anim/stormy_water/5_kyogre.png | Bin 0 -> 5420 bytes .../sootopolis/anim/stormy_water/6.png | Bin 1097 -> 0 bytes .../anim/stormy_water/6_groudon.png | Bin 0 -> 8050 bytes .../sootopolis/anim/stormy_water/6_kyogre.png | Bin 0 -> 4644 bytes .../sootopolis/anim/stormy_water/7.png | Bin 1093 -> 0 bytes .../anim/stormy_water/7_groudon.png | Bin 0 -> 8061 bytes .../sootopolis/anim/stormy_water/7_kyogre.png | Bin 0 -> 4658 bytes graphics_file_rules.mk | 34 ++++++++++++++++++ 25 files changed, 34 insertions(+) delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/0.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/0_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/0_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/1.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/1_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/1_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/2.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/2_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/2_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/3.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/3_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/3_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/4.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/4_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/4_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/5.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/5_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/5_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/6.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/6_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/6_kyogre.png delete mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/7.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/7_groudon.png create mode 100644 data/tilesets/secondary/sootopolis/anim/stormy_water/7_kyogre.png diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/0.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/0.png deleted file mode 100644 index cfeefd8829fb6c2881d2af9cab21b89e0dd9200d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1135 zcmV-#1d#iQP)##H_DVtCN;$jC=5N2^!4-hk{0dU5R8v>e<3KxL{r&bZER&l0!b4I8WH!Ac}@}+R0 z%M(O?f;&A!z6B^*=8>8d*9A7T1op%JeAq>HIJ_PIc{_fmN#E^t7B>#ZIM0BKb%x)= z;VTxH^xa-(M_4-k{dSC#zFX@A_=f#&-`@cj>jXINo7n&^))~cu(DpQAT&;EXl>%>~ zr|$g#pD(K4=T&u*vk&T`<)}ne?bjfG{wkWklmz<>(+Z?=00z7naaFzgcb8wOXe12?l@01i{ z4+lxk0O;W$$ys*O%R!V0(9J=V%LM4;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D4s=V0Kh0pGLX5Gxy^;*@*6sY!TR0$0UQ1_{lo?X=Q6-{I*6-}Pl^n{WVz# zkaSJ*>HZ0;-%vG0ohIf&F`oco>txbGu?kMrV27Vso1ALxOuFU`STRinu) z;d1(Jc0Tloh*NcRb))+^mEpgh!VW6ARDdbok^7Kygg#$G2luF4A0oYjQ>AjgsGvdR z(R0_+}ARP^)OFG}Zx!=Pq(-JxlnLmbE_?xnJh(;P- zS|FLu#=P=r+wD+J*Fu$Av!3nyM0=`E2h6PvRiESK^)Gp*Gb1&$Oko$)PSsf+YJ8=M z*xem^*Lc!~s^97TE4j-u?SmS) z=7MBj(pg@o-Kd6Ckp2C0_96Rn8wK^I)O4CSBA`gDGh_+j^~;yx{`24NzxsjyuP<~f zTHXHzl{70R!tX!t0000mP)t-sbH${Kb82&1Qd&VltdxrY004_~i>##H_DVtCN;$vdm3jkQ zrhr#~Li9I8@TBWmqp$fS4MZ}B5W^LaD74xf``Lw@v`7|~Oifzs`*wdhQ>-&!5aVq! zvKTlOwl{dNy#%;61vUQC?TSvZ$u7j5dVuS2z$ye<%KPCFTFAG45gNdwL)x9!C!{3oW_!2-ppYFa z+EM9Y`mJb3bO-pOBLmzalfon!1-ySffuDl5RAP>atlR(~gbODVn5J`E8e~8*LM+`3 z=ttp)2~Dl{lWb4HH)r)ekc3#5j)KPP6Y8N`(f#&Zb|()HoFtn29)R)TDUq8C;`ZX{ z?9HXeCl@s3t zCX|i==-#Gx*$jcAbfYAP+Qy7dsP9|ERzZEVutAkE9#KBom*oUwHLB$t`wt7`(~26Z lfxg*Ni}?+B_y2r3e*p6kA753K{*eFx002ovPDHLkV1nH}{0RU6 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/0_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/0_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..ce6f8e5e64600f3b52edb3ca957fbac10991392f GIT binary patch literal 4925 zcmV-D6T<9?P) za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eiAJBU(I$ug;!B>8BB#-bODq;?rWBcJ!I*o2h6thabT)=i<6XU(d$E z)k^4xL>W*&Ii>@KSvP3$!(s33tQW&>olsy(WQ!G_E$MEx8EAi?K_`Eknt4%cXjimJ zp}Eoz$`momDC_(n3q8_1nQV1@l?teUMr)qY($C0dF_&_R28C`2cMR=SIefr|_*5tx z(jDO%Yp0^FU5npdH@ym*A0Ef%V(y^~IDcjfaXP40^^KA8_7pIyB6Qs@KWp2cwXIq2 zFJUvj-GxmqVJoMwVGttKjeLX&>5oGl35IoCWWspv_Bk3o7^gDK{{YB;;e=6+#5Vu{ z05DKYR7G>eq;tLYVx-<$i^WQNtU+RwIZ}iF|NsC0|8u?eVyy0Sz4l_H-cpOjN^`6L z007q$);RzG00Cl4M??UK1szBL000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jm0{ z5H2P=d&TVl00BiwL_t(I%dJ#PcEcbH)FR|uUDR2#s93W|IBn7s)ILGN8LAJqF-5#A z>i6V9Fy@Kz2$<(3|19~%!Q(aunV7T0MyPV2_dGu+q2O_wL#Cbb_mU-e+~i7l(){za z6RKPZ`Cg(BsvNi$D(%i8bu~FWxbRXvkJ}vHea?s>ePK!~`opqIyn;B@SW(WGKr=T? zNA&ymSJZ_DV%f0_xk$<$h~43=Ly?y00000NkvXXu0mjf{swjr literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/1.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/1.png deleted file mode 100644 index db8984832ca61ebf418f7a9e817f1e088b33a369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmV-}1bq96P)##H_DVtCN;$zNT@DlXP}%f;5Ag2vNf^z5Ty!<)O8{cd{;?XC93$ua`BNB{973D(d{{nkjBU=t@*%masy63g`IP)}wFXf> zCBOD~(34NhlpYU0$Qm(R@Zen5d=(cwIFmJ}d7Tf7c?4YN!vfqL4f5b5k;U~IutXMv zJUGdkDSwL(_5Z+!wM_C_c|Yr?SG9A$M#1egM8>c zF&BL3zfwIu)X9$+aMO(e`=LMT0sXSkhV1={nr0nBPu(=nL?ncFdMrpc4WIb#df8Bs zd#?)bed?VoCg)agd__t^m(9lB;j5+gDXouzgyo8)Hr_k$XWk1hwIY@4NoQgd8u-?N z&HED5Y2~I^=}Bt>29#ErPctal5s&n*452hffZi%B0a7MAB2*^*ee@9;yP*_LtX9gX z4p2yy`*a;*2)6K!ENQYbEn0nK&u$O-7AF*X9C2L{YC839WqhmSCY&to=hDU(I! zoMFIdX|=JqZe0iz`*<4;;R3K`z=~2LYqXS7WXCGR#9IIgrNK4}x|Q0>@fkpKnxnA7 z#aN{{I=wNulx?8!qVHp=S3*f9B%hgXP!ctZdes5o!3ym`M=xnR_Mju!0sBTs1|+B? zX-O6rXr>$3m&)hT8EXp3*9`zMq+kczZIQba74T>wO_K-+EBxJp)ZT1qx=|TOlVwVh zGEK`U_?T{RAAU-{oEC1j$q<16qayD|+!mWcig+QSq)cuyW+>U;)*K@muOW*>ga%)< zC{4O8kReKU-?k?=ZbK1(z^ssV3gUoX)U=JmCYlvrC-w*`T%87Ba_ZjpWl+-4WJQHQ zg5duoJ^=Oi*Q0snv|-9dLm%|*;{;{HrrNO%XAj7SCu-R+XyBD<)hFPMx9}$&{{m%B VXxFm>Dh&Vt002ovPDHLkV1l;fC^!HB diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/1_groudon.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/1_groudon.png new file mode 100644 index 0000000000000000000000000000000000000000..e59bdf747487f9cc1997ad7c6e1e522148bda8ab GIT binary patch literal 8059 zcmV->AB5nEP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+SQv`b|fLNWdB*kTS73yav&hi=^ga)-!&&RRF$gU zaQdgEDk+s2Nq`S#<__uh|NTFY`wza_brqL#ZKaoT@s)b&Vep_`=j;6TSF)e>mEM>5 z`T_1DEqyB@O=JyLw!f`^VjEHz29-#JCOez*uJ9ftjF(l?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V3tw8PR~N_xY2S<+N)m3(9-aVr$c`0qRFeIwkR#Lq{^-a6Csb0H zB%^_G+`vykdnz%dIGj-u0;%5C$Az(G+>_h%c6Es<*tag%u3yeU-jkB7yG!K;#yh-2u5-4we$Aw!hz za*U@9Zj}Z=VA)X~Asom{>M=M*QCDjx-U&=-9Ro1DPw%lA0!0~CNe&4@|3g~<_mAyS z-z;rV;#t5F^2F@IVhUslvo4fK~Sb(r6Qr~l{M`3+QO68JsyjS2t&002ov JPDHLkV1luA#dZJy literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/1_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/1_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..9e7e1ab5ad6ba946317a7bdabb71641636ddcf3b GIT binary patch literal 5182 zcmV-E6v69>P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*tcH=sXh5us}y##S4m&5U#-a#+FKTvkcRuadl zS4mak$TA09;Nk+J%>Vn}CI7=$GR}$*DaR7y!Iv+-*vgB1oL}c}bNKypfBD;6{QY!Y z-2Dy9CH>=eAbG(7Z6Nb8@cwc-v%bFFmu~|(dtNuUzopzh zSN+3wZvSn+4SO5>`nOLQV+6*-Ms_;m4t{2x#hw2v|2;o3A~*4q*TK1cg^8qYzjHz?S^=<(e1hkm+S5WHT$$8bAM@{-{{fQ9^3}z^ z`TiJaEd|^dHD*6;#k#EeG|N!r^e1-#h*>wAhHc;dEg!J{`BGpV2!?Iu%m(Yx&LLVb ze|*broE`Ut!^%46sU_!9N$O0SZ zBH(1JbMu*G_PsXP^D@)|5Wz*4fTp+#Sl$QxC;5yI)!>4c5JC(o-A;pwZP9@dsvd}%-S^OAPd)e2>#)NO!hgh(WaLpsoo3=n)6X#DOf%0i>%!NTTYiNVS6X?MRX zq56!Pxghr%HFHBv5%c@L^anLAr*t2}D4hhw48*KAAf6NfB`3w~$i{oC$SGz=u>?i1 zpk{)CGmIhzf_@qsmifT$4{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De;Mr)*B( zk_!ZL19OH-hGan4o-CTgd}M^sC(i~y%rVf92cOFrMnBNR9MbT&C}RktpTb1xJVqa7 z40IggMCmkQ_#I>nbR1@?H%A`hO~ydEKQrCJ-*hfwPVf^waY{vlmoZQ;_bb)ChQNK@ zWel%=noFmgM$`}Ocb8A-=!(&1tL^4?gFK_$UY{8aQcapsQtg`XfqV<22 zIAZsNH6F-jgEb!51=e^tTSmUdgZ&2{pw0tBTjPP3a8u(Ut(+PU%hD_Ju&&-R50B+v s;=w*Qm^=?+i#hNhcPYVxeRcc$1D)$t-~wfct^fc407*qoM6N<$f;r_76aWAK literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/2.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/2.png deleted file mode 100644 index aaaabb7b4e418ddd69404c9d86e0bf0e5ad6df21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1155 zcmV-}1bq96P)##H_DVtCN;$p6bU}%y$2_ZM)g--ZsxW-gnPg{J(jAfnv-1?m2te z?b`O|dfUFPS<`mU*>hBE*6rJ7{rs|PyXOqy;PdCUZC|%*?7QdepXZns*4u82efONb zuHk2|dELD1y60?{e8#ndqI=H%@49|?_*U1|@asX|otdvFz*5)WPvr?@@V%m8G@Qxl z(GE?h0{cFf2Lu##{nzl}qdertihKI{Q6?ABXZ=w1Nw$9(#>yV6J~@qmz#1reB$s+m zyyKvK5`ah4%z5=o0P6cdF|S_9U3z>7vG!hh$8CJPuVU?eG6GO@YEF;5%dWXARjjN} z0?^?>N8U11Iy^X&x7pQ49-PWQvoAe7IFYw}SD*8t#)V(?@!(xfv+G_S93=xT@gV^& z@Bxe&T;{{{7w{pw%!fEv7x-|S2Jdq|Fd)0chr{fC#)sQ9oS*aIIR2mT;pBnn<-_R{ z)5nMNS8CAZ!@2oaEgrJ8rXP)UcTIcjv&L9*H*;#5#j!~TbJIK#kr2U~p&-*V{Kb3d zSwm$Jf-XY{dGN9voqECNbJ7wvH5mqvUn5P(X>mxTp3O-b8-fpE5`qZQXwrol?OhD& z2CJNToRd0%pX1bB8W!Q+mTEWH2U;G^Y$GS>>%I zGNvf}K1#kabhDVEP4lFYk^xGIeH6I(F=D{%NpgRK5!Pwkg=BvdqXVtV1aLNZKSXSF zYhObsgjBf|BV>sphUjkaZXesnKW|l~d;*Xcut{rO1jGmom?#+mGZcp(Varg&YS@#K zrSje~U@&vWI$XCY1)6=h4UcpISTJBtIgztQN-5N#3$gG7K%)%U=0LZ~I5|847%p>A z&v7wMYtGIrZ6Re!6j97gZ1r4d$%N!@#!IwBPoiD#0f^v)37}(;v>FD`5$u3}D-$xx7PA!qpi7M#t$*FN2nrMsq3! z3IzX0@d22=zaGsKmkn1gIy$qb#|g%UU8S|CPacr7Cu-I(sOObR<|FXJTlkx<{{VSe VO*1`9JZ=C0002ovPDHLkV1gsPBzyn> diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/2_groudon.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/2_groudon.png new file mode 100644 index 0000000000000000000000000000000000000000..0d59d5e16a8874aad2aeaa811e4745034b173872 GIT binary patch literal 8049 zcmV-%ACBOOP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+SQv`k}NBeq~BRZFTt5%IpBau@1U38pMpo^e5(JF zdg;u2^F(@h;9!HAszI9hfByF}|BJ6&eJ~;Bl4?p9U!jKT8ZXLqzRth)3j62&3eQ{o z{^h#yuQwc*^viQ0&FB8c_4x6D{ETG#*Xt(V&p727$i4^OUtUkv>*v1m4CLLpZlB*x zeLmO1r{z5VyZagT8T|Y2A!CdY8P7Z8rnmm$XVFvq`M>dh;HUMDoA}A=_`34D?ace- zH{;!Z*zRi29sa8+%$1%S(l;AD*KPcE-M_u&zRbwJUb?Su%wos&`RkMI)*5B4c~;j# z!cxgRi+Y)Gzv9M@DgFLf;yd$yldOR4nnF|YS zS3g7aXg^}hZ$EqPi&rpDI@>&+0WcBIj!edSJa8rJqfPe8&S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*pV~)pj4SZ zXK$YA$1QTdJmVjaV6jjhb^fvV?RAvI=;(&090Y$L&;Q@iws=a>xJ&XDM4_yB9fB(N3NDdv<{9lO-15cbPU(f&m z05DKYR7G>eq>FQEb6QebK|!pPivR!si*t*tq~7*QLEcI^#Y!=(N-2~|DN>8YN^`6L z003J_FhKwS00Cl4M??UK1szBL000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jm0{ z5H<{A+mvDe00MzYL_t(I%k5OVuG=sS&6HiVfX<=}WR@7ffH%ebkWBV|4MgA5dh=KI zP)_cvUAk9^0oy!2d>!(1`iFC#U+4a(asGbpf3Yu>qvXpfwLa$go4M9E5phlnU!8ER z_Qi+mrAq2mLsHdF3#H*R3qD^Z5N!T-)q+10YbTFaAoH>caa1j;H&v&^K|;^Nlj1yA z_-1GHI^ilD%7`Z(4hj$i4qiJCqdBtE{qhK99}zB#B~efJKbA%cx@DRM?&n!6*S?-VKoKRf$oAx$n!< zOSiLJ9(R;!J>C!*z{o>xp$_mzM+P{dlENez4UFRkehS)C zi8&^+b^{;=N#)b8X@e>^qA&Ji zIl)+s>Nt=2(*pUjqLyl)zig?){0=<*Ki|%88K)FHZioJ&00000NkvXXu0mjfRGqrs literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/2_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/2_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..71ce73e8bbcfb90206941636c5a4bcc709731b6e GIT binary patch literal 5239 zcmV--6o~7IP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*db|fnjME_YuFCmy=IgID@4tn{09U|vUDXZR- zsx(AK65!@;ZU$20fB&88KYRq6l5#$#kV825aM@*3_#qwpV}I9&TVL0QJ741WhwI8- zUNBseU(O3*oc9;5``a7hIg+lA*HvuiIO!ZnUk6?vR-P*dW2de^J_WCR zh}}`nJM3d9)Dg}b!c&aS>)JnEw^!86!;JLhNAvhX?>Zj$A9t~vv!^-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n@dXLQzD9W%(a!3&R zAKC)Ae{7HXW@&>eH=-~0V>!WCjp{g$`O^aVvZ9u1pucRX!~70B{XgH%Z!Gr}kZwxn Qy#N3J07*qoM6N<$f>$q$ApigX literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/3_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/3_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..a305f6ab085fc96a10f5ae31d5c72520413739b5 GIT binary patch literal 5050 zcmZ`-Rag`ZumuI_4r!#3l9rBLmS%yaVPSD;kj|x~JEa?>8>9rJ1VoVTZV6=psinF8 z_dehGzB6a$obSBM<3wwLl?ZTYaM94v2vn36ApcnIANVnz|LZzd?|9JANLqY#4Lu<5 zykEJvIa}Mkw|eD)aIt!2(`$v@Gk#jh>8~m$1VhOJSViX{m(W0GvU+z~P}A&&Ot^#rivLsPkXc zPtP4^XEDA*#)WXxYMqH?ZdjZ?m?AjWX!O z+^OaG<;JDMqQfbwCv-E8gnB}9r>yO9Q{)fN<2~$#(WhnIm8|}rAz<0yXun$s1>4A7 z=s8`}u9v*8<{nM1qn*x4totL{ZHn@qUHutzgfu|iDmGn-4q|Q8ikumrH`hgkm49rH z>u7g*`W{bUaQk4mZF0?cV|wMiC20Z2Y78c#*;reI)32L}F21Wa^*SzC^Gc^$_4uZ_ z-*J9te6=0($BYU4)-i(&cF!*ps)8jlVdV{rT{};ghP7p7Mg9WYP^)X-pE}BPUT2)# z$vM27U4Z}V1_q2BFZb`gzRm7Ylt`A= z`|nHcFsYFC>7|h`FM2_v^hWsFbVtcGiK0uuTr!8h7B31$M)HX2f`j6x2plLEeG1Sx zB=d4?29EtqJ@&0CFkcCSFl=M$gD3#3fvlGB3Pr}yXn`_Lfgw_dv)3h=kdGyFdV^|7 zoGJ>R$t#!klPthSZsTkV+cA;f;3^>X;nGy&tY$%vUxy>~Eustlc)YE%CBO8Ikztxd z(pR&k`)0oMPS^6ciNXVMQX>^JV1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8+JUb%weiL%7_;&u}# zHDy`zq=2$I{sFedpH&9Lz4C_0*|EtkTg00qY)2fsV5ZINEnR@75*tUw^~2W~vb@ z1Ou-T{kb%_Pm(4E$y(MY@!B;6l-A7l_T1e+Jo~_J8TZ7ONcr#DXeuDELLI<7##H_DVtCN;$+?H>B*U z`EBcpcfPeL1gEvFpSEK*20$z>Z98T+sYKrRqZ+decpBs2W&s%I;A#Q*_}tY#YB|Sw zSNo{l05HKpvYYH-l7nayV4QS-83&mBt-CLF32Z)J3#woCwLgZFcs4Ys-(LLsEetymyS6fp<8!MpBkAE&o!t$YHI7w}1I zT?E7v7_d?@0`@2l|AZ|=5v$=yN|wrd%YfP58S8M}rW7FidK(_;0&rx&fpQ{ejg(TT zD+{sk1OQP6YIBg=+BiAy0SuQps}Hysr!{A1PPULTC5ltbW2E{Zv}8f@ZF`01!h;KA>&O!slQh zpoI)ABA`CtvxTUGZE1PZ3ZhX;OVYMUiozMo6Ye7{DXf>JU!4>(5KvUq{fyh+_()z01|UTx+R1Ic~O%ZheI?6 zzE13+$0V-K0I;}qZ+aQDw6r)-DNrEvzlaaO?(OwxUbt+8axu_5e|ntYY&cXJ$GZ1` qynCYd4TDBrspP%^@4SUS>G&UG9C&1x+!hW10000(! diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/4_groudon.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/4_groudon.png new file mode 100644 index 0000000000000000000000000000000000000000..d4618ab9cdd4080a09820fbdd2a314a217765b08 GIT binary patch literal 7959 zcmV+yAL!tTP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Rd9;a^*0yoZq<$FM*hWP~MT;_<8**^Bt$Y1G&$E?IY;Pdi~y4-+_WZ*WLT` z)!z5@_-#4we?Q-0-@*U|7;Sl${Hce(<`@BBg`t>2l20WO| z%#{W9dz>Lga$m6(%+G=Q(jBiion2Y)0GNnpCnnN~xulUPFyF)m%%hwbkBy3qV+Exs|Kc)>`j8v@>+)-JLsn zAAW=pM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PyQ;6QlXTZC##H_DVtCN;$8<;5EgKVdr}0hCMh88iQ|I{H=)gJ9bjSCYE1VrU_IBJOW!_0kbQx` zd4uE`?i*6}I*RPw=BlGjjmY^lfBc5U)ARe=0e_zS-d`7omuGCeAJTmJ{?=a?c)lK9 z0q1#mdF!tWJfGiQ0mn@5y>)@-^E>RlzwtbL@2?AB|9QtJ{7dh>H3Obr;qf&YJv{Z- z1!8&m23y|_2afBdzb<}t+$_G{uNE;bj`HDydK6dCEEmgjc?P*zM&7w!eUx`6eS}Ty z-1lYE0mhL(iHpy&GcaGS;59Bj%WPux_0PyVLo#KsTFmdU6NhAzQbcB7x*GH)Cz5kt zErw+Rq}&(7l4DFce~H7AL&!NVhvgp}W6pV4-r*P*Ip<;dQ2chW21z~?H$5KonnUnopX&3x%Dpdq3hnud^ooMB|aS6ABha|;dFuIE9Mg) z`nOb%4^8o347lmWfc@AX&47O08cXhWLv6c_v8Qg^Mz zDwNxpLU48P*do!a0?duG1Hh4dVZ&a(xAyh)D z(uxV9L=t0EH+a|i_Gx;n=E`RPc>$fY)+Iplz<`;O39v?T_z7EwDrLi#l&qEamI0%+ zGuGj_O)XID<7s$=3&55E8!CyMHBw5Uj#WsBX8;Oiz%~cE&5e`eGl1bVM{$FLaawb9 zW@jrYbD;2IZd0i@LQ5tje>2^oBzl(gx&y$26DEL;LDGI4Ku53x_N|Z%C{Rf=+rWEGW+Rt_h5eP6U@qWZ@v8$y>2O{RApJ-KmPN&p1rgmhC72lS#gHx8R-5R P00000NkvXXu0mjfkG3OJ diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/5_groudon.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/5_groudon.png new file mode 100644 index 0000000000000000000000000000000000000000..4e59ead20f1a302c6e7fe87e128d031da5a7bd5e GIT binary patch literal 7961 zcmV+!ALihRP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+SR*RlHNM7r1_3j)DnmpSPn+B-a#+FJ_neSlsea{ ztY2C>C-o+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+b^{;=N#)b8X@e>^qA&JiIl)+s>Nt=2(*pUjqLyl)zig?){0=<*Ki|%8EcX?VZc699 P00000NkvXXu0mjfHq&v= literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/5_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/5_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..f3e24ef7bcb3e8ca85600f83d7f776a2f03e7fab GIT binary patch literal 5420 zcmV+{71Qd8P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*vcH=q@g#U9Dvjp)?E{D%^W(TwU`9LaeOR>{Q z?oB#r$CfA(1ymI%sqw%6PW2zY;^7YEd`uySaPZ}_%ck%m9s6tluQ^VBuP=9g#NU_q zmHqg@@Rs~>z7fWGeBpin=Y)8Ur0ey4727#ZItS8^f!CLnE6eNixO5I=&3<2>f2(|+ zSKQNb&L7jxVb8(uf4fL9x@SCVlo?jrgWpN6V)sws$MIWR!$JJ!wYQ1i#`@Q>Q;(Oo z;I%igJIZ;4y@o;^;XEMRVsyT*{q24GK+Rlcq(5Go>j$Ceay)-M#cs}?<{W!<#RVc2 z)VZjS5Uy7oSP7+Frv<(vKc3fdeP_NCOKc$4i9zMNDV?<;+EY8-bm^{HjlaJb=|zK*L32_U2~+-3??Xk`c|*r z{LS}cpg9F_ttFUk$BKCw$!Vq`$jNVx0uVjVnEDmp^{pPT{`nGMEeQG*=EMTaQTGtl z>p!_=7tWUB{NdDD&N}vU07AsIJ(JNE1dgDs*FhiAn5Z>zOyE)7mg^Unrf@7zJ?lW zs=1a%`ZU*k3oW+Pax2|*+bRDZdQ?62+{@5|R2pvh5k?$o#7%kkBizh8r*gDho4qAzE47g=dlA+4)(j7GtCyN|2*H#(1SDV{hpEBd1dAs*MjY34mq*!9t zz0E@=?Ytd1Gr2zd4AIWfx?Uc zQUdb3hhh$f2l^OgSOy(EGs61R`)uWEVaU~V;%YglGDdI%LMokO$ppeXrX_%F27;iS zUpVSHv@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4Q;%FwVic1zf9# z;Bjb=(o{W@Y4oj+#N~k)GPWtgVDq@5 z8H^4K+L?JaK?bzZ3QI*wcEqFntSFS&0pvl`mO$F74xyFAY4TA=zlV~Xc%!w|Ex<`# zVY#bQ2;N};4+gv}UDmIv6*y^Q0&IcpmY!JD#s$MWieLen!sOoEIz9^40vJm*fF4i62My{r4*`TAtjyxM3kXw^Hgpt>?;OPSG zVo&y^#!3e3t&@D+1OSFOc5pbjDwM zv8VgM1>kDo!g8-D0znm(>VCp)v3F9W3lS?&a<8~T!T+}77^(3hcuGVVsuv?xwmdk> zkf@vH_T=Eh+YvEl2aGawaRogu*d*uD8>(9*)Z0VgOys{eU< z05+%BBR+B3WXdN)7yA4-kutKWJa+Zj19I_1Z6kvQUa71;0vTHwS9T P00000NkvXXu0mjfuzLJ- diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/6_groudon.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/6_groudon.png new file mode 100644 index 0000000000000000000000000000000000000000..1aea2dc7b273283e91b857bfba233236bf552f61 GIT binary patch literal 8050 zcmV-&AC2INP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+SQv`k}NBeq~BRZFTt5%IpBau@1U38pMpo^e5(JF zdg;u2^F(@h;9!HAszI9hfByF}|BJ6&eJ~;Bl4?p9U!jKT8ZXLqzRth)3j62&3eQ{o z{^h#yuQwc*^viQ0&FB8c_4x6D{ETG#*Xt(V&p727$i4^OUtUkv>*v1m4CLLpZlB*x zeLmO1r{z5VyZagT8T|Y2A!CdY8P7Z8rnmm$XVFvq`M>dh;HUMDoA}A==&<&*W8yG+1E?=^^IBVxITY#=Fv_TAs+?beSkIo9LBxXoNx zV7vMmqDT7?TYmf5b6>oIdD7YD@eF{8cy?qm*5iRISs!h(S9UI2iyaI8Y0TXD;5r_# zF}h*R!Z+S0oKu{h&1bUR_qyoLWuOH|M4x=dH6#ko3Lz3dITT{3MIVESF{YSfi8Z$5 zQ%EtTl#?*3WuHTiIpv&7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tgt_m_ z(@VFrTpo9nX+7Q$8Nhq@^a6^Xg8`N|vid5!m;-u2#&_eOvZn)(qn2`oZ&d4*za{g6?miPfcp%`k*klVzWuAcyGX`bg5jmaTcbiBo$ z=m->E_|i(fxIM@I%Yp_0NR84Zl%27U_K zQ;9hyvUUR?21({%-&0>YR6sF8EJFj#D{gm)TH`L`7Cc1beIN<39*TmGaYH|J6rILY zZktC04vK2JKigPriCk-lo5a)RO`(#1JS;{GUX_eQ978Ycrr7NX8KQKTV?1qet26)t z%Z~C0;XqzekHImDx>`H&PGCao7=Yn@dXLQzD9W%(a!3&RAKC)Ae{7HXW@&>eH=-~0 zV>!WCjp{g$`O^aVvZ9u1pucRX!~70B{XgH%ZyBc)JZ^{nq5uE@07*qoM6N<$f_tl_ AMgRZ+ literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/6_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/6_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..2d7dc677f5ff37b271b3b4e03b13a9ab7699a795 GIT binary patch literal 4644 zcmV+<65H*GP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+Rd6-cIME^008UoP+!$G^&n?Vh~b^??v(X#Ag zzmKx+u_X!w6WK&W0#}Xy{m)eY!;eqNDd%GfIfR2Bmt8i6H|f|v`>#IS`n`VK`4yj^ zt}A={!f;7GoEO44#}}^qj~n7SldjL#Rcz-x>6}R4Ctg2Ro-FUrap|1MntffLpH)8Z zEAC-A=RecVY0t^8pIyWm-7}vx$_%UR!S5tbvHM@)pX0Z-hC%%1y|KOTP`d^cxLbB?{b;sTxu z>Ri;#h3g#yE3UNbw!ka$&+|U6SLT&iVk2T5A5>mV>8uUjp4#cIi=KL{zfCtxbY_^y zUt^lF>sqqWWYesKz{yKb6A43CHW8CX)GU|H-4?x`o7eN2PCU75MjFjz62(t1_3Gkp zUiXRSlz?k3&TQLP*kvTAF+(CJzZpe9^gMm)mw(qw-NX9vBZ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)4TB%nT$OLKMj2lW4Zp|K^0C>ob6>?OP{i={7)B*nJ$N(o) zQkW#8fpOfxPeFSsF~>yKZUDp}$sFu^>Pv?TC`O27Xn=Xe?G90E+-2N?hiJSHBq7#A zQSdQt=!cG?)0oO_^N7GfQBC(}8;dQGYYlOec-p)vRPv99#fZVHl97mG=!M-ByFDR8 zl2$V=)mI7U%dYbV|bOlTbgFuYIiu^9qI8CFRS2}1uvTLAZu z?NQ$>ZBXS#^u>NGCm5?y9p^EBS|DFm)KU%fmo0Ue-+`z9=iB)W23Hd3(KUI200000 LNkvXXu0mjfyNafM literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/stormy_water/7_kyogre.png b/data/tilesets/secondary/sootopolis/anim/stormy_water/7_kyogre.png new file mode 100644 index 0000000000000000000000000000000000000000..691af34b6770f8ee2e3541241360737677ed3407 GIT binary patch literal 4658 zcmZ`-RZtv?vczri#R3G^02|!hEyzM}T`ah}Te7%&aA$D>2`mso(BK|y;ouIzH9XF{ zx9WYpshXbY?&_cUoER+)B|IET93&(pJQZbm@XM5bX>K&s7u2z_yA!5g6Gs)dlW>R{#nY+8+yeOM(%@=kZGbScT zZ@%PTe7CP$oVk5)BzIT5`TbML*1(w{gf*xCOo_*uv?@d z_-s{soalOv^Z;u&>};p>qT||i;rO+{MKeQipo7^ORAH^+b^|UFnCp48N=kmFtF>F< z0y3GPFmNw7r3HvHJWEV$23XU?a0wC~-WHvIP_=VDyPnnXHNBj*dUEb)lDGR9^C(d9 z3SQ4l^-j>a9WgAY33P5VT}0Eso8`0$7Ob#uV-m^XPV7Y51Q;CQ05MsWtvUr02P2jP&`|Ct^*9#{gKkKrae>fmVY4# zz|}VE!LjPKtny3~peu2;GBO#dMd@-&q)2VQrOnbLc8bhT=}-(y7rKGe0$;TzK<~ z0S!Rfy(x*5(|7FLvH6UJLZzrcJdI>b9o7oK}o6?wD<2 zas4)XlXqBd46Lvz$#D;jbN9g3_u7SX6<}`o@sJT(%>FC$B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ko~qxSq8yp#|W) z$jd;6s42-KLD63;zYuIUWkXLSBoO1jjqF!0boq~hNSvi$vA zm`b?TcX^D(bFl{j2~$^SreJEC++_QVRDymjF}lR}s0C=mlK~=u{s&f%aiXD_H@TOW zj0a?!crhyrT7nc8RWUd$cYRI*w{%zwxfoQu#q}~WEW(tX+PXE4MZ#fP3)0%y-gsy_ z^nON6qHszqmM3608S3e}0}@F@CGuIXlKgiX-skwV1{o6BJ>#pQC`E~|$<_npC?AQk z&?-!ag~;m+bAm|X$ADxS*EzX;Q_Z+I!Af%i;|DRLBM`I(18&SV%P))o|8Pj|?)n>o ZtXFKK2O93JcsVVSih_oGy{tvV{{ZYo<4*tp literal 0 HcmV?d00001 diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 79c910ea2..fc4d623fb 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -86,6 +86,40 @@ $(TILESETGFXDIR)/secondary/pacifidlog/tiles.4bpp: %.4bpp: %.png $(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 328 +SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim + +$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp + @cat $^ >$@ + +$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \ + $(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp + @cat $^ >$@ + $(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 508 From 715e0d7f64ac6cf980d212608768392083659d8b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 12 Apr 2020 13:13:02 -0400 Subject: [PATCH 30/34] Fix indentation in graphics_file_rules.mk --- graphics_file_rules.mk | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index fc4d623fb..c53033f4c 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -89,35 +89,35 @@ $(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim $(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp @cat $^ >$@ $(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \ - $(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp + $(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp @cat $^ >$@ $(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png @@ -391,9 +391,9 @@ $(INTERFACEGFXDIR)/hp_numbers.4bpp: $(INTERFACEGFXDIR)/hpbar_anim.4bpp \ @cat $^ >$@ $(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin \ - $(UNUSEDGFXDIR)/yellow_frame.bin \ - $(UNUSEDGFXDIR)/green_frame.bin \ - $(UNUSEDGFXDIR)/blank_frame.bin + $(UNUSEDGFXDIR)/yellow_frame.bin \ + $(UNUSEDGFXDIR)/green_frame.bin \ + $(UNUSEDGFXDIR)/blank_frame.bin @cat $^ >$@ $(UNUSEDGFXDIR)/color_frames.4bpp: %.4bpp: %.png From dde4a0416c8dfb1177d04a309edd74546fb9c5fe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 13 Apr 2020 08:42:31 -0400 Subject: [PATCH 31/34] Label GCN link flags field --- .../scripts.inc | 2 +- data/specials.inc | 2 +- include/global.h | 2 +- include/save_location.h | 1 - src/new_game.c | 2 +- src/save_location.c | 21 ++++++++++--------- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 4ebc03c8c..b9ce0c809 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -584,7 +584,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivePokedex:: @ 81FA3AC message LittlerootTown_ProfessorBirchsLab_Text_ReceivedPokedex waitfanfare setflag FLAG_SYS_POKEDEX_GET - special sub_81AFDA0 @ sets flags that are never read + special SetUnlockedPokedexFlags setflag FLAG_RECEIVED_POKEDEX_FROM_BIRCH setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 1 return diff --git a/data/specials.inc b/data/specials.inc index fb2e8fe75..97cc3c782 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -504,7 +504,7 @@ gSpecials:: @ 81DBA64 def_special GetMartEmployeeObjectEventId def_special sub_80A08CC def_special Unused_SetWeatherSunny - def_special sub_81AFDA0 + def_special SetUnlockedPokedexFlags def_special IsTrainerRegistered def_special ShouldDoBrailleRegicePuzzle def_special EnableNationalPokedex diff --git a/include/global.h b/include/global.h index e3c8fee55..bcf3e6486 100644 --- a/include/global.h +++ b/include/global.h @@ -465,7 +465,7 @@ struct SaveBlock2 /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; /*0xA0*/ struct Time lastBerryTreeUpdate; - /*0xA8*/ u32 field_A8; // Written to, but never read. + /*0xA8*/ u32 gcnLinkFlags; // Read by Pokemon Colosseum/XD /*0xAC*/ u32 encryptionKey; /*0xB0*/ struct PlayersApprentice playerApprentice; /*0xDC*/ struct Apprentice apprentices[APPRENTICE_COUNT]; diff --git a/include/save_location.h b/include/save_location.h index 6c2ae0e6b..53f317c57 100644 --- a/include/save_location.h +++ b/include/save_location.h @@ -13,7 +13,6 @@ #define CHAMPION_SAVEWARP (1 << 7) void TrySetMapSaveWarpStatus(void); -void sub_81AFDA0(void); void SetChampionSaveWarp(void); #endif // GUARD_SAVE_LOCATION_H diff --git a/src/new_game.c b/src/new_game.c index 464da6414..290c0c2bb 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -162,7 +162,7 @@ void NewGameInitData(void) ClearSav1(); ClearMailData(); gSaveBlock2Ptr->specialSaveWarpFlags = 0; - gSaveBlock2Ptr->field_A8 = 0; + gSaveBlock2Ptr->gcnLinkFlags = 0; InitPlayerTrainerId(); PlayTimeCounter_Reset(); ClearPokedexFlags(); diff --git a/src/save_location.c b/src/save_location.c index 6bf5eceb0..aa56d7b16 100644 --- a/src/save_location.c +++ b/src/save_location.c @@ -118,17 +118,18 @@ void TrySetMapSaveWarpStatus(void) sub_81AFD5C(); } -// Called when receiving the Pokedex -// Only place field_A8 is written (aside from clearing on new game), never read -void sub_81AFDA0(void) +// In FRLG, only 0x1, 0x10, and 0x20 are set when the pokedex is received +// 0x2, 0x4, 0x8, and 0x8000 are instead set by SetPostgameFlags +// These flags are read by Pokemon Colosseum/XD for linking. XD Additionally requires FLAG_SYS_GAME_CLEAR +void SetUnlockedPokedexFlags(void) { - gSaveBlock2Ptr->field_A8 |= 0x8000; - gSaveBlock2Ptr->field_A8 |= 0x1; - gSaveBlock2Ptr->field_A8 |= 0x2; - gSaveBlock2Ptr->field_A8 |= 0x4; - gSaveBlock2Ptr->field_A8 |= 0x10; - gSaveBlock2Ptr->field_A8 |= 0x20; - gSaveBlock2Ptr->field_A8 |= 0x8; + gSaveBlock2Ptr->gcnLinkFlags |= 0x8000; + gSaveBlock2Ptr->gcnLinkFlags |= 0x1; + gSaveBlock2Ptr->gcnLinkFlags |= 0x2; + gSaveBlock2Ptr->gcnLinkFlags |= 0x4; + gSaveBlock2Ptr->gcnLinkFlags |= 0x10; + gSaveBlock2Ptr->gcnLinkFlags |= 0x20; + gSaveBlock2Ptr->gcnLinkFlags |= 0x8; } void SetChampionSaveWarp(void) From 0ffe63a23b73aee86ed89b3b014595ddaa7c381d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 13 Apr 2020 12:58:41 -0400 Subject: [PATCH 32/34] Fix decor png dimensions --- graphics/decorations/decor_attract_mat.png | Bin 307 -> 257 bytes graphics/decorations/decor_big_plant.png | Bin 310 -> 276 bytes graphics/decorations/decor_blastoise_doll.png | Bin 371 -> 342 bytes graphics/decorations/decor_blue_brick.png | Bin 226 -> 181 bytes graphics/decorations/decor_blue_tent.png | Bin 321 -> 283 bytes graphics/decorations/decor_breakable_door.png | Bin 274 -> 213 bytes graphics/decorations/decor_brick_desk.png | Bin 270 -> 220 bytes graphics/decorations/decor_camp_desk.png | Bin 265 -> 204 bytes graphics/decorations/decor_charizard_doll.png | Bin 349 -> 311 bytes graphics/decorations/decor_colorful_plant.png | Bin 371 -> 345 bytes graphics/decorations/decor_comfort_desk.png | Bin 320 -> 292 bytes graphics/decorations/decor_fire_blast_mat.png | Bin 287 -> 236 bytes graphics/decorations/decor_fissure_mat.png | Bin 290 -> 241 bytes graphics/decorations/decor_glass_ornament.png | Bin 292 -> 260 bytes graphics/decorations/decor_gorgeous_plant.png | Bin 332 -> 299 bytes graphics/decorations/decor_hard_desk.png | Bin 325 -> 288 bytes graphics/decorations/decor_heavy_desk.png | Bin 268 -> 208 bytes graphics/decorations/decor_lapras_doll.png | Bin 349 -> 304 bytes graphics/decorations/decor_powder_snow_mat.png | Bin 302 -> 264 bytes graphics/decorations/decor_pretty_desk.png | Bin 296 -> 245 bytes graphics/decorations/decor_pretty_flowers.png | Bin 318 -> 266 bytes graphics/decorations/decor_ragged_desk.png | Bin 257 -> 200 bytes graphics/decorations/decor_red_brick.png | Bin 226 -> 181 bytes graphics/decorations/decor_red_plant.png | Bin 300 -> 266 bytes graphics/decorations/decor_red_tent.png | Bin 317 -> 289 bytes graphics/decorations/decor_regice_doll.png | Bin 346 -> 313 bytes graphics/decorations/decor_regirock_doll.png | Bin 331 -> 297 bytes graphics/decorations/decor_registeel_doll.png | Bin 351 -> 314 bytes graphics/decorations/decor_rhydon_doll.png | Bin 367 -> 314 bytes graphics/decorations/decor_sand_ornament.png | Bin 286 -> 252 bytes graphics/decorations/decor_slide.png | Bin 293 -> 245 bytes graphics/decorations/decor_snorlax_doll.png | Bin 337 -> 305 bytes graphics/decorations/decor_solid_board.png | Bin 221 -> 162 bytes graphics/decorations/decor_spikes_mat.png | Bin 302 -> 249 bytes graphics/decorations/decor_stand.png | Bin 264 -> 223 bytes graphics/decorations/decor_surf_mat.png | Bin 298 -> 238 bytes graphics/decorations/decor_thunder_mat.png | Bin 315 -> 270 bytes graphics/decorations/decor_tire.png | Bin 303 -> 266 bytes graphics/decorations/decor_tropical_plant.png | Bin 307 -> 274 bytes graphics/decorations/decor_venusaur_doll.png | Bin 393 -> 352 bytes graphics/decorations/decor_wailmer_doll.png | Bin 320 -> 282 bytes graphics/decorations/decor_yellow_brick.png | Bin 226 -> 181 bytes 42 files changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/decorations/decor_attract_mat.png b/graphics/decorations/decor_attract_mat.png index 16528d9f393ad2658efd5f61b6796e524b731885..77e077a718875b0bca526511731ce63b144cb7bc 100644 GIT binary patch delta 204 zcmdnY)X1dR8Q|y6%O%Cdz`(%k>ERLtq$NO@g&9Z+MJk-0sAyl`op4Wt@tb~KK=MQCV@_My{D>r{s)4B|Hhn(z2p5S#&MU6 z&mC{0pi{9v4X-Sm=S`WuWa*UYHk~Y4g=LzB<;CTig=H*7f9~83^76WL=dXfHze)La z9tn0&wn+Z2OpR{~b}<}P%GFrs_LaZOKkzVvH3P%nKTZl~KmNT7bRdJLtDnm{r-UW| Dj8979 delta 254 zcmZo<+RUWb8Q|y6%O%Cdz`(%k>ERLtq&a}tgM}GLT2`*SGEvdKp0OmzFPOpM*^M-y z;6_gu#}J9Bp%Warnhiu;j;EH3-kM#}IBEU<)eZ-IzbnZ-a9)=vZo4q@JCCp1Mym;l zM)IF38T+c92YGKwGLcotSHP9mjQ8V*8!?;Ed$s@o002ovPDHLkV1mpeR!#r_ delta 257 zcmV+c0sj7!0=5DniBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc006W}L_t&-m359i4#F@Dg zS;Iw=9fo_gXK5^~Y0(Pn1x_aoS4f0Nlu=4bV9^UHl>%pNhwJ^a!n$mMp2eQko|9}& z&s6@==>^UECNssnj^lX4X&81m*LuLR);)~1&39ij#Xmg&bt00000NkvXX Hu0mjfo_A(U diff --git a/graphics/decorations/decor_blastoise_doll.png b/graphics/decorations/decor_blastoise_doll.png index 00c55f229e4b92e8f120c578cb39af78c3fe081b..a7b0ee6e48a473847a236aa4b38feb2afdf8bafc 100644 GIT binary patch delta 289 zcmV++0p9-e0@eZ{iBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf8j|) zK~xx(UC_U3!!QsAaC^v*E$4sO83G;r0Opd_korW{B<_$d1`pAYA<)Tm^rmcap%A}< z->Ri~kKS3OL%u=Z{Xh~zj`I-M^0J$abMLPJLQJkaPj3NomT@m=KLxAq!f@Mg1hj(N z%NJtybLa%U#p{TVfC?n?1e5PwccawiZGRV}DruVcP^FBj!~;NFV#N}2@fkPIG^frpzHNbd#Ngs>J{9v}7`PY#QEZIivPg`% nSh%!yI=D*7f7q}1tN;803LrXV`axQC00000NkvXXu0mjfgW7^* delta 319 zcmV-F0l@y&0`mePiBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc008kxL_t&-l~vHaPQx%5h2b{?1Dl;RQOZz>As2vL)=DLgSo=4WB~k`5 zFd#8SjM>80AR#rkkh=oGeek)7R5+5K$v*aH7^7u%0bCv@Lj3_=9SX;t(CvmzE61(Y zAx83tPh)NdPFX9#Ob;-RJ2}z5f4O5deD7P~LBM;Li!Q#_LXttgH82~P3y&5ya*<7q zrOL8IW%C1JmcZ8JD^imy?1}7Ik!W8A@D}pO znOQ(!Q diff --git a/graphics/decorations/decor_blue_brick.png b/graphics/decorations/decor_blue_brick.png index 88e0587127b9041f84d2466a96cd15ea91dee8d7..cb187beb105d8fe8559e0df6c649c686bd72bb7c 100644 GIT binary patch delta 127 zcmaFFxRp_{Gr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPDos!PCVtL}F@k!U1*( z)<%Y7fL*S bU|?92D{?7+&9=)xGZ{Qx{an^LB{Ts5*SsT_ delta 173 zcmdnW_=r)lGr-TCmrII^fq{Y7)59eQNOJ(O2MaThw5(itWul^eJ!46bUoeBivm0qZ z!30ki#}J9B$q5c@Jqk`7;*6|K4hI&nu<*DYb93|1F=%9CDG>aj!z6r2!HMN=g-La9 zW5YpKj)Lfx%=H`{0`0;{1%`qZ5(W-Dx|;f$?E;#anwbKI28?{nf8<(jvN1BaN{d`N U>B9FKXcvR0tDnm{W~YQE0PA@!Pyhe` diff --git a/graphics/decorations/decor_blue_tent.png b/graphics/decorations/decor_blue_tent.png index 575b352410675d85ddb97ad49f62c1765868765e..f94a61e368dafa96572eabe9ada8f73525167f58 100644 GIT binary patch delta 230 zcmVPY!ckgD-eD|&utjgov%kuJh?^;0WSUuiNH*v0f z*Af8ahXq03(qB0D)Um;K23ZkN^Mx07*qoM6N<$f^Z5{ZU6uP delta 268 zcmV+n0rUQw0>J_yiBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc006&9L_t&-m2J?m3c@fD2H?xkJwbf}JGp6m0o#=7R-pkOq)^-|)TNW4 zT^t=1$IrEJ|$RXs~*3r8xpLE~GXVPh* zr*#taN8m0@C7F!b;XXrC5i|OiVg?*)uzHY53**}lgNBiQI8!4YSFO48RsubxXX+cc zzJSnSM`B~lNMbDoAx@MtLMgv}hY*$x{(`57u`WVWW0oV<=6s4WknmqgU-kj7Q&Zri S&LLF*0000B_ZB33WYVJC`JVJ^x6W9*&X)J%b|8)Iy`5P8z-}l^?+^=v%@O(x3AGvcYf29B6 zU--s0fGtm|>rDOQ{~VHYWIFCE$ef&+U?4cT`H`igh6A@c1Ji_{)h&((E(7gk@O1Ta JS?83{1OUlHHZTAH delta 221 zcmV<303!d@0g?hCiBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc0059lL_t&-m2JhSSaA6<8q>?KKf2(8Eczl-ckq(xxK# zM+W7Di%*fUo_GK@>&kqC(?vmc-QwsK-vu5c^2iRM_O&ERLtq$NO@g&9Z+MJk-0sAyl4?&;zfA~7{N;Q((1 z%fbf?6Ar&HI(nJ4h1Frs%m9XGJABOMJ$jV+vgxE_s9EZ!jZ3+&Fo^KY%ABUB&~wt! znD?Zm#+(aF0~adrJe$+VG(lWqNqO@@w+-)?m^bZF<9)2)5yH2ap~;1b!Pd;Fq3KJw Q9MEb8Pgg&ebxsLQ05#h=ZU6uP delta 217 zcmcb^*vF*U8Q|y6%O%Cdz`(%k>ERLtq&a}tgM}GLT2`*SGEvdKp0OmzFPOpM*^M-y zV2`JZV~E7m+Wy^wEe1R;*DV`m<0W0rO$}%ezSVSuHGpB`WNio6yHU@I&oD^u`Pg^u z7sK*h0u1WL6N_totykHKXz(10S$5&Pk;#m|=W7qnVdr+4BAd3|(f@Mat1IrA8@>ff z7|z&gYW8D#X1b`JZj07@{rN!~;~v!9uJbvg+3K`)@p}`sx`3xEQ)}O~$r~j&HF*77 RxC!Vm22WQ%mvv4FO#m>&Qs4jp diff --git a/graphics/decorations/decor_camp_desk.png b/graphics/decorations/decor_camp_desk.png index b40429229a2b1b6377837b0d8b768d397c482166..6a1bf68c914896dce25bb93f55926b05fe88d190 100644 GIT binary patch delta 150 zcmeBVI>V^g8Q|y6%O%Cdz`(%k>ERLtq$NO@g&9Z+MJk-0sA!)P?&;zfA~7{N!GX22 zDM5iPY4b{n-3ar7`Rk=$4)!SayBh=GA^x8@5Ck4?cqs~9|8{an^LB{Ts5A&4!W delta 212 zcmV;_04x8@0f_=3iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc004(cL_t&-m35E74Z|=D1L;rS_9qK86V&Jeg*ri_yqia~{|Ke*rcD5a zfDZy8iy+Xo6yP#eAYFyHD={1K^IV03RH@(-CxCJC z7iENAka3>NCO-O(dcsTl)aPh$-mR9PPmX O0000M=#d<3X46n~WZA8oW5KrYA^LIX6I(f_M7mNS^5-3v!|U?ZW*2uwF%EbLlD5@r&gQE)9w z<{33yDeY=OaG)j_rG0%NK-NvnSder*r$p;SEz~Xo-m46iy*jRr`FU4}hv?_Nt5cNN zPEl4}&*#Y6{i16+!Nb}d-8Cn%Hb)O{ZS0|8Qq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BBw(^?3jQ002ovPDHLkV1jn9VHW@Z delta 267 zcmV+m0rdW)0>AB^oN`DLe5^Ya9k905Z+|$J|L}F_0gp0fl z3Op{U%s(%^^krP{W6X*Cu&8YVABD)t+i$+P#Fa(?n#(0wswD*NzKr>d`G)zteVK#?!?yL}F^|goB(7 z20X4`A4MMIytKoinOR~#v&PZQa(C)kqeTssBr;Ac{`=B@(;M0BP~CFbhL4MEGz5jgO1C(cjQ|?WY1hYOILz6~&fHS7t>;48_5=*AsfitGuyBX1qmYXllyQ0w{ nNMD-s500V{-DtV&=6(GD_{Ju9YEVnt00000NkvXXu0mjfP~Kn+ diff --git a/graphics/decorations/decor_glass_ornament.png b/graphics/decorations/decor_glass_ornament.png index fcc895eb9f0b622bdd5f0bf63de4ba3f4b279dca..c85ae769b2edf842c1079b4dda18e65f48265457 100644 GIT binary patch delta 207 zcmV;=05Jcg0)zq~iBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Je~(E- zK~xx(ZIH1F0x=ARdz+($`anX0n{d#yt_}yTH^i(89(NCV^F4z_`g@}OQ$9YDv~lhy zlmDm}x})A4XW}hjW{H3Y%T=ZdA?u-|s)ARNzM7^HIibf5tmy^_l;wiak#cI$L&cmc zjKr%6EZSk(PAp-K8_lf8Cx!yLCC5X>EWUwCR#Vdc1OLkRk)E>^Czbu1ZKwbM002ov JPDHLkV1hkfRKNfL delta 239 zcmZo+TEe8*8Q|y6%O%Cdz`(%k>ERLtq&a}tgM}GLT2`*SGEvdKp0OmzFPOpM*^M-y z;37{K#}J9Bx%~&Z4jBlzEI04xy}~bKRw2xF_sZ(_rt5M^>$t>zFSPwGeJ8i%;wy)H zd?$^Z8{~6&%3V_hdi~D%n9Hbrnqg!9p(b%l;r)ZIk4hslB}A8OtKTbHUp0MqduU#u zfxO`liGaY<87p`dN}n8ct?ZMvXtgVk5lwepYcW&XzI)n_gLXTbPJ3%EjT2P0GY#@& n5lgiQycd1!o%Gg&d#&f|Fse_L*NH6!I+wxI)z4*}Q$iB}_<&b| diff --git a/graphics/decorations/decor_gorgeous_plant.png b/graphics/decorations/decor_gorgeous_plant.png index dc8639c65719314c01888a632ea76484553f2fbc..ed8947ebdf44c00376744864be5bda13d5327651 100644 GIT binary patch delta 246 zcmVWciBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf3`_P zK~xx(WsW@#fPmm4^NL=&wTFTl)l0Nf$52NJGf1+9q$&O&UgwXxMpxgd*1U#8fX zZ|6s;KLEbo%(HoHSxn+1GeuKCLxN-E1sNhyoDAm2yd&Il77g8!W?3BPVrO`$C2h)F z3|R?Dr0Ya5w8Dsbe=t<8 delta 279 zcmV+y0qFj#0?Yy-iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc007EKL_t&-m1U4YN<%RahQHh(g9Qa$HD17(yaUvv;QqDHYq)B+1xs_5 z;>NXZ-0G#AKo{-vhxzy?1Nk$7e+nHp-Kf`W^k%U0OvKAfFc-;8&n~I*tm$!jS?qY~ zNZk$#r;UCPtS$*DSHfH!mJ*>@ZGl;7J-7B32;(>mEDxI%wY5rqc`KC7A=6x}kGnP8 zzQU?nq!x9gc|_IQY&p{M0&35dINkE$8sTCt$DQzTx4-8{5ESnTahjO8>U-+ dU*j?i{s7odDaQUjcbWhI002ovPDHLkV1lQRdSn0q diff --git a/graphics/decorations/decor_hard_desk.png b/graphics/decorations/decor_hard_desk.png index aa0c7feeacea2b5796fb4adb9e3876d9c0625b8f..b85b098f98af55e49981a59dd69f968441c02a2d 100644 GIT binary patch delta 235 zcmV07S^PlFm>87DWIHYha3r;h4R+5BCp1l(!6r4l8)` z=u1=qx^ipla}^9MV6eLxSvu|KL9oI(Jw4qOR0<5Wb3;=%@uI$iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc006^DL_t&-m0gd)4uUWcM2CZ(B}P7=MDH>sd;l1)Di*I|0zZKMzq6GC zv4@x0?sj$xEKZUNTPIOa$RlcCoqrZnX?6je3nNJ9P?0rQd#WTCbNxneM}fH{3&9sp z;9-!dhF3Rx@rsy)TRAr(EJie)X2=SDs!u^C{96I!AnnA4uf5(-&ZB9byguy(9tNC6RZukNU W{3PPt$u!RZ0000ERLtq$NO@g&9Z+MJk-0sAyjh?djqeA~7{NL4nzT z>rf*D^Wu-2ObkvKu@#C*H#drQJWk?a)pPI@>)G7n!`F3DW15yOFKe@gs>1Ux----Y z+*3YqKw-1=qceBe9nXCeW7u8S&A{d^aHuih2m^yuwf4l22X}u1tz+bP0l+XkK D))_H| delta 215 zcmcb>*u$jQ8Q|y6%O%Cdz`(%k>ERLtq&a}tgM}GLT2`*SGEvdKp0OmzFPOpM*^M-y zV3((hV~E7miv`rX1B9MN5}1^iWGyJ}|AFiE+Yi9|mj2O+q=98B>HV+`D}H zw4_8z88_43m%0qf4ey+FnV&i^d{n3lh}-Ml;8^h8ae-nqO9IQXLWW}v+7pF8*%<(x O#o+1c=d#Wzp$Py~;zt|+ diff --git a/graphics/decorations/decor_lapras_doll.png b/graphics/decorations/decor_lapras_doll.png index 517553a4a9fdda370ac01ffc620164080ff1fddb..8a98a6cf43ed2d4b94c7445ccb368119e0562f9b 100644 GIT binary patch delta 251 zcmVlwtnmX8IOV_S=Q62(09>C@^jDV2dQ`Z1Je0P6``D6?`ZtMBJ;f zfGfBlo%vx%aCd<>aC^Zx^+W8`L}C=|8AYh$FCL{XEWMUj6H=F75xUDyId zWFvB-q#G*cPn3%G*%&6vUVKqxevcHJR#Qwgz*0k1ap;k3hfCL;&|XgsZsG8cX*kT_ z!}l7VcRmjN#oO65f?Oli8ljBF{aUhu7&&P>sdB31sZw*3(ye%3;gi{cnYZ|1{=zwg uKMc$`d-3SkviixX5jiOx34ARuCduydn=@<*jx$yO0000 zK~xx(b&$&qgFp;K;m9pWRIpYW@L=V9Y|U(3mF3mb2;Wi9DYI!}0`mm**=-WPQkVA>mzICL_t&-m35Fo4uUWcMTaFjNqT}dUZ9`GH32VRZ=fe=VB;-t#dZBt zs+NV5@X}$L`8-7Gdhux%!hnY{ifo=I6Hw+|x5_e2NdWX>t#twqNU&!J?hjPURz*_u zCn5}lyYOw)zMbJ1fk-f;8AIK+PqRiEl=V#egFMw-k0&$05U02)er?pL&)>0mYBg6B z%iTAdA8I$!^}D6|X7l_Hs(WhWhL2_Xnjh;8=!q&r|2}nx00000NkvXXu0mjftS)8; diff --git a/graphics/decorations/decor_pretty_desk.png b/graphics/decorations/decor_pretty_desk.png index 5be05ebcbfb8e625a5b9a0f97281a7265f12b91e..69d439cfeb617782bb928daaa70929ead4bc5c06 100644 GIT binary patch delta 192 zcmZ3%^p#PuGr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIA>!PCVtL}F@kf&;5K z>p=&xBhPBndD!0TFp00i_>zopr01dxM!~g&Q delta 243 zcmV*L_t&-m2HqQ4gxU@1UCCr_{*a)CtAZ%= zhFd$LAh5;AvMt+dpy@sUz6#*pS+V^@Wh7o>>l!Esg-uF3Bnp{A5s59=`qqTh8<0-{ zI4CSSM#Y|JLwne^uM2Ew2is tHMGO5!#_!7Ng}Pzd?6+Vc%J)dSO9EjLV7;A6#W1I002ovPDHLkV1kq}U&;Ug diff --git a/graphics/decorations/decor_pretty_flowers.png b/graphics/decorations/decor_pretty_flowers.png index b9fc0f5de24e131df4f635e4bf2d3d4f01b3a0f2..6b7b8565f08d8cac075fa1435fb77b149c4e03fc 100644 GIT binary patch delta 213 zcmV;`04o2!0*V45iBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf0ao@ zK~xx(V_-l7i~@oPj@-lD0tn9gy9f^B|33(o()Zt;gR7LibNL6QQa)Iy*XMbU^el&gcX|r~#4_ zK@jFP(L(V+xKl++!yVzS4l8j_D}~80hNh*3!j*}Jh6W;hCn$*UDpmjhg7Yy^JY1hY P00000NkvXXu0mjf>T6Z= delta 265 zcmV+k0rvii0=@zviBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc006v6L_t&-m2Hnb4uU`wgooZ@H__-y@Ge%?6ssqY-b4>zw`)hYcQM|; zzy%xno6|_ z5JG~YH_bXbe5RWQJJ#$l_c1-~*4Q35d&nS=m`Ulw;hc^3*yqH)ds@8!eI_wctkT&` P00000NkvXXu0mjfTgqzV diff --git a/graphics/decorations/decor_ragged_desk.png b/graphics/decorations/decor_ragged_desk.png index 953c1862fe2ee90edd627a560563e8f29950c609..1bb800267f76c3700cd904a51277d7903e1c0cd4 100644 GIT binary patch delta 146 zcmZoD&e8Q|y6%O%Cdz`(%k>ERLtq$NO@g&9Z+MJk-0sA!)N?CIhdA~7{NL4lp) z5F<15;!bW63vL4gEotY*i40p)4_#WIu(hGlP=t?5;zn@dn+;5CZALRTl`L>RdRpT+ delta 204 zcmX@X*vO>V8Q|y6%O%Cdz`(%k>ERLtq&a}tgM}GLT2`*SGEvdKp0OmzFPOpM*^M-y zV7;e{V~E7m+Wx(~tp+?T`d72xb}`;#YvDb?mB{SF&AaBjs$iE$-8zf8Pd=+lS4>)U zh*$Bz-@W=TmoDQFu?f8--FG?g#_Od^yz(xmu!$!h$zK*)G`YvgXK&8bJ1UzieW#{e z=6Vz3T>e36`-xPow`V2iE6M+vcJmN>fA54?z1@%f{*|hy|J*oj8qh5ap00i_>zopr E0Bg}tYybcN diff --git a/graphics/decorations/decor_red_brick.png b/graphics/decorations/decor_red_brick.png index 3481044ddeca9ad4ae0660ce7ac760dd2097dd07..249ad8f7ae3fe2944e6dd8b05785926ad462a9c3 100644 GIT binary patch delta 127 zcmaFFxRp_{Gr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPDos!PCVtL}F@k!U1*( z)<%Y7fL*S bU|?92D{?7+&9=)xGZ{Qx{an^LB{Ts5*SsT_ delta 173 zcmdnW_=r)lGr-TCmrII^fq{Y7)59eQNOJ(O2MaThw5(itWul^eJ!46bUoeBivm0qZ z!30ki#}J9B$q5c@Jqk`7;*6|K4hI&nu<*DYb93|1F=%9CDG>aj!z6r2!HMN=g-La9 zW5YpKj)Lfx%=H`{0`0;{1%`qZ5(W-Dx|;f$?E;#anwbKI28?{nf8<(jvN1BaN{d`N U>B9FKXcvR0tDnm{W~YQE0PA@!Pyhe` diff --git a/graphics/decorations/decor_red_plant.png b/graphics/decorations/decor_red_plant.png index c12e656f7a498b3dd961c1273e20ee21aa212723..7f3792c97cf4fd05f339491853df85c2fa654c64 100644 GIT binary patch delta 213 zcmZ3()WxLO8Q|y6%O%Cdz`(%k>ERLtq$NO@g&9Z+MJk-0sAyk5)zif>L}F@k!U2Y+ zCXXEDREz$=n>UYmFdPdsDhz8XbeZEj$5&>djN$|%R}J?YE;moy6j*lL^Qb55vUbNK zrbk5c&R#LDW?Cp_IIaAc%-le}Q1wW|^z`2@GZ>Al@=Ff!Owf4$LLvpp?eh0ZHR{#R&bYEX|02iI9vC37j@6oh;hTW66aSewE1*jm NJYD@<);T3K0RVCZOvC^H delta 247 zcmVJT2p3jmARBSOIC6XXB@002ovPDHLkV1hmNS{?uZ diff --git a/graphics/decorations/decor_red_tent.png b/graphics/decorations/decor_red_tent.png index 22e435691ce33c3c507181063a2833dec72d321e..a70d9bc0a8448f8e33d64bea3160fc35d3e97aad 100644 GIT binary patch delta 236 zcmdnXw2(=$Gr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIABji-xah{V+7gagbH ztOp$!&IrD(W@pi7Iyk4J{C(QFn(ymG*PMEM_w=VvmG7e*UPaj6^EEGAS94v6;Ymlu z9^*27!@BE_IG%7+?jPjH&jfdd&l#s?%0F-r43Z(x|hT*%n+_$DJ; z@Bx{%k_u(dl?>cdMI|g6oh;nc)+wmBS!g#~=n3?3cRZGo;(FB5*2ZD5Vby_@IZO^J kQyz11G6}GYaTG8xsGbgr{92Y~4fFtmr>mdKI;Vst03r8N&j0`b delta 264 zcmV+j0r&o)0=)tuiBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=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cx#9N delta 278 zcmV+x0qOp!0?Ps+iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc007BJL_t&-m0gcP3WG2ZMSpIPKqB=x!oHYen zv`}a9$T0K&`~c@Nj%Z(eY%6ftkss#`>&0S;+QBDD2u0oqBJu3zs@wXq)oI!7EL`5$ zx2vbsqMSFBnVv77?!?dl!FLp=Y=~4!fv})O3UZPjIgb} c>}S4^J3U5*j} zFgt@0pbTm(r@7sG1H>*XbY%xc0|N~*Xr+k&xD=@A{3#;Xe9Nz1T|YI?L~get00000 LNkvXXu0mjf<-%zf delta 299 zcmV+`0o4Aw0^b55iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc007-dL_t&-l}(S$ii1E9gv(3zYNL+N5hjqc%z!VjKWEu&dkQF;nNwcV zyv|lfc1a&T8oH?J0$%6Mu-FoaA`%U8Xmr0H<|5(yC?5Vi5=oaG{q;IxR2^T;p1Yq6 zJ#p%Y7)wBZoW;0zpq3j^@l>Rhf3b8y(g)ziJ0Llu-?j(7%(=CUqw0Vz>5R3_4Hl6K z!a@A3CVWU;LIQE3f?v@tZ#v%6SMET!xHoI`PZh>9(Vg=POnAxB37r#F>&ueVywg3PC07*qoM6N<$0fJlEepLVf diff --git a/graphics/decorations/decor_rhydon_doll.png b/graphics/decorations/decor_rhydon_doll.png index ac4714c355746f8810b510e7a692f1e0392bf4d1..2937d372f2c4c56bacd890c51ab4274ed09769ee 100644 GIT binary patch delta 261 zcmV+g0s8*$0=fbriBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf5k~e zK~xx(Wsb25f>0EOy_2hk(gQT~06l@X-=c=#l1FDjZ8gcHrL`KH!Z9c)pEA40i0BMI z=i?kce#7`1@m<$e&$4sgO{hQx)9y#b@M6_LiaGq4!2upOz|v4kJa5uxgSptuuJ3X7~_B$nq>lDM<-g zh==^11oC%E@4~jkj9?f_LPCQde@+m*7-Gf;OG8vxyr>zU*H*7ADqc?TI+u5ALPn6P znxa*G!=~$MsA_@s{L|p+@G-uKJmXh`lB+y1tm%~6Fi{p=Vex2E+Dz`eDV-{NAzXCn ze$^if><^y}X8lo+oWDJ?{!8)Lb@A;h7|+M0e38(m16Uhm(d{$-0jc3J5&6*J>jMA) N002ovPDHLkV1modi2DEl diff --git a/graphics/decorations/decor_sand_ornament.png b/graphics/decorations/decor_sand_ornament.png index 9eafc86440ec95cce0fa4ce905fe3550ff5d210b..d94673c96aac608df3e5089ec646a84df321a174 100644 GIT binary patch delta 199 zcmbQo^oLQgGr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIA>-P6S}L}F@k!U2ZN zPNo90X!mS|Ig>963UWTZ%x_tQZVb_I0CnZxeMGg82T&t_t=RCf5@!|`v z$2+E|b{(=jr>Cc9(C4AS;b7URP^K_t@+1unjTu~iT)m8j(;?G0?y8HtFl5#?vEgjhQua_sU7 zB~anvlVe4G29E1QUZf=FWn8-$ksmU&{$WuKgGEy`1=_Ce(T|P)-xCu!PCVtL}F@kf&;Tn zx&y;0%kO+Fd=4sdyBQikOLIKu^mxSC^Et%RQ}kTrmv?uSS)Om?j*+~vp*)~({=EAy zLszREN)?c?wYRlsFMM`p=B0vjZ|+(z-FW(pWwFq~LPlnHj^j6uc%D3ZLqKiun>9?+ s3kw4a3y*0vFKKra;9^BUR-BG?{ZZ#t2T38z2@|M8zS} zvZ0)T@5WR@fcV4Hi)Gnzh$IE$#xgL*Par))2_cJQyI0kkVoH(XV3YJQ(it!hVEh6M z<>tc8rh$cL>}NaV9ok(33~(CoM!pPmI+kMn1xP$J?EV5nEu;Nmr1A;Vft#+fWLKuf qvlg3b3X#4o&^9kK&09?^<$IqMicsLHrpLSh00000IaJF*0FrvLUN99+|xA>K{JA_X@8-{e}R<&aES4NkRon& zB^u7oq$^(5Y`SEz5-3nYb~zV#QoaQ=gcH#&fMo0@By}y5N8w!$S!1r`bYqu(Gr8 z0Lt3f30}to_~QBl`-+cA2wyV5C(e)=a;u_YYSj`CHlMu_zAsOu|Es*gth$4+&L#59OP?#u)L0000*VDx@L}F@kf&+6; zlLEujjvY%F7BaLb%S_^FG3fI&65vzj+w?qOPp^bP0 Hl+XkKWF8$X delta 167 zcmZ3)c$ZPJGr-TCmrII^fq{Y7)59eQNOJ(O2MaThw5(itWul^eEn`WLUoeBivm0qZ z!Dvqx#}J9B$q5ZiZUTx-N-c$gJUmSf2Odm%H0hAQB$-KP5+>y|IXYZvFVdQ&MBb@0Cdtcj{pDw diff --git a/graphics/decorations/decor_spikes_mat.png b/graphics/decorations/decor_spikes_mat.png index 67f023a0a5c8ef20efdcf2f906ecae0e611b272c..a69b003e7b07e971119274b76d97d9f0c2c1fe24 100644 GIT binary patch delta 196 zcmZ3-^pjDsGr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIA>#nZ(xL}F@kf&)7@ zE35c{n~HjRjRA7W9UC`p^i*h3PI{A*^Cm}$VOl|%Sy`c3Ss6>=v{@{>OSf3I&(LF7 zZS+!OeTE_1%Ew$~-)7vqXm|LgCD)Rp7K<0{S)_FHhTsvy%>4O=d-t-QV{8)BG4iMi v@NwSAew9@t&$-ZaReeB>RF@Rn4Mv90JgZZ!ZgUO;9me44>gTe~DWM4f-1bC* delta 249 zcmVfeiBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc0068>L_t&-l~s^24#F@H1ecbINc`l?1JGHBHi|1+8h#KzAj1AZQig(m za$X~dSMtiERLtq$NO@g&9Z+MJk-0sAylG<>}%WA~7{NL4m#C zeOnW+!?}Is0Ux9^KAyYrZlfW`{@Vu*{EhIJRLT2tg6~A-_aAqylOLDAe`An3;p?8} zW?r5iSy@@*Mg|W~1B0^n_cm64J9pQ?i$P~|*0oci1(J>m4JQ~RnRpDk(ij+wCI^1L T>lR@Sw4K4z)z4*}Q$iB}F~2^4 delta 211 zcmV;^04)FC0f+)2iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc004$bL_t&-m5q%t3IZ_{1t)cycm{h5)8~8vPoSP)w@Rr5Jd7!Ye+J*~ zA}o?3Q$5IJKJ@Ul!pjVAG2z?k*ww1Q1TD&2SKlk>^@BVsoZqRa+-xgvH1C2MFLsJmtcG_67TrQS%Ze1X%z8 N002ovPDHLkV1hCxQxgCH diff --git a/graphics/decorations/decor_surf_mat.png b/graphics/decorations/decor_surf_mat.png index d74cb97bb951238e731ba18577f5230c92fdbd93..f85498e66279fc45b1e6aaba68c357f3d2fc7baa 100644 GIT binary patch delta 185 zcmZ3*^o~)nGr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIA>($mE;L}F@kf&+U~ zQxj7`S!7g{;*{eN)4m^hAF0@)ob_FTV}9dOiQr~mM+3nlg8kK8ZRZ_>l==^zlAFzF z*>hCwT*8Ymj!Tc27}q)Y_Gkw5ao72287*hYnw70M%a-R+orj)7p>(svq}7i9Dy7&z j^LP0N9%is+VAy`hZb}CKq+L6Ju3_+W^>bP0l+XkK(D^=+ delta 245 zcmV@g@ruX#Mt)%!=p`@EC;4D9em_H*?v`K3)xbR z=1lW5<8-7IH(j&BITV+z$=RJ#OX<}$lcWBcOr=+!Smhd)IQMJ12}>`kHZE*9*f+0` vZzM#*CeIJirx&^W!RlTn5;ma>AM&l9^6);CXzXv-00000NkvXXu0mjf1g>PY diff --git a/graphics/decorations/decor_thunder_mat.png b/graphics/decorations/decor_thunder_mat.png index 1c5c56e332eb5f415a253384250666829a8fddfe..82a1787f69ab36c484b30388d012589bc7f42bab 100644 GIT binary patch delta 217 zcmV;~04D#t0*(S9iBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf0;={ zK~xx(ZICez!ypVr)3IA~ft<#XI6#qDGt{CBr?3%YyYzk;urhIm0!b^m>YsS}eDlpP z{OUQ5kMB8@vK({@f>@RvCh_R8T)L5wBgfm?;3Zpjb`xo-36q7{#Zd2^gU<bn`8H2vRW z M07*qoM6N<$f=^Cun*aa+ diff --git a/graphics/decorations/decor_tire.png b/graphics/decorations/decor_tire.png index e394ebbd401f02ba167b8d4e970bd9c1d01898fb..5625323561d822df16c575f89a2f1c3cbcaf9bb1 100644 GIT binary patch delta 213 zcmV;`04o2l0*V45iBL{Q4GJ0x0000DNk~Le0000O0000O1Oos701{as%aI{Jf0ao@ zK~xx(jgLVN0wD}V;ReituxH}|2zmj>Jz>jHIDU4bN+$hLNTd#9!5yyKpCLB=E*27qDPPC`+8IQMc9gw^+HV?o8P_RQl zQY46%=GV{@sI&qlJkGGx33N2WD;et02TbLr*Q!1c7{C P00000NkvXXu0mjf1yoc= delta 250 zcmVclu+Lk8Q@BD~R zv>)<#5ctCj&U^pl}zZ8(-GUhp}9Wj%+_!iq~hLP|4b!3Uk@+R@_sXiM?aGq5lD7AXP-c90UyW0e71$ z&D1$)x9>e?U>>&SYMpoEw)_yrB0q|aYTx@OUqfFl(}wNgw*UYD07*qoM6N<$g32vt ABLDyZ diff --git a/graphics/decorations/decor_tropical_plant.png b/graphics/decorations/decor_tropical_plant.png index 12e43df476dc0d249ce1cbd3d78d5bcbe2b17c2c..f674d6418b1a12f3bfffedef5de37ea5e10ffe56 100644 GIT binary patch delta 221 zcmdnYG>J*EGr-TCmrII^fq{Y7)59eQNK1e)3p0=uic~l~QPIABuBVG*h{V+71PAse z=^d;OWjb$KODE)Zsxmfzpvw4QX99HHIA!lFBxOj7;(4xLVS9XCC zN7J`&=3KN)HoL-bGSb*8+^?l*hx)lWnmZZO`VXAD*<(;GA+cz?(oWqQqVLSy!qcY< z%rJ7hEO0$RqW!9h$rVcm<7Ijgo+m}}8Zt684izi8x%CzBE#72w$dApjMe7X%L#3*^ V7srI9RX`Urc)I$ztaD0e0syd;PI3SM delta 254 zcmVWBp5#voSwp@9}V`|AEme_~!f~RwL7~fks60|iMnzS?% zj2puYgr4iGn0g~4VZ`&^MT`i>R2mC!O^?pG1Y!)-IKL=MQ%lsO$+RllGx^Xi73m+L(1Q|(?4dw2heRNN=~1k+5i9m07*qoM6N<$ Ef)eg!p#T5? diff --git a/graphics/decorations/decor_venusaur_doll.png b/graphics/decorations/decor_venusaur_doll.png index 57fbdd93acacecd590c2d36b5a209c2e23ff5171..ca6bbea76100d2ce84113c15cb4b80ced91fdb22 100644 GIT binary patch delta 300 zcmV+{0n`481KFnTe<%%irjSxrPy$WvXjzbvlo@RSr0HIy0Skb!zFu{V zz^_fmOzd|}A!`0i2djCcmA??RK;ck@6AYs_JVuDKn+4&i=N)nV443=^ZxV-yDjr&B yL>%H^(6`X{eAcpI!RhsYH5j75QEd`Ph-v@;002ovPDHLk0$_rq8iE7> delta 341 zcmV-b0jmDs0*M15iBL{Q4GJ0x0000DNk~Le000080000;1Oos706BT7)R7@Se*tt- zPE!Ct=GbNc009R{L_t&-l}(SaYQsPfL`Rj2G`C=Ed@=b7|A6t@g47nO4d&9?AVpQ!SNC}juoqw`A@?i`R-9|*b;F300000NkvXXu0mjfow$)l diff --git a/graphics/decorations/decor_wailmer_doll.png b/graphics/decorations/decor_wailmer_doll.png index ceedfa6fb097f30c6519a15a6a893d082aa5524e..b5d723bc83de4658b21620bc5721c9428ff67895 100644 GIT binary patch delta 229 zcmVDx0^+zOg4pb7E?|&W09OT7CkB*BaRbVL)QO}) z^rSfgRRJlmmJ}BO2F4KgG$1c6t;7|`aRG8bpadl2=AI^&mX?@Sk^_;iAbyaZ2?QHq fz7qrj{9yqA-fuciDFy5+00000NkvXXu0mjfGBsBX delta 267 zcmV+m0rdWw0>AAL*S bU|?92D{?7+&9=)xGZ{Qx{an^LB{Ts5*SsT_ delta 173 zcmdnW_=r)lGr-TCmrII^fq{Y7)59eQNOJ(O2MaThw5(itWul^eJ!46bUoeBivm0qZ z!30ki#}J9B$q5c@Jqk`7;*6|K4hI&nu<*DYb93|1F=%9CDG>aj!z6r2!HMN=g-La9 zW5YpKj)Lfx%=H`{0`0;{1%`qZ5(W-Dx|;f$?E;#anwbKI28?{nf8<(jvN1BaN{d`N U>B9FKXcvR0tDnm{W~YQE0PA@!Pyhe` From 96958ba5e9a6c4248ecc7a0b4913555aac448729 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 13 Apr 2020 13:04:22 -0400 Subject: [PATCH 33/34] Drop unnecessary decor prefix --- ...{decor_attract_mat.png => attract_mat.png} | Bin .../{decor_big_plant.png => big_plant.png} | Bin ..._blastoise_doll.png => blastoise_doll.png} | Bin .../{decor_blue_brick.png => blue_brick.png} | Bin .../{decor_blue_tent.png => blue_tent.png} | Bin ..._breakable_door.png => breakable_door.png} | Bin .../{decor_brick_desk.png => brick_desk.png} | Bin .../{decor_camp_desk.png => camp_desk.png} | Bin ..._charizard_doll.png => charizard_doll.png} | Bin ..._colorful_plant.png => colorful_plant.png} | Bin ...ecor_comfort_desk.png => comfort_desk.png} | Bin ..._fire_blast_mat.png => fire_blast_mat.png} | Bin ...{decor_fissure_mat.png => fissure_mat.png} | Bin ..._glass_ornament.png => glass_ornament.png} | Bin ..._gorgeous_plant.png => gorgeous_plant.png} | Bin .../{decor_hard_desk.png => hard_desk.png} | Bin .../{decor_heavy_desk.png => heavy_desk.png} | Bin ...{decor_lapras_doll.png => lapras_doll.png} | Bin ...owder_snow_mat.png => powder_snow_mat.png} | Bin ...{decor_pretty_desk.png => pretty_desk.png} | Bin ..._pretty_flowers.png => pretty_flowers.png} | Bin ...{decor_ragged_desk.png => ragged_desk.png} | Bin .../{decor_red_brick.png => red_brick.png} | Bin .../{decor_red_plant.png => red_plant.png} | Bin .../{decor_red_tent.png => red_tent.png} | Bin ...{decor_regice_doll.png => regice_doll.png} | Bin ...or_regirock_doll.png => regirock_doll.png} | Bin ..._registeel_doll.png => registeel_doll.png} | Bin ...{decor_rhydon_doll.png => rhydon_doll.png} | Bin ...or_sand_ornament.png => sand_ornament.png} | Bin .../{decor_slide.png => slide.png} | Bin ...ecor_snorlax_doll.png => snorlax_doll.png} | Bin ...{decor_solid_board.png => solid_board.png} | Bin .../{decor_spikes_mat.png => spikes_mat.png} | Bin .../{decor_stand.png => stand.png} | Bin .../{decor_surf_mat.png => surf_mat.png} | Bin ...{decor_thunder_mat.png => thunder_mat.png} | Bin .../decorations/{decor_tire.png => tire.png} | Bin ..._tropical_plant.png => tropical_plant.png} | Bin ...or_venusaur_doll.png => venusaur_doll.png} | Bin ...ecor_wailmer_doll.png => wailmer_doll.png} | Bin ...ecor_yellow_brick.png => yellow_brick.png} | Bin src/data/graphics/decorations.h | 168 +++++++++--------- 43 files changed, 84 insertions(+), 84 deletions(-) rename graphics/decorations/{decor_attract_mat.png => attract_mat.png} (100%) rename graphics/decorations/{decor_big_plant.png => big_plant.png} (100%) rename graphics/decorations/{decor_blastoise_doll.png => blastoise_doll.png} (100%) rename graphics/decorations/{decor_blue_brick.png => blue_brick.png} (100%) rename graphics/decorations/{decor_blue_tent.png => blue_tent.png} (100%) rename graphics/decorations/{decor_breakable_door.png => breakable_door.png} (100%) rename graphics/decorations/{decor_brick_desk.png => brick_desk.png} (100%) rename graphics/decorations/{decor_camp_desk.png => camp_desk.png} (100%) rename graphics/decorations/{decor_charizard_doll.png => charizard_doll.png} (100%) rename graphics/decorations/{decor_colorful_plant.png => colorful_plant.png} (100%) rename graphics/decorations/{decor_comfort_desk.png => comfort_desk.png} (100%) rename graphics/decorations/{decor_fire_blast_mat.png => fire_blast_mat.png} (100%) rename graphics/decorations/{decor_fissure_mat.png => fissure_mat.png} (100%) rename graphics/decorations/{decor_glass_ornament.png => glass_ornament.png} (100%) rename graphics/decorations/{decor_gorgeous_plant.png => gorgeous_plant.png} (100%) rename graphics/decorations/{decor_hard_desk.png => hard_desk.png} (100%) rename graphics/decorations/{decor_heavy_desk.png => heavy_desk.png} (100%) rename graphics/decorations/{decor_lapras_doll.png => lapras_doll.png} (100%) rename graphics/decorations/{decor_powder_snow_mat.png => powder_snow_mat.png} (100%) rename graphics/decorations/{decor_pretty_desk.png => pretty_desk.png} (100%) rename graphics/decorations/{decor_pretty_flowers.png => pretty_flowers.png} (100%) rename graphics/decorations/{decor_ragged_desk.png => ragged_desk.png} (100%) rename graphics/decorations/{decor_red_brick.png => red_brick.png} (100%) rename graphics/decorations/{decor_red_plant.png => red_plant.png} (100%) rename graphics/decorations/{decor_red_tent.png => red_tent.png} (100%) rename graphics/decorations/{decor_regice_doll.png => regice_doll.png} (100%) rename graphics/decorations/{decor_regirock_doll.png => regirock_doll.png} (100%) rename graphics/decorations/{decor_registeel_doll.png => registeel_doll.png} (100%) rename graphics/decorations/{decor_rhydon_doll.png => rhydon_doll.png} (100%) rename graphics/decorations/{decor_sand_ornament.png => sand_ornament.png} (100%) rename graphics/decorations/{decor_slide.png => slide.png} (100%) rename graphics/decorations/{decor_snorlax_doll.png => snorlax_doll.png} (100%) rename graphics/decorations/{decor_solid_board.png => solid_board.png} (100%) rename graphics/decorations/{decor_spikes_mat.png => spikes_mat.png} (100%) rename graphics/decorations/{decor_stand.png => stand.png} (100%) rename graphics/decorations/{decor_surf_mat.png => surf_mat.png} (100%) rename graphics/decorations/{decor_thunder_mat.png => thunder_mat.png} (100%) rename graphics/decorations/{decor_tire.png => tire.png} (100%) rename graphics/decorations/{decor_tropical_plant.png => tropical_plant.png} (100%) rename graphics/decorations/{decor_venusaur_doll.png => venusaur_doll.png} (100%) rename graphics/decorations/{decor_wailmer_doll.png => wailmer_doll.png} (100%) rename graphics/decorations/{decor_yellow_brick.png => yellow_brick.png} (100%) diff --git a/graphics/decorations/decor_attract_mat.png b/graphics/decorations/attract_mat.png similarity index 100% rename from graphics/decorations/decor_attract_mat.png rename to graphics/decorations/attract_mat.png diff --git a/graphics/decorations/decor_big_plant.png b/graphics/decorations/big_plant.png similarity index 100% rename from graphics/decorations/decor_big_plant.png rename to graphics/decorations/big_plant.png diff --git a/graphics/decorations/decor_blastoise_doll.png b/graphics/decorations/blastoise_doll.png similarity index 100% rename from graphics/decorations/decor_blastoise_doll.png rename to graphics/decorations/blastoise_doll.png diff --git a/graphics/decorations/decor_blue_brick.png b/graphics/decorations/blue_brick.png similarity index 100% rename from graphics/decorations/decor_blue_brick.png rename to graphics/decorations/blue_brick.png diff --git a/graphics/decorations/decor_blue_tent.png b/graphics/decorations/blue_tent.png similarity index 100% rename from graphics/decorations/decor_blue_tent.png rename to graphics/decorations/blue_tent.png diff --git a/graphics/decorations/decor_breakable_door.png b/graphics/decorations/breakable_door.png similarity index 100% rename from graphics/decorations/decor_breakable_door.png rename to graphics/decorations/breakable_door.png diff --git a/graphics/decorations/decor_brick_desk.png b/graphics/decorations/brick_desk.png similarity index 100% rename from graphics/decorations/decor_brick_desk.png rename to graphics/decorations/brick_desk.png diff --git a/graphics/decorations/decor_camp_desk.png b/graphics/decorations/camp_desk.png similarity index 100% rename from graphics/decorations/decor_camp_desk.png rename to graphics/decorations/camp_desk.png diff --git a/graphics/decorations/decor_charizard_doll.png b/graphics/decorations/charizard_doll.png similarity index 100% rename from graphics/decorations/decor_charizard_doll.png rename to graphics/decorations/charizard_doll.png diff --git a/graphics/decorations/decor_colorful_plant.png b/graphics/decorations/colorful_plant.png similarity index 100% rename from graphics/decorations/decor_colorful_plant.png rename to graphics/decorations/colorful_plant.png diff --git a/graphics/decorations/decor_comfort_desk.png b/graphics/decorations/comfort_desk.png similarity index 100% rename from graphics/decorations/decor_comfort_desk.png rename to graphics/decorations/comfort_desk.png diff --git a/graphics/decorations/decor_fire_blast_mat.png b/graphics/decorations/fire_blast_mat.png similarity index 100% rename from graphics/decorations/decor_fire_blast_mat.png rename to graphics/decorations/fire_blast_mat.png diff --git a/graphics/decorations/decor_fissure_mat.png b/graphics/decorations/fissure_mat.png similarity index 100% rename from graphics/decorations/decor_fissure_mat.png rename to graphics/decorations/fissure_mat.png diff --git a/graphics/decorations/decor_glass_ornament.png b/graphics/decorations/glass_ornament.png similarity index 100% rename from graphics/decorations/decor_glass_ornament.png rename to graphics/decorations/glass_ornament.png diff --git a/graphics/decorations/decor_gorgeous_plant.png b/graphics/decorations/gorgeous_plant.png similarity index 100% rename from graphics/decorations/decor_gorgeous_plant.png rename to graphics/decorations/gorgeous_plant.png diff --git a/graphics/decorations/decor_hard_desk.png b/graphics/decorations/hard_desk.png similarity index 100% rename from graphics/decorations/decor_hard_desk.png rename to graphics/decorations/hard_desk.png diff --git a/graphics/decorations/decor_heavy_desk.png b/graphics/decorations/heavy_desk.png similarity index 100% rename from graphics/decorations/decor_heavy_desk.png rename to graphics/decorations/heavy_desk.png diff --git a/graphics/decorations/decor_lapras_doll.png b/graphics/decorations/lapras_doll.png similarity index 100% rename from graphics/decorations/decor_lapras_doll.png rename to graphics/decorations/lapras_doll.png diff --git a/graphics/decorations/decor_powder_snow_mat.png b/graphics/decorations/powder_snow_mat.png similarity index 100% rename from graphics/decorations/decor_powder_snow_mat.png rename to graphics/decorations/powder_snow_mat.png diff --git a/graphics/decorations/decor_pretty_desk.png b/graphics/decorations/pretty_desk.png similarity index 100% rename from graphics/decorations/decor_pretty_desk.png rename to graphics/decorations/pretty_desk.png diff --git a/graphics/decorations/decor_pretty_flowers.png b/graphics/decorations/pretty_flowers.png similarity index 100% rename from graphics/decorations/decor_pretty_flowers.png rename to graphics/decorations/pretty_flowers.png diff --git a/graphics/decorations/decor_ragged_desk.png b/graphics/decorations/ragged_desk.png similarity index 100% rename from graphics/decorations/decor_ragged_desk.png rename to graphics/decorations/ragged_desk.png diff --git a/graphics/decorations/decor_red_brick.png b/graphics/decorations/red_brick.png similarity index 100% rename from graphics/decorations/decor_red_brick.png rename to graphics/decorations/red_brick.png diff --git a/graphics/decorations/decor_red_plant.png b/graphics/decorations/red_plant.png similarity index 100% rename from graphics/decorations/decor_red_plant.png rename to graphics/decorations/red_plant.png diff --git a/graphics/decorations/decor_red_tent.png b/graphics/decorations/red_tent.png similarity index 100% rename from graphics/decorations/decor_red_tent.png rename to graphics/decorations/red_tent.png diff --git a/graphics/decorations/decor_regice_doll.png b/graphics/decorations/regice_doll.png similarity index 100% rename from graphics/decorations/decor_regice_doll.png rename to graphics/decorations/regice_doll.png diff --git a/graphics/decorations/decor_regirock_doll.png b/graphics/decorations/regirock_doll.png similarity index 100% rename from graphics/decorations/decor_regirock_doll.png rename to graphics/decorations/regirock_doll.png diff --git a/graphics/decorations/decor_registeel_doll.png b/graphics/decorations/registeel_doll.png similarity index 100% rename from graphics/decorations/decor_registeel_doll.png rename to graphics/decorations/registeel_doll.png diff --git a/graphics/decorations/decor_rhydon_doll.png b/graphics/decorations/rhydon_doll.png similarity index 100% rename from graphics/decorations/decor_rhydon_doll.png rename to graphics/decorations/rhydon_doll.png diff --git a/graphics/decorations/decor_sand_ornament.png b/graphics/decorations/sand_ornament.png similarity index 100% rename from graphics/decorations/decor_sand_ornament.png rename to graphics/decorations/sand_ornament.png diff --git a/graphics/decorations/decor_slide.png b/graphics/decorations/slide.png similarity index 100% rename from graphics/decorations/decor_slide.png rename to graphics/decorations/slide.png diff --git a/graphics/decorations/decor_snorlax_doll.png b/graphics/decorations/snorlax_doll.png similarity index 100% rename from graphics/decorations/decor_snorlax_doll.png rename to graphics/decorations/snorlax_doll.png diff --git a/graphics/decorations/decor_solid_board.png b/graphics/decorations/solid_board.png similarity index 100% rename from graphics/decorations/decor_solid_board.png rename to graphics/decorations/solid_board.png diff --git a/graphics/decorations/decor_spikes_mat.png b/graphics/decorations/spikes_mat.png similarity index 100% rename from graphics/decorations/decor_spikes_mat.png rename to graphics/decorations/spikes_mat.png diff --git a/graphics/decorations/decor_stand.png b/graphics/decorations/stand.png similarity index 100% rename from graphics/decorations/decor_stand.png rename to graphics/decorations/stand.png diff --git a/graphics/decorations/decor_surf_mat.png b/graphics/decorations/surf_mat.png similarity index 100% rename from graphics/decorations/decor_surf_mat.png rename to graphics/decorations/surf_mat.png diff --git a/graphics/decorations/decor_thunder_mat.png b/graphics/decorations/thunder_mat.png similarity index 100% rename from graphics/decorations/decor_thunder_mat.png rename to graphics/decorations/thunder_mat.png diff --git a/graphics/decorations/decor_tire.png b/graphics/decorations/tire.png similarity index 100% rename from graphics/decorations/decor_tire.png rename to graphics/decorations/tire.png diff --git a/graphics/decorations/decor_tropical_plant.png b/graphics/decorations/tropical_plant.png similarity index 100% rename from graphics/decorations/decor_tropical_plant.png rename to graphics/decorations/tropical_plant.png diff --git a/graphics/decorations/decor_venusaur_doll.png b/graphics/decorations/venusaur_doll.png similarity index 100% rename from graphics/decorations/decor_venusaur_doll.png rename to graphics/decorations/venusaur_doll.png diff --git a/graphics/decorations/decor_wailmer_doll.png b/graphics/decorations/wailmer_doll.png similarity index 100% rename from graphics/decorations/decor_wailmer_doll.png rename to graphics/decorations/wailmer_doll.png diff --git a/graphics/decorations/decor_yellow_brick.png b/graphics/decorations/yellow_brick.png similarity index 100% rename from graphics/decorations/decor_yellow_brick.png rename to graphics/decorations/yellow_brick.png diff --git a/src/data/graphics/decorations.h b/src/data/graphics/decorations.h index d8b865fcf..b18c87348 100644 --- a/src/data/graphics/decorations.h +++ b/src/data/graphics/decorations.h @@ -1,125 +1,125 @@ -const u32 gDecorIcon_HeavyDesk[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.4bpp.lz"); -const u32 gDecorIconPalette_HeavyDesk[] = INCBIN_U32("graphics/decorations/decor_heavy_desk.gbapal.lz"); +const u32 gDecorIcon_HeavyDesk[] = INCBIN_U32("graphics/decorations/heavy_desk.4bpp.lz"); +const u32 gDecorIconPalette_HeavyDesk[] = INCBIN_U32("graphics/decorations/heavy_desk.gbapal.lz"); -const u32 gDecorIcon_RaggedDesk[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.4bpp.lz"); -const u32 gDecorIconPalette_RaggedDesk[] = INCBIN_U32("graphics/decorations/decor_ragged_desk.gbapal.lz"); +const u32 gDecorIcon_RaggedDesk[] = INCBIN_U32("graphics/decorations/ragged_desk.4bpp.lz"); +const u32 gDecorIconPalette_RaggedDesk[] = INCBIN_U32("graphics/decorations/ragged_desk.gbapal.lz"); -const u32 gDecorIcon_ComfortDesk[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.4bpp.lz"); -const u32 gDecorIconPalette_ComfortDesk[] = INCBIN_U32("graphics/decorations/decor_comfort_desk.gbapal.lz"); +const u32 gDecorIcon_ComfortDesk[] = INCBIN_U32("graphics/decorations/comfort_desk.4bpp.lz"); +const u32 gDecorIconPalette_ComfortDesk[] = INCBIN_U32("graphics/decorations/comfort_desk.gbapal.lz"); -const u32 gDecorIcon_PrettyDesk[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.4bpp.lz"); -const u32 gDecorIconPalette_PrettyDesk[] = INCBIN_U32("graphics/decorations/decor_pretty_desk.gbapal.lz"); +const u32 gDecorIcon_PrettyDesk[] = INCBIN_U32("graphics/decorations/pretty_desk.4bpp.lz"); +const u32 gDecorIconPalette_PrettyDesk[] = INCBIN_U32("graphics/decorations/pretty_desk.gbapal.lz"); -const u32 gDecorIcon_BrickDesk[] = INCBIN_U32("graphics/decorations/decor_brick_desk.4bpp.lz"); -const u32 gDecorIconPalette_BrickDesk[] = INCBIN_U32("graphics/decorations/decor_brick_desk.gbapal.lz"); +const u32 gDecorIcon_BrickDesk[] = INCBIN_U32("graphics/decorations/brick_desk.4bpp.lz"); +const u32 gDecorIconPalette_BrickDesk[] = INCBIN_U32("graphics/decorations/brick_desk.gbapal.lz"); -const u32 gDecorIcon_CampDesk[] = INCBIN_U32("graphics/decorations/decor_camp_desk.4bpp.lz"); -const u32 gDecorIconPalette_CampDesk[] = INCBIN_U32("graphics/decorations/decor_camp_desk.gbapal.lz"); +const u32 gDecorIcon_CampDesk[] = INCBIN_U32("graphics/decorations/camp_desk.4bpp.lz"); +const u32 gDecorIconPalette_CampDesk[] = INCBIN_U32("graphics/decorations/camp_desk.gbapal.lz"); -const u32 gDecorIcon_HardDesk[] = INCBIN_U32("graphics/decorations/decor_hard_desk.4bpp.lz"); -const u32 gDecorIconPalette_HardDesk[] = INCBIN_U32("graphics/decorations/decor_hard_desk.gbapal.lz"); +const u32 gDecorIcon_HardDesk[] = INCBIN_U32("graphics/decorations/hard_desk.4bpp.lz"); +const u32 gDecorIconPalette_HardDesk[] = INCBIN_U32("graphics/decorations/hard_desk.gbapal.lz"); -const u32 gDecorIcon_RedPlant[] = INCBIN_U32("graphics/decorations/decor_red_plant.4bpp.lz"); -const u32 gDecorIconPalette_RedPlant[] = INCBIN_U32("graphics/decorations/decor_red_plant.gbapal.lz"); +const u32 gDecorIcon_RedPlant[] = INCBIN_U32("graphics/decorations/red_plant.4bpp.lz"); +const u32 gDecorIconPalette_RedPlant[] = INCBIN_U32("graphics/decorations/red_plant.gbapal.lz"); -const u32 gDecorIcon_TropicalPlant[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.4bpp.lz"); -const u32 gDecorIconPalette_TropicalPlant[] = INCBIN_U32("graphics/decorations/decor_tropical_plant.gbapal.lz"); +const u32 gDecorIcon_TropicalPlant[] = INCBIN_U32("graphics/decorations/tropical_plant.4bpp.lz"); +const u32 gDecorIconPalette_TropicalPlant[] = INCBIN_U32("graphics/decorations/tropical_plant.gbapal.lz"); -const u32 gDecorIcon_PrettyFlowers[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.4bpp.lz"); -const u32 gDecorIconPalette_PrettyFlowers[] = INCBIN_U32("graphics/decorations/decor_pretty_flowers.gbapal.lz"); +const u32 gDecorIcon_PrettyFlowers[] = INCBIN_U32("graphics/decorations/pretty_flowers.4bpp.lz"); +const u32 gDecorIconPalette_PrettyFlowers[] = INCBIN_U32("graphics/decorations/pretty_flowers.gbapal.lz"); -const u32 gDecorIcon_ColorfulPlant[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.4bpp.lz"); -const u32 gDecorIconPalette_ColorfulPlant[] = INCBIN_U32("graphics/decorations/decor_colorful_plant.gbapal.lz"); +const u32 gDecorIcon_ColorfulPlant[] = INCBIN_U32("graphics/decorations/colorful_plant.4bpp.lz"); +const u32 gDecorIconPalette_ColorfulPlant[] = INCBIN_U32("graphics/decorations/colorful_plant.gbapal.lz"); -const u32 gDecorIcon_BigPlant[] = INCBIN_U32("graphics/decorations/decor_big_plant.4bpp.lz"); -const u32 gDecorIconPalette_BigPlant[] = INCBIN_U32("graphics/decorations/decor_big_plant.gbapal.lz"); +const u32 gDecorIcon_BigPlant[] = INCBIN_U32("graphics/decorations/big_plant.4bpp.lz"); +const u32 gDecorIconPalette_BigPlant[] = INCBIN_U32("graphics/decorations/big_plant.gbapal.lz"); -const u32 gDecorIcon_GorgeousPlant[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.4bpp.lz"); -const u32 gDecorIconPalette_GorgeousPlant[] = INCBIN_U32("graphics/decorations/decor_gorgeous_plant.gbapal.lz"); +const u32 gDecorIcon_GorgeousPlant[] = INCBIN_U32("graphics/decorations/gorgeous_plant.4bpp.lz"); +const u32 gDecorIconPalette_GorgeousPlant[] = INCBIN_U32("graphics/decorations/gorgeous_plant.gbapal.lz"); -const u32 gDecorIcon_RedBrick[] = INCBIN_U32("graphics/decorations/decor_red_brick.4bpp.lz"); -const u32 gDecorIconPalette_RedBrick[] = INCBIN_U32("graphics/decorations/decor_red_brick.gbapal.lz"); +const u32 gDecorIcon_RedBrick[] = INCBIN_U32("graphics/decorations/red_brick.4bpp.lz"); +const u32 gDecorIconPalette_RedBrick[] = INCBIN_U32("graphics/decorations/red_brick.gbapal.lz"); -const u32 gDecorIcon_YellowBrick[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.4bpp.lz"); -const u32 gDecorIconPalette_YellowBrick[] = INCBIN_U32("graphics/decorations/decor_yellow_brick.gbapal.lz"); +const u32 gDecorIcon_YellowBrick[] = INCBIN_U32("graphics/decorations/yellow_brick.4bpp.lz"); +const u32 gDecorIconPalette_YellowBrick[] = INCBIN_U32("graphics/decorations/yellow_brick.gbapal.lz"); -const u32 gDecorIcon_BlueBrick[] = INCBIN_U32("graphics/decorations/decor_blue_brick.4bpp.lz"); -const u32 gDecorIconPalette_BlueBrick[] = INCBIN_U32("graphics/decorations/decor_blue_brick.gbapal.lz"); +const u32 gDecorIcon_BlueBrick[] = INCBIN_U32("graphics/decorations/blue_brick.4bpp.lz"); +const u32 gDecorIconPalette_BlueBrick[] = INCBIN_U32("graphics/decorations/blue_brick.gbapal.lz"); -const u32 gDecorIcon_RedTent[] = INCBIN_U32("graphics/decorations/decor_red_tent.4bpp.lz"); -const u32 gDecorIconPalette_RedTent[] = INCBIN_U32("graphics/decorations/decor_red_tent.gbapal.lz"); +const u32 gDecorIcon_RedTent[] = INCBIN_U32("graphics/decorations/red_tent.4bpp.lz"); +const u32 gDecorIconPalette_RedTent[] = INCBIN_U32("graphics/decorations/red_tent.gbapal.lz"); -const u32 gDecorIcon_BlueTent[] = INCBIN_U32("graphics/decorations/decor_blue_tent.4bpp.lz"); -const u32 gDecorIconPalette_BlueTent[] = INCBIN_U32("graphics/decorations/decor_blue_tent.gbapal.lz"); +const u32 gDecorIcon_BlueTent[] = INCBIN_U32("graphics/decorations/blue_tent.4bpp.lz"); +const u32 gDecorIconPalette_BlueTent[] = INCBIN_U32("graphics/decorations/blue_tent.gbapal.lz"); -const u32 gDecorIcon_SolidBoard[] = INCBIN_U32("graphics/decorations/decor_solid_board.4bpp.lz"); -const u32 gDecorIconPalette_SolidBoard[] = INCBIN_U32("graphics/decorations/decor_solid_board.gbapal.lz"); +const u32 gDecorIcon_SolidBoard[] = INCBIN_U32("graphics/decorations/solid_board.4bpp.lz"); +const u32 gDecorIconPalette_SolidBoard[] = INCBIN_U32("graphics/decorations/solid_board.gbapal.lz"); -const u32 gDecorIcon_Slide[] = INCBIN_U32("graphics/decorations/decor_slide.4bpp.lz"); -const u32 gDecorIconPalette_Slide[] = INCBIN_U32("graphics/decorations/decor_slide.gbapal.lz"); +const u32 gDecorIcon_Slide[] = INCBIN_U32("graphics/decorations/slide.4bpp.lz"); +const u32 gDecorIconPalette_Slide[] = INCBIN_U32("graphics/decorations/slide.gbapal.lz"); -const u32 gDecorIcon_Tire[] = INCBIN_U32("graphics/decorations/decor_tire.4bpp.lz"); -const u32 gDecorIconPalette_Tire[] = INCBIN_U32("graphics/decorations/decor_tire.gbapal.lz"); +const u32 gDecorIcon_Tire[] = INCBIN_U32("graphics/decorations/tire.4bpp.lz"); +const u32 gDecorIconPalette_Tire[] = INCBIN_U32("graphics/decorations/tire.gbapal.lz"); -const u32 gDecorIcon_Stand[] = INCBIN_U32("graphics/decorations/decor_stand.4bpp.lz"); -const u32 gDecorIconPalette_Stand[] = INCBIN_U32("graphics/decorations/decor_stand.gbapal.lz"); +const u32 gDecorIcon_Stand[] = INCBIN_U32("graphics/decorations/stand.4bpp.lz"); +const u32 gDecorIconPalette_Stand[] = INCBIN_U32("graphics/decorations/stand.gbapal.lz"); -const u32 gDecorIcon_BreakableDoor[] = INCBIN_U32("graphics/decorations/decor_breakable_door.4bpp.lz"); -const u32 gDecorIconPalette_BreakableDoor[] = INCBIN_U32("graphics/decorations/decor_breakable_door.gbapal.lz"); +const u32 gDecorIcon_BreakableDoor[] = INCBIN_U32("graphics/decorations/breakable_door.4bpp.lz"); +const u32 gDecorIconPalette_BreakableDoor[] = INCBIN_U32("graphics/decorations/breakable_door.gbapal.lz"); -const u32 gDecorIcon_SandOrnament[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.4bpp.lz"); -const u32 gDecorIconPalette_SandOrnament[] = INCBIN_U32("graphics/decorations/decor_sand_ornament.gbapal.lz"); +const u32 gDecorIcon_SandOrnament[] = INCBIN_U32("graphics/decorations/sand_ornament.4bpp.lz"); +const u32 gDecorIconPalette_SandOrnament[] = INCBIN_U32("graphics/decorations/sand_ornament.gbapal.lz"); -const u32 gDecorIcon_GlassOrnament[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.4bpp.lz"); -const u32 gDecorIconPalette_GlassOrnament[] = INCBIN_U32("graphics/decorations/decor_glass_ornament.gbapal.lz"); +const u32 gDecorIcon_GlassOrnament[] = INCBIN_U32("graphics/decorations/glass_ornament.4bpp.lz"); +const u32 gDecorIconPalette_GlassOrnament[] = INCBIN_U32("graphics/decorations/glass_ornament.gbapal.lz"); -const u32 gDecorIcon_SurfMat[] = INCBIN_U32("graphics/decorations/decor_surf_mat.4bpp.lz"); -const u32 gDecorIconPalette_SurfMat[] = INCBIN_U32("graphics/decorations/decor_surf_mat.gbapal.lz"); +const u32 gDecorIcon_SurfMat[] = INCBIN_U32("graphics/decorations/surf_mat.4bpp.lz"); +const u32 gDecorIconPalette_SurfMat[] = INCBIN_U32("graphics/decorations/surf_mat.gbapal.lz"); -const u32 gDecorIcon_ThunderMat[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.4bpp.lz"); -const u32 gDecorIconPalette_ThunderMat[] = INCBIN_U32("graphics/decorations/decor_thunder_mat.gbapal.lz"); +const u32 gDecorIcon_ThunderMat[] = INCBIN_U32("graphics/decorations/thunder_mat.4bpp.lz"); +const u32 gDecorIconPalette_ThunderMat[] = INCBIN_U32("graphics/decorations/thunder_mat.gbapal.lz"); -const u32 gDecorIcon_FireBlastMat[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.4bpp.lz"); -const u32 gDecorIconPalette_FireBlastMat[] = INCBIN_U32("graphics/decorations/decor_fire_blast_mat.gbapal.lz"); +const u32 gDecorIcon_FireBlastMat[] = INCBIN_U32("graphics/decorations/fire_blast_mat.4bpp.lz"); +const u32 gDecorIconPalette_FireBlastMat[] = INCBIN_U32("graphics/decorations/fire_blast_mat.gbapal.lz"); -const u32 gDecorIcon_PowderSnowMat[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.4bpp.lz"); -const u32 gDecorIconPalette_PowderSnowMat[] = INCBIN_U32("graphics/decorations/decor_powder_snow_mat.gbapal.lz"); +const u32 gDecorIcon_PowderSnowMat[] = INCBIN_U32("graphics/decorations/powder_snow_mat.4bpp.lz"); +const u32 gDecorIconPalette_PowderSnowMat[] = INCBIN_U32("graphics/decorations/powder_snow_mat.gbapal.lz"); -const u32 gDecorIcon_AttractMat[] = INCBIN_U32("graphics/decorations/decor_attract_mat.4bpp.lz"); -const u32 gDecorIconPalette_AttractMat[] = INCBIN_U32("graphics/decorations/decor_attract_mat.gbapal.lz"); +const u32 gDecorIcon_AttractMat[] = INCBIN_U32("graphics/decorations/attract_mat.4bpp.lz"); +const u32 gDecorIconPalette_AttractMat[] = INCBIN_U32("graphics/decorations/attract_mat.gbapal.lz"); -const u32 gDecorIcon_FissureMat[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.4bpp.lz"); -const u32 gDecorIconPalette_FissureMat[] = INCBIN_U32("graphics/decorations/decor_fissure_mat.gbapal.lz"); +const u32 gDecorIcon_FissureMat[] = INCBIN_U32("graphics/decorations/fissure_mat.4bpp.lz"); +const u32 gDecorIconPalette_FissureMat[] = INCBIN_U32("graphics/decorations/fissure_mat.gbapal.lz"); -const u32 gDecorIcon_SpikesMat[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.4bpp.lz"); -const u32 gDecorIconPalette_SpikesMat[] = INCBIN_U32("graphics/decorations/decor_spikes_mat.gbapal.lz"); +const u32 gDecorIcon_SpikesMat[] = INCBIN_U32("graphics/decorations/spikes_mat.4bpp.lz"); +const u32 gDecorIconPalette_SpikesMat[] = INCBIN_U32("graphics/decorations/spikes_mat.gbapal.lz"); -const u32 gDecorIcon_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.4bpp.lz"); -const u32 gDecorIconPalette_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/decor_snorlax_doll.gbapal.lz"); +const u32 gDecorIcon_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/snorlax_doll.4bpp.lz"); +const u32 gDecorIconPalette_SnorlaxDoll[] = INCBIN_U32("graphics/decorations/snorlax_doll.gbapal.lz"); -const u32 gDecorIcon_RhydonDoll[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.4bpp.lz"); -const u32 gDecorIconPalette_RhydonDoll[] = INCBIN_U32("graphics/decorations/decor_rhydon_doll.gbapal.lz"); +const u32 gDecorIcon_RhydonDoll[] = INCBIN_U32("graphics/decorations/rhydon_doll.4bpp.lz"); +const u32 gDecorIconPalette_RhydonDoll[] = INCBIN_U32("graphics/decorations/rhydon_doll.gbapal.lz"); -const u32 gDecorIcon_LaprasDoll[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.4bpp.lz"); -const u32 gDecorIconPalette_LaprasDoll[] = INCBIN_U32("graphics/decorations/decor_lapras_doll.gbapal.lz"); +const u32 gDecorIcon_LaprasDoll[] = INCBIN_U32("graphics/decorations/lapras_doll.4bpp.lz"); +const u32 gDecorIconPalette_LaprasDoll[] = INCBIN_U32("graphics/decorations/lapras_doll.gbapal.lz"); -const u32 gDecorIcon_VenusaurDoll[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.4bpp.lz"); -const u32 gDecorIconPalette_VenusaurDoll[] = INCBIN_U32("graphics/decorations/decor_venusaur_doll.gbapal.lz"); +const u32 gDecorIcon_VenusaurDoll[] = INCBIN_U32("graphics/decorations/venusaur_doll.4bpp.lz"); +const u32 gDecorIconPalette_VenusaurDoll[] = INCBIN_U32("graphics/decorations/venusaur_doll.gbapal.lz"); -const u32 gDecorIcon_CharizardDoll[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.4bpp.lz"); -const u32 gDecorIconPalette_CharizardDoll[] = INCBIN_U32("graphics/decorations/decor_charizard_doll.gbapal.lz"); +const u32 gDecorIcon_CharizardDoll[] = INCBIN_U32("graphics/decorations/charizard_doll.4bpp.lz"); +const u32 gDecorIconPalette_CharizardDoll[] = INCBIN_U32("graphics/decorations/charizard_doll.gbapal.lz"); -const u32 gDecorIcon_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.4bpp.lz"); -const u32 gDecorIconPalette_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/decor_blastoise_doll.gbapal.lz"); +const u32 gDecorIcon_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/blastoise_doll.4bpp.lz"); +const u32 gDecorIconPalette_BlastoiseDoll[] = INCBIN_U32("graphics/decorations/blastoise_doll.gbapal.lz"); -const u32 gDecorIcon_WailmerDoll[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.4bpp.lz"); -const u32 gDecorIconPalette_WailmerDoll[] = INCBIN_U32("graphics/decorations/decor_wailmer_doll.gbapal.lz"); +const u32 gDecorIcon_WailmerDoll[] = INCBIN_U32("graphics/decorations/wailmer_doll.4bpp.lz"); +const u32 gDecorIconPalette_WailmerDoll[] = INCBIN_U32("graphics/decorations/wailmer_doll.gbapal.lz"); -const u32 gDecorIcon_RegiceDoll[] = INCBIN_U32("graphics/decorations/decor_regice_doll.4bpp.lz"); -const u32 gDecorIconPalette_RegiceDoll[] = INCBIN_U32("graphics/decorations/decor_regice_doll.gbapal.lz"); +const u32 gDecorIcon_RegiceDoll[] = INCBIN_U32("graphics/decorations/regice_doll.4bpp.lz"); +const u32 gDecorIconPalette_RegiceDoll[] = INCBIN_U32("graphics/decorations/regice_doll.gbapal.lz"); -const u32 gDecorIcon_RegirockDoll[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.4bpp.lz"); -const u32 gDecorIconPalette_RegirockDoll[] = INCBIN_U32("graphics/decorations/decor_regirock_doll.gbapal.lz"); +const u32 gDecorIcon_RegirockDoll[] = INCBIN_U32("graphics/decorations/regirock_doll.4bpp.lz"); +const u32 gDecorIconPalette_RegirockDoll[] = INCBIN_U32("graphics/decorations/regirock_doll.gbapal.lz"); -const u32 gDecorIcon_RegisteelDoll[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.4bpp.lz"); -const u32 gDecorIconPalette_RegisteelDoll[] = INCBIN_U32("graphics/decorations/decor_registeel_doll.gbapal.lz"); +const u32 gDecorIcon_RegisteelDoll[] = INCBIN_U32("graphics/decorations/registeel_doll.4bpp.lz"); +const u32 gDecorIconPalette_RegisteelDoll[] = INCBIN_U32("graphics/decorations/registeel_doll.gbapal.lz"); From 8d3b7bd0b1ea64855595b4ebd95c38b615901ffa Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 13 Apr 2020 14:43:50 -0400 Subject: [PATCH 34/34] Use metatile labels for decor gfx --- include/constants/metatile_labels.h | 148 ++++++++- src/data/decoration/tiles.h | 476 ++++++++++++++-------------- src/fldeff_misc.c | 4 +- src/secret_base.c | 22 +- 4 files changed, 384 insertions(+), 266 deletions(-) diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 4bcf47ea8..586107687 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -524,33 +524,64 @@ #define METATILE_SecretBase_MudBall 0x228 #define METATILE_SecretBase_Fence_Horizontal 0x22C #define METATILE_SecretBase_Fence_Vertical 0x233 -#define METATILE_SecretBase_Board_Top 0x234 -#define METATILE_SecretBase_Board_Bottom 0x23C +#define METATILE_SecretBase_SolidBoard_Top 0x234 +#define METATILE_SecretBase_SolidBoard_Bottom 0x23C +#define METATILE_SecretBase_RedTent_TopLeft 0x230 +#define METATILE_SecretBase_RedTent_TopMid 0x231 +#define METATILE_SecretBase_RedTent_TopRight 0x232 +#define METATILE_SecretBase_RedTent_MidLeft 0x238 #define METATILE_SecretBase_RedTent_DoorTop 0x239 +#define METATILE_SecretBase_RedTent_MidRight 0x23A +#define METATILE_SecretBase_RedTent_BottomLeft 0x240 #define METATILE_SecretBase_RedTent_Door 0x241 +#define METATILE_SecretBase_RedTent_BottomRight 0x23B +#define METATILE_SecretBase_BlueTent_TopLeft 0x248 +#define METATILE_SecretBase_BlueTent_TopMid 0x249 +#define METATILE_SecretBase_BlueTent_TopRight 0x268 +#define METATILE_SecretBase_BlueTent_MidLeft 0x250 #define METATILE_SecretBase_BlueTent_DoorTop 0x251 +#define METATILE_SecretBase_BlueTent_MidRight 0x270 +#define METATILE_SecretBase_BlueTent_BottomLeft 0x258 #define METATILE_SecretBase_BlueTent_Door 0x259 -#define METATILE_SecretBase_Slide_Stairs 0x23D -#define METATILE_SecretBase_Slide 0x23E -#define METATILE_SecretBase_Stand_LeftCorner 0x26A -#define METATILE_SecretBase_Stand_RightCorner 0x26D +#define METATILE_SecretBase_BlueTent_BottomRight 0x269 +#define METATILE_SecretBase_Slide_TopLeft 0x235 +#define METATILE_SecretBase_Slide_TopRight 0x236 +#define METATILE_SecretBase_Slide_StairLanding 0x23D +#define METATILE_SecretBase_Slide_SlideTop 0x23E +#define METATILE_SecretBase_Slide_Stairs 0x263 +#define METATILE_SecretBase_Slide_SlideBottom 0x264 +#define METATILE_SecretBase_Slide_MatLeft 0x26F +#define METATILE_SecretBase_Slide_MatRight 0x277 +#define METATILE_SecretBase_Stand_CornerLeft 0x26A +#define METATILE_SecretBase_Stand_MidLeft 0x26B +#define METATILE_SecretBase_Stand_MidRight 0x26C +#define METATILE_SecretBase_Stand_CornerRight 0x26D +#define METATILE_SecretBase_Stand_StairsLeft 0x272 +#define METATILE_SecretBase_Stand_BaseLeft 0x273 +#define METATILE_SecretBase_Stand_BaseRight 0x274 +#define METATILE_SecretBase_Stand_StairsRight 0x275 #define METATILE_SecretBase_BreakableDoor_TopClosed 0x237 #define METATILE_SecretBase_BreakableDoor_BottomClosed 0x23F #define METATILE_SecretBase_BreakableDoor_TopOpen 0x26E #define METATILE_SecretBase_BreakableDoor_BottomOpen 0x276 -#define METATILE_SecretBase_NoteMat_C 0x278 +#define METATILE_SecretBase_GlitterMat 0x260 +#define METATILE_SecretBase_JumpMat 0x261 +#define METATILE_SecretBase_SpinMat 0x262 +#define METATILE_SecretBase_NoteMat_C_Low 0x278 #define METATILE_SecretBase_NoteMat_D 0x279 #define METATILE_SecretBase_NoteMat_E 0x27A #define METATILE_SecretBase_NoteMat_F 0x27B #define METATILE_SecretBase_NoteMat_G 0x27C #define METATILE_SecretBase_NoteMat_A 0x27D #define METATILE_SecretBase_NoteMat_B 0x27E -#define METATILE_SecretBase_NoteMat_C_Sharp 0x2B3 +#define METATILE_SecretBase_NoteMat_C_High 0x2B3 #define METATILE_SecretBase_Tire_TopLeft 0x280 #define METATILE_SecretBase_Tire_TopRight 0x281 #define METATILE_SecretBase_Tire_BottomLeft 0x288 #define METATILE_SecretBase_Tire_BottomRight 0x289 +#define METATILE_SecretBase_GlassOrnament_Top 0x282 #define METATILE_SecretBase_GlassOrnament_Base1 0x28A +#define METATILE_SecretBase_GlassOrnament_TopWall 0x283 #define METATILE_SecretBase_GlassOrnament_Base2 0x28B #define METATILE_SecretBase_SandOrnament_BrokenTop 0x284 #define METATILE_SecretBase_SandOrnament_BrokenBase 0x28C @@ -622,23 +653,41 @@ #define METATILE_SecretBase_RaggedChair 0x2C2 #define METATILE_SecretBase_BrickChair 0x2C8 #define METATILE_SecretBase_CampChair 0x2C9 -#define METATILE_SecretBase_HardChair 0x2Ca +#define METATILE_SecretBase_HardChair 0x2CA +#define METATILE_SecretBase_RedPlant_Top 0x2D0 #define METATILE_SecretBase_RedPlant_Base1 0x2D8 +#define METATILE_SecretBase_RedPlant_TopWall 0x2D1 #define METATILE_SecretBase_RedPlant_Base2 0x2D9 +#define METATILE_SecretBase_TropicalPlant_Top 0x2D2 #define METATILE_SecretBase_TropicalPlant_Base1 0x2DA +#define METATILE_SecretBase_TropicalPlant_TopWall 0x2D3 #define METATILE_SecretBase_TropicalPlant_Base2 0x2DB -#define METATILE_SecretBase_PrettyFlower_Base1 0x2DC -#define METATILE_SecretBase_PrettyFlower_Base2 0x2DD -#define METATILE_SecretBase_ColorfulFlowers_BaseLeft1 0x2E8 -#define METATILE_SecretBase_ColorfulFlowers_BaseRight1 0x2E9 -#define METATILE_SecretBase_ColorfulFlowers_BaseLeft2 0x2EA -#define METATILE_SecretBase_ColorfulFlowers_BaseRight2 0x2EB +#define METATILE_SecretBase_PrettyFlowers_Top 0x2D4 +#define METATILE_SecretBase_PrettyFlowers_Base1 0x2DC +#define METATILE_SecretBase_PrettyFlowers_TopWall 0x2D5 +#define METATILE_SecretBase_PrettyFlowers_Base2 0x2DD +#define METATILE_SecretBase_ColorfulPlant_TopLeft 0x2E0 +#define METATILE_SecretBase_ColorfulPlant_TopRight 0x2E2 +#define METATILE_SecretBase_ColorfulPlant_BaseLeft1 0x2E8 +#define METATILE_SecretBase_ColorfulPlant_BaseRight1 0x2E9 +#define METATILE_SecretBase_ColorfulPlant_TopLeftWall 0x2E1 +#define METATILE_SecretBase_ColorfulPlant_TopRightWall 0x2E3 +#define METATILE_SecretBase_ColorfulPlant_BaseLeft2 0x2EA +#define METATILE_SecretBase_ColorfulPlant_BaseRight2 0x2EB +#define METATILE_SecretBase_BigPlant_TopLeft 0x2E4 +#define METATILE_SecretBase_BigPlant_TopRight 0x2E6 #define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC #define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED +#define METATILE_SecretBase_BigPlant_TopLeftWall 0x2E5 +#define METATILE_SecretBase_BigPlant_TopRightWall 0x2E6 #define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE #define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF +#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0 +#define METATILE_SecretBase_GorgeousPlant_TopRight 0x2F2 #define METATILE_SecretBase_GorgeousPlant_BaseLeft1 0x2F8 #define METATILE_SecretBase_GorgeousPlant_BaseRight1 0x2F9 +#define METATILE_SecretBase_GorgeousPlant_TopLeftWall 0x2F1 +#define METATILE_SecretBase_GorgeousPlant_TopRightWall 0x2F3 #define METATILE_SecretBase_GorgeousPlant_BaseLeft2 0x2FA #define METATILE_SecretBase_GorgeousPlant_BaseRight2 0x2FB #define METATILE_SecretBase_TV 0x2F4 @@ -659,12 +708,79 @@ #define METATILE_SecretBase_RedPoster 0x332 #define METATILE_SecretBase_BluePoster 0x333 #define METATILE_SecretBase_CutePoster 0x334 +#define METATILE_SecretBase_SilverShield_Top 0x2D6 #define METATILE_SecretBase_SilverShield_Base1 0x2DE +#define METATILE_SecretBase_SilverShield_TopWall 0x2D7 #define METATILE_SecretBase_SilverShield_Base2 0x2DF +#define METATILE_SecretBase_GoldShield_Top 0x32E #define METATILE_SecretBase_GoldShield_Base1 0x336 +#define METATILE_SecretBase_GoldShield_TopWall 0x32F #define METATILE_SecretBase_GoldShield_Base2 0x337 #define METATILE_SecretBase_RedBalloon 0x338 -#define METATILE_SecretBase_BlueBalloon 0x33c +#define METATILE_SecretBase_BlueBalloon 0x33C #define METATILE_SecretBase_YellowBalloon 0x340 +#define METATILE_SecretBase_SurfMat_TopLeft 0x242 +#define METATILE_SecretBase_SurfMat_TopMid 0x243 +#define METATILE_SecretBase_SurfMat_TopRight 0x244 +#define METATILE_SecretBase_SurfMat_MidLeft 0x24A +#define METATILE_SecretBase_SurfMat_Center 0x24B +#define METATILE_SecretBase_SurfMat_MidRight 0x24C +#define METATILE_SecretBase_SurfMat_BottomLeft 0x252 +#define METATILE_SecretBase_SurfMat_BottomMid 0x253 +#define METATILE_SecretBase_SurfMat_BottomRight 0x254 +#define METATILE_SecretBase_ThunderMat_TopLeft 0x245 +#define METATILE_SecretBase_ThunderMat_TopMid 0x246 +#define METATILE_SecretBase_ThunderMat_TopRight 0x247 +#define METATILE_SecretBase_ThunderMat_MidLeft 0x24D +#define METATILE_SecretBase_ThunderMat_Center 0x24E +#define METATILE_SecretBase_ThunderMat_MidRight 0x24F +#define METATILE_SecretBase_ThunderMat_BottomLeft 0x255 +#define METATILE_SecretBase_ThunderMat_BottomMid 0x256 +#define METATILE_SecretBase_ThunderMat_BottomRight 0x257 +#define METATILE_SecretBase_FireBlastMat_TopLeft 0x25A +#define METATILE_SecretBase_FireBlastMat_TopMid 0x25B +#define METATILE_SecretBase_FireBlastMat_TopRight 0x25C +#define METATILE_SecretBase_FireBlastMat_MidLeft 0x25D +#define METATILE_SecretBase_FireBlastMat_Center 0x25E +#define METATILE_SecretBase_FireBlastMat_MidRight 0x25F +#define METATILE_SecretBase_FireBlastMat_BottomLeft 0x265 +#define METATILE_SecretBase_FireBlastMat_BottomMid 0x266 +#define METATILE_SecretBase_FireBlastMat_BottomRight 0x267 +#define METATILE_SecretBase_PowderSnowMat_TopLeft 0x300 +#define METATILE_SecretBase_PowderSnowMat_TopMid 0x301 +#define METATILE_SecretBase_PowderSnowMat_TopRight 0x302 +#define METATILE_SecretBase_PowderSnowMat_MidLeft 0x308 +#define METATILE_SecretBase_PowderSnowMat_Center 0x309 +#define METATILE_SecretBase_PowderSnowMat_MidRight 0x30A +#define METATILE_SecretBase_PowderSnowMat_BottomLeft 0x310 +#define METATILE_SecretBase_PowderSnowMat_BottomMid 0x311 +#define METATILE_SecretBase_PowderSnowMat_BottomRight 0x312 +#define METATILE_SecretBase_AttractMat_TopLeft 0x303 +#define METATILE_SecretBase_AttractMat_TopMid 0x304 +#define METATILE_SecretBase_AttractMat_TopRight 0x305 +#define METATILE_SecretBase_AttractMat_MidLeft 0x30B +#define METATILE_SecretBase_AttractMat_Center 0x30C +#define METATILE_SecretBase_AttractMat_MidRight 0x30D +#define METATILE_SecretBase_AttractMat_BottomLeft 0x313 +#define METATILE_SecretBase_AttractMat_BottomMid 0x314 +#define METATILE_SecretBase_AttractMat_BottomRight 0x315 +#define METATILE_SecretBase_FissureMat_TopLeft 0x306 +#define METATILE_SecretBase_FissureMat_TopMid 0x307 +#define METATILE_SecretBase_FissureMat_TopRight 0x318 +#define METATILE_SecretBase_FissureMat_MidLeft 0x30E +#define METATILE_SecretBase_FissureMat_Center 0x30F +#define METATILE_SecretBase_FissureMat_MidRight 0x320 +#define METATILE_SecretBase_FissureMat_BottomLeft 0x316 +#define METATILE_SecretBase_FissureMat_BottomMid 0x317 +#define METATILE_SecretBase_FissureMat_BottomRight 0x328 +#define METATILE_SecretBase_SpikesMat_TopLeft 0x319 +#define METATILE_SecretBase_SpikesMat_TopMid 0x31A +#define METATILE_SecretBase_SpikesMat_TopRight 0x31B +#define METATILE_SecretBase_SpikesMat_MidLeft 0x321 +#define METATILE_SecretBase_SpikesMat_Center 0x322 +#define METATILE_SecretBase_SpikesMat_MidRight 0x323 +#define METATILE_SecretBase_SpikesMat_BottomLeft 0x329 +#define METATILE_SecretBase_SpikesMat_BottomMid 0x32A +#define METATILE_SecretBase_SpikesMat_BottomRight 0x32B #endif // GUARD_METATILE_LABELS_H diff --git a/src/data/decoration/tiles.h b/src/data/decoration/tiles.h index f11520511..de5c43575 100644 --- a/src/data/decoration/tiles.h +++ b/src/data/decoration/tiles.h @@ -1,463 +1,465 @@ +#define DECOR_TILE(name) (METATILE_SecretBase_##name - 0x200) + const u16 DecorGfx_SMALL_DESK[] = { - 0x87 + DECOR_TILE(SmallDesk) }; const u16 DecorGfx_POKEMON_DESK[] = { - 0x8F + DECOR_TILE(PokemonDesk) }; const u16 DecorGfx_HEAVY_DESK[] = { - 0x90, - 0x91, - 0x92, - 0x98, - 0x99, - 0x9A + DECOR_TILE(HeavyDesk_TopLeft), + DECOR_TILE(HeavyDesk_TopMid), + DECOR_TILE(HeavyDesk_TopRight), + DECOR_TILE(HeavyDesk_BottomLeft), + DECOR_TILE(HeavyDesk_BottomMid), + DECOR_TILE(HeavyDesk_BottomRight) }; const u16 DecorGfx_RAGGED_DESK[] = { - 0x93, - 0x94, - 0x95, - 0x9B, - 0x9C, - 0x9D + DECOR_TILE(RaggedDesk_TopLeft), + DECOR_TILE(RaggedDesk_TopMid), + DECOR_TILE(RaggedDesk_TopRight), + DECOR_TILE(RaggedDesk_BottomLeft), + DECOR_TILE(RaggedDesk_BottomMid), + DECOR_TILE(RaggedDesk_BottomRight) }; const u16 DecorGfx_COMFORT_DESK[] = { - 0x96, - 0x97, - 0xA3, - 0x9E, - 0x9F, - 0xAB + DECOR_TILE(ComfortDesk_TopLeft), + DECOR_TILE(ComfortDesk_TopMid), + DECOR_TILE(ComfortDesk_TopRight), + DECOR_TILE(ComfortDesk_BottomLeft), + DECOR_TILE(ComfortDesk_BottomMid), + DECOR_TILE(ComfortDesk_BottomRight) }; const u16 DecorGfx_PRETTY_DESK[] = { - 0xBD, - 0xBE, - 0xBF, - 0xC5, - 0xC6, - 0xC7, - 0xCD, - 0xCE, - 0xCF + DECOR_TILE(PrettyDesk_TopLeft), + DECOR_TILE(PrettyDesk_TopMid), + DECOR_TILE(PrettyDesk_TopRight), + DECOR_TILE(PrettyDesk_MidLeft), + DECOR_TILE(PrettyDesk_Center), + DECOR_TILE(PrettyDesk_MidRight), + DECOR_TILE(PrettyDesk_BottomLeft), + DECOR_TILE(PrettyDesk_BottomMid), + DECOR_TILE(PrettyDesk_BottomRight) }; const u16 DecorGfx_BRICK_DESK[] = { - 0xA0, - 0xA1, - 0xA2, - 0xA8, - 0xA9, - 0xAA, - 0xB0, - 0xB1, - 0xB2 + DECOR_TILE(BrickDesk_TopLeft), + DECOR_TILE(BrickDesk_TopMid), + DECOR_TILE(BrickDesk_TopRight), + DECOR_TILE(BrickDesk_MidLeft), + DECOR_TILE(BrickDesk_Center), + DECOR_TILE(BrickDesk_MidRight), + DECOR_TILE(BrickDesk_BottomLeft), + DECOR_TILE(BrickDesk_BottomMid), + DECOR_TILE(BrickDesk_BottomRight) }; const u16 DecorGfx_CAMP_DESK[] = { - 0xA4, - 0xA5, - 0xA6, - 0xAC, - 0xAD, - 0xAE, - 0xB4, - 0xB5, - 0xB6 + DECOR_TILE(CampDesk_TopLeft), + DECOR_TILE(CampDesk_TopMid), + DECOR_TILE(CampDesk_TopRight), + DECOR_TILE(CampDesk_MidLeft), + DECOR_TILE(CampDesk_Center), + DECOR_TILE(CampDesk_MidRight), + DECOR_TILE(CampDesk_BottomLeft), + DECOR_TILE(CampDesk_BottomMid), + DECOR_TILE(CampDesk_BottomRight) }; const u16 DecorGfx_HARD_DESK[] = { - 0xA7, - 0xBB, - 0xBC, - 0xAF, - 0xC3, - 0xC4, - 0xB7, - 0xCB, - 0xCC + DECOR_TILE(HardDesk_TopLeft), + DECOR_TILE(HardDesk_TopMid), + DECOR_TILE(HardDesk_TopRight), + DECOR_TILE(HardDesk_MidLeft), + DECOR_TILE(HardDesk_Center), + DECOR_TILE(HardDesk_MidRight), + DECOR_TILE(HardDesk_BottomLeft), + DECOR_TILE(HardDesk_BottomMid), + DECOR_TILE(HardDesk_BottomRight) }; const u16 DecorGfx_SMALL_CHAIR[] = { - 0xB8 + DECOR_TILE(SmallChair) }; const u16 DecorGfx_POKEMON_CHAIR[] = { - 0xB9 + DECOR_TILE(PokemonChair) }; const u16 DecorGfx_HEAVY_CHAIR[] = { - 0xBA + DECOR_TILE(HeavyChair) }; const u16 DecorGfx_PRETTY_CHAIR[] = { - 0xC0 + DECOR_TILE(PrettyChair) }; const u16 DecorGfx_COMFORT_CHAIR[] = { - 0xC1 + DECOR_TILE(ComfortChair) }; const u16 DecorGfx_RAGGED_CHAIR[] = { - 0xC2 + DECOR_TILE(RaggedChair) }; const u16 DecorGfx_BRICK_CHAIR[] = { - 0xC8 + DECOR_TILE(BrickChair) }; const u16 DecorGfx_CAMP_CHAIR[] = { - 0xC9 + DECOR_TILE(CampChair) }; const u16 DecorGfx_HARD_CHAIR[] = { - 0xCA + DECOR_TILE(HardChair) }; const u16 DecorGfx_RED_PLANT[] = { - 0xD0, - 0xD8 + DECOR_TILE(RedPlant_Top), + DECOR_TILE(RedPlant_Base1) }; const u16 DecorGfx_TROPICAL_PLANT[] = { - 0xD2, - 0xDA + DECOR_TILE(TropicalPlant_Top), + DECOR_TILE(TropicalPlant_Base1) }; const u16 DecorGfx_PRETTY_FLOWERS[] = { - 0xD4, - 0xDC + DECOR_TILE(PrettyFlowers_Top), + DECOR_TILE(PrettyFlowers_Base1) }; const u16 DecorGfx_COLORFUL_PLANT[] = { - 0xE0, - 0xE2, - 0xE8, - 0xE9 + DECOR_TILE(ColorfulPlant_TopLeft), + DECOR_TILE(ColorfulPlant_TopRight), + DECOR_TILE(ColorfulPlant_BaseLeft1), + DECOR_TILE(ColorfulPlant_BaseRight1) }; const u16 DecorGfx_BIG_PLANT[] = { - 0xE4, - 0xE6, - 0xEC, - 0xED + DECOR_TILE(BigPlant_TopLeft), + DECOR_TILE(BigPlant_TopRight), + DECOR_TILE(BigPlant_BaseLeft1), + DECOR_TILE(BigPlant_BaseRight1) }; const u16 DecorGfx_GORGEOUS_PLANT[] = { - 0xF0, - 0xF2, - 0xF8, - 0xF9 + DECOR_TILE(GorgeousPlant_TopLeft), + DECOR_TILE(GorgeousPlant_TopRight), + DECOR_TILE(GorgeousPlant_BaseLeft1), + DECOR_TILE(GorgeousPlant_BaseRight1) }; const u16 DecorGfx_RED_BRICK[] = { - 0x25, - 0x2D + DECOR_TILE(RedBrick_Top), + DECOR_TILE(RedBrick_Bottom) }; const u16 DecorGfx_YELLOW_BRICK[] = { - 0x26, - 0x2E + DECOR_TILE(YellowBrick_Top), + DECOR_TILE(YellowBrick_Bottom) }; const u16 DecorGfx_BLUE_BRICK[] = { - 0x27, - 0x2F + DECOR_TILE(BlueBrick_Top), + DECOR_TILE(BlueBrick_Bottom) }; const u16 DecorGfx_RED_BALLOON[] = { - 0x138 + DECOR_TILE(RedBalloon) }; const u16 DecorGfx_BLUE_BALLOON[] = { - 0x13C + DECOR_TILE(BlueBalloon) }; const u16 DecorGfx_YELLOW_BALLOON[] = { - 0x140 + DECOR_TILE(YellowBalloon) }; const u16 DecorGfx_RED_TENT[] = { - 0x30, - 0x31, - 0x32, - 0x38, - 0x39, - 0x3A, - 0x40, - 0x41, - 0x3B + DECOR_TILE(RedTent_TopLeft), + DECOR_TILE(RedTent_TopMid), + DECOR_TILE(RedTent_TopRight), + DECOR_TILE(RedTent_MidLeft), + DECOR_TILE(RedTent_DoorTop), + DECOR_TILE(RedTent_MidRight), + DECOR_TILE(RedTent_BottomLeft), + DECOR_TILE(RedTent_Door), + DECOR_TILE(RedTent_BottomRight) }; const u16 DecorGfx_BLUE_TENT[] = { - 0x48, - 0x49, - 0x68, - 0x50, - 0x51, - 0x70, - 0x58, - 0x59, - 0x69 + DECOR_TILE(BlueTent_TopLeft), + DECOR_TILE(BlueTent_TopMid), + DECOR_TILE(BlueTent_TopRight), + DECOR_TILE(BlueTent_MidLeft), + DECOR_TILE(BlueTent_DoorTop), + DECOR_TILE(BlueTent_MidRight), + DECOR_TILE(BlueTent_BottomLeft), + DECOR_TILE(BlueTent_Door), + DECOR_TILE(BlueTent_BottomRight) }; const u16 DecorGfx_SOLID_BOARD[] = { - 0x34, - 0x3C + DECOR_TILE(SolidBoard_Top), + DECOR_TILE(SolidBoard_Bottom) }; const u16 DecorGfx_SLIDE[] = { - 0x35, - 0x36, - 0x3D, - 0x3E, - 0x63, - 0x64, - 0x6F, - 0x77 + DECOR_TILE(Slide_TopLeft), + DECOR_TILE(Slide_TopRight), + DECOR_TILE(Slide_StairLanding), + DECOR_TILE(Slide_SlideTop), + DECOR_TILE(Slide_Stairs), + DECOR_TILE(Slide_SlideBottom), + DECOR_TILE(Slide_MatLeft), + DECOR_TILE(Slide_MatRight) }; const u16 DecorGfx_FENCE_LENGTH[] = { - 0x33 + DECOR_TILE(Fence_Vertical) }; const u16 DecorGfx_FENCE_WIDTH[] = { - 0x2C + DECOR_TILE(Fence_Horizontal) }; const u16 DecorGfx_TIRE[] = { - 0x80, - 0x81, - 0x88, - 0x89 + DECOR_TILE(Tire_TopLeft), + DECOR_TILE(Tire_TopRight), + DECOR_TILE(Tire_BottomLeft), + DECOR_TILE(Tire_BottomRight) }; const u16 DecorGfx_STAND[] = { - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x72, - 0x73, - 0x74, - 0x75 + DECOR_TILE(Stand_CornerLeft), + DECOR_TILE(Stand_MidLeft), + DECOR_TILE(Stand_MidRight), + DECOR_TILE(Stand_CornerRight), + DECOR_TILE(Stand_StairsLeft), + DECOR_TILE(Stand_BaseLeft), + DECOR_TILE(Stand_BaseRight), + DECOR_TILE(Stand_StairsRight) }; const u16 DecorGfx_MUD_BALL[] = { - 0x28 + DECOR_TILE(MudBall) }; const u16 DecorGfx_BREAKABLE_DOOR[] = { - 0x37, - 0x3F + DECOR_TILE(BreakableDoor_TopClosed), + DECOR_TILE(BreakableDoor_BottomClosed) }; const u16 DecorGfx_SAND_ORNAMENT[] = { - 0x85, - 0x8D + DECOR_TILE(SandOrnament_Top), + DECOR_TILE(SandOrnament_Base1) }; const u16 DecorGfx_SILVER_SHIELD[] = { - 0xD6, - 0xDE + DECOR_TILE(SilverShield_Top), + DECOR_TILE(SilverShield_Base1) }; const u16 DecorGfx_GOLD_SHIELD[] = { - 0x12E, - 0x136 + DECOR_TILE(GoldShield_Top), + DECOR_TILE(GoldShield_Base1) }; const u16 DecorGfx_GLASS_ORNAMENT[] = { - 0x82, - 0x8A + DECOR_TILE(GlassOrnament_Top), + DECOR_TILE(GlassOrnament_Base1) }; const u16 DecorGfx_TV[] = { - 0xF4 + DECOR_TILE(TV) }; const u16 DecorGfx_ROUND_TV[] = { - 0xF5 + DECOR_TILE(RoundTV) }; const u16 DecorGfx_CUTE_TV[] = { - 0xF6 + DECOR_TILE(CuteTV) }; const u16 DecorGfx_GLITTER_MAT[] = { - 0x60 + DECOR_TILE(GlitterMat) }; const u16 DecorGfx_JUMP_MAT[] = { - 0x61 + DECOR_TILE(JumpMat) }; const u16 DecorGfx_SPIN_MAT[] = { - 0x62 + DECOR_TILE(SpinMat) }; const u16 DecorGfx_C_LOW_NOTE_MAT[] = { - 0x78 + DECOR_TILE(NoteMat_C_Low) }; const u16 DecorGfx_D_NOTE_MAT[] = { - 0x79 + DECOR_TILE(NoteMat_D) }; const u16 DecorGfx_E_NOTE_MAT[] = { - 0x7A + DECOR_TILE(NoteMat_E) }; const u16 DecorGfx_F_NOTE_MAT[] = { - 0x7B + DECOR_TILE(NoteMat_F) }; const u16 DecorGfx_G_NOTE_MAT[] = { - 0x7C + DECOR_TILE(NoteMat_G) }; const u16 DecorGfx_A_NOTE_MAT[] = { - 0x7D + DECOR_TILE(NoteMat_A) }; const u16 DecorGfx_B_NOTE_MAT[] = { - 0x7E + DECOR_TILE(NoteMat_B) }; const u16 DecorGfx_C_HIGH_NOTE_MAT[] = { - 0xB3 + DECOR_TILE(NoteMat_C_High) }; const u16 DecorGfx_SURF_MAT[] = { - 0x42, - 0x43, - 0x44, - 0x4A, - 0x4B, - 0x4C, - 0x52, - 0x53, - 0x54 + DECOR_TILE(SurfMat_TopLeft), + DECOR_TILE(SurfMat_TopMid), + DECOR_TILE(SurfMat_TopRight), + DECOR_TILE(SurfMat_MidLeft), + DECOR_TILE(SurfMat_Center), + DECOR_TILE(SurfMat_MidRight), + DECOR_TILE(SurfMat_BottomLeft), + DECOR_TILE(SurfMat_BottomMid), + DECOR_TILE(SurfMat_BottomRight) }; const u16 DecorGfx_THUNDER_MAT[] = { - 0x45, - 0x46, - 0x47, - 0x4D, - 0x4E, - 0x4F, - 0x55, - 0x56, - 0x57 + DECOR_TILE(ThunderMat_TopLeft), + DECOR_TILE(ThunderMat_TopMid), + DECOR_TILE(ThunderMat_TopRight), + DECOR_TILE(ThunderMat_MidLeft), + DECOR_TILE(ThunderMat_Center), + DECOR_TILE(ThunderMat_MidRight), + DECOR_TILE(ThunderMat_BottomLeft), + DECOR_TILE(ThunderMat_BottomMid), + DECOR_TILE(ThunderMat_BottomRight) }; const u16 DecorGfx_FIRE_BLAST_MAT[] = { - 0x5A, - 0x5B, - 0x5C, - 0x5D, - 0x5E, - 0x5F, - 0x65, - 0x66, - 0x67 + DECOR_TILE(FireBlastMat_TopLeft), + DECOR_TILE(FireBlastMat_TopMid), + DECOR_TILE(FireBlastMat_TopRight), + DECOR_TILE(FireBlastMat_MidLeft), + DECOR_TILE(FireBlastMat_Center), + DECOR_TILE(FireBlastMat_MidRight), + DECOR_TILE(FireBlastMat_BottomLeft), + DECOR_TILE(FireBlastMat_BottomMid), + DECOR_TILE(FireBlastMat_BottomRight) }; const u16 DecorGfx_POWDER_SNOW_MAT[] = { - 0x100, - 0x101, - 0x102, - 0x108, - 0x109, - 0x10A, - 0x110, - 0x111, - 0x112 + DECOR_TILE(PowderSnowMat_TopLeft), + DECOR_TILE(PowderSnowMat_TopMid), + DECOR_TILE(PowderSnowMat_TopRight), + DECOR_TILE(PowderSnowMat_MidLeft), + DECOR_TILE(PowderSnowMat_Center), + DECOR_TILE(PowderSnowMat_MidRight), + DECOR_TILE(PowderSnowMat_BottomLeft), + DECOR_TILE(PowderSnowMat_BottomMid), + DECOR_TILE(PowderSnowMat_BottomRight) }; const u16 DecorGfx_ATTRACT_MAT[] = { - 0x103, - 0x104, - 0x105, - 0x10B, - 0x10C, - 0x10D, - 0x113, - 0x114, - 0x115 + DECOR_TILE(AttractMat_TopLeft), + DECOR_TILE(AttractMat_TopMid), + DECOR_TILE(AttractMat_TopRight), + DECOR_TILE(AttractMat_MidLeft), + DECOR_TILE(AttractMat_Center), + DECOR_TILE(AttractMat_MidRight), + DECOR_TILE(AttractMat_BottomLeft), + DECOR_TILE(AttractMat_BottomMid), + DECOR_TILE(AttractMat_BottomRight) }; const u16 DecorGfx_FISSURE_MAT[] = { - 0x106, - 0x107, - 0x118, - 0x10E, - 0x10F, - 0x120, - 0x116, - 0x117, - 0x128 + DECOR_TILE(FissureMat_TopLeft), + DECOR_TILE(FissureMat_TopMid), + DECOR_TILE(FissureMat_TopRight), + DECOR_TILE(FissureMat_MidLeft), + DECOR_TILE(FissureMat_Center), + DECOR_TILE(FissureMat_MidRight), + DECOR_TILE(FissureMat_BottomLeft), + DECOR_TILE(FissureMat_BottomMid), + DECOR_TILE(FissureMat_BottomRight) }; const u16 DecorGfx_SPIKES_MAT[] = { - 0x119, - 0x11A, - 0x11B, - 0x121, - 0x122, - 0x123, - 0x129, - 0x12A, - 0x12B + DECOR_TILE(SpikesMat_TopLeft), + DECOR_TILE(SpikesMat_TopMid), + DECOR_TILE(SpikesMat_TopRight), + DECOR_TILE(SpikesMat_MidLeft), + DECOR_TILE(SpikesMat_Center), + DECOR_TILE(SpikesMat_MidRight), + DECOR_TILE(SpikesMat_BottomLeft), + DECOR_TILE(SpikesMat_BottomMid), + DECOR_TILE(SpikesMat_BottomRight) }; const u16 DecorGfx_BALL_POSTER[] = { - 0x130 + DECOR_TILE(BallPoster) }; const u16 DecorGfx_GREEN_POSTER[] = { - 0x131 + DECOR_TILE(GreenPoster) }; const u16 DecorGfx_RED_POSTER[] = { - 0x132 + DECOR_TILE(RedPoster) }; const u16 DecorGfx_BLUE_POSTER[] = { - 0x133 + DECOR_TILE(BluePoster) }; const u16 DecorGfx_CUTE_POSTER[] = { - 0x134 + DECOR_TILE(CutePoster) }; const u16 DecorGfx_PIKA_POSTER[] = { - 0x11C, - 0x11D + DECOR_TILE(PikaPoster_Left), + DECOR_TILE(PikaPoster_Right) }; const u16 DecorGfx_LONG_POSTER[] = { - 0x11E, - 0x11F + DECOR_TILE(LongPoster_Left), + DECOR_TILE(LongPoster_Right) }; const u16 DecorGfx_SEA_POSTER[] = { - 0x124, - 0x125 + DECOR_TILE(SeaPoster_Left), + DECOR_TILE(SeaPoster_Right) }; const u16 DecorGfx_SKY_POSTER[] = { - 0x126, - 0x127 + DECOR_TILE(SkyPoster_Left), + DECOR_TILE(SkyPoster_Right) }; const u16 DecorGfx_KISS_POSTER[] = { - 0x12C, - 0x12D + DECOR_TILE(KissPoster_Left), + DECOR_TILE(KissPoster_Right) }; const u16 DecorGfx_PICHU_DOLL[] = { diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index def86ab1b..9574ac563 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -948,7 +948,7 @@ static void Task_SecretBaseMusicNoteMatSound(u8 taskId) { switch (gTasks[taskId].tMetatileID) { - case METATILE_SecretBase_NoteMat_C: + case METATILE_SecretBase_NoteMat_C_Low: PlaySE(SE_TOY_C); break; case METATILE_SecretBase_NoteMat_D: @@ -969,7 +969,7 @@ static void Task_SecretBaseMusicNoteMatSound(u8 taskId) case METATILE_SecretBase_NoteMat_B: PlaySE(SE_TOY_B); break; - case METATILE_SecretBase_NoteMat_C_Sharp: + case METATILE_SecretBase_NoteMat_C_High: PlaySE(SE_TOY_C1); break; } diff --git a/src/secret_base.c b/src/secret_base.c index ec48e9b51..24644d0ec 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -1176,7 +1176,7 @@ void SecretBasePerStepCallback(u8 taskId) VarSet(VAR_SECRET_BASE_STEP_COUNTER, VarGet(VAR_SECRET_BASE_STEP_COUNTER) + 1); behavior = MapGridGetMetatileBehaviorAt(x, y); tileId = MapGridGetMetatileIdAt(x, y); - if (tileId == METATILE_SecretBase_Board_Top || tileId == METATILE_SecretBase_Board_Bottom) + if (tileId == METATILE_SecretBase_SolidBoard_Top || tileId == METATILE_SecretBase_SolidBoard_Bottom) { if (sInFriendSecretBase == TRUE) { @@ -1204,13 +1204,13 @@ void SecretBasePerStepCallback(u8 taskId) if (sInFriendSecretBase == TRUE) VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT); } - else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_RightCorner) - || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_LeftCorner)) + else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight) + || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft)) { if (sInFriendSecretBase == TRUE) VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_STAND); } - else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_Stairs) + else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_StairLanding) { if (sInFriendSecretBase == TRUE) { @@ -1218,7 +1218,7 @@ void SecretBasePerStepCallback(u8 taskId) VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_DECLINED_SLIDE); } } - else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide) + else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide_SlideTop) { if (sInFriendSecretBase == TRUE) { @@ -1846,12 +1846,12 @@ void CheckInteractedWithFriendsFurnitureBottom(void) case METATILE_SecretBase_RedPlant_Base2: case METATILE_SecretBase_TropicalPlant_Base1: case METATILE_SecretBase_TropicalPlant_Base2: - case METATILE_SecretBase_PrettyFlower_Base1: - case METATILE_SecretBase_PrettyFlower_Base2: - case METATILE_SecretBase_ColorfulFlowers_BaseLeft1: - case METATILE_SecretBase_ColorfulFlowers_BaseRight1: - case METATILE_SecretBase_ColorfulFlowers_BaseLeft2: - case METATILE_SecretBase_ColorfulFlowers_BaseRight2: + case METATILE_SecretBase_PrettyFlowers_Base1: + case METATILE_SecretBase_PrettyFlowers_Base2: + case METATILE_SecretBase_ColorfulPlant_BaseLeft1: + case METATILE_SecretBase_ColorfulPlant_BaseRight1: + case METATILE_SecretBase_ColorfulPlant_BaseLeft2: + case METATILE_SecretBase_ColorfulPlant_BaseRight2: case METATILE_SecretBase_BigPlant_BaseLeft1: case METATILE_SecretBase_BigPlant_BaseRight1: case METATILE_SecretBase_BigPlant_BaseLeft2: