mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
Merge pull request #247 from AnonymousRandomPerson/main
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
Swapped incorrect item_data_flag names
This commit is contained in:
commit
79d18c4c22
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user