Skip to Content
The Alchemy Project

src/field/script_commands_mars.c

A Mars Djinni joining the party, the fast shrink that ends a spin, and a Venus Djinni's motes and particles. More…

Included by script_commands.c.

Functions

NameDescription
voidfdDjinnRunMarsJoinEffect (Sint32 djinniId)A Mars Djinni joins the party: it turns to the camera, bounces three times, spins ever faster and shrinks away in a fountain of sparks (fdEffectUpdateMarsSpark).
voidfdEffectShrinkActorAndDestroyFast (void *object)Spins an actor 1/8 turn and shrinks it by 1/64 a tick, releasing it once its scale falls below 3/16: 53 ticks from full size.
voidfdEffectUpdateDescendingOrbitActor (ACTOR *mote)Per-tick update of a Venus Djinni's falling motes: each circles the leader on a shrinking spiral (radius timer * 0.4 pixels) while it sinks a pixel a tick, and is released 20 pixels above the leader's feet.
voidfdEffectUpdateRadialSpread (FIELD_PARTICLE *effect)Field effect sprite callback of a Venus Djinni's particles: each starts on screen at a random point 10 to 20 pixels round the leader and flies 120 pixels up the screen, over and over, until it is set to VENUS_PARTICLE_LAST_RISE and freed once it arrives.

Description

A Mars Djinni joining the party, the fast shrink that ends a spin, and a Venus Djinni's motes and particles. Part of script_commands.c.

Functions in detail

fdDjinnRunMarsJoinEffect

void fdDjinnRunMarsJoinEffect(Sint32 djinniId)

A Mars Djinni joins the party: it turns to the camera, bounces three times, spins ever faster and shrinks away in a fountain of sparks (fdEffectUpdateMarsSpark). The leader turns to the camera and raises its arms, the sparks swarm it while it pulses for 100 ticks, and the sparks vanish.

References fdActorFaceDirectionById(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSelectAnimationStub(), fdCameraWorldToScreen(), fdEffectAdvanceAngleWithRamp(), fdEffectInitSlots(), fdEffectPulseActorScale(), fdEffectReleaseSlots(), fdEffectShrinkActorAndDestroySlow(), fdEffectUpdateMarsSpark(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdSpriteSetAnimationColorModesStub(), MainRoutineStateWork, mnShopRestoreFieldPaletteStub(), mnShopSaveAndTintFieldPaletteStub(), Sint32, syRandom(), sySoundPlayStub() and sySynch().

Referenced by fdDjinnJoinParty().

Definition at line 9 of file script_commands_mars.c.

fdEffectShrinkActorAndDestroyFast

void fdEffectShrinkActorAndDestroyFast(void *object)

Spins an actor 1/8 turn and shrinks it by 1/64 a tick, releasing it once its scale falls below 3/16: 53 ticks from full size.

References fdActorReleaseStub() and Sint32.

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 112 of file script_commands_mars.c.

fdEffectUpdateDescendingOrbitActor

void fdEffectUpdateDescendingOrbitActor(ACTOR *mote)

Per-tick update of a Venus Djinni's falling motes: each circles the leader on a shrinking spiral (radius timer * 0.4 pixels) while it sinks a pixel a tick, and is released 20 pixels above the leader's feet. Set by fdDjinnRunVenusJoinEffect, the Venus Djinni's effect.

References fdActorGetById(), fdActorReleaseStub(), MainRoutineStateWork, Sint32 and syVectorAddPolarOffset().

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 135 of file script_commands_mars.c.

fdEffectUpdateRadialSpread

void fdEffectUpdateRadialSpread(FIELD_PARTICLE *effect)

Field effect sprite callback of a Venus Djinni's particles: each starts on screen at a random point 10 to 20 pixels round the leader and flies 120 pixels up the screen, over and over, until it is set to VENUS_PARTICLE_LAST_RISE and freed once it arrives.

References fdActorGetById(), fdCameraWorldToScreen(), fdParticleFree(), fdParticleHasPendingTarget(), FrameCount, MainRoutineStateWork, Sint32, syRandom(), sySoundPlayStub() and syVectorAddPolarOffset().

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 164 of file script_commands_mars.c.