2017-09-20 03:47:15 +02:00
|
|
|
#ifndef GUARD_item_menu_H
|
|
|
|
#define GUARD_item_menu_H
|
|
|
|
|
2018-12-10 10:32:00 +01:00
|
|
|
#include "item.h"
|
|
|
|
|
2018-12-10 17:39:57 +01:00
|
|
|
#define RETURN_LOCATION_FIELD 0
|
|
|
|
#define RETURN_LOCATION_BATTLE 1
|
|
|
|
#define RETURN_LOCATION_POKEMON_LIST 2
|
|
|
|
#define RETURN_LOCATION_SHOP 3
|
|
|
|
#define RETURN_LOCATION_FIELD_2 4
|
|
|
|
#define RETURN_LOCATION_FIELD_3 5
|
|
|
|
#define RETURN_LOCATION_PC 6
|
|
|
|
#define RETURN_LOCATION_FIELD_4 7
|
|
|
|
#define RETURN_LOCATION_FIELD_5 8
|
|
|
|
#define RETURN_LOCATION_FIELD_6 9
|
|
|
|
#define RETURN_LOCATION_BATTLE_2 10
|
|
|
|
#define RETURN_LOCATION_PC_2 11
|
|
|
|
#define RETURN_LOCATION_UNCHANGED 12
|
|
|
|
|
2017-09-20 03:47:15 +02:00
|
|
|
// Exported type declarations
|
2018-02-02 14:03:48 +01:00
|
|
|
struct BagStruct
|
|
|
|
{
|
2018-03-04 18:41:07 +01:00
|
|
|
void (*bagCallback)(void);
|
|
|
|
u8 location;
|
2018-02-02 14:03:48 +01:00
|
|
|
u8 pocket;
|
2018-05-19 11:36:31 +02:00
|
|
|
u16 unk6;
|
2018-12-10 10:32:00 +01:00
|
|
|
u16 cursorPosition[POCKETS_COUNT];
|
|
|
|
u16 scrollPosition[POCKETS_COUNT];
|
2018-02-02 14:03:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct BagStruct gUnknown_0203CE58;
|
2017-09-20 03:47:15 +02:00
|
|
|
|
2018-03-04 18:41:07 +01:00
|
|
|
struct UnkBagStruct
|
|
|
|
{
|
2018-12-15 19:08:13 +01:00
|
|
|
void (*mainCallback2)(void);
|
|
|
|
u8 tilemapBuffer[0x800];
|
|
|
|
u8 spriteId[12];
|
|
|
|
u8 windowPointers[7];
|
2018-03-04 18:41:07 +01:00
|
|
|
u8 unk817;
|
|
|
|
u8 unk818;
|
|
|
|
u8 unk819;
|
|
|
|
u8 unk81A;
|
|
|
|
u8 unk81B:4;
|
|
|
|
u8 unk81B_1:2;
|
|
|
|
u8 unk81B_3:1;
|
2018-12-15 19:08:13 +01:00
|
|
|
u8 hideCloseBagText:1;
|
2018-03-04 18:41:07 +01:00
|
|
|
u8 filler3[2];
|
|
|
|
u8 unk81E;
|
|
|
|
u8 unk81F;
|
|
|
|
const u8* unk820;
|
|
|
|
u8 unk824;
|
|
|
|
u8 unk825;
|
|
|
|
u8 filler[2];
|
|
|
|
u8 unk828;
|
2018-12-15 19:08:13 +01:00
|
|
|
u8 numItemStacks[POCKETS_COUNT];
|
|
|
|
u8 numShownItems[6];
|
2018-03-04 18:41:07 +01:00
|
|
|
s16 unk834;
|
|
|
|
u8 filler4[0xE];
|
2018-12-15 19:08:13 +01:00
|
|
|
u8 pocketNameBuffer[32][32];
|
2018-03-04 18:41:07 +01:00
|
|
|
u8 filler2[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct UnkBagStruct *gUnknown_0203CE54;
|
|
|
|
|
2017-09-20 03:47:15 +02:00
|
|
|
// Exported RAM declarations
|
|
|
|
|
2017-11-16 14:36:51 +01:00
|
|
|
extern u16 gSpecialVar_ItemId;
|
2017-11-10 03:48:27 +01:00
|
|
|
|
2017-09-20 03:47:15 +02:00
|
|
|
// Exported ROM declarations
|
2018-03-12 09:26:20 +01:00
|
|
|
void sub_81AAC14(void);
|
2017-09-20 03:47:15 +02:00
|
|
|
void sub_81AAC50(void);
|
2017-09-20 17:48:11 +02:00
|
|
|
void sub_81AAC70(void);
|
2018-10-14 11:37:44 +02:00
|
|
|
void sub_81AAC28(void);
|
2018-12-15 19:08:13 +01:00
|
|
|
void SetInitialScrollAndCursorPositions(u8 pocketId);
|
2018-02-02 14:03:48 +01:00
|
|
|
void bag_menu_mail_related(void);
|
2018-03-28 00:33:08 +02:00
|
|
|
void CB2_BagMenuFromStartMenu(void);
|
2018-12-15 19:08:13 +01:00
|
|
|
u8 GetItemListPosition(u8 pocketId);
|
2018-10-17 04:47:08 +02:00
|
|
|
bool8 UseRegisteredKeyItemOnField(void);
|
2018-10-18 19:05:02 +02:00
|
|
|
void CB2_GoToSellMenu(void);
|
2018-12-13 04:55:39 +01:00
|
|
|
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
|
2018-03-28 00:33:08 +02:00
|
|
|
|
2017-09-20 03:47:15 +02:00
|
|
|
#endif //GUARD_item_menu_H
|