Skip to Content
The Alchemy Project

src/game/game_internal.h

What every part of the game object shares: its includes, the declarations its parts disagreed on and one inventory helper. More…

Included by game.c.

Structures

NameDescription
structLEVEL_UP_STATEScratch for gmUnitLevelUp, which takes it from EWRAM first (syHeapAllocateEWRAM) and frees it before returning.
structSTAT_STATEThe running totals gmUnitCalculate builds a unit's stats in.

Enumerations

NameDescription
enumanonymous enum { ITEM_COUNTER_COUNT, ITEM_COUNTER_MAX }The rare item counters gmRareItemStockAdjust keeps (an index from here on has no stock), and the most one counts.
enumELEMENT_GROUP { ELEMENT_GROUP_VENUS_MARS, ELEMENT_GROUP_MERCURY_JUPITER }A character's element group (CharacterElementGroupTable): which two lighthouses gmPartyRestorePpInLighthouse restores its PP in.
enumanonymous enum { OWNER_ACTION_CLASS, OWNER_ACTION_ITEM }The marks on a unit's Psynergy slot of an action its class or an item gives it, cleared before the class's own are listed again.

Functions

NameDescription
static inline voidgmInventoryCompactSlots (Sint16 *inventory)Keeps occupied slots in order and clears the unused inventory tail, for gmInventoryClearSlot and gmInventoryRemove (game_inventory.c) and gmInventorySnapshotSave (game_snapshot.c).

Description

What every part of the game object shares: its includes, the declarations its parts disagreed on and one inventory helper. game.c includes it before the parts, which rely on it and do not include it again.

Enumerations in detail

anonymous enum

enum { ITEM_COUNTER_COUNT, ITEM_COUNTER_MAX }

The rare item counters gmRareItemStockAdjust keeps (an index from here on has no stock), and the most one counts.

EnumeratorValueDescription
ITEM_COUNTER_COUNT300
ITEM_COUNTER_MAX99

Definition at line 37 of file game_internal.h.

ELEMENT_GROUP

enum ELEMENT_GROUP

A character's element group (CharacterElementGroupTable): which two lighthouses gmPartyRestorePpInLighthouse restores its PP in.

EnumeratorValueDescription
ELEMENT_GROUP_VENUS_MARS
ELEMENT_GROUP_MERCURY_JUPITER

Definition at line 45 of file game_internal.h.

anonymous enum

enum { OWNER_ACTION_CLASS, OWNER_ACTION_ITEM }

The marks on a unit's Psynergy slot of an action its class or an item gives it, cleared before the class's own are listed again.

EnumeratorValueDescription
OWNER_ACTION_CLASS0x8000
OWNER_ACTION_ITEM0x4000

Definition at line 53 of file game_internal.h.

Functions in detail

gmInventoryCompactSlots

static inline void gmInventoryCompactSlots(Sint16 *inventory)

Keeps occupied slots in order and clears the unused inventory tail, for gmInventoryClearSlot and gmInventoryRemove (game_inventory.c) and gmInventorySnapshotSave (game_snapshot.c). A slot is empty when it is 0.

References Sint32.

Referenced by gmInventoryClearSlot(), gmInventoryRemove() and gmInventorySnapshotSave().

Definition at line 21 of file game_internal.h.