summaryrefslogtreecommitdiff
path: root/include/item.h
blob: ad60657fd0f22f0981182a9991829e10909440cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef GUARD_ITEMS_H
#define GUARD_ITEMS_H

struct Item
{
    /* 0x0 */ u8 *namePointer;
    /* 0x4 */ u32 buyPrice;
    /* 0x8 */ u32 sellPrice;
    /* 0xC */ u8 type;
    /* 0xD */ u8 icon;
    /* 0xE */ u16 fill;
    /* 0x10 */ u8 *descriptionPointer;
    /* 0x14 */ bool8 unkFood1[2];
    /* 0x16 */ u8 throwDmg;
    /* 0x17 */ u8 fill2;
    /* 0x18 */ s16 move;
    /* 0x1A */ u8 order; // Numbered order they are in storage
    /* 0x1B */ u8 unkThrow1B[2];
    /* 0x1D */ u8 palette;
    /* 0x1E */ u8 category;
    /* 0x1F */ u8 fill3;
};

struct ItemStruct_203B460
{
    u8 unk0;
    u8 numItems;
    u8 itemIndex;
};

struct ItemStruct_203B460_ALT
{
    u8 itemIndex;
    u8 numItems;
    u8 unk2;
};

enum ItemType
{
    ITEM_TYPE_THROWABLE,
    ITEM_TYPE_ROCK,
    ITEM_TYPE_BERRY_SEED,
    ITEM_TYPE_APPLE_GUMMI,
    ITEM_TYPE_HOLD_ITEM,
    ITEM_TYPE_TM,
    ITEM_TYPE_MONEY,
    ITEM_TYPE_UNUSED,
    ITEM_TYPE_MISC,
    ITEM_TYPE_ORB,
    ITEM_TYPE_LINK_BOX,
    ITEM_TYPE_USED_TM
};

enum ItemCategory
{
    ITEM_CATEGORY_NOTHING,
    ITEM_CATEGORY_THROWABLE,
    ITEM_CATEGORY_ROCKS,
    ITEM_CATEGORY_RIBBONS,
    ITEM_CATEGORY_FOOD,
    ITEM_CATEGORY_HEALING,
    ITEM_CATEGORY_CHESTNUT,
    ITEM_CATEGORY_MONEY_WISH_STONE,
    ITEM_CATEGORY_MISC,
    ITEM_CATEGORY_TM,
    ITEM_CATEGORY_LINK_BOX,
    ITEM_CATEGORY_SPECS,
    ITEM_CATEGORY_SCARFS,
    ITEM_CATEGORY_ORBS
};

void LoadItemParameters(void);
struct unkStruct_203B460 *GetMoneyItemsInfo(void);
void InitializeMoneyItems(void);
u8 GetItemType(u8 index);
s32 GetItemBuyPrice(u8 itemIndex);
s32 GetItemSellPrice(u8 itemIndex);
u8 GetItemOrder(u8 itemIndex);
u8 GetItemPalette(u8 itemIndex);
u8 GetItemCategory(u8 itemIndex);
u32 GetItemUnkThrow(u8 itemIndex, u32 r1);
u8 *GetItemDescription(u8 itemIndex);
u32 GetItemUnkFood(u8 itemIndex, u32 r1);
s32 sub_8090A34(void);
bool8 sub_8090A60(u8 itemIndex);
void sub_8090A8C(struct ItemStruct_203B460 *param_1,u8 itemIndex,u8 param_3);
void sub_8090B08(struct ItemStruct_203B460_ALT *param_1,u8 itemIndex);
void sub_8090B64(struct ItemStruct_203B460 *param_1, struct ItemStruct_203B460_ALT *param_2);

#endif