src/battle_effect/battle_effect_procne.c
The Procne summon. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | MODULO_THREE (v) syMathUnsignedMultiplyHighAdd((v), RECIPROCAL_OF(3), -3) | v % 3, through the multiply-high function and the reciprocal of 3, sparing a division. |
#define | PROCNE_TICKS 400 | Ticks of Procne. |
#define | PROCNE_ARRIVAL_TICK 160 | Procne appears in the violet sky, and the targets it lifted drop. |
#define | PROCNE_DROP_TICK 395 | |
#define | PROCNE_COMET_TICK 330 | The first comet leaves Procne, and the next each PROCNE_COMET_INTERVAL ticks after. |
#define | PROCNE_COMET_INTERVAL 12 | |
#define | PROCNE_SPRITES 9 | Procne's sprites, on ProcneGridX, ProcneGridY. |
#define | PROCNE_WHIRLWIND_WIDTH 48 | The whirlwind sprite sheet: three whirlwind pictures, shown 4 ticks each, then the dust. |
#define | PROCNE_WHIRLWIND_HEIGHT 64 | |
#define | PROCNE_WHIRLWIND_PICTURE | |
#define | PROCNE_WHIRLWIND_FOOT_HEIGHT 48 | The whirlwind rises in two pieces: its foot, a picture's upper rows, then a whole picture above it. |
#define | PROCNE_DUST (3 * PROCNE_WHIRLWIND_PICTURE) | The dust picture after them, a 16x16 puff, drawn with its middle 4 pixels left of and above its mote. |
#define | PROCNE_DUST_SIZE 16 | |
#define | PROCNE_COMET_PICTURES 13824 | |
#define | PROCNE_DUST_MOTES 24 | dust motes that swirl up the whirlwind |
#define | PROCNE_DUST_SPIN_GAIN 50 | How much faster a dust mote circles the whirlwind each tick, up to PROCNE_DUST_SPIN_MAX, in 1/65536 turns a tick. |
#define | PROCNE_DUST_SPIN_MAX (TRIG_TURN / 16) | |
#define | PROCNE_CORE_RADIUS 16 | The distance from the whirlwind's centre, in half pixels, that the lifted targets spiral in to. |
#define | PROCNE_SPIN_GAIN 48 | How much faster the lifted targets circle each tick, in 1/65536 turns a tick, and how fast they circle once Procne arrives. |
#define | PROCNE_SKY_SPIN 6000 | |
#define | PROCNE_SWAY 32 | Procne's sway: sixty-fourths of the wave's sine, as 16.16 pixels a tick, across and up and down; it bobs twice as far over its first 64 ticks. |
#define | PROCNE_BOB 16 | |
#define | PROCNE_GATHERING_SPARKS 32 | Procne's particles in state->particles: the sparks that gather on it, the ring of light each comet leaves, then one per comet. |
#define | PROCNE_RING PROCNE_GATHERING_SPARKS | |
#define | PROCNE_RING_MOTES 28 | |
#define | PROCNE_COMET_PARTICLES (PROCNE_RING + PROCNE_RING_MOTES) | |
#define | PROCNE_STRIKES 4 | The four strikes, at ProcneTicks: each throws out its sparks from its own rows of PARTICLES. |
#define | PROCNE_STRIKE_SPARKS 96 | |
#define | PROCNE_STRIKE_SPARK_ROWS 128 | |
#define | PROCNE_DEPTH_NEAR 170 | The depths a spark is drawn between. |
#define | PROCNE_DEPTH_FAR 350 | |
#define | PROCNE_SPARK_SIZE (depth, largest) | A spark's mote size at depth: largest at PROCNE_DEPTH_NEAR, down to 1 at PROCNE_DEPTH_FAR. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunProcne (BATTLE_EFFECT_PARM *args) | A whirlwind lifts the targets and spins them while dust swirls up it; then Procne, a great bird in a violet sky, gathers sparks and strikes them with four comets, each throwing out a burst of sparks. |
Description
The Procne summon. Part of battle_effect.c.
Macros in detail
MODULO_THREE
#define MODULO_THREE(v) syMathUnsignedMultiplyHighAdd((v), RECIPROCAL_OF(3), -3)
v % 3, through the multiply-high function and the reciprocal of 3, sparing a division.
Referenced by btEffectRunProcne().
Definition at line 5 of file battle_effect_procne.c.
PROCNE_TICKS
#define PROCNE_TICKS 400
Ticks of Procne.
Referenced by btEffectRunProcne().
Definition at line 8 of file battle_effect_procne.c.
PROCNE_ARRIVAL_TICK
#define PROCNE_ARRIVAL_TICK 160
Procne appears in the violet sky, and the targets it lifted drop.
Referenced by btEffectRunProcne().
Definition at line 10 of file battle_effect_procne.c.
PROCNE_DROP_TICK
#define PROCNE_DROP_TICK 395
Referenced by btEffectRunProcne().
Definition at line 11 of file battle_effect_procne.c.
PROCNE_COMET_TICK
#define PROCNE_COMET_TICK 330
The first comet leaves Procne, and the next each PROCNE_COMET_INTERVAL ticks
after.
Referenced by btEffectRunProcne().
Definition at line 14 of file battle_effect_procne.c.
PROCNE_COMET_INTERVAL
#define PROCNE_COMET_INTERVAL 12
Referenced by btEffectRunProcne().
Definition at line 15 of file battle_effect_procne.c.
PROCNE_SPRITES
#define PROCNE_SPRITES 9
Procne's sprites, on ProcneGridX, ProcneGridY.
Referenced by btEffectRunProcne().
Definition at line 18 of file battle_effect_procne.c.
PROCNE_WHIRLWIND_WIDTH
#define PROCNE_WHIRLWIND_WIDTH 48
The whirlwind sprite sheet: three whirlwind pictures, shown 4 ticks each, then the dust.
Referenced by btEffectRunProcne().
Definition at line 22 of file battle_effect_procne.c.
PROCNE_WHIRLWIND_HEIGHT
#define PROCNE_WHIRLWIND_HEIGHT 64
Referenced by btEffectRunProcne().
Definition at line 23 of file battle_effect_procne.c.
PROCNE_WHIRLWIND_PICTURE
#define PROCNE_WHIRLWIND_PICTURE
Referenced by btEffectRunProcne().
Definition at line 24 of file battle_effect_procne.c.
PROCNE_WHIRLWIND_FOOT_HEIGHT
#define PROCNE_WHIRLWIND_FOOT_HEIGHT 48
The whirlwind rises in two pieces: its foot, a picture's upper rows, then a whole picture above it.
Referenced by btEffectRunProcne().
Definition at line 28 of file battle_effect_procne.c.
PROCNE_DUST
#define PROCNE_DUST (3 * PROCNE_WHIRLWIND_PICTURE)
The dust picture after them, a 16x16 puff, drawn with its middle 4 pixels left of and above its mote.
Referenced by btEffectRunProcne().
Definition at line 31 of file battle_effect_procne.c.
PROCNE_DUST_SIZE
#define PROCNE_DUST_SIZE 16
Referenced by btEffectRunProcne().
Definition at line 32 of file battle_effect_procne.c.
PROCNE_COMET_PICTURES
#define PROCNE_COMET_PICTURES 13824
Referenced by btEffectRunProcne().
Definition at line 33 of file battle_effect_procne.c.
PROCNE_DUST_MOTES
#define PROCNE_DUST_MOTES 24
dust motes that swirl up the whirlwind
Referenced by btEffectRunProcne().
Definition at line 35 of file battle_effect_procne.c.
PROCNE_DUST_SPIN_GAIN
#define PROCNE_DUST_SPIN_GAIN 50
How much faster a dust mote circles the whirlwind each tick, up to
PROCNE_DUST_SPIN_MAX, in 1/65536 turns a tick.
Referenced by btEffectRunProcne().
Definition at line 38 of file battle_effect_procne.c.
PROCNE_DUST_SPIN_MAX
#define PROCNE_DUST_SPIN_MAX (TRIG_TURN / 16)
Referenced by btEffectRunProcne().
Definition at line 39 of file battle_effect_procne.c.
PROCNE_CORE_RADIUS
#define PROCNE_CORE_RADIUS 16
The distance from the whirlwind's centre, in half pixels, that the lifted targets spiral in to.
Referenced by btEffectRunProcne().
Definition at line 42 of file battle_effect_procne.c.
PROCNE_SPIN_GAIN
#define PROCNE_SPIN_GAIN 48
How much faster the lifted targets circle each tick, in 1/65536 turns a tick, and how fast they circle once Procne arrives.
Referenced by btEffectRunProcne().
Definition at line 45 of file battle_effect_procne.c.
PROCNE_SKY_SPIN
#define PROCNE_SKY_SPIN 6000
Referenced by btEffectRunProcne().
Definition at line 46 of file battle_effect_procne.c.
PROCNE_SWAY
#define PROCNE_SWAY 32
Procne's sway: sixty-fourths of the wave's sine, as 16.16 pixels a tick, across and up and down; it bobs twice as far over its first 64 ticks.
Referenced by btEffectRunProcne().
Definition at line 50 of file battle_effect_procne.c.
PROCNE_BOB
#define PROCNE_BOB 16
Referenced by btEffectRunProcne().
Definition at line 51 of file battle_effect_procne.c.
PROCNE_GATHERING_SPARKS
#define PROCNE_GATHERING_SPARKS 32
Procne's particles in state->particles: the sparks that gather on it, the ring of light each comet leaves, then one per comet.
Referenced by btEffectRunProcne().
Definition at line 55 of file battle_effect_procne.c.
PROCNE_RING
#define PROCNE_RING PROCNE_GATHERING_SPARKS
Referenced by btEffectRunProcne().
Definition at line 56 of file battle_effect_procne.c.
PROCNE_RING_MOTES
#define PROCNE_RING_MOTES 28
Referenced by btEffectRunProcne().
Definition at line 57 of file battle_effect_procne.c.
PROCNE_COMET_PARTICLES
#define PROCNE_COMET_PARTICLES (PROCNE_RING + PROCNE_RING_MOTES)
Referenced by btEffectRunProcne().
Definition at line 58 of file battle_effect_procne.c.
PROCNE_STRIKES
#define PROCNE_STRIKES 4
The four strikes, at ProcneTicks: each throws out its sparks from its own
rows of PARTICLES.
Referenced by btEffectRunProcne().
Definition at line 62 of file battle_effect_procne.c.
PROCNE_STRIKE_SPARKS
#define PROCNE_STRIKE_SPARKS 96
Referenced by btEffectRunProcne().
Definition at line 63 of file battle_effect_procne.c.
PROCNE_STRIKE_SPARK_ROWS
#define PROCNE_STRIKE_SPARK_ROWS 128
Referenced by btEffectRunProcne().
Definition at line 64 of file battle_effect_procne.c.
PROCNE_DEPTH_NEAR
#define PROCNE_DEPTH_NEAR 170
The depths a spark is drawn between.
Referenced by btEffectRunProcne().
Definition at line 67 of file battle_effect_procne.c.
PROCNE_DEPTH_FAR
#define PROCNE_DEPTH_FAR 350
Referenced by btEffectRunProcne().
Definition at line 68 of file battle_effect_procne.c.
PROCNE_SPARK_SIZE
#define PROCNE_SPARK_SIZE(depth, largest)
A spark's mote size at depth: largest at PROCNE_DEPTH_NEAR, down to 1 at
PROCNE_DEPTH_FAR.
Referenced by btEffectRunProcne().
Definition at line 71 of file battle_effect_procne.c.
Functions in detail
btEffectRunProcne
void btEffectRunProcne(BATTLE_EFFECT_PARM *args)
A whirlwind lifts the targets and spins them while dust swirls up it; then Procne, a great bird in a violet sky, gathers sparks and strikes them with four comets, each throwing out a burst of sparks. A or B skips to Procne's arrival, then to the drop.
Abilities: Procne.
References BattleEffectMotePictures, btBackgroundLoadStub(), btBackgroundSetModeStub(), btEffectBuildCanvasBlitters(), btEffectCreateSprites(), btEffectPosProjectPoint(), btEffectSetupBlendedDisplay(), btEffectShowLivingTargets(), btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btResourceLoadAndDecompress(), fdRenderApplyProjectedPlacementStub(), fdSpriteDestroyStub(), PerWork, ProcneGridX, ProcneGridY, ProcnePictureBiasY, ProcnePictureHeights, ProcnePictures, ProcnePictureWidths, ProcneTicks, ProcneUnitScale, ProjectionWork, Sint32, syAtan(), syCalcPoint(), syCos(), syInitMatrix(), syMatrixTranslateVector(), syRandom(), syRotY(), syRotZ(), sySin(), sySoundPlayStub() and sySquartIWRAM().
Referenced by btEffectRunSummon().
Definition at line 84 of file battle_effect_procne.c.