pokeemerald/include/battle_pyramid_bag.h

74 lines
2.1 KiB
C
Raw Normal View History

2018-08-30 18:10:57 +00:00
#ifndef GUARD_BATTLE_PYRAMID_BAG_H
#define GUARD_BATTLE_PYRAMID_BAG_H
#include "list_menu.h"
2021-04-22 22:49:54 +00:00
enum {
PYRAMIDBAG_LOC_FIELD,
PYRAMIDBAG_LOC_BATTLE,
PYRAMIDBAG_LOC_PARTY,
PYRAMIDBAG_LOC_CHOOSE_TOSS,
PYRAMIDBAG_LOC_PREV,
};
enum {
PBAG_SPRITE_BAG,
PBAG_SPRITE_ITEM_ICON,
PBAG_SPRITE_ITEM_ICON_ALT,
PBAG_SPRITE_SWAP_LINE_START, // Swap line consists of 8 sprites
PBAG_SPRITE_SWAP_LINE_2,
PBAG_SPRITE_SWAP_LINE_3,
PBAG_SPRITE_SWAP_LINE_4,
PBAG_SPRITE_SWAP_LINE_5,
PBAG_SPRITE_SWAP_LINE_6,
PBAG_SPRITE_SWAP_LINE_7,
PBAG_SPRITE_SWAP_LINE_END,
PBAG_SPRITE_COUNT
};
#define NUM_SWAP_LINE_SPRITES (1 + PBAG_SPRITE_SWAP_LINE_END - PBAG_SPRITE_SWAP_LINE_START)
struct PyramidBagMenu
2018-08-30 18:10:57 +00:00
{
2021-08-03 06:17:01 +00:00
void (*newScreenCallback)(void);
2021-04-22 22:49:54 +00:00
u8 tilemapBuffer[BG_SCREEN_SIZE];
u8 spriteIds[PBAG_SPRITE_COUNT];
2018-08-30 18:10:57 +00:00
u8 windowIds[5];
2021-04-22 22:49:54 +00:00
u8 toSwapPos;
bool8 isAltIcon; // Two item icons loaded at a time. Tracks which to show next
2018-09-06 16:37:45 +00:00
u8 scrollIndicatorsTaskId;
2018-08-30 18:10:57 +00:00
const u8 *menuActionIds;
2021-04-22 22:49:54 +00:00
u8 unused1[4];
2018-08-30 18:10:57 +00:00
u8 menuActionsCount;
u8 listMenuCount;
u8 listMenuMaxShown;
struct ListMenuItem bagListItems[PYRAMID_BAG_ITEMS_COUNT + 1];
u8 itemStrings[PYRAMID_BAG_ITEMS_COUNT + 1][ITEM_NAME_LENGTH + 10];
s16 state;
2021-04-22 22:49:54 +00:00
u8 unused2[4];
2018-08-30 18:10:57 +00:00
};
2021-04-22 22:49:54 +00:00
struct PyramidBagMenuState
2018-08-30 18:10:57 +00:00
{
2021-08-03 06:17:01 +00:00
void (*exitCallback)(void);
2021-04-22 22:49:54 +00:00
u8 location;
2018-08-30 18:10:57 +00:00
u16 cursorPosition;
u16 scrollPosition;
};
2021-04-22 22:49:54 +00:00
extern struct PyramidBagMenu *gPyramidBagMenu;
extern struct PyramidBagMenuState gPyramidBagMenuState;
2018-08-30 18:10:57 +00:00
2019-02-07 02:01:29 +00:00
void InitBattlePyramidBagCursorPosition(void);
2018-08-30 18:10:57 +00:00
void CB2_PyramidBagMenuFromStartMenu(void);
2019-10-17 23:22:03 +00:00
void CB2_ReturnToPyramidBagMenu(void);
2021-04-22 22:49:54 +00:00
void UpdatePyramidBagList(void);
void UpdatePyramidBagCursorPos(void);
2021-08-03 06:17:01 +00:00
void GoToBattlePyramidBagMenu(u8 location, void (*exitCallback)(void));
2019-12-22 00:01:38 +00:00
void Task_CloseBattlePyramidBagMessage(u8 taskId);
2019-10-17 23:22:03 +00:00
void TryStoreHeldItemsInPyramidBag(void);
2019-12-11 08:28:55 +00:00
void ChooseItemsToTossFromPyramidBag(void);
2021-04-22 22:49:54 +00:00
void CloseBattlePyramidBag(u8 taskId);
2018-08-30 18:10:57 +00:00
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId));
#endif // GUARD_BATTLE_PYRAMID_BAG_H