src/field/script_commands_halt.c
Halt: a stopwatch flies out to the target, ticks and bursts into sparkles, and the target stands frozen, its colours flickering. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | HALT_SPARKLES 16 | The sparkles the stopwatch bursts into. |
Functions
| Name | Description | |
|---|---|---|
void | fdEffectUpdateHaltParticle (FIELD_PARTICLE *effect) | Field effect sprite callback of a Halt sparkle (OUT_AND_BACK_STATE): it heads for a point 40 to 70 pixels from where it appeared, then for a point 4 pixels round 8 pixels above the Psynergy's position on screen, and is freed on arrival. |
void | fdPsynergyHaltOnTarget (Sint32 unused) | Pauses the target (effectState->target) and runs fdPsynergyHalt. |
void | fdPsynergyHalt (void) | A stopwatch (SPRITE_STOPWATCH) flies from over the caster to the Psynergy's position over GROW_STEPS ticks, growing, sounds three low tones and a high one, and bursts into HALT_SPARKLES sparkles that fly out and back. |
void | fdPsynergyUpdateHaltedActor (ACTOR *actor) | Per-tick update of a halted actor: gives its sprite one of eight colour modes (HaltFlickerColorModes) at random, so it flickers. |
void | fdPsynergyHaltActor (Sint32 actorId) | Halts actorId, keeping its per-tick update and, if it is animated, its first animation's colour mode in MainRoutineStateWork. |
void | fdPsynergyResumeHaltedActor (Sint32 actorId) | Resumes actorId with the update and colour mode fdPsynergyHaltActor kept. |
Sint32 | fdPsynergyFilterHaltTarget (Sint32 id) | Returns id, or -1 (no target) when Halt passes actor id's sprite over (SPEAKER_HALTED_LINES_NONE in SpeakerDefinitions): the talking monsters and the things, the 20 rows before the default. |
Description
Halt: a stopwatch flies out to the target, ticks and bursts into sparkles,
and the target stands frozen, its colours flickering. Part of
script_commands.c.
Macros in detail
HALT_SPARKLES
#define HALT_SPARKLES 16
The sparkles the stopwatch bursts into.
Referenced by fdPsynergyHalt().
Definition at line 8 of file script_commands_halt.c.
Functions in detail
fdEffectUpdateHaltParticle
void fdEffectUpdateHaltParticle(FIELD_PARTICLE *effect)
Field effect sprite callback of a Halt sparkle (OUT_AND_BACK_STATE): it heads
for a point 40 to 70 pixels from where it appeared, then for a point 4 pixels
round 8 pixels above the Psynergy's position on screen, and is freed on
arrival.
References fdCameraWorldToScreen(), fdParticleFree(), fdParticleHasPendingTarget(), Sint32, state, syRandom() and syVectorAddPolarOffset().
Referenced by fdPsynergyHalt().
Definition at line 14 of file script_commands_halt.c.
fdPsynergyHaltOnTarget
void fdPsynergyHaltOnTarget(Sint32 unused)
Pauses the target (effectState->target) and runs fdPsynergyHalt.
References fdPsynergyHalt() and Sint32.
Referenced by fdPsynergyDispatch() and fdPsynergyRun().
Definition at line 66 of file script_commands_halt.c.
fdPsynergyHalt
void fdPsynergyHalt(void)
A stopwatch (SPRITE_STOPWATCH) flies from over the caster to the Psynergy's
position over GROW_STEPS ticks, growing, sounds three low tones and a high
one, and bursts into HALT_SPARKLES sparkles that fly out and back.
References fdActorReleaseStub(), fdActorSelectAnimationStub(), fdActorSpawn(), fdCameraWorldToScreen(), fdEffectInterpolate(), fdEffectUpdateHaltParticle(), fdParticleInit(), fdParticleSetCallback(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdSpriteSetAnimationColorModesStub(), Sint32, syRandom(), sySoundPlayStub(), sySynch() and syVectorAddPolarOffset().
Referenced by fdPsynergyHaltOnTarget() and fdPsynergyRun().
Definition at line 77 of file script_commands_halt.c.
fdPsynergyUpdateHaltedActor
void fdPsynergyUpdateHaltedActor(ACTOR *actor)
Per-tick update of a halted actor: gives its sprite one of eight colour modes
(HaltFlickerColorModes) at random, so it flickers.
References fdActorSetSpriteColorModeStub(), HaltFlickerColorModes, Sint32 and syRandom().
Referenced by fdPsynergyHaltActor() and fdPsynergyResumeHaltedActor().
Definition at line 164 of file script_commands_halt.c.
fdPsynergyHaltActor
void fdPsynergyHaltActor(Sint32 actorId)
Halts actorId, keeping its per-tick update and, if it is animated, its first
animation's colour mode in MainRoutineStateWork.
References fdActorLookup(), fdActorSetAnimationSpeedStub(), fdPsynergyUpdateHaltedActor(), MainRoutineStateWork and Sint32.
Referenced by fdPsynergyDispatch(), fdPsynergyRun(), scColosseumNavampaMatchHaltWall(), scColosseumSatrageMatchHaltLifts() and scInit().
Definition at line 174 of file script_commands_halt.c.
fdPsynergyResumeHaltedActor
void fdPsynergyResumeHaltedActor(Sint32 actorId)
Resumes actorId with the update and colour mode fdPsynergyHaltActor kept.
References fdActorLookup(), fdActorSetAnimationSpeedStub(), fdActorSetSpriteColorModeStub(), fdPsynergyUpdateHaltedActor(), MainRoutineStateWork and Sint32.
Referenced by fdPsynergyDispatch(), fdPsynergyRun() and fdTalkToActor().
Definition at line 199 of file script_commands_halt.c.
fdPsynergyFilterHaltTarget
Sint32 fdPsynergyFilterHaltTarget(Sint32 id)
Returns id, or -1 (no target) when Halt passes actor id's sprite over
(SPEAKER_HALTED_LINES_NONE in SpeakerDefinitions): the talking monsters and
the things, the 20 rows before the default.
References fdSpeakerGetHaltedLines() and Sint32.
Referenced by fdPsynergyRun().
Definition at line 219 of file script_commands_halt.c.