Skip to Content
The Alchemy Project

struct FIELD_EFFECT

A field effect: a small actor on the field that moves at its velocity and grows and spins at its rates, run by its script and update function.

Declared in field_effect.h.

Fields

NameDescription
const Sint32 *scriptActor's script pointer, cursor and facing; not named by this view.
Uint16scriptCursor
Uint16facing
FIXEDx16.16 fixed-point pixels.
FIXEDy16.16 fixed-point pixels.
FIXEDz16.16 fixed-point pixels.
Sint32groundHeightActor's; not named by this view.
FIXEDscaleX16.16 fixed point, toFIXED(1) full size.
FIXEDscaleY16.16 fixed point, toFIXED(1) full size.
Uint16radiusActor's; not named by this view.
Uint8layerActor's; not named by this view.
Uint8priorityFlagsACTOR_PRIORITY_FLAG bits: the spawner clears ACTOR_PRIORITY_AUTOMATIC when EFFECT_USE_PRIORITY sets the sprite's priority.
VECTOR3objectVelocityActor's velocityX to velocityZ; effects move by velocity instead.
FIXEDscaleRateXAdded to scaleX each tick by the update
Sint32scaleRateYfunctions, in 16.16 fixed point a tick; zeroed by the spawner.
Sint32targetXActor's targetX to targetZ; not named by this view.
Sint32targetY
Sint32targetZ
VECTOR3velocityAdded to x, y and z each tick by the update functions, in 16.16 fixed-point pixels per tick; Actor's bounce, gravity and sceneWord.
SPR *spriteThe sprite spin turns.
Uint8spriteStorageKindActor's; not named by this view.
Uint8motionFlagsACTOR_MOTION_FLAG bits; zeroed by the spawner.
Uint8arrivalAxisActor's arrival axis, last flag test and snap flag; not named by this view.
Uint8conditionResult
Uint8snapToTarget
Uint8collisionFlagsActor's collisionFlags; not named by this view.
Uint8steeringFlagsActor's steeringFlags to sceneByte; not named by this view.
Uint8paused
Uint8retainSpriteCache
Uint8repeatCount
Uint16wait
Uint8refused
Uint8frozen
Uint8sceneCount
Uint8sceneByte
Uint16spinAdded to the sprite's rotation each tick by the update functions, in 1/65536 turns per tick; Imil's rising effects keep a drift here instead.
Sint16userValueActor's; not named by this view.
Sint32countdownTicks until a scene's update function releases the effect: 20 for Altin Peak's spray, 60 for Imil's rising effects.
void (*update )(ACTOR *actor)Called each tick while the effect is live: the spawner sets scFieldEffectUpdateMotionScaleAndSpin, or options.update.

Description

A field effect: a small actor on the field that moves at its velocity and grows and spins at its rates, run by its script and update function.

struct FIELD_EFFECT

Referenced by scAltinBeastHop(), scAltinBeastSpewWater(), scAltinDriftSpew(), scAltinPeakDriftSpit(), scAltinPeakFirstBeastHopsAway(), scAltinPeakShowFirstBeastRoute(), scAltinPeakSpawnSpit(), scAltinPeakUpdateBeastHops(), scCrossboneIsleSteppingStonesUpdateDampedParticle(), scFieldEffectAdvanceMotion(), scFieldEffectInitMotion(), scFieldEffectUpdateMotionScaleAndSpin(), scFuchinFallsCaveUpdateDustMotion(), scImilDriftSmoke(), scImilFuchinFallsSpawnDust(), scImilStartSmoke(), scSolSanctumStartFloatingLights(), scVenusLighthouseAerieCombineSaturosAndMenardi(), scVenusLighthouseAerieUpdateDriftingParticle() and scVenusLighthouseAerieUpdateOrbitingEffect().

Definition at line 14 of file field_effect.h.

Fields in detail

script

const Sint32 *script

Actor's script pointer, cursor and facing; not named by this view.

scriptCursor

Uint16 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; not named by this view.

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; not named by this view.

layer

Uint8 layer

Actor's; not named by this view.

priorityFlags

Uint8 priorityFlags

ACTOR_PRIORITY_FLAG bits: the spawner clears ACTOR_PRIORITY_AUTOMATIC 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

scaleRateY

Sint32 scaleRateY

functions, in 16.16 fixed point a tick; zeroed by the spawner.

targetX

Sint32 targetX

Actor's targetX to targetZ; not named by this view.

targetY

Sint32 targetY

targetZ

Sint32 targetZ

velocity

VECTOR3 velocity

Added to x, y and z each tick by the update functions, in 16.16 fixed-point pixels per tick; Actor's bounce, gravity and sceneWord.

sprite

SPR *sprite

The sprite spin turns.

spriteStorageKind

Uint8 spriteStorageKind

Actor's; not named by this view.

motionFlags

Uint8 motionFlags

ACTOR_MOTION_FLAG bits; zeroed by the spawner.

arrivalAxis

Uint8 arrivalAxis

Actor's arrival axis, last flag test and snap flag; not named by this view.

conditionResult

Uint8 conditionResult

snapToTarget

Uint8 snapToTarget

collisionFlags

Uint8 collisionFlags

Actor's collisionFlags; not named by this view.

steeringFlags

Uint8 steeringFlags

Actor's steeringFlags to sceneByte; not named by this view.

paused

Uint8 paused

retainSpriteCache

Uint8 retainSpriteCache

repeatCount

Uint8 repeatCount

wait

Uint16 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 functions, in 1/65536 turns per tick; Imil's rising effects keep a drift here instead.

userValue

Sint16 userValue

Actor's; not named by this view.

countdown

Sint32 countdown

Ticks until a scene's update function releases the effect: 20 for Altin Peak's spray, 60 for Imil's rising effects.

update

void (*update)(ACTOR *actor)

Called each tick while the effect is live: the spawner sets scFieldEffectUpdateMotionScaleAndSpin, or options.update.