Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_eruption.c

Smoke Bomb and Blast, and the function that creates an effect's sprites. More…

Included by battle_effect.c.

Macros

NameDescription
#defineERUPTION_MOTE_PICTURES 12800The mote pictures in the sprite sheet: two sets, MOTE_SET_BYTES apart.
#defineERUPTION_PUFFS 32The puffs of smoke given a start, of which the variant's count in EruptionCounts are thrown.
#defineERUPTION_PUFF_TICKS 21A puff shows each of its seven pictures (EruptionPuffPictures) for three ticks, then is gone.
#defineERUPTION_MOTE_LARGEST 9A mote is drawn ERUPTION_MOTE_LARGEST pixels wide (and twice as tall) at the nearest depth, a pixel narrower for every ERUPTION_MOTE_DEPTH_STEP farther, its depth clamped from ERUPTION_MOTE_DEPTH_NEAR to ERUPTION_MOTE_DEPTH_FAR.
#defineERUPTION_MOTE_DEPTH_NEAR 160
#defineERUPTION_MOTE_DEPTH_FAR 799
#defineERUPTION_MOTE_DEPTH_STEP 64

Enumerations

NameDescription
enumERUPTION_MODE { ERUPTION_BLAST, ERUPTION_SMOKE_BOMB }The eruption's modes (btEffectRunEruption).

Functions

NameDescription
voidbtEffectRunSmokeBomb (BATTLE_EFFECT_PARM *args)A fountain of grey motes and puffs of smoke bursts up beside the targets and falls back, flashing each target.
voidbtEffectRunBlast (BATTLE_EFFECT_PARM *args)A fountain of fire-coloured motes and puffs of smoke bursts up beside the targets and falls back, flashing each target and making it recoil.
voidbtEffectRunEruption (BATTLE_EFFECT_PARM *args, Sint32 mode)A fountain of motes and puffs of smoke bursts up beside the targets and falls back, hitting the targets one after another.
voidbtEffectCreateSprites (Sint32 count, Sint32 spriteId, Uint32 priority)Creates the effect's sprites in its state: count sprites of spriteId, the nth showing its animation n, all at the given priority.
voidbtEffectNoOperation (void)Does nothing; btEffectCallNoOperation calls it in a busy wait.

Description

Smoke Bomb and Blast, and the function that creates an effect's sprites. Part of battle_effect.c.

Macros in detail

ERUPTION_MOTE_PICTURES

#define ERUPTION_MOTE_PICTURES 12800

The mote pictures in the sprite sheet: two sets, MOTE_SET_BYTES apart.

Referenced by btEffectRunEruption().

Definition at line 31 of file battle_effect_eruption.c.

ERUPTION_PUFFS

#define ERUPTION_PUFFS 32

The puffs of smoke given a start, of which the variant's count in EruptionCounts are thrown.

Referenced by btEffectRunEruption().

Definition at line 35 of file battle_effect_eruption.c.

ERUPTION_PUFF_TICKS

#define ERUPTION_PUFF_TICKS 21

A puff shows each of its seven pictures (EruptionPuffPictures) for three ticks, then is gone.

Referenced by btEffectRunEruption().

Definition at line 38 of file battle_effect_eruption.c.

ERUPTION_MOTE_LARGEST

#define ERUPTION_MOTE_LARGEST 9

A mote is drawn ERUPTION_MOTE_LARGEST pixels wide (and twice as tall) at the nearest depth, a pixel narrower for every ERUPTION_MOTE_DEPTH_STEP farther, its depth clamped from ERUPTION_MOTE_DEPTH_NEAR to ERUPTION_MOTE_DEPTH_FAR.

Referenced by btEffectRunEruption().

Definition at line 42 of file battle_effect_eruption.c.

ERUPTION_MOTE_DEPTH_NEAR

#define ERUPTION_MOTE_DEPTH_NEAR 160

Referenced by btEffectRunEruption().

Definition at line 43 of file battle_effect_eruption.c.

ERUPTION_MOTE_DEPTH_FAR

#define ERUPTION_MOTE_DEPTH_FAR 799

Referenced by btEffectRunEruption().

Definition at line 44 of file battle_effect_eruption.c.

ERUPTION_MOTE_DEPTH_STEP

#define ERUPTION_MOTE_DEPTH_STEP 64

Referenced by btEffectRunEruption().

Definition at line 45 of file battle_effect_eruption.c.

Enumerations in detail

ERUPTION_MODE

enum ERUPTION_MODE

The eruption's modes (btEffectRunEruption).

EnumeratorValueDescription
ERUPTION_BLASTfire streak colours; the variant picks the counts and the targets recoil
ERUPTION_SMOKE_BOMBgreys, with Mad Blast's counts

Definition at line 5 of file battle_effect_eruption.c.

Functions in detail

btEffectRunSmokeBomb

void btEffectRunSmokeBomb(BATTLE_EFFECT_PARM *args)

A fountain of grey motes and puffs of smoke bursts up beside the targets and falls back, flashing each target.

Abilities: Smoke Bomb, Sleep Bomb.

References btEffectRunEruption().

Referenced by BattleEffectHandlers.

Definition at line 16 of file battle_effect_eruption.c.

btEffectRunBlast

void btEffectRunBlast(BATTLE_EFFECT_PARM *args)

A fountain of fire-coloured motes and puffs of smoke bursts up beside the targets and falls back, flashing each target and making it recoil.

Abilities: Blast, Mad Blast, Fiery Blast.

References btEffectRunEruption().

Referenced by BattleEffectHandlers.

Definition at line 25 of file battle_effect_eruption.c.

btEffectRunEruption

void btEffectRunEruption(BATTLE_EFFECT_PARM *args, Sint32 mode)

A fountain of motes and puffs of smoke bursts up beside the targets and falls back, hitting the targets one after another.

References BattleEffectMotePictures, btCameraShake(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), EruptionCounts, EruptionPuffPictures, EruptionPuffSizes, Sint32, syRandom(), syResourceGetTableEntry() and sySoundPlayStub().

Referenced by btEffectRunBlast() and btEffectRunSmokeBomb().

Definition at line 49 of file battle_effect_eruption.c.

btEffectCreateSprites

void btEffectCreateSprites(Sint32 count, Sint32 spriteId, Uint32 priority)

Creates the effect's sprites in its state: count sprites of spriteId, the nth showing its animation n, all at the given priority.

References fdSpriteCreateStub(), fdSpriteStartAnimationStub() and Sint32.

Referenced by btEffectRunAzul(), btEffectRunBoreas(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunDragonFire(), btEffectRunHaures(), btEffectRunKirin(), btEffectRunMegaera(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunMoloch(), btEffectRunNereid(), btEffectRunNereidCopy(), btEffectRunProcne(), btEffectRunRamses(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTrident(), btEffectRunUlysses() and btEffectRunZagan().

Definition at line 248 of file battle_effect_eruption.c.

btEffectNoOperation

void btEffectNoOperation(void)

Does nothing; btEffectCallNoOperation calls it in a busy wait.

Referenced by btEffectCallNoOperation().

Definition at line 270 of file battle_effect_eruption.c.