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.
#include "types.h"#include "field/effect_sprite.h"#include "field/field_particle.h"#include "field/field_psynergy_state.h"#include "field/sprite.h"
Included by field_psynergy_internal.h.
Structures
| Name | Description | |
|---|---|---|
struct | SCATTER_STATE | The scatter's state (heap slot HEAP_SLOT_BATTLE_EFFECT): its tiles, 64 sprites and particles, the actor it scatters from, and its stage. |
struct | BOW_MOTION | One moving point of the Arrow: a spark on the canvas (x and y only, counting delay) or a sprite's place in the world. |
struct | BOW_STATE | The 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. |
struct | POINT_STATE | FIELD_STATE as fdPsynergyGatherNearbyMetatiles writes it: the metatiles a Psynergy touches and the Cyclone's two spots, here unsigned. |
struct | DESCENDING_ARC_SPR | A 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
| Name | Description | |
|---|---|---|
#define | SCATTER_PARTICLE_COUNT 64 | The particles of a scatter, a power of two: the next one wraps by a mask. |
#define | BOW_POSE_TILES 32 | Tiles in one of the bow's drawing poses, which follow each other from BOW_STATE.bowTile. |
#define | BOW_SPARK_COUNT 32 | The glints the Arrow throws off the bow while it draws. |
#define | BOW_TILE_BYTES (6 * 32 * 32) | The bow's six drawing poses, 32 by 32 pixels in 256 colours. |
#define | BOW_TICK_IDLE 999 | BOW_STATE.frame while the bow holds its pose and is not drawing. |
#define | FIELD_PSYNERGY_NEARBY_METATILES 21 | The metatiles around the caster Cyclone looks at. |
Enumerations
| Name | Description | |
|---|---|---|
enum | ORB_KIND { ORB_PLAIN, ORB_ORBITING, ORB_WANDER, ORB_HANDOFF } | What Whirlwind's orb does once it reaches its target (fdPsynergyWhirlwind). |
Functions
| Name | Description | |
|---|---|---|
void | fdActorWaitForTrackEndStub (struct ACTOR *actor) |
Variables
| Name | Description | |
|---|---|---|
extern const Uint8 | FieldEffectArcSparkTiles [] | The arc sparks' tiles. |
extern const Sint32 | ArrowWobbleAngles [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 Sint32 | ArrowWobbleFades [4] | The scale of the arrow's wobble, a step every eight ticks. |
extern const Uint8 | ArrowGlintPixels [] | Three 8 by 8 glints the Arrow draws into its canvas, a byte a pixel (arrow_glint.list.tsv). |
extern const Sint8 | FieldPsynergyNearbyMetatileOffsets [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).
| Enumerator | Value | Description |
|---|---|---|
ORB_PLAIN | cast at nothing: the orb only comes and goes | |
ORB_ORBITING | leaves circle the orb while the target shrinks | |
ORB_WANDER | sprouting leaves: leaves wander off, the target is handed on | |
ORB_HANDOFF | a 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.