struct FIELD_EFFECT
A field effect: a small actor on the field that moves at its velocity and grows and spins at its rates, run by its script and update function.
Declared in field_effect.h.
Fields
| Name | Description | |
|---|---|---|
const Sint32 * | script | Actor's script pointer, cursor and facing; not named by this view. |
Uint16 | scriptCursor | |
Uint16 | facing | |
FIXED | x | 16.16 fixed-point pixels. |
FIXED | y | 16.16 fixed-point pixels. |
FIXED | z | 16.16 fixed-point pixels. |
Sint32 | groundHeight | Actor's; not named by this view. |
FIXED | scaleX | 16.16 fixed point, toFIXED(1) full size. |
FIXED | scaleY | 16.16 fixed point, toFIXED(1) full size. |
Uint16 | radius | Actor's; not named by this view. |
Uint8 | layer | Actor's; not named by this view. |
Uint8 | priorityFlags | ACTOR_PRIORITY_FLAG bits: the spawner clears ACTOR_PRIORITY_AUTOMATIC when EFFECT_USE_PRIORITY sets the sprite's priority. |
VECTOR3 | objectVelocity | Actor's velocityX to velocityZ; effects move by velocity instead. |
FIXED | scaleRateX | Added to scaleX each tick by the update |
Sint32 | scaleRateY | functions, in 16.16 fixed point a tick; zeroed by the spawner. |
Sint32 | targetX | Actor's targetX to targetZ; not named by this view. |
Sint32 | targetY | |
Sint32 | targetZ | |
VECTOR3 | velocity | Added to x, y and z each tick by the update functions, in 16.16 fixed-point pixels per tick; Actor's bounce, gravity and sceneWord. |
SPR * | sprite | The sprite spin turns. |
Uint8 | spriteStorageKind | Actor's; not named by this view. |
Uint8 | motionFlags | ACTOR_MOTION_FLAG bits; zeroed by the spawner. |
Uint8 | arrivalAxis | Actor's arrival axis, last flag test and snap flag; not named by this view. |
Uint8 | conditionResult | |
Uint8 | snapToTarget | |
Uint8 | collisionFlags | Actor's collisionFlags; not named by this view. |
Uint8 | steeringFlags | Actor's steeringFlags to sceneByte; not named by this view. |
Uint8 | paused | |
Uint8 | retainSpriteCache | |
Uint8 | repeatCount | |
Uint16 | wait | |
Uint8 | refused | |
Uint8 | frozen | |
Uint8 | sceneCount | |
Uint8 | sceneByte | |
Uint16 | spin | Added to the sprite's rotation each tick by the update functions, in 1/65536 turns per tick; Imil's rising effects keep a drift here instead. |
Sint16 | userValue | Actor's; not named by this view. |
Sint32 | countdown | Ticks until a scene's update function releases the effect: 20 for Altin Peak's spray, 60 for Imil's rising effects. |
void (* | update )(ACTOR *actor) | Called each tick while the effect is live: the spawner sets scFieldEffectUpdateMotionScaleAndSpin, or options.update. |
Description
A field effect: a small actor on the field that moves at its velocity and grows and spins at its rates, run by its script and update function.
struct FIELD_EFFECT
Referenced by scAltinBeastHop(), scAltinBeastSpewWater(), scAltinDriftSpew(), scAltinPeakDriftSpit(), scAltinPeakFirstBeastHopsAway(), scAltinPeakShowFirstBeastRoute(), scAltinPeakSpawnSpit(), scAltinPeakUpdateBeastHops(), scCrossboneIsleSteppingStonesUpdateDampedParticle(), scFieldEffectAdvanceMotion(), scFieldEffectInitMotion(), scFieldEffectUpdateMotionScaleAndSpin(), scFuchinFallsCaveUpdateDustMotion(), scImilDriftSmoke(), scImilFuchinFallsSpawnDust(), scImilStartSmoke(), scSolSanctumStartFloatingLights(), scVenusLighthouseAerieCombineSaturosAndMenardi(), scVenusLighthouseAerieUpdateDriftingParticle() and scVenusLighthouseAerieUpdateOrbitingEffect().
Definition at line 14 of file field_effect.h.
Fields in detail
script
const Sint32 *script
Actor's script pointer, cursor and facing; not named by this view.
scriptCursor
Uint16 scriptCursor
facing
Uint16 facing
x
FIXED x
16.16 fixed-point pixels.
y
FIXED y
16.16 fixed-point pixels.
z
FIXED z
16.16 fixed-point pixels.
groundHeight
Sint32 groundHeight
Actor's; not named by this view.
scaleX
FIXED scaleX
16.16 fixed point, toFIXED(1) full size.
scaleY
FIXED scaleY
16.16 fixed point, toFIXED(1) full size.
radius
Uint16 radius
Actor's; not named by this view.
layer
Uint8 layer
Actor's; not named by this view.
priorityFlags
Uint8 priorityFlags
ACTOR_PRIORITY_FLAG bits: the spawner
clears ACTOR_PRIORITY_AUTOMATIC when
EFFECT_USE_PRIORITY sets the sprite's
priority.
objectVelocity
VECTOR3 objectVelocity
Actor's velocityX to velocityZ; effects move by velocity instead.
scaleRateX
FIXED scaleRateX
Added to scaleX each tick by the update
scaleRateY
Sint32 scaleRateY
functions, in 16.16 fixed point a tick; zeroed by the spawner.
targetX
Sint32 targetX
Actor's targetX to targetZ; not named by this view.
targetY
Sint32 targetY
targetZ
Sint32 targetZ
velocity
VECTOR3 velocity
Added to x, y and z each tick by the update functions, in 16.16 fixed-point pixels per tick; Actor's bounce, gravity and sceneWord.
sprite
SPR *sprite
The sprite spin turns.
spriteStorageKind
Uint8 spriteStorageKind
Actor's; not named by this view.
motionFlags
Uint8 motionFlags
ACTOR_MOTION_FLAG bits; zeroed by the
spawner.
arrivalAxis
Uint8 arrivalAxis
Actor's arrival axis, last flag test and snap flag; not named by this view.
conditionResult
Uint8 conditionResult
snapToTarget
Uint8 snapToTarget
collisionFlags
Uint8 collisionFlags
Actor's collisionFlags; not named by this view.
steeringFlags
Uint8 steeringFlags
Actor's steeringFlags to sceneByte; not named by this view.
paused
Uint8 paused
retainSpriteCache
Uint8 retainSpriteCache
repeatCount
Uint8 repeatCount
wait
Uint16 wait
refused
Uint8 refused
frozen
Uint8 frozen
sceneCount
Uint8 sceneCount
sceneByte
Uint8 sceneByte
spin
Uint16 spin
Added to the sprite's rotation each tick by the update functions, in 1/65536 turns per tick; Imil's rising effects keep a drift here instead.
userValue
Sint16 userValue
Actor's; not named by this view.
countdown
Sint32 countdown
Ticks until a scene's update function releases the effect: 20 for Altin Peak's spray, 60 for Imil's rising effects.
update
void (*update)(ACTOR *actor)
Called each tick while the effect is live:
the spawner sets
scFieldEffectUpdateMotionScaleAndSpin, or
options.update.