Alchemy

boreas.c

The Boreas summon.

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

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

Functions

BattleFx_RunBoreas

void BattleFx_RunBoreas(struct BattleEffectArgument *effect)

Rocks and ice blocks: a window opens on rocks that crumble, a big ice block drops and throws up spray; then ice blocks rain down on the targets, and boulders crumble into bouncing chips.

Abilities: Boreas (scene kind 10).

The longest of the effects, in two halves. The first (288 frames, which A or B cuts short after frame 16) opens a window on a field of 16 rocks over the violet sky and nine animation objects; the rocks crumble in three waves (frames 32, 64 and 104), throwing up chips, a big ice block drops in on frames 160 to 175 and, from frame 224, bursts into spray trailed by smoke. The second (146 frames) gives the battle background back and rains ice blocks on the targets while boulders rise, crumble on frame 72 and bounce on the ground; the targets tint blue from frame 32 and the damage shows on frame 96.

Particles, by half: in the first, PARTICLES 0 to 63 are the chips (screen pixels in 16.16; a negative variant is one not yet thrown), then 0 to 127 the spray, with its smoke at BOREAS_ICE_BLOCK_TRAILS; in the second, work->particles 0 to 63 are the falling ice blocks and then the boulder chips, and PARTICLES 0 to 63 the smoke puffs, in whole pixels.

Also clears background colours 0 and 1 for the wipe and then loads the ice block palette over the first 64, writes the window registers and the window-edge table at Ram_MapCellBuffer (through BattleFx_BuildWindowEdgeTable), gBgScroll[1] for the shake, gProjection.centerY and work->shakeFrames; it releases the nine objects before the second half and its callbacks and blitters at the end.

Used by BattleFx_RunSceneEffect.

Line 45

Macros

BOREAS_POINT_X

#define BOREAS_POINT_X(rock) gBoreas_Points[rock][0]

gBoreas_Points has an x and a y for each rock.

Used by BattleFx_RunBoreas.

Line 14

Also, macros without a comment: BOREAS_ICE_BLOCK_TRAILS, BOREAS_BIG_BLOCK_CELLS, BOREAS_FALLING_BLOCK_CELLS, BOREAS_POINT_Y.

On this page