Skip to Content
The Alchemy Project

src/scene/shared/field_effect_spawn.c

Twenty-four scenes, and the main image's field Psynergy (script_commands_whirlwind.c, with EFFECT_SPAWN_RESIDENT): fdEffectSpawn, which places a small effect moving at a velocity, its script one of FieldEffectDurationScripts and its options chosen by the EFFECT_USE_ flags.

Twenty-four scenes, and the main image's field Psynergy (script_commands_whirlwind.c, with EFFECT_SPAWN_RESIDENT): fdEffectSpawn, which places a small effect moving at a velocity, its script one of FieldEffectDurationScripts and its options chosen by the EFFECT_USE_ flags.

Included by script_commands_whirlwind.c, babi_lighthouse.c, crossbone_isle.c, crossbone_isle_stepping_stones.c, fuchin_temple.c, goma_cave_entrance.c, goma_cave_stream.c, gondowan_cave.c, lacquer_rooms_b.c, lamakan_desert.c, lunpa.c, mercury_lighthouse.c, mercury_lighthouse_aerie.c, mercury_lighthouse_entrance.c, mogall_forest.c, sol_sanctum_elemental_star_room.c, suhalla_desert.c, tree_rooms.c, tunnel_ruins.c, vale_cave.c, vault.c, vault_revisit.c, venus_lighthouse.c, venus_lighthouse_aerie.c and xian.c.

Macros

NameDescription
#defineEFFECT_SPAWN (name, create, selectAnimation, startScript)Defines name, which places a field effect at (x, y, z) moving at the velocity given, with its duration script, and applies the options that flags asks for; create, selectAnimation and startScript are the actor functions it reaches them through, called directly in an overlay and through stub calls in the main image.

Functions

NameDescription
voidscFieldEffectUpdateMotionScaleAndSpin (ACTOR *actor)An effect's update function: move by its velocity, and grow and spin at its rates.
static inline voidscFieldEffectInitMotion (FIELD_EFFECT *effect, SPR *sprite, ACTOR *leader, Sint32 velocityX, Sint32 velocityY, Sint32 velocityZ)Sets the effect moving at its velocity, drawn at the leader's sprite priority, with no growth or spin until the options give them.

Variables

NameDescription
extern const Sint32 *FieldEffectDurationScripts []The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION.

Description

Twenty-four scenes, and the main image's field Psynergy (script_commands_whirlwind.c, with EFFECT_SPAWN_RESIDENT): fdEffectSpawn, which places a small effect moving at a velocity, its script one of FieldEffectDurationScripts and its options chosen by the EFFECT_USE_ flags.

Macros in detail

EFFECT_SPAWN

#define EFFECT_SPAWN(name, create, selectAnimation, startScript)

Defines name, which places a field effect at (x, y, z) moving at the velocity given, with its duration script, and applies the options that flags asks for; create, selectAnimation and startScript are the actor functions it reaches them through, called directly in an overlay and through stub calls in the main image.

Definition at line 47 of file field_effect_spawn.c.

Functions in detail

scFieldEffectUpdateMotionScaleAndSpin

void scFieldEffectUpdateMotionScaleAndSpin(ACTOR *actor)

An effect's update function: move by its velocity, and grow and spin at its rates.

Definition at line 11 of file field_effect_spawn.c.

scFieldEffectInitMotion

static inline void scFieldEffectInitMotion(FIELD_EFFECT *effect, SPR *sprite, ACTOR *leader, Sint32 velocityX, Sint32 velocityY, Sint32 velocityZ)

Sets the effect moving at its velocity, drawn at the leader's sprite priority, with no growth or spin until the options give them.

References Sint32.

Definition at line 26 of file field_effect_spawn.c.