Skip to Content
The Alchemy Project

src/game/game_internal.h

What every part of the game object shares: its includes and the inventory helper two parts use. More…

Included by game.c.

Functions

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

Description

What every part of the game object shares: its includes and the inventory helper two parts use. game.c includes it once, before the parts.

Functions in detail

gmInventoryCompactSlots

static inline void gmInventoryCompactSlots(Sint16 *inventory)

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

References Sint32.

Referenced by gmInventoryRemove() and gmInventorySnapshotSave().

Definition at line 27 of file game_internal.h.