Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_canvas_wipe.c

The canvas wipe: the ragged sweep that blacks out or clears the canvas as the summons and the larger effects open and close. More…

Included by battle_effect.c.

Macros

NameDescription
#defineWIPE_LAG_MAX 63How far a row of btEffectWipeCanvas's wipe lags behind its front, at most: each row lags a random 0 to WIPE_LAG_MAX pixels.
#defineWIPE_ACROSS_END 256CANVAS_SIZE + WIPE_LAG_MAX, where the wipe is finished.
#defineCANVAS_WIPE_NONE 3A direction btEffectWipeCanvas leaves the canvas alone for; no caller passes it.

Functions

NameDescription
voidbtEffectWipeCanvas (Sint32 direction, Sint32 fill)Wipes the whole canvas to one colour with a ragged edge, a tick at a time: 23 ticks across, 15 down.

Description

The canvas wipe: the ragged sweep that blacks out or clears the canvas as the summons and the larger effects open and close. Part of battle_effect.c.

Macros in detail

WIPE_LAG_MAX

#define WIPE_LAG_MAX 63

How far a row of btEffectWipeCanvas's wipe lags behind its front, at most: each row lags a random 0 to WIPE_LAG_MAX pixels.

Referenced by btEffectWipeCanvas().

Definition at line 6 of file battle_effect_canvas_wipe.c.

WIPE_ACROSS_END

#define WIPE_ACROSS_END 256

CANVAS_SIZE + WIPE_LAG_MAX, where the wipe is finished.

Referenced by btEffectWipeCanvas().

Definition at line 10 of file battle_effect_canvas_wipe.c.

CANVAS_WIPE_NONE

#define CANVAS_WIPE_NONE 3

A direction btEffectWipeCanvas leaves the canvas alone for; no caller passes it.

Referenced by btEffectWipeCanvas().

Definition at line 14 of file battle_effect_canvas_wipe.c.

Functions in detail

btEffectWipeCanvas

void btEffectWipeCanvas(Sint32 direction, Sint32 fill)

Wipes the whole canvas to one colour with a ragged edge, a tick at a time: 23 ticks across, 15 down. Each tick sets state->transferPending, so the caller's transfer event must already be running.

direction: CANVAS_WIPE_ACROSS sweeps left to right, CANVAS_WIPE_NONE does
                       nothing, anything else sweeps top to bottom.
fill: what the wipe leaves (CANVAS_FILL).

References Sint32 and syRandom().

Referenced by btEffectRunAtalanta(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunHaures(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunStarfieldFall() and btEffectRunThor().

Definition at line 23 of file battle_effect_canvas_wipe.c.