Alchemy

mirrored_wall.c

The walls of Berserk, Spasm and Recovery.

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

The walls of Berserk, Spasm and Recovery. Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_FetchRectangleBlitters

void BattleFx_FetchRectangleBlitters(s32 flip, BlitterPair out)

Builds the two usual routines that draw onto the 128x128 canvas, both clipped on both axes.

Called during setup by about twenty effect parts, from the gathering lights and the Djinn beams to the casting impacts and Ragnarok, usually with effect->side as flip so pictures face the targets. Builds the blitters in heap slots HEAP_SLOT_BLITTER and HEAP_SLOT_BLITTER_ALTERNATE, which the caller frees (EFFECT_RELEASE_BLITTERS).

flip : nonzero draws mirrored. out : [0] keeps the higher colour index, [1] adds the colours (up to 63).

Used by BattleFx_RunAnnihilation, BattleFx_RunBind, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunDjinnBeams, BattleFx_RunDjinnHeal, BattleFx_RunDragonCloud, BattleFx_RunFrost, BattleFx_RunGatheringLights, BattleFx_RunHail, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunJupiter, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunNereid, BattleFx_RunPrism, BattleFx_RunRagnarok, BattleFx_RunStatReduction, BattleFx_RunSwirlingStars, BattleFx_RunTorch, BattleFx_RunUndeadSword.

Line 20

BattleFx_RunBerserk

void BattleFx_RunBerserk(struct BattleEffectArgument *effect)

The wall rises wide and shakes the screen hard.

Abilities: Berserk (kind 353).

Used by gBattleFx_EffectHandlers.

Line 41

BattleFx_RunSpasm

void BattleFx_RunSpasm(struct BattleEffectArgument *effect)

The wall rises with a long gentle shake and the recovery sound.

Abilities: Spasm (kind 348).

Used by gBattleFx_EffectHandlers.

Line 47

BattleFx_RunRecovery

void BattleFx_RunRecovery(struct BattleEffectArgument *effect)

A wide wall of fire, without a shake.

Abilities: Recovery (kind 389).

Used by gBattleFx_EffectHandlers.

Line 53

BattleFx_RunMirroredWall

void BattleFx_RunMirroredWall(struct BattleEffectArgument *effect, s32 mode)

Raises a symmetrical wall (the EarthWall images) at the first target's
feet for 48 frames; the target glows and the battle shows the result on
frame 24.
mode : 0 actual size, a gentle shake for 32 frames
       1 1.25 times as wide, a hard shake for 8 frames
       2 1.25 times as wide, no shake, in the Fireball colours

Called by BattleFx_RunBerserk, BattleFx_RunSpasm and BattleFx_RunRecovery. Loads its colours over the first 64 of the background palette, sets BG2PA and BG2X so the wall stands on the target, and sets work->shakeFrames.

Used by BattleFx_RunBerserk, BattleFx_RunRecovery, BattleFx_RunSpasm.

Line 67

On this page