Skip to Content
The Alchemy Project

include/battle/battle_effect_state.h

The Lost Age's copy of the battle effect state. More…

Included by battle_internal.h, battle_effect_internal.h, battle_effect_table.c and lucky_wheels.c.

Structures

NameDescription
structBATTLE_EFFECT_STATEThe running battle effect's state: its canvas image, 64 particles, the display registers it stages and its sprites.

Macros

NameDescription
#defineCANVAS_BYTES (128 * 128)The battle canvas the effects draw into: 128 by 128 pixels, a byte each.
#defineCANVAS_FILL_WORD (level) PIXELS_8BPP(level)A word of four canvas pixels at one level, for filling the canvas.

Enumerations

NameDescription
enumCANVAS_TRANSFER_MODE { CANVAS_COPY, CANVAS_COPY_AND_CLEAR, CANVAS_COPY_AND_FADE, CA … }How the canvas transfer treats the canvas after each copy (a battle effect's BATTLE_EFFECT_STATE.transferMode, Lucky Wheels' REEL_EFFECT_STATE's); transferValue is its argument.
enumCANVAS_FADE_SHARE { CANVAS_FADE_HALF, CANVAS_FADE_THREE_QUARTERS }CANVAS_COPY_AND_FADE's transferValue: the percentage of each pixel's level kept for the next tick.

Description

The Lost Age's copy of the battle effect state. The Broken Seal's block with the 64 particles in front of the sprite sheet, the two affine scales after the BG2 reference point, 64 object slots and one more word before the effect.

Macros in detail

CANVAS_BYTES

#define CANVAS_BYTES (128 * 128)

The battle canvas the effects draw into: 128 by 128 pixels, a byte each.

Referenced by btEffectEndCanvasLayer(), btEffectEndElementStreaks(), btEffectOpenCanvasLayer(), btEffectRunAnnihilation(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBolt(), btEffectRunBreaths(), btEffectRunByIdRange(), btEffectRunCanvasBurst(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCrescentSlash(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDiamondBerg(), btEffectRunDjinniEntrance(), btEffectRunEclipse(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFallingSword(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunFromTable(), btEffectRunFume(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHeartbreak(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMegaera(), btEffectRunMeteorBlow(), btEffectRunPlasma(), btEffectRunPlumeEdge(), btEffectRunRay(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunSerac() and 15 more.

Definition at line 155 of file battle_effect_state.h.

CANVAS_FILL_WORD

#define CANVAS_FILL_WORD(level) PIXELS_8BPP(level)

A word of four canvas pixels at one level, for filling the canvas.

Referenced by btEffectRunAnnihilation(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBallLightning(), btEffectRunBind(), btEffectRunBolt(), btEffectRunBreaths(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCrescentSlash(), btEffectRunCruelRuin(), btEffectRunDaedalusStrike(), btEffectRunDiamondBerg(), btEffectRunDragonFire(), btEffectRunDrainMotes(), btEffectRunEclipse(), btEffectRunFallingSword(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunFume(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHaunt(), btEffectRunHaures(), btEffectRunHeartbreak(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunLiquifier(), btEffectRunMegaera(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunMoloch(), btEffectRunOdyssey(), btEffectRunPlasma(), btEffectRunPlumeEdge(), btEffectRunPrism(), btEffectRunRadiantFire(), btEffectRunRay(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunSerac(), btEffectRunShatteringOpening() and 9 more.

Definition at line 157 of file battle_effect_state.h.

Enumerations in detail

CANVAS_TRANSFER_MODE

enum CANVAS_TRANSFER_MODE

How the canvas transfer treats the canvas after each copy (a battle effect's BATTLE_EFFECT_STATE.transferMode, Lucky Wheels' REEL_EFFECT_STATE's); transferValue is its argument.

EnumeratorValueDescription
CANVAS_COPYCopy as drawn.
CANVAS_COPY_AND_CLEARCopy, then fill the canvas with transferValue (0 clears it).
CANVAS_COPY_AND_FADECopy, keeping half of each pixel's level for the next tick when transferValue is CANVAS_FADE_HALF, and three quarters for any other value.
CANVAS_COPY_AND_DARKENCopy, then lower each level by a byte of transferValue, stopping at 0.
CANVAS_COPY_AND_BRIGHTENCopy, then raise each level by a byte of transferValue.

Definition at line 17 of file battle_effect_state.h.

CANVAS_FADE_SHARE

enum CANVAS_FADE_SHARE

CANVAS_COPY_AND_FADE's transferValue: the percentage of each pixel's level kept for the next tick.

EnumeratorValueDescription
CANVAS_FADE_HALF50
CANVAS_FADE_THREE_QUARTERS75

Definition at line 34 of file battle_effect_state.h.