struct FIELD_PARTICLE
A particle a Psynergy effect moves and draws: its sprite, its position and target, its speed, scale and heading, and its per-tick callback.
Declared in field_particle.h.
Fields
| Name | Description | |
|---|---|---|
void * | sprite | the sprite it draws (SPR), released with it |
FIXED | x | 16.16 fixed-point pixels |
FIXED | z | 16.16 fixed-point pixels |
FIXED | targetX | 16.16 fixed-point pixels; EFFECT_NO_TARGET at rest |
FIXED | targetZ | 16.16 fixed-point pixels; EFFECT_NO_TARGET at rest |
FIXED | originX | 16.16 fixed-point pixels |
FIXED | originZ | 16.16 fixed-point pixels |
FIXED | speed | 16.16 fixed-point pixels per tick |
FIXED | speedMax | 16.16 fixed-point pixels per tick |
FIXED | acceleration | 16.16 fixed-point pixels per tick, each tick |
FIXED | scaleX | 16.16 fixed point, toFIXED(1) full size |
FIXED | scaleY | 16.16 fixed point, toFIXED(1) full size |
Uint16 | heading | 1/65536 turns |
Sint16 | turnStepMax | 1/65536 turns a tick |
EFFECT_CALLBACK | callback | run each tick once callbackDelay is 0 |
Uint16 | age | ticks |
Sint16 | callbackDelay | ticks |
Sint16 | orbitRadius | pixels |
Sint16 | orbitAngle | 1/32 turns |
Sint8 | state | the callback's own step |
Sint8 | stopAtTarget | nonzero: lands on the target within 8 pixels |
Sint8 | turnStepLimited | nonzero: turns <= turnStepMax/tick; 0: faces target directly |
Sint8 | updateMotion | nonzero: fdParticleUpdateMotion moves it each tick |
Sint8 | render | nonzero: drawn each tick |
Sint8 | active | nonzero while the slot is in use |
Uint8 | randomValue | not read by name |
Uint8 | flags | FIELD_PARTICLE_LIFTED_BY_Z |
Description
A particle a Psynergy effect moves and draws: its sprite, its position and target, its speed, scale and heading, and its per-tick callback.
struct FIELD_PARTICLE
Referenced by fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectReleaseSlots(), fdEffectRunAngledApproachPhases(), fdEffectUpdateHaltParticle(), fdEffectUpdateMarsSpark(), fdEffectUpdateOutAndBack(), fdEffectUpdateRadialBurst(), fdEffectUpdateRadialSpread(), fdEffectUpdateRandomTargetParticle(), fdParticleDraw(), fdParticleFree(), fdParticleHasPendingTarget(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdParticleSetPos(), fdParticleUpdate(), fdParticleUpdateMotion(), fdPsynergyEnd(), fdPsynergyForce(), fdPsynergyHalt(), fdPsynergyRetreat(), fdRetreatUpdateSpark(), mnSanctumRunMemberIconBurst() and mnSanctumUpdateBurstSparkle().
Definition at line 19 of file field_particle.h.
Fields in detail
sprite
void *sprite
the sprite it draws (SPR), released with it
x
FIXED x
16.16 fixed-point pixels
z
FIXED z
16.16 fixed-point pixels
targetX
FIXED targetX
16.16 fixed-point pixels;
EFFECT_NO_TARGET at rest
targetZ
FIXED targetZ
16.16 fixed-point pixels;
EFFECT_NO_TARGET at rest
originX
FIXED originX
16.16 fixed-point pixels
originZ
FIXED originZ
16.16 fixed-point pixels
speed
FIXED speed
16.16 fixed-point pixels per tick
speedMax
FIXED speedMax
16.16 fixed-point pixels per tick
acceleration
FIXED acceleration
16.16 fixed-point pixels per tick, each tick
scaleX
FIXED scaleX
16.16 fixed point, toFIXED(1) full size
scaleY
FIXED scaleY
16.16 fixed point, toFIXED(1) full size
heading
Uint16 heading
1/65536 turns
turnStepMax
Sint16 turnStepMax
1/65536 turns a tick
callback
EFFECT_CALLBACK callback
run each tick once callbackDelay is 0
age
Uint16 age
ticks
callbackDelay
Sint16 callbackDelay
ticks
orbitRadius
Sint16 orbitRadius
pixels
orbitAngle
Sint16 orbitAngle
1/32 turns
state
Sint8 state
the callback's own step
stopAtTarget
Sint8 stopAtTarget
nonzero: lands on the target within 8 pixels
turnStepLimited
Sint8 turnStepLimited
nonzero: turns <= turnStepMax/tick; 0: faces target directly
updateMotion
Sint8 updateMotion
nonzero: fdParticleUpdateMotion moves it
each tick
render
Sint8 render
nonzero: drawn each tick
active
Sint8 active
nonzero while the slot is in use
randomValue
Uint8 randomValue
not read by name
flags
Uint8 flags