struct FIELD_PARTICLE
A particle a field Psynergy moves and draws: its sprite, its position and target, its speed, scale and heading, and its per-tick function.
Declared in field_particle.h.
Fields
| Name | Description | |
|---|---|---|
void * | sprite | the sprite it draws, released with it |
FIXED | x | 16.16 fixed-point pixels |
FIXED | z | 16.16 fixed-point pixels |
FIXED | targetX | 16.16 fixed-point pixels; FIELD_PARTICLE_NO_TARGET at rest |
FIXED | targetZ | 16.16 fixed-point pixels; FIELD_PARTICLE_NO_TARGET at rest |
FIXED | originX | 16.16 fixed-point pixels; where it started |
FIXED | originZ | 16.16 fixed-point pixels; where it started |
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 |
Sint16 | age | ticks |
Sint16 | callbackDelay | ticks |
Sint16 | orbitRadius | pixels |
Sint16 | orbitAngle | 1/32 turns |
Sint8 | state | the function's own step; 0 when it is given |
Sint8 | stopAtTarget | nonzero: lands on the target within 8 pixels |
Sint8 | turnStepLimited | nonzero: turns <= turnStepMax/tick; 0 faces target at once |
Sint8 | updateMotion | nonzero: fdParticleUpdateMotion moves it each tick |
Sint8 | render | nonzero: drawn each tick |
Sint8 | active | nonzero while the particle is in use |
Uint8 | randomValue | random when filled; nothing reads it |
Uint8 | flags | FIELD_PARTICLE_FLAG bits |
Description
A particle a field Psynergy moves and draws: its sprite, its position and target, its speed, scale and heading, and its per-tick function.
struct FIELD_PARTICLE
Referenced by fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectReleaseSlots(), fdEffectRunAngledApproachPhases(), fdEffectUpdateEffectSlots(), fdEffectUpdateHaltParticle(), fdEffectUpdateMarsSpark(), fdEffectUpdateOutAndBack(), fdEffectUpdateRadialBurst(), fdEffectUpdateRadialSpread(), fdEffectUpdateRandomTargetParticle(), fdParticleDraw(), fdParticleFree(), fdParticleHasPendingTarget(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdParticleSetPos(), fdParticleUpdate(), fdParticleUpdateMotion(), fdPsynergyEnd(), fdPsynergyForce(), fdPsynergyHalt(), fdPsynergyRetreat(), fdRetreatUpdateSpark(), mnSanctumRunMemberIconBurst(), mnSanctumUpdateBurstSparkle(), scAltmillerCaveReleaseWallBurst() and scAltmillerCaveUpdateWallFragment().
Definition at line 20 of file field_particle.h.
Fields in detail
sprite
void *sprite
the sprite it draws, 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;
FIELD_PARTICLE_NO_TARGET at rest
targetZ
FIXED targetZ
16.16 fixed-point pixels;
FIELD_PARTICLE_NO_TARGET at rest
originX
FIXED originX
16.16 fixed-point pixels; where it started
originZ
FIXED originZ
16.16 fixed-point pixels; where it started
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
Sint16 age
ticks
callbackDelay
Sint16 callbackDelay
ticks
orbitRadius
Sint16 orbitRadius
pixels
orbitAngle
Sint16 orbitAngle
1/32 turns
state
Sint8 state
the function's own step; 0 when it is given
stopAtTarget
Sint8 stopAtTarget
nonzero: lands on the target within 8 pixels
turnStepLimited
Sint8 turnStepLimited
nonzero: turns <= turnStepMax/tick; 0 faces target at once
updateMotion
Sint8 updateMotion
nonzero: fdParticleUpdateMotion moves it
each tick
render
Sint8 render
nonzero: drawn each tick
active
Sint8 active
nonzero while the particle is in use
randomValue
Uint8 randomValue
random when filled; nothing reads it
flags
Uint8 flags
FIELD_PARTICLE_FLAG bits