cybele.c
The Cybele summon.
games/tbs/src/effect/parts/cybele.c on GitHub
The Cybele summon. Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunCybele
void BattleFx_RunCybele(struct BattleEffectArgument *effect)
Thorn vines: thorns fly in from the right, vines grow out of the ground and lift the targets while sparks flash around them, the picture dissolves pixel by pixel, and the targets drop and explode.
Abilities: Cybele (scene kind 5).
366 frames:
- 0 to 127: the formation objects drop in, landing on frame 31; from 72 a thorn flies in from the right each frame.
- 128 to 224: vines grow out of the ground, shaking the screen, while chips fly; sparks flash around the targets, which rise from 161.
- 224 to 247: the first 64 background colours fade to grey.
- 233 on: the canvas dissolves from the top, two rows a frame.
- 286 on: the targets drop, 5 frames apart.
- 302 on: each target is hit 16 frames after it drops and bursts into a blast and embers.
Pressing A or B between frames 191 and 285 skips to the drop. At the end the battle shows the damage and an impact burst (BattleFx_RunImpactBurst) explodes at the formation.
Besides the canvas and work->particles (above), it writes the dissolve order into the first 1024 bytes of Ram_MapCellBuffer, greys the first 64 background colours, lifts and drops the targets' objects (their y and gravity), and sets REG_BG2X, REG_BG2PA, REG_BLDCNT and work->shakeFrames. It spawns eight formation objects and releases them, the transfer callback and the blitters before it closes the canvas layer.
Used by BattleFx_RunSceneEffect.
Macros, without a comment: CYBELE_FRAMES, CYBELE_CHIP_COUNT, CYBELE_VINES, CYBELE_BLAST_CELLS, CYBELE_FIRST_SPARK, CYBELE_FIRST_THORN, CYBELE_FIRST_CHIP, CYBELE_EMBER_CELL.