Skip to Content
The Alchemy Project

src/field/field_psynergy_arcs.c

Included by field_psynergy.c.

Macros

NameDescription
#defineARC_GROUPS_WAIT_TICKS 90Swelling arcs around a caster or target.

Functions

NameDescription
voidfdBattleEffectWaitForArcGroups (void)Waits, at most ARC_GROUPS_WAIT_TICKS, until both pairs of swelling arcs have run their 32 ticks.
voidfdEffectFlickerActorAndSpawnArcs (ACTOR *actor)Per-tick update: flashes an actor white for 2 ticks in every 4 and spawns the swelling arcs on it every 16.
voidfdEffectCycleActorAndSpawnArcs (ACTOR *actor)Per-tick update: cycles an actor through colour modes 0 to 5, one step every 2 ticks, and spawns the swelling arcs on it every 16.
voidfdBattleEffectSetObjectUpdateMode (ACTOR *actor, Sint32 mode)Gives the caster its look while it casts (CASTER_LOOK).
voidfdBattleEffectSpawnScaledArcObjects (ACTOR *target)Sets up the current group's two arc sprites from the effect's tiles, at the target's priority, then restarts that group's age, records the target and switches to the other group.
voidfdBattleEffectUpdateArcEffect (void)Each tick: draws the two pairs of swelling arcs on their actor: each pair swells and shrinks over 32 ticks (scale sin(age / 64 turn)) as it rises a pixel a tick, the second arc of a pair upside down, one in front of the actor and one behind.
voidfdBattleEffectStartArcEffect (void)Starts the swelling arcs over a caster: loads their tiles and starts fdBattleEffectUpdateArcEffect with no pair showing.
voidfdBattleEffectEndArcEffect (void)Ends the swelling arcs: frees their tiles and their state, and stops their event.

Macros in detail

ARC_GROUPS_WAIT_TICKS

#define ARC_GROUPS_WAIT_TICKS 90

Swelling arcs around a caster or target. Part of field_psynergy.c.

Referenced by fdBattleEffectWaitForArcGroups().

Definition at line 2 of file field_psynergy_arcs.c.

Functions in detail

fdBattleEffectWaitForArcGroups

void fdBattleEffectWaitForArcGroups(void)

Waits, at most ARC_GROUPS_WAIT_TICKS, until both pairs of swelling arcs have run their 32 ticks.

References Sint32 and sySynch().

Referenced by fdPsynergyEnd(), scAlhafranCaveChauchaAndEoleoVisit(), scContigoBabyThinks(), scEasternAlhafraShipEoleoLifts(), scInit(), scIzumoRoomsGiveUzumeTheDoll(), scJupiterLighthouseHealActor(), scJupiterLighthouseHealTarget(), scShamanVillageCastWhirlwindOnSand(), scVenusLighthouseEntranceBlastActorWithPsynergy() and scVenusLighthouseEntranceSoldiersAmbushParty().

Definition at line 6 of file field_psynergy_arcs.c.

fdEffectFlickerActorAndSpawnArcs

void fdEffectFlickerActorAndSpawnArcs(ACTOR *actor)

Per-tick update: flashes an actor white for 2 ticks in every 4 and spawns the swelling arcs on it every 16.

References fdActorSetSpriteColorModeStub(), fdBattleEffectSpawnScaledArcObjects() and TickCount.

Referenced by fdBattleEffectSetObjectUpdateMode().

Definition at line 22 of file field_psynergy_arcs.c.

fdEffectCycleActorAndSpawnArcs

void fdEffectCycleActorAndSpawnArcs(ACTOR *actor)

Per-tick update: cycles an actor through colour modes 0 to 5, one step every 2 ticks, and spawns the swelling arcs on it every 16.

References fdActorSetSpriteColorModeStub(), fdBattleEffectSpawnScaledArcObjects() and TickCount.

Referenced by fdBattleEffectSetObjectUpdateMode().

Definition at line 40 of file field_psynergy_arcs.c.

fdBattleEffectSetObjectUpdateMode

void fdBattleEffectSetObjectUpdateMode(ACTOR *actor, Sint32 mode)

Gives the caster its look while it casts (CASTER_LOOK).

