18 if (*entry++ == itemId)
26#define INVENTORY_SNAPSHOT_SENTINEL 0x6774
48 for (owner = 0; owner < 4; owner++) {
62 *save++ = firstShortcut;
63 *save++ = secondShortcut;
95 }
while (remaining >= 0);
119#undef INVENTORY_SNAPSHOT_SENTINEL
s32 GameFlag_SetBit(s32 flag)
Sets flag and returns its byte number.
void GameFlag_ClearBit(s32 flag)
Clears flag.
#define FLAG_INVENTORY_SNAPSHOT
Set while the Colosso holds the party's equipment (the inventory snapshot).
void Unit_UpdateClass(s32 ownerId)
Works out a character's class again after its Djinn change, then its Psynergy list and its base eleme...
What every part of the game object shares: its includes and the inventory helper two parts use.
struct GameState gGameState
s32 Inventory_AddItem(s32 owner, s32 itemId)
Gives a unit one item, joining its first matching stack (up to 30) or taking the first free slot.
s32 Inventory_Equip(s32 owner, s32 slot)
Equips the item in slot, clearing the equipped bit of the item of the same type it replaces.
struct ItemDefinition * Item_GetDirect(s32 item)
Returns item item's definition; an inventory entry may be passed, its equipped and quantity bits are ...
@ ITEM_TYPE_PSYNERGY
The items that teach Psynergy while held: Orb of Force to Catch Beads.
void InventorySnapshot_Restore(void)
Gives back the inventories, shortcuts and party order InventorySnapshot_Save put aside,...
void Inventory_AddAndEquip(s32 owner, s32 itemId)
Gives a unit itemId and equips every exactly matching inventory entry.
void InventorySnapshot_Save(void)
Saves the first four characters' inventories, shortcuts and party order, then keeps only the Psynergy...
#define INVENTORY_SNAPSHOT_SENTINEL
The party's equipment, put aside while the Colosso takes it away; the sentinel marks the snapshot as ...
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
u16 inventory[15]
Items held, one entry each: bits 15..11 quantity | 10 broken | 9 equipped | 8..0 item id (INVENTORY_*...
u16 firstShortcut
The shortcuts' assignments.
u8 activeOwners[8]
the party in order
u8 type
enum ItemType; 0 for an item that is not equipment
void UnitCalc(s32 owner)
Recomputes a unit's stats from its base stats, equipment, set Djinn, class and battle stat levels,...
void Party_RestoreHpPp(s32 cureConditions)
Restores every party member's HP and PP; with cureConditions 1 it also cures poison and haunting.
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...