Skip to Content
The Alchemy Project

src/field/script_commands_field_psynergy.c

Running a field Psynergy by its kind, and helpers its kinds share. More…

Included by script_commands.c.

Functions

NameDescription
voidfdPsynergyRunHandler (Sint32 kind)Runs one step of the current field Psynergy: an FIELD_PSYNERGY_HANDLER.
voidfdPsynergyRun (void)Casts the current field Psynergy with no target: runs the body of its kind (effectState->fieldPsynergy).
voidfdPsynergyDispatch (void)Casts the current field Psynergy on its target (secondActorId): runs the handler of its kind.
voidfdPsynergyFinishMindRead (void)Finishes the current field Psynergy when it is Mind Read: ends it and lets its target move again, unless the target is the actor kept stopped.
voidfdPsynergyRunEnd (void)Ends the current field Psynergy when it is Reveal, Cloak or Avoid: what each does as it wears off.
Sint32fdRunPsynergyScript (const void *event, Sint32 param, Sint32 target)Runs the script tied to a field Psynergy: a result below CUE_RESULT_MESSAGE_END is a message, shown at target; a larger one is a function, called with param and target.
voidfdActorCycleSpriteColors (ACTOR *actor)Per-tick update: cycles an actor's colours through its own and the five with channels swapped, a new colour mode every tick.
fdVRAMCacheCountFreeBlocks(void )Counts the free blocks (VRAM_BLOCK_OWNER_FREE) of the sprite VRAM cache's VRAM_BLOCK_COUNT blocks.
SPR *fdSpriteShareVRAMCacheEntry (SPR *srcSprite, SPR *sharedSprite)Makes srcSprite share sharedSprite's VRAM block, releasing its own; with no sharedSprite it keeps its block.
ACTOR *fdActorSpawn (Sint32 kind, Sint32 x, Sint32 y, Sint32 z)Creates an actor for a field Psynergy, at the caster's ground height, with sprite priority 0 and animation 1.
voidfdActorSetOthersPaused (ACTOR *except, Sint32 paused, Sint32 animationSpeed)Pauses or resumes every actor but the player's and except, and sets their animations' speed.

Variables

NameDescription
DEFINE_SET_TARGET_POSITION_FROM_MAGNITUDE_ANGLE(, fdActorSetMoveTargetStub) // Counts the free blocks (VRAM_BLOCK_OWNER_FREE) of the sprite VRAM cache's // VRAM_BLOCK_COUNT blocks.Sint32Carry, Lift, Douse, Move and the Djinni's hop into battle throw things this way.

Description

Running a field Psynergy by its kind, and helpers its kinds share. Part of script_commands.c.

Functions in detail

fdPsynergyRunHandler

void fdPsynergyRunHandler(Sint32 kind)

Runs one step of the current field Psynergy: an FIELD_PSYNERGY_HANDLER.

References fdPsynergyDispatch(), fdPsynergyFinishMindRead(), fdPsynergyRun(), fdPsynergyRunEnd() and Sint32.

Referenced by scAltinPeakBeastFreezesSecondPuddle(), scAltmillerCaveRestoreBabiAndInviteParty(), scCottageRoomsBDemonstrateCatch(), scEndMindRead(), scFuchinTempleFinishMindReadDemonstration(), scFuchinTempleStartMindReadDemonstration(), scGomaCaveEntranceWhirlwindOnStumpIvy(), scImilMiaCastsPlyOnOldMan(), scLunpaLeaderSneaksOut(), scMercuryLighthouseAerieUnusedAlexCastsPly(), scMercuryLighthouseMiaCastsPlyOnEntrance() and scStartMindRead().

Definition at line 8 of file script_commands_field_psynergy.c.

fdPsynergyRun

void fdPsynergyRun(void)

Casts the current field Psynergy with no target: runs the body of its kind (effectState->fieldPsynergy).

