Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_bind.c

Bind and Triangle Strike. More…

Included by battle_effect.c.

Macros

NameDescription
#defineBIND_FLARE_PICTURES 4096Bind's sprite sheet: the rune, the flare pictures, then the Djinni.
#defineBIND_DJINNI_PICTURE 8192
#defineBIND_SLOTS_PER_TARGET 32The particles each target's triangle keeps, and the flares along each edge.
#defineBIND_EDGE_FLARES 24
#defineBIND_RUNE_TICK 64The ticks the triangle of flares shrinks and turns before the rune shows, with the damage.
#defineBIND_DJINNI_SWAY 20The Djinni of Bind's prelude sways this far either way, a sway every 32 ticks.
#defineTRIANGLE_STRIKE_LEAP_TICKS 16The ticks Triangle Strike's user takes to leap at the target.
#defineBLUE_RAMP_PALETTE 2The blue ramp: one colour for each blue level from BG palette BLUE_RAMP_PALETTE (later from BLUE_RAMP_SECOND_PALETTE), each colour's red and green half its blue.
#defineBLUE_RAMP_SECOND_PALETTE 6
#defineBLUE_RAMP_COLORS (RGB_LEVEL_MAX + 1)
#defineBLUE_RAMP_START_SPEED 16The ramp's edge moves down a quarter of its speed in rows a tick, from this speed and a row faster every four ticks, for at most BLUE_RAMP_TICKS or until it is past BLUE_RAMP_LAST_ROW.
#defineBLUE_RAMP_TICKS 27
#defineBLUE_RAMP_LAST_ROW 248

Functions

NameDescription
voidbtEffectConvertBackgroundToBlueRamp (void)Turns the screen into shades of blue, top down, with a ragged edge; nothing calls it.
voidbtEffectRunBind (BATTLE_EFFECT_PARM *args)A triangle of light spins and shrinks onto the first target, changing colour and leaving a fading trail, then a rune stands on the target.
voidbtEffectRunUnusedTriangleStrike (BATTLE_EFFECT_PARM *args)Unused: no row of AbilityBattleEffects in either game names its kind, and the handler table is reached with no other kind (btEffectRunFromTable), so the player never sees it.

Description

Bind and Triangle Strike. Part of battle_effect.c.

Macros in detail

BIND_FLARE_PICTURES

#define BIND_FLARE_PICTURES 4096

Bind's sprite sheet: the rune, the flare pictures, then the Djinni.

Referenced by btEffectRunBind() and btEffectRunUnusedTriangleStrike().

Definition at line 4 of file battle_effect_bind.c.

BIND_DJINNI_PICTURE

#define BIND_DJINNI_PICTURE 8192

Referenced by btEffectRunBind().

Definition at line 5 of file battle_effect_bind.c.

BIND_SLOTS_PER_TARGET

#define BIND_SLOTS_PER_TARGET 32

The particles each target's triangle keeps, and the flares along each edge.

Referenced by btEffectRunBind() and btEffectRunUnusedTriangleStrike().

Definition at line 7 of file battle_effect_bind.c.

BIND_EDGE_FLARES

#define BIND_EDGE_FLARES 24

Referenced by btEffectRunBind() and btEffectRunUnusedTriangleStrike().

Definition at line 8 of file battle_effect_bind.c.

BIND_RUNE_TICK

#define BIND_RUNE_TICK 64

The ticks the triangle of flares shrinks and turns before the rune shows, with the damage.

Referenced by btEffectRunBind() and btEffectRunUnusedTriangleStrike().

Definition at line 11 of file battle_effect_bind.c.

BIND_DJINNI_SWAY

#define BIND_DJINNI_SWAY 20

The Djinni of Bind's prelude sways this far either way, a sway every 32 ticks.

Referenced by btEffectRunBind().

Definition at line 14 of file battle_effect_bind.c.

TRIANGLE_STRIKE_LEAP_TICKS

#define TRIANGLE_STRIKE_LEAP_TICKS 16

The ticks Triangle Strike's user takes to leap at the target.

Referenced by btEffectRunUnusedTriangleStrike().

Definition at line 16 of file battle_effect_bind.c.

BLUE_RAMP_PALETTE

#define BLUE_RAMP_PALETTE 2

The blue ramp: one colour for each blue level from BG palette BLUE_RAMP_PALETTE (later from BLUE_RAMP_SECOND_PALETTE), each colour's red and green half its blue. A pixel takes the colour for RGB_LEVEL_MAX less its brightest channel, so the background turns blue with its light and dark swapped.

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 23 of file battle_effect_bind.c.

BLUE_RAMP_SECOND_PALETTE

#define BLUE_RAMP_SECOND_PALETTE 6

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 24 of file battle_effect_bind.c.

BLUE_RAMP_COLORS

#define BLUE_RAMP_COLORS (RGB_LEVEL_MAX + 1)

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 25 of file battle_effect_bind.c.

BLUE_RAMP_START_SPEED

#define BLUE_RAMP_START_SPEED 16

The ramp's edge moves down a quarter of its speed in rows a tick, from this speed and a row faster every four ticks, for at most BLUE_RAMP_TICKS or until it is past BLUE_RAMP_LAST_ROW.

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 29 of file battle_effect_bind.c.

BLUE_RAMP_TICKS

#define BLUE_RAMP_TICKS 27

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 30 of file battle_effect_bind.c.

BLUE_RAMP_LAST_ROW

#define BLUE_RAMP_LAST_ROW 248

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 31 of file battle_effect_bind.c.

Functions in detail

btEffectConvertBackgroundToBlueRamp

void btEffectConvertBackgroundToBlueRamp(void)

Turns the screen into shades of blue, top down, with a ragged edge; nothing calls it.

References pixel, Sint32, syRandom(), sySynch() and syWordsCopy().

Definition at line 35 of file battle_effect_bind.c.

btEffectRunBind

void btEffectRunBind(BATTLE_EFFECT_PARM *args)

A triangle of light spins and shrinks onto the first target, changing colour and leaving a fading trail, then a rune stands on the target. The triangle's corners are projected onto the canvas and each edge is stamped with flares.

Abilities: Bind; Luff.

Bind
Bind

References BindVertex, btEffectBuildCanvasBlitters(), btEffectEndCanvasLayer(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btEffectTransferCanvas(), btEffectUpdatePhasePalette(), btObjectGetStub(), btProjectionPoint(), btProjectionScaledUnit(), fdScreenPointCoordinates(), Sint32, state, syCloseEvent(), syCos(), syDecompressTaggedLZ(), syInitMatrix(), syMatrixScaleVector(), syResourceGetTableEntry(), syRotY(), syRotZ(), sySin(), sySoundPlayStub(), syVector3Coordinates() and syWordsCopy().

Referenced by BattleEffectHandlers.

Definition at line 115 of file battle_effect_bind.c.

btEffectRunUnusedTriangleStrike

void btEffectRunUnusedTriangleStrike(BATTLE_EFFECT_PARM *args)

Unused: no row of AbilityBattleEffects in either game names its kind, and the handler table is reached with no other kind (btEffectRunFromTable), so the player never sees it. Its tick loop is btEffectRunBind's, without the Djinni prelude, and on tick 46 it starts the user's approach to the first target.

References BindTriangleStrikeVertex, btEffectEndCanvasLayer(), btEffectTransferCanvas(), btEffectUpdatePhasePalette(), btMotionApproachTargetStub(), btObjectGetStub(), btProjectionPoint(), btProjectionScaledUnit(), fdScreenPointCoordinates(), Sint32, state, syCloseEvent(), syDecompressTaggedLZ(), syInitMatrix(), syMatrixScaleVector(), syResourceGetTableEntry(), syRotY(), syRotZ(), sySoundPlayStub(), syVector3Coordinates() and syWordsCopy().

Referenced by BattleEffectHandlers.

Definition at line 314 of file battle_effect_bind.c.