Alchemy
Loading...
Searching...
No Matches

bolt.c File Reference

Bolt. More...

Go to the source code of this file.

Macros

#define BOLT_GLINT_BLITTER
 The second blitter, made anew for each glint with its random flip.
#define BOLT_CELLS   0xc56
 The bolt pictures in the sheet, after the tornado.

Enumerations

enum  { BOLT_SPARKS , BOLT_GLINTS , BOLT_GLINT_SPREAD , BOLT_STRIKES }
 The columns of a gBolt_Counts row. More...

Functions

void BattleFx_RunBolt (struct BattleEffectArgument *effect)
 A bolt of lightning strikes each target in turn, 8 frames apart.

Detailed Description

Bolt.

Part of effect.c, the battle effect object, compiled only through it.

Definition in file bolt.c.

Macro Definition Documentation

◆ BOLT_GLINT_BLITTER

#define BOLT_GLINT_BLITTER
Value:
void * gBattleFxWork[]
BattleEffectDrawRectangle DrawRectangle
@ HEAP_SLOT_BATTLE_EFFECT
Definition heap_state.h:42
@ HEAP_SLOT_BLITTER_ALTERNATE
Definition heap_state.h:47

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

Definition at line 8 of file bolt.c.

Referenced by BattleFx_RunBolt().

◆ BOLT_CELLS

#define BOLT_CELLS   0xc56

The bolt pictures in the sheet, after the tornado.

Definition at line 21 of file bolt.c.

Referenced by BattleFx_RunBolt().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The columns of a gBolt_Counts row.

Enumerator
BOLT_SPARKS 

sparks thrown from each bolt's foot

BOLT_GLINTS 

glints a frame around each target

BOLT_GLINT_SPREAD 

how high and wide the glints spread

BOLT_STRIKES 

bolts drawn over each other

Definition at line 13 of file bolt.c.

Function Documentation

◆ BattleFx_RunBolt()

void BattleFx_RunBolt ( struct BattleEffectArgument * effect)

A bolt of lightning strikes each target in turn, 8 frames apart.

Abilities: Bolt, Flash Bolt, Blue Bolt (kind 16).

Target i's turn starts on frame 8i with a flash of the canvas. The bolt drops from the top, 64 pixels a frame down to y 104, and the screen shakes the frame after; on frame 8i + 2 sparks fly up from its foot and glints flicker there for 22 frames; on frame 8i + 4 the target recoils. The battle moves on to the results on frame 24.

PARTICLES holds the sparks, 128 for each target. Sets work->shakeFrames on each strike, and ends with the transfer callback removed, the blitter freed and the canvas layer closed; the glints' blitter is built and freed for each glint.

effect: the targets; variant picks the row of gBolt_Counts and the glints' blend.

Definition at line 40 of file bolt.c.

Referenced by BattleFx_RunBolt().