Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_djinn_beams.c

Canvas blitter setup and Djinn beams (Revive, Dew, Spark). More…

Included by battle_effect.c.

Macros

NameDescription
#defineDJINN_BEAMS_MOTES 512motes in PARTICLES
#defineDJINN_BEAMS_TARGET_MOTES 64Each target's own run of the motes, of which the first eight are drawn.
#defineDJINN_BEAMS_MOTES_DRAWN 8
#defineDJINN_BEAMS_TARGET_TICKS 16Each target's motes and column start this many ticks after the last's.
#defineDJINN_BEAMS_MOTE_SWAY 16How far a mote sways either side, and the Djinni across and up and down, in pixels.
#defineDJINN_BEAMS_DJINNI_SWAY_X 20
#defineDJINN_BEAMS_DJINNI_SWAY_Y 4
#defineDJINN_BEAMS_MOTE_PICTURES 10000The motes (CrescentMoonSheet), then the Djinni, after the column's pictures (EarthWallSheet).
#defineDJINN_BEAMS_MOTE_WIDTH 24
#defineDJINN_BEAMS_MOTE_HEIGHT 24
#defineDJINN_BEAMS_DJINNI_PICTURE 26048
#defineDJINN_BEAMS_COLUMN_STRIP 5The column of light is one row of EarthWallSheet's 6x1 strip, bright in the middle and dimming to orange at its edge, after the 5x1 strip at the sprite sheet's start; each half of the column draws it, the second mirrored.
#defineDJINN_BEAMS_COLUMN_STRIP_WIDTH 6

Functions

NameDescription
voidbtEffectBuildCanvasBlitters (Sint32 flip, DRAW_RECTANGLE *out)Builds the two usual canvas blitters, clipped and mirrored when flip is nonzero: out[0] keeps the brighter level, out[1] adds the levels.
voidbtEffectRunRevive (BATTLE_EFFECT_PARM *args)Motes drift down over each target and a column of light falls on it, in the Venus Djinni's colours; with a prelude, a Venus Djinni appears first.
voidbtEffectRunDew (BATTLE_EFFECT_PARM *args)Dew plays Revive's beams of light in the Mercury Djinni's colours, and with a prelude a Mercury Djinni appears first.
voidbtEffectRunSpark (BATTLE_EFFECT_PARM *args)Spark plays Revive's beams of light in the Mars Djinni's colours, and with a prelude a Mars Djinni appears first.
voidbtEffectRunDjinnBeams (BATTLE_EFFECT_PARM *args, Sint32 element)When there is a prelude the Djinni of the element appears, sways and rises away; then over each target in turn, sixteen ticks apart, motes drift down swaying, and from tick 72 a column of light falls on it, flashing it, and narrows from tick 88.

Description

Canvas blitter setup and Djinn beams (Revive, Dew, Spark). Part of battle_effect.c.

Macros in detail

DJINN_BEAMS_MOTES

#define DJINN_BEAMS_MOTES 512

motes in PARTICLES

Referenced by btEffectRunDjinnBeams().

Definition at line 57 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_TARGET_MOTES

#define DJINN_BEAMS_TARGET_MOTES 64

Each target's own run of the motes, of which the first eight are drawn.

Referenced by btEffectRunDjinnBeams().

Definition at line 59 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_MOTES_DRAWN

#define DJINN_BEAMS_MOTES_DRAWN 8

Referenced by btEffectRunDjinnBeams().

Definition at line 60 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_TARGET_TICKS

#define DJINN_BEAMS_TARGET_TICKS 16

Each target's motes and column start this many ticks after the last's.

Referenced by btEffectRunDjinnBeams().

Definition at line 62 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_MOTE_SWAY

#define DJINN_BEAMS_MOTE_SWAY 16

How far a mote sways either side, and the Djinni across and up and down, in pixels.

Referenced by btEffectRunDjinnBeams().

Definition at line 65 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_DJINNI_SWAY_X

#define DJINN_BEAMS_DJINNI_SWAY_X 20

Referenced by btEffectRunDjinnBeams().

Definition at line 66 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_DJINNI_SWAY_Y

#define DJINN_BEAMS_DJINNI_SWAY_Y 4

Referenced by btEffectRunDjinnBeams().

Definition at line 67 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_MOTE_PICTURES

#define DJINN_BEAMS_MOTE_PICTURES 10000

The motes (CrescentMoonSheet), then the Djinni, after the column's pictures (EarthWallSheet).

Referenced by btEffectRunDjinnBeams().

Definition at line 71 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_MOTE_WIDTH

#define DJINN_BEAMS_MOTE_WIDTH 24

