diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/graphics.h | 96 | ||||
-rw-r--r-- | include/item_menu.h | 41 | ||||
-rw-r--r-- | include/item_menu_icons.h | 19 | ||||
-rw-r--r-- | include/list_menu.h | 64 | ||||
-rw-r--r-- | include/menu_indicators.h | 17 |
5 files changed, 201 insertions, 36 deletions
diff --git a/include/graphics.h b/include/graphics.h index e0c9431ac..9afcb75ad 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2719,12 +2719,18 @@ extern const u16 gFireRedMenuElements2_Pal[16]; extern const u16 gFireRedMenuElements3_Pal[16]; extern const u8 gFireRedMenuElements_Gfx[]; -//item menu graphics +// item menu graphics extern const u8 gBagScreen_Gfx[]; extern const u16 gBagScreenFemale_Pal[]; extern const u16 gBagScreenMale_Pal[]; extern const u8 gBagMenuHMIcon_Gfx[]; +// item menu icons graphics +extern const u8 gBagMaleTiles[]; +extern const u8 gBagFemaleTiles[]; +extern const u8 gBagPalette[]; +extern const u8 gBerryCheckCircle_Gfx[]; + //intro graphics extern const u8 gIntro1SparkleGfx[]; extern const u8 gIntro1FlygonGfx[]; @@ -2767,6 +2773,94 @@ extern const u16 gIntro2BrendanNoTurnPal[]; extern const u16 gIntro2FlygonPal[]; extern const u8 gIntro2FlygonGfx[]; +// berry pics +extern const u8 gBerryPic_Cheri[]; +extern const u8 gBerryPalette_Cheri[]; +extern const u8 gBerryPic_Chesto[]; +extern const u8 gBerryPalette_Chesto[]; +extern const u8 gBerryPic_Pecha[]; +extern const u8 gBerryPalette_Pecha[]; +extern const u8 gBerryPic_Rawst[]; +extern const u8 gBerryPalette_Rawst[]; +extern const u8 gBerryPic_Aspear[]; +extern const u8 gBerryPalette_Aspear[]; +extern const u8 gBerryPic_Leppa[]; +extern const u8 gBerryPalette_Leppa[]; +extern const u8 gBerryPic_Oran[]; +extern const u8 gBerryPalette_Oran[]; +extern const u8 gBerryPic_Persim[]; +extern const u8 gBerryPalette_Persim[]; +extern const u8 gBerryPic_Lum[]; +extern const u8 gBerryPalette_Lum[]; +extern const u8 gBerryPic_Sitrus[]; +extern const u8 gBerryPalette_Sitrus[]; +extern const u8 gBerryPic_Figy[]; +extern const u8 gBerryPalette_Figy[]; +extern const u8 gBerryPic_Wiki[]; +extern const u8 gBerryPalette_Wiki[]; +extern const u8 gBerryPic_Mago[]; +extern const u8 gBerryPalette_Mago[]; +extern const u8 gBerryPic_Aguav[]; +extern const u8 gBerryPalette_Aguav[]; +extern const u8 gBerryPic_Iapapa[]; +extern const u8 gBerryPalette_Iapapa[]; +extern const u8 gBerryPic_Razz[]; +extern const u8 gBerryPalette_Razz[]; +extern const u8 gBerryPic_Bluk[]; +extern const u8 gBerryPalette_Bluk[]; +extern const u8 gBerryPic_Nanab[]; +extern const u8 gBerryPalette_Nanab[]; +extern const u8 gBerryPic_Wepear[]; +extern const u8 gBerryPalette_Wepear[]; +extern const u8 gBerryPic_Pinap[]; +extern const u8 gBerryPalette_Pinap[]; +extern const u8 gBerryPic_Pomeg[]; +extern const u8 gBerryPalette_Pomeg[]; +extern const u8 gBerryPic_Kelpsy[]; +extern const u8 gBerryPalette_Kelpsy[]; +extern const u8 gBerryPic_Qualot[]; +extern const u8 gBerryPalette_Qualot[]; +extern const u8 gBerryPic_Hondew[]; +extern const u8 gBerryPalette_Hondew[]; +extern const u8 gBerryPic_Grepa[]; +extern const u8 gBerryPalette_Grepa[]; +extern const u8 gBerryPic_Tamato[]; +extern const u8 gBerryPalette_Tamato[]; +extern const u8 gBerryPic_Cornn[]; +extern const u8 gBerryPalette_Cornn[]; +extern const u8 gBerryPic_Magost[]; +extern const u8 gBerryPalette_Magost[]; +extern const u8 gBerryPic_Rabuta[]; +extern const u8 gBerryPalette_Rabuta[]; +extern const u8 gBerryPic_Nomel[]; +extern const u8 gBerryPalette_Nomel[]; +extern const u8 gBerryPic_Spelon[]; +extern const u8 gBerryPalette_Spelon[]; +extern const u8 gBerryPic_Pamtre[]; +extern const u8 gBerryPalette_Pamtre[]; +extern const u8 gBerryPic_Watmel[]; +extern const u8 gBerryPalette_Watmel[]; +extern const u8 gBerryPic_Durin[]; +extern const u8 gBerryPalette_Durin[]; +extern const u8 gBerryPic_Belue[]; +extern const u8 gBerryPalette_Belue[]; +extern const u8 gBerryPic_Liechi[]; +extern const u8 gBerryPalette_Liechi[]; +extern const u8 gBerryPic_Ganlon[]; +extern const u8 gBerryPalette_Ganlon[]; +extern const u8 gBerryPic_Salac[]; +extern const u8 gBerryPalette_Salac[]; +extern const u8 gBerryPic_Petaya[]; +extern const u8 gBerryPalette_Petaya[]; +extern const u8 gBerryPic_Apicot[]; +extern const u8 gBerryPalette_Apicot[]; +extern const u8 gBerryPic_Lansat[]; +extern const u8 gBerryPalette_Lansat[]; +extern const u8 gBerryPic_Starf[]; +extern const u8 gBerryPalette_Starf[]; +extern const u8 gBerryPic_Enigma[]; +extern const u8 gBerryPalette_Enigma[]; + //credits extern const u8 gCreditsCopyrightEnd_Gfx[]; diff --git a/include/item_menu.h b/include/item_menu.h index ccf52a7a9..68605c719 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -4,17 +4,48 @@ // Exported type declarations struct BagStruct { - void *func; - u8 unk4; + void (*bagCallback)(void); + u8 location; u8 pocket; u8 unk6[2]; - u16 unk8[5]; - u16 unk12[5]; - void *unk1C; + u16 cursorPosition[5]; + u16 scrollPosition[5]; }; extern struct BagStruct gUnknown_0203CE58; +struct UnkBagStruct +{ + void (*unk0)(void); + u8 unk4[0x800]; + u8 unk804[12]; + u8 unk810[7]; + u8 unk817; + u8 unk818; + u8 unk819; + u8 unk81A; + u8 unk81B:4; + u8 unk81B_1:2; + u8 unk81B_3:1; + u8 unk81B_2:1; + u8 filler3[2]; + u8 unk81E; + u8 unk81F; + const u8* unk820; + u8 unk824; + u8 unk825; + u8 filler[2]; + u8 unk828; + u8 unk829[5]; + u8 unk82E[6]; + s16 unk834; + u8 filler4[0xE]; + u8 unk844[32][32]; + u8 filler2[4]; +}; + +extern struct UnkBagStruct *gUnknown_0203CE54; + // Exported RAM declarations extern u16 gSpecialVar_ItemId; diff --git a/include/item_menu_icons.h b/include/item_menu_icons.h index 56e012421..aee7599df 100644 --- a/include/item_menu_icons.h +++ b/include/item_menu_icons.h @@ -1,16 +1,25 @@ #ifndef GUARD_ITEM_MENU_ICONS #define GUARD_ITEM_MENU_ICONS +extern const struct CompressedSpriteSheet gUnknown_0857FB34; +extern const struct CompressedSpriteSheet gUnknown_0857FB3C; +extern const struct CompressedSpritePalette gUnknown_0857FB44; extern const struct CompressedSpriteSheet gUnknown_0857FDEC; extern const struct CompressedSpritePalette gUnknown_0857FDF4; -u8 sub_80D511C(u8 a0, u8 a1, u8 a2, u8 a3); +void RemoveBagSprite(u8 id); +void AddBagVisualSprite(u8 bagPocketId); +void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets); +void ShakeBagVisual(void); +void AddSwitchPocketRotatingBallSprite(s16 rotationDirection); +void AddBagItemIconSprite(u16 itemId, u8 id); +void RemoveBagItemIconSprite(u8 id); +void sub_80D4FAC(void); +void sub_80D4FC8(u8 arg0); +void sub_80D4FEC(u8 arg0); u8 CreateBerryTagSprite(u8 id, s16 x, s16 y); void FreeBerryTagSpritePalette(void); +u8 sub_80D511C(u8 berryId, u8 x, u8 y, bool8 startAffine); u8 CreateBerryFlavorCircleSprite(s16 x); -void sub_80D4FAC(void); -void RemoveBagItemIconObject(u8); -void sub_80D4FEC(u8); -void sub_80D4FC8(u8); #endif // GUARD_ITEM_MENU_ICONS diff --git a/include/list_menu.h b/include/list_menu.h index 77d00bf97..0aa66a524 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -4,9 +4,11 @@ #define LIST_NOTHING_CHOSEN -1 #define LIST_B_PRESSED -2 -// Exported type declarations +#define LIST_NO_MULTIPLE_SCROLL 0 +#define LIST_MULTIPLE_SCROLL_DPAD 1 +#define LIST_MULTIPLE_SCROLL_L_R 2 -// Exported RAM declarations +struct ListMenu; struct ListMenuItem { @@ -14,33 +16,31 @@ struct ListMenuItem s32 id; }; -struct ListMenu; - struct ListMenuTemplate { const struct ListMenuItem *items; - void (* moveCursorFunc)(u32, bool8, struct ListMenu *); - void (* unk_08)(u8, s32, u8); + void (* moveCursorFunc)(s32, bool8, struct ListMenu *); + void (* unk_08)(u8 windowId, s32 itemId, u8 y); u16 totalItems; u16 maxShowed; - u8 unk_10; + u8 windowId; u8 unk_11; u8 unk_12; - u8 cursor_Y; - u32 upText_Y:4; // x1, x2, x4, x8 = xF - u32 cursorColor:4; // x10, x20, x40, x80 = xF0 - u32 fillColor:4; // x100, x200, x400, x800 = xF00 - u32 cursorShadowColor:4; // x1000, x2000, x4000, x8000 = xF000 - u32 unk_16_0:1; // x10000 - 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 + u8 cursor_X; + u8 upText_Y:4; // x1, x2, x4, x8 = xF + u8 cursorPal:4; // x10, x20, x40, x80 = xF0 + u8 fillValue:4; // x1, x2, x4, x8 = xF + u8 cursorShadowPal:4; // x10, x20, x40, x80 = xF0 + u8 lettersSpacing:3; + u8 unk_16_3:3; + u8 scrollMultiple:2; // x40, x80 = xC0 + u8 fontId:6; // x1, x2, x4, x8, x10, x20 = x3F + u8 cursorKind:2; // x40, x80 }; struct ListMenu { - struct ListMenuTemplate _template; + struct ListMenuTemplate template; u16 scrollOffset; u16 selectedRow; u8 unk_1C; @@ -49,14 +49,30 @@ struct ListMenu u8 unk_1F; }; -extern struct ListMenuTemplate gMultiuseListMenuTemplate; +struct UnknownListMenuWindowStruct +{ + u8 x; + u8 y; + u8 width; + u8 height; + u8 palNum; +}; -// Exported ROM declarations +extern struct ListMenuTemplate gMultiuseListMenuTemplate; -u8 ListMenuInit(struct ListMenuTemplate *template, u16 cursorPage, u16 cursorPosition); +s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); +u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow); +u8 ListMenuInitWithWindows(struct ListMenuTemplate *listMenuTemplate, struct UnknownListMenuWindowStruct *arg1, u16 scrollOffset, u16 selectedRow); s32 ListMenuHandleInputGetItemId(u8 listTaskId); -void sub_81AE860(u8 listTaskId, u16 *a1, u16 *a2); -void sub_81AE6C8(u8 listTaskId, u16 *a1, u16 *a2); -u8 ListMenuGetYCoordForPrintingArrowCursor(u8); +void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow); +void sub_81AE70C(u8 listTaskId); +void ChangeListMenuPals(u8 listTaskId, u8 cursorPal, u8 fillValue, u8 cursorShadowPal); +void ChangeListMenuCoords(u8 listTaskId, u8 x, u8 y); +s32 ListMenuTestInput(struct ListMenuTemplate *template, u32 scrollOffset, u32 selectedRow, u16 keys, u16 *newScrollOffset, u16 *newSelectedRow); +void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId); +void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow); +u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId); +void sub_81AF028(u8 cursorPal, u8 fillValue, u8 cursorShadowPal); +void sub_81AF078(s32 arg0, u8 arg1, struct ListMenu *list); #endif //GUARD_LIST_MENU_H diff --git a/include/menu_indicators.h b/include/menu_indicators.h index b82e48725..a099cffab 100644 --- a/include/menu_indicators.h +++ b/include/menu_indicators.h @@ -7,16 +7,31 @@ // Exported ROM declarations -struct ArrowStruct { +struct ArrowStruct +{ u8 unk0[6]; u16 unk6[4]; u8 unkE; }; +struct CursorStruct +{ + u8 unk0; + u8 unk1; + u16 unk2; + u16 unk4; + u16 unk6; + u16 unk8; + u8 unkA; +}; + void Task_ScrollIndicatorArrowPairOnMainMenu(u8); u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *); void RemoveScrollIndicatorArrowPair(u8); u8 AddScrollIndicatorArrowPair(const struct ArrowStruct*, void*); void sub_81AF15C(u8, u8, u8); +void ListMenuRemoveCursorObject(u8 taskId, u32 cursorKind); +void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorKind); +u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorKind); #endif //GUARD_MENU_INDICATORS_H |