Skip to Content
The Alchemy Project

src/field/field_psynergy_arrow.c

Arrow: the unused "A??" field Psynergy's bow and flaming arrow. More…

Included by field_psynergy.c.

Macros

NameDescription
#defineBOW_NEXT_PHASE (state) ((state)->phase++, (state)->timer = -1)Moves the state on to its next phase, its timer restarted.
#defineBOW_SPARKS_THROWN 10Of the BOW_SPARK_COUNT sparks, those the bow throws off.
#defineBOW_SPARK_TICKS 10While the thrown sparks repeat, each starts again after this many ticks.

Enumerations

NameDescription
enumARROW_PHASE { ARROW_BOW_GROWS, ARROW_BOW_DRAWN, ARROW_FLIES, ARROW_STOPS, … }The stages of the Arrow (BOW_STATE.phase).

Functions

NameDescription
voidfdPsynergyUpdateArrow (void)Each tick of the Arrow, the field Psynergy of the unused ability "A??" (named here for the bow it draws and the arrow it looses): the bow and the flaming arrow.
voidfdPsynergyArrowOnTarget (void)The Arrow cast on a target: runs fdPsynergyArrow.
voidfdPsynergyArrow (void)The Arrow: a bow grows in front of the caster and draws, throwing off glints, and looses a flaming arrow that flies up to 80 pixels; an actor it strikes becomes the field state's psynergyHitObject.

Description

Arrow: the unused "A??" field Psynergy's bow and flaming arrow. Part of field_psynergy.c.

Macros in detail

BOW_NEXT_PHASE

#define BOW_NEXT_PHASE(state) ((state)->phase++, (state)->timer = -1)

Moves the state on to its next phase, its timer restarted.

Referenced by fdPsynergyUpdateArrow().

Definition at line 5 of file field_psynergy_arrow.c.

BOW_SPARKS_THROWN

#define BOW_SPARKS_THROWN 10

Of the BOW_SPARK_COUNT sparks, those the bow throws off.

Referenced by fdPsynergyUpdateArrow().

Definition at line 7 of file field_psynergy_arrow.c.

BOW_SPARK_TICKS

#define BOW_SPARK_TICKS 10

While the thrown sparks repeat, each starts again after this many ticks.

Referenced by fdPsynergyUpdateArrow().

Definition at line 9 of file field_psynergy_arrow.c.

Enumerations in detail

ARROW_PHASE

enum ARROW_PHASE

The stages of the Arrow (BOW_STATE.phase).

EnumeratorValueDescription
ARROW_BOW_GROWS0the bow grows and turns to face ahead
ARROW_BOW_DRAWN1the arrow is drawn back and loosed
ARROW_FLIES2until it strikes or has flown 80 pixels
ARROW_STOPS3
ARROW_FALLS4a struck arrow quivers; a spent one shrinks away
ARROW_BOW_SHRINKS5ends once the bow is gone

Definition at line 12 of file field_psynergy_arrow.c.

Functions in detail

fdPsynergyUpdateArrow

void fdPsynergyUpdateArrow(void)

Each tick of the Arrow, the field Psynergy of the unused ability "A??" (named here for the bow it draws and the arrow it looses): the bow and the flaming arrow.

References ArrowGlintPixels, ArrowWobbleAngles, ArrowWobbleFades, fdAdvanceWithGravity2D(), fdAdvanceWithGravity3D(), fdBattleEffectDrawCanvasBlock(), fdCameraWorldToScreen(), fdEffectSpriteDraw(), fdMapGridCheckCollisionStub(), fdPsynergyCheckOverlap(), memcpy(), Sint32, syCos(), syRandom(), sySin() and syVectorAddPolarOffset().

Referenced by fdPsynergyArrow().

Definition at line 25 of file field_psynergy_arrow.c.

fdPsynergyArrowOnTarget

void fdPsynergyArrowOnTarget(void)

The Arrow cast on a target: runs fdPsynergyArrow. Nothing calls it, as the dispatch of Psynergy cast on a target has no case for the Arrow.

References fdPsynergyArrow().

Definition at line 324 of file field_psynergy_arrow.c.

fdPsynergyArrow

void fdPsynergyArrow(void)

The Arrow: a bow grows in front of the caster and draws, throwing off glints, and looses a flaming arrow that flies up to 80 pixels; an actor it strikes becomes the field state's psynergyHitObject.

References fdActorGetSpriteDepth(), fdActorGetSpritePriority(), fdBattleEffectEndCanvasSprite(), fdBattleEffectStartCanvasSprite(), fdEffectSpriteInit(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdPsynergyUpdateArrow(), Sint32, syCloseEvent(), syDecompressTaggedLZ(), syHeapSlotAllocate(), syHeapSlotRelease(), syResourceGetTableEntry(), sySetEvent(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset(), syVRAMCacheFindFreeEntry(), syVRAMCacheFreeEntry() and syVRAMCacheLoad().

Referenced by fdPsynergyArrowOnTarget() and fdPsynergyRun().

Definition at line 332 of file field_psynergy_arrow.c.