Alchemy
Loading...
Searching...
No Matches

burst_shower.c File Reference

The blessings' burst showers. More...

Go to the source code of this file.

Macros

#define BURST_SHOWER_CELLS   0xC56
#define BURST_SHOWER_BURSTS   48
 one fired a frame from frame 0
#define BURST_SHOWER_BURST_LIFE   24
 frames each burst lives
#define BURST_SHOWER_FRAMES   64

Enumerations

enum  BurstShowerMode {
  BURST_SHOWER_MODE_FLASH , BURST_SHOWER_MODE_ICE , BURST_SHOWER_MODE_SPRAY , BURST_SHOWER_MODE_PINK ,
  BURST_SHOWER_MODE_DJINNI , BURST_SHOWER_MODE_LIGHTNING , BURST_SHOWER_MODE_GREY , BURST_SHOWER_MODE_FACES
}
 The burst shower's styles, its mode argument. More...

Functions

void BattleFx_ArmBg2AffineHBlankDma (void)
 Arms DMA 0 to copy one word of gBattleFxWork's bg2xLines table into BG2X at each horizontal blank, bending BG2 line by line.
void BattleFx_RunFireBlessing (struct BattleEffectArgument *effect)
 The user fires a stream of flash bursts at the targets, one a frame, each towards a random point near a target.
void BattleFx_RunWaterBlessing (struct BattleEffectArgument *effect)
 The user fires a stream of bursts at the targets in the water-spray palette.
void BattleFx_RunDarkBlessing (struct BattleEffectArgument *effect)
 The user fires a stream of grey bursts at the targets, which turn solid black and stay so.
void BattleFx_RunAcidBlessing (struct BattleEffectArgument *effect)
 Fires pink bursts from 16 pixels below the normal origin.
void BattleFx_RunStormBlessing (struct BattleEffectArgument *effect)
 Shows violet lightning between the user and targets instead of bursts: a bolt flickers through three pictures in front of the user, and the targets flash in turn without being knocked back.
void BattleFx_RunEvilBlessing (struct BattleEffectArgument *effect)
 The user fires a stream of demon faces at the targets, from 16 pixels in front of it.
void BattleFx_RunDeadlyGas (struct BattleEffectArgument *effect)
 The user fires a stream of Mars-coloured bursts at the targets, from 28 pixels in front of it.
void BattleFx_RunBurstShower (struct BattleEffectArgument *effect, s32 mode)
 Burst shower: for 48 frames the user fires one burst a frame at a random point near one of the targets, taking them in turn, and each target is hit every 8 frames.

Detailed Description

The blessings' burst showers.

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

Definition in file burst_shower.c.

Macro Definition Documentation

◆ BURST_SHOWER_CELLS

#define BURST_SHOWER_CELLS   0xC56

Definition at line 8 of file burst_shower.c.

Referenced by BattleFx_RunBurstShower().

◆ BURST_SHOWER_BURSTS

#define BURST_SHOWER_BURSTS   48

one fired a frame from frame 0

Definition at line 9 of file burst_shower.c.

Referenced by BattleFx_RunBurstShower().

◆ BURST_SHOWER_BURST_LIFE

#define BURST_SHOWER_BURST_LIFE   24

frames each burst lives

Definition at line 10 of file burst_shower.c.

Referenced by BattleFx_RunBurstShower().

◆ BURST_SHOWER_FRAMES

#define BURST_SHOWER_FRAMES   64

Definition at line 87 of file burst_shower.c.

Referenced by BattleFx_RunBurstShower().

Enumeration Type Documentation

◆ BurstShowerMode

The burst shower's styles, its mode argument.

Enumerator
BURST_SHOWER_MODE_FLASH 

flash bursts

BURST_SHOWER_MODE_ICE 

in the ice block palette

BURST_SHOWER_MODE_SPRAY 

in the water spray palette

BURST_SHOWER_MODE_PINK 

pink, fired from 16 pixels lower

BURST_SHOWER_MODE_DJINNI 

Mars djinni palette, 28 pixels in front.

BURST_SHOWER_MODE_LIGHTNING 

no bursts: a violet lightning bolt

BURST_SHOWER_MODE_GREY 

grey; the targets stay solid black

BURST_SHOWER_MODE_FACES 

demon faces from 16 pixels in front

Definition at line 13 of file burst_shower.c.

Function Documentation

◆ BattleFx_ArmBg2AffineHBlankDma()

void BattleFx_ArmBg2AffineHBlankDma ( void )

Arms DMA 0 to copy one word of gBattleFxWork's bg2xLines table into BG2X at each horizontal blank, bending BG2 line by line.

