Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_cybele.c

The Cybele summon. More…

Included by battle_effect.c.

Macros

NameDescription
#defineCYBELE_TICKS 366Ticks of Cybele's whole run.
#defineCYBELE_LANDING_TICK 302The first target lands on its spreading ring, sixteen ticks after it is dropped; the others follow.
#defineCYBELE_BLAST_PICTURESSprite sheet, particle and sprite layout.
#defineCYBELE_VINES 16vines, from state->particles[0]
#defineCYBELE_SPARKS 16sparks, from CYBELE_FIRST_SPARK
#defineCYBELE_THORNS 16thorns, from CYBELE_FIRST_THORN
#defineCYBELE_CHIPS 48chips, from CYBELE_FIRST_CHIP
#defineCYBELE_FIRST_SPARK 16the first spark in state->particles
#defineCYBELE_FIRST_THORN 32the first thorn in state->particles
#defineCYBELE_FIRST_CHIP 16the first chip in state->particles
#defineCYBELE_DUST_PICTURE 6the dust cloud in CybeleBlastPictures
#defineCYBELE_SPRITES 8the sprites Cybele is drawn from
#defineCYBELE_FACE_LEFT_SPRITE 3The two sprites of her face (CYBELE_POSE_FACE_LEFT and _RIGHT).
#defineCYBELE_FACE_RIGHT_SPRITE 4
#defineCYBELE_CANVAS_X 32How far right of the screen's left edge the canvas shows until the chips fly, in pixels.
#defineCYBELE_DISSOLVE_RUNS 8The order the canvas dissolves in: shuffled runs of the canvas's columns, row y taking run y % CYBELE_DISSOLVE_RUNS.
#defineCYBELE_DISSOLVE_BAND 32The dissolve clears CYBELE_DISSOLVE_PIXELS pixels a tick from each of the CYBELE_DISSOLVE_BAND rows it moves down the canvas.
#defineCYBELE_DISSOLVE_PIXELS 4
#defineCYBELE_VINE_TICKS 96The vines are drawn for CYBELE_VINE_TICKS ticks from the chips' first, growing for the first CYBELE_VINE_GROW_TICKS.
#defineCYBELE_VINE_GROW_TICKS 80
#defineCYBELE_VINES_DRAWN 10The vines drawn, of the CYBELE_VINES set out.
#defineCYBELE_FLYING_CHIPS 32The chips that fly, from the first after the sparks.
#defineCYBELE_FIRST_FLYING_CHIP (CYBELE_FIRST_SPARK + CYBELE_SPARKS)
#defineCYBELE_TARGET_SPARKS 6The sparks round each target, from CYBELE_FIRST_SPARK, flashing from the vines' first tick to CYBELE_SPARKS_END ticks after it.
#defineCYBELE_SPARKS_END 172
#defineCYBELE_TARGET_DUST 10Each 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.
#defineCYBELE_TARGET_DUST_DRAWN 5
#defineCYBELE_DUST_SPREAD ((TRIG_TURN + 4) / 5)
#defineCYBELE_DUST_LAST_TICK 26
#defineCYBELE_VINE_WIDTH 24The vine pictures in the thorn vine sprite sheet, below a tip at 0; the flowers, thorns and sparks follow.
#defineCYBELE_VINE_TIP_HEIGHT 8
#defineCYBELE_VINE_STEM_HEIGHT 64
#defineCYBELE_RING_HALF_WIDTH 20YellowRingSheet's ring, drawn as two mirrored halves.
#defineCYBELE_RING_HALF_HEIGHT 24

Enumerations

NameDescription
enumTHORN_VINE_SHEET_PICTURE { CYBELE_VINE_STEM, CYBELE_THIN_VINE }Where the vine stems begin in the thorn vine sprite sheet, in bytes.

Functions

