Skip to Content
The Alchemy Project

src/field/script_commands_internal.h

What every part of script_commands.c shares: its includes and the macros and types more than one part uses. More…

Included by script_commands.c.

Macros

NameDescription
#defineITEM_BREAK_SHARD_MAX 24The sparkles Lift's and Carry's hands scatter as they meet, as The Broken Seal names them.
#defineGROW_STEPS 10The steps, one a tick, in which a Psynergy's actor, Douse's rain cloud among them, grows out of the caster on its way to the target or shrinks back into it: fdEffectInterpolate's tenths.
#defineAFTERIMAGE_SCALE (toFIXED(15) / 16)The trailing copies of a moving Djinni or of Force's hand are drawn a little smaller than what they follow.
#defineDJINN_PENDING_KIND_MASK 0xf000MainRoutineStateWork.pendingDjinni's parts, as fdDjinnResolvePending reads them. bits: 15..12 kind | 11..0 script or flag.
#defineDJINN_PENDING_SCRIPT_MASK 0xfff
#defineDJINN_PENDING_BATTLE_SCRIPT_MASK 0x7ffA Djinni battle's script without DJINN_NO_HOP.

Enumerations

NameDescription
enumVENUS_PARTICLE_STATE { VENUS_PARTICLE_AIM, VENUS_PARTICLE_RISING, VENUS_PARTICLE_LA … }The states of a Venus Djinni's rising particle (fdEffectUpdateRadialSpread), which fdDjinnRunVenusJoinEffect moves on to VENUS_PARTICLE_LAST_RISE.
enumMERCURY_DROPLET_STATE { MERCURY_DROPLET_AIM, MERCURY_DROPLET_FALLING, MERCURY_DROPLE … }The states of a Mercury Djinni's droplet (fdEffectUpdateRandomTargetParticle), which fdDjinnRunMercuryJoinEffect moves on to MERCURY_DROPLET_LAST_FALL.
enumMARS_SPARK_STATE { MARS_SPARK_AIM, MARS_SPARK_RISING, MARS_SPARK_STOPPING, MARS … }The states of a Mars Djinni's spark (fdEffectUpdateMarsSpark), which fdDjinnRunMarsJoinEffect moves on to MARS_SPARK_STOPPING and then MARS_SPARK_LEAVING.

Functions

NameDescription
static inline voidfdEffectInitFallingFragment (ACTOR *fragment)Move's hand and Carry shed the same short-lived falling particle: it falls under a gravity of 0.1 pixel a tick, each tick, and is freed after 12 ticks.

Description

What every part of script_commands.c shares: its includes and the macros and types more than one part uses. script_commands.c includes it before the parts, and each part includes it too, so that a part read on its own resolves. It places no bytes.

Macros in detail

ITEM_BREAK_SHARD_MAX

#define ITEM_BREAK_SHARD_MAX 24

The sparkles Lift's and Carry's hands scatter as they meet, as The Broken Seal names them.

Referenced by fdPsynergyCarry() and fdPsynergyLift().

Definition at line 44 of file script_commands_internal.h.

GROW_STEPS

#define GROW_STEPS 10

The steps, one a tick, in which a Psynergy's actor, Douse's rain cloud among them, grows out of the caster on its way to the target or shrinks back into it: fdEffectInterpolate's tenths.

Referenced by fdPsynergyDouse(), fdPsynergyGrowFromCaster() and fdPsynergyShrinkToCaster().

Definition at line 49 of file script_commands_internal.h.

AFTERIMAGE_SCALE

#define AFTERIMAGE_SCALE (toFIXED(15) / 16)

The trailing copies of a moving Djinni or of Force's hand are drawn a little smaller than what they follow.

Referenced by fdDjinnRunBattleStartHop(), fdDjinnRunMercuryJoinEffect() and fdPsynergyForce().

Definition at line 106 of file script_commands_internal.h.

DJINN_PENDING_KIND_MASK

#define DJINN_PENDING_KIND_MASK 0xf000

MainRoutineStateWork.pendingDjinni's parts, as fdDjinnResolvePending reads them. bits: 15..12 kind | 11..0 script or flag.

Referenced by fdDjinnResolvePending() and fdDjinnRestoreActorAfterBattle().

Definition at line 110 of file script_commands_internal.h.

DJINN_PENDING_SCRIPT_MASK

#define DJINN_PENDING_SCRIPT_MASK 0xfff

Referenced by fdDjinnResolvePending() and fdDjinnRestoreActorAfterBattle().

Definition at line 111 of file script_commands_internal.h.

DJINN_PENDING_BATTLE_SCRIPT_MASK

#define DJINN_PENDING_BATTLE_SCRIPT_MASK 0x7ff

A Djinni battle's script without DJINN_NO_HOP.

Referenced by fdDjinnResolvePending() and fdDjinnRestoreActorAfterBattle().

Definition at line 113 of file script_commands_internal.h.

Enumerations in detail

VENUS_PARTICLE_STATE

enum VENUS_PARTICLE_STATE

The states of a Venus Djinni's rising particle (fdEffectUpdateRadialSpread), which fdDjinnRunVenusJoinEffect moves on to VENUS_PARTICLE_LAST_RISE.

EnumeratorValueDescription
VENUS_PARTICLE_AIM0starts round the leader, aimed up the screen
VENUS_PARTICLE_RISING1back to VENUS_PARTICLE_AIM once it arrives
VENUS_PARTICLE_LAST_RISE2freed once it arrives

Definition at line 68 of file script_commands_internal.h.

MERCURY_DROPLET_STATE

enum MERCURY_DROPLET_STATE

The states of a Mercury Djinni's droplet (fdEffectUpdateRandomTargetParticle), which fdDjinnRunMercuryJoinEffect moves on to MERCURY_DROPLET_LAST_FALL.

EnumeratorValueDescription
MERCURY_DROPLET_AIM0placed above the leader, aimed at a spot by it
MERCURY_DROPLET_FALLING1Splashes where it lands, then falls again (MERCURY_DROPLET_AIM).
MERCURY_DROPLET_LAST_FALL2Splashes where it lands, for the last time.
MERCURY_DROPLET_DONE3frees its slot

Definition at line 79 of file script_commands_internal.h.

MARS_SPARK_STATE

enum MARS_SPARK_STATE

The states of a Mars Djinni's spark (fdEffectUpdateMarsSpark), which fdDjinnRunMarsJoinEffect moves on to MARS_SPARK_STOPPING and then MARS_SPARK_LEAVING.

EnumeratorValueDescription
MARS_SPARK_AIM0aimed 120 pixels up the screen from its origin
MARS_SPARK_RISING1back to MARS_SPARK_AIM once it arrives
MARS_SPARK_STOPPING2Stops where it arrives, hidden, and waits 40 ticks
MARS_SPARK_AIM_LEADER3aimed at a point by the leader
MARS_SPARK_SWARMING4back to MARS_SPARK_AIM_LEADER on arrival
MARS_SPARK_LEAVING5freed once it arrives

Definition at line 93 of file script_commands_internal.h.

Functions in detail

fdEffectInitFallingFragment

static inline void fdEffectInitFallingFragment(ACTOR *fragment)

Move's hand and Carry shed the same short-lived falling particle: it falls under a gravity of 0.1 pixel a tick, each tick, and is freed after 12 ticks.

References fdActorSelectAnimationStub(), fdActorStartScriptStub() and FieldEffectReleaseScript.

Referenced by fdEffectSpawnFallingParticles() and fdEffectUpdateMoveHand().

Definition at line 53 of file script_commands_internal.h.