Skip to Content
The Alchemy Project

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

NameDescription
void *spritethe sprite it draws, released with it
FIXEDx16.16 fixed-point pixels
FIXEDz16.16 fixed-point pixels
FIXEDtargetX16.16 fixed-point pixels; FIELD_PARTICLE_NO_TARGET at rest
FIXEDtargetZ16.16 fixed-point pixels; FIELD_PARTICLE_NO_TARGET at rest
FIXEDoriginX16.16 fixed-point pixels; where it started
FIXEDoriginZ16.16 fixed-point pixels; where it started
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
Sint16ageticks
Sint16callbackDelayticks
Sint16orbitRadiuspixels
Sint16orbitAngle1/32 turns
Sint8statethe function's own step; 0 when it is given
Sint8stopAtTargetnonzero: lands on the target within 8 pixels
Sint8turnStepLimitednonzero: turns <= turnStepMax/tick; 0 faces target at once
Sint8updateMotionnonzero: fdParticleUpdateMotion moves it each tick
Sint8rendernonzero: drawn each tick
Sint8activenonzero while the particle is in use
Uint8randomValuerandom when filled; nothing reads it
Uint8flagsFIELD_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