Runs each frame as a scheduler callback added by the target motes, the casting impacts, Condemn, the gathering lights, Torch and Planet Diver, each of which removes it before it returns. Stops DMA 0 and restarts it from the top of the table.

Definition at line 31 of file burst_shower.c.

Referenced by BattleFx_ArmBg2AffineHBlankDma(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunGatheringLights(), BattleFx_RunHaunt(), BattleFx_RunOrbitingSpirals(), BattleFx_RunTargetMotes(), and BattleFx_RunTorch().

◆ BattleFx_RunFireBlessing()

void BattleFx_RunFireBlessing ( struct BattleEffectArgument * effect)

The user fires a stream of flash bursts at the targets, one a frame, each towards a random point near a target.

Abilities: Fire Blessing (kind 400).

Definition at line 43 of file burst_shower.c.

Referenced by BattleFx_RunFireBlessing().

◆ BattleFx_RunWaterBlessing()

void BattleFx_RunWaterBlessing ( struct BattleEffectArgument * effect)

The user fires a stream of bursts at the targets in the water-spray palette.

Abilities: Water Blessing (kind 401).

Definition at line 49 of file burst_shower.c.

Referenced by BattleFx_RunWaterBlessing().

◆ BattleFx_RunDarkBlessing()

void BattleFx_RunDarkBlessing ( struct BattleEffectArgument * effect)

The user fires a stream of grey bursts at the targets, which turn solid black and stay so.

Abilities: Dark Blessing (kind 403).

Definition at line 56 of file burst_shower.c.

Referenced by BattleFx_RunDarkBlessing().

◆ BattleFx_RunAcidBlessing()

void BattleFx_RunAcidBlessing ( struct BattleEffectArgument * effect)

Fires pink bursts from 16 pixels below the normal origin.

Abilities: Dark Blessing, Acid Blessing (kind 404).

Definition at line 62 of file burst_shower.c.

Referenced by BattleFx_RunAcidBlessing().

◆ BattleFx_RunStormBlessing()

void BattleFx_RunStormBlessing ( struct BattleEffectArgument * effect)

Shows violet lightning between the user and targets instead of bursts: a bolt flickers through three pictures in front of the user, and the targets flash in turn without being knocked back.

Abilities: Storm Blessing (kind 405).

Definition at line 70 of file burst_shower.c.

Referenced by BattleFx_RunStormBlessing().

◆ BattleFx_RunEvilBlessing()

void BattleFx_RunEvilBlessing ( struct BattleEffectArgument * effect)

The user fires a stream of demon faces at the targets, from 16 pixels in front of it.

Abilities: Evil Blessing (kind 406).

Definition at line 77 of file burst_shower.c.

Referenced by BattleFx_RunEvilBlessing().

◆ BattleFx_RunDeadlyGas()

void BattleFx_RunDeadlyGas ( struct BattleEffectArgument * effect)

The user fires a stream of Mars-coloured bursts at the targets, from 28 pixels in front of it.

Abilities: Deadly Gas (kind 407).

Definition at line 84 of file burst_shower.c.

Referenced by BattleFx_RunDeadlyGas().

◆ BattleFx_RunBurstShower()

void BattleFx_RunBurstShower ( struct BattleEffectArgument * effect,
s32 mode )

Burst shower: for 48 frames the user fires one burst a frame at a random point near one of the targets, taking them in turn, and each target is hit every 8 frames.

Each burst lives 24 frames. A sound plays on frame 4 and the battle shows the damage on frame 24 (frame 60 in the grey mode).

Called by the seven blessing wrappers above. Each burst is one of work->particles, its variant counting the frames it has lived (-1 when free). Writes REG_BLDALPHA, the first 64 BG colours (all but modes 5 and 7), REG_BLDCNT in the grey mode and REG_BG2PA in the lightning mode; sets work->shakeFrames on each hit. Ends with the transfer callback removed, the blitters freed and the canvas layer closed.

effect: the user and the targets. mode: the burst and its palette: 0 flash bursts, 1 in the ice block palette, 2 in the water spray palette, 3 pink and fired from 16 pixels lower, 4 in the Mars djinni palette from 28 pixels in front, 6 grey (the targets turn solid black and stay so), 7 demon faces from 16 pixels in front. Mode 5 fires no bursts: a violet lightning bolt stands between the user and the targets, on a canvas shown at three times its width. No kind in the effect table uses mode 1.

Definition at line 110 of file burst_shower.c.

Referenced by BattleFx_RunAcidBlessing(), BattleFx_RunBurstShower(), BattleFx_RunDarkBlessing(), BattleFx_RunDeadlyGas(), BattleFx_RunEvilBlessing(), BattleFx_RunFireBlessing(), BattleFx_RunStormBlessing(), and BattleFx_RunWaterBlessing().