1#ifndef ALCHEMY_GAME_STATE_H
2#define ALCHEMY_GAME_STATE_H
157#ifndef OWN_gGameState
164#define Battle_SetStart(mode) \
166 gGameState.battleStart = (mode); \
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
struct GameState gGameState
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
The game's state: play time, coins, the scene and the leader's position, the active party and the opt...
u8 unk2b4[4]
not named by TBS code
u16 firstShortcut
The shortcuts' assignments.
s16 nextScene
where the event sends the party next; -1 for none
u8 unk2bc[4]
not named by TBS code
s16 cloaked
1 under Cloak, which prevents battles
u8 unk20b
1 on a new game; not read by name in TBS
s16 hazardLimit
Hazardous ground (the Lamakan Desert's heat): every hazardLimit steps the party takes hazardDamage (b...
s16 special
the battle backdrop chosen for the scene or terrain
s32 z
16.16 fixed-point pixels
u16 bKeys
KEY_B; not read by name in TBS.
u8 paletteGlow[2]
window hue (0 to 24), brightness
u32 playTime
frames, copied from gPlayTimeFrames when saving
s16 nextEntrance
where the event sends the party next; -1 for none
s8 pausedPose
Halt: the stopped object's first animation param.
u8 unk20d[2]
not named by TBS code
s16 map
the scene's map; SceneId_Clear for the world map
u32 buildStamp
Runtime_GetBuildStampTime's value when the game was last saved; its low half goes into the file's sum...
s16 sceneGroup
the current scene's group; a new group resets its flags
u16 selectKeys
the menu; KEY_SELECT
u8 perspectiveScene
set to 1 on the world map; not read by name in TBS
s8 shopGifts
indexes the Game Ticket's credit cost
s16 sceneCue
the battle music chosen for the encounter
s32 y
16.16 fixed-point pixels
u8 unk225[5]
not named by TBS code
u16 turn
the leader's terrainId, kept with its position
s16 defaultEntrance
the entrance it was entered by
u8 unk20f
Set on saving at the end of the game; copied to the file's summary as sendFlag.
s16 pendingDjinnEvent
The Djinni battle pending (DJINNI_0 plus its number, flags in bits 15 to 11), resolved on returning t...
s32 avoidDistance
distance left of Avoid, 16.16 pixels; 0 when off
u8 unk254[0x50]
not named by TBS code
u8 unk13c[0x84]
not named by TBS code
s32 shopCredit
spent on a Game Ticket; not written by name in TBS
s8 avoidByItem
Avoid came from an item (the Sacred Feather).
s16 hazardSteps
reset on entering a new scene group
s16 pausedObject
Halt: the stopped object; -1 for none.
u8 idleSleepEnabled
the option, saved from gIdleSleepEnabled
s8 prizeWeights[0x0f]
The slot machine's prize weights, three prizes to each of 4, 8, 16, 32 and 64 on a new game; not read...
s32 encounterSteps
the encounter count, reset with a new group
u32 pausedUpdate
Halt: the stopped object's update; not read by name.
struct BattleUnit owners[8]
the characters
u8 unk200[5]
not named by TBS code
s16 defeatEntrance
where a defeat returns to; -1 for none
u8 unk24e[2]
not named by TBS code
s16 sceneChangeReason
the last battle's result; -1 for a defeat
u8 unk008[8]
Not named by TBS code.
s16 retreatEntrance
where Retreat goes; the group's first entrance
s16 defeatScene
where a defeat returns to; -1 for none
s16 retreatScene
where Retreat goes; the group's first entrance
s16 defaultScene
the scene being run, kept as it starts
s16 sceneVariant
the current scene's variant from its record
u8 activeOwners[8]
the party in order
u8 messageSpeed
0 to 2; 1 on a new game
s8 wonPrizes[0x10]
Lucky Wheels: 0 to 7 the prize categories won, ended by -1 (-2 once awarded); 8 on the last variant g...
u16 secondShortcutKeys
secondShortcut; KEY_R
s32 x
16.16 fixed-point pixels
u8 unk014[0x104]
The party's Djinn recovery list (struct DjinnRecoveryList), read through Djinn_GetRecoveryTable; not ...
u8 movementMode
1 while the leader is climbing, 0 otherwise
u32 startStamp
Runtime_GetBuildStampTime's value at a new game.
u8 battleStart
how the next battle starts (Battle_SetStart)
u16 pendingItem
given on returning to the field if the party has room
s32 selectedActor
the leader: its unit and its actor
u16 aKeys
The buttons for each field command, as KEY_ masks; read with gKeysPressed except dashKeys,...
u8 unk1f3
not named by TBS code
s16 savedScene
where a defeat returns to without a defeat point
s16 cue
the current scene's field music
s16 returnCue
music playing when the field left; -1 for none
u8 speech
1 shows speakers' portraits beside their messages
s16 hazardMode
0 counts on hazard cells only; 1 counts every step
u8 unk1d8[2]
not named by TBS code
u16 linkTallies[8]
The link lobby's tallies: 4 the total wins and 7 the consecutive wins it reports, 3 cleared on choosi...
u8 unk207[3]
not named by TBS code
u16 firstShortcutKeys
firstShortcut; KEY_L
s16 savedEntrance
where a defeat returns to without a defeat point
The integer types, TRUE, UNUSED and the fixed-address macros.