src/battle_effect/battle_effect_cybele.c
The Cybele summon, and a routine nothing calls that opens and closes a tiled canvas. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | CYBELE_TICKS 366 | |
#define | CYBELE_LANDING_TICK 302 | The first target lands on its spreading ring, sixteen ticks after it is dropped; the others follow. |
#define | CYBELE_DROP_TICK (CYBELE_LANDING_TICK - 16) | |
#define | CYBELE_BLAST_PICTURES 5760 | Where the blast pictures start in state->sheet, after the yellow ring's. |
#define | CYBELE_VINES 16 | Vines, from state->particles[0]. |
#define | CYBELE_SPARKS 16 | |
#define | CYBELE_THORNS 16 | |
#define | CYBELE_CHIPS 48 | |
#define | CYBELE_FIRST_SPARK 16 | The first spark in state->particles. |
#define | CYBELE_FIRST_THORN 32 | The first thorn in state->particles. |
#define | CYBELE_FIRST_CHIP 16 | The first chip in state->particles. |
#define | CYBELE_DUST_PICTURE 6 | The dust cloud in CybeleBlastPictures. |
#define | CYBELE_SPRITES 8 | |
#define | CYBELE_MOUTH_LEFT 3 | The left and right sprites of Cybele's middle row, her mouth, which take the poses of CybeleObjectPoses as it opens and shuts. |
#define | CYBELE_MOUTH_RIGHT 4 | |
#define | CYBELE_CANVAS_X 32 | How far right of the screen's left edge the canvas shows until the chips fly, in pixels. |
#define | CYBELE_DISSOLVE_RUNS 8 | The order the canvas dissolves in: shuffled runs of the canvas's columns, row y taking run y % CYBELE_DISSOLVE_RUNS. |
#define | CYBELE_DISSOLVE_BAND 32 | The dissolve clears CYBELE_DISSOLVE_PIXELS pixels a tick from each of the CYBELE_DISSOLVE_BAND rows it moves down the canvas. |
#define | CYBELE_DISSOLVE_PIXELS 4 | |
#define | CYBELE_VINE_TICKS 96 | The vines are drawn for CYBELE_VINE_TICKS ticks from the chips' first, growing for the first CYBELE_VINE_GROW_TICKS. |
#define | CYBELE_VINE_GROW_TICKS 80 | |
#define | CYBELE_VINES_DRAWN 10 | The vines drawn, of the CYBELE_VINES set out. |
#define | CYBELE_FLYING_CHIPS 32 | The chips that fly, from the first after the sparks. |
#define | CYBELE_FIRST_FLYING_CHIP 32 | |
#define | CYBELE_TARGET_SPARKS 6 | The sparks round each target, from CYBELE_FIRST_SPARK, flashing from the vines' first tick to CYBELE_SPARKS_END ticks after it. |
#define | CYBELE_SPARKS_END 172 | |
#define | CYBELE_TARGET_DUST 10 | Each target's dust puffs, from state->particles[target * CYBELE_TARGET_DUST]: set out a fifth of a turn apart (rounded up), the first CYBELE_TARGET_DUST_DRAWN drawn until their CYBELE_DUST_LAST_TICK. |
#define | CYBELE_TARGET_DUST_DRAWN 5 | |
#define | CYBELE_DUST_SPREAD ((TRIG_TURN + 4) / 5) | |
#define | CYBELE_DUST_LAST_TICK 26 | |
#define | CYBELE_VINE_WIDTH 24 | The vine pictures in the thorn vine sprite sheet, below a tip at 0; the flowers, thorns and sparks follow. |
#define | CYBELE_VINE_TIP_HEIGHT 8 | |
#define | CYBELE_VINE_STEM_HEIGHT 64 | |
#define | CYBELE_RING_HALF_WIDTH 20 | YellowRingSheet's ring, drawn as two mirrored halves. |
#define | CYBELE_RING_HALF_HEIGHT 24 |
Enumerations
| Name | Description | |
|---|---|---|
enum | THORN_VINE_SHEET_PICTURE { CYBELE_VINE_STEM, CYBELE_THIN_VINE } | Where each picture starts in ThornVineSheet, in bytes: a vine's tip, then its stem. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectOpenAndCloseTiledCanvas (void) | Opens the canvas layer on BG2, tiled across its map, and closes it again at once. |
void | btEffectRunCybele (BATTLE_EFFECT_PARM *args) | Cybele drops in at the right and thorns fly from her mouth; flowering vines grow out of the ground, lifting the targets while sparks flash around them; then the canvas greys and dissolves pixel by pixel, the targets drop, each landing on a spreading ring in a cloud of dust, and Cybele bursts away in a flash. |
Description
The Cybele summon, and a routine nothing calls that opens and closes a tiled
canvas. Part of battle_effect.c.
Macros in detail
CYBELE_TICKS
#define CYBELE_TICKS 366
Referenced by btEffectRunCybele().
Definition at line 12 of file battle_effect_cybele.c.
CYBELE_LANDING_TICK
#define CYBELE_LANDING_TICK 302
The first target lands on its spreading ring, sixteen ticks after it is dropped; the others follow.
Referenced by btEffectRunCybele().
Definition at line 15 of file battle_effect_cybele.c.
CYBELE_DROP_TICK
#define CYBELE_DROP_TICK (CYBELE_LANDING_TICK - 16)
Referenced by btEffectRunCybele().
Definition at line 16 of file battle_effect_cybele.c.
CYBELE_BLAST_PICTURES
#define CYBELE_BLAST_PICTURES 5760
Where the blast pictures start in state->sheet, after the yellow ring's.
Referenced by btEffectRunCybele().
Definition at line 19 of file battle_effect_cybele.c.
CYBELE_VINES
#define CYBELE_VINES 16
Vines, from state->particles[0].
Referenced by btEffectRunCybele().
Definition at line 21 of file battle_effect_cybele.c.
CYBELE_SPARKS
#define CYBELE_SPARKS 16
Referenced by btEffectRunCybele().
Definition at line 22 of file battle_effect_cybele.c.
CYBELE_THORNS
#define CYBELE_THORNS 16
Referenced by btEffectRunCybele().
Definition at line 23 of file battle_effect_cybele.c.
CYBELE_CHIPS
#define CYBELE_CHIPS 48
Referenced by btEffectRunCybele().
Definition at line 24 of file battle_effect_cybele.c.
CYBELE_FIRST_SPARK
#define CYBELE_FIRST_SPARK 16
The first spark in state->particles.
Referenced by btEffectRunCybele().
Definition at line 26 of file battle_effect_cybele.c.
CYBELE_FIRST_THORN
#define CYBELE_FIRST_THORN 32
The first thorn in state->particles.
Referenced by btEffectRunCybele().
Definition at line 28 of file battle_effect_cybele.c.
CYBELE_FIRST_CHIP
#define CYBELE_FIRST_CHIP 16
The first chip in state->particles.
Referenced by btEffectRunCybele().
Definition at line 30 of file battle_effect_cybele.c.
CYBELE_DUST_PICTURE
#define CYBELE_DUST_PICTURE 6
The dust cloud in CybeleBlastPictures.
Referenced by btEffectRunCybele().
Definition at line 32 of file battle_effect_cybele.c.
CYBELE_SPRITES
#define CYBELE_SPRITES 8
Referenced by btEffectRunCybele().
Definition at line 33 of file battle_effect_cybele.c.
CYBELE_MOUTH_LEFT
#define CYBELE_MOUTH_LEFT 3
The left and right sprites of Cybele's middle row, her mouth, which take the
poses of CybeleObjectPoses as it opens and shuts.
Referenced by btEffectRunCybele().
Definition at line 36 of file battle_effect_cybele.c.
CYBELE_MOUTH_RIGHT
#define CYBELE_MOUTH_RIGHT 4
Referenced by btEffectRunCybele().
Definition at line 37 of file battle_effect_cybele.c.
CYBELE_CANVAS_X
#define CYBELE_CANVAS_X 32
How far right of the screen's left edge the canvas shows until the chips fly, in pixels.
Referenced by btEffectRunCybele().
Definition at line 40 of file battle_effect_cybele.c.
CYBELE_DISSOLVE_RUNS
#define CYBELE_DISSOLVE_RUNS 8
The order the canvas dissolves in: shuffled runs of the canvas's columns, row
y taking run y % CYBELE_DISSOLVE_RUNS.
Referenced by btEffectRunCybele().
Definition at line 43 of file battle_effect_cybele.c.
CYBELE_DISSOLVE_BAND
#define CYBELE_DISSOLVE_BAND 32
The dissolve clears CYBELE_DISSOLVE_PIXELS pixels a tick from each of the
CYBELE_DISSOLVE_BAND rows it moves down the canvas.
Referenced by btEffectRunCybele().
Definition at line 46 of file battle_effect_cybele.c.
CYBELE_DISSOLVE_PIXELS
#define CYBELE_DISSOLVE_PIXELS 4
Referenced by btEffectRunCybele().
Definition at line 47 of file battle_effect_cybele.c.
CYBELE_VINE_TICKS
#define CYBELE_VINE_TICKS 96
The vines are drawn for CYBELE_VINE_TICKS ticks from the chips' first,
growing for the first CYBELE_VINE_GROW_TICKS.
Referenced by btEffectRunCybele().
Definition at line 50 of file battle_effect_cybele.c.
CYBELE_VINE_GROW_TICKS
#define CYBELE_VINE_GROW_TICKS 80
Referenced by btEffectRunCybele().
Definition at line 51 of file battle_effect_cybele.c.
CYBELE_VINES_DRAWN
#define CYBELE_VINES_DRAWN 10
The vines drawn, of the CYBELE_VINES set out.
Referenced by btEffectRunCybele().
Definition at line 53 of file battle_effect_cybele.c.
CYBELE_FLYING_CHIPS
#define CYBELE_FLYING_CHIPS 32
The chips that fly, from the first after the sparks.
Referenced by btEffectRunCybele().
Definition at line 55 of file battle_effect_cybele.c.
CYBELE_FIRST_FLYING_CHIP
#define CYBELE_FIRST_FLYING_CHIP 32
Referenced by btEffectRunCybele().
Definition at line 56 of file battle_effect_cybele.c.
CYBELE_TARGET_SPARKS
#define CYBELE_TARGET_SPARKS 6
The sparks round each target, from CYBELE_FIRST_SPARK, flashing from the
vines' first tick to CYBELE_SPARKS_END ticks after it.
Referenced by btEffectRunCybele().
Definition at line 59 of file battle_effect_cybele.c.
CYBELE_SPARKS_END
#define CYBELE_SPARKS_END 172
Referenced by btEffectRunCybele().
Definition at line 60 of file battle_effect_cybele.c.
CYBELE_TARGET_DUST
#define CYBELE_TARGET_DUST 10
Each target's dust puffs, from state->particles[target * CYBELE_TARGET_DUST]:
set out a fifth of a turn apart (rounded up), the first
CYBELE_TARGET_DUST_DRAWN drawn until their CYBELE_DUST_LAST_TICK.
Referenced by btEffectRunCybele().
Definition at line 64 of file battle_effect_cybele.c.
CYBELE_TARGET_DUST_DRAWN
#define CYBELE_TARGET_DUST_DRAWN 5
Referenced by btEffectRunCybele().
Definition at line 65 of file battle_effect_cybele.c.
CYBELE_DUST_SPREAD
#define CYBELE_DUST_SPREAD ((TRIG_TURN + 4) / 5)
Referenced by btEffectRunCybele().
Definition at line 66 of file battle_effect_cybele.c.
CYBELE_DUST_LAST_TICK
#define CYBELE_DUST_LAST_TICK 26
Referenced by btEffectRunCybele().
Definition at line 67 of file battle_effect_cybele.c.
CYBELE_VINE_WIDTH
#define CYBELE_VINE_WIDTH 24
The vine pictures in the thorn vine sprite sheet, below a tip at 0; the flowers, thorns and sparks follow.
Referenced by btEffectRunCybele().
Definition at line 71 of file battle_effect_cybele.c.
CYBELE_VINE_TIP_HEIGHT
#define CYBELE_VINE_TIP_HEIGHT 8
Referenced by btEffectRunCybele().
Definition at line 72 of file battle_effect_cybele.c.
CYBELE_VINE_STEM_HEIGHT
#define CYBELE_VINE_STEM_HEIGHT 64
Referenced by btEffectRunCybele().
Definition at line 73 of file battle_effect_cybele.c.
CYBELE_RING_HALF_WIDTH
#define CYBELE_RING_HALF_WIDTH 20
YellowRingSheet's ring, drawn as two mirrored halves.
Referenced by btEffectRunCybele().
Definition at line 75 of file battle_effect_cybele.c.
CYBELE_RING_HALF_HEIGHT
#define CYBELE_RING_HALF_HEIGHT 24
Referenced by btEffectRunCybele().
Definition at line 76 of file battle_effect_cybele.c.
Enumerations in detail
THORN_VINE_SHEET_PICTURE
enum THORN_VINE_SHEET_PICTURE
Where each picture starts in ThornVineSheet, in bytes: a vine's tip, then its stem.
| Enumerator | Value | Description |
|---|---|---|
CYBELE_VINE_STEM | CYBELE_VINE_WIDTH * CYBELE_VINE_TIP_HEIGHT | |
CYBELE_THIN_VINE | CYBELE_VINE_STEM + CYBELE_VINE_WIDTH * CYBELE_VINE_STEM_HEIGHT | a thinner vine: its tip, then its stem |
Definition at line 80 of file battle_effect_cybele.c.
Functions in detail
btEffectOpenAndCloseTiledCanvas
void btEffectOpenAndCloseTiledCanvas(void)
Opens the canvas layer on BG2, tiled across its map, and closes it again at once.
References btEffectEndCanvasLayer() and btEffectStartTiledCanvas().
Definition at line 6 of file battle_effect_cybele.c.
btEffectRunCybele
void btEffectRunCybele(BATTLE_EFFECT_PARM *args)
Cybele drops in at the right and thorns fly from her mouth; flowering vines grow out of the ground, lifting the targets while sparks flash around them; then the canvas greys and dissolves pixel by pixel, the targets drop, each landing on a spreading ring in a cloud of dust, and Cybele bursts away in a flash. A or B skips to the drop.
Abilities: Cybele.
References btActorGetSpriteStub(), btCameraShake(), btEffectCreateSprites(), btEffectEndCanvasLayer(), btEffectPlaceFormationSprites(), btEffectPosProjectPoint(), btEffectRunImpactBurst(), btEffectShowLivingTargets(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), CybeleBlastPictures, CybeleBlastSizes, CybeleChipHeights, CybeleChipPictures, CybeleChipWidths, CybeleFlowerPictures, CybeleFlowerSizes, CybeleObjectPoses, CybeleSparkPictures, CybeleSparkSizes, CybeleThornHeights, CybeleThornPictures, CybeleThornWidths, fdSpriteDestroyStub(), fdSpriteStartAnimationStub(), PerWork, Sint32, syCloseEvent(), syCos(), syRandom(), sySin() and sySoundPlayStub().
Referenced by btEffectRunSummon().
Definition at line 95 of file battle_effect_cybele.c.