Skip to Content
The Alchemy Project

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

NameDescription
void *spritethe sprite it draws (SPR), released with it
FIXEDx16.16 fixed-point pixels
FIXEDz16.16 fixed-point pixels
FIXEDtargetX16.16 fixed-point pixels; EFFECT_NO_TARGET at rest
FIXEDtargetZ16.16 fixed-point pixels; EFFECT_NO_TARGET at rest
FIXEDoriginX16.16 fixed-point pixels
FIXEDoriginZ16.16 fixed-point pixels
FIXEDspeed16.16 fixed-point pixels per tick
FIXEDspeedMax16.16 fixed-point pixels per tick
FIXEDacceleration16.16 fixed-point pixels per tick, each tick
FIXEDscaleX16.16 fixed point, toFIXED(1) full size
FIXEDscaleY16.16 fixed point, toFIXED(1) full size
Uint16heading1/65536 turns
Sint16turnStepMax1/65536 turns a tick
EFFECT_CALLBACKcallbackrun each tick once callbackDelay is 0
Uint16ageticks
Sint16callbackDelayticks
Sint16orbitRadiuspixels
Sint16orbitAngle1/32 turns
Sint8statethe callback's own step
Sint8stopAtTargetnonzero: lands on the target within 8 pixels
Sint8turnStepLimitednonzero: turns <= turnStepMax/tick; 0: faces target directly
Sint8updateMotionnonzero: fdParticleUpdateMotion moves it each tick
Sint8rendernonzero: drawn each tick
Sint8activenonzero while the slot is in use
Uint8randomValuenot read by name
Uint8flagsFIELD_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

FIELD_PARTICLE_LIFTED_BY_Z