src/field/script_commands_move.c
Move: steering a pushed target with the +Control Pad and the Move hand. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | BURST_RISE_TICKS 31 | |
#define | BURST_SPARKLES 8 |
Functions
| Name | Description | |
|---|---|---|
Sint32 | fdInputGetDpadAngle (Uint32 unused) | The way the +Control Pad points, in four ways: FACING_EAST to FACING_NORTH, or DPAD_ANGLE_NONE when none or a diagonal is held. |
Uint16 | fdInputGetDpadAngleEightWay (void) | The way the +Control Pad points, in eight ways, or DPAD_ANGLE_NONE. |
void | fdEffectUpdateMoveHand (ACTOR *src) | Per-tick update of Move's hand: turns it toward the actor it watches, at most 1/16 turn a tick, and sheds a particle (SPRITE_SPARKLE) round it. |
void | fdPsynergySteerPushedTarget (Sint32 unused) | When Move is cast on a target, the pushing hand appears beside it and pushes it 16 pixels the way the d-pad points, for as long as the player pushes; A, B, L or R end it. |
void | fdEffectUpdateOutAndBack (FIELD_PARTICLE *effect) | Field effect sprite callback of a particle that flies 30 pixels out from where it started, comes back and is freed. |
void | fdPsynergyMove (void) | When Move is cast with no target, the hand appears beside the caster for 30 ticks and then turns into particles. |
void * | fdEffectSpawnMoveHand (void *object) | Move's hand appears at a quarter size 16 pixels above the caster, with a crack and eight sparkles that scatter from it, and sets out 16 pixels the way the caster faces, to the nearest quarter turn. |
void | fdEffectGrowHandAndWait (ACTOR *actor) | Grows a hand to full size at once and waits for it to reach where it is going. |
void | fdEffectBurstHand (void *object) | The hand spins as it rises for BURST_RISE_TICKS, shrinks, and bursts into BURST_SPARKLES sparkles (SPRITE_SPARKLE). |
Description
Move: steering a pushed target with the +Control Pad and the Move hand. Part
of script_commands.c.
Macros in detail
BURST_RISE_TICKS
#define BURST_RISE_TICKS 31
Referenced by fdEffectBurstHand().
Definition at line 422 of file script_commands_move.c.
BURST_SPARKLES
#define BURST_SPARKLES 8
Referenced by fdEffectBurstHand().
Definition at line 423 of file script_commands_move.c.
Functions in detail
fdInputGetDpadAngle
Sint32 fdInputGetDpadAngle(Uint32 unused)
The way the +Control Pad points, in four ways: FACING_EAST to FACING_NORTH,
or DPAD_ANGLE_NONE when none or a diagonal is held.
References InputDpadAngles, PerWork and Sint32.
Referenced by fdPsynergySteerLiftedTarget() and fdPsynergySteerPushedTarget().
Definition at line 6 of file script_commands_move.c.
fdInputGetDpadAngleEightWay
Uint16 fdInputGetDpadAngleEightWay(void)
The way the +Control Pad points, in eight ways, or DPAD_ANGLE_NONE.
References InputDpadAnglesEightWay and PerWork.
Definition at line 13 of file script_commands_move.c.
fdEffectUpdateMoveHand
void fdEffectUpdateMoveHand(ACTOR *src)
Per-tick update of Move's hand: turns it toward the actor it watches, at most
1/16 turn a tick, and sheds a particle (SPRITE_SPARKLE) round it.
References fdActorSpawn(), fdEffectInitFallingFragment(), Sint32, syAtan(), syRandom() and syVectorAddPolarOffset().
Referenced by fdEffectSpawnMoveHand().
Definition at line 23 of file script_commands_move.c.
fdPsynergySteerPushedTarget
void fdPsynergySteerPushedTarget(Sint32 unused)
When Move is cast on a target, the pushing hand appears beside it and pushes it 16 pixels the way the d-pad points, for as long as the player pushes; A, B, L or R end it.
References fdActorCycleSpriteColors(), fdActorGetById(), fdActorScriptFindOverlappingActorStub(), fdActorSelectAnimationStub(), fdActorSetPosAndResetMotionStub(), fdActorSetSpriteColorModeStub(), fdActorStartScriptStub(), fdActorWaitForMoveStub(), fdBattleEffectStopMainActor(), fdEffectBurstHand(), fdEffectGrowHandAndWait(), fdEffectSpawnMoveHand(), fdFindPsynergyCue(), fdInputGetDpadAngle(), fdMapGridCheckCollisionStub(), fdMapGridGetTerrainKindStub(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), fdRunPsynergyScript(), fdSelectPsynergyTarget(), FieldEffectSourceHoldScript, MoveHandPushPoses, PerWork, Sint32, sySoundPlayStub(), sySynch(), syVectorAddPolarOffset() and TickCount.
Referenced by fdPsynergyDispatch().
Definition at line 68 of file script_commands_move.c.
fdEffectUpdateOutAndBack
void fdEffectUpdateOutAndBack(FIELD_PARTICLE *effect)
Field effect sprite callback of a particle that flies 30 pixels out from where it started, comes back and is freed.
References fdParticleFree(), fdParticleHasPendingTarget(), Sint32, syRandom() and syVectorAddPolarOffset().
Definition at line 267 of file script_commands_move.c.
fdPsynergyMove
void fdPsynergyMove(void)
When Move is cast with no target, the hand appears beside the caster for 30 ticks and then turns into particles.
References fdActorSelectAnimationStub(), fdEffectBurstHand(), fdEffectGrowHandAndWait(), fdEffectSpawnMoveHand(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), Sint32 and sySynch().
Referenced by fdPsynergyRun().
Definition at line 318 of file script_commands_move.c.
fdEffectSpawnMoveHand
void *fdEffectSpawnMoveHand(void *object)
Move's hand appears at a quarter size 16 pixels above the caster, with a crack and eight sparkles that scatter from it, and sets out 16 pixels the way the caster faces, to the nearest quarter turn.
References fdActorSelectAnimationStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), fdEffectUpdateMoveHand(), FieldEffectFragmentScript, Sint32, syRandom() and sySoundPlayStub().
Referenced by fdPsynergyMove(), fdPsynergySteerPushedTarget() and scAlhafranCaveChauchaAndEoleoVisit().
Definition at line 344 of file script_commands_move.c.
fdEffectGrowHandAndWait
void fdEffectGrowHandAndWait(ACTOR *actor)
Grows a hand to full size at once and waits for it to reach where it is going.
References fdActorWaitForMoveStub().
Referenced by fdPsynergyMove(), fdPsynergySteerPushedTarget() and scAlhafranCaveChauchaAndEoleoVisit().
Definition at line 400 of file script_commands_move.c.
fdEffectBurstHand
void fdEffectBurstHand(void *object)
The hand spins as it rises for BURST_RISE_TICKS, shrinks, and bursts into
BURST_SPARKLES sparkles (SPRITE_SPARKLE).
References fdActorReleaseStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), FieldEffectFragmentScript, Sint32, syRandom(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyLiftOnTarget(), fdPsynergyMove(), fdPsynergySteerPushedTarget() and scAlhafranCaveChauchaAndEoleoVisit().
Definition at line 427 of file script_commands_move.c.