Skip to Content
The Alchemy Project

src/field/field_psynergy_retreat.c

Included by field_psynergy.c.

Functions

NameDescription
voidfdEffectUpdateSpinAngle (ACTOR *actor)Per-tick update: spins by FACING_STEP + spinRampTicks * 80 a tick, speeding up (spinRampTicks counts up) until spinRampTicks * 80 reaches FACING_STEP: from 1/16 turn a tick to just over 1/8 in 52 ticks, as fdEffectAdvanceAngleWithRamp.
voidfdEffectUpdateRetreatCaster (ACTOR *actor)Per-tick update: spins 1/8 turn a tick as it shrinks, rising a pixel a tick; its sprite is hidden once its scale falls below 3/16.
voidfdRetreatUpdateSpark (FIELD_PARTICLE *effect)Field effect sprite callback: a spark flies 120 pixels from the caster's place on screen (8 pixels lower) in a direction within 1/8 turn of up the screen, at up to 5 pixels a tick, and starts again from the caster on arrival until it takes its last flight.
voidfdPsynergyRetreat (void)Retreat ("Return to the dungeon's entrance."): the caster turns to face the player, raises their arms, spins faster and faster and shrinks away while sparks fly up the screen, one a tick.

Functions in detail

fdEffectUpdateSpinAngle

void fdEffectUpdateSpinAngle(ACTOR *actor)

Per-tick update: spins by FACING_STEP + spinRampTicks * 80 a tick, speeding up (spinRampTicks counts up) until spinRampTicks * 80 reaches FACING_STEP: from 1/16 turn a tick to just over 1/8 in 52 ticks, as fdEffectAdvanceAngleWithRamp.

Referenced by fdPsynergyRetreat().

Definition at line 7 of file field_psynergy_retreat.c.

fdEffectUpdateRetreatCaster

void fdEffectUpdateRetreatCaster(ACTOR *actor)

Per-tick update: spins 1/8 turn a tick as it shrinks, rising a pixel a tick; its sprite is hidden once its scale falls below 3/16.

References Sint32.

Referenced by fdPsynergyRetreat().

Definition at line 19 of file field_psynergy_retreat.c.

fdRetreatUpdateSpark

void fdRetreatUpdateSpark(FIELD_PARTICLE *effect)

Field effect sprite callback: a spark flies 120 pixels from the caster's place on screen (8 pixels lower) in a direction within 1/8 turn of up the screen, at up to 5 pixels a tick, and starts again from the caster on arrival until it takes its last flight.

References fdCameraWorldToScreen(), fdParticleFree(), fdParticleHasPendingTarget(), Sint32, syRandom(), sySoundPlayStub(), syVectorAddPolarOffset() and TickCount.

Referenced by fdPsynergyRetreat().

Definition at line 36 of file field_psynergy_retreat.c.

fdPsynergyRetreat

void fdPsynergyRetreat(void)

Retreat ("Return to the dungeon's entrance."): the caster turns to face the player, raises their arms, spins faster and faster and shrinks away while sparks fly up the screen, one a tick.

References fdActorCycleSpriteColors(), fdActorFaceDirectionById(), fdActorSelectAnimationStub(), fdActorSetSpriteColorModeStub(), fdActorSetSpriteFlagsStub(), fdCameraMoveWithinMapBounds(), fdCameraWorldToScreen(), fdEffectUpdateRetreatCaster(), fdEffectUpdateSpinAngle(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdRetreatUpdateSpark(), fdScriptStart(), fdSpriteSetAnimationColorModesStub(), syRandom(), sySoundPlayStub() and sySynch().

Referenced by fdPsynergyDispatch() and fdPsynergyRun().

Definition at line 89 of file field_psynergy_retreat.c.