src/field/script_commands_jupiter.c
A Jupiter Djinni joining the party, and per-tick updates the field effects share: a pulse, a quickening spin, a slow shrink, and a Mars Djinni's sparks. More…
Included by script_commands.c.
Functions
| Name | Description | |
|---|---|---|
void | fdDjinnRunJupiterJoinEffect (Sint32 djinniId) | A Jupiter Djinni joins the party: it bounces three times, spins, leaps out of sight and bursts into PSYNERGY_EFFECT_SLOT_COUNT lights, which circle and close in on the leader, who turns to the camera and raises its arms (ANIM_LEADER_ARMS_RAISED). |
void | fdEffectPulseActorScale (ACTOR *actor) | Per-tick update: makes an actor pulse, switching its scale between the two values of FieldEffectPulseScales every 4 ticks. |
void | fdEffectAdvanceAngleWithRamp (ACTOR *actor) | Per-tick update: spins an actor ever faster, from 1/16 turn a tick up to just over 1/8 (DEGtoANG(45) + 64), 80 more each tick for 52 ticks. |
void | fdEffectShrinkActorAndDestroySlow (void *object) | Per-tick update: spins an actor 1/8 turn and shrinks it by 7/1024 a tick, releasing it once its scale falls below 3/16, 119 ticks from full size. |
void | fdEffectUpdateMarsSpark (FIELD_PARTICLE *effect) | Field effect sprite callback of a Mars Djinni's sparks (enum MARS_SPARK_STATE): the spark flies 120 pixels up the screen (give or take 3/32 turn) from its origin at up to 5 pixels a tick and starts over, until it stops where it arrives, hidden; 40 ticks later it swarms to points within 4 pixels of one 20 pixels over the leader, until it is freed once it arrives. |
Description
A Jupiter Djinni joining the party, and per-tick updates the field effects
share: a pulse, a quickening spin, a slow shrink, and a Mars Djinni's sparks.
Part of script_commands.c.
Functions in detail
fdDjinnRunJupiterJoinEffect
void fdDjinnRunJupiterJoinEffect(Sint32 djinniId)
A Jupiter Djinni joins the party: it bounces three times, spins, leaps out of
sight and bursts into PSYNERGY_EFFECT_SLOT_COUNT lights, which circle and
close in on the leader, who turns to the camera and raises its arms
(ANIM_LEADER_ARMS_RAISED).
References fdActorFaceDirectionById(), fdActorGetById(), fdActorJump(), fdActorReleaseStub(), fdActorRunRepeatedMotion(), fdActorSelectAnimationStub(), fdCameraWorldToScreen(), fdDjinnAdvanceSpinAngle(), fdEffectInitSlots(), fdEffectReleaseSlots(), fdEffectRunAngledApproachPhases(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdSpriteSetAnimationColorModesStub(), MainRoutineStateWork, mnShopRestoreFieldPaletteStub(), mnShopSaveAndTintFieldPaletteStub(), Sint32, syRandom(), sySoundPlayStub() and sySynch().
Referenced by fdDjinnJoinParty().
Definition at line 9 of file script_commands_jupiter.c.
fdEffectPulseActorScale
void fdEffectPulseActorScale(ACTOR *actor)
Per-tick update: makes an actor pulse, switching its scale between the two
values of FieldEffectPulseScales every 4 ticks.
References FieldEffectPulseScales and FrameCount.
Referenced by fdDjinnRunMarsJoinEffect().
Definition at line 81 of file script_commands_jupiter.c.
fdEffectAdvanceAngleWithRamp
void fdEffectAdvanceAngleWithRamp(ACTOR *actor)
Per-tick update: spins an actor ever faster, from 1/16 turn a tick up to just
over 1/8 (DEGtoANG(45) + 64), 80 more each tick for 52 ticks.
Referenced by fdDjinnRunMarsJoinEffect().
Definition at line 93 of file script_commands_jupiter.c.
fdEffectShrinkActorAndDestroySlow
void fdEffectShrinkActorAndDestroySlow(void *object)
Per-tick update: spins an actor 1/8 turn and shrinks it by 7/1024 a tick, releasing it once its scale falls below 3/16, 119 ticks from full size. The Mars Djinni's joining shrinks the Djinni away with it.
References fdActorReleaseStub() and Sint32.
Referenced by fdDjinnRunMarsJoinEffect().
Definition at line 108 of file script_commands_jupiter.c.
fdEffectUpdateMarsSpark
void fdEffectUpdateMarsSpark(FIELD_PARTICLE *effect)
Field effect sprite callback of a Mars Djinni's sparks (enum
MARS_SPARK_STATE): the spark flies 120 pixels up the screen (give or take
3/32 turn) from its origin at up to 5 pixels a tick and starts over, until it
stops where it arrives, hidden; 40 ticks later it swarms to points within 4
pixels of one 20 pixels over the leader, until it is freed once it arrives.
References fdActorGetById(), fdCameraWorldToScreen(), fdParticleFree(), fdParticleHasPendingTarget(), FrameCount, MainRoutineStateWork, Sint32, syRandom(), sySoundPlayStub() and syVectorAddPolarOffset().
Referenced by fdDjinnRunMarsJoinEffect().
Definition at line 132 of file script_commands_jupiter.c.