1#ifndef ALCHEMY_MOTION_OBJECT_H
2#define ALCHEMY_MOTION_OBJECT_H
A battle's objects and sprites, each unit's command and action record, and the spoils.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
Public interfaces to the engine's code banks.
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)
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
u8 unk00[0x06]
ScriptMotionObject's script and scriptCursor.
s32 verticalMotionPhase
With motionFlags bit 1, the 16.16 share of velocityY kept on a bounce; with bit 2,...
s32 velocityZ
16.16 fixed-point pixels per frame
s32 scaleX
16.16 fixed point, 0x10000 full size
u8 unk4c[0x04]
FieldActor's riseBaseY.
s32 speedLimit
16.16 fixed-point pixels per frame
s32 velocityX
16.16 fixed-point pixels per frame
s32 z
16.16 fixed-point pixels
u8 snapToTarget
nonzero: lands exactly on the target, else brakes in
u8 unk14[0x04]
FieldActor's terrainHeight, the ground's y.
u8 unk56[0x02]
ScriptMotionObject's arrivalAxis and unk57.
u8 unk22[0x02]
FieldActor's terrainId and priorityFlags.
void(*) update(union FieldObject *object)
run first each frame
s32 targetY
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
u16 height
half the sprite's box height; FieldActor's radius
u8 unk59
FieldActor's collisionFlags; battle units set 3.
s32 velocityY
16.16 fixed-point pixels per frame
u8 unk5b[0x11]
FieldActor's paused, timer, linkedObject and the bytes between; not named by TBS code through this vi...
void * records
one sprite, or a table of up to four (recordStorageKind)
s32 targetZ
16.16 fixed-point pixels
u8 motionFlags
bits: 4 no terrain slowdown | 3 bigger float | 2 floats | 1 falls | 0 follows terrain
u8 recordStorageKind
bits: 3..0 RECORDS_NONE, RECORDS_SINGLE or RECORDS_TABLE
s32 acceleration
Horizontal speed gained each frame towards the target, or lost braking without one,...
s32 scaleY
16.16 fixed point, 0x10000 full size
s32 x
16.16 fixed-point pixels
s32 targetX
16.16 fixed-point pixels; 0x80000000 for no target
s32 verticalMotionStrength
Gravity: taken from velocityY each frame above the ground with motionFlags bit 1, in 16....
u8 autoFaceMotion
bit 0 turns the object to face where it moves
A sprite of an animation record, as battle objects set its palette and drawing priority.
The integer types, TRUE, UNUSED and the fixed-address macros.
An object on the field, read as an actor or as an effect.