From 548af3c0f1a2807e791fe7bbfe1fc57ddb726c5e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 15:33:36 -0500 Subject: Document a bit of Match Call --- include/constants/global.h | 1 + include/global.h | 2 +- include/gym_leader_rematch.h | 9 ++----- include/pokenav.h | 39 +++++++++++++++++++++++------ include/strings.h | 59 +++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 91 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/constants/global.h b/include/constants/global.h index 4c638d63f..f4d81e563 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -51,6 +51,7 @@ #define DECOR_MAX_PLAYERS_HOUSE 12 #define APPRENTICE_COUNT 4 #define APPRENTICE_MAX_QUESTIONS 9 +#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used #define PYRAMID_BAG_ITEMS_COUNT 10 #define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. diff --git a/include/global.h b/include/global.h index 61186d084..9bf1a5b34 100644 --- a/include/global.h +++ b/include/global.h @@ -923,7 +923,7 @@ struct SaveBlock1 /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 field_9C2[6]; /*0x9C8*/ u16 trainerRematchStepCounter; - /*0x9CA*/ u8 trainerRematches[100]; + /*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES]; /*0xA30*/ struct EventObject eventObjects[EVENT_OBJECTS_COUNT]; /*0xC70*/ struct EventObjectTemplate eventObjectTemplates[EVENT_OBJECT_TEMPLATES_COUNT]; /*0x1270*/ u8 flags[FLAGS_COUNT]; diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 778d7a1e8..473d7b1c1 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -75,17 +75,12 @@ enum { REMATCH_WINONA, REMATCH_TATE_AND_LIZA, REMATCH_JUAN, - - // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES. - REMATCH_SIDNEY, + REMATCH_SIDNEY, // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES. REMATCH_PHOEBE, REMATCH_GLACIA, REMATCH_DRAKE, REMATCH_WALLACE, - - // The total number of rematch entries. This must be the last element - // in the enum. - REMATCH_TABLE_ENTRIES + REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; void UpdateGymLeaderRematch(void); diff --git a/include/pokenav.h b/include/pokenav.h index b1c3287f1..5edde5900 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -7,11 +7,12 @@ typedef u32 (*LoopedTask)(s32 state); +// TODO: This struct is also used generally by Match Call, should probably be renamed struct PokenavMonList { - u8 boxId; - u8 monId; - u16 unk6; + u8 id1; + u8 id2; + u16 data; }; struct PokenavSub18 @@ -32,8 +33,8 @@ struct PokenavSub18 enum { POKENAV_MODE_NORMAL, // Chosen from Start menu. - POKENAV_MODE_FORCE_CALL_1, // Used for the script's special. Has to choose Match Call and make a call. - POKENAV_MODE_FORCE_CALL_2, // Set after making a call, has to exit Pokenav. + POKENAV_MODE_FORCE_CALL_READY, // When player is forced to call Mr. Stone for pokenav tutorial + POKENAV_MODE_FORCE_CALL_EXIT, // Forced to exit fter being calling Mr. Stone for pokenav tutorial }; #define POKENAV_MENU_IDS_START 100000 @@ -82,6 +83,28 @@ enum MC_HEADER_COUNT }; +enum +{ + MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CHECK, + MATCH_CALL_OPTION_CANCEL, + MATCH_CALL_OPTION_COUNT +}; + +enum +{ + CHECK_PAGE_STRATEGY, + CHECK_PAGE_POKEMON, + CHECK_PAGE_INTRO_1, + CHECK_PAGE_INTRO_2, + CHECK_PAGE_ENTRY_COUNT +}; + +#define MCFLAVOR(name) {[CHECK_PAGE_STRATEGY] = gText_MatchCall##name##_Strategy, \ + [CHECK_PAGE_POKEMON] = gText_MatchCall##name##_Pokemon, \ + [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ + [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} + // pokenav.c void sub_81C7694(u32); u32 sub_81C76AC(void); @@ -207,14 +230,14 @@ int sub_81CAE48(void); struct PokenavMonList *sub_81CAE94(void); u16 sub_81CAEA4(int); bool32 sub_81CAEBC(int index); -int sub_81CAF04(int index); -const u8 *sub_81CAFD8(int index, int textType); +int GetMatchCallTrainerPic(int index); +const u8 *GetMatchCallFlavorText(int index, int textType); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); void sub_81CB050(struct PokenavMonList * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); int sub_81CB0E4(int index); -bool32 sub_81CAE08(int); +bool32 IsRematchEntryRegistered(int index); int sub_81CB128(int index); // pokenav_unk_4.c diff --git a/include/strings.h b/include/strings.h index f814ad29f..8cebdcfa0 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1,6 +1,22 @@ #ifndef GUARD_STRINGS_H #define GUARD_STRINGS_H +// Placeholders +extern const u8 gText_ExpandedPlaceholder_Empty[]; +extern const u8 gText_ExpandedPlaceholder_Kun[]; +extern const u8 gText_ExpandedPlaceholder_Chan[]; +extern const u8 gText_ExpandedPlaceholder_Sapphire[]; +extern const u8 gText_ExpandedPlaceholder_Ruby[]; +extern const u8 gText_ExpandedPlaceholder_Emerald[]; +extern const u8 gText_ExpandedPlaceholder_Aqua[]; +extern const u8 gText_ExpandedPlaceholder_Magma[]; +extern const u8 gText_ExpandedPlaceholder_Archie[]; +extern const u8 gText_ExpandedPlaceholder_Maxie[]; +extern const u8 gText_ExpandedPlaceholder_Kyogre[]; +extern const u8 gText_ExpandedPlaceholder_Groudon[]; +extern const u8 gText_ExpandedPlaceholder_Brendan[]; +extern const u8 gText_ExpandedPlaceholder_May[]; + extern const u8 gText_FromSpace[]; extern const u8 gText_Lv50[]; @@ -2332,6 +2348,43 @@ extern const u8 MatchCall_BattlePyramidText11[]; extern const u8 MatchCall_BattlePyramidText12[]; extern const u8 MatchCall_BattlePyramidText13[]; extern const u8 MatchCall_BattlePyramidText14[]; +extern const u8 gText_MrStoneMatchCallDesc[]; +extern const u8 gText_MrStoneMatchCallName[]; +extern const u8 gText_StevenMatchCallDesc[]; +extern const u8 gText_StevenMatchCallName[]; +extern const u8 gText_MayBrendanMatchCallDesc[]; +extern const u8 gText_WallyMatchCallDesc[]; +extern const u8 gText_NormanMatchCallDesc[]; +extern const u8 gText_NormanMatchCallName[]; +extern const u8 gText_MomMatchCallDesc[]; +extern const u8 gText_MomMatchCallName[]; +extern const u8 gText_ScottMatchCallDesc[]; +extern const u8 gText_ScottMatchCallName[]; +extern const u8 gText_RoxanneMatchCallDesc[]; +extern const u8 gText_BrawlyMatchCallDesc[]; +extern const u8 gText_WattsonMatchCallDesc[]; +extern const u8 gText_FlanneryMatchCallDesc[]; +extern const u8 gText_WinonaMatchCallDesc[]; +extern const u8 gText_TateLizaMatchCallDesc[]; +extern const u8 gText_JuanMatchCallDesc[]; +extern const u8 gText_EliteFourMatchCallDesc[]; +extern const u8 gText_ChampionMatchCallDesc[]; +extern const u8 gText_ProfBirchMatchCallDesc[]; +extern const u8 gText_ProfBirchMatchCallName[]; +extern const u8 gText_MatchCallSteven_Strategy[]; +extern const u8 gText_MatchCallSteven_Pokemon[]; +extern const u8 gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle[]; +extern const u8 gText_MatchCallBrendan_Strategy[]; +extern const u8 gText_MatchCallBrendan_Pokemon[]; +extern const u8 gText_MatchCallBrendan_Intro1[]; +extern const u8 gText_MatchCallBrendan_Intro2[]; +extern const u8 gText_MatchCallMay_Strategy[]; +extern const u8 gText_MatchCallMay_Pokemon[]; +extern const u8 gText_MatchCallMay_Intro1[]; +extern const u8 gText_MatchCallMay_Intro2[]; // Contest Link extern const u8 gText_ColorDarkGrey[]; @@ -2762,9 +2815,9 @@ extern const u8 gUnknown_085EBE41[]; extern const u8 gText_NoRibbonWinners[]; // pokenav_unk_4 -extern const u8 gUnknown_085EC017[]; -extern const u8 gUnknown_085EC01C[]; -extern const u8 gUnknown_085EC022[]; +extern const u8 gText_Call[]; +extern const u8 gText_Check[]; +extern const u8 gText_Cancel6[]; // pokenav_unk_8 extern const u8 gText_NumberF700[]; -- cgit v1.2.3 From cc9b923dc29c9ab855283fdf24687e16d7451b13 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 22:34:55 -0500 Subject: More pokenav match call documentation --- include/battle_setup.h | 1 - include/gym_leader_rematch.h | 5 ++++- include/pokenav.h | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/battle_setup.h b/include/battle_setup.h index 984c820bb..dacd1fa71 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -4,7 +4,6 @@ #include "gym_leader_rematch.h" #define REMATCHES_COUNT 5 -#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY struct RematchTrainer { diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 473d7b1c1..ac365a41a 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, + REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, @@ -83,6 +83,9 @@ enum { REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; +#define REMATCH_NORMAL_NPC_END REMATCH_WALLY_3 +#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY + void UpdateGymLeaderRematch(void); #endif //GUARD_TRAINER_REMATCH_H diff --git a/include/pokenav.h b/include/pokenav.h index 5edde5900..c497c4b85 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -105,6 +105,23 @@ enum [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} +#define POKENAV_MC_FUNC_NONE 0 +#define POKENAV_MC_FUNC_DOWN 1 +#define POKENAV_MC_FUNC_UP 2 +#define POKENAV_MC_FUNC_PG_DOWN 3 +#define POKENAV_MC_FUNC_PG_UP 4 +#define POKENAV_MC_FUNC_SELECT 5 +#define POKENAV_MC_FUNC_6 6 +#define POKENAV_MC_FUNC_7 7 +#define POKENAV_MC_FUNC_CALL_MSG 8 +#define POKENAV_MC_FUNC_NEARBY_MSG 9 +#define POKENAV_MC_FUNC_10 10 +#define POKENAV_MC_FUNC_11 11 +#define POKENAV_MC_FUNC_12 12 +#define POKENAV_MC_FUNC_13 13 +#define POKENAV_MC_FUNC_14 14 +#define POKENAV_MC_FUNC_EXIT 15 + // pokenav.c void sub_81C7694(u32); u32 sub_81C76AC(void); @@ -207,7 +224,6 @@ bool32 PokenavCallback_Init_3(void); u32 sub_81C941C(void); void sub_81C9430(void); int sub_81C9894(void); -const u8 *sub_81CAF78(int index, u8 *arg1); int sub_81C98A4(void); int sub_81C98B4(void); u16 sub_81C98C4(void); @@ -232,6 +248,7 @@ u16 sub_81CAEA4(int); bool32 sub_81CAEBC(int index); int GetMatchCallTrainerPic(int index); const u8 *GetMatchCallFlavorText(int index, int textType); +const u8 *GetMatchCallMessageText(int index, u8 *arg1); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); void sub_81CB050(struct PokenavMonList * arg0, u8 *str); @@ -240,7 +257,7 @@ int sub_81CB0E4(int index); bool32 IsRematchEntryRegistered(int index); int sub_81CB128(int index); -// pokenav_unk_4.c +// POKENAV_MC.c bool32 sub_81CB260(void); void sub_81CB29C(s32 index); u32 sub_81CB2CC(void); -- cgit v1.2.3 From 0086cd1efa902d7f645296dbfdde6147b911d292 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 7 Dec 2019 04:08:21 -0500 Subject: More pokenav match call documentation --- include/gym_leader_rematch.h | 6 +-- include/match_call.h | 2 +- include/pokenav.h | 94 +++++++++++++++++++++++++++----------------- 3 files changed, 61 insertions(+), 41 deletions(-) (limited to 'include') diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index ac365a41a..81ce3da23 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs + REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs, from Wally below are special trainers REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, @@ -83,8 +83,8 @@ enum { REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; -#define REMATCH_NORMAL_NPC_END REMATCH_WALLY_3 -#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY +#define REMATCH_SPECIAL_TRAINER_START REMATCH_WALLY_3 +#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY void UpdateGymLeaderRematch(void); diff --git a/include/match_call.h b/include/match_call.h index 52eab63ec..8214e03b7 100644 --- a/include/match_call.h +++ b/include/match_call.h @@ -15,7 +15,7 @@ void InitMatchCallCounters(void); bool32 TryStartMatchCall(void); bool32 IsMatchCallTaskActive(void); void StartMatchCallFromScript(u8 *message); -void sub_8197080(u8 *destStr); +void BufferPokedexRatingForMatchCall(u8 *destStr); bool32 SelectMatchCallMessage(int, u8 *); void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId); void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId); diff --git a/include/pokenav.h b/include/pokenav.h index c497c4b85..e2c2a4d08 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -32,9 +32,9 @@ struct PokenavSub18 enum { - POKENAV_MODE_NORMAL, // Chosen from Start menu. - POKENAV_MODE_FORCE_CALL_READY, // When player is forced to call Mr. Stone for pokenav tutorial - POKENAV_MODE_FORCE_CALL_EXIT, // Forced to exit fter being calling Mr. Stone for pokenav tutorial + POKENAV_MODE_NORMAL, // Chosen from Start menu. + POKENAV_MODE_FORCE_CALL_READY, // Pokenav tutorial before calling Mr. Stone + POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone }; #define POKENAV_MENU_IDS_START 100000 @@ -57,6 +57,23 @@ enum POKENAV_MENU_E, }; +enum +{ + HELPBAR_NONE, + HELPBAR_MAP_ZOOMED_OUT, + HELPBAR_MAP_ZOOMED_IN, + HELPBAR_CONDITION_MON_LIST, + HELPBAR_CONDITION_MON_STATUS, + HELPBAR_CONDITION_MARKINGS, + HELPBAR_MC_TRAINER_LIST, + HELPBAR_MC_CALL_MENU, + HELPBAR_MC_CHECK_PAGE, + HELPBAR_RIBBONS_MON_LIST, + HELPBAR_RIBBONS_LIST, + HELPBAR_RIBBONS_CHECK, + HELPBAR_COUNT +}; + enum { MC_HEADER_MR_STONE, @@ -105,22 +122,25 @@ enum [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} -#define POKENAV_MC_FUNC_NONE 0 -#define POKENAV_MC_FUNC_DOWN 1 -#define POKENAV_MC_FUNC_UP 2 -#define POKENAV_MC_FUNC_PG_DOWN 3 -#define POKENAV_MC_FUNC_PG_UP 4 -#define POKENAV_MC_FUNC_SELECT 5 -#define POKENAV_MC_FUNC_6 6 -#define POKENAV_MC_FUNC_7 7 -#define POKENAV_MC_FUNC_CALL_MSG 8 -#define POKENAV_MC_FUNC_NEARBY_MSG 9 -#define POKENAV_MC_FUNC_10 10 -#define POKENAV_MC_FUNC_11 11 -#define POKENAV_MC_FUNC_12 12 -#define POKENAV_MC_FUNC_13 13 -#define POKENAV_MC_FUNC_14 14 -#define POKENAV_MC_FUNC_EXIT 15 +enum +{ + POKENAV_MC_FUNC_NONE, + POKENAV_MC_FUNC_DOWN, + POKENAV_MC_FUNC_UP, + POKENAV_MC_FUNC_PG_DOWN, + POKENAV_MC_FUNC_PG_UP, + POKENAV_MC_FUNC_SELECT, + POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR, + POKENAV_MC_FUNC_CANCEL, + POKENAV_MC_FUNC_CALL_MSG, + POKENAV_MC_FUNC_NEARBY_MSG, + POKENAV_MC_FUNC_10, + POKENAV_MC_FUNC_SHOW_CHECK_PAGE, + POKENAV_MC_FUNC_CHECK_PAGE_UP, + POKENAV_MC_FUNC_CHECK_PAGE_DOWN, + POKENAV_MC_FUNC_EXIT_CHECK_PAGE, + POKENAV_MC_FUNC_EXIT +}; // pokenav.c void sub_81C7694(u32); @@ -168,7 +188,7 @@ void ToggleMatchCallVerticalArrows(bool32 shouldHide); void sub_81C8838(void); void sub_81C877C(void); bool32 sub_81C8820(void); -void sub_81C87AC(s16 a0); +void PrintCheckPageInfo(s16 a0); u32 GetMatchCallListTopIndex(void); void sub_81C87F0(void); bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2); @@ -176,15 +196,15 @@ void sub_81C8234(void); // pokenav_match_call_data.c bool32 MatchCall_HasCheckPage(u32 idx); -u8 MatchCallMapSecGetByIndex(u32 idx); -bool32 sub_81D1BF8(u32 idx); -bool32 MatchCallFlagGetByIndex(u32 idx); +u8 MatchCall_GetMapSec(u32 idx); +bool32 MatchCall_HasRematchId(u32 idx); +bool32 MatchCall_GetEnabled(u32 idx); u32 MatchCall_GetRematchTableIdx(u32 idx); u32 GetTrainerIdxByRematchIdx(u32 rematchIdx); int MatchCall_GetOverrideFacilityClass(u32 idx); void MatchCall_GetMessage(u32 idx, u8 *dest); const u8 *MatchCall_GetOverrideFlavorText(u32 idx, u32 offset); -void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name); +void MatchCall_GetNameAndDesc(u32 idx, const u8 **desc, const u8 **name); // pokenav_main_menu.c bool32 InitPokenavMainMenu(void); @@ -197,8 +217,8 @@ void sub_81C7AC0(s32 a0); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); -void sub_81C7BA4(u32 helpBarIndex); -bool32 IsDma3ManagerBusyWithBgCopy_(void); +void PrintHelpBarText(u32 textId); +bool32 WaitForHelpBar(void); void sub_81C78A0(void); bool32 MainMenuLoopedTaskIsBusy(void); void sub_81C7FDC(void); @@ -226,7 +246,7 @@ void sub_81C9430(void); int sub_81C9894(void); int sub_81C98A4(void); int sub_81C98B4(void); -u16 sub_81C98C4(void); +u16 GetHelpBarTextId(void); // pokenav_unk_2.c bool32 sub_81C9924(void); @@ -241,28 +261,28 @@ bool32 PokenavCallback_Init_11(void); u32 sub_81CAB24(void); void sub_81CAB38(void); int sub_81CAE28(void); -int sub_81CAE38(void); +int GetNumberRegistered(void); int sub_81CAE48(void); struct PokenavMonList *sub_81CAE94(void); -u16 sub_81CAEA4(int); -bool32 sub_81CAEBC(int index); +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); -u16 sub_81CB01C(void); -u16 sub_81CB02C(int arg0); -void sub_81CB050(struct PokenavMonList * arg0, u8 *str); +u16 GetMatchCallOptionCursorPos(void); +u16 GetMatchCallOptionId(int arg0); +void BufferMatchCallNameAndDesc(struct PokenavMonList * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); -int sub_81CB0E4(int index); +int GetIndexDeltaOfNextCheckPageDown(int index); +int GetIndexDeltaOfNextCheckPageUp(int index); bool32 IsRematchEntryRegistered(int index); -int sub_81CB128(int index); -// POKENAV_MC.c +// pokenav_unk_4.c bool32 sub_81CB260(void); void sub_81CB29C(s32 index); u32 sub_81CB2CC(void); void sub_81CB2E0(void); -void sub_81CBD48(u16 windowId, u32 a1); // pokenav_unk_5.c u32 PokenavCallback_Init_6(void); -- cgit v1.2.3 From 51179df017a6ae51c129d1f30a1115adf7d1d33e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Dec 2019 15:49:36 -0500 Subject: Clean up match call doc --- include/gym_leader_rematch.h | 2 +- include/strings.h | 107 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 81ce3da23..dd9ead8b7 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs, from Wally below are special trainers + REMATCH_WALLY_3, // Entries above WALLY are considered normal trainers, from Wally below are special trainers REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, diff --git a/include/strings.h b/include/strings.h index 8cebdcfa0..ccc27c01f 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2348,6 +2348,113 @@ extern const u8 MatchCall_BattlePyramidText11[]; extern const u8 MatchCall_BattlePyramidText12[]; extern const u8 MatchCall_BattlePyramidText13[]; extern const u8 MatchCall_BattlePyramidText14[]; +extern const u8 MatchCall_Text_MrStone1[]; +extern const u8 MatchCall_Text_MrStone2[]; +extern const u8 MatchCall_Text_MrStone3[]; +extern const u8 MatchCall_Text_MrStone4[]; +extern const u8 MatchCall_Text_MrStone5[]; +extern const u8 MatchCall_Text_MrStone6[]; +extern const u8 MatchCall_Text_MrStone7[]; +extern const u8 MatchCall_Text_MrStone8[]; +extern const u8 MatchCall_Text_MrStone9[]; +extern const u8 MatchCall_Text_MrStone10[]; +extern const u8 MatchCall_Text_MrStone11[]; +extern const u8 MatchCall_Text_Norman1[]; +extern const u8 MatchCall_Text_Norman2[]; +extern const u8 MatchCall_Text_Norman3[]; +extern const u8 MatchCall_Text_Norman4[]; +extern const u8 MatchCall_Text_Norman5[]; +extern const u8 MatchCall_Text_Norman6[]; +extern const u8 MatchCall_Text_Norman7[]; +extern const u8 MatchCall_Text_Norman8[]; +extern const u8 MatchCall_Text_Norman9[]; +extern const u8 MatchCall_Text_Mom1[]; +extern const u8 MatchCall_Text_Mom2[]; +extern const u8 MatchCall_Text_Mom3[]; +extern const u8 MatchCall_Text_Steven1[]; +extern const u8 MatchCall_Text_Steven2[]; +extern const u8 MatchCall_Text_Steven3[]; +extern const u8 MatchCall_Text_Steven4[]; +extern const u8 MatchCall_Text_Steven5[]; +extern const u8 MatchCall_Text_Steven6[]; +extern const u8 MatchCall_Text_Steven7[]; +extern const u8 MatchCall_Text_May1[]; +extern const u8 MatchCall_Text_May2[]; +extern const u8 MatchCall_Text_May3[]; +extern const u8 MatchCall_Text_May4[]; +extern const u8 MatchCall_Text_May5[]; +extern const u8 MatchCall_Text_May6[]; +extern const u8 MatchCall_Text_May7[]; +extern const u8 MatchCall_Text_May8[]; +extern const u8 MatchCall_Text_May9[]; +extern const u8 MatchCall_Text_May10[]; +extern const u8 MatchCall_Text_May11[]; +extern const u8 MatchCall_Text_May12[]; +extern const u8 MatchCall_Text_May13[]; +extern const u8 MatchCall_Text_May14[]; +extern const u8 MatchCall_Text_May15[]; +extern const u8 MatchCall_Text_Brendan1[]; +extern const u8 MatchCall_Text_Brendan2[]; +extern const u8 MatchCall_Text_Brendan3[]; +extern const u8 MatchCall_Text_Brendan4[]; +extern const u8 MatchCall_Text_Brendan5[]; +extern const u8 MatchCall_Text_Brendan6[]; +extern const u8 MatchCall_Text_Brendan7[]; +extern const u8 MatchCall_Text_Brendan8[]; +extern const u8 MatchCall_Text_Brendan9[]; +extern const u8 MatchCall_Text_Brendan10[]; +extern const u8 MatchCall_Text_Brendan11[]; +extern const u8 MatchCall_Text_Brendan12[]; +extern const u8 MatchCall_Text_Brendan13[]; +extern const u8 MatchCall_Text_Brendan14[]; +extern const u8 MatchCall_Text_Brendan15[]; +extern const u8 MatchCall_Text_Wally1[]; +extern const u8 MatchCall_Text_Wally2[]; +extern const u8 MatchCall_Text_Wally3[]; +extern const u8 MatchCall_Text_Wally4[]; +extern const u8 MatchCall_Text_Wally5[]; +extern const u8 MatchCall_Text_Wally6[]; +extern const u8 MatchCall_Text_Wally7[]; +extern const u8 MatchCall_Text_Scott1[]; +extern const u8 MatchCall_Text_Scott2[]; +extern const u8 MatchCall_Text_Scott3[]; +extern const u8 MatchCall_Text_Scott4[]; +extern const u8 MatchCall_Text_Scott5[]; +extern const u8 MatchCall_Text_Scott6[]; +extern const u8 MatchCall_Text_Scott7[]; +extern const u8 MatchCall_Text_Roxanne1[]; +extern const u8 MatchCall_Text_Roxanne2[]; +extern const u8 MatchCall_Text_Roxanne3[]; +extern const u8 MatchCall_Text_Roxanne4[]; +extern const u8 MatchCall_Text_Brawly1[]; +extern const u8 MatchCall_Text_Brawly2[]; +extern const u8 MatchCall_Text_Brawly3[]; +extern const u8 MatchCall_Text_Brawly4[]; +extern const u8 MatchCall_Text_Wattson1[]; +extern const u8 MatchCall_Text_Wattson2[]; +extern const u8 MatchCall_Text_Wattson3[]; +extern const u8 MatchCall_Text_Wattson4[]; +extern const u8 MatchCall_Text_Flannery1[]; +extern const u8 MatchCall_Text_Flannery2[]; +extern const u8 MatchCall_Text_Flannery3[]; +extern const u8 MatchCall_Text_Flannery4[]; +extern const u8 MatchCall_Text_Winona1[]; +extern const u8 MatchCall_Text_Winona2[]; +extern const u8 MatchCall_Text_Winona3[]; +extern const u8 MatchCall_Text_Winona4[]; +extern const u8 MatchCall_Text_TateLiza1[]; +extern const u8 MatchCall_Text_TateLiza2[]; +extern const u8 MatchCall_Text_TateLiza3[]; +extern const u8 MatchCall_Text_TateLiza4[]; +extern const u8 MatchCall_Text_Juan1[]; +extern const u8 MatchCall_Text_Juan2[]; +extern const u8 MatchCall_Text_Juan3[]; +extern const u8 MatchCall_Text_Juan4[]; +extern const u8 MatchCall_Text_Sidney[]; +extern const u8 MatchCall_Text_Phoebe[]; +extern const u8 MatchCall_Text_Glacia[]; +extern const u8 MatchCall_Text_Drake[]; +extern const u8 MatchCall_Text_Wallace[]; extern const u8 gText_MrStoneMatchCallDesc[]; extern const u8 gText_MrStoneMatchCallName[]; extern const u8 gText_StevenMatchCallDesc[]; -- cgit v1.2.3 From a04347816f71a9a6d92579d0d6b54268c6c8a96d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Dec 2019 10:25:47 -0500 Subject: Split PokenavMatchCallEntries from PokenavMonList --- include/pokenav.h | 56 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index e2c2a4d08..f12469e71 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -7,14 +7,42 @@ typedef u32 (*LoopedTask)(s32 state); -// TODO: This struct is also used generally by Match Call, should probably be renamed struct PokenavMonList { - u8 id1; - u8 id2; + u8 boxId; + u8 monId; u16 data; }; +struct PokenavMatchCallEntries +{ + bool8 isSpecialTrainer; + u8 mapSec; + u16 headerId; +}; + +struct PokenavListTemplate +{ + union { + struct PokenavMonList *monList; + struct PokenavMatchCallEntries *matchCallEntries; + } list; + u16 unk4; + u16 unk6; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; + u8 unkE; + union { + void (*unk10_1)(struct PokenavMonList *, u8 *a1); + void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1); + } listFunc; + void (*unk14)(u16 a0, u32 a1, u32 a2); +}; + struct PokenavSub18 { u16 unk0; @@ -161,22 +189,6 @@ void SetPokenavVBlankCallback(void); void SetVBlankCallback_(IntrCallback callback); // pokenav_match_call_ui.c -struct MatchCallListTemplate -{ - struct PokenavMonList * unk0; - u16 unk4; - u16 unk6; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 unkD; - u8 unkE; - void (*unk10)(struct PokenavMonList *, u8 *a1); - void (*unk14)(u16 a0, u32 a1, u32 a2); -}; - u32 GetSelectedMatchCall(void); bool32 sub_81C8224(void); int MatchCall_MoveCursorUp(void); @@ -191,7 +203,7 @@ bool32 sub_81C8820(void); void PrintCheckPageInfo(s16 a0); u32 GetMatchCallListTopIndex(void); void sub_81C87F0(void); -bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2); +bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2); void sub_81C8234(void); // pokenav_match_call_data.c @@ -263,7 +275,7 @@ void sub_81CAB38(void); int sub_81CAE28(void); int GetNumberRegistered(void); int sub_81CAE48(void); -struct PokenavMonList *sub_81CAE94(void); +struct PokenavMatchCallEntries *sub_81CAE94(void); u16 GetMatchCallMapSec(int); bool32 ShouldDrawRematchPokeballIcon(int index); void ClearRematchPokeballIcon(u16 windowId, u32 a1); @@ -272,7 +284,7 @@ const u8 *GetMatchCallFlavorText(int index, int textType); const u8 *GetMatchCallMessageText(int index, u8 *arg1); u16 GetMatchCallOptionCursorPos(void); u16 GetMatchCallOptionId(int arg0); -void BufferMatchCallNameAndDesc(struct PokenavMonList * arg0, u8 *str); +void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); int GetIndexDeltaOfNextCheckPageDown(int index); int GetIndexDeltaOfNextCheckPageUp(int index); -- cgit v1.2.3