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…
#include "battle/battle.h"#include "field/field.h"#include "game/game.h"#include "edition.h"#include "game/game_flags.h"#include "game/inventory.h"#include "ability_ids.h"#include "enemy_ids.h"#include "item_ids.h"
Included by game.c.
Structures
| Name | Description | |
|---|---|---|
struct | LEVEL_UP_STATE | Scratch for gmUnitLevelUp, which takes it from EWRAM first (syHeapAllocateEWRAM) and frees it before returning. |
struct | STAT_STATE | The running totals gmUnitCalculate builds a unit's stats in. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous 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. |
enum | ELEMENT_GROUP { ELEMENT_GROUP_VENUS_MARS, ELEMENT_GROUP_MERCURY_JUPITER } | A character's element group (CharacterElementGroupTable): which two lighthouses gmPartyRestorePpInLighthouse restores its PP in. |
enum | anonymous 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
| Name | Description | |
|---|---|---|
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). |
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.
| Enumerator | Value | Description |
|---|---|---|
ITEM_COUNTER_COUNT | 300 | |
ITEM_COUNTER_MAX | 99 |
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.
| Enumerator | Value | Description |
|---|---|---|
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.
| Enumerator | Value | Description |
|---|---|---|
OWNER_ACTION_CLASS | 0x8000 | |
OWNER_ACTION_ITEM | 0x4000 |
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.