Alchemy

tiamat.c

Dragon Driver and the Tiamat summon.

games/tbs/src/effect/parts/tiamat.c on GitHub

Dragon Driver and the Tiamat summon. Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_RunDragonDriver

void BattleFx_RunDragonDriver(struct BattleEffectArgument *effect)

The rising embers from the user's side, in the LightningBolt colours.

Abilities: Dragon Driver (kind 385).

Used by gBattleFx_EffectHandlers.

Line 10

BattleFx_RunTiamat

void BattleFx_RunTiamat(struct BattleEffectArgument *effect)

The rising embers with a formation of eight objects that sweeps in and explodes at the end.

Abilities: Tiamat (scene kind 7).

Used by BattleFx_RunSceneEffect.

Line 17

BattleFx_RunPaletteParticles

void BattleFx_RunPaletteParticles(struct BattleEffectArgument *effect, s32 mode)

A 208-frame effect of embers rising from the ground; pressing A or B
during frames 49 to 159 skips to frame 160. The targets reel on frame
138, the screen flares white over frames 160 to 175 and fades out after,
and the battle shows the damage on frame 178.
mode : 0 also brings in a formation of eight objects that sweeps in and,
         at the end, explodes with BattleFx_RunImpactBurst;
       1 throws the sparks and flashes from the user's side
         (effect->side), in the LightningBolt colours.
Four kinds of particle, in canvas coordinates with y growing downwards:
  PARTICLES[0..511]  embers: rise from y 112, speeding up; one a frame
                     over frames 33 to 103, eight a frame over 104 to 175
  particles[40..63]  sparks: one on each odd frame from 41 to 127,
                     thrown up at a slant
  particles[0..23]   flashes: one a frame over 129 to 175, thrown across
  particles[24..39]  streaks: fall at a slant from the top and, below
                     y 55, play their images over and over
An idle particle's variant is -1; a live one's counts its age up until it
goes out (a streak's counts down its wait first).

Called by BattleFx_RunTiamat (mode 0) and BattleFx_RunDragonDriver (mode 1). Sets REG_BLDALPHA and REG_BG2CNT (the canvas in front, priority 0), loads the flash and later the streak palette (or the lightning bolt's) into the first 64 background colours and brightens them over frames 160 to 175, sets work->shakeFrames, and tints and shakes the targets. Mode 0 spawns the eight formation objects and releases them after the impact burst.

Used by BattleFx_RunDragonDriver, BattleFx_RunTiamat.

Line 58

Macros

PALETTE_PARTICLES_STREAKS

#define PALETTE_PARTICLES_STREAKS 16

Falling streaks, work->particles 24 to 39.

Used by BattleFx_RunPaletteParticles.

Line 22

PALETTE_PARTICLES_FIRST_STREAK

#define PALETTE_PARTICLES_FIRST_STREAK 24

The first streak in work->particles.

Used by BattleFx_RunPaletteParticles.

Line 24

PALETTE_PARTICLES_STREAK_IMAGES

#define PALETTE_PARTICLES_STREAK_IMAGES 0x3000

The streak pictures in the sheet.

Used by BattleFx_RunPaletteParticles.

Line 30

Also, macros without a comment: PALETTE_PARTICLES_FRAMES, PALETTE_PARTICLES_FIRST_SPARK, PALETTE_PARTICLES_EMBERS, PALETTE_PARTICLES_FLASHES, PALETTE_PARTICLES_SPARKS.

On this page