Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_blitter.c

The blitter builder, btEffectBuildBlitter. More…

Included by battle_effect.c.

Macros

NameDescription
#defineBRANCH_FIELD (site, target)The displacement field of an ARM branch at site to target.
#defineBLITTER_PARTIAL_RUN (mode, flags)The words of a partial run, one pixel at a time, forwards or mirrored.
#defineBLITTER_WALK ()The template walk, written once and expanded twice: first to count the words, then to write them.

Functions

NameDescription
Sint32btEffectBuildBlitter (Sint32 slot, Sint32 widthShift, Sint32 heightShift, Sint32 flags, Uint32 mode)Writes a drawing function for the canvas into heap slot slot, built from the template BlitterTemplate for one clip, mirroring and blend mode.

Description

The blitter builder, btEffectBuildBlitter. The builder walks BlitterTemplate, a template of ARM words, and splices in the pixel fragments of the mode asked for, patching the widths and branches as it goes.

Macros in detail

BRANCH_FIELD

#define BRANCH_FIELD(site, target)

The displacement field of an ARM branch at site to target.

Definition at line 6 of file battle_effect_blitter.c.

BLITTER_PARTIAL_RUN

#define BLITTER_PARTIAL_RUN(mode, flags)

The words of a partial run, one pixel at a time, forwards or mirrored.

Definition at line 10 of file battle_effect_blitter.c.

BLITTER_WALK

#define BLITTER_WALK()

The template walk, written once and expanded twice: first to count the words, then to write them.

Block 1, the entry code (blitter_template.s describes the slots).

Block 2, the vertical clip: the height enters the last two words.

Referenced by btEffectBuildBlitter().

Definition at line 58 of file battle_effect_blitter.c.

Functions in detail

btEffectBuildBlitter

Sint32 btEffectBuildBlitter(Sint32 slot, Sint32 widthShift, Sint32 heightShift, Sint32 flags, Uint32 mode)

Writes a drawing function for the canvas into heap slot slot, built from the template BlitterTemplate for one clip, mirroring and blend mode.

References BattleEffectMotePictures, BlitterTemplate, Sint32 and syHeapSlotAllocate().

Referenced by btEffectRunStarfieldFall().

Definition at line 291 of file battle_effect_blitter.c.