lobbed_shells.c
Lobbed shells (Mad Spatter, Decompose, Bone Chiller ...).
games/tbs/src/effect/parts/lobbed_shells.c on GitHub
Lobbed shells (Mad Spatter, Decompose, Bone Chiller ...). Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunMadSpatter
void BattleFx_RunMadSpatter(struct BattleEffectArgument *effect)
Gold shells that burst into shards.
Abilities: Mad Spatter (kind 347).
Used by gBattleFx_EffectHandlers.
BattleFx_RunDecompose
void BattleFx_RunDecompose(struct BattleEffectArgument *effect)
Green shells that burst into smoke.
Abilities: Decompose (kind 350).
Used by gBattleFx_EffectHandlers.
BattleFx_RunBoneChiller
void BattleFx_RunBoneChiller(struct BattleEffectArgument *effect)
Blue shells that burst into smoke.
Abilities: Bone Chiller (kind 309).
Used by gBattleFx_EffectHandlers.
BattleFx_RunStickyGoo
void BattleFx_RunStickyGoo(struct BattleEffectArgument *effect)
Shells in the spider web's colours that burst into smoke.
Abilities: Sticky Goo (kind 315).
Used by gBattleFx_EffectHandlers.
BattleFx_RunPoisonInk
void BattleFx_RunPoisonInk(struct BattleEffectArgument *effect)
Shells in Mars Djinn colours that burst into smoke.
Abilities: Poison Ink (kind 340).
Used by gBattleFx_EffectHandlers.
BattleFx_RunStickyPoison
void BattleFx_RunStickyPoison(struct BattleEffectArgument *effect)
Lime shells that burst into smoke.
Abilities: Sticky Poison (kind 322).
Used by gBattleFx_EffectHandlers.
BattleFx_RunRottenBlood
void BattleFx_RunRottenBlood(struct BattleEffectArgument *effect)
Green shells that burst into shards.
Abilities: Rotten Blood (kind 330).
Used by gBattleFx_EffectHandlers.
BattleFx_RunLobbedShells
void BattleFx_RunLobbedShells(struct BattleEffectArgument *effect, s32 mode)
Lobs a shell from the user at each target in turn, 8 frames apart. Each tumbles through ten images as it flies and, when it lands, the target flashes and the battle shows the damage; the shell bursts into 4 smoke puffs that drift up or 16 shards that fly up and fall.
Called by the seven handlers above, from BattleFx_RunMadSpatter to BattleFx_RunRottenBlood. Loads three palettes over the first 64 background colours in turn, the style's last; uses PARTICLES 0 to 1023 for the shells and LOBBED_SHELLS_BURSTS for the bursts.
mode : the style, 0 to 6: the colours and the row of gLobbedShells_Records.
Used by BattleFx_RunBoneChiller, BattleFx_RunDecompose, BattleFx_RunMadSpatter, BattleFx_RunPoisonInk, BattleFx_RunRottenBlood, BattleFx_RunStickyGoo, BattleFx_RunStickyPoison.
Macros
LOBBED_SHELLS_BURSTS
#define LOBBED_SHELLS_BURSTS ((struct EffectStep *)(Ram_MapCellBuffer + 0x1c00))
The bursts live after the shells in PARTICLES: 32 slots a target, of which 4 smoke puffs or 16 shards are used.
Used by BattleFx_RunLobbedShells.
LOBBED_SHELLS_SHATTER
#define LOBBED_SHELLS_SHATTER(mode) gLobbedShells_Records[(mode) * 2]
Nonzero when the style's shells burst into shards instead of smoke: the first of the style's two entries in gLobbedShells_Records; the second is never read.
Used by BattleFx_RunLobbedShells.
Also, macros without a comment: LOBBED_SHELLS_SLOTS, LOBBED_SHELLS_BURST_SLOTS, LOBBED_SHELLS_SMOKE_CELLS.