Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_dragon_cloud.c

Dragon Cloud and Epicenter, a flame flown at a foe. More…

Included by battle_effect.c.

Macros

NameDescription
#defineDRAGON_CLOUD_TICKS 150
#defineDRAGON_CLOUD_LAUNCH_TICK 18The flame leaves the user at DRAGON_CLOUD_LAUNCH_TICK; at DRAGON_CLOUD_PUFF_TICK the puffs bloom on their arc, the screen shakes and the target flashes; from DRAGON_CLOUD_DIVE_TICK the flame dives from above the target, and it strikes at DRAGON_CLOUD_STRIKE_TICK.
#defineDRAGON_CLOUD_PUFF_TICK 50
#defineDRAGON_CLOUD_DIVE_TICK 78
#defineDRAGON_CLOUD_STRIKE_TICK 83
#defineDRAGON_CLOUD_TRAIL_WIDTH 24The trail's picture, in pixels, and the bytes of each of its darker copies.
#defineDRAGON_CLOUD_TRAIL_HEIGHT 39
#defineDRAGON_CLOUD_TRAIL_PICTURE_BYTES PICTURE_BYTES(DRAGON_CLOUD_TRAIL)
#defineDRAGON_CLOUD_FIRST_EMBER 8The first of the particles the embers take.
#defineDRAGON_CLOUD_FLAME_WIDTH 24FirePillarSheetB: five flames, then the trail picture.
#defineDRAGON_CLOUD_FLAME_HEIGHT 48
#defineDRAGON_CLOUD_TRAIL_PICTURE (5 * PICTURE_BYTES(DRAGON_CLOUD_FLAME))
#defineDRAGON_CLOUD_PUFF_PICTURES 15360
#defineDRAGON_CLOUD_PUFFS 8Puffs, particles 0 to 7.
#defineDRAGON_CLOUD_EMBERS 40
#defineDRAGON_CLOUD_FLASHES 16Flashes, after the embers.
#defineDRAGON_CLOUD_TRAIL_LENGTH 20The trail's copies of the flame's path, the older ones from DRAGON_CLOUD_TRAIL_BRIGHT on drawn darker, four levels a copy.
#defineDRAGON_CLOUD_TRAIL_BRIGHT 10
#defineDRAGON_CLOUD_PUFF_RADIUS_X 24The puffs' arc: this many pixels across and down from its centre.
#defineDRAGON_CLOUD_PUFF_RADIUS_Y 16
#defineDRAGON_CLOUD_EMBER_SIZE_MAX 9An ember is drawn at size DRAGON_CLOUD_EMBER_SIZE_MAX at depth DRAGON_CLOUD_EMBER_DEPTH_NEAR or nearer, one size smaller every DRAGON_CLOUD_EMBER_DEPTH_STEP farther, its depth held below DRAGON_CLOUD_EMBER_DEPTH_FAR.
#defineDRAGON_CLOUD_EMBER_DEPTH_NEAR 160
#defineDRAGON_CLOUD_EMBER_DEPTH_STEP 64
#defineDRAGON_CLOUD_EMBER_DEPTH_FAR 799
#defineDRAGON_CLOUD_ANIMATION_PICTURES 6The flash and puff animations: six pictures, two ticks each (Epicenter's flashes, four ticks each).
#defineEPICENTER_SPARK_COUNT 512Epicenter's sparks, EPICENTER_SPARK_COUNT of EXTRA_PARTICLES, come in three batches: at the target, thrown up from the user's side, and shed by the flame.
#defineEPICENTER_SPARK_BATCH 128
#defineEPICENTER_SPARK_GROUND 108
#defineDRAGON_CLOUD_DRAW_PUFF (blit, canvas, sheet, picture, x, y)Draws one puff picture sized by the puff tables.

Functions

NameDescription
voidbtEffectRunDragonCloud (BATTLE_EFFECT_PARM *args)A flame leaves the user along a stored path with a fading trail behind it, strikes the first target and bursts into embers and flashes.