Referenced by btEffectRunDjinnBeams().

Definition at line 72 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_MOTE_HEIGHT

#define DJINN_BEAMS_MOTE_HEIGHT 24

Referenced by btEffectRunDjinnBeams().

Definition at line 73 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_DJINNI_PICTURE

#define DJINN_BEAMS_DJINNI_PICTURE 26048

Referenced by btEffectRunDjinnBeams().

Definition at line 74 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_COLUMN_STRIP

#define DJINN_BEAMS_COLUMN_STRIP 5

The column of light is one row of EarthWallSheet's 6x1 strip, bright in the middle and dimming to orange at its edge, after the 5x1 strip at the sprite sheet's start; each half of the column draws it, the second mirrored.

Referenced by btEffectRunDjinnBeams().

Definition at line 78 of file battle_effect_djinn_beams.c.

DJINN_BEAMS_COLUMN_STRIP_WIDTH

#define DJINN_BEAMS_COLUMN_STRIP_WIDTH 6

Referenced by btEffectRunDjinnBeams().

Definition at line 79 of file battle_effect_djinn_beams.c.

Functions in detail

btEffectBuildCanvasBlitters

void btEffectBuildCanvasBlitters(Sint32 flip, DRAW_RECTANGLE *out)

Builds the two usual canvas blitters, clipped and mirrored when flip is nonzero: out[0] keeps the brighter level, out[1] adds the levels.

References Sint32.

Referenced by btEffectRunAnnihilation(), btEffectRunBind(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCool(), btEffectRunDaedalus(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunFrost(), btEffectRunGatheringLights(), btEffectRunGeyser(), btEffectRunHail(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunHelmSplitter(), btEffectRunJuggle(), btEffectRunJupiter(), btEffectRunLiquifier(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMegaera(), btEffectRunMercury(), btEffectRunMoloch(), btEffectRunNereid(), btEffectRunNereidCopy(), btEffectRunOceanFist(), btEffectRunPlumeEdge(), btEffectRunPrism(), btEffectRunProcne(), btEffectRunRagnarok(), btEffectRunRushingStrike(), btEffectRunSerac(), btEffectRunSoulShatter(), btEffectRunSparkGroups(), btEffectRunStarMine(), btEffectRunStatReduction(), btEffectRunSwirlingStars(), btEffectRunTorch(), btEffectRunUlysses(), btEffectRunUndeadSword() and btEffectRunZagan().

Definition at line 6 of file battle_effect_djinn_beams.c.

btEffectRunRevive

void btEffectRunRevive(BATTLE_EFFECT_PARM *args)

Motes drift down over each target and a column of light falls on it, in the Venus Djinni's colours; with a prelude, a Venus Djinni appears first.

Abilities: Revive, Water of Life, Lich; Quartz.

References btEffectRunDjinnBeams().

Referenced by BattleEffectHandlers.

Definition at line 34 of file battle_effect_djinn_beams.c.

btEffectRunDew

void btEffectRunDew(BATTLE_EFFECT_PARM *args)

Dew plays Revive's beams of light in the Mercury Djinni's colours, and with a prelude a Mercury Djinni appears first.

Abilities: Dew.

References btEffectRunDjinnBeams().

Referenced by BattleEffectHandlers.

Definition at line 43 of file battle_effect_djinn_beams.c.

btEffectRunSpark

void btEffectRunSpark(BATTLE_EFFECT_PARM *args)

Spark plays Revive's beams of light in the Mars Djinni's colours, and with a prelude a Mars Djinni appears first.

Abilities: Spark.

References btEffectRunDjinnBeams().

Referenced by BattleEffectHandlers.

Definition at line 52 of file battle_effect_djinn_beams.c.

btEffectRunDjinnBeams

void btEffectRunDjinnBeams(BATTLE_EFFECT_PARM *args, Sint32 element)

When there is a prelude the Djinni of the element appears, sways and rises away; then over each target in turn, sixteen ticks apart, motes drift down swaying, and from tick 72 a column of light falls on it, flashing it, and narrows from tick 88.

References btEffectBuildCanvasBlitters(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectPosProjectScaledBattler(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btResourceLoadAndDecompress(), DjinnBeamsHeadHeights, DjinnBeamsHeadPictures, DjinnBeamsHeadWidths, DjinnBeamsMotePictures, Sint32, syCloseEvent(), syCos(), syMatrixTranslateVector(), syRandom(), sySin() and sySoundPlayStub().

Referenced by btEffectRunDew(), btEffectRunRevive() and btEffectRunSpark().

Definition at line 85 of file battle_effect_djinn_beams.c.