Skip to Content
The Alchemy Project

src/field/script_commands_ply.c

Ply: swaying particles, shrinking orbits and sparks. More…

Included by script_commands.c.

Macros

NameDescription
#definePLY_FLASH_STEPS 30Ply's flashing figure: its steps, of 2 ticks each.

Functions

NameDescription
voidfdEffectSwayParticle (ACTOR *actor)Per-tick update: sways 4 pixels either side of targetX, once every 128 ticks.
voidfdEffectUpdateShrinkingOrbitActor (ACTOR *particle)The particle circles 10 pixels above the scene's position, its radius in pixels the ticks it has left; at 0 it runs the shared particle script.
voidfdEffectRunSparkEmitter (ACTOR *emitter)Per-tick update: sways 6 pixels either side (a 64-tick cycle) 16 pixels above the Psynergy's position, and every 3 ticks sheds a spark that sways as it slowly falls.
voidfdPsynergyPlyOnTarget (void)Ply cast on a target: runs Ply, then stops the caster's hook.
voidfdPsynergyPly (void)Ply: eight winged figures spiral in on the Psynergy's position, one a tick; then one in the centre flashes for 60 ticks, sheds sparks and flies off.

Description

Ply: swaying particles, shrinking orbits and sparks. Part of script_commands.c.

Macros in detail

PLY_FLASH_STEPS

#define PLY_FLASH_STEPS 30

Ply's flashing figure: its steps, of 2 ticks each.

Referenced by fdPsynergyPly().

Definition at line 106 of file script_commands_ply.c.

Functions in detail

fdEffectSwayParticle

void fdEffectSwayParticle(ACTOR *actor)

Per-tick update: sways 4 pixels either side of targetX, once every 128 ticks.

References sySin().

Referenced by fdEffectRunSparkEmitter().

Definition at line 5 of file script_commands_ply.c.

fdEffectUpdateShrinkingOrbitActor

void fdEffectUpdateShrinkingOrbitActor(ACTOR *particle)

The particle circles 10 pixels above the scene's position, its radius in pixels the ticks it has left; at 0 it runs the shared particle script.

References fdActorStartScriptStub(), FieldEffectReleaseScript, Sint32 and syVectorAddPolarOffset().

Referenced by fdPsynergyPly().

Definition at line 18 of file script_commands_ply.c.

fdEffectRunSparkEmitter

void fdEffectRunSparkEmitter(ACTOR *emitter)

Per-tick update: sways 6 pixels either side (a 64-tick cycle) 16 pixels above the Psynergy's position, and every 3 ticks sheds a spark that sways as it slowly falls.

References fdActorSetSpriteColorModeStub(), fdActorSpawn(), fdActorStartScriptStub(), fdEffectSwayParticle(), FieldEffectReleaseScript, syRandom(), sySin(), syVectorAddPolarOffset() and TickCount.

Referenced by fdPsynergyPly().

Definition at line 54 of file script_commands_ply.c.

fdPsynergyPlyOnTarget

void fdPsynergyPlyOnTarget(void)

Ply cast on a target: runs Ply, then stops the caster's hook.

References fdBattleEffectStopMainActor() and fdPsynergyPly().

Referenced by fdPsynergyDispatch().

Definition at line 99 of file script_commands_ply.c.

fdPsynergyPly

void fdPsynergyPly(void)

Ply: eight winged figures spiral in on the Psynergy's position, one a tick; then one in the centre flashes for 60 ticks, sheds sparks and flies off.

References fdActorReleaseStub(), fdActorSetSpriteColorModeStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorWaitForMoveStub(), fdEffectRunSparkEmitter(), fdEffectUpdateShrinkingOrbitActor(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdSpriteShareVRAMCacheEntry(), Sint32, sySoundPlayStub(), sySynch() and syVRAMCacheFreeEntry().

Referenced by fdPsynergyPlyOnTarget() and fdPsynergyRun().

Definition at line 110 of file script_commands_ply.c.