Description

Dragon Cloud and Epicenter, a flame flown at a foe. Part of battle_effect.c.

Macros in detail

DRAGON_CLOUD_TICKS

#define DRAGON_CLOUD_TICKS 150

Referenced by btEffectRunDragonCloud().

Definition at line 3 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_LAUNCH_TICK

#define DRAGON_CLOUD_LAUNCH_TICK 18

The flame leaves the user at DRAGON_CLOUD_LAUNCH_TICK; at DRAGON_CLOUD_PUFF_TICK the puffs bloom on their arc, the screen shakes and the target flashes; from DRAGON_CLOUD_DIVE_TICK the flame dives from above the target, and it strikes at DRAGON_CLOUD_STRIKE_TICK.

Referenced by btEffectRunDragonCloud().

Definition at line 8 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_PUFF_TICK

#define DRAGON_CLOUD_PUFF_TICK 50

Referenced by btEffectRunDragonCloud().

Definition at line 9 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_DIVE_TICK

#define DRAGON_CLOUD_DIVE_TICK 78

Referenced by btEffectRunDragonCloud().

Definition at line 10 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_STRIKE_TICK

#define DRAGON_CLOUD_STRIKE_TICK 83

Referenced by btEffectRunDragonCloud().

Definition at line 11 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_WIDTH

#define DRAGON_CLOUD_TRAIL_WIDTH 24

The trail's picture, in pixels, and the bytes of each of its darker copies.

Referenced by btEffectRunDragonCloud().

Definition at line 13 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_HEIGHT

#define DRAGON_CLOUD_TRAIL_HEIGHT 39

Referenced by btEffectRunDragonCloud().

Definition at line 14 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_PICTURE_BYTES

#define DRAGON_CLOUD_TRAIL_PICTURE_BYTES PICTURE_BYTES(DRAGON_CLOUD_TRAIL)

Referenced by btEffectRunDragonCloud().

Definition at line 15 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_FIRST_EMBER

#define DRAGON_CLOUD_FIRST_EMBER 8

The first of the particles the embers take.

Referenced by btEffectRunDragonCloud().

Definition at line 17 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_FLAME_WIDTH

#define DRAGON_CLOUD_FLAME_WIDTH 24

FirePillarSheetB: five flames, then the trail picture.

Referenced by btEffectRunDragonCloud().

Definition at line 19 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_FLAME_HEIGHT

#define DRAGON_CLOUD_FLAME_HEIGHT 48

Referenced by btEffectRunDragonCloud().

Definition at line 20 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_PICTURE

#define DRAGON_CLOUD_TRAIL_PICTURE (5 * PICTURE_BYTES(DRAGON_CLOUD_FLAME))

Referenced by btEffectRunDragonCloud().

Definition at line 21 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_PUFF_PICTURES

#define DRAGON_CLOUD_PUFF_PICTURES 15360

Referenced by btEffectRunDragonCloud().

Definition at line 22 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_PUFFS

#define DRAGON_CLOUD_PUFFS 8

Puffs, particles 0 to 7.

Referenced by btEffectRunDragonCloud().

Definition at line 24 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_EMBERS

#define DRAGON_CLOUD_EMBERS 40

Referenced by btEffectRunDragonCloud().

Definition at line 25 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_FLASHES

#define DRAGON_CLOUD_FLASHES 16

Flashes, after the embers.

Referenced by btEffectRunDragonCloud().

Definition at line 27 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_LENGTH

#define DRAGON_CLOUD_TRAIL_LENGTH 20

The trail's copies of the flame's path, the older ones from DRAGON_CLOUD_TRAIL_BRIGHT on drawn darker, four levels a copy.

Referenced by btEffectRunDragonCloud().

Definition at line 30 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_TRAIL_BRIGHT

#define DRAGON_CLOUD_TRAIL_BRIGHT 10

Referenced by btEffectRunDragonCloud().

Definition at line 31 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_PUFF_RADIUS_X

