frost.c
Frost.
games/tbs/src/object/psynergy_effects/frost.c on GitHub
Frost. Part of psynergy_effects.c, compiled only through it.
Functions
BattleFx_UpdateOrbitingParticleMain
void BattleFx_UpdateOrbitingParticleMain(union FieldObject *fieldObject)
Per-frame update Frost leaves on its target: sprite param 2 for 2 frames in every 8, otherwise 0, so the target glints.
Used by FieldFx_RunFrost.
BattleFx_UpdateOrbitingParticleFade
void BattleFx_UpdateOrbitingParticleFade(union FieldObject *fieldObject)
Per-frame update: shrinks by 1/16 a frame and is released at 1/16.
Used by FieldFx_UpdateSpiralParticle.
FieldFx_UpdateSpiralParticle
static inline void FieldFx_UpdateSpiralParticle(union FieldObject *fieldObject, s32 clockwise)
Both winding directions share the countdown and position update. timer starts at 60 (FieldFx_RunFrost). The particle circles its target point (targetX to targetZ) at a radius of 2 pixels and an angle of 1/32 turn for each frame left, so it closes in from 118 pixels.
Used by BattleFx_UpdateOrbitingParticleLeft, BattleFx_UpdateOrbitingParticleRight.
BattleFx_UpdateOrbitingParticleLeft
void BattleFx_UpdateOrbitingParticleLeft(union FieldObject *fieldObject)
Spirals anticlockwise at twice the frames left in pixels, then fades.
Used by FieldFx_RunFrost.
BattleFx_UpdateOrbitingParticleRight
void BattleFx_UpdateOrbitingParticleRight(union FieldObject *fieldObject)
Per-frame update: as BattleFx_UpdateOrbitingParticleLeft, clockwise.
Used by FieldFx_RunFrost.
FieldFx_RunFrostOnTarget
void FieldFx_RunFrostOnTarget(s32 unused)
Runs Frost cast on a target.
Abilities: Frost (field kind 6), cast on a target (scene->child).
With childMode the target is left as it is and only the particles appear.
Used by BattleFx_DispatchRequestKind.
FieldFx_RunFrost
void FieldFx_RunFrost(void)
16 particles spiral in on the effect's position and make the target flash 16 times; without childOption the target takes mode 2.
Abilities: Frost (field kind 6).
The target's part runs only when a scene event named the target (BattleFx_DispatchRequestKind clears enabled) and no scene set childMode: it flashes, takes animation 2 with SE_220 unless childOption is set, keeps glinting (BattleFx_UpdateOrbitingParticleMain) and runs the scene's Frost event. Called by BattleFx_Run and FieldFx_RunFrostOnTarget.
Used by BattleFx_Run, FieldFx_RunFrostOnTarget.