1#ifndef ALCHEMY_OBJECT_RUNTIME_H
2#define ALCHEMY_OBJECT_RUNTIME_H
Declares nothing: an empty header kept for the files that include it.
struct ObjectTableSnapshot gObjectSnapshots
@ OBJECT_SNAPSHOT_CAPACITY
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)
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
void * callback
Not named by TBS code through this struct.
s32 targetZ
16.16 fixed-point pixels; 0x80000000 when unset
u8 unk5c[0x02]
Byte 0, when nonzero, keeps its sprite's VRAM cache entry while sprites are suspended or it is off sc...
s32 velocityZ
16.16 fixed-point pixels per frame
s32 terrainHeight
16.16 fixed-point pixels
u8 snapToTarget
nonzero lands it exactly on its target
s32 velocityX
16.16 fixed-point pixels per frame
u8 actionFlags
FieldActor.steeringFlags: bit 0 faces its motion.
u8 unk44[0x0c]
FieldActor's bounce and gravity, and a word FieldObject_Create zeroes.
u8 priorityFlags
FieldActor.priorityFlags: 1 for placed actors, 2 for footprints.
u8 arrivalAxis
the ARRIVAL_AXIS_* that decides arrival
u8 conditionResult
the object script's last flag test
u16 radius
collision radius in pixels
s32 targetY
16.16 fixed-point pixels; 0x80000000 when unset
s32 velocityY
16.16 fixed-point pixels per frame
u8 movementState
nonzero skips its script and motion (paused)
s16 footprintSide
the side of the player's next footprint (2 after a stop)
s32 z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
s32 targetX
16.16 fixed-point pixels; 0x80000000 when unset
u8 collisionFlags
FieldActor.collisionFlags: bit 0 solid, bit 1 the player pushes it, bits 2 to 4 for talk and Psynergy...
s32 * script
the object script it runs; null when the object is free
u8 unk18[0x08]
the x and y scales, FieldActor.scaleX and scaleY
u8 flags
FieldActor.motionFlags: 3 when created, 4 for a placed actor above the ground; zero is free flight in...
void * animation
its sprite, or its list of four, by animationKind
u16 wait
the object script's wait, in frames
s32 x
16.16 fixed-point pixels
s16 step
the script cursor, in words
s32 speedLimit
16.16 fixed-point pixels per frame
s32 y
16.16 fixed-point pixels
u8 animationKind
Low four bits: 0 no sprite, 1 one sprite, 2 a group of up to four.
struct ObjectRuntime * linkedObject
The object its action script follows or faces.
s16 action
The parameter its action script reads (a follow distance or an angle), or the player's frames to its ...
u8 terrainId
the map layer its ground height is read from
u8 unk6c[0x04]
The update hook (FieldActor.update), which the unused ObjectDispatch_SetUpdateValue sets as a word.
Actors kept across a battle or a saved scene, with parallel sprite state.
u8 animations[OBJECT_SNAPSHOT_CAPACITY]
each sprite's lastNo
struct ObjectRuntime actors[OBJECT_SNAPSHOT_CAPACITY]
copied by DMA
u8 slots[OBJECT_SNAPSHOT_CAPACITY]
actor numbers, or OBJECT_SNAPSHOT_EMPTY
u8 priorities[OBJECT_SNAPSHOT_CAPACITY]
both image and shadow priority
u8 spriteFlags[OBJECT_SNAPSHOT_CAPACITY]
restored through the dispatcher
The integer types, TRUE, UNUSED and the fixed-address macros.