Whirlwind. More...
Go to the source code of this file.
Data Structures | |
| struct | WhirlwindOrbit |
| A FieldActor seen with the halfword at 0x64 unsigned and the one at 0x66 signed, as the bytes read them (FieldActor's own types change the code). More... | |
Macros | |
| #define | EFFECT_SPAWN_RESIDENT |
| The shared effect-spawning source, at its place in the ROM. | |
Enumerations | |
| enum | { WHIRLWIND_RADIAL_DIRECTIONS = 16 , WHIRLWIND_RADIAL_ANGLE_SHIFT = 12 , WHIRLWIND_ORBIT_PARTICLES = 16 , WHIRLWIND_ORBIT_RADIUS = 8 << 16 , WHIRLWIND_ORBIT_ANGLE_STEP = 0x800 , WHIRLWIND_ORBIT_FRAMES = 121 , WHIRLWIND_WANDER_FRAMES = 101 , WHIRLWIND_TARGET_SCALE_STEP = 0x80 , WHIRLWIND_TARGET_MIN_SCALE = 0x8000 , WHIRLWIND_TRAVEL_FRAMES = 10 } |
Functions | |
| void | FieldFx_UpdateParticleMotionAndScale (union FieldObject *object) |
| Per-frame update of a particle: moves by its velocity, slowing its x and z velocity a little, and changes its scale and spin. | |
| void | BattleFx_SpawnRadialParticleRing (struct MotionObject *origin) |
| Spawns 17 particles that spread from origin in a flat ring, their x velocity 1.5 times their z velocity, so the ring is wider than deep as the field is drawn. | |
| void | BattleFx_WanderAroundAnchor (union FieldObject *fieldObject) |
| Per-frame update: wanders away from the anchor, 2 to 3 pixels a frame, now and then turning sharply; after 101 frames it hands over to the common particle script. | |
| void | BattleFx_CircleAnchor (union FieldObject *fieldObject) |
| Per-frame update: circles the anchor at 8 pixels; after 121 frames it starts to wander (BattleFx_WanderAroundAnchor). | |
| void | BattleFx_ShrinkObjectScaleUntilHalf (union FieldObject *fieldObject) |
| Shrinks a scene-selected Whirlwind target each frame; below half size, moves it to the origin, stops it and removes the update. | |
| void | FieldFx_RunWhirlwindOnTarget (s32 unused) |
| Runs Whirlwind using the target already stored in the effect scene. | |
| void | FieldFx_RunWhirlwind (void) |
| An orb is carried from the caster to 4 pixels above the effect's position over 10 frames, growing from 0.25. | |
| #define EFFECT_SPAWN_RESIDENT |
The shared effect-spawning source, at its place in the ROM.
Definition at line 41 of file whirlwind.c.
| anonymous enum |
Definition at line 7 of file whirlwind.c.
| void FieldFx_UpdateParticleMotionAndScale | ( | union FieldObject * | object | ) |
Per-frame update of a particle: moves by its velocity, slowing its x and z velocity a little, and changes its scale and spin.
Assigned by BattleFx_SpawnRadialParticleRing for Carry's landing particles.
Definition at line 48 of file whirlwind.c.
Referenced by BattleFx_SpawnRadialParticleRing(), Djinn_ResolvePendingEvent(), and FieldFx_UpdateParticleMotionAndScale().
| void BattleFx_SpawnRadialParticleRing | ( | struct MotionObject * | origin | ) |
Spawns 17 particles that spread from origin in a flat ring, their x velocity 1.5 times their z velocity, so the ring is wider than deep as the field is drawn.
Carry's BattleFx_SteerLiftedTarget spawns it where it sets its load down.
Definition at line 65 of file whirlwind.c.
Referenced by BattleFx_SpawnRadialParticleRing(), BattleFx_SteerLiftedTarget(), and Djinn_ResolvePendingEvent().
| void BattleFx_WanderAroundAnchor | ( | union FieldObject * | fieldObject | ) |
Per-frame update: wanders away from the anchor, 2 to 3 pixels a frame, now and then turning sharply; after 101 frames it hands over to the common particle script.
BattleFx_CircleAnchor switches a particle to it. While it wanders, the engine's own motion lifts the particle (the velocity and gravity BattleFx_CircleAnchor gave it); this only moves it across the ground.
Definition at line 95 of file whirlwind.c.
Referenced by BattleFx_CircleAnchor(), BattleFx_WanderAroundAnchor(), and Djinn_ResolvePendingEvent().
| void BattleFx_CircleAnchor | ( | union FieldObject * | fieldObject | ) |
Per-frame update: circles the anchor at 8 pixels; after 121 frames it starts to wander (BattleFx_WanderAroundAnchor).
FieldFx_RunWhirlwind gives it to each of the 16 particles it spawns round the orb.
Definition at line 127 of file whirlwind.c.
Referenced by BattleFx_CircleAnchor(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwind().
| void BattleFx_ShrinkObjectScaleUntilHalf | ( | union FieldObject * | fieldObject | ) |
Shrinks a scene-selected Whirlwind target each frame; below half size, moves it to the origin, stops it and removes the update.
The scale falls by 1/512 each frame. From unit scale the strict lower bound takes 257 updates.
Definition at line 159 of file whirlwind.c.
Referenced by BattleFx_ShrinkObjectScaleUntilHalf(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwind().
| void FieldFx_RunWhirlwindOnTarget | ( | s32 | unused | ) |
Runs Whirlwind using the target already stored in the effect scene.
Abilities: Whirlwind, Gale (field kind 14), cast on a target. BattleFx_DispatchRequestKind passes an argument this adapter ignores; the shared runner reads scene->child instead.
Definition at line 176 of file whirlwind.c.
Referenced by BattleFx_DispatchRequestKind(), Djinn_ResolvePendingEvent(), and FieldFx_RunWhirlwindOnTarget().
| void FieldFx_RunWhirlwind | ( | void | ) |
An orb is carried from the caster to 4 pixels above the effect's position over 10 frames, growing from 0.25.
Abilities: Whirlwind, Gale (field kind 14).
Without scene->enabled the target shrinks, and 16 particles appear round the orb, one every 6 frames, and circle it.
Called by BattleFx_Run and FieldFx_RunWhirlwindOnTarget. Fades the palettes to an effect colour and back, and gives the target its shrinking update; the orb is released at the end, the particles finish on their own.
Definition at line 189 of file whirlwind.c.
Referenced by BattleFx_Run(), Djinn_ResolvePendingEvent(), FieldFx_RunWhirlwind(), and FieldFx_RunWhirlwindOnTarget().