1#ifndef ALCHEMY_FIELD_RUNTIME_H
2#define ALCHEMY_FIELD_RUNTIME_H
48 const u32 *(*exits)(void);
const struct SceneRecord gField_SceneTable[]
struct SceneEntries gOverlayArea
The scene table formats: entrances, exits, placements and events, and the macros that write them.
ObjectRuntime, a field object's runtime state, and the object snapshots.
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 field actor: a person or thing on the field with a position, motion toward a target,...
s32 z
16.16 fixed-point pixels
Full event work allocated by Field_RunScene (heap slot 27).
s16 exit
the exit taken, which ends the scene
u16 transitionActive
set once the opening transition has started
s16 unk1de
set to -1 by FieldEvent_Begin; not read by name
s8 resolvingAction
set while Psynergy takes effect
u16 descriptor
an actor's event, as actor | 0x1000
s16 input
a tile code (252 to 254) for Field_RunPushTileEvent
s16 event
A raised event for Scene_RunRaisedEvent, or -1 when characters fell to poison or hazard damage,...
s16 command
a field Psynergy to use, as owner << 10 | Psynergy
const struct SceneEvent * events
the scene's event table
s16 revealActive
nonzero while Reveal is active
s16 effectTimerRunning
Nonzero lets the Reveal countdown advance; menus and other effects pause it.
s16 unk1dc
set to -1 by FieldEvent_Begin; not read by name
s16 queuedSound
a sound BattleFx_PlayQueuedSound plays; -1 for none
s32 transition
SCENE_TRANSITION(style, variant); 0x100 on entry.
s16 itemArgument
the inventory slot Field_UseItem receives
u16 busy
Set while a raised or touch event runs; FieldEvent_Begin then resets the effect counter.
struct MarkerSlot markers[10]
the map's markers (MARKER_MAX)
s16 tile
a tile's collision code, for Field_SearchTile
struct MapCell * previousTile
the cell before it
s8 castStarted
set once a cast has been announced
u8 unk200[0xab6]
ObjectTable_ResetForObject builds the leader's two-row placement table at its start; nothing else nam...
u8 encounterGroups[8]
encounter zone for each kind of ground
s16 start
the Start button: open the pause menu
s16 fallenOwners[9]
the characters who fell, from the active party
s32 encounterBias
randomized distance adjustment between battles
u8 unk1d0[8]
not named by TBS code
s32 fastForward
debug: skip timed event waits and actor messages
u16 unk1da
set to 0xffff by FieldEvent_Begin; not read by name
s16 nameMessage
first message of the menu's name window (0: none)
s16 battle
the enemy group of a random encounter
s32 speaker
the actor speaking; the leader at each event
s16 survivorCount
0 when the whole party fell
s32 walkingDistanceScale
scales movement for PP and status updates
struct ScenePlacement * tables[4]
The placement tables placed so far, recorded by Event_SpawnObjectTable.
s16 message
the next message, advanced as each window opens
struct ObjectRuntime * camera
the object the map view follows
s16 nameWidth
width of the name window (0: the default)
s32 sideWindow
the speaker's portrait window
s16 menu
open the main menu
s16 mode
MODE_WORLD_MAP (3) on the world map.
s16 revealCenterX
where Reveal was cast, in pixels
u16 unk1c4
not named by TBS code
s16 examine
the A button: examine what is ahead
struct MapCell * currentTile
the cell the leader last stepped onto
s32 messageWindow
the open message window, 0 for none
s16 item
an item to use, packed as Field_UseItem reads it
s16 action
The twelve requests: each nonzero value asks the field loop for one thing; Field_ClearRequests clears...
struct FieldActor * actors[66]
The actors by id: 0 to 7 the party's characters, 8 on the placed actors.
s16 fallenCount
the characters who fell this step
s32 encounterThreshold
encounter steps before a battle; 0x100000
s16 revealFrames
the frames Reveal has left
u8 unk1e4[0x10]
not named by TBS code
s16 blockedSteps
Frames the leader has pushed against something, counted by the player controls; touch events and push...
s32 transitionFrames
frames; 16 on entry and at each event
s32 walkingDistance
accumulated 16.16 distance awaiting an update
One cell of a map layer: its metatile and flags, its collision code and an attribute indexing the col...
A map marker placed as an actor: a chest or a Psynergy stone.
u8 unk05
cleared with the slot; not named by TBS code
u8 id
the trigger of its scene event
struct ObjectRuntime * object
u8 column
its 16-pixel cell
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
s16 action
The parameter its action script reads (a follow distance or an angle), or the player's frames to its ...
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
The entry table at the start of each scene overlay: its initialize function and the functions returni...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
An actor's animation object, seen for the flags and rotation that lay a wounded soldier in his bed.
s8 variant
copied to gGameState.sceneVariant; 2 sets flag 0x123
u16 reserved
0 in every row; not read
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
s16 value
the exit kind, stored in FieldWork's exit
s16 minZ
pixels, inclusive; minX -1 ends the table
s16 condition
-1 always, a flag | 0x1000 set, else the flag clear
s16 maxZ
pixels, exclusive
The integer types, TRUE, UNUSED and the fixed-address macros.