Alchemy
Loading...
Searching...
No Matches

plasma.c File Reference

Plasma, and the spark groups of Blast and Dynamite. More...

Go to the source code of this file.

Macros

#define PLASMA_SPARK_COUNT   1024
 sparks
#define PLASMA_SPACING   8
 frames between pillars
#define PLASMA_SECOND_IMAGE   0x1500
 the second picture in the sheet
#define PLASMA_COLUMN_X(side, pillar)
 gPlasma_Columns has seven pillars for each side.
#define SPARK_GROUPS_FLASHES   16
 flashes kept per burst
#define SPARK_GROUPS_SPACING   8
 frames between bursts
#define SPARK_GROUPS_RING   12
 of which drawn as the ring
#define SPARK_GROUPS_FLASH_DRAWN   18
 a flash is drawn for its last 18 frames

Functions

void BattleFx_RunPlasma (struct BattleEffectArgument *effect)
 Pillars of lightning strike one every 8 frames, each with a white flash, throwing sparks up from the ground and knocking the targets back; the battle shows the damage on frame 32.
void BattleFx_RunNova (struct BattleEffectArgument *effect)
 Bursts at (60, 48), the canvas behind the battle's first layer (priority 1).
void BattleFx_RunDynamite (struct BattleEffectArgument *effect)
 Orange bursts at (60, 64), the canvas in front (priority 0).
void BattleFx_RunSparkGroups (struct BattleEffectArgument *effect, s32 mode)
 One to three bursts, 8 frames apart: each flashes, rings itself with twelve smaller flashes that fade, and throws out sparks that bounce on the ground; every burst knocks the targets back.

Detailed Description

Plasma, and the spark groups of Blast and Dynamite.

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

Definition in file plasma.c.

Macro Definition Documentation

◆ PLASMA_SPARK_COUNT

#define PLASMA_SPARK_COUNT   1024

sparks

Definition at line 14 of file plasma.c.

Referenced by BattleFx_RunPlasma().

◆ PLASMA_SPACING

#define PLASMA_SPACING   8

frames between pillars

Definition at line 16 of file plasma.c.

Referenced by BattleFx_RunPlasma().

◆ PLASMA_SECOND_IMAGE

#define PLASMA_SECOND_IMAGE   0x1500

the second picture in the sheet

Definition at line 17 of file plasma.c.

Referenced by BattleFx_RunPlasma().

◆ PLASMA_COLUMN_X

#define PLASMA_COLUMN_X ( side,
pillar )
Value:
gPlasma_Columns[(side)][(pillar)]
u8 gPlasma_Columns[][7]
Each pillar's canvas x, seven for each side.

gPlasma_Columns has seven pillars for each side.

Definition at line 20 of file plasma.c.

Referenced by BattleFx_RunPlasma().

◆ SPARK_GROUPS_FLASHES

#define SPARK_GROUPS_FLASHES   16

flashes kept per burst

Definition at line 207 of file plasma.c.

Referenced by BattleFx_RunSparkGroups().

◆ SPARK_GROUPS_SPACING

#define SPARK_GROUPS_SPACING   8

frames between bursts

Definition at line 208 of file plasma.c.

Referenced by BattleFx_RunSparkGroups().

◆ SPARK_GROUPS_RING

#define SPARK_GROUPS_RING   12

of which drawn as the ring

Definition at line 209 of file plasma.c.

Referenced by BattleFx_RunSparkGroups().

◆ SPARK_GROUPS_FLASH_DRAWN

#define SPARK_GROUPS_FLASH_DRAWN   18

a flash is drawn for its last 18 frames

Definition at line 210 of file plasma.c.

Referenced by BattleFx_RunSparkGroups().

Function Documentation

◆ BattleFx_RunPlasma()

void BattleFx_RunPlasma ( struct BattleEffectArgument * effect)

Pillars of lightning strike one every 8 frames, each with a white flash, throwing sparks up from the ground and knocking the targets back; the battle shows the damage on frame 32.

Abilities: Plasma, Shine Plasma, Spark Plasma, Thunderclap, Thunderbolt, Thunderstorm (kind 18).

effect->variant picks how many pillars (gPlasma_Counts), how many sparks each throws and how long the screen shakes (gPlasma_Sparks); with variant 2 the camera also swings round for the first 64 frames. effect->side picks the row of pillar positions.

Sparks are PARTICLES 0 to 1023, canvas pixels in 16.16. Sets REG_BLDALPHA, loads the violet palette into the first 64 background colours (variant 2 keeps the lightning pillar sheet's), scrolls the camera (variant 2) and sets work->shakeFrames at each strike.

Definition at line 38 of file plasma.c.

Referenced by BattleFx_RunPlasma().

◆ BattleFx_RunNova()

void BattleFx_RunNova ( struct BattleEffectArgument * effect)

Bursts at (60, 48), the canvas behind the battle's first layer (priority 1).

Abilities: Blast, Nova, Supernova, Fire Bomb, Cluster Bomb, Carpet Bomb (kind 15).

Definition at line 198 of file plasma.c.

Referenced by BattleFx_RunNova().

◆ BattleFx_RunDynamite()

void BattleFx_RunDynamite ( struct BattleEffectArgument * effect)

Orange bursts at (60, 64), the canvas in front (priority 0).

Abilities: Dynamite (kind 338).

Definition at line 204 of file plasma.c.

Referenced by BattleFx_RunDynamite().

◆ BattleFx_RunSparkGroups()

void BattleFx_RunSparkGroups ( struct BattleEffectArgument * effect,
s32 mode )

One to three bursts, 8 frames apart: each flashes, rings itself with twelve smaller flashes that fade, and throws out sparks that bounce on the ground; every burst knocks the targets back.

effect->variant picks the shape from gPlasma_Shapes: sparks per burst, how many bursts, and each burst's offset across. Variant 2 also scrolls the camera, and variant 3 flashes the whole canvas on frame 4. mode : 0 at (60, 48), the battle shows the damage on frame 24; 1 at (60, 64), orange; the damage shows on frame 2; 2 below the user, in the LightningBolt colours, with the sparks rising instead of falling; the damage shows on frame 2.

Called by BattleFx_RunNova (mode 0) and BattleFx_RunDynamite (mode 1), and in mode 2 by BattleFx_RunCastingImpact for Severe Blow (variant 3) and by BattleFx_RunThrash (variant 4) and BattleFx_RunSparkApproachVariant3 (variant 3) in thrash.c, which set effect->variant first.

work->particles hold the ring flashes, 16 for each burst; PARTICLES the sparks, one run of gPlasma_Shapes' count for each burst. Sets REG_BLDALPHA, loads the flash burst palette into the first 64 background colours, then the orange (mode 1) or lightning (mode 2) one over it, scrolls the camera (variant 2) and sets work->shakeFrames at each burst.

Definition at line 234 of file plasma.c.

Referenced by BattleFx_RunCastingImpact(), BattleFx_RunDynamite(), BattleFx_RunNova(), BattleFx_RunSparkApproachVariant3(), BattleFx_RunSparkGroups(), and BattleFx_RunThrash().