Skip to Content
The Alchemy Project

src/field/field_psynergy_lash.c

Included by field_psynergy.c.

Macros

NameDescription
#defineLASH_FALL_TICKS 16The ticks Lash's hand comes down, 2 pixels a tick, and the sparkles it bursts into with no target.
#defineLASH_SPARKLES 16

Enumerations

NameDescription
enumLASH_PHASE { LASH_HAND_SHAKES, LASH_HAND_STILL, LASH_HAND_PULLS, LASH_HAN … }The stages of Lash's hand on a rope (SCATTER_STATE.phase).

Functions

NameDescription
voidfdRopeGetEndNodePos (Sint32 target, VECTOR3 *pos)Lash: tying and untying ropes between posts.
voidfdPsynergyUpdateLash (void)Each tick of Lash on a rope: the hand trembles, takes the rope's end and rises away, scattering sparkles all the while.
voidfdPsynergyLashOnTarget (Sint32 rope)Lash cast on a rope: finds the rope's two ends (fdRopeFindById); with none, Lash runs as if cast on nothing, else the field state keeps the rope and its ends.
voidfdPsynergyLash (void)Lash: a hand forms over the spot and comes down on it.

Macros in detail

LASH_FALL_TICKS

#define LASH_FALL_TICKS 16

The ticks Lash's hand comes down, 2 pixels a tick, and the sparkles it bursts into with no target.

Referenced by fdPsynergyLash().

Definition at line 157 of file field_psynergy_lash.c.

LASH_SPARKLES

#define LASH_SPARKLES 16

Referenced by fdPsynergyLash().

Definition at line 158 of file field_psynergy_lash.c.

Enumerations in detail

LASH_PHASE

enum LASH_PHASE

The stages of Lash's hand on a rope (SCATTER_STATE.phase).

EnumeratorValueDescription
LASH_HAND_SHAKES0trembling over the rope's end
LASH_HAND_STILL1
LASH_HAND_PULLS2on the rope's end until the rope is tied
LASH_HAND_RISES3
LASH_HAND_GONE4its sparkles die away

Definition at line 5 of file field_psynergy_lash.c.

Functions in detail

fdPsynergyUpdateLash

void fdPsynergyUpdateLash(void)

Each tick of Lash on a rope: the hand trembles, takes the rope's end and rises away, scattering sparkles all the while.

References fdActorSelectAnimationStub(), fdActorSetPosAndResetMotionStub(), fdAdvanceWithGravity3D(), fdEffectSpriteDrawAtWorldPos(), fdRopeGetEndNodePos(), Sint32, syRandom() and syVectorAddPolarOffset().

Referenced by fdPsynergyLash().

Definition at line 16 of file field_psynergy_lash.c.

fdPsynergyLashOnTarget

void fdPsynergyLashOnTarget(Sint32 rope)

Lash cast on a rope: finds the rope's two ends (fdRopeFindById); with none, Lash runs as if cast on nothing, else the field state keeps the rope and its ends. Then runs fdPsynergyLash.

References fdPsynergyLash(), fdRopeFindById() and Sint32.

Referenced by fdPsynergyDispatch().

Definition at line 135 of file field_psynergy_lash.c.

fdPsynergyLash

void fdPsynergyLash(void)

Lash: a hand forms over the spot and comes down on it. With no target it bursts into sparkles; cast on a rope's end it whips out and ties the rope (fdRopeLash) at the script's target.

References fdActorReleaseStub(), fdActorSelectAnimationStub(), fdActorSpawn(), fdBattleEffectSpawnScatterParticle(), fdEffectSpriteInit(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdPsynergyGrowFromCaster(), fdPsynergyUpdateLash(), fdRopeLash(), Sint32, syCloseEvent(), syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySetEvent(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().

Referenced by fdPsynergyLashOnTarget() and fdPsynergyRun().

Definition at line 163 of file field_psynergy_lash.c.