src/field/script_commands_carry.c
Carry: two hands lift the target, move it with the d-pad and drop it. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | CARRY_SPARKLE_COUNT 20 | The sparkles Carry scatters from the target, 8 to 32 pixels out. |
Functions
| Name | Description | |
|---|---|---|
void | fdEffectSpawnFallingParticles (void) | Event while Carry holds its target: drops one particle a tick round the lifted actor, 8 to 24 pixels above it and 0 to 48 pixels away in a random direction (fdEffectInitFallingFragment). |
static __inline__ Sint32 | fdEffectCheckRaisedTargetCollision (ACTOR *target, VECTOR3 *pos) | Tests the target's move with its ground height raised 16 pixels, so a carried target passes over ground up to 24 pixels above its own (a step allows 8). |
void | fdPsynergySteerLiftedTarget (Sint32 targetId) | When Carry is cast on a target, two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is. |
DEFINE_CLAPPING_HANDS_CAST( | fdPsynergyCarry , fdEffectSpawnCarryHand) | When Carry is cast with no target, two hands appear 16 pixels above the spot in front of the caster and 32 pixels to either side, close in 24 pixels and clap, and sparkles scatter. |
ACTOR * | fdEffectSpawnCarryHand (Sint32 x, Sint32 y, Sint32 z, Sint32 angle) | Spawns a hand (SPRITE_MOVE_HAND) with the item break sound and grows it, spinning 1/8 turn a tick, from a quarter to full size over 24 ticks; angle is the way it faces once grown. |
Description
Carry: two hands lift the target, move it with the d-pad and drop it. Part of
script_commands.c.
Macros in detail
CARRY_SPARKLE_COUNT
#define CARRY_SPARKLE_COUNT 20
The sparkles Carry scatters from the target, 8 to 32 pixels out.
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 31 of file script_commands_carry.c.
Functions in detail
fdEffectSpawnFallingParticles
void fdEffectSpawnFallingParticles(void)
Event while Carry holds its target: drops one particle a tick round the
lifted actor, 8 to 24 pixels above it and 0 to 48 pixels away in a random
direction (fdEffectInitFallingFragment).
References fdActorSpawn(), fdEffectInitFallingFragment(), syRandom() and syVectorAddPolarOffset().
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 11 of file script_commands_carry.c.
fdEffectCheckRaisedTargetCollision
static __inline__ Sint32 fdEffectCheckRaisedTargetCollision(ACTOR *target, VECTOR3 *pos)
Tests the target's move with its ground height raised 16 pixels, so a carried target passes over ground up to 24 pixels above its own (a step allows 8). Restores the height before returning the collision result.
References fdMapGridCheckCollisionStub() and Sint32.
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 36 of file script_commands_carry.c.
fdPsynergySteerLiftedTarget
void fdPsynergySteerLiftedTarget(Sint32 targetId)
When Carry is cast on a target, two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is.
References fdActorCycleSpriteColors(), fdActorReleaseStub(), fdActorScriptCheckOverlapStub(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorSetSpriteColorModeStub(), fdActorSetSpriteFlagsStub(), fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), fdActorWaitForMoveStub(), fdEffectCheckRaisedTargetCollision(), fdEffectSpawnCarryHand(), fdEffectSpawnFallingParticles(), fdEffectSpawnRadialParticleRing(), fdInputGetDpadAngle(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), FieldEffectFragmentScript, FieldEffectSourceHoldScript, PerData, PerPush, Sint32, syCloseEvent(), syRandom(), sySetEvent(), sySoundPlayStub(), sySynch(), syVectorAddPolarOffset() and TickCount.
Referenced by fdPsynergyDispatch().
Definition at line 50 of file script_commands_carry.c.
fdPsynergyCarry
DEFINE_CLAPPING_HANDS_CAST(fdPsynergyCarry, fdEffectSpawnCarryHand)
When Carry is cast with no target, two hands appear 16 pixels above the spot in front of the caster and 32 pixels to either side, close in 24 pixels and clap, and sparkles scatter.
Referenced by fdPsynergyRun().
Definition at line 284 of file script_commands_carry.c.
fdEffectSpawnCarryHand
ACTOR *fdEffectSpawnCarryHand(Sint32 x, Sint32 y, Sint32 z, Sint32 angle)
Spawns a hand (SPRITE_MOVE_HAND) with the item break sound and grows it,
spinning 1/8 turn a tick, from a quarter to full size over 24 ticks; angle is
the way it faces once grown.
References fdActorSelectAnimationStub(), fdActorSpawn(), Sint32, sySoundPlayStub() and sySynch().
Referenced by fdPsynergySteerLiftedTarget().
Definition at line 289 of file script_commands_carry.c.