diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/global.h | 13 | ||||
-rw-r--r-- | include/list_menu.h | 23 | ||||
-rw-r--r-- | include/menu.h | 2 | ||||
-rw-r--r-- | include/menu_helpers.h | 7 | ||||
-rw-r--r-- | include/pokeblock.h | 15 | ||||
-rw-r--r-- | include/strings.h | 9 |
6 files changed, 51 insertions, 18 deletions
diff --git a/include/global.h b/include/global.h index f3ec9ce33..fdcebc924 100644 --- a/include/global.h +++ b/include/global.h @@ -489,11 +489,12 @@ struct RecordMixingDayCareMail bool16 holdsItem[DAYCARE_MON_COUNT]; }; -#define MAP_OBJECTS_COUNT 16 -#define BERRY_TREES_COUNT 128 -#define FLAGS_COUNT 300 -#define VARS_COUNT 256 -#define MAIL_COUNT 16 +#define POKEBLOCKS_COUNT 40 +#define MAP_OBJECTS_COUNT 16 +#define BERRY_TREES_COUNT 128 +#define FLAGS_COUNT 300 +#define VARS_COUNT 256 +#define MAIL_COUNT 16 enum { @@ -586,7 +587,7 @@ struct SaveBlock1 /*0x650*/ struct ItemSlot bagPocket_PokeBalls[16]; /*0x690*/ struct ItemSlot bagPocket_TMHM[64]; /*0x790*/ struct ItemSlot bagPocket_Berries[46]; - /*0x848*/ struct Pokeblock pokeblocks[40]; + /*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; /*0x988*/ u8 seen1[52]; /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 field_9C2[6]; diff --git a/include/list_menu.h b/include/list_menu.h index 0249b06af..8b793c0e4 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -1,14 +1,17 @@ #ifndef GUARD_LIST_MENU_H #define GUARD_LIST_MENU_H +#define LIST_NOTHING_CHOSEN -1 +#define LIST_B_PRESSED -2 + // Exported type declarations // Exported RAM declarations struct ListMenuItem { - const u8 *unk_00; - s32 unk_04; + const u8 *name; + s32 id; }; struct ListMenu; @@ -16,7 +19,7 @@ struct ListMenu; struct ListMenuTemplate { const struct ListMenuItem *items; - void (* unk_04)(u32, bool8, struct ListMenu *); + void (* moveCursorFunc)(u32, bool8, struct ListMenu *); void (* unk_08)(u8, s32, u8); u16 totalItems; u16 maxShowed; @@ -32,9 +35,11 @@ struct ListMenuTemplate u32 spaceBetweenItems:6; // x20000, x40000, x80000, x100000, x200000, x400000 = x7E0000 u32 unk_16_7:1; // x800000 u32 unk_17_0:6; // x1000000, x2000000, x4000000, x8000000, x10000000, x20000000 = x3F000000 + u32 cursorKind:2; // x40000000, x80000000 }; -struct ListMenu { +struct ListMenu +{ struct ListMenuTemplate _template; u16 scrollOffset; u16 selectedRow; @@ -44,13 +49,13 @@ struct ListMenu { u8 unk_1F; }; -extern struct ListMenuTemplate gUnknown_03006310; +extern struct ListMenuTemplate gMultiuseListMenuTemplate; // Exported ROM declarations -u8 ListMenuInit(struct ListMenuTemplate *template, u16 a1, u16 a2); -s32 ListMenuHandleInput(u8 id); -void get_coro_args_x18_x1A(u8 a0, u16 *a1, u16 *a2); -void sub_81AE6C8(u8 a0, u16 *a1, u16 *a2); +u8 ListMenuInit(struct ListMenuTemplate *template, u16 cursorPage, u16 cursorPosition); +s32 ListMenuHandleInputGetItemId(u8 listTaskId); +void sub_81AE860(u8 listTaskId, u16 *a1, u16 *a2); +void sub_81AE6C8(u8 listTaskId, u16 *a1, u16 *a2); #endif //GUARD_LIST_MENU_H diff --git a/include/menu.h b/include/menu.h index 2052a8dad..b57cfd455 100644 --- a/include/menu.h +++ b/include/menu.h @@ -32,7 +32,7 @@ void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirs s8 sub_8198C58(void); void do_scheduled_bg_tilemap_copies_to_vram(void); void clear_scheduled_bg_copies_to_vram(void); -void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, const u8 *str); +void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str); void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3); #endif // GUARD_MENU_H diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 4abe5c006..4d76104b7 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -3,7 +3,8 @@ // Exported type declarations -struct YesNoFuncTable { +struct YesNoFuncTable +{ TaskFunc yesFunc; TaskFunc noFunc; }; @@ -20,5 +21,9 @@ void ResetVramOamAndBgCntRegs(void); void SetVBlankHBlankCallbacksToNull(void); void ResetAllBgsCoordinates(void); bool16 RunTextPrintersRetIsActive(u8 textPrinterId); +void sub_8122344(void *arg0, u8 arg1); +void LoadListMenuArrowsGfx(void); +void sub_81223FC(u8 *a0, u8 count, u8 a2); +void sub_8122448(u8 *a0, u8 count, u16 x, u16 y); #endif //GUARD_MENU_HELPERS_H diff --git a/include/pokeblock.h b/include/pokeblock.h index 5d691df22..c69aa07dc 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -25,6 +25,14 @@ enum PBLOCK_FEEL, }; +enum +{ + PBLOCK_CASE_FIELD, + PBLOCK_CASE_BATTLE, + PBLOCK_CASE_FEEDER, + PBLOCK_CASE_GIVE +}; + // use pokeblock extern u8 gPokeblockMonId; extern s16 gPokeblockGain; @@ -40,8 +48,13 @@ extern const u8 *const gPokeblockNames[]; extern const struct CompressedSpriteSheet gPokeblockCase_SpriteSheet; extern const struct CompressedSpritePalette gPokeblockCase_SpritePal; +void OpenPokeblockCase(u8 caseId, void (*callback)(void)); +void OpenPokeblockCaseInBattle(void); +void OpenPokeblockCaseOnFeeder(void); +void ResetPokeblockScrollPositions(void); + u8 CreatePokeblockCaseSprite(s16 x, s16 y, u8 subpriority); -u8 GetPokeblockData(const struct Pokeblock *pokeblock, u8 dataId); +s16 GetPokeblockData(const struct Pokeblock *pokeblock, u8 dataId); void ClearPokeblocks(void); s8 GetFirstFreePokeblockSlot(void); bool32 AddPokeblock(struct Pokeblock *pokeblock); diff --git a/include/strings.h b/include/strings.h index 6a379ee19..51027adff 100644 --- a/include/strings.h +++ b/include/strings.h @@ -18,6 +18,15 @@ extern const u8 gText_Tough[]; extern const u8 gText_Single[]; extern const u8 gText_Double[]; +extern const u8 gText_Spicy[]; +extern const u8 gText_Dry[]; +extern const u8 gText_Sweet[]; +extern const u8 gText_Bitter[]; +extern const u8 gText_Sour[]; + +extern const u8 gText_StowCase[]; +extern const u8 gText_LvVar1[]; + extern const u8 gText_Spicy2[]; extern const u8 gText_Dry2[]; extern const u8 gText_Sweet2[]; |