1#ifndef ALCHEMY_FIELD_EFFECT_H
2#define ALCHEMY_FIELD_EFFECT_H
68#define SCRIPT_WAIT(frames) 0, (frames)
69#define SCRIPT_SET_POSITION(x, y, z) 2, (x), (y), (z)
70#define SCRIPT_REPEAT(count, label) 12, (count), (label)
71#define SCRIPT_DELETE 27
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
@ EFFECT_USE_PALETTE
options.palette, as its group child value
@ EFFECT_SCRIPT_MASK
Picks one of gEffectScripts; the object's mode is this plus 1.
@ EFFECT_USE_UPDATE
options.update
@ EFFECT_USE_START_SCALE
options.startScaleX and startScaleY
@ EFFECT_USE_ROTATION
options.rotation, as the sprite's
@ EFFECT_SCALE_TO_TARGET
Grows from the start scale, or full size, to the target scale over the script's repeat count.
@ EFFECT_USE_SPIN
options.spin
@ EFFECT_USE_TYPE
options.type, else object type 222
@ EFFECT_USE_PRIORITY
options.priority, as the sprite's priority
@ EFFECT_USE_SCRIPT
options.script, run in mode 1
void Effect_SpawnResident(s32 x, s32 y, s32 z, s32 velocityX, s32 velocityY, s32 velocityZ, u32 flags, const struct EffectOptions *options)
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
The options of a spawned field effect, each used when its EFFECT_USE_ flag (or EFFECT_SCALE_TO_TARGET...
s16 type
the object type to create; 222 without the flag
s32 targetScaleY
16.16 fixed point, 0x10000 full size
s32 targetScaleX
16.16 fixed point, 0x10000 full size
s32 palette
passed to ObjectGroup_SetChildValue
s32 startScaleY
16.16 fixed point, 0x10000 full size
s32 priority
the sprite's priority
u16 rotation
1/65536 turns
u16 spin
1/65536 turns per frame
const s32 * script
the object script, run in mode 1
s32 startScaleX
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
replaces the update hook
A field actor: a person or thing on the field with a position, motion toward a target,...
A field effect: a small object on the field that moves at its velocity and grows and spins at its rat...
void(*) update(union FieldObject *object)
Called each frame while the effect is live: the spawner sets BattleFx_UpdateObjectMotionScaleAndLinke...
u8 unk66[2]
FieldActor's work; not named by this view.
struct Vector3 velocity
Added to x, y and z each frame by the update hooks, in 16.16 fixed-point pixels per frame; FieldActor...
s32 z
16.16 fixed-point pixels
struct AnimationObject * sprite
the sprite spin turns
u8 priorityFlags
ActorPriorityFlag bits: the spawner clears ACTOR_PRIORITY_AUTOMATIC when EFFECT_USE_PRIORITY sets the...
u8 unk14[4]
FieldActor's terrainHeight; not named by this view.
u8 unk54
FieldActor's spriteStorageKind; not named by this view.
s32 scaleRateX
Added to scaleX each frame by the update hooks, in 16.16 fixed point a frame; zeroed by the spawner.
u8 unk38[0x0c]
FieldActor's targetX to targetZ; not named by this view.
u8 unk00[8]
FieldActor's script pointer, cursor and facing; not named by this view.
u8 unk24[0x0c]
FieldActor's velocityX to velocityZ; effects move by velocity instead.
u8 motionFlags
ActorMotionFlag bits; zeroed by the spawner.
s32 scaleY
16.16 fixed point, 0x10000 full size
s32 scaleX
16.16 fixed point, 0x10000 full size
u8 unk20[3]
FieldActor's radius and terrainId; not named by this view.
s32 y
16.16 fixed-point pixels
u8 collisionFlags
FieldActor's collisionFlags; not named by this view.
s32 x
16.16 fixed-point pixels
s32 scaleRateY
as scaleRateX, for scaleY
u8 unk5a[0x0a]
FieldActor's steeringFlags to riseEnabled; not named by this view.
s32 countdown
Frames until a scene's update hook releases the effect: 20 for Altin Peak's spray,...
u8 unk56[3]
FieldActor's unk56; not named by this view.
u16 spin
Added to the sprite's rotation each frame by the update hooks, in 1/65536 turns per frame; Imil's ris...
Three coordinates, x, y and z: a position, a velocity or a direction.
An object on the field, read as an actor or as an effect.
struct FieldEffect effect
Vector3, a three-coordinate vector.