References fdActorSetSpriteColorModeStub(), fdEffectCycleActorAndSpawnArcs(), fdEffectFlickerActorAndSpawnArcs() and Sint32.

Referenced by fdBattleEffectStopMainActor(), fdPsynergyBlaze(), fdPsynergyCyclone(), fdPsynergyGrind(), fdPsynergyHover(), fdPsynergySand(), fdPsynergyStartCast(), fdPsynergyTremor(), fdPsynergyTremorOnTarget(), fdPsynergyUpdateBurst(), fdPsynergyWhirlwind(), scAlhafranCaveChauchaAndEoleoVisit(), scContigoBabyThinks(), scEasternAlhafraShipEoleoLifts(), scInit(), scIzumoRoomsGiveUzumeTheDoll(), scJupiterLighthouseHealActor(), scJupiterLighthouseHealTarget(), scShamanVillageCastWhirlwindOnSand(), scVenusLighthouseEntranceBlastActorWithPsynergy() and scVenusLighthouseEntranceSoldiersAmbushParty().

Definition at line 49 of file field_psynergy_arcs.c.

fdBattleEffectSpawnScaledArcObjects

void fdBattleEffectSpawnScaledArcObjects(ACTOR *target)

Sets up the current group's two arc sprites from the effect's tiles, at the target's priority, then restarts that group's age, records the target and switches to the other group.

References fdActorGetSpritePriority(), fdEffectSpriteInit(), Sint32 and VramCacheEntries.

Referenced by fdEffectCycleActorAndSpawnArcs() and fdEffectFlickerActorAndSpawnArcs().

Definition at line 69 of file field_psynergy_arcs.c.

fdBattleEffectUpdateArcEffect

void fdBattleEffectUpdateArcEffect(void)

Each tick: draws the two pairs of swelling arcs on their actor: each pair swells and shrinks over 32 ticks (scale sin(age / 64 turn)) as it rises a pixel a tick, the second arc of a pair upside down, one in front of the actor and one behind.

References fdActorGetSpriteDepth(), fdCameraWorldToScreen(), fdEffectSpriteDraw(), Sint32 and sySin().

Referenced by fdBattleEffectEndArcEffect() and fdBattleEffectStartArcEffect().

Definition at line 94 of file field_psynergy_arcs.c.

fdBattleEffectStartArcEffect

void fdBattleEffectStartArcEffect(void)

Starts the swelling arcs over a caster: loads their tiles and starts fdBattleEffectUpdateArcEffect with no pair showing.

References fdBattleEffectUpdateArcEffect(), FieldEffectSparkTiles, Sint32, syHeapSlotAllocate(), sySetEvent(), syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().

Referenced by fdPsynergyLoadResources(), scAlhafranCaveChauchaAndEoleoVisit(), scContigoBabyThinks(), scEasternAlhafraShipEoleoLifts(), scInit(), scIzumoRoomsGiveUzumeTheDoll(), scJupiterLighthouseHealActor(), scJupiterLighthouseHealTarget(), scShamanVillageCastWhirlwindOnSand(), scVenusLighthouseEntranceBlastActorWithPsynergy() and scVenusLighthouseEntranceSoldiersAmbushParty().

Definition at line 145 of file field_psynergy_arcs.c.

fdBattleEffectEndArcEffect

void fdBattleEffectEndArcEffect(void)

Ends the swelling arcs: frees their tiles and their state, and stops their event.

References fdBattleEffectUpdateArcEffect(), syCloseEvent(), syHeapSlotRelease() and syVRAMCacheFreeEntry().

Referenced by fdPsynergyEnd(), scAlhafranCaveChauchaAndEoleoVisit(), scContigoBabyThinks(), scEasternAlhafraShipEoleoLifts(), scInit(), scIzumoRoomsGiveUzumeTheDoll(), scJupiterLighthouseHealActor(), scJupiterLighthouseHealTarget(), scShamanVillageCastWhirlwindOnSand(), scVenusLighthouseEntranceBlastActorWithPsynergy() and scVenusLighthouseEntranceSoldiersAmbushParty().

Definition at line 161 of file field_psynergy_arcs.c.