1#ifndef ALCHEMY_FIELD_SCRIPT_H
2#define ALCHEMY_FIELD_SCRIPT_H
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
s32(*) ScriptCommand(struct ScriptInterpreter *)
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)
The prefix that command handlers read from a field object's 0x70-byte slot.
u8 padding58[5]
the object's own fields; not read by the commands
u8 padding55[2]
the object's own fields; not read by the commands
u8 repeatCount
SC_LOOP's count of jumps so far.
u8 spriteStorageKind
FieldActor's spriteStorageKind: SC_B54_ON sets 1, one sprite drawn, and SC_B54_OFF sets 0,...
s16 cursor
the word index of the next command in script
u8 padding06[0x4e]
the object's own fields; not read by the commands
u8 conditionResult
the last flag test, read by SC_IF and SC_IFNOT
const s32 * script
the running script; SC_END sets gScript_MainScript
s16 wait
Frames left of SC_WAIT (n - 1 when it starts); the update loops count it down, and Script_FindLabel c...
u8 refused
Frames in a row a solid object has refused the object's move (ScriptMotionObject.refused); SC_SYNC st...
The whole 0x70-byte slot as SC_SET, SC_ADD and SC_CMP see it: each field is one work value (enum Scri...
u32 velocityZ
SW_VELOCITY_Z.
s16 actionParameter
work value 0x23, what its action script reads
u32 sceneWord
Work value 0x17: the word FieldObject_Create zeroes and only scene code reads.
u32 sprite
work value 0x18: the sprite, or its list of four
u32 velocityY
SW_VELOCITY_Y.
u32 acceleration
SW_ACCEL.
u32 scaleX
SW_SCALE_X, 16.16 fixed point.
u8 steeringFlags
SW_STEERING.
u32 terrainHeight
SW_GROUND.
u32 velocityX
SW_VELOCITY_X, 16.16 fixed-point pixels per frame.
u32 linkedObject
work value 0x25, the object it follows or faces
u16 cursor
SW_CURSOR, compared as signed.
u32 scaleY
SW_SCALE_Y, and work value 0x0b.
u8 refused
ScriptInterpreter.refused; no work value.
u8 spriteStorageKind
work value 0x19: 0 hidden, 1 one, 2 a group
u8 byte5c
keeps the sprite's VRAM; no work value
u8 sceneByte63
work value 0x28, kept by scene code
u32 bounce
SW_BOUNCE, or a floating object's phase.
u32 hook
SW_HOOK, the routine run each frame.
u8 collisionFlags
SW_COLLISION.
u8 motionFlags
SW_MOTION, ActorMotionFlag bits.
u8 repeatCount
SW_REPEAT, SC_LOOP's count.
u8 arrivalAxis
SW_ARRIVAL.
s16 footprintSide
work value 0x24, or scene scratch
u8 padding22[2]
the layer and priority flags; no work value
u16 wait
SW_WAIT, compared as signed.
u16 facing
SW_FACING, and work values 2 and 4.
u8 frozen
ScriptMotionObject.frozen; no work value.
u32 targetX
SW_TARGET_X; 0x80000000 when unset.
u8 conditionResult
SW_RESULT, the last test; every compare sets it.
u32 scriptAddress
SW_SCRIPT; an add steps it by whole words.
u8 sceneByte62
work value 0x27, kept by scene code
u32 x
SW_X, 16.16 fixed-point pixels.
u16 radius
SW_RADIUS, in pixels; compared as signed.
The integer types, TRUE, UNUSED and the fixed-address macros.