summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/heal_locations.h8
-rw-r--r--include/constants/region_map_sections.h12
-rw-r--r--include/constants/weather.h47
-rwxr-xr-xinclude/pokedex_area_region_map.h17
-rw-r--r--include/pokenav.h109
-rw-r--r--include/region_map.h45
-rwxr-xr-xinclude/unk_pokedex_area_screen_helper.h17
7 files changed, 144 insertions, 111 deletions
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 42f3f8282..5e64048dd 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