Alchemy
Loading...
Searching...
No Matches

snapshot.c File Reference

Equipping a given item, and the equipment put aside for the Colosso. More...

Go to the source code of this file.

Macros

#define INVENTORY_SNAPSHOT_SENTINEL   0x6774
 The party's equipment, put aside while the Colosso takes it away; the sentinel marks the snapshot as taken.

Functions

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-granting items, gives Isaac the Short Sword, sets FLAG_INVENTORY_SNAPSHOT and restores everyone's HP and PP.
void InventorySnapshot_Restore (void)
 Gives back the inventories, shortcuts and party order InventorySnapshot_Save put aside, then clears the snapshot and FLAG_INVENTORY_SNAPSHOT.

Detailed Description

Equipping a given item, and the equipment put aside for the Colosso.

Part of game.c, the game object, compiled only through it.

Definition in file snapshot.c.

Macro Definition Documentation

◆ INVENTORY_SNAPSHOT_SENTINEL

#define INVENTORY_SNAPSHOT_SENTINEL   0x6774

The party's equipment, put aside while the Colosso takes it away; the sentinel marks the snapshot as taken.

Definition at line 26 of file snapshot.c.

Referenced by InventorySnapshot_Restore(), and InventorySnapshot_Save().

Function Documentation

◆ Inventory_AddAndEquip()

void Inventory_AddAndEquip ( s32 owner,
s32 itemId )

Gives a unit itemId and equips every exactly matching inventory entry.

Called by InventorySnapshot_Save to arm Isaac for the Colosso.

Definition at line 9 of file snapshot.c.

Referenced by Inventory_AddAndEquip(), and InventorySnapshot_Save().

◆ InventorySnapshot_Save()

void InventorySnapshot_Save ( void )

Saves the first four characters' inventories, shortcuts and party order, then keeps only the Psynergy-granting items, gives Isaac the Short Sword, sets FLAG_INVENTORY_SNAPSHOT and restores everyone's HP and PP.

Nothing happens when a snapshot is already saved, apart from the restore. Called by the Colosseum entrance scene as Isaac enters the Colosso.

Definition at line 33 of file snapshot.c.

Referenced by InventorySnapshot_Save().

◆ InventorySnapshot_Restore()

void InventorySnapshot_Restore ( void )

Gives back the inventories, shortcuts and party order InventorySnapshot_Save put aside, then clears the snapshot and FLAG_INVENTORY_SNAPSHOT.

Called by the Babi palace scene after the Colosso, and by the file select screen.

Definition at line 82 of file snapshot.c.

Referenced by InventorySnapshot_Restore(), and SaveMenu_Run().