#define DRAGON_CLOUD_PUFF_RADIUS_X 24

The puffs' arc: this many pixels across and down from its centre.

Referenced by btEffectRunDragonCloud().

Definition at line 33 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_PUFF_RADIUS_Y

#define DRAGON_CLOUD_PUFF_RADIUS_Y 16

Referenced by btEffectRunDragonCloud().

Definition at line 34 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_EMBER_SIZE_MAX

#define DRAGON_CLOUD_EMBER_SIZE_MAX 9

An ember is drawn at size DRAGON_CLOUD_EMBER_SIZE_MAX at depth DRAGON_CLOUD_EMBER_DEPTH_NEAR or nearer, one size smaller every DRAGON_CLOUD_EMBER_DEPTH_STEP farther, its depth held below DRAGON_CLOUD_EMBER_DEPTH_FAR.

Referenced by btEffectRunDragonCloud().

Definition at line 39 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_EMBER_DEPTH_NEAR

#define DRAGON_CLOUD_EMBER_DEPTH_NEAR 160

Referenced by btEffectRunDragonCloud().

Definition at line 40 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_EMBER_DEPTH_STEP

#define DRAGON_CLOUD_EMBER_DEPTH_STEP 64

Referenced by btEffectRunDragonCloud().

Definition at line 41 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_EMBER_DEPTH_FAR

#define DRAGON_CLOUD_EMBER_DEPTH_FAR 799

Referenced by btEffectRunDragonCloud().

Definition at line 42 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_ANIMATION_PICTURES

#define DRAGON_CLOUD_ANIMATION_PICTURES 6

The flash and puff animations: six pictures, two ticks each (Epicenter's flashes, four ticks each).

Referenced by btEffectRunDragonCloud().

Definition at line 45 of file battle_effect_dragon_cloud.c.

EPICENTER_SPARK_COUNT

#define EPICENTER_SPARK_COUNT 512

Epicenter's sparks, EPICENTER_SPARK_COUNT of EXTRA_PARTICLES, come in three batches: at the target, thrown up from the user's side, and shed by the flame. The sparks thrown up start on EPICENTER_SPARK_GROUND and bounce there.

Referenced by btEffectRunDragonCloud().

Definition at line 50 of file battle_effect_dragon_cloud.c.

EPICENTER_SPARK_BATCH

#define EPICENTER_SPARK_BATCH 128

Referenced by btEffectRunDragonCloud().

Definition at line 51 of file battle_effect_dragon_cloud.c.

EPICENTER_SPARK_GROUND

#define EPICENTER_SPARK_GROUND 108

Referenced by btEffectRunDragonCloud().

Definition at line 52 of file battle_effect_dragon_cloud.c.

DRAGON_CLOUD_DRAW_PUFF

#define DRAGON_CLOUD_DRAW_PUFF(blit, canvas, sheet, picture, x, y)

Draws one puff picture sized by the puff tables.

Referenced by btEffectRunDragonCloud().

Definition at line 55 of file battle_effect_dragon_cloud.c.

Functions in detail

btEffectRunDragonCloud

void btEffectRunDragonCloud(BATTLE_EFFECT_PARM *args)

A flame leaves the user along a stored path with a fading trail behind it, strikes the first target and bursts into embers and flashes. Epicenter's burns orange and throws sparks: up from the user's side at the start, off the flame as it flies, and over the target at the strike.

Abilities: Dragon Cloud, Epicenter.

References BattleEffectEmberStreakPictureBiasY, BattleEffectEmberStreakPictureHeights, BattleEffectEmberStreakPictures, BattleEffectEmberStreakPictureWidths, BattleEffectMotePictures, btCameraSetViewStub(), btCameraShake(), btEffectBuildCanvasBlitters(), btEffectPosProjectBattler(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), DragonCloudSparkCounts, Sint32, syCos(), syInitMatrix(), syLookAtLoad(), syRandom(), syResourceGetTableEntry(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 70 of file battle_effect_dragon_cloud.c.