Merge pull request #247 from AnonymousRandomPerson/main
Some checks failed
build / build (push) Has been cancelled

Swapped incorrect item_data_flag names
This commit is contained in:
AnonymousRandomPerson 2026-03-13 19:09:10 -04:00 committed by GitHub
commit 79d18c4c22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -1452,9 +1452,9 @@ enum item_target_flag {
enum item_data_flag {
ITEM_DATA_FLAG_VALID = 1 << 0,
ITEM_DATA_FLAG_CONSUMABLE = 1 << 5,
ITEM_DATA_FLAG_THROWABLE_AT_ENEMY = 1 << 5,
ITEM_DATA_FLAG_THROWABLE_AT_ALLY = 1 << 6,
ITEM_DATA_FLAG_THROWABLE_AT_ENEMY = 1 << 7,
ITEM_DATA_FLAG_CONSUMABLE = 1 << 7,
};
// Exclusive effect ID. These are usually encoded as bitvectors.
@ -1634,7 +1634,7 @@ struct item_volatile {
};
struct bag_items_inner {
/* 0x0 */ struct item bag_items[INVENTORY_SIZE];
/* 0x0 */ struct item bag_items[INVENTORY_SIZE];
// NOTE: I don't know why we have to do the subtraction - Seth
};

View File

@ -196,15 +196,15 @@ s16 GetItemMoveId(s16 item_id)
bool8 TestItemAiFlag(s16 item_id, s32 flag)
{
if (flag == 0)
if (flag == ITEM_FLAG_CONSUMABLE)
{
item_id = EnsureValidItem(item_id);
if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ENEMY)
if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_CONSUMABLE)
return TRUE;
return FALSE;
}
if (flag == 1)
if (flag == ITEM_FLAG_THROWABLE_AT_ALLY)
{
item_id = EnsureValidItem(item_id);
if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ALLY)
@ -213,7 +213,7 @@ bool8 TestItemAiFlag(s16 item_id, s32 flag)
}
item_id = EnsureValidItem(item_id);
if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_CONSUMABLE)
if (ITEM_DATA_TABLE_PTRS.data[item_id].flags & ITEM_DATA_FLAG_THROWABLE_AT_ENEMY)
return TRUE;
return FALSE;
}