diff options
Diffstat (limited to 'include/item.h')
-rw-r--r-- | include/item.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/include/item.h b/include/item.h index 84f9de2..1d81116 100644 --- a/include/item.h +++ b/include/item.h @@ -12,8 +12,11 @@ struct Item /* 0xD */ u8 icon; /* 0xE */ u16 fill; /* 0x10 */ u8 *descriptionPointer; - /* 0x14 */ bool8 unkFood1[2]; - /* 0x16 */ u8 throwDmg; + // Determines how the AI can use the item. + // Index 0: Item can be used on self. + // Index 1: Item can be thrown at allies. + // Index 2: Item can be thrown at enemies. + /* 0x14 */ bool8 aiFlags[3]; /* 0x17 */ u8 fill2; /* 0x18 */ s16 move; /* 0x1A */ u8 order; // Numbered order they are in storage @@ -25,7 +28,7 @@ struct Item struct ItemSlot { - u8 unk0; // some sort of flags, bit 0 seems to indicate an empty slot + u8 itemFlags; u8 numItems; u8 itemIndex; }; @@ -84,6 +87,14 @@ enum ItemCategory ITEM_CATEGORY_ORBS }; +enum ItemFlag +{ + ITEM_FLAG_EXISTS = 1 << 0, + ITEM_FLAG_FOR_SALE = 1 << 1, + ITEM_FLAG_STICKY = 1 << 3, + ITEM_FLAG_SET = 1 << 4 // This item can be thrown by pressing L+R instead of having to go to the bag menu. +}; + // see https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Rescue_Team) enum ItemID { ITEM_ID_NOTHING, @@ -343,7 +354,7 @@ u8 GetItemPalette(u8 itemIndex); u8 GetItemCategory(u8 itemIndex); u32 GetItemUnkThrow(u8 itemIndex, u32 r1); u8 *GetItemDescription(u8 itemIndex); -u32 GetItemUnkFood(u8 itemIndex, u32 r1); +u32 GetItemAIFlags(u8 itemIndex, u32 r1); s32 GetNumberOfFilledInventorySlots(void); bool8 IsThrowableItem(u8 itemIndex); void xxx_init_itemslot_8090A8C(struct ItemSlot *param_1,u8 itemIndex,u8 param_3); |