djinn_heal.c
Djinn healing.
games/tbs/src/effect/parts/djinn_heal.c on GitHub
Djinn healing. Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunDjinnHeal
UNUSED void BattleFx_RunDjinnHeal(struct BattleEffectArgument *effect)
A small Mercury Djinni healing the party: the user glows while motes swirl round a point that rises from the user up to above the first target (frames 30 to 69); the Djinni appears there on frame 83. Then, for each target in turn, 8 frames apart, sparkles spiral in on it with the recovery sound and a glow, while the Djinni sways and finally flies off. No effect table entry points here, and nothing calls it.
PARTICLES 0 to 63 hold the swirl's motes (the first 32 drawn), then 0 to 511 the healing sparkles, 64 for each target; both are offsets from the point the transform is centred on, in 16.16. work->sheet holds the Djinni, the battle sheet slot first the motes and then the sparkle dots.
Camera_ApplyPhasedDelta
void Camera_ApplyPhasedDelta(void)
Turns the battle camera by cameraDelta. The effect sets cameraPhase to 1 after each of its frames; the callback then turns the whole delta once, and half of it on the frames in between, so the turn stays smooth whatever the effect's frame rate.
Runs each frame as a scheduler callback added by BattleFx_RunFire (fire.c) and BattleFx_RunFroth (vortices.c), which remove it before they return. Changes the camera slot's yaw and work->cameraPhase.
Used by BattleFx_RunFire, BattleFx_RunFroth.
Macros, without a comment: DJINN_HEAL_SWIRL_FRAMES, DJINN_HEAL_SWIRL_MOTES.