summaryrefslogtreecommitdiff
path: root/include/item.h
diff options
context:
space:
mode:
authorCheng Hann Gan <chenghanngan.us@gmail.com>2021-09-09 19:22:48 -0400
committerGitHub <noreply@github.com>2021-09-09 16:22:48 -0700
commit8237e29a164211eb2ec4cd161eb4183cc1947fee (patch)
tree67dc502264b755dc620f56969f3bea68a40b17af /include/item.h
parent4eff1882443b0004d9c9fa4895cdfefdc356565f (diff)
Defined more in-dungeon structs and enums (#53)
* Defined DungeonEntity * Rename EntityType enums * Revert EntityType rename * Defined more in-dungeon structs and enums * Added more dungeon global structs/enums * Prefixed dungeonGlobalData with g * Fixed compile errors * Removed some CRLFs * Fixed compile after merge * Revert Makefile * Rename DungeonEntityData.entityType Co-authored-by: Seth Barberee <seth.barberee@gmail.com> * Renamed symbols per PR comments Co-authored-by: Cheng Hann Gan <chenghann_gan@ultimatesoftware.com> Co-authored-by: Seth Barberee <seth.barberee@gmail.com>
Diffstat (limited to 'include/item.h')
-rw-r--r--include/item.h19
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);