References fdFindActorTalkCue(), fdFindNearbyPsynergyTarget(), fdPsynergyAvoid(), fdPsynergyCarry(), fdPsynergyCatch(), fdPsynergyDouse(), fdPsynergyEndReveal(), fdPsynergyFilterHaltTarget(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyGrowth(), fdPsynergyHalt(), fdPsynergyHaltActor(), fdPsynergyHaltOnTarget(), fdPsynergyLift(), fdPsynergyMove(), fdPsynergyPly(), fdPsynergyResumeHaltedActor(), fdPsynergyRetreat(), fdPsynergyReveal(), fdPsynergySetupActorPair(), fdPsynergyStartCloak(), fdPsynergyStartMindReadWave(), fdPsynergyWhirlwind(), MainRoutineStateWork, Sint32 and state.

Referenced by fdPsynergyRunHandler(), fdUseItem() and fdUsePsynergy().

Definition at line 22 of file script_commands_field_psynergy.c.

fdPsynergyDispatch

void fdPsynergyDispatch(void)

Casts the current field Psynergy on its target (secondActorId): runs the handler of its kind.

References fdPsynergyAvoid(), fdPsynergyCatchOnTarget(), fdPsynergyDouseOnTarget(), fdPsynergyEndReveal(), fdPsynergyForceOnTarget(), fdPsynergyFrostOnTarget(), fdPsynergyGrowthOnTarget(), fdPsynergyHaltActor(), fdPsynergyHaltOnTarget(), fdPsynergyLiftOnTarget(), fdPsynergyPlyOnTarget(), fdPsynergyResumeHaltedActor(), fdPsynergyRetreat(), fdPsynergyReveal(), fdPsynergyStartCloak(), fdPsynergyStartMindReadWave(), fdPsynergySteerLiftedTarget(), fdPsynergySteerPushedTarget(), fdPsynergyWhirlwindOnTarget(), MainRoutineStateWork, Sint32 and state.

Referenced by fdPsynergyRunHandler() and fdUsePsynergy().

Definition at line 86 of file script_commands_field_psynergy.c.

fdPsynergyFinishMindRead

void fdPsynergyFinishMindRead(void)

Finishes the current field Psynergy when it is Mind Read: ends it and lets its target move again, unless the target is the actor kept stopped.

References fdPsynergyStopMindReadWave() and MainRoutineStateWork.

Referenced by fdPsynergyRunHandler() and fdUsePsynergy().

Definition at line 137 of file script_commands_field_psynergy.c.

fdPsynergyRunEnd

void fdPsynergyRunEnd(void)

Ends the current field Psynergy when it is Reveal, Cloak or Avoid: what each does as it wears off.

References fdPsynergyEndCloak(), fdPsynergyEndReveal() and fdPsynergyShowAvoidWoreOff().

Referenced by fdPsynergyRunHandler() and fdRunPsynergyEndScripts().

Definition at line 153 of file script_commands_field_psynergy.c.

fdRunPsynergyScript

Sint32 fdRunPsynergyScript(const void *event, Sint32 param, Sint32 target)

Runs the script tied to a field Psynergy: a result below CUE_RESULT_MESSAGE_END is a message, shown at target; a larger one is a function, called with param and target.

References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptStart(), gmFlagGetStub(), mnFieldMessageShowStub() and Sint32.

Referenced by fdPsynergyEndReveal(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyReveal(), fdRunPsynergyEndScripts() and fdUsePsynergy().

Definition at line 169 of file script_commands_field_psynergy.c.

fdActorCycleSpriteColors

void fdActorCycleSpriteColors(ACTOR *actor)

Per-tick update: cycles an actor's colours through its own and the five with channels swapped, a new colour mode every tick.

References Sint32 and TickCount.

Referenced by fdPsynergyLiftOnTarget(), fdPsynergyRetreat(), fdPsynergySteerLiftedTarget() and fdPsynergySteerPushedTarget().

Definition at line 204 of file script_commands_field_psynergy.c.

void

fdVRAMCacheCountFreeBlocks(void)

Counts the free blocks (VRAM_BLOCK_OWNER_FREE) of the sprite VRAM cache's VRAM_BLOCK_COUNT blocks.

References fdVRAMCacheCountFreeBlocks(), Sint32 and VramCacheBlockOwners.

Referenced by btTurnStartNoOperation(), fdEffectUpdateOrbitingParticleFade(), scFieldEffectAdvanceMotion() and sySoftReset().

Definition at line 229 of file script_commands_field_psynergy.c.

fdSpriteShareVRAMCacheEntry

SPR *fdSpriteShareVRAMCacheEntry(SPR *srcSprite, SPR *sharedSprite)

Makes srcSprite share sharedSprite's VRAM block, releasing its own; with no sharedSprite it keeps its block.

References syVRAMCacheFreeEntry().

Referenced by fdDjinnRunBattleStartHop(), fdDjinnRunMercuryJoinEffect(), fdPsynergyForce(), fdPsynergyPly(), scKolimaForestTreeSpawnOrbitSparks() and scTreeRoomsSpawnSwirlSparks().

Definition at line 248 of file script_commands_field_psynergy.c.

fdActorSpawn

ACTOR *fdActorSpawn(Sint32 kind, Sint32 x, Sint32 y, Sint32 z)

Creates an actor for a field Psynergy, at the caster's ground height, with sprite priority 0 and animation 1.

References fdActorCreateStub(), fdActorReleaseStub(), fdActorSelectAnimationStub(), fdActorSetSpriteFlagsStub() and Sint32.

Referenced by fdDjinnRunVenusJoinEffect(), fdEffectBurstHand(), fdEffectRunSparkEmitter(), fdEffectSpawnBurstParticleField(), fdEffectSpawnCarryHand(), fdEffectSpawnFallingParticles(), fdEffectSpawnHeavyImpact(), fdEffectSpawnLiftHand(), fdEffectSpawnMoveHand(), fdEffectUpdateDouseDrop(), fdEffectUpdateMoveHand(), fdItemDisplayEmitSparkles(), fdPsynergyCatch(), fdPsynergyDouse(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyGrowth(), fdPsynergyHalt(), fdPsynergyPly(), fdPsynergySteerLiftedTarget(), fdPsynergyWhirlwind() and fdRevealEmitSparkles().

Definition at line 275 of file script_commands_field_psynergy.c.

fdActorSetOthersPaused

void fdActorSetOthersPaused(ACTOR *except, Sint32 paused, Sint32 animationSpeed)

Pauses or resumes every actor but the player's and except, and sets their animations' speed.

References fdActorLookup(), fdActorSetAnimationSpeedStub(), PlayerActorId and Sint32.

Referenced by fdPsynergyStartCast().

Definition at line 300 of file script_commands_field_psynergy.c.

Variables in detail

Sint32

DEFINE_SET_TARGET_POSITION_FROM_MAGNITUDE_ANGLE(, fdActorSetMoveTargetStub) // Counts the free blocks (VRAM_BLOCK_OWNER_FREE) of the sprite VRAM cache's // VRAM_BLOCK_COUNT blocks. Sint32

Carry, Lift, Douse, Move and the Djinni's hop into battle throw things this way.

References fdActorSetMoveTargetStub().

Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorDefaultScript, ActorFaceWatchedScript, ActorIdleScript, ActorKeyCheckScript, ActorKeysScript, ActorLaunchScript, ActorPlayerScript, ActorScriptCycleTable, ActorScriptEndScript, ActorStepAngleScript, ActorTrembleScript, ActorUnusedCameraScript, ActorWaitScript, ActorWorldMapScript, AlpineCrossingActorPlacements, AlpineCrossingFeizhiPath, AlpineCrossingHsuStruggle, AlpineCrossingLeaderPath, AlpineCrossingWorkerActorPlacementScript, AltinPeakBoulderPath, AltinPeakDebrisScript, AltinPeakFaceLeaderScript, AltinPeakGaretScript, AltinPeakIvanScript, AltinPeakLeaderFleePath, AltinPeakMiaScript, AltinPeakPuddleGrowScript, AltinPeakRejoinScript, AltinPeakRumbleTicks, AltinPeakSpitDirection, AltinPeakSpitOrigin, AltinPeakStatueSinkScript, AltmillerCaveBabiLeavePath, AltmillerCaveFirstGuardLeavePath, AltmillerCaveGuardsArrivePath, AltmillerCaveSecondGuardLeavePath, BabiLighthouseEntryActorPlacements, BabiLighthouseTrembleScript, BabiPalaceActorPlacementsBabiMissing, BabiPalaceIndigestionScript, BattleArenaSlotValues, BattleArenaWaitTicks, BattleHighlightUnusedWords, BattleKnockbackDistancePercent, BattleKnockbackUnusedWords, BattleObjectEmptyScript, BattleRandomSeed, BeaconRiseStep and 3207 more.

Definition at line 225 of file script_commands_field_psynergy.c.