Alchemy

bind.c

Bind and Triangle Strike.

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

Bind and Triangle Strike. Part of effect.c, the battle effect object, compiled only through it.

Functions

Graphics_ConvertBackgroundToBlueRamp

UNUSED void Graphics_ConvertBackgroundToBlueRamp(void)

Turns the screen into shades of blue, top down, with a ragged edge. Works on a copy of the screen in Ram_MapCellBuffer. Each column starts up to 63 lines late, and the edge speeds up a little every frame; after at most 27 frames the picture moves onto a second blue ramp at colours 96 to 127. Takes 256 random numbers, one a column.

Nothing calls it or takes its address. Writes background colours 32 to 63 and then 96 to 127, the 0x7800 bytes of BG character block 2 (the backdrop's picture) and Ram_MapCellBuffer, keeps its delays in the sheet slot, and waits a frame for each step of the edge.

Line 27

BattleFx_RunBind

void BattleFx_RunBind(struct BattleEffectArgument *effect)

A triangle of light spins and shrinks onto the first target for 64 frames, then a rune stands on the target; the battle shows the result on frame 64.

Abilities: Bind (kind 38); Luff (kind 218).

When effect->prelude is 1 a Jupiter Djinni appears first, sways and rises away. The canvas darkens a little faster every 16 frames.

Runs BattleFx_RunDjinniEntrance first when effect->prelude is 1. Moves BG2X so the canvas's x 64 is on the first target, cycles the palette each frame through Graphics_UpdatePhasePalette, raises work->transferValue every 16 frames, keeps the triangle's corners in work->particles 0 to 2, and builds and frees its blitters every frame.

Used by gBattleFx_EffectHandlers.

Line 123

BattleFx_RunTriangleStrike

void BattleFx_RunTriangleStrike(struct BattleEffectArgument *effect)

The spinning triangle and rune of BattleFx_RunBind without the Djinni; on frame 46 the user steps up to the first target.

Abilities: none (kind 67).

Its own vertex, gBind_TriangleStrikeVertex, sets the triangle's size. Changes the same state as BattleFx_RunBind, on the narrow canvas, and starts the user's approach through BattleMotion_ApproachTargetFar.

Used by gBattleFx_EffectHandlers.

Line 297

On this page