Skip to Content
The Alchemy Project

src/field/script_commands_frost.c

Frost: snowflakes spiral in on the target, and a puddle freezes into an ice pillar. More…

Included by script_commands.c.

Macros

NameDescription
#defineFROST_SNOWFLAKES 16spiralling in on the Psynergy's position
#defineFROST_SPIRAL_TICKS 60each snowflake's spiral
#defineFROST_FLASHES 16the target's white flashes

Functions

NameDescription
DEFINE_FROST_GLINT(, fdActorSetSpriteColorModeStub) // Per-tick update: shrinks by 1/16 a tick and is released at 1/16. voidfdEffectUpdateOrbitingParticleFade (ACTOR *particle)Frost's glint on its target.
static inline voidfdEffectUpdateSpiralParticle (ACTOR *actor, Sint32 clockwise)Both winding directions share the countdown and position update. timer starts at FROST_SPIRAL_TICKS (fdPsynergyFrost).
voidfdEffectUpdateOrbitingParticleLeft (ACTOR *actor)Per-tick update of a snowflake: spirals anticlockwise in to the target point (targetX to targetZ), at twice the ticks left in pixels, a 32nd of a turn further round for each, then fades.
voidfdEffectUpdateOrbitingParticleRight (ACTOR *actor)Per-tick update: as fdEffectUpdateOrbitingParticleLeft, clockwise.
voidfdPsynergyFrostOnTarget (Sint32 unused)Runs Frost cast on a target.
voidfdPsynergyFrost (void)FROST_SNOWFLAKES snowflakes spiral in on the Psynergy's position and make the target flash FROST_FLASHES times; without sceneVariant the target freezes.

Description

Frost: snowflakes spiral in on the target, and a puddle freezes into an ice pillar. Part of script_commands.c.

Macros in detail

FROST_SNOWFLAKES

#define FROST_SNOWFLAKES 16

spiralling in on the Psynergy's position

Referenced by fdPsynergyFrost().

Definition at line 7 of file script_commands_frost.c.

FROST_SPIRAL_TICKS

#define FROST_SPIRAL_TICKS 60

each snowflake's spiral

Referenced by fdPsynergyFrost().

Definition at line 8 of file script_commands_frost.c.

FROST_FLASHES

#define FROST_FLASHES 16

the target's white flashes

Referenced by fdPsynergyFrost().

Definition at line 9 of file script_commands_frost.c.

Functions in detail

fdEffectUpdateOrbitingParticleFade

DEFINE_FROST_GLINT(, fdActorSetSpriteColorModeStub) // Per-tick update: shrinks by 1/16 a tick and is released at 1/16. void fdEffectUpdateOrbitingParticleFade(ACTOR *particle)

Frost's glint on its target.

References fdActorSetSpriteColorModeStub(), fdActorStartScriptStub(), FieldEffectSharedParticleScript and void().

Referenced by fdEffectUpdateSpiralParticle().

Definition at line 12 of file script_commands_frost.c.

fdEffectUpdateSpiralParticle

static inline void fdEffectUpdateSpiralParticle(ACTOR *actor, Sint32 clockwise)

Both winding directions share the countdown and position update. timer starts at FROST_SPIRAL_TICKS (fdPsynergyFrost).

References fdEffectUpdateOrbitingParticleFade(), Sint32 and syVectorAddPolarOffset().

Referenced by fdEffectUpdateOrbitingParticleLeft() and fdEffectUpdateOrbitingParticleRight().

Definition at line 31 of file script_commands_frost.c.

fdEffectUpdateOrbitingParticleLeft

void fdEffectUpdateOrbitingParticleLeft(ACTOR *actor)

Per-tick update of a snowflake: spirals anticlockwise in to the target point (targetX to targetZ), at twice the ticks left in pixels, a 32nd of a turn further round for each, then fades.

References fdEffectUpdateSpiralParticle().

Referenced by fdPsynergyFrost().

Definition at line 69 of file script_commands_frost.c.

fdEffectUpdateOrbitingParticleRight

void fdEffectUpdateOrbitingParticleRight(ACTOR *actor)

Per-tick update: as fdEffectUpdateOrbitingParticleLeft, clockwise.

References fdEffectUpdateSpiralParticle().

Referenced by fdPsynergyFrost().

Definition at line 75 of file script_commands_frost.c.

fdPsynergyFrostOnTarget

void fdPsynergyFrostOnTarget(Sint32 unused)

Runs Frost cast on a target.

References fdPsynergyFrost() and Sint32.

Referenced by fdPsynergyDispatch().

Definition at line 81 of file script_commands_frost.c.

fdPsynergyFrost

void fdPsynergyFrost(void)

FROST_SNOWFLAKES snowflakes spiral in on the Psynergy's position and make the target flash FROST_FLASHES times; without sceneVariant the target freezes.

References fdActorSelectAnimationStub(), fdActorSetSpriteColorModeStub(), fdActorSpawn(), fdEffectUpdateFrostGlint(), fdEffectUpdateOrbitingParticleLeft(), fdEffectUpdateOrbitingParticleRight(), fdFindPsynergyCue(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdRunPsynergyScript(), MainRoutineStateWork, Sint32, syRandom(), sySoundPlayStub(), sySynch() and syVectorAddPolarOffset().

Referenced by fdPsynergyFrostOnTarget() and fdPsynergyRun().

Definition at line 100 of file script_commands_frost.c.