Effect slots: the particles Psynergy effects move and draw. More...
Go to the source code of this file.
Functions | |
| void | EffectSlot_Update (struct EffectSlot *effect) |
| Updates one effect slot: counts its age, runs its callback (after any delay), moves it and draws it. | |
| void | BattleFx_DrawScaledObject (struct EffectSlot *object) |
| Draws an effect slot's sprite at its screen position and scale, when it is near the screen. | |
| void | EffectSlot_UpdateMotion (struct EffectSlot *effect) |
| Moves an effect slot toward its target, turning at most maxTurnStep a frame when limitTurnStep is set and speeding up by acceleration to maxSpeed. | |
| u32 | EffectSlot_HasPendingTarget (struct EffectSlot *effect) |
| Returns nonzero while an effect slot that stops at its target still has one (it has not arrived), 0 once it has arrived or when it never stops. | |
| void | EffectSlot_SetPosition (struct EffectSlot *effect, s32 x, s32 z) |
| Places an effect slot at (x, z), at rest with no target. | |
| void | EffectSlot_SetObjectMode (struct EffectSlot *effect, s32 mode) |
| Sets the animation of an effect slot's sprite. | |
| void | EffectSlot_SetCallback (struct EffectSlot *effect, EffectCallback callback) |
| Gives an effect slot its per-frame callback, starting at state 0. | |
| void | EffectSlot_Initialize (struct EffectSlot *effect, s32 kind, s32 x, s32 z) |
| Fills an effect slot with a new sprite of kind at (x, z): stopping at its target, top speed 2, acceleration and scale 1, drawn, animation 1. | |
| void | BattleFx_ClearOwnedSlot (struct EffectSlot *slot) |
| Frees an effect slot and its sprite. | |
Effect slots: the particles Psynergy effects move and draw.
Part of psynergy_effects.c, compiled only through it.
Definition in file effect_slot.c.
| void EffectSlot_Update | ( | struct EffectSlot * | effect | ) |
Updates one effect slot: counts its age, runs its callback (after any delay), moves it and draws it.
Definition at line 9 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Update(), and FieldFx_UpdateSceneSlots().
| void BattleFx_DrawScaledObject | ( | struct EffectSlot * | object | ) |
Draws an effect slot's sprite at its screen position and scale, when it is near the screen.
With flag 4 the slot's z also lifts it (0x1fc pixels less z).
Definition at line 29 of file effect_slot.c.
Referenced by BattleFx_DrawScaledObject(), Djinn_ResolvePendingEvent(), and EffectSlot_Update().
| void EffectSlot_UpdateMotion | ( | struct EffectSlot * | effect | ) |
Moves an effect slot toward its target, turning at most maxTurnStep a frame when limitTurnStep is set and speeding up by acceleration to maxSpeed.
A slot that stops at its target lands on it once within 8 pixels.
Definition at line 53 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Update(), and EffectSlot_UpdateMotion().
| u32 EffectSlot_HasPendingTarget | ( | struct EffectSlot * | effect | ) |
Returns nonzero while an effect slot that stops at its target still has one (it has not arrived), 0 once it has arrived or when it never stops.
Definition at line 108 of file effect_slot.c.
Referenced by AltmillerCave_UpdateWallFragment(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_UpdateOrbitAndReturn(), BattleFx_UpdateRadialBurst(), BattleFx_UpdateRadialCamera(), BattleFx_UpdateRadialLaunch(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), Djinn_ResolvePendingEvent(), and EffectSlot_HasPendingTarget().
| void EffectSlot_SetPosition | ( | struct EffectSlot * | effect, |
| s32 | x, | ||
| s32 | z ) |
Places an effect slot at (x, z), at rest with no target.
Definition at line 120 of file effect_slot.c.
Referenced by Djinn_ResolvePendingEvent(), EffectSlot_Initialize(), EffectSlot_SetPosition(), and EffectSlot_UpdateMotion().
| void EffectSlot_SetObjectMode | ( | struct EffectSlot * | effect, |
| s32 | mode ) |
Sets the animation of an effect slot's sprite.
Definition at line 129 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_Initialize(), EffectSlot_SetObjectMode(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void EffectSlot_SetCallback | ( | struct EffectSlot * | effect, |
| EffectCallback | callback ) |
Gives an effect slot its per-frame callback, starting at state 0.
Definition at line 134 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleEffect_RunFallbackObjectTransition(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_SetCallback(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void EffectSlot_Initialize | ( | struct EffectSlot * | effect, |
| s32 | kind, | ||
| s32 | x, | ||
| s32 | z ) |
Fills an effect slot with a new sprite of kind at (x, z): stopping at its target, top speed 2, acceleration and scale 1, drawn, animation 1.
Definition at line 144 of file effect_slot.c.
Referenced by AltmillerCave_ReleaseWallBurst(), BattleEffect_RunFallbackObjectTransition(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), Djinn_ResolvePendingEvent(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectSlot_Initialize(), FieldFx_RunForce(), and FieldFx_RunRetreat().
| void BattleFx_ClearOwnedSlot | ( | struct EffectSlot * | slot | ) |
Frees an effect slot and its sprite.
Definition at line 180 of file effect_slot.c.
Referenced by AltmillerCave_UpdateWallFragment(), BattleEffect_CleanupSceneObjects(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_ClearActiveSlotsAndScheduleUpdates(), BattleFx_ClearOwnedSlot(), BattleFx_RunAngledApproachPhases(), BattleFx_UpdateOrbitAndReturn(), BattleFx_UpdateRadialBurst(), BattleFx_UpdateRadialCamera(), BattleFx_UpdateRadialLaunch(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), and Djinn_ResolvePendingEvent().