Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_burst_shower.c

The burst shower: a stream of shots from the user at the targets, which most monster breaths and a few Djinn play, each with its own picture. More…

Included by battle_effect.c.

Macros

NameDescription
#defineVIOLET_LIGHTNING_WIDTH 72VioletLightningSheetA's bolts, one every 72x64 bytes, drawn 62 tall; MusicNoteSheet's three 32x32 notes; BlueBeamSheet's 24x24 bubble, each row written twice so that it draws 48 tall, round at the canvas's double width.
#defineVIOLET_LIGHTNING_HEIGHT 62
#defineVIOLET_LIGHTNING_BYTES (VIOLET_LIGHTNING_WIDTH * 64)
#defineMUSIC_NOTE_WIDTH 32
#defineMUSIC_NOTE_HEIGHT 32
#defineMUSIC_NOTE_COUNT 3
#defineDEMON_FACE_WIDTH 32DemonFaceSheet's face.
#defineDEMON_FACE_HEIGHT 64
#defineMUSIC_NOTE_DIMMING 16The levels the music notes are darkened by; a drawn pixel keeps level 1.
#defineFLASH_BURST_HOLES (picture) ((picture) * 512 + 1024)The holes punched at random in each of the six burst or smoke pictures of the sand, ice and Char modes, more in each later one.
#defineSMOKE_PUFF_HOLES (picture) ((picture) * 256 + 512)
#defineBURST_SHOWER_BURSTS 48One fired a tick from tick 0.
#defineBURST_SHOWER_BURST_LIFE 24Ticks each shot lives.
#defineBURST_SHOWER_NOTE_LIFE 32Ticks each music note lives.
#defineAGING_GAS_BURSTS 16Aging Gas fires AGING_GAS_BURSTS shots, and AGING_GAS_MOTES motes burst from the first target, of which the first AGING_GAS_DRAWN_MOTES are drawn into the user.
#defineAGING_GAS_MOTES 128
#defineAGING_GAS_DRAWN_MOTES 24

Enumerations

NameDescription
enumBURST_SHOWER_MODE { BURST_SHOWER_MODE_FLASH, BURST_SHOWER_MODE_ICE, BURST_SHOWER … }The burst shower's styles, its mode argument (btEffectRunBurstShower): The Broken Seal's eight, named for how they look, then this game's, each named for the effect that plays it.
enumBURST_SHOWER_SHEET { BURST_SHOWER_BUBBLE, BURST_SHOWER_PICTURE, BURST_SHOWER_ROCK … }Where the burst shower keeps its pictures in the effect's sprite sheet: the notes, hearts or smoke of the modes that load them first, at 0.

Functions

NameDescription
voidbtEffectArmBg2AffineHBlankDMA (void)Restarts DMA channel 0 as an H-blank transfer of the effect state's line table into BG2X, one word a line.
voidbtEffectArmBg1HBlankDMA (void)btEffectArmBg2AffineHBlankDMA for BG1HOFS and BG1VOFS: the line table moves layer 1.
voidbtEffectRunFireBreath (BATTLE_EFFECT_PARM *args)Abilities: Fire Breath, Salamander, Cerberus, Wyvern, Chimera, Macetail, Fire Dragon, Flame Breath.
voidbtEffectRunToxicBreath (BATTLE_EFFECT_PARM *args)Abilities: Toxic Breath.
voidbtEffectRunWaterBreath (BATTLE_EFFECT_PARM *args)Abilities: Water Breath, Aqua Breath.
voidbtEffectRunDarkBreath (BATTLE_EFFECT_PARM *args)Abilities: Dark Breath.
voidbtEffectRunAcidBreath (BATTLE_EFFECT_PARM *args)Abilities: Acid Breath.
voidbtEffectRunStormBreath (BATTLE_EFFECT_PARM *args)Abilities: Storm Breath.
voidbtEffectRunStormBreathStrong (BATTLE_EFFECT_PARM *args)Storm Breath as its second, stronger row (power 220 against 190) casts it.
voidbtEffectRunEvilBlessing (BATTLE_EFFECT_PARM *args)Abilities: Evil Blessing.
voidbtEffectRunDarksolGasp (BATTLE_EFFECT_PARM *args)Abilities: Darksol Gasp.
voidbtEffectRunDeadlyGas (BATTLE_EFFECT_PARM *args)Abilities: Deadly Gas.
voidbtEffectRunPetra (BATTLE_EFFECT_PARM *args)Abilities: Petra.
voidbtEffectRunChar (BATTLE_EFFECT_PARM *args)Abilities: Char.
voidbtEffectRunFury (BATTLE_EFFECT_PARM *args)Abilities: Fury.
voidbtEffectRunFugue (BATTLE_EFFECT_PARM *args)Abilities: Fugue.
voidbtEffectRunSandBreath (BATTLE_EFFECT_PARM *args)Abilities: Sand Breath.
voidbtEffectRunDesertGasp (BATTLE_EFFECT_PARM *args)Abilities: Desert Gasp.
voidbtEffectRunBlackIce (BATTLE_EFFECT_PARM *args)Abilities: Black Ice.
voidbtEffectRunTyphoonBlow (BATTLE_EFFECT_PARM *args)Abilities: Typhoon Blow.
voidbtEffectRunDjinnfest (BATTLE_EFFECT_PARM *args)Abilities: Djinnfest.
voidbtEffectRunHeatKiss (BATTLE_EFFECT_PARM *args)Abilities: Heat Kiss.
voidbtEffectRunFireDancePhoenix (BATTLE_EFFECT_PARM *args)Fire Dance as the Phoenix, the Fire Bird and the Wonder Bird use it (ABILITY_FIRE_DANCE_PHOENIX).
voidbtEffectRunGravelBlow (BATTLE_EFFECT_PARM *args)Abilities: Gravel Blow.
voidbtEffectRunAgingGas (BATTLE_EFFECT_PARM *args)The user takes its leap pose and animates fast while the burst shower plays.
voidbtEffectRunFireDance (BATTLE_EFFECT_PARM *args)The user takes its leap pose and animates fast while the burst shower plays.
voidbtEffectRunBurstShower (BATTLE_EFFECT_PARM *args, Uint32 mode)The user fires one shot a tick at a point near one of the targets, taking them in turn, and each target is hit in turn; the blend fades over the last eight ticks.

