Skip to Content
The Alchemy Project

src/field/script_commands_mars.c

A Mars Djinni joining the party, and the first of the Venus Djinni's functions, linked after it: its shrinking, its falling motes and its rising 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 24 sparks (fdEffectUpdateMarsSpark).
DEFINE_SHRINK_AND_DESTROY(fdEffectShrinkActorAndDestroyFast , -(toFIXED(1) / 64))Spins an actor an eighth of a turn and shrinks it by 1/64 of its size a tick, then releases it: 53 ticks from full size.
voidfdEffectUpdateDescendingOrbitActor (ACTOR *mote)Per-tick update of a Venus Djinni's falling motes: each circles the leader a 32nd of a turn a tick on a shrinking spiral (0.4 pixels of radius for each tick left) 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, and the first of the Venus Djinni's functions, linked after it: its shrinking, its falling motes and its rising 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 24 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 12 of file script_commands_mars.c.

fdEffectShrinkActorAndDestroyFast

DEFINE_SHRINK_AND_DESTROY(fdEffectShrinkActorAndDestroyFast, -(toFIXED(1) / 64))

Spins an actor an eighth of a turn and shrinks it by 1/64 of its size a tick, then releases it: 53 ticks from full size. The Venus Djinni's joining shrinks the Djinni away with it.

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 114 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 a 32nd of a turn a tick on a shrinking spiral (0.4 pixels of radius for each tick left) while it sinks a pixel a tick, and is released 20 pixels above the leader's feet.

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

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 120 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, state, syRandom(), sySoundPlayStub() and syVectorAddPolarOffset().

Referenced by fdDjinnRunVenusJoinEffect().

Definition at line 149 of file script_commands_mars.c.