NameDescription
voidbtEffectRunCybele (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, and the targets drop, each landing on a spreading ring in a cloud of dust.

Description

The Cybele summon. Part of battle_effect.c.

Macros in detail

CYBELE_TICKS

#define CYBELE_TICKS 366

Ticks of Cybele's whole run.

Referenced by btEffectRunCybele().

Definition at line 4 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 7 of file battle_effect_cybele.c.

CYBELE_BLAST_PICTURES

#define CYBELE_BLAST_PICTURES

Sprite sheet, particle and sprite layout.

Referenced by btEffectRunCybele().

Definition at line 10 of file battle_effect_cybele.c.

CYBELE_VINES

#define CYBELE_VINES 16

vines, from state->particles[0]

Referenced by btEffectRunCybele().

Definition at line 13 of file battle_effect_cybele.c.

CYBELE_SPARKS

#define CYBELE_SPARKS 16

sparks, from CYBELE_FIRST_SPARK

Referenced by btEffectRunCybele().

Definition at line 14 of file battle_effect_cybele.c.

CYBELE_THORNS

#define CYBELE_THORNS 16

thorns, from CYBELE_FIRST_THORN

Referenced by btEffectRunCybele().

Definition at line 15 of file battle_effect_cybele.c.

CYBELE_CHIPS

#define CYBELE_CHIPS 48

chips, from CYBELE_FIRST_CHIP

Referenced by btEffectRunCybele().

Definition at line 16 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 17 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 18 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 19 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 20 of file battle_effect_cybele.c.

CYBELE_SPRITES

#define CYBELE_SPRITES 8

the sprites Cybele is drawn from

Referenced by btEffectRunCybele().

Definition at line 21 of file battle_effect_cybele.c.

CYBELE_FACE_LEFT_SPRITE

#define CYBELE_FACE_LEFT_SPRITE 3

The two sprites of her face (CYBELE_POSE_FACE_LEFT and _RIGHT).

Referenced by btEffectRunCybele().

Definition at line 24 of file battle_effect_cybele.c.

CYBELE_FACE_RIGHT_SPRITE

#define CYBELE_FACE_RIGHT_SPRITE 4

Referenced by btEffectRunCybele().

Definition at line 25 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 28 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 31 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 34 of file battle_effect_cybele.c.

CYBELE_DISSOLVE_PIXELS

#define CYBELE_DISSOLVE_PIXELS 4

Referenced by btEffectRunCybele().

Definition at line 35 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 38 of file battle_effect_cybele.c.

CYBELE_VINE_GROW_TICKS

#define CYBELE_VINE_GROW_TICKS 80

Referenced by btEffectRunCybele().

Definition at line 39 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 41 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 43 of file battle_effect_cybele.c.

CYBELE_FIRST_FLYING_CHIP

#define CYBELE_FIRST_FLYING_CHIP (CYBELE_FIRST_SPARK + CYBELE_SPARKS)

Referenced by btEffectRunCybele().

Definition at line 44 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 47 of file battle_effect_cybele.c.

CYBELE_SPARKS_END

#define CYBELE_SPARKS_END 172

Referenced by btEffectRunCybele().

Definition at line 48 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 52 of file battle_effect_cybele.c.

CYBELE_TARGET_DUST_DRAWN

#define CYBELE_TARGET_DUST_DRAWN 5

Referenced by btEffectRunCybele().

Definition at line 53 of file battle_effect_cybele.c.

CYBELE_DUST_SPREAD

#define CYBELE_DUST_SPREAD ((TRIG_TURN + 4) / 5)

Referenced by btEffectRunCybele().

Definition at line 54 of file battle_effect_cybele.c.

CYBELE_DUST_LAST_TICK

#define CYBELE_DUST_LAST_TICK 26

Referenced by btEffectRunCybele().

Definition at line 55 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 59 of file battle_effect_cybele.c.

CYBELE_VINE_TIP_HEIGHT

#define CYBELE_VINE_TIP_HEIGHT 8

Referenced by btEffectRunCybele().

Definition at line 60 of file battle_effect_cybele.c.

CYBELE_VINE_STEM_HEIGHT

#define CYBELE_VINE_STEM_HEIGHT 64

Referenced by btEffectRunCybele().

Definition at line 61 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 63 of file battle_effect_cybele.c.

CYBELE_RING_HALF_HEIGHT

#define CYBELE_RING_HALF_HEIGHT 24

Referenced by btEffectRunCybele().

Definition at line 64 of file battle_effect_cybele.c.

Enumerations in detail

THORN_VINE_SHEET_PICTURE

enum THORN_VINE_SHEET_PICTURE

Where the vine stems begin in the thorn vine sprite sheet, in bytes.

EnumeratorValueDescription
CYBELE_VINE_STEMCYBELE_VINE_WIDTH * CYBELE_VINE_TIP_HEIGHT
CYBELE_THIN_VINECYBELE_VINE_STEM + CYBELE_VINE_WIDTH * CYBELE_VINE_STEM_HEIGHTa thinner vine: its tip, then its stem

Definition at line 67 of file battle_effect_cybele.c.

Functions in detail

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, and the targets drop, each landing on a spreading ring in a cloud of dust.

Abilities: Cybele.

References btActorGetSpriteStub(), btCameraShake(), btEffectCreateSprites(), btEffectEndCanvasLayer(), btEffectPlaceFormationSprites(), btEffectRunImpactBurst(), btEffectShowLivingTargets(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btProjectionPoint(), btResourceLoadAndDecompress(), CybeleBlastPictures, CybeleBlastSizes, CybeleChipHeights, CybeleChipPictures, CybeleChipWidths, CybeleFlowerPictures, CybeleFlowerSizes, CybeleObjectPoses, CybeleSparkPictures, CybeleSparkSizes, CybeleThornHeights, CybeleThornPictures, CybeleThornWidths, fdSpriteDestroyStub(), fdSpriteStartAnimationStub(), PerRepeat, Sint32, state, syCloseEvent(), syCos(), syRandom(), sySin(), sySoundPlayStub(), syWordsClear() and width.

Referenced by btEffectRunSummon().

Definition at line 81 of file battle_effect_cybele.c.