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…
#include "battle/battle.h"#include "field/field.h"#include "field/stubs.h"#include "field/field_effect_scripts.h"#include "game/game.h"#include "graphics/graphics.h"#include "system.h"#include "game/main_routine_state.h"#include "menu/menu.h"#include "sound/sound.h"#include "field/field_engine_script.h"#include "field/actor.h"#include "field/field_sprite.h"#include "edition.h"#include "types.h"#include "debug/debug.h"#include "macros.h"#include "window/window.h"#include "field/map_grid.h"#include "fixed_math.h"#include "field/hanging_vine.h"#include "graphics/display_transition.h"#include "graphics/palette_buffers.h"#include "field/field_blend.h"#include "field/field_coordinate.h"#include "battle/battle_actor.h"#include "field/sprite.h"#include "field/field_particle.h"#include "field/field_psynergy_state.h"#include "field/scene_tables.h"#include "field/weather.h"
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | ITEM_BREAK_SHARD_MAX 24 | The sparkles Lift's and Carry's hands scatter as they meet, as The Broken Seal names them. |
#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. |
#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. |
#define | DJINN_PENDING_KIND_MASK 0xf000 | MainRoutineStateWork.pendingDjinni's parts, as fdDjinnResolvePending reads them. bits: 15..12 kind | 11..0 script or flag. |
#define | DJINN_PENDING_SCRIPT_MASK 0xfff | |
#define | DJINN_PENDING_BATTLE_SCRIPT_MASK 0x7ff | A Djinni battle's script without DJINN_NO_HOP. |
Enumerations
| Name | Description | |
|---|---|---|
enum | VENUS_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. |
enum | MERCURY_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. |
enum | MARS_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
| Name | Description | |
|---|---|---|
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. |
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.
| Enumerator | Value | Description |
|---|---|---|
VENUS_PARTICLE_AIM | 0 | starts round the leader, aimed up the screen |
VENUS_PARTICLE_RISING | 1 | back to VENUS_PARTICLE_AIM once it arrives |
VENUS_PARTICLE_LAST_RISE | 2 | freed 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.
| Enumerator | Value | Description |
|---|---|---|
MERCURY_DROPLET_AIM | 0 | placed above the leader, aimed at a spot by it |
MERCURY_DROPLET_FALLING | 1 | Splashes where it lands, then falls again (MERCURY_DROPLET_AIM). |
MERCURY_DROPLET_LAST_FALL | 2 | Splashes where it lands, for the last time. |
MERCURY_DROPLET_DONE | 3 | frees 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.
| Enumerator | Value | Description |
|---|---|---|
MARS_SPARK_AIM | 0 | aimed 120 pixels up the screen from its origin |
MARS_SPARK_RISING | 1 | back to MARS_SPARK_AIM once it arrives |
MARS_SPARK_STOPPING | 2 | Stops where it arrives, hidden, and waits 40 ticks |
MARS_SPARK_AIM_LEADER | 3 | aimed at a point by the leader |
MARS_SPARK_SWARMING | 4 | back to MARS_SPARK_AIM_LEADER on arrival |
MARS_SPARK_LEAVING | 5 | freed 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.