From 8cea949e6d7991d4101b58941a82c7f87538a847 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 15 Mar 2019 19:33:30 -0400 Subject: Move constant and EWRAM data into C. --- include/graphics.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index c651268ca..84d48691c 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4019,6 +4019,13 @@ extern const u32 gPokenavLeftHeaderMainMenu_Gfx[]; extern const u32 gPokenavLeftHeaderCondition_Gfx[]; extern const u32 gPokenavLeftHeaderRibbons_Gfx[]; extern const u32 gPokenavLeftHeaderMatchCall_Gfx[]; +extern const u32 gPokenavLeftHeaderParty_Gfx[]; +extern const u32 gPokenavLeftHeaderSearch_Gfx[]; +extern const u32 gPokenavLeftHeaderCool_Gfx[]; +extern const u32 gPokenavLeftHeaderBeauty_Gfx[]; +extern const u32 gPokenavLeftHeaderCute_Gfx[]; +extern const u32 gPokenavLeftHeaderSmart_Gfx[]; +extern const u32 gPokenavLeftHeaderTough_Gfx[]; extern const u32 gPageInfoTilemap[]; extern const u32 gUnknown_08D98CC8[]; -- cgit v1.2.3 From bc506861581869658f627a21fa90749540f352ca Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 6 Apr 2019 03:41:00 -0400 Subject: Decomp everything onvolving UnknownSubStruct_81C81D4 Now I can start cleaning up the fields and substructs --- include/strings.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index 3899b63aa..d0c339d4a 100644 --- a/include/strings.h +++ b/include/strings.h @@ -986,6 +986,9 @@ extern const u8 gText_SomeonesPC[]; extern const u8 gText_PlayersPC[]; extern const u8 gText_WhichPCShouldBeAccessed[]; +extern const u8 gText_NavgearMatchCall_Strategy[]; +extern const u8 gText_NavgearMatchCall_TrainerPokemon[]; +extern const u8 gText_NavgearMatchCall_SelfIntroduction[]; extern const u8 gText_Navgear_ClearButtonList[]; extern const u8 gText_NavgearMap_ZoomedOutButtons[]; extern const u8 gText_NavgearMap_ZoomedInButtons[]; -- cgit v1.2.3 From ddfe0f91cff4c7b1040d357b23b8987dfdebfcac Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 6 Apr 2019 23:34:30 -0400 Subject: Document decompiled parts of the pokenav main menu --- include/menu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/menu.h b/include/menu.h index 947f97a68..7cd6de04b 100644 --- a/include/menu.h +++ b/include/menu.h @@ -99,5 +99,6 @@ void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); +void ResetBgPositions(void); #endif // GUARD_MENU_H -- cgit v1.2.3 From 0dc73b0b3a378f4af253691a7b2694b9faa2fbdf Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 7 Apr 2019 14:40:35 -0400 Subject: Break up pokenav into subfiles The files are separated based on the pokenav resources substruct ID they use. --- include/pokenav.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index 4e1648c93..d1bdbb2e9 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -1,6 +1,28 @@ #ifndef GUARD_POKENAV_H #define GUARD_POKENAV_H +typedef u32 (*LoopedTask)(s32 state); + +// Return values of LoopedTask functions. +#define LT_INC_AND_PAUSE 0 +#define LT_INC_AND_CONTINUE 1 +#define LT_PAUSE 2 +#define LT_CONTINUE 3 +#define LT_FINISH 4 +#define LT_SET_STATE(newState) (newState + 5) + +// pokenav.c +extern u32 sub_81C99D4(void); + void CB2_InitPokeNav(void); +u32 CreateLoopedTask(LoopedTask loopedTask, u32 priority); +bool32 FuncIsActiveLoopedTask(LoopedTask func); +void *GetSubstructPtr(u32 index); +void FreePokenavSubstruct(u32 index); +void *AllocSubstruct(u32 index, u32 size); +void Pokenav_AllocAndLoadPalettes(const struct SpritePalette *palettes); +bool32 IsLoopedTaskActive(u32 taskId); + +// pokenav_match_call_ui.c #endif //GUARD_POKENAV_H -- cgit v1.2.3 From d352999cd804f5ab4db4d3628f5a76eb5ba2e9ca Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 7 Apr 2019 18:10:53 -0400 Subject: Change "navgear" to "pokenav" --- include/strings.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index c62835ca1..3c141f243 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1008,21 +1008,21 @@ extern const u8 gText_SomeonesPC[]; extern const u8 gText_PlayersPC[]; extern const u8 gText_WhichPCShouldBeAccessed[]; -extern const u8 gText_NavgearMatchCall_Strategy[]; -extern const u8 gText_NavgearMatchCall_TrainerPokemon[]; -extern const u8 gText_NavgearMatchCall_SelfIntroduction[]; -extern const u8 gText_Navgear_ClearButtonList[]; -extern const u8 gText_NavgearMap_ZoomedOutButtons[]; -extern const u8 gText_NavgearMap_ZoomedInButtons[]; -extern const u8 gText_NavgearCondition_MonListButtons[]; -extern const u8 gText_NavgearCondition_MonStatusButtons[]; -extern const u8 gText_NavgearCondition_MarkingButtons[]; -extern const u8 gText_NavgearMatchCall_TrainerListButtons[]; -extern const u8 gText_NavgearMatchCall_CallMenuButtons[]; -extern const u8 gText_NavgearMatchCall_CheckTrainerButtons[]; -extern const u8 gText_NavgearRibbons_MonListButtons[]; -extern const u8 gText_NavgearRibbons_RibbonListButtons[]; -extern const u8 gText_NavgearRibbons_RibbonCheckButtons[]; +extern const u8 gText_PokenavMatchCall_Strategy[]; +extern const u8 gText_PokenavMatchCall_TrainerPokemon[]; +extern const u8 gText_PokenavMatchCall_SelfIntroduction[]; +extern const u8 gText_Pokenav_ClearButtonList[]; +extern const u8 gText_PokenavMap_ZoomedOutButtons[]; +extern const u8 gText_PokenavMap_ZoomedInButtons[]; +extern const u8 gText_PokenavCondition_MonListButtons[]; +extern const u8 gText_PokenavCondition_MonStatusButtons[]; +extern const u8 gText_PokenavCondition_MarkingButtons[]; +extern const u8 gText_PokenavMatchCall_TrainerListButtons[]; +extern const u8 gText_PokenavMatchCall_CallMenuButtons[]; +extern const u8 gText_PokenavMatchCall_CheckTrainerButtons[]; +extern const u8 gText_PokenavRibbons_MonListButtons[]; +extern const u8 gText_PokenavRibbons_RibbonListButtons[]; +extern const u8 gText_PokenavRibbons_RibbonCheckButtons[]; extern const u8 gUnknown_085EAD37[]; extern const u8 gUnknown_085EAD41[]; -- cgit v1.2.3