struct FIELD_EFFECT
A field effect: a small object on the field that moves at its velocity and grows and spins at its rates, run by its script and update hook. More…
Declared in field_effect.h.
Fields
| Name | Description | |
|---|---|---|
const Sint32 * | script | Actor's script pointer, cursor and facing. |
Sint16 | 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. |
FIXED | scaleX | 16.16 fixed point, toFIXED(1) full size. |
FIXED | scaleY | 16.16 fixed point, toFIXED(1) full size. |
Uint16 | radius | Actor's. |
Uint8 | layer | Actor's. |
Uint8 | priorityFlags | The spawner clears bit 0 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 hooks, in 16.16 fixed point a tick; zeroed by the spawner. |
Sint32 | scaleRateY | As scaleRateX, for scaleY. |
Sint32 | targetX | Actor's targetX to targetZ. |
Sint32 | targetY | |
Sint32 | targetZ | |
VECTOR3 | velocity | Added to x, y and z each tick by the update hooks, in 16.16 fixed-point pixels per tick. |
FIELD_SPR * | sprite | The sprite spin turns. |
Uint8 | spriteStorageKind | Actor's. |
Uint8 | motionFlags | Zeroed by the spawner. |
Uint8 | arrivalAxis | Actor's arrival axis, last flag test and snap flag. |
Uint8 | conditionResult | |
Uint8 | snapToTarget | |
Uint8 | collisionFlags | Actor's. |
Uint8 | steeringFlags | Actor's steeringFlags to sceneByte. |
Uint8 | paused | |
Uint8 | retainSpriteCache | |
Uint8 | repeatCount | |
Sint16 | wait | |
Uint8 | refused | |
Uint8 | frozen | |
Uint8 | sceneCount | |
Uint8 | sceneByte | |
Uint16 | spin | Added to the sprite's rotation each tick by the update hooks, in 1/65536 turns per tick; zeroed by the spawner. |
Sint16 | userValue | Actor's. |
Sint32 | countdown | No code names it. |
void (* | update )( union FIELD_OBJECT *object) | Called each tick while the effect is |
Description
A field effect: a small object on the field that moves at its velocity and
grows and spins at its rates, run by its script and update hook. It lies over
ACTOR; a field marked "Actor's" is the actor's field of that place and name,
which no code reads through this struct.
struct FIELD_EFFECT
Referenced by EFFECT_SPAWN, fdEffectAdvanceMotion(), fdEffectSpawnResident(), scCavernsDriftDust(), scDehkanPlateauCrackPillar(), scDustBurst(), scDustScatter(), scEffectAdvanceMotionAndSpin(), scEffectAdvanceMotionAtLeaderPriority(), scEffectAdvanceMotionLocal(), scFieldEffectSpawn(), scFieldEffectSpawnLocal(), scMagmaRockInsideSpawnDustRing(), scMagmaRockSpawnDustRing() and scTrialRoadDriftDust().
Definition at line 20 of file field_effect.h.
Fields in detail
script
const Sint32 *script
Actor's script pointer, cursor and facing.
scriptCursor
Sint16 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.
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.
layer
Uint8 layer
Actor's.
priorityFlags
Uint8 priorityFlags
The spawner clears bit 0 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 hooks, in 16.16 fixed point a tick; zeroed by the spawner.
scaleRateY
Sint32 scaleRateY
As scaleRateX, for scaleY.
targetX
Sint32 targetX
Actor's targetX to targetZ.
targetY
Sint32 targetY
targetZ
Sint32 targetZ
velocity
VECTOR3 velocity
Added to x, y and z each tick by the update hooks, in 16.16 fixed-point pixels per tick.
sprite
FIELD_SPR *sprite
The sprite spin turns.
spriteStorageKind
Uint8 spriteStorageKind
Actor's.
motionFlags
Uint8 motionFlags
Zeroed by the spawner.
arrivalAxis
Uint8 arrivalAxis
Actor's arrival axis, last flag test and snap flag.
conditionResult
Uint8 conditionResult
snapToTarget
Uint8 snapToTarget
collisionFlags
Uint8 collisionFlags
Actor's.
steeringFlags
Uint8 steeringFlags
Actor's steeringFlags to sceneByte.
paused
Uint8 paused
retainSpriteCache
Uint8 retainSpriteCache
repeatCount
Uint8 repeatCount
wait
Sint16 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 hooks, in 1/65536 turns per tick; zeroed by the spawner.
userValue
Sint16 userValue
Actor's.
countdown
Sint32 countdown
No code names it.
update
void (*update)( union FIELD_OBJECT *object)
Called each tick while the effect is