2017-10-12 09:06:19 +02:00
|
|
|
#ifndef GUARD_SHOP_H
|
|
|
|
#define GUARD_SHOP_H
|
|
|
|
|
2018-10-18 19:05:02 +02:00
|
|
|
extern EWRAM_DATA struct ItemSlot gMartPurchaseHistory[3];
|
2017-10-13 17:09:36 +02:00
|
|
|
|
2018-09-02 00:15:35 +02:00
|
|
|
enum
|
|
|
|
{
|
2019-04-17 02:06:38 +02:00
|
|
|
MART_TYPE_NORMAL, // normal mart
|
|
|
|
MART_TYPE_DECOR,
|
|
|
|
MART_TYPE_DECOR2,
|
2018-09-02 00:15:35 +02:00
|
|
|
};
|
|
|
|
|
2018-10-18 19:05:02 +02:00
|
|
|
// shop view window NPC info enum
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
EVENT_OBJ_ID,
|
|
|
|
X_COORD,
|
|
|
|
Y_COORD,
|
|
|
|
ANIM_NUM,
|
2018-12-07 14:01:59 +01:00
|
|
|
LAYER_TYPE
|
2018-10-18 19:05:02 +02:00
|
|
|
};
|
|
|
|
|
2018-09-02 00:15:35 +02:00
|
|
|
struct MartInfo
|
|
|
|
{
|
2018-10-18 19:05:02 +02:00
|
|
|
/*0x0*/ void (*callback)(void);
|
2018-09-02 00:15:35 +02:00
|
|
|
/*0x4*/ const struct MenuAction *menuActions;
|
|
|
|
/*0x8*/ const u16 *itemList;
|
|
|
|
/*0xC*/ u16 itemCount;
|
|
|
|
/*0xE*/ u8 windowId;
|
|
|
|
/*0xF*/ u8 martType;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ShopData
|
|
|
|
{
|
2018-12-07 14:01:59 +01:00
|
|
|
/*0x0000*/ u16 tilemapBuffers[4][0x400];
|
|
|
|
/*0x2000*/ u32 totalCost;
|
|
|
|
/*0x2004*/ u16 itemsShowed;
|
|
|
|
/*0x2006*/ u16 selectedRow;
|
|
|
|
/*0x2008*/ u16 scrollOffset;
|
|
|
|
/*0x200A*/ u8 maxQuantity;
|
|
|
|
/*0x200B*/ u8 scrollIndicatorsTaskId;
|
|
|
|
/*0x200C*/ u8 iconSlot;
|
|
|
|
/*0x200D*/ u8 itemSpriteIds[2];
|
|
|
|
/*0x2010*/ s16 viewportObjects[16][5];
|
2018-09-02 00:15:35 +02:00
|
|
|
};
|
|
|
|
|
2017-10-12 21:36:26 +02:00
|
|
|
void CreatePokemartMenu(const u16 *);
|
|
|
|
void CreateDecorationShop1Menu(const u16 *);
|
|
|
|
void CreateDecorationShop2Menu(const u16 *);
|
2018-02-09 03:00:28 +01:00
|
|
|
void CB2_ExitSellMenu(void);
|
2017-10-12 09:06:19 +02:00
|
|
|
|
2019-04-17 02:06:38 +02:00
|
|
|
#endif // GUARD_SHOP_H
|