Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_bolt.c

Bolt, Flash Bolt and Blue Bolt: lightning strikes each target in turn. More…

Included by battle_effect.c.

Macros

NameDescription
#defineBOLT_INTERVAL 8ticks between one target's bolt and the next's
#defineBOLT_SPARKS_PER_TARGET
#defineBOLT_GROUND_Yfrom
#defineBOLT_FLASH_LEVELbounce
#defineBOLT_SPARK_SIZE_TICKS
#defineBOLT_GLINT_BLITTER (RamHeapSlots->ramCodePaired)The second blitter, made anew for each glint with its random flip.
#defineBOLT_COUNT (variant, column)A variant's count in column column of BoltCounts.
#defineBOLT_PICTURES GLINT_SET_BYTESWhere the bolt pictures start in the sprite sheet, after the six glints.

Enumerations

NameDescription
enumanonymous enum { BOLT_SPARKS, BOLT_GLINTS, BOLT_GLINT_SPREAD, BOLT_STRIKES, B … }The columns of a BoltCounts row, one row a variant.

Functions

NameDescription
voidbtEffectRunBolt (BATTLE_EFFECT_PARM *args)A bolt of lightning strikes each target in turn, and sparks fly up from where it lands while glints flicker there.

Description

Bolt, Flash Bolt and Blue Bolt: lightning strikes each target in turn. Part of battle_effect.c.

Macros in detail

BOLT_INTERVAL

#define BOLT_INTERVAL 8

ticks between one target's bolt and the next's

Referenced by btEffectRunBolt().

Definition at line 4 of file battle_effect_bolt.c.

BOLT_SPARKS_PER_TARGET

#define BOLT_SPARKS_PER_TARGET

Referenced by btEffectRunBolt().

Definition at line 5 of file battle_effect_bolt.c.

BOLT_GROUND_Y

#define BOLT_GROUND_Y

from

Referenced by btEffectRunBolt().

Definition at line 8 of file battle_effect_bolt.c.

BOLT_FLASH_LEVEL

#define BOLT_FLASH_LEVEL

bounce

Referenced by btEffectRunBolt().

Definition at line 11 of file battle_effect_bolt.c.

BOLT_SPARK_SIZE_TICKS

#define BOLT_SPARK_SIZE_TICKS

Referenced by btEffectRunBolt().

Definition at line 13 of file battle_effect_bolt.c.

BOLT_GLINT_BLITTER

#define BOLT_GLINT_BLITTER (RamHeapSlots->ramCodePaired)

The second blitter, made anew for each glint with its random flip.

Referenced by btEffectRunBolt().

Definition at line 17 of file battle_effect_bolt.c.

BOLT_COUNT

#define BOLT_COUNT(variant, column)

A variant's count in column column of BoltCounts.

Referenced by btEffectRunBolt().

Definition at line 31 of file battle_effect_bolt.c.

BOLT_PICTURES

#define BOLT_PICTURES GLINT_SET_BYTES

Where the bolt pictures start in the sprite sheet, after the six glints.

Referenced by btEffectRunBolt().

Definition at line 35 of file battle_effect_bolt.c.

Enumerations in detail

anonymous enum

enum { BOLT_SPARKS, BOLT_GLINTS, BOLT_GLINT_SPREAD, BOLT_STRIKES, … }

The columns of a BoltCounts row, one row a variant.

EnumeratorValueDescription
BOLT_SPARKSsparks from each bolt's foot, at most BOLT_SPARKS_PER_TARGET per target
BOLT_GLINTSglints a tick around each target
BOLT_GLINT_SPREADhow high and wide the glints spread, in pixels
BOLT_STRIKESbolts drawn over each other
BOLT_COUNT_COLUMNS

Definition at line 20 of file battle_effect_bolt.c.

Functions in detail

btEffectRunBolt

void btEffectRunBolt(BATTLE_EFFECT_PARM *args)

A bolt of lightning strikes each target in turn, and sparks fly up from where it lands while glints flicker there.

Abilities: Bolt, Flash Bolt, Blue Bolt.

References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, BoltGlintFlips, BoltGlintModes, btCameraShake(), btEffectPosProjectBattler(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), Sint32, syCos(), syHeapSlotRelease(), syRandom(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 41 of file battle_effect_bolt.c.