Description

The burst shower: a stream of shots from the user at the targets, which most monster breaths and a few Djinn play, each with its own picture. And the two HBlank DMAs that wave a layer line by line from the effect's line table. Part of battle_effect.c.

Macros in detail

VIOLET_LIGHTNING_WIDTH

#define VIOLET_LIGHTNING_WIDTH 72

VioletLightningSheetA's bolts, one every 72x64 bytes, drawn 62 tall; MusicNoteSheet's three 32x32 notes; BlueBeamSheet's 24x24 bubble, each row written twice so that it draws 48 tall, round at the canvas's double width.

Referenced by btEffectRunBurstShower().

Definition at line 56 of file battle_effect_burst_shower.c.

VIOLET_LIGHTNING_HEIGHT

#define VIOLET_LIGHTNING_HEIGHT 62

Referenced by btEffectRunBurstShower().

Definition at line 57 of file battle_effect_burst_shower.c.

VIOLET_LIGHTNING_BYTES

#define VIOLET_LIGHTNING_BYTES (VIOLET_LIGHTNING_WIDTH * 64)

Referenced by btEffectRunBurstShower().

Definition at line 58 of file battle_effect_burst_shower.c.

MUSIC_NOTE_WIDTH

#define MUSIC_NOTE_WIDTH 32

Referenced by btEffectRunBurstShower().

Definition at line 59 of file battle_effect_burst_shower.c.

MUSIC_NOTE_HEIGHT

#define MUSIC_NOTE_HEIGHT 32

Referenced by btEffectRunBurstShower().

Definition at line 60 of file battle_effect_burst_shower.c.

MUSIC_NOTE_COUNT

#define MUSIC_NOTE_COUNT 3

Referenced by btEffectRunBurstShower().

Definition at line 61 of file battle_effect_burst_shower.c.

DEMON_FACE_WIDTH

#define DEMON_FACE_WIDTH 32

DemonFaceSheet's face.

Referenced by btEffectRunBurstShower().

Definition at line 63 of file battle_effect_burst_shower.c.

DEMON_FACE_HEIGHT

#define DEMON_FACE_HEIGHT 64

Referenced by btEffectRunBurstShower().

Definition at line 64 of file battle_effect_burst_shower.c.

MUSIC_NOTE_DIMMING

#define MUSIC_NOTE_DIMMING 16

The levels the music notes are darkened by; a drawn pixel keeps level 1.

Referenced by btEffectRunBurstShower().

Definition at line 66 of file battle_effect_burst_shower.c.

FLASH_BURST_HOLES

#define FLASH_BURST_HOLES(picture) ((picture) * 512 + 1024)

The holes punched at random in each of the six burst or smoke pictures of the sand, ice and Char modes, more in each later one.

Referenced by btEffectRunBurstShower().

Definition at line 69 of file battle_effect_burst_shower.c.

SMOKE_PUFF_HOLES

#define SMOKE_PUFF_HOLES(picture) ((picture) * 256 + 512)

Referenced by btEffectRunBurstShower().

Definition at line 70 of file battle_effect_burst_shower.c.

BURST_SHOWER_BURSTS

#define BURST_SHOWER_BURSTS 48

One fired a tick from tick 0.

Referenced by btEffectRunBurstShower().

Definition at line 73 of file battle_effect_burst_shower.c.

BURST_SHOWER_BURST_LIFE

#define BURST_SHOWER_BURST_LIFE 24

Ticks each shot lives.

Referenced by btEffectRunBurstShower().

Definition at line 75 of file battle_effect_burst_shower.c.

BURST_SHOWER_NOTE_LIFE

#define BURST_SHOWER_NOTE_LIFE 32

Ticks each music note lives.

Referenced by btEffectRunBurstShower().

Definition at line 77 of file battle_effect_burst_shower.c.

AGING_GAS_BURSTS

#define AGING_GAS_BURSTS 16

Aging Gas fires AGING_GAS_BURSTS shots, and AGING_GAS_MOTES motes burst from the first target, of which the first AGING_GAS_DRAWN_MOTES are drawn into the user.

Referenced by btEffectRunBurstShower().

Definition at line 81 of file battle_effect_burst_shower.c.

AGING_GAS_MOTES

#define AGING_GAS_MOTES 128

Referenced by btEffectRunBurstShower().

Definition at line 82 of file battle_effect_burst_shower.c.

AGING_GAS_DRAWN_MOTES

#define AGING_GAS_DRAWN_MOTES 24

Referenced by btEffectRunBurstShower().

Definition at line 83 of file battle_effect_burst_shower.c.

Enumerations in detail

BURST_SHOWER_MODE

enum BURST_SHOWER_MODE

The burst shower's styles, its mode argument (btEffectRunBurstShower): The Broken Seal's eight, named for how they look, then this game's, each named for the effect that plays it.

EnumeratorValueDescription
BURST_SHOWER_MODE_FLASHflash bursts: the fire breaths
BURST_SHOWER_MODE_ICEunused: in the ice block palette
BURST_SHOWER_MODE_SPRAYin the water spray palette: Water Breath
BURST_SHOWER_MODE_PINKpink, fired from 16 pixels higher: Acid Breath
BURST_SHOWER_MODE_DJINNIin a Mars Djinni's palette, 28 pixels in front: Deadly Gas
BURST_SHOWER_MODE_LIGHTNINGno bursts: a violet lightning bolt (Storm Breath)
BURST_SHOWER_MODE_GREYgrey; the targets flash black: Dark Breath
BURST_SHOWER_MODE_FACESdemon faces from 16 pixels in front: Evil
BURST_SHOWER_MODE_PETRABlessing
BURST_SHOWER_MODE_FUGUE
BURST_SHOWER_MODE_AGING_GAS
BURST_SHOWER_MODE_FIRE_DANCE
BURST_SHOWER_MODE_TOXIC_BREATH
BURST_SHOWER_MODE_SAND_BREATH
BURST_SHOWER_MODE_DESERT_GASP
BURST_SHOWER_MODE_BLACK_ICE
BURST_SHOWER_MODE_TYPHOON_BLOW
BURST_SHOWER_MODE_DJINNFEST
BURST_SHOWER_MODE_HEAT_KISS
BURST_SHOWER_MODE_FIRE_DANCE_PHOENIX
BURST_SHOWER_MODE_GRAVEL_BLOW
BURST_SHOWER_MODE_DARKSOL_GASP
BURST_SHOWER_MODE_FURY
BURST_SHOWER_MODE_STORM_BREATH_STRONG
BURST_SHOWER_MODE_CHAR

Definition at line 9 of file battle_effect_burst_shower.c.

BURST_SHOWER_SHEET

enum BURST_SHOWER_SHEET

Where the burst shower keeps its pictures in the effect's sprite sheet: the notes, hearts or smoke of the modes that load them first, at 0.

EnumeratorValueDescription
BURST_SHOWER_BUBBLE4096the bubble, each row written twice
BURST_SHOWER_PICTURE3158the mode's bursts, faces, bolts or rocks
BURST_SHOWER_ROCK_SHARDS5266Gravel Blow's rock shards, base of SpireShardPictures
BURST_SHOWER_DJINNI26048the prelude's small Djinni

Definition at line 44 of file battle_effect_burst_shower.c.

Functions in detail

btEffectArmBg2AffineHBlankDMA

void btEffectArmBg2AffineHBlankDMA(void)

Restarts DMA channel 0 as an H-blank transfer of the effect state's line table into BG2X, one word a line.

References syDMAXCopy().

Referenced by btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunFlurry(), btEffectRunGaspFamily(), btEffectRunHaunt(), btEffectRunTargetMotes(), btEffectRunTorch() and btEffectRunUnusedOrbitingSpirals().

Definition at line 87 of file battle_effect_burst_shower.c.

btEffectArmBg1HBlankDMA

void btEffectArmBg1HBlankDMA(void)

btEffectArmBg2AffineHBlankDMA for BG1HOFS and BG1VOFS: the line table moves layer 1.

References syDMAXCopy().

Referenced by btEffectRunGatheringLights().

Definition at line 104 of file battle_effect_burst_shower.c.

btEffectRunFireBreath

void btEffectRunFireBreath(BATTLE_EFFECT_PARM *args)

Abilities: Fire Breath, Salamander, Cerberus, Wyvern, Chimera, Macetail, Fire Dragon, Flame Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 121 of file battle_effect_burst_shower.c.

btEffectRunToxicBreath

void btEffectRunToxicBreath(BATTLE_EFFECT_PARM *args)

Abilities: Toxic Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 127 of file battle_effect_burst_shower.c.

btEffectRunWaterBreath

void btEffectRunWaterBreath(BATTLE_EFFECT_PARM *args)

Abilities: Water Breath, Aqua Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 133 of file battle_effect_burst_shower.c.

btEffectRunDarkBreath

void btEffectRunDarkBreath(BATTLE_EFFECT_PARM *args)

Abilities: Dark Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 139 of file battle_effect_burst_shower.c.

btEffectRunAcidBreath

void btEffectRunAcidBreath(BATTLE_EFFECT_PARM *args)

Abilities: Acid Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 145 of file battle_effect_burst_shower.c.

btEffectRunStormBreath

void btEffectRunStormBreath(BATTLE_EFFECT_PARM *args)

Abilities: Storm Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 151 of file battle_effect_burst_shower.c.

btEffectRunStormBreathStrong

void btEffectRunStormBreathStrong(BATTLE_EFFECT_PARM *args)

Storm Breath as its second, stronger row (power 220 against 190) casts it.

Abilities: Storm Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 159 of file battle_effect_burst_shower.c.

btEffectRunEvilBlessing

void btEffectRunEvilBlessing(BATTLE_EFFECT_PARM *args)

Abilities: Evil Blessing.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 165 of file battle_effect_burst_shower.c.

btEffectRunDarksolGasp

void btEffectRunDarksolGasp(BATTLE_EFFECT_PARM *args)

Abilities: Darksol Gasp.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 171 of file battle_effect_burst_shower.c.

btEffectRunDeadlyGas

void btEffectRunDeadlyGas(BATTLE_EFFECT_PARM *args)

Abilities: Deadly Gas.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 177 of file battle_effect_burst_shower.c.

btEffectRunPetra

void btEffectRunPetra(BATTLE_EFFECT_PARM *args)

Abilities: Petra.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 183 of file battle_effect_burst_shower.c.

btEffectRunChar

void btEffectRunChar(BATTLE_EFFECT_PARM *args)

Abilities: Char.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 189 of file battle_effect_burst_shower.c.

btEffectRunFury

void btEffectRunFury(BATTLE_EFFECT_PARM *args)

Abilities: Fury.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 195 of file battle_effect_burst_shower.c.

btEffectRunFugue

void btEffectRunFugue(BATTLE_EFFECT_PARM *args)

Abilities: Fugue.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 201 of file battle_effect_burst_shower.c.

btEffectRunSandBreath

void btEffectRunSandBreath(BATTLE_EFFECT_PARM *args)

Abilities: Sand Breath.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 207 of file battle_effect_burst_shower.c.

btEffectRunDesertGasp

void btEffectRunDesertGasp(BATTLE_EFFECT_PARM *args)

Abilities: Desert Gasp.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 213 of file battle_effect_burst_shower.c.

btEffectRunBlackIce

void btEffectRunBlackIce(BATTLE_EFFECT_PARM *args)

Abilities: Black Ice.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 219 of file battle_effect_burst_shower.c.

btEffectRunTyphoonBlow

void btEffectRunTyphoonBlow(BATTLE_EFFECT_PARM *args)

Abilities: Typhoon Blow.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 225 of file battle_effect_burst_shower.c.

btEffectRunDjinnfest

void btEffectRunDjinnfest(BATTLE_EFFECT_PARM *args)

Abilities: Djinnfest.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 231 of file battle_effect_burst_shower.c.

btEffectRunHeatKiss

void btEffectRunHeatKiss(BATTLE_EFFECT_PARM *args)

Abilities: Heat Kiss.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 237 of file battle_effect_burst_shower.c.

btEffectRunFireDancePhoenix

void btEffectRunFireDancePhoenix(BATTLE_EFFECT_PARM *args)

Fire Dance as the Phoenix, the Fire Bird and the Wonder Bird use it (ABILITY_FIRE_DANCE_PHOENIX).

Abilities: Fire Dance.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 246 of file battle_effect_burst_shower.c.

btEffectRunGravelBlow

void btEffectRunGravelBlow(BATTLE_EFFECT_PARM *args)

Abilities: Gravel Blow.

References btEffectRunBurstShower().

Referenced by BattleEffectHandlers.

Definition at line 252 of file battle_effect_burst_shower.c.

btEffectRunAgingGas

void btEffectRunAgingGas(BATTLE_EFFECT_PARM *args)

The user takes its leap pose and animates fast while the burst shower plays.

Abilities: Wheeze, Aging Gas.

References btEffectRunBurstShower(), btObjectGetStub(), fdActorSelectAnimationStub() and fdActorSetAnimationSpeedStub().

Referenced by BattleEffectHandlers.

Definition at line 260 of file battle_effect_burst_shower.c.

btEffectRunFireDance

void btEffectRunFireDance(BATTLE_EFFECT_PARM *args)

The user takes its leap pose and animates fast while the burst shower plays.

Abilities: Gel, Fire Dance (the Salamander Rod's unleash).

References btEffectRunBurstShower(), btObjectGetStub(), fdActorSelectAnimationStub() and fdActorSetAnimationSpeedStub().

Referenced by BattleEffectHandlers.

Definition at line 274 of file battle_effect_burst_shower.c.

btEffectRunBurstShower

void btEffectRunBurstShower(BATTLE_EFFECT_PARM *args, Uint32 mode)

The user fires one shot a tick at a point near one of the targets, taking them in turn, and each target is hit in turn; the blend fades over the last eight ticks. The mode picks the picture (flash bursts, music notes, hearts, smoke, bubbles, demon faces, rock shards) and how it is prepared, the colours, the blending and where the shots leave from. Storm Breath shows a violet lightning bolt at the user instead; Aging Gas also draws motes into the user; Char sparkles glints around the targets; and Fire Dance, Desert Gasp and Heat Kiss hand over to Dull or Impair at the end. A Djinni's prelude sets it swaying behind the user.

References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, BattleEffectMotePictures, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectCountDownBattlerTints(), btEffectDarkenBackgroundStep(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectPosProjectScaledBattler(), btEffectPosProjectSprite(), btEffectRunDjinniEntrance(), btEffectRunDull(), btEffectRunImpair(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectStepPaletteToResource(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), BurstShowerGlintFlips, Sint32, SpireShardHeights, SpireShardPictures, SpireShardWidths, syCloseEvent(), syCos(), syHeapSlotRelease(), syInitMatrix(), syLookAtLoad(), syRandom(), syResourceGetTableEntry(), sySetEvent(), sySin(), sySoundPlayStub(), syWordsClear() and syWordsCopy().

Referenced by btEffectRunAcidBreath(), btEffectRunAgingGas(), btEffectRunBlackIce(), btEffectRunChar(), btEffectRunDarkBreath(), btEffectRunDarksolGasp(), btEffectRunDeadlyGas(), btEffectRunDesertGasp(), btEffectRunDjinnfest(), btEffectRunEvilBlessing(), btEffectRunFireBreath(), btEffectRunFireDance(), btEffectRunFireDancePhoenix(), btEffectRunFugue(), btEffectRunFury(), btEffectRunGravelBlow(), btEffectRunHeatKiss(), btEffectRunPetra(), btEffectRunSandBreath(), btEffectRunStormBreath(), btEffectRunStormBreathStrong(), btEffectRunToxicBreath(), btEffectRunTyphoonBlow() and btEffectRunWaterBreath().

Definition at line 294 of file battle_effect_burst_shower.c.