Skip to Content
The Alchemy Project

include/field/field_psynergy.h

The states of the field Psynergy's effects: the scatter, Whirlwind's orb, the Arrow's bow, and Avoid's falling arcs.

Included by field_psynergy_internal.h.

Structures

NameDescription
structSCATTER_STATEThe scatter's state (heap slot HEAP_SLOT_BATTLE_EFFECT): its tiles, 64 sprites and particles, the actor it scatters from, and its stage.
structBOW_MOTIONOne moving point of the Arrow: a spark on the canvas (x and y only, counting delay) or a sprite's place in the world.
structBOW_STATEThe Arrow's state (fdPsynergyArrow, in heap slot HEAP_SLOT_BATTLE_EFFECT): its 32 sparks, the arrow and the bow with their motions, the points the arrow flies between, and the phase of its event.
structPOINT_STATEFIELD_STATE as fdPsynergyGatherNearbyMetatiles writes it: the metatiles a Psynergy touches and the Cyclone's two spots, here unsigned.
structDESCENDING_ARC_SPRA falling arc's sprite (SPR), seen as the image attributes, VRAM cache entry and first layer that Avoid's arcs set on it, under SPR's names; its image bit fields are read here as bytes.

Macros

NameDescription
#defineSCATTER_PARTICLE_COUNT 64The particles of a scatter, a power of two: the next one wraps by a mask.
#defineBOW_POSE_TILES 32Tiles in one of the bow's drawing poses, which follow each other from BOW_STATE.bowTile.
#defineBOW_SPARK_COUNT 32The glints the Arrow throws off the bow while it draws.
#defineBOW_TILE_BYTES (6 * 32 * 32)The bow's six drawing poses, 32 by 32 pixels in 256 colours.
#defineBOW_TICK_IDLE 999BOW_STATE.frame while the bow holds its pose and is not drawing.
#defineFIELD_PSYNERGY_NEARBY_METATILES 21The metatiles around the caster Cyclone looks at.

Enumerations

NameDescription
enumORB_KIND { ORB_PLAIN, ORB_ORBITING, ORB_WANDER, ORB_HANDOFF }What Whirlwind's orb does once it reaches its target (fdPsynergyWhirlwind).

Functions

NameDescription
voidfdActorWaitForTrackEndStub (struct ACTOR *actor)

Variables

NameDescription
extern const Uint8FieldEffectArcSparkTiles []The arc sparks' tiles.
extern const Sint32ArrowWobbleAngles [8]The arrow's wobble once it has struck, a step a tick over eight ticks (fdPsynergyUpdateArrow): turns from its heading, scaled by ArrowWobbleFades.
extern const Sint32ArrowWobbleFades [4]The scale of the arrow's wobble, a step every eight ticks.
extern const Uint8ArrowGlintPixels []Three 8 by 8 glints the Arrow draws into its canvas, a byte a pixel (arrow_glint.list.tsv).
extern const Sint8FieldPsynergyNearbyMetatileOffsets [FIELD_PSYNERGY_NEARBY_METATILES * 2]The tile offsets of those metatiles from the caster, signed x, z pairs.

Description

The states of the field Psynergy's effects: the scatter, Whirlwind's orb, the Arrow's bow, and Avoid's falling arcs.

Macros in detail

SCATTER_PARTICLE_COUNT

#define SCATTER_PARTICLE_COUNT 64

The particles of a scatter, a power of two: the next one wraps by a mask.

Referenced by fdPsynergyLash() and fdPsynergyUpdateLash().

Definition at line 17 of file field_psynergy.h.

BOW_POSE_TILES

#define BOW_POSE_TILES 32

Tiles in one of the bow's drawing poses, which follow each other from BOW_STATE.bowTile.

Referenced by fdPsynergyUpdateArrow().

Definition at line 62 of file field_psynergy.h.

BOW_SPARK_COUNT

#define BOW_SPARK_COUNT 32

The glints the Arrow throws off the bow while it draws.

Referenced by fdPsynergyArrow().

Definition at line 65 of file field_psynergy.h.

BOW_TILE_BYTES

#define BOW_TILE_BYTES (6 * 32 * 32)

The bow's six drawing poses, 32 by 32 pixels in 256 colours.

Referenced by fdPsynergyArrow().

Definition at line 68 of file field_psynergy.h.

BOW_TICK_IDLE

#define BOW_TICK_IDLE 999

BOW_STATE.frame while the bow holds its pose and is not drawing.

Referenced by fdPsynergyUpdateArrow().

Definition at line 71 of file field_psynergy.h.

FIELD_PSYNERGY_NEARBY_METATILES

#define FIELD_PSYNERGY_NEARBY_METATILES 21

The metatiles around the caster Cyclone looks at.

Referenced by fdPsynergyGatherNearbyMetatiles() and FieldPsynergyNearbyMetatileOffsets.

Definition at line 180 of file field_psynergy.h.

Enumerations in detail

ORB_KIND

enum ORB_KIND

What Whirlwind's orb does once it reaches its target (fdPsynergyWhirlwind).

EnumeratorValueDescription
ORB_PLAINcast at nothing: the orb only comes and goes
ORB_ORBITINGleaves circle the orb while the target shrinks
ORB_WANDERsprouting leaves: leaves wander off, the target is handed on
ORB_HANDOFFa seedling: the target is handed on

Definition at line 38 of file field_psynergy.h.

Functions in detail

fdActorWaitForTrackEndStub

void fdActorWaitForTrackEndStub(struct ACTOR *actor)

Referenced by fdPsynergyWhirlwind().

Definition at line 170 of file field_psynergy.h.

Variables in detail

FieldEffectArcSparkTiles

extern const Uint8 FieldEffectArcSparkTiles[]

The arc sparks' tiles.

Referenced by fdPsynergyAvoid().

Definition at line 168 of file field_psynergy.h.

ArrowGlintPixels

extern const Uint8 ArrowGlintPixels[]

Three 8 by 8 glints the Arrow draws into its canvas, a byte a pixel (arrow_glint.list.tsv).

Referenced by fdPsynergyUpdateArrow().

Definition at line 177 of file field_psynergy.h.