summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/pokemon.h4
-rw-r--r--include/gba/defines.h1
-rw-r--r--include/gba/io_reg.h1
-rw-r--r--include/graphics.h6
-rw-r--r--include/menu_specialized.h128
-rw-r--r--include/pokenav.h203
-rw-r--r--include/strings.h4
7 files changed, 206 insertions, 141 deletions
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 5b6b8cb5e..9fa023cd5 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -270,7 +270,9 @@
#define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7
#define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint
-#define MAX_FRIENDSHIP 0xFF
+#define MAX_FRIENDSHIP 255
+#define MAX_SHEEN 255
+#define MAX_CONDITION 255
#define MAX_PER_STAT_IVS 31
#define MAX_IV_MASK 31
diff --git a/include/gba/defines.h b/include/gba/defines.h
index ad06aaad2..c52d7ef4f 100644
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -6,7 +6,6 @@
#define TRUE 1
#define FALSE 0
-#define BSS_DATA __attribute__((section(".bss")))
#define IWRAM_DATA __attribute__((section("iwram_data")))
#define EWRAM_DATA __attribute__((section("ewram_data")))
#define UNUSED __attribute__((unused))
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index 1daa99e1d..148ce31db 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -482,6 +482,7 @@
#define REG_SIODATA32 (*(vu32 *)REG_ADDR_SIODATA32)
#define REG_SIOMLT_SEND (*(vu16 *)REG_ADDR_SIOMLT_SEND)
#define REG_SIOMLT_RECV (*(vu64 *)REG_ADDR_SIOMLT_RECV)
+#define REG_SIOMULTI(n) (*(vu16 *)(REG_ADDR_SIOMULTI0 + (n) * 2))
#define REG_SIOMULTI0 (*(vu16 *)REG_ADDR_SIOMULTI0)
#define REG_SIOMULTI1 (*(vu16 *)REG_ADDR_SIOMULTI1)
#define REG_SIOMULTI2 (*(vu16 *)REG_ADDR_SIOMULTI2)
diff --git a/include/graphics.h b/include/graphics.h
index eeb8f65a3..e2fe5cf77 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -4637,9 +4637,9 @@ extern const u32 gBattleAnimSpritePal_RedHeart[];
extern const u32 gBattleAnimSpritePal_RedOrb[];
extern const u32 gBattleAnimSpritePal_EyeSparkle[];
extern const u32 gBattleAnimSpritePal_PinkHeart[];
-extern const u32 gBattleAnimBgImage_Attract;
-extern const u32 gBattleAnimBgPalette_Attract;
-extern const u32 gBattleAnimBgTilemap_Attract;
+extern const u32 gBattleAnimBgImage_Attract[];
+extern const u32 gBattleAnimBgPalette_Attract[];
+extern const u32 gBattleAnimBgTilemap_Attract[];
extern const u32 gBattleAnimSpritePal_Angel[];
extern const u32 gBattleAnimSpritePal_Devil[];
extern const u32 gBattleAnimSpritePal_Swipe[];
diff --git a/include/menu_specialized.h b/include/menu_specialized.h
index c29110662..d1e30d4d6 100644
--- a/include/menu_specialized.h
+++ b/include/menu_specialized.h
@@ -7,14 +7,6 @@
#include "pokemon.h"
#include "constants/berry.h"
-#define TAG_CONDITION_MON 100
-#define TAG_CONDITION_BALL 101
-#define TAG_CONDITION_CANCEL 102
-#define TAG_CONDITION_BALL_PLACEHOLDER 103
-#define TAG_CONDITION_SPARKLE 104
-
-#define MAX_CONDITION_SPARKLES 10
-
// Window IDs for the Player PC Mailbox
enum {
MAILBOXWIN_TITLE,
@@ -23,61 +15,115 @@ enum {
MAILBOXWIN_COUNT
};
-struct UnknownSubStruct_81D1ED4
-{
- u16 unk0;
- u16 unk2;
+enum {
+ TAG_CONDITION_MON = 100,
+ TAG_CONDITION_BALL,
+ TAG_CONDITION_CANCEL,
+ TAG_CONDITION_BALL_PLACEHOLDER,
+ TAG_CONDITION_SPARKLE,
+ TAG_CONDITION_MON_MARKINGS,
+ TAG_CONDITION_MARKINGS_MENU,
+ TAG_CONDITION_MARKINGS_MENU_2, // Used implicitly by CreateMonMarkingsMenuSprites
+};
+
+enum {
+ CONDITION_ICON_SELECTED,
+ CONDITION_ICON_UNSELECTED,
+};
+
+#define MAX_CONDITION_SPARKLES 10
+
+// The number of extra sparkles shown on a Pokémon's condition screen.
+// All Pokémon start with 1, so the max here is MAX_CONDITION_SPARKLES - 1
+#define GET_NUM_CONDITION_SPARKLES(sheen)((sheen) != MAX_SHEEN) ? (sheen) / ((u32)MAX_SHEEN / (MAX_CONDITION_SPARKLES - 1) + 1) : MAX_CONDITION_SPARKLES - 1;
+
+#define CONDITION_GRAPH_TOP_Y 56
+#define CONDITION_GRAPH_BOTTOM_Y 121
+#define CONDITION_GRAPH_HEIGHT (CONDITION_GRAPH_BOTTOM_Y - CONDITION_GRAPH_TOP_Y + 1)
+#define CONDITION_GRAPH_CENTER_X 155
+#define CONDITION_GRAPH_CENTER_Y ((CONDITION_GRAPH_BOTTOM_Y + CONDITION_GRAPH_TOP_Y) / 2 + 3)
+#define CONDITION_GRAPH_UPDATE_STEPS 10
+#define CONDITION_GRAPH_LOAD_MAX 4
+
+// Equivalent to flavor and contest values, but in a different order.
+enum {
+ CONDITION_COOL,
+ CONDITION_TOUGH,
+ CONDITION_SMART,
+ CONDITION_CUTE,
+ CONDITION_BEAUTY,
+ CONDITION_COUNT
+};
+
+// Yet another order. This one is the same (by coincidence) as the contest categories
+enum {
+ GRAPH_COOL,
+ GRAPH_BEAUTY,
+ GRAPH_CUTE,
+ GRAPH_SMART,
+ GRAPH_TOUGH,
};
struct ConditionGraph
{
- /*0x000*/ u8 stat[4][FLAVOR_COUNT];
- /*0x014*/ struct UnknownSubStruct_81D1ED4 unk14[4][FLAVOR_COUNT];
- /*0x064*/ struct UnknownSubStruct_81D1ED4 unk64[10][FLAVOR_COUNT];
- /*0x12C*/ struct UnknownSubStruct_81D1ED4 unk12C[FLAVOR_COUNT];
- /*0x140*/ u16 unk140[66][2];
- /*0x248*/ u16 unk248[66][2];
- /*0x350*/ u16 unk350;
- /*0x352*/ u16 unk352;
- /*0x354*/ u8 unk354;
- /*0x355*/ u8 state;
+ /*0x000*/ u8 conditions[CONDITION_GRAPH_LOAD_MAX][CONDITION_COUNT];
+ /*0x014*/ struct UCoords16 savedPositions[CONDITION_GRAPH_LOAD_MAX][CONDITION_COUNT];
+ /*0x064*/ struct UCoords16 newPositions[CONDITION_GRAPH_UPDATE_STEPS][CONDITION_COUNT];
+ /*0x12C*/ struct UCoords16 curPositions[CONDITION_COUNT];
+ /*0x140*/ u16 scanlineRight[CONDITION_GRAPH_HEIGHT][2];
+ /*0x248*/ u16 scanlineLeft[CONDITION_GRAPH_HEIGHT][2];
+ /*0x350*/ u16 bottom;
+ /*0x352*/ u16 updateCounter;
+ /*0x354*/ bool8 needsDraw;
+ /*0x355*/ u8 scanlineResetState;
};
+// Mailbox menu
bool8 MailboxMenu_Alloc(u8 count);
u8 MailboxMenu_AddWindow(u8 windowIdx);
u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page);
void MailboxMenu_AddScrollArrows(struct PlayerPCItemPageStruct *page);
void MailboxMenu_Free(void);
void MailboxMenu_RemoveWindow(u8 windowIdx);
-void InitConditionGraphData(struct ConditionGraph *graph);
-void sub_81D2108(struct ConditionGraph *graph);
-void SetConditionGraphIOWindows(u8 bg);
-void InitConditionGraphState(struct ConditionGraph *graph);
-void sub_81D2230(struct ConditionGraph *graph);
-bool8 SetupConditionGraphScanlineParams(struct ConditionGraph *graph);
-bool32 TransitionConditionGraph(struct ConditionGraph *graph);
-void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1);
-void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2);
-void MoveRelearnerPrintText(u8 *str);
-bool16 MoveRelearnerRunTextPrinters(void);
-void MoveRelearnerCreateYesNoMenu(void);
-u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices);
-void InitMoveRelearnerWindows(bool8 useContextWindow);
-s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst);
+
+// Condition graph
+void ConditionGraph_Init(struct ConditionGraph *graph);
+void ConditionGraph_InitWindow(u8 bg);
+void ConditionGraph_InitResetScanline(struct ConditionGraph *graph);
+bool8 ConditionGraph_ResetScanline(struct ConditionGraph *graph);
+void ConditionGraph_Draw(struct ConditionGraph *graph);
+bool8 ConditionGraph_TryUpdate(struct ConditionGraph *graph);
+void ConditionGraph_Update(struct ConditionGraph *graph);
+void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions);
+void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords16 *arg1, struct UCoords16 *arg2);
+
+// Condition menu
+bool8 ConditionMenu_UpdateMonEnter(struct ConditionGraph *graph, s16 *x);
+bool8 ConditionMenu_UpdateMonExit(struct ConditionGraph *graph, s16 *x);
+bool8 MoveConditionMonOnscreen(s16 *x);
+bool8 MoveConditionMonOffscreen(s16 *x);
void GetConditionMenuMonNameAndLocString(u8 *locationDst, u8 *nameDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel);
void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 boxId, u16 monId, u16 partyId, u16 id, u16 numMons, bool8 excludesCancel);
void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel);
-bool8 MoveConditionMonOnscreen(s16 *x);
-bool8 MoveConditionMonOffscreen(s16 *x);
-bool8 TryUpdateConditionMonTransitionOn(struct ConditionGraph *graph, s16 *x);
-bool8 TryUpdateConditionMonTransitionOff(struct ConditionGraph *graph, s16 *x);
void LoadConditionMonPicTemplate(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal);
void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals);
+s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst);
+
+// Condition sparkles
void LoadConditionSparkle(struct SpriteSheet *sheet, struct SpritePalette *pal);
void ResetConditionSparkleSprites(struct Sprite **sprites);
void CreateConditionSparkleSprites(struct Sprite **sprites, u8 monSpriteId, u8 count);
void DestroyConditionSparkleSprites(struct Sprite **sprites);
void FreeConditionSparkles(struct Sprite **sprites);
+
+// Move relearner
+void MoveRelearnerPrintText(u8 *str);
+bool16 MoveRelearnerRunTextPrinters(void);
+void MoveRelearnerCreateYesNoMenu(void);
+u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices);
+void InitMoveRelearnerWindows(bool8 useContextWindow);
+
+// Level up window
void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr);
void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 shadowClr);
void GetMonLevelUpWindowStats(struct Pokemon *mon, u16 *currStats);
diff --git a/include/pokenav.h b/include/pokenav.h
index 3fc01ede3..d3edb1422 100644
--- a/include/pokenav.h
+++ b/include/pokenav.h
@@ -7,47 +7,51 @@
typedef u32 (*LoopedTask)(s32 state);
-struct PokenavMonList
+struct PokenavMonListItem
{
u8 boxId;
u8 monId;
u16 data;
};
-struct PokenavMatchCallEntries
+struct PokenavMatchCallEntry
{
bool8 isSpecialTrainer;
u8 mapSec;
u16 headerId;
};
-struct PokenavListTemplate
+struct PokenavListItem
{
union {
- struct PokenavMonList *monList;
- struct PokenavMatchCallEntries *matchCallEntries;
- } list;
+ struct PokenavMonListItem mon;
+ struct PokenavMatchCallEntry call;
+ } item;
+};
+
+typedef void (*PokenavListBufferItemFunc)(struct PokenavListItem *, u8 *);
+
+struct PokenavListTemplate
+{
+ struct PokenavListItem * list;
u16 count;
- u16 unk6;
- u8 unk8;
+ u16 startIndex;
+ u8 itemSize;
u8 item_X;
u8 windowWidth;
u8 listTop;
u8 maxShowed;
u8 fillValue;
u8 fontId;
- union {
- void (*printMonFunc)(struct PokenavMonList *item, u8 *dest);
- void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1);
- } listFunc;
- void (*unk14)(u16 a0, u32 a1, u32 a2);
+ PokenavListBufferItemFunc bufferItemFunc;
+ void (*iconDrawFunc)(u16 windowId, u32 listItemId, u32 baseTile);
};
-struct PokenavSub18
+struct PokenavMonList
{
u16 listCount;
u16 currIndex;
- struct PokenavMonList monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE];
+ struct PokenavMonListItem monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE];
};
// Return values of LoopedTask functions.
@@ -65,27 +69,26 @@ enum
POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone
};
-// TODO - refine these names
-enum Substructures
+enum
{
POKENAV_SUBSTRUCT_MAIN_MENU,
POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER,
- POKENAV_SUBSTRUCT_MENU_ICONS,
+ POKENAV_SUBSTRUCT_MENU_GFX,
POKENAV_SUBSTRUCT_REGION_MAP_STATE,
POKENAV_SUBSTRUCT_REGION_MAP_ZOOM,
POKENAV_SUBSTRUCT_MATCH_CALL_MAIN,
POKENAV_SUBSTRUCT_MATCH_CALL_OPEN,
POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS,
- POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST,
+ POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX,
POKENAV_SUBSTRUCT_RIBBONS_MON_LIST,
POKENAV_SUBSTRUCT_RIBBONS_MON_MENU,
- POKENAV_SUBSTRUCT_CONDITION_GRAPH,
- POKENAV_SUBSTRUCT_MON_MARK_MENU,
+ POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU,
+ POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX,
POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST,
POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU,
- POKENAV_SUBSTRUCT_15, //unused
+ POKENAV_SUBSTRUCT_UNUSED,
POKENAV_SUBSTRUCT_REGION_MAP,
- POKENAV_SUBSTRUCT_MATCH_CALL_LIST,
+ POKENAV_SUBSTRUCT_LIST,
POKENAV_SUBSTRUCT_MON_LIST,
POKENAV_SUBSTRUCT_COUNT,
};
@@ -113,21 +116,21 @@ enum
#define POKENAV_MENU_IDS_START 100000
enum
{
- POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START,
+ POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons
POKENAV_MAIN_MENU_CURSOR_ON_MAP,
- POKENAV_CONDITION_MENU,
- POKENAV_CONDITION_SEARCH_MENU,
+ POKENAV_CONDITION_MENU, // The first Condition screen where the player selects Party or Search
+ POKENAV_CONDITION_SEARCH_MENU, // The Condition search menu where the player selects a search parameter
POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL,
POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS,
POKENAV_REGION_MAP,
- POKENAV_CONDITION_PARTY,
- POKENAV_CONDITION_SEARCH_RESULTS,
- POKENAV_CONDITION_GRAPH_FROM_SEARCH, // opening condition graph from search list
- POKENAV_RETURN_CONDITION_SEARCH, //return to search list from condition graph
+ POKENAV_CONDITION_GRAPH_PARTY, // The Condition graph screen when Party has been selected
+ POKENAV_CONDITION_SEARCH_RESULTS, // The list of results from a Condition search
+ POKENAV_CONDITION_GRAPH_SEARCH, // The Condition graph screen when a search result has been selected
+ POKENAV_RETURN_CONDITION_SEARCH, // Exited the graph screen back to the list of Condition search results
POKENAV_MATCH_CALL,
- POKENAV_RIBBONS_MON_LIST,
- POKENAV_RIBBONS_SUMMARY_SCREEN,
- POKENAV_RIBBONS_RETURN_TO_MON_LIST,
+ POKENAV_RIBBONS_MON_LIST, // The list of Pokémon with ribbons
+ POKENAV_RIBBONS_SUMMARY_SCREEN, // The ribbon summary screen shown when a Pokémon has been selected
+ POKENAV_RIBBONS_RETURN_TO_MON_LIST, // Exited the summary screen back to the ribbon list
};
enum
@@ -245,15 +248,22 @@ enum RegionMapFuncIds
POKENAV_MENU_FUNC_OPEN_FEATURE,
};
-enum PartyConditionFuncIds
+enum
+{
+ CONDITION_FUNC_NONE,
+ CONDITION_FUNC_SLIDE_MON_IN,
+ CONDITION_FUNC_RETURN,
+ CONDITION_FUNC_NO_TRANSITION,
+ CONDITION_FUNC_SLIDE_MON_OUT,
+ CONDITION_FUNC_ADD_MARKINGS,
+ CONDITION_FUNC_CLOSE_MARKINGS,
+};
+
+enum
{
- PARTY_CONDITION_FUNC_NONE,
- PARTY_CONDITION_FUNC_SLIDE_MON_IN,
- PARTY_CONDITION_FUNC_RETURN,
- PARTY_CONDITION_FUNC_NO_TRANSITION,
- PARTY_CONDITION_FUNC_SLIDE_MON_OUT,
- PARTY_CONDITION_FUNC_ADD_MARKINGS,
- PARTY_CONDITION_FUNC_CLOSE_MARKINGS,
+ CONDITION_LOAD_MON_INFO,
+ CONDITION_LOAD_GRAPH,
+ CONDITION_LOAD_MON_PIC,
};
#define POKENAV_MENU_FUNC_EXIT -1
@@ -270,7 +280,7 @@ enum
POKENAV_MC_FUNC_CANCEL,
POKENAV_MC_FUNC_CALL_MSG,
POKENAV_MC_FUNC_NEARBY_MSG,
- POKENAV_MC_FUNC_10,
+ POKENAV_MC_FUNC_EXIT_CALL,
POKENAV_MC_FUNC_SHOW_CHECK_PAGE,
POKENAV_MC_FUNC_CHECK_PAGE_UP,
POKENAV_MC_FUNC_CHECK_PAGE_DOWN,
@@ -287,6 +297,14 @@ enum
POKENAV_MAP_FUNC_EXIT,
};
+// Modes for PokenavFadeScreen
+enum {
+ POKENAV_FADE_TO_BLACK,
+ POKENAV_FADE_FROM_BLACK,
+ POKENAV_FADE_TO_BLACK_ALL,
+ POKENAV_FADE_FROM_BLACK_ALL,
+};
+
// pokenav.c
void SetSelectedConditionSearch(u32);
u32 GetSelectedConditionSearch(void);
@@ -305,23 +323,23 @@ bool32 CanViewRibbonsMenu(void);
void SetPokenavVBlankCallback(void);
void SetVBlankCallback_(IntrCallback callback);
-// pokenav_match_call_ui.c
-u32 GetSelectedPokenavListIndex(void);
-bool32 sub_81C8224(void);
-int MatchCall_MoveCursorUp(void);
-int MatchCall_MoveCursorDown(void);
-int MatchCall_PageDown(void);
-int MatchCall_PageUp(void);
-bool32 IsMonListLoopedTaskActive(void);
-void ToggleMatchCallVerticalArrows(bool32 shouldHide);
-void sub_81C8838(void);
-void sub_81C877C(void);
-bool32 IsMatchCallListTaskActive(void);
-void PrintCheckPageInfo(s16 a0);
-u32 GetMatchCallListTopIndex(void);
-void sub_81C87F0(void);
-bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2);
-void sub_81C8234(void);
+// pokenav_list.c
+bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset);
+bool32 IsCreatePokenavListTaskActive(void);
+void DestroyPokenavList(void);
+u32 PokenavList_GetSelectedIndex(void);
+int PokenavList_MoveCursorUp(void);
+int PokenavList_MoveCursorDown(void);
+int PokenavList_PageDown(void);
+int PokenavList_PageUp(void);
+bool32 PokenavList_IsMoveWindowTaskActive(void);
+void PokenavList_ToggleVerticalArrows(bool32 shouldHide);
+void PokenavList_DrawCurrentItemIcon(void);
+void PokenavList_EraseListForCheckPage(void);
+bool32 PokenavList_IsTaskActive(void);
+void PrintCheckPageInfo(s16 delta);
+u32 PokenavList_GetTopIndex(void);
+void PokenavList_ReshowListFromCheckPage(void);
// pokenav_match_call_data.c
bool32 MatchCall_HasCheckPage(u32 idx);
@@ -352,9 +370,9 @@ void SlideMenuHeaderDown(void);
bool32 MainMenuLoopedTaskIsBusy(void);
void SetLeftHeaderSpritesInvisibility(void);
void PokenavCopyPalette(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette);
-void sub_81C7B40(void);
-struct Sprite *PauseSpinningPokenavSprite(void);
-void ResumeSpinningPokenavSprite(void);
+void FadeToBlackExceptPrimary(void);
+struct Sprite *GetSpinningPokenavSprite(void);
+void HideSpinningPokenavSprite(void);
void UpdateRegionMapRightHeaderTiles(u32 arg0);
void HideMainOrSubMenuLeftHeader(u32 id, bool32 onRightSide);
void SlideMenuHeaderUp(void);
@@ -364,7 +382,7 @@ bool32 WaitForPokenavShutdownFade(void);
void SetActiveMenuLoopTasks(void *func1, void *func2);
void ShutdownPokenav(void);
-// pokenav_menu_handler_1.c
+// pokenav_menu_handler.c
bool32 PokenavCallback_Init_MainMenuCursorOnMap(void);
bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void);
bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void);
@@ -377,7 +395,7 @@ int GetPokenavCursorPos(void);
int GetCurrentMenuItemId(void);
u16 GetHelpBarTextId(void);
-// pokenav_menu_handler_2.c
+// pokenav_menu_handler_gfx.c
bool32 OpenPokenavMenuInitial(void);
bool32 OpenPokenavMenuNotInitial(void);
void CreateMenuHandlerLoopedTask(s32 ltIdx);
@@ -385,29 +403,28 @@ bool32 IsMenuHandlerLoopedTaskActive(void);
void FreeMenuHandlerSubstruct2(void);
void ResetBldCnt_(void);
-// pokenav_match_call_1.c
+// pokenav_match_call_list.c
bool32 PokenavCallback_Init_MatchCall(void);
u32 GetMatchCallCallback(void);
void FreeMatchCallSubstruct1(void);
-int sub_81CAE28(void);
+int IsMatchCallListInitFinished(void);
int GetNumberRegistered(void);
-int sub_81CAE48(void);
-struct PokenavMatchCallEntries *sub_81CAE94(void);
+struct PokenavMatchCallEntry *GetMatchCallList(void);
u16 GetMatchCallMapSec(int);
bool32 ShouldDrawRematchPokeballIcon(int index);
void ClearRematchPokeballIcon(u16 windowId, u32 a1);
int GetMatchCallTrainerPic(int index);
const u8 *GetMatchCallFlavorText(int index, int textType);
-const u8 *GetMatchCallMessageText(int index, u8 *arg1);
+const u8 *GetMatchCallMessageText(int index, bool8 *newRematchRequest);
u16 GetMatchCallOptionCursorPos(void);
u16 GetMatchCallOptionId(int arg0);
-void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str);
+void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry * arg0, u8 *str);
u8 GetMatchTableMapSectionId(int rematchIndex);
int GetIndexDeltaOfNextCheckPageDown(int index);
int GetIndexDeltaOfNextCheckPageUp(int index);
bool32 IsRematchEntryRegistered(int index);
-// pokenav_match_call_2.c
+// pokenav_match_call_gfx.c
bool32 OpenMatchCall(void);
void CreateMatchCallLoopedTask(s32 index);
bool32 IsMatchCallLoopedTaskActive(void);
@@ -422,33 +439,33 @@ bool32 IsRegionMapLoopedTaskActive(void);
void FreeRegionMapSubstruct1(void);
void FreeRegionMapSubstruct2(void);
-// pokenav_conditions_1.c
-u32 PokenavCallback_Init_PartyCondition(void);
-u32 PokenavCallback_Init_ConditionGraphFromSearch(void);
-u32 GetPartyConditionCallback(void);
-void FreePartyConditionSubstruct1(void);
-bool32 LoadPartyConditionMenuGfx(void);
+// pokenav_conditions.c
+u32 PokenavCallback_Init_ConditionGraph_Party(void);
+u32 PokenavCallback_Init_ConditionGraph_Search(void);
+u32 GetConditionGraphMenuCallback(void);
+void FreeConditionGraphMenuSubstruct1(void);
+bool32 LoadConditionGraphMenuGfx(void);
bool32 IsConditionMenuSearchMode(void);
-struct ConditionGraph *GetConditionGraphDataPtr(void);
-u16 GetConditionGraphCurrentMonIndex(void);
+struct ConditionGraph *GetConditionGraphPtr(void);
+u16 GetConditionGraphCurrentListIndex(void);
u16 GetMonListCount(void);
-u8 GetMonSheen(void);
-bool32 SetConditionGraphData(u8 arg0);
+u8 GetNumConditionMonSparkles(void);
+bool32 LoadNextConditionMenuMonData(u8 mode);
u8 TryGetMonMarkId(void);
-u8 *GetConditionMonNameBuffer(u8 id);
-u8 *GetConditionMonLocationBuffer(u8 id);
+u8 *GetConditionMonNameText(u8 id);
+u8 *GetConditionMonLocationText(u8 id);
u16 GetConditionMonDataBuffer(void);
void *GetConditionMonPicGfx(u8 id);
void *GetConditionMonPal(u8 id);
-// pokenav_conditions_2.c
-bool32 OpenPartyConditionMenu(void);
-void CreatePartyConditionLoopedTask(s32);
-u32 IsPartyConditionLoopedTaskActive(void);
-void FreePartyConditionSubstruct2(void);
+// pokenav_conditions_gfx.c
+bool32 OpenConditionGraphMenu(void);
+void CreateConditionGraphMenuLoopedTask(s32);
+u32 IsConditionGraphMenuLoopedTaskActive(void);
+void FreeConditionGraphMenuSubstruct2(void);
u8 GetMonMarkingsData(void);
-// pokenav_conditions_3.c
+// pokenav_conditions_search_results.c
u32 PokenavCallback_Init_ConditionSearch(void);
u32 PokenavCallback_Init_ReturnToMonSearchList(void);
u32 GetConditionSearchResultsCallback(void);
@@ -459,18 +476,18 @@ void CreateSearchResultsLoopedTask(s32);
u32 IsSearchResultLoopedTaskActive(void);
void FreeSearchResultSubstruct2(void);
-// pokenav_ribbons_1.c
+// pokenav_ribbons_list.c
u32 PokenavCallback_Init_MonRibbonList(void);
u32 PokenavCallback_Init_RibbonsMonListFromSummary(void);
u32 GetRibbonsMonListCallback(void);
-void FreeRibbonsMonList1(void);
+void FreeRibbonsMonList(void);
bool32 OpenRibbonsMonList(void);
bool32 OpenRibbonsMonListFromRibbonsSummary(void);
void CreateRibbonsMonListLoopedTask(s32);
u32 IsRibbonsMonListLoopedTaskActive(void);
-void FreeRibbonsMonList2(void);
+void FreeRibbonsMonMenu(void);
-// pokenav_ribbons_2.c
+// pokenav_ribbons_summary.c
u32 PokenavCallback_Init_RibbonsSummaryMenu(void);
u32 GetRibbonsSummaryMenuCallback(void);
void FreeRibbonsSummaryScreen1(void);
diff --git a/include/strings.h b/include/strings.h
index 845e96a8c..a22aa307b 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -2978,8 +2978,8 @@ extern const u8 gText_FindToughPokemon[];
extern const u8 gText_ReturnToConditionMenu[];
extern const u8 gText_NoRibbonWinners[];
-// Pokenav Ribbons
-extern const u8 gText_NumberF700[];
+// Pokenav
+extern const u8 gText_NumberIndex[];
extern const u8 gText_RibbonsF700[];
// use_pokeblock