Skip to Content
The Alchemy Project

include/field/field_psynergy_state.h

The field Psynergy's state (FIELD_EFFECT_STATE) and its particle.

Included by level.c, field_engine_psynergy.c, field_psynergy_internal.h, script_commands_internal.h, caverns.c, magma_rock.c, field_psynergy.h and scene.h.

Structures

NameDescription
structFIELD_PSYNERGY_PARTICLEA particle of a field Psynergy's effect: its place and velocity, in 16.16 pixels on the field or on the screen, and the ticks since it began (negative before it starts, or while it is free).
structSCOOP_STATEScoop's state (heap slot HEAP_SLOT_BATTLE_EFFECT): the dust and sparkle tiles, the picture that ripples as the ground is dug, 64 particles, the sprite that digs and the one left where it dug, and the stage of the cast.
structFIELD_EFFECT_STATEThe state of a field Psynergy (heap slot HEAP_SLOT_FIELD_EFFECT): its caster and target, where it takes place, the map state it restores, its field effect sprites and the sprite and stage a lasting Psynergy keeps.

Macros

NameDescription
#definePSYNERGY_SCRIPT_LAST_TICK 999The tick a scene's Psynergy script is given once the cast has ended (fdRunPsynergyScript, as Burst passes it): its last call.
#definePSYNERGY_EFFECT_SLOT_COUNT 24The effect sprites a field Psynergy has (FIELD_EFFECT_STATE.particles).
#defineSCOOP_DUG_TICK 30The tick of Scoop's dig at which the ground is dug, its stage 1 (fdPsynergyScoop).
#defineSCOOP_PARTICLE_COUNT 64The particles of dust and sparkles Scoop throws up.
#defineSCOOP_PICTURE_SIZE 32The earth that rises as the ground is dug, 32 pixels square in 256 colours.

Functions

NameDescription
static __inline__ Sint32fdEffectInterpolate (Sint32 to, Sint32 from, Sint32 step)Returns the value step tenths of the way from from to to; the field Psynergy that uses it steps from 0 to 10, one a tick.

Description

The field Psynergy's state (FIELD_EFFECT_STATE) and its particle.

Macros in detail

PSYNERGY_SCRIPT_LAST_TICK

#define PSYNERGY_SCRIPT_LAST_TICK 999

The tick a scene's Psynergy script is given once the cast has ended (fdRunPsynergyScript, as Burst passes it): its last call.

Referenced by scEasternAlhafraBurstMastBlock(), scMagmaRockBlastWayIn(), scMagmaRockBurstCrackedPillar() and scMagmaRockInsideBurstCrackedPillar().

Definition at line 17 of file field_psynergy_state.h.

PSYNERGY_EFFECT_SLOT_COUNT

#define PSYNERGY_EFFECT_SLOT_COUNT 24

The effect sprites a field Psynergy has (FIELD_EFFECT_STATE.particles).

Referenced by fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect() and fdPsynergyRetreat().

Definition at line 34 of file field_psynergy_state.h.

SCOOP_DUG_TICK

#define SCOOP_DUG_TICK 30

The tick of Scoop's dig at which the ground is dug, its stage 1 (fdPsynergyScoop).

Referenced by fdPsynergyScoop() and scGondowanCliffsScoopUpGeyser().

Definition at line 37 of file field_psynergy_state.h.

SCOOP_PARTICLE_COUNT

#define SCOOP_PARTICLE_COUNT 64

The particles of dust and sparkles Scoop throws up.

Referenced by fdPsynergyScoop() and fdScoopUpdate().

Definition at line 40 of file field_psynergy_state.h.

SCOOP_PICTURE_SIZE

#define SCOOP_PICTURE_SIZE 32

The earth that rises as the ground is dug, 32 pixels square in 256 colours.

Referenced by fdScoopUpdate().

Definition at line 42 of file field_psynergy_state.h.

Functions in detail

fdEffectInterpolate

static __inline__ Sint32 fdEffectInterpolate(Sint32 to, Sint32 from, Sint32 step)

Returns the value step tenths of the way from from to to; the field Psynergy that uses it steps from 0 to 10, one a tick.

References Sint32.

Referenced by fdPsynergyDouse() and fdPsynergyHalt().

Definition at line 185 of file field_psynergy_state.h.