src/battle_effect/battle_effect_bolt.c
Bolt. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | BOLT_GLINT_BLITTER EFFECT_BLITTER(HEAP_SLOT_RAM_CODE_PAIRED) | The second blitter, made anew for each glint with its random flip. |
#define | BOLT_PICTURES GLINT_SET_BYTES | Where the bolt pictures start in the sprite sheet, after the six glints. |
#define | BOLT_INTERVAL 8 | The targets are struck this many ticks apart. |
#define | BOLT_SPARKS_PER_TARGET 128 | Each target's run of PARTICLES for its sparks. |
#define | BOLT_GROUND_Y 104 | The canvas row the bolts reach down to and the sparks bounce off. |
#define | BOLT_SPARK_SHRINK_TICKS 16 | A spark is drawn a size smaller for every this many ticks less it has to live. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { BOLT_SPARKS, BOLT_GLINTS, BOLT_GLINT_SPREAD, BOLT_STRIKES } | The columns of a BoltCounts row. |
Functions
| Name | Description | |
|---|---|---|
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. |
Description
Bolt. Part of battle_effect.c.
Macros in detail
BOLT_GLINT_BLITTER
#define BOLT_GLINT_BLITTER EFFECT_BLITTER(HEAP_SLOT_RAM_CODE_PAIRED)
The second blitter, made anew for each glint with its random flip.
Referenced by btEffectRunBolt().
Definition at line 4 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 17 of file battle_effect_bolt.c.
BOLT_INTERVAL
#define BOLT_INTERVAL 8
The targets are struck this many ticks apart.
Referenced by btEffectRunBolt().
Definition at line 19 of file battle_effect_bolt.c.
BOLT_SPARKS_PER_TARGET
#define BOLT_SPARKS_PER_TARGET 128
Each target's run of PARTICLES for its sparks.
Referenced by btEffectRunBolt().
Definition at line 21 of file battle_effect_bolt.c.
BOLT_GROUND_Y
#define BOLT_GROUND_Y 104
The canvas row the bolts reach down to and the sparks bounce off.
Referenced by btEffectRunBolt().
Definition at line 23 of file battle_effect_bolt.c.
BOLT_SPARK_SHRINK_TICKS
#define BOLT_SPARK_SHRINK_TICKS 16
A spark is drawn a size smaller for every this many ticks less it has to live.
Referenced by btEffectRunBolt().
Definition at line 26 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.
| Enumerator | Value | Description |
|---|---|---|
BOLT_SPARKS | sparks thrown from each bolt's foot, at most BOLT_SPARKS_PER_TARGET | |
BOLT_GLINTS | glints a tick around each target | |
BOLT_GLINT_SPREAD | how high and wide the glints spread, in pixels | |
BOLT_STRIKES | bolts drawn over each other |
Definition at line 7 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, BoltCounts, BoltGlintFlips, BoltGlintModes, btCameraShake(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btParticleAdvanceWithGravity2D(), btProjectionUnit(), btResourceLoadAndDecompress(), Sint32, state, syCos(), syHeapSlotRelease(), syRandom(), sySin(), sySoundPlayStub() and syWordsFill().
Referenced by BattleEffectHandlers.
Definition at line 32 of file battle_effect_bolt.c.