include/battle/blitter.h
How battle effects draw a picture onto their canvas: the blitter btEffectBuildBlitter builds, the edges it clips at, how it mirrors and how its pixels combine with the canvas's.
Included by battle_internal.h, battle_effect_internal.h, lucky_wheels.c and battle_effect.h.
Typedefs
| Name | Description | |
|---|---|---|
typedef Sint32 (* | DRAW_RECTANGLE )(void *destination, const void *source, Sint32 x, Sint32 y, Sint32 width, Sint32 height); | A blitter btEffectBuildBlitter writes into a heap slot: it draws a width by height picture from source onto the destination canvas with its top left at (x, y), in pixels. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { BLITTER_CLIP_X, BLITTER_CLIP_Y, COMPOSITE_FLIP_X, COMPOSITE_ … } | btEffectBuildBlitter's flags: which edges the built blitter clips at and how it mirrors the picture. |
enum | anonymous enum { COMPOSITE_COPY, COMPOSITE_TRANSPARENT, COMPOSITE_LIGHTEN, CO … } | btEffectBuildBlitter's modes: how a picture's pixels combine with the canvas's (the fragments in blitter_fragments.c). |
Description
How battle effects draw a picture onto their canvas: the blitter
btEffectBuildBlitter builds, the edges it clips at, how it mirrors and how
its pixels combine with the canvas's.
Typedefs in detail
DRAW_RECTANGLE
typedef Sint32 (*DRAW_RECTANGLE)(void *destination, const void *source, Sint32 x, Sint32 y, Sint32 width, Sint32 height);
A blitter btEffectBuildBlitter writes into a heap slot: it draws a width by
height picture from source onto the destination canvas with its top left at
(x, y), in pixels.
Referenced by btEffectRunAnnihilation(), btEffectRunAttackSlash(), btEffectRunBladeRain(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunDouse(), btEffectRunDragonCloud(), btEffectRunDrain(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunGrowingColumns(), btEffectRunHelmSplitter(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunProcne(), btEffectRunQuake(), btEffectRunRagnarok(), btEffectRunRamses(), btEffectRunSleep(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStreakVolley(), btEffectRunTargetBursts(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunThorn(), btEffectRunTitanBlade(), btEffectRunTorch(), btEffectRunUndeadSword(), btElementGlowUpdateStarField() and fdLuckyWheelsRun().
Definition at line 38 of file blitter.h.
Enumerations in detail
anonymous enum
enum { BLITTER_CLIP_X, BLITTER_CLIP_Y, COMPOSITE_FLIP_X, COMPOSITE_FLIP_Y, … }
btEffectBuildBlitter's flags: which edges the built blitter clips at and how
it mirrors the picture.
| Enumerator | Value | Description |
|---|---|---|
BLITTER_CLIP_X | 1 | skips columns outside the canvas; without it a width mask wraps x |
BLITTER_CLIP_Y | 2 | skips rows outside the canvas's height |
COMPOSITE_FLIP_X | 4 | mirrors the picture left to right |
COMPOSITE_FLIP_Y | 8 | mirrors the picture top to bottom |
COMPOSITE_FLIP | COMPOSITE_FLIP_X | COMPOSITE_FLIP_Y |
Definition at line 15 of file blitter.h.
anonymous enum
enum { COMPOSITE_COPY, COMPOSITE_TRANSPARENT, COMPOSITE_LIGHTEN, COMPOSITE_ADDITIVE }
btEffectBuildBlitter's modes: how a picture's pixels combine with the
canvas's (the fragments in blitter_fragments.c).
| Enumerator | Value | Description |
|---|---|---|
COMPOSITE_COPY | writes every pixel | |
COMPOSITE_TRANSPARENT | writes every nonzero pixel | |
COMPOSITE_LIGHTEN | keeps the brighter of the two | |
COMPOSITE_ADDITIVE | adds the two, capped at 63 |
Definition at line 27 of file blitter.h.