Alchemy

src/effect

games/tbs/src/effect on GitHub

The Battle effects guide explains this folder.

Folders

effect.c

games/tbs/src/effect/effect.c

The battle effect object: everything drawn over the battle while an ability plays. effect_internal.h holds what every effect shares (includes, macros and the frame-loop helpers); the effects are in the files under parts/, included here in the order their code has in the ROM. That order mixes families, Djinn, summons and shared machinery, and each part is one run of it, named for what it holds. Camelot's own files are not recoverable: the ROM shows one object, and these parts are ours, cut where one family ends and the next begins.

To find the effect a move plays, search for the move's English name: each handler's "Abilities:" comment lists the abilities that reach it, and each row of gBattleFx_EffectHandlers (effect_table.c) gives its kind, its part and its first ability. README.md gives the words and prefixes the parts use, and ../MATCHING.md the spellings some sites keep to match. The shared machinery:

  Entry points    dispatch.c: BattleFx_RunTableEffect,
                  BattleFx_RunSceneEffect; positions.c:
                  BattleFx_DispatchByIdRange
  Canvas          canvas.c: BattleFx_BeginCanvasLayer,
                  BattleFx_EndCanvasLayer, BattleFx_WipeCanvas,
                  BattleFx_ProcessPendingGraphicsTransfer
  Blitters        blitter.c: BattleFx_BuildBlitter; mirrored_wall.c:
                  BattleFx_FetchRectangleBlitters
  Motion          positions.c: EffectStep_AdvanceWithGravity2D and 3D,
                  BattleUnit_ProjectToScreen; hail.c: Camera_ApplyShake
  Targets         dispatch.c: BattleFx_SelectLivingTargets;
                  helm_splitter.c: BattleFx_PlaceFormationObjects

README.md in this folder explains the ideas: the canvas, blitters, the frame loop, particles, pictures and how to change an effect.

effect_bits.c

games/tbs/src/effect/effect_bits.c

Macros, without a comment: ARM_IMMEDIATE_BIT, ARM_IMMEDIATE_POWERS.

Globals

gUnused_BitOperands

u16 gUnused_BitOperands[]

Two identical tables; the first has no references.

Line 20

Also, globals without a comment: gBattleFx_BitOperands.

effect_internal.h

games/tbs/src/effect/effect_internal.h

Functions

Dma_Stop

static inline void Dma_Stop(volatile u16 *channel)

Stops a DMA channel: clears its repeat and start timing bits, then its enable bit, and reads the control register back so the stop takes effect before the channel is set up again. The HBlank DMA arms in display.c, dispatch.c, burst_shower.c and particle_streams.c call it first.

Used by BattleFx_ArmBg2AffineHBlankDma, BattleFx_ArmPaletteHBlankDma, BattleFx_ArmWin0HBlankDma, BattleFx_BuildWindowEdgeTable.

Line 113

Enumerations

CanvasTransferMode

enum CanvasTransferMode

How BattleFx_ProcessPendingGraphicsTransfer moves the effect's 128x128 canvas into VRAM once a frame (work->transferMode); the canvas pixels are indices into a palette ramp, so scaling them fades a trail.

Value=
CANVAS_COPYcopy as drawn
CANVAS_COPY_AND_CLEARcopy, then fill the canvas with transferValue
CANVAS_COPY_AND_FADEcopy, keeping 50% or 75% (transferValue) of each pixel in the canvas for the next frame
CANVAS_COPY_AND_DARKENcopy, then darken the canvas by transferValue
CANVAS_COPY_AND_BRIGHTENcopy, then brighten the canvas by transferValue

Line 122

Macros

EFFECT_DISPCNT

#define EFFECT_DISPCNT

The battle screen's display mode while an effect plays: background mode 1 with BG0 to BG2, sprites and both windows on.

Used by BattleFx_BeginCanvasLayer, BattleFx_ConfigureEffectDisplay, BattleFx_OpenCanvasLayer, BattleFx_RunAtalanta, BattleFx_RunShatteringOpening, BattleFx_SetupBlendedDisplay, BattleFx_SetupCanvasTileMap.

Line 83

EFFECT_WIN0_LAYERS

#define EFFECT_WIN0_LAYERS

Window 0, the battle view, shows BG0 to BG2, sprites and blending. Effects pick window 1's layers themselves.

Used by BattleFx_BeginCanvasLayer, BattleFx_ConfigureEffectDisplay, BattleFx_OpenCanvasLayer, BattleFx_RunBoreas, BattleFx_RunDouse, BattleFx_RunIce, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunRamses, BattleFx_RunShatteringOpening, BattleFx_SetupCanvasTileMap.

Line 89

EFFECT_WINOUT

#define EFFECT_WINOUT (WINOUT_WIN01_BG0 | WINOUT_WIN01_CLR | WINOUT_WINOBJ_ALL)

Outside the battle view: BG0 and blending only.

Used by BattleFx_BeginCanvasLayer, BattleFx_ConfigureEffectDisplay, BattleFx_OpenCanvasLayer, BattleFx_RunShatteringOpening, BattleFx_SetupCanvasTileMap.

Line 94

EFFECT_SLOT

#define EFFECT_SLOT(slots, slot) ((slots)[(slot) - HEAP_SLOT_BATTLE_EFFECT])

A work slot read through a pointer to the effect's own slot, gWorkSlot[HEAP_SLOT_BATTLE_EFFECT].

Used by BattleFx_ProcessPendingGraphicsTransfer, BattleFx_RunAnnihilation, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBladeRain, BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunDeathPlunge, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunDouse, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunFire, BattleFx_RunFlare, BattleFx_RunFrost, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunIce, BattleFx_RunJupiter, BattleFx_RunLobbedShells, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunOrbitingSpirals, BattleFx_RunPlanetDiver, BattleFx_RunPlasma, BattleFx_RunProjectileVolley, BattleFx_RunRagnarok, BattleFx_RunRay, BattleFx_RunRingAndSparkScene, BattleFx_RunRushingStrike, BattleFx_RunSleep, BattleFx_RunSparkGroups, BattleFx_RunSpire, BattleFx_RunStreakVolley and 9 more.

Line 98

CANVAS_SLOT

#define CANVAS_SLOT(slots, slot) ((slots)[(slot) - HEAP_SLOT_BATTLE_CANVAS])

A work slot read through a pointer to the canvas slot, gWorkSlot[HEAP_SLOT_BATTLE_CANVAS], just after the effect's own.

Used by BattleFx_RunBoreas, BattleFx_RunBurstShower, BattleFx_RunJudgment, BattleFx_RunNeptune, BattleFx_RunPaletteParticles, BattleFx_RunProcne, BattleFx_RunSleep.

Line 101

DMA_CONTROL_HALF

#define DMA_CONTROL_HALF 5

Index of DMAxCNT_H, the control half, in a channel's 16-bit registers.

Used by Dma_Stop.

Line 104

DMA_FILL_WORDS

#define DMA_FILL_WORDS(n) ((DMA_ENABLE | DMA_32BIT | DMA_SRC_FIXED) << 16 | (n))

DMA control word that fills n words from one fixed source word.

Used by BattleFx_RunParticleStreams.

Line 107

EFFECT_GET_WORK_AND_CANVAS

#define EFFECT_GET_WORK_AND_CANVAS(cursor, work, canvas)

The work block and canvas occupy adjacent slots, starting at HEAP_SLOT_BATTLE_EFFECT. A cursor reads them in that order.

Used by BattleFx_RunAnnihilation, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBreak, BattleFx_RunCybele, BattleFx_RunDjinnBeams, BattleFx_RunDrain, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFlashingStrike, BattleFx_RunFrost, BattleFx_RunLobbedShells, BattleFx_RunMirroredWall, BattleFx_RunPlasma, BattleFx_RunQuake, BattleFx_RunRay, BattleFx_RunRingAndSparkScene, BattleFx_RunSparkGroups, BattleFx_RunStatBoost, BattleFx_RunStatReduction, BattleFx_RunTargetMotes, BattleFx_RunTorch, BattleFx_RunTriangleStrike, BattleFx_RunVolcano, BattleFx_RunWhirlwind.

Line 133

EFFECT_GET_SLOTS

#define EFFECT_GET_SLOTS(slots, cursor, work, canvas)

Starts at the effect's entry in the whole work-slot array. Earlier slots, such as the camera, then stay within that array while cursor walks ahead.

Used by BattleFx_RunBladeRain, BattleFx_RunBolt, BattleFx_RunCondemn, BattleFx_RunDeathPlunge, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunDouse, BattleFx_RunDragonCloud, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunGrowingColumns, BattleFx_RunHail, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunIce, BattleFx_RunImpactBurst, BattleFx_RunJupiter, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunOrbitingSpirals, BattleFx_RunPlanetDiver, BattleFx_RunProjectileVolley, BattleFx_RunRagnarok, BattleFx_RunRushingStrike, BattleFx_RunSleep, BattleFx_RunSpire, BattleFx_RunStreakVolley, BattleFx_RunSwirlSwipe, BattleFx_RunSwirlingStars, BattleFx_RunTargetBursts, BattleFx_RunTargetStrike, BattleFx_RunTitanBlade, BattleFx_RunUndeadSword, BattleFx_RunVenus.

Line 138

EFFECT_FREE_PARTICLES

#define EFFECT_FREE_PARTICLES(i, particles, count)

Marks particles[0] to particles[count - 1] free: a particle whose variant is -1 is not drawn or moved until an effect gives it a life.

Used by BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunDouse, BattleFx_RunDrain, BattleFx_RunGatheringLights, BattleFx_RunJupiter, BattleFx_RunLobbedShells, BattleFx_RunMercury, BattleFx_RunNereid, BattleFx_RunPaletteParticles, BattleFx_RunParticleStreams, BattleFx_RunRamses, BattleFx_RunVenus.

Line 144

EFFECT_VIEW_FROM_CAMERA

#define EFFECT_VIEW_FROM_CAMERA(camera)

Starts a frame's 3D projection from the battle camera: resets the transform, then looks from camera->eye towards camera->pos. Effects that place pictures at battle positions do this before projecting them.

Used by BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunCastingImpact, BattleFx_RunCybele, BattleFx_RunDeathPlunge, BattleFx_RunDjinnBeams, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunElementPillar, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFroth, BattleFx_RunGatheringLights, BattleFx_RunGround, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunJudgment, BattleFx_RunLobbedShells, BattleFx_RunMoteFountain, BattleFx_RunOrbitingSkulls, BattleFx_RunOrbitingSpirals, BattleFx_RunPaletteParticles, BattleFx_RunParticleStreams, BattleFx_RunPlanetDiver, BattleFx_RunProcne, BattleFx_RunProjectileVolley, BattleFx_RunQuake, BattleFx_RunRingAndSparkScene, BattleFx_RunRushingStrike, BattleFx_RunShiningStar, BattleFx_RunSleep, BattleFx_RunStatBoost, BattleFx_RunStatReduction, BattleFx_RunStreakVolley and 7 more.

Line 151

EFFECT_STRIKE_TARGET

#define EFFECT_STRIKE_TARGET(effect, i, frames, motion)

Strikes target i: it flashes white in its damage pose for frames frames and plays battle motion motion (BattleMotion_ApplyVariantMotionFar).

Used by BattleFx_RunGround, BattleFx_RunJupiter, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunTargetStrike, BattleFx_RunVenus.

Line 158

EFFECT_SHOW_DAMAGE

#define EFFECT_SHOW_DAMAGE(hitSound) BattleEventRuntime_BeginPhaseFar(hitSound)

Lets the battle show the damage: resumes its paused playback, which plays hitSound (an SE_ id; 0 keeps the one already queued) as the targets react.

Used by BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBolt, BattleFx_RunBoreas, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunCybele, BattleFx_RunDeathPlunge, BattleFx_RunDjinnBeams, BattleFx_RunDouse, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFlare, BattleFx_RunFlashingStrike, BattleFx_RunFrost, BattleFx_RunFroth, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunGrowingColumns, BattleFx_RunHail, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunIce, BattleFx_RunJudgment, BattleFx_RunJupiter, BattleFx_RunKirin, BattleFx_RunLobbedShells, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunMirroredWall, BattleFx_RunMoteFountain, BattleFx_RunNeptune, BattleFx_RunNereid and 32 more.

Line 170

CANVAS_BYTES

#define CANVAS_BYTES (128 * 128)

The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1).

Used by BattleFx_BeginCanvasLayer, BattleFx_DispatchByIdRange, BattleFx_EndCanvasLayer, BattleFx_EndElementStreaks, BattleFx_OpenCanvasLayer, BattleFx_ProcessPendingGraphicsTransfer, BattleFx_RunAnnihilation, BattleFx_RunBolt, BattleFx_RunBurstScene, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunCybele, BattleFx_RunDjinniEntrance, BattleFx_RunElementBurst, BattleFx_RunElementPillar, BattleFx_RunFlashingStrike, BattleFx_RunImpactBurst, BattleFx_RunJudgment, BattleFx_RunParticleStreams, BattleFx_RunPlasma, BattleFx_RunRay, BattleFx_RunRingAndSparkScene, BattleFx_RunSceneEffect, BattleFx_RunShatteringOpening, BattleFx_RunSparkGroups, BattleFx_RunTableEffect, BattleFx_RunThor, BattleFx_RunTitanBlade, BattleFx_RunWhirlwind, BattleFx_SetupBlendedDisplay, BattleFx_SetupCanvasTileMap, BattleFx_StartElementStreaks, CastingImpact_EndPrelude.

Line 174

EFFECT_BEGIN_NARROW_CANVAS

#define EFFECT_BEGIN_NARROW_CANVAS(bgControl)

Opens the canvas layer at the canvas's own width, one texel per pixel, where BattleFx_BeginCanvasLayer stretches it to twice the width.

Used by BattleFx_RunAtalanta, BattleFx_RunBladeRain, BattleFx_RunCybele, BattleFx_RunDouse, BattleFx_RunFrost, BattleFx_RunHelmSplitter, BattleFx_RunIce, BattleFx_RunJudgment, BattleFx_RunOrbitingSkulls, BattleFx_RunOrbitingSpirals, BattleFx_RunParticleStreams, BattleFx_RunSleep, BattleFx_RunSpire, BattleFx_RunStatReduction, BattleFx_RunSwirlSwipe, BattleFx_RunThor, BattleFx_RunTriangleStrike, BattleFx_RunUndeadSword.

Line 178

EFFECT_LOAD_BLITTER

#define EFFECT_LOAD_BLITTER(slot, flags, mode)

Builds a blitter for the 128x128 canvas (1 << 7 pixels each way) in work slot slot: BattleFx_BuildBlitter's drawing routine for one clip, mirror and blend mode. Every canvas effect draws through one or two of these.

Used by BattleFx_FetchRectangleBlitters, BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunAtalanta, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBladeRain, BattleFx_RunBolt, BattleFx_RunBoreas, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunCybele, BattleFx_RunDeathPlunge, BattleFx_RunDjinnBeams, BattleFx_RunDjinniEntrance, BattleFx_RunDouse, BattleFx_RunDrain, BattleFx_RunElementBurst, BattleFx_RunElementPillar, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFlare, BattleFx_RunFlashingStrike, BattleFx_RunFroth, BattleFx_RunGaia, BattleFx_RunGround, BattleFx_RunGrowingColumns, BattleFx_RunHaunt, BattleFx_RunIce, BattleFx_RunImpactBurst, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunLobbedShells, BattleFx_RunMirroredWall, BattleFx_RunMoteFountain, BattleFx_RunNeptune, BattleFx_RunOrbitingSkulls and 33 more.

Line 184

EFFECT_SET_TRANSFER

#define EFFECT_SET_TRANSFER(work, mode, value)

Sets how the canvas transfer treats what is left in the canvas after each copy: mode with value (see enum CanvasTransferMode).

Used by BattleFx_RunAnnihilation, BattleFx_RunAtalanta, BattleFx_RunBoreas, BattleFx_RunBurstShower, BattleFx_RunDouse, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunOrbitingSkulls, BattleFx_RunPaletteParticles, BattleFx_RunParticleStreams, BattleFx_RunPrism, BattleFx_RunProjectileVolley, BattleFx_RunRamses, BattleFx_RunRingAndSparkScene, BattleFx_RunThor.

Line 189

EFFECT_START_TRANSFER

#define EFFECT_START_TRANSFER(work, mode, value)

Sets the transfer, then starts copying the canvas to VRAM once a frame.

Used by BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBladeRain, BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunCondemn, BattleFx_RunCybele, BattleFx_RunDjinnBeams, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunElementBurst, BattleFx_RunElementPillar, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFlashingStrike, BattleFx_RunFrost, BattleFx_RunFroth, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunGround, BattleFx_RunGrowingColumns, BattleFx_RunHail, BattleFx_RunHaunt, BattleFx_RunHelmSplitter, BattleFx_RunImpactBurst, BattleFx_RunJupiter, BattleFx_RunLobbedShells, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunMirroredWall, BattleFx_RunMoteFountain, BattleFx_RunNereid, BattleFx_RunOrbitingSpirals, BattleFx_RunPaletteParticles, BattleFx_RunParticleStreams, BattleFx_RunPlanetDiver, BattleFx_RunPlasma and 27 more.

Line 193

EFFECT_PRESENT_FRAME

#define EFFECT_PRESENT_FRAME(work) ((work)->transferPending = 1, WaitFrames(1))

Ends a frame of a canvas effect: marks the canvas ready for the transfer callback, then waits for the next frame. Nearly every effect loop ends so.

Used by BattleFx_RunAtalanta, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBoreas, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunDeathPlunge, BattleFx_RunDjinnBeams, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunFrost, BattleFx_RunIce, BattleFx_RunImpactBurst, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunNereid, BattleFx_RunOrbitingSkulls, BattleFx_RunOrbitingSpirals, BattleFx_RunParticleStreams, BattleFx_RunRingAndSparkScene, BattleFx_RunSleep, BattleFx_RunStatReduction, BattleFx_RunSwirlingStars, BattleFx_RunTargetBursts, BattleFx_RunThor, BattleFx_RunTriangleStrike, BattleFx_WipeCanvas.

Line 200

EFFECT_END_FRAME

#define EFFECT_END_FRAME(work)

The usual end of an effect frame: counts down the targets' flash timers (ObjectGroup_TickMemberTimers), then presents the canvas.

Used by BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunAtalanta, BattleFx_RunBladeRain, BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunCastingImpact, BattleFx_RunCybele, BattleFx_RunDouse, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunElementBurst, BattleFx_RunElementPillar, BattleFx_RunEruption, BattleFx_RunFire, BattleFx_RunFlare, BattleFx_RunFlashingStrike, BattleFx_RunFroth, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunGround, BattleFx_RunGrowingColumns, BattleFx_RunHail, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunJupiter, BattleFx_RunKirin, BattleFx_RunLobbedShells, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunMirroredWall, BattleFx_RunMoteFountain, BattleFx_RunNeptune, BattleFx_RunPaletteParticles, BattleFx_RunPlanetDiver, BattleFx_RunPlasma, BattleFx_RunPrism, BattleFx_RunProcne and 23 more.

Line 204

EFFECT_RELEASE_BLITTERS

#define EFFECT_RELEASE_BLITTERS()

Frees the two blitters, the alternate first.

Used by BattleFx_RunAnnihilation, BattleFx_RunBeamSequence, BattleFx_RunBind, BattleFx_RunBoreas, BattleFx_RunBurstScene, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunCybele, BattleFx_RunDjinnBeams, BattleFx_RunDjinniEntrance, BattleFx_RunFire, BattleFx_RunFrost, BattleFx_RunGaia, BattleFx_RunGatheringLights, BattleFx_RunHaunt, BattleFx_RunIce, BattleFx_RunImpactBurst, BattleFx_RunNereid, BattleFx_RunOrbitingSpirals, BattleFx_RunPaletteParticles, BattleFx_RunRingAndSparkScene, BattleFx_RunShatteringOpening, BattleFx_RunStatBoost, BattleFx_RunTargetMotes, BattleFx_RunTargetStrike, BattleFx_RunTriangleStrike, BattleFx_RunUndeadSword, BattleFx_RunVolcano, BattleFx_RunWhirlwind, CastingImpact_EndPrelude.

Line 208

EFFECT_FINISH_CANVAS

#define EFFECT_FINISH_CANVAS()

The usual end of a canvas effect: stops the transfer callback before freeing what it reads, then the blitters, then the canvas layer.

Used by BattleFx_RunAstralBlast, BattleFx_RunAtalanta, BattleFx_RunBladeRain, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunDjinnHeal, BattleFx_RunDouse, BattleFx_RunDragonCloud, BattleFx_RunFroth, BattleFx_RunGrowingColumns, BattleFx_RunHail, BattleFx_RunHealingMotes, BattleFx_RunHelmSplitter, BattleFx_RunJupiter, BattleFx_RunLobbedShells, BattleFx_RunMars, BattleFx_RunMercury, BattleFx_RunMirroredWall, BattleFx_RunMoteFountain, BattleFx_RunNeptune, BattleFx_RunPlanetDiver, BattleFx_RunPlasma, BattleFx_RunPrism, BattleFx_RunProcne, BattleFx_RunRagnarok, BattleFx_RunRamses, BattleFx_RunRay, BattleFx_RunRushingStrike, BattleFx_RunShiningStar, BattleFx_RunSleep, BattleFx_RunSparkGroups, BattleFx_RunStatReduction, BattleFx_RunStreakVolley, BattleFx_RunSwirlingStars, BattleFx_RunTargetBursts, BattleFx_RunThorn, BattleFx_RunTitanBlade, BattleFx_RunTorch, BattleFx_RunVenus, BattleFx_RunVine.

Line 214

EFFECT_FINISH_CANVAS_ONE_BLITTER

#define EFFECT_FINISH_CANVAS_ONE_BLITTER()

The same for an effect that drew through one blitter.

Used by BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunDeathPlunge, BattleFx_RunDrain, BattleFx_RunEruption, BattleFx_RunGround, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunOrbitingSkulls, BattleFx_RunProjectileVolley, BattleFx_RunQuake, BattleFx_RunSleep, BattleFx_RunSpire, BattleFx_RunSwirlSwipe.

Line 219

MOTE_SET_BYTES

#define MOTE_SET_BYTES 770

The bytes of one set of the ten mote cells: 2 * (1 + 4 + ... + 100).

Used by BattleFx_RunEruption, BattleFx_RunJudgment, BattleFx_RunParticleStreams, BattleFx_RunSceneEffect, BattleFx_RunShatteringOpening, BattleFx_RunSwirlingStars, BattleFx_RunTableEffect.

Line 224

EFFECT_DRAW_MOTE

#define EFFECT_DRAW_MOTE(draw, canvas, sheet, x, y, size)

Particle sheets hold ten mote cells, 1x2 to 10x20 pixels. Draws mote cell size (size pixels wide, twice that tall) of sheet through blitter draw, centred across x and standing on y: the motes, sparks and dust of 32 effects, from the mote fountain to the summons.

Used by BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunBolt, BattleFx_RunBreak, BattleFx_RunBurstScene, BattleFx_RunCastingImpact, BattleFx_RunDjinnHeal, BattleFx_RunDjinniEntrance, BattleFx_RunDragonCloud, BattleFx_RunDrain, BattleFx_RunFire, BattleFx_RunGaia, BattleFx_RunHealingMotes, BattleFx_RunImpactBurst, BattleFx_RunJudgment, BattleFx_RunJupiter, BattleFx_RunKirin, BattleFx_RunMercury, BattleFx_RunMoteFountain, BattleFx_RunNeptune, BattleFx_RunNereid, BattleFx_RunPlanetDiver, BattleFx_RunPlasma, BattleFx_RunProcne, BattleFx_RunProjectileVolley, BattleFx_RunRamses, BattleFx_RunRay, BattleFx_RunRushingStrike, BattleFx_RunShiningStar, BattleFx_RunSparkGroups, BattleFx_RunTargetStrike, BattleFx_RunThor, BattleFx_RunTitanBlade, BattleFx_RunVenus, BattleFx_RunVolcano.

Line 230

EFFECT_DRAW_FLARE

#define EFFECT_DRAW_FLARE(draw, canvas, sheet, x, y, size)

Draws flare cell size of sheet, a square size pixels from its centre to each edge, centred on (x, y): Douse's sparks and the glowing points of the element pillar and burst, stat boosts, beams and rings.

Used by BattleFx_RunBeamSequence, BattleFx_RunDouse, BattleFx_RunElementBurst, BattleFx_RunElementPillar, BattleFx_RunRingAndSparkScene, BattleFx_RunStatBoost.

Line 237

EFFECT_SHOW_WIDE_CANVAS

#define EFFECT_SHOW_WIDE_CANVAS(top)

Shows the canvas: the effect display mode, BG2 stretched to twice its width (the 128-pixel canvas shown 256 pixels wide) and blended over everything below: top sixteenths of the canvas's colour are added to all of what lies under it, so the canvas brightens what it covers.

Used by BattleFx_RunAtalanta, BattleFx_RunBoreas, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunRamses, BattleFx_RunThor.

Line 245

WINDOW_SPAN_INVERTED

#define WINDOW_SPAN_INVERTED WIN_RANGE(1, 0)

A WIN0H value whose left edge is past its right edge. The hardware then takes the right edge as 240, so the span is not empty in itself; the effects write it only on lines outside window 0's vertical range.

Line 253

EFFECT_CALLBACK_ORDER

#define EFFECT_CALLBACK_ORDER 0x480

The scheduler order of every per-frame effect callback (Scheduler_AddOrUpdateCallback sorts the frame's callbacks by order).

Used by BattleFx_RunAnnihilation, BattleFx_RunAstralBlast, BattleFx_RunAtalanta, BattleFx_RunBoreas, BattleFx_RunBurstShower, BattleFx_RunCastingImpact, BattleFx_RunCondemn, BattleFx_RunDeathPlunge, BattleFx_RunDouse, BattleFx_RunFire, BattleFx_RunFlare, BattleFx_RunFroth, BattleFx_RunGatheringLights, BattleFx_RunHaunt, BattleFx_RunHealingMotes, BattleFx_RunIce, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunNeptune, BattleFx_RunOrbitingSkulls, BattleFx_RunOrbitingSpirals, BattleFx_RunParticleStreams, BattleFx_RunProjectileVolley, BattleFx_RunRamses, BattleFx_RunShiningStar, BattleFx_RunSleep, BattleFx_RunStatBoost, BattleFx_RunTargetMotes, BattleFx_RunThor, BattleFx_RunThorn, BattleFx_RunTorch, BattleFx_StartElementStreaks.

Line 257

EFFECT_PLAYBACK_ORDER

#define EFFECT_PLAYBACK_ORDER 0xc80

The order where the battle's own playback runs, which the palette fade and the element streaks take.

Used by BattleFx_BeginCanvasLayer, BattleFx_OpenCanvasLayer, BattleFx_RunRingAndSparkScene, BattleFx_StartElementStreaks.

Line 260

BLUE_RAMP_PIXELS

#define BLUE_RAMP_PIXELS Ram_MapCellBuffer

The full-screen picture Graphics_ConvertBackgroundToBlueRamp (bind.c) works on, which Condemn draws too.

Used by Graphics_ConvertBackgroundToBlueRamp.

Line 264

EFFECT_CAP_LEVEL

#define EFFECT_CAP_LEVEL(level, cap)

Caps a colour level at cap, and at 0 from below. Fades draw from darker copies of a picture built before the first frame, copy i capped at 64 - 7i.

Used by BattleFx_RunJudgment, BattleFx_RunStatReduction, BattleFx_RunThor.

Line 269

LIGHTNING_BOLT_CELL_BYTES

#define LIGHTNING_BOLT_CELL_BYTES 2880

Closing bolts and lightning columns use the same 24x120 picture cells.

Used by BattleFx_RunBolt, BattleFx_RunCastingImpact, BattleFx_RunRay.

Line 278

EFFECT_SET_BATTLE_WINDOWS

#define EFFECT_SET_BATTLE_WINDOWS()

Windows 0 and 1 both cover the battle view: the full width, lines 16 to 135.

Used by BattleFx_BeginCanvasLayer, BattleFx_ConfigureEffectDisplay, BattleFx_OpenCanvasLayer, BattleFx_RunShatteringOpening, BattleFx_SetupCanvasTileMap.

Line 282

EFFECT_SET_CANVAS_AFFINE

#define EFFECT_SET_CANVAS_AFFINE()

BG2 shows the canvas from screen line 16 down (BG2Y is -16.0), stretched to twice its width: the 128x128 canvas across the battle view.

Used by BattleFx_BeginCanvasLayer, BattleFx_OpenCanvasLayer, BattleFx_RunShatteringOpening.

Line 288

EFFECT_WRITE_CANVAS_MAP_ROW

#define EFFECT_WRITE_CANVAS_MAP_ROW(row, column, offset)

Writes one row of BG2's map for the canvas: its 16 tiles of row row in order. An affine map has one byte per tile, so they are written two at a time, eight halfwords from offset on.

Used by BattleFx_BeginCanvasLayer, BattleFx_BeginTiledCanvas, BattleFx_OpenCanvasLayer.

Line 295

effect_table.c

games/tbs/src/effect/effect_table.c

Macros

FLAME_PUFF_CELLS

#define FLAME_PUFF_CELLS {0, 552, 1480, 2590, 3913, 5185}

The six cells of an erupting flame puff: where each begins in the sheet.

Used by gBattleFx_PuffArcCells, gFire_FlareCells, gTiamat_StreakOffsets.

Line 24

FLAME_PUFF_CELL_BIAS_Y

#define FLAME_PUFF_CELL_BIAS_Y {41, 32, 26, 11, 4, 2}

How far below its anchor each cell's top goes.

Used by gBattleFx_PuffArcCellBiasY, gFire_FlareBiasY, gTiamat_StreakDrops.

Line 28

BLAST_CELL_SIZES

#define BLAST_CELL_SIZES {16, 32, 48, 48, 48, 48, 48}

The sides of the seven square pictures of a blast, a puff or a flash.

Used by gEruption_PuffSizes, gParticleStreams_FlashSizes, gRamses_PuffSizes, gUndeadSword_SparkSizes.

Line 30

BLAST_CELLS

#define BLAST_CELLS {0, 256, 1280, 3584, 5888, 8192, 10496}

Where each blast picture begins.

Used by gEruption_PuffCells, gParticleStreams_FlashCells, gRamses_PuffCells, gUndeadSword_SparkCells.

Line 32

EARTH_WALL_CELLS

#define EARTH_WALL_CELLS {2702, 3535, 4580}

Where each earth wall picture begins.

Used by gDjinnBeams_HeadOffsets, gMirroredWall_Cells.

Line 36

SLASH_CELL_REACH

#define SLASH_CELL_REACH {58, 42, 25, 13, 5, 0}

Each slash picture's reach from the target.

Used by gBeams_CellReaches, gTargetStrike_Reach.

Line 40

FLASH_FADE_CELLS

#define FLASH_FADE_CELLS {5, 5, 4, 3, 2, 1}

The flash picture for each three frames at the end of a flash's life.

Used by gPlasma_FlashCells, gRagnarok_FlashCells, gTitanBlade_FlashCells.

Line 42

GLINT_FLIPS

#define GLINT_FLIPS {0, COMPOSITE_FLIP_X, COMPOSITE_FLIP_Y, COMPOSITE_FLIP}

The flips a glint may be drawn in: none, and mirrored each way and both.

Used by gBolt_GlintFlips, gCastingImpact_GlintDrawFlags, gDeathPlunge_DrawFlags, gTargetMotes_GlintFlips, gTargetStrike_GlintDrawFlags, gThor_SmokeFlips.

Line 44

Also, macros without a comment: FLAME_PUFF_CELL_WIDTHS, FLAME_PUFF_CELL_HEIGHTS, EARTH_WALL_CELL_WIDTHS, EARTH_WALL_CELL_HEIGHTS, SLASH_CELL_WIDTHS, SLASH_CELL_HEIGHTS.

Globals

gBattleFx_MoteCells

u16 gBattleFx_MoteCells[]

Mote cells: particle sheets hold ten, cell n (from 0) n + 1 pixels wide and twice that tall. EFFECT_DRAW_MOTE and many parts read it. It stays the first table: BattleFx_BuildBlitter (parts/blitter.c) checks that a walk of the blitter template ended at its address.

Used by BattleFx_BuildBlitter, BattleFx_RunAtalanta, BattleFx_RunCastingImpact, BattleFx_RunEruption, BattleFx_RunJudgment, BattleFx_RunKirin, BattleFx_RunMars, BattleFx_RunPaletteParticles, BattleFx_RunParticleStreams, BattleFx_RunProcne, BattleFx_RunRagnarok, BattleFx_RunSwirlingStars, BattleFx_RunTargetStrike, BattleFx_RunThor, BattleFx_RunTitanBlade.

Line 52

gBattleFx_FlareCells

u16 gBattleFx_FlareCells[]

Flare cells: the first ten are squares 2x2 to 20x20, cell n (from 0) n + 1 pixels from its centre to each edge (EFFECT_DRAW_FLARE, and Neptune and Bind directly). The second ten begin at twice those offsets.

Used by BattleFx_RunBind, BattleFx_RunNeptune, BattleFx_RunTriangleStrike.

Line 56

gBattleFx_PuffCells

u16 gBattleFx_PuffCells[]

Nine square puff cells, read by the falling, frost, healing, Djinni heal and Boreas parts.

Used by BattleFx_RunBoreas, BattleFx_RunDjinnHeal, BattleFx_RunFrost, BattleFx_RunHealingMotes, BattleFx_RunIce.

Line 60

gBattleFx_PuffSizes

u8 gBattleFx_PuffSizes[]

Each puff cell's side.

Used by BattleFx_RunBoreas, BattleFx_RunDjinnHeal, BattleFx_RunFrost, BattleFx_RunHealingMotes, BattleFx_RunIce.

Line 62

gFalling_IceCounts

u8 gFalling_IceCounts[][2]

Ice, by variant: shards and frames (ICE_SHARD_COUNT, ICE_FRAMES).

Used by BattleFx_RunIce.

Line 82

gFalling_Counts

u8 gFalling_Counts[][4]

Douse, by variant: the FALLING_BOLT_ columns.

Used by BattleFx_RunDouse.

Line 89

gStreaks_Records

s8 gStreaks_Records[][4]

Each streak style's animation, hit, motion and shake, by the STREAKS_ columns (streaks.c).

Line 100

gStreaks_Tremble

s8 gStreaks_Tremble[]

Pixels the target trembles by, frame by frame.

Used by BattleFx_RunStreakVolley.

Line 109

gTargetStrike_ColumnStages

u8 gTargetStrike_ColumnStages[]

The column stage shown by each picture of a rise.

Used by BattleFx_RunTargetStrike.

Line 138

gTargetStrike_GlintDrawFlags

u8 gTargetStrike_GlintDrawFlags[]

The flips a glint may be drawn in.

Used by BattleFx_RunTargetStrike.

Line 140

gDeathPlunge_PieceWidths

u8 gDeathPlunge_PieceWidths[]

The 33 pieces of the TileAnimationMask picture: where each starts on the canvas, its size, and where its pixels begin in the decoded picture. The offsets carry one more entry, where the last piece ends.

Used by BattleFx_RunShatteringOpening.

Line 151

gGatheringLights_Counts

u8 gGatheringLights_Counts[][2]

Gathering lights (Demon Night, Rumble, Haunting), by mode: the lights per target and the frames before the targets' turns.

Used by BattleFx_RunGatheringLights.

Line 188

gDjinnBeams_MotePictures

u8 gDjinnBeams_MotePictures[]

The picture of each step of a mote's eight-step cycle.

Used by BattleFx_RunDjinnBeams.

Line 206

gLobbedShells_Records

s8 gLobbedShells_Records[]

Two bytes for each lobbed shell mode.

Used by BattleFx_RunLobbedShells.

Line 215

gLobbedShells_ShardWidths

u8 gLobbedShells_ShardWidths[]

Lobbed shells: nine tumbling images in two sets, the second (cells 9 to 17) smaller.

Used by BattleFx_RunLobbedShells.

Line 227

gCondemn_PanelX

u8 gCondemn_PanelX[][7]

Where each stage of the panel is drawn: seven x positions for each side of the field, and seven y positions (above the swing) for both sides.

Line 239

gBind_Vertex

struct Vector3 gBind_Vertex[]

The spinning triangle's first vertex, 24 up from its centre.

Used by BattleFx_RunBind.

Line 251

gBind_TriangleStrikeVertex

struct Vector3 gBind_TriangleStrikeVertex[]

The striking triangle's first vertex, the same.

Used by BattleFx_RunTriangleStrike.

Line 253

gStars_Points

struct Vector3 gStars_Points[]

The two star points, 48 and 28 pixels up (16.16).

Used by BattleFx_RunAstralBlast.

Line 258

gTiamat_DropSpeeds

u8 gTiamat_DropSpeeds[]

Ember speeds, by ember index & 3.

Used by BattleFx_RunPaletteParticles.

Line 272

gTiamat_SparkPixels

u8 gTiamat_SparkPixels[]

A spark's 1x2 picture.

Used by BattleFx_RunPaletteParticles.

Line 274

gTiamat_DropSizes

u8 gTiamat_DropSizes[]

Ember sizes, by ember index & 3.

Used by BattleFx_RunPaletteParticles.

Line 276

gNereid_Columns

u8 gNereid_Columns[][2]

Nereid's four columns of fire (NEREID_COLUMN_X, NEREID_COLUMN_Y).

Used by BattleFx_RunNereid.

Line 283

gNereid_Gravity

s32 gNereid_Gravity[]

Ember gravity while falling, by ember index & 3.

Used by BattleFx_RunNereid.

Line 291

gVortices_Counts

u8 gVortices_Counts[][2]

Froth, by variant: motes and frames.

Used by BattleFx_RunFroth.

Line 296

gVortices_Shapes

u8 gVortices_Shapes[][3]

Whirlwind, by variant: the WHIRLWIND_ columns.

Used by BattleFx_RunWhirlwind.

Line 303

gPrism_ShardStarts

u8 gPrism_ShardStarts[][2]

Where each of the 16 shards starts in the crystal: x, then y.

Used by BattleFx_RunPrism.

Line 313

gPrism_Counts

u8 gPrism_Counts[][2]

Prism, by variant: crystals and frames.

Used by BattleFx_RunPrism.

Line 319

gPlasma_Sparks

u16 gPlasma_Sparks[][2]

Plasma, by variant: sparks per pillar and shake frames.

Used by BattleFx_RunPlasma.

Line 334

gPlasma_Columns

u8 gPlasma_Columns[][7]

Each pillar's canvas x, seven for each side.

Line 341

gPlasma_Counts

u8 gPlasma_Counts[]

How many pillars strike, by variant.

Used by BattleFx_RunPlasma.

Line 346

gPlasma_Shapes

u16 gPlasma_Shapes[][5]

The spark groups, by variant: the SPARK_GROUPS_ columns.

Used by BattleFx_RunSparkGroups.

Line 351

gPlasma_FlashCells

u8 gPlasma_FlashCells[]

The flash picture for each three frames at the end of a flash's life.

Used by BattleFx_RunSparkGroups.

Line 360

gVolcano_Counts

u8 gVolcano_Counts[]

How many pillars stand, by variant.

Used by BattleFx_RunVolcano.

Line 365

gVolcano_Depths

s8 gVolcano_Depths[][4]

Each pillar's depth, by variant.

Used by BattleFx_RunVolcano.

Line 367

gVolcano_StartFrames

u8 gVolcano_StartFrames[]

The frame each pillar starts.

Used by BattleFx_RunVolcano.

Line 369

gTargetMotes_GlintFlips

u8 gTargetMotes_GlintFlips[]

Glint orientations: none, and mirrored each way and both.

Used by BattleFx_RunTargetMotes.

Line 374

gBattleFx_EffectHandlers

BattleFxHandler gBattleFx_EffectHandlers[BATTLE_FX_KIND_COUNT - 1]

The effect handlers, indexed by effect kind minus one, which BattleFx_RunTableEffect calls; kind zero is handled by the dispatcher.

Each handler is named for the first ability, by ability id, whose entry in gBattle_ActionFlags (battle/actflags.tsv) selects its kind, with that ability's English name (MsgAbilityName + id): kind 1 is Quake, Earthquake and Quake Sphere, so BattleFx_RunQuake. A handler several kinds share takes the name of its lowest kind's first ability, and a name another handler has already taken passes to the next ability (kind 15 is BattleFx_RunNova, as its first ability is a second Blast). Kinds that no ability uses keep descriptive names. Each row gives the kind's name, the part of effect.c that defines its handler and its first ability; the handler's own comment there lists every ability that reaches it.

Used by BattleFx_RunTableEffect.

Line 389

gCybele_ObjectPoses

u8 gCybele_ObjectPoses[][2]

Poses of objects 3 and 4 while they wave, three pairs.

Used by BattleFx_RunCybele.

Line 632

gBoreas_Points

u8 gBoreas_Points[][2]

Rock and ice scene: where the rocks stand (and later the boulders, 56 pixels further left), by the bottom-left corner.

Line 657

gBoreas_ShakeOffsets

s8 gBoreas_ShakeOffsets[]

The backdrop's jolt on frames 176 to 179.

Used by BattleFx_RunBoreas.

Line 662

gBoreas_Animations

u8 gBoreas_Animations[]

The third object's animations from frame 209, one every 4 frames.

Used by BattleFx_RunBoreas.

Line 668

gDrain_Gravities

s32 gDrain_Gravities[]

Ice shards: shard i falls with gravity i & 3.

Used by BattleFx_RunBreak.

Line 688

gQuake_Timings

u8 gQuake_Timings[][3]

Rock wall timing, by variant: frames in the effect, frames each pillar stands, and how far the screen shakes.

Used by BattleFx_RunQuake.

Line 702

gFire_Counts

u8 gFire_Counts[]

Embers by variant, at most FIRE_EMBERS (fire.c).

Used by BattleFx_RunFire.

Line 707

gFrost_ColumnSpots

u8 gFrost_ColumnSpots[][2]

Where each ice column stands: x, then the y of its foot.

Used by BattleFx_RunFrost.

Line 717

gFrost_Timings

u8 gFrost_Timings[][3]

Motes, ice columns and the burst frame, for each variant.

Used by BattleFx_RunFrost.

Line 723

gRay_Sparks

u8 gRay_Sparks[][2]

Sparks by variant; [1] is how many each bolt throws a frame.

Used by BattleFx_RunRay.

Line 743

gEruption_Counts

u8 gEruption_Counts[][3]

Motes, puffs of smoke and frames, for each variant.

Used by BattleFx_RunEruption.

Line 748

gAtalanta_UnitScale

struct SpriteScale gAtalanta_UnitScale

Staged particle scale: Atalanta's formation objects keep this scale, one to one, throughout.

Used by BattleFx_RunAtalanta.

Line 764

gGrowth_ColumnOffsets

s8 gGrowth_ColumnOffsets[]

Each vine's root, across from the middle of the targets.

Used by BattleFx_RunVine.

Line 784

gGrowth_Counts

u8 gGrowth_Counts[]

Thorns by variant.

Used by BattleFx_RunThorn.

Line 790

gBolt_Counts

u8 gBolt_Counts[][4]

Bolt, by variant: sparks each bolt throws, glints a frame around each target, how far the glints spread, and bolts drawn over each other.

Used by BattleFx_RunBolt.

Line 800

gProjectiles_CometHeights

u8 gProjectiles_CometHeights[]

Comet picture heights, by comet kind.

Used by BattleFx_RunProjectileVolley.

Line 812

gProjectiles_Modes

u8 gProjectiles_Modes[][5]

Each projectile volley mode, by the PROJECTILE_VOLLEY_ columns (projectiles.c).

Used by BattleFx_RunProjectileVolley.

Line 815

gProjectiles_PelletOffsets

u16 gProjectiles_PelletOffsets[]

Ice chip pictures, by shot index & 3.

Used by BattleFx_RunProjectileVolley.

Line 837

gDjinnAttacks_LaunchFrames

u8 gDjinnAttacks_LaunchFrames[]

The frames on which the Djinni fires each of its five flames.

Used by BattleFx_RunMercury.

Line 842

gHail_ChipFlips

u8 gHail_ChipFlips[]

The composite flips a chip may take.

Used by BattleFx_RunGround.

Line 851

gThor_TargetPalettes

u8 gThor_TargetPalettes[]

The colours a target flashes when a bolt strikes it, chosen at random: white, black, red, or with its colour channels rotated.

Used by BattleFx_RunThor.

Line 864

gThor_SmokeFlips

u8 gThor_SmokeFlips[]

Flip flags for the smoke puffs, chosen at random.

Used by BattleFx_RunThor.

Line 866

gSpire_ShardOffsets

u8 gSpire_ShardOffsets[32][2]

Where each of a rock's 21 shards starts, x then y, before the rock's offset across.

Used by BattleFx_RunSpire.

Line 869

gBurstScene_Records

u8 gBurstScene_Records[][7]

Each burst scene mode, by the BURST_SCENE_ columns (burst_scene.c).

Used by BattleFx_RunBurstScene.

Line 891

gGaia_Bg2Shifts

s8 gGaia_Bg2Shifts[][3]

BG2's x shift, by side and variant.

Used by BattleFx_RunGaia.

Line 912

gGaia_LateRockColumns

u8 gGaia_LateRockColumns[]

The columns rock particles[16] to particles[21] take.

Used by BattleFx_RunGaia.

Line 914

gCastingImpact_GlintDrawFlags

u8 gCastingImpact_GlintDrawFlags[]

The flips a glint may take, picked at random.

Used by BattleFx_RunCastingImpact.

Line 928

gCastingImpact_IceChipCells

u16 gCastingImpact_IceChipCells[]

The four ice chip cells, 8x8.

Used by BattleFx_RunCastingImpact.

Line 938

gParticleStreams_OrbitPoints

s16 gParticleStreams_OrbitPoints[][3]

The seven sparks that orbit the rising formation.

Used by BattleFx_RunParticleStreams.

Line 971

gParticleStreams_DropPoints

s16 gParticleStreams_DropPoints[][2]

Where the seven drops fall, in pixels.

Used by BattleFx_RunParticleStreams.

Line 975

gRagnarok_StrikeColumns

u8 gRagnarok_StrikeColumns[][3]

The canvas x of each strike column, three for each side.

Line 990

gRagnarok_FlashCells

u8 gRagnarok_FlashCells[]

The flash picture for each three frames at the end of a flash's life.

Used by BattleFx_RunRagnarok.

Line 995

gTitanBlade_FlashCells

u8 gTitanBlade_FlashCells[]

The flash picture for each three frames at the end of a flash's life.

Used by BattleFx_RunTitanBlade.

Line 1001

gTitanBlade_DustGravity

s32 gTitanBlade_DustGravity[]

Dust gravity, by particle index & 3.

Used by BattleFx_RunTitanBlade.

Line 1003

gNeptune_Gravity

s32 gNeptune_Gravity[]

Spray gravity, by particle index & 3.

Used by BattleFx_RunNeptune.

Line 1025

Also, globals without a comment: gBattleFx_PuffArcCellWidths, gBattleFx_PuffArcCellHeights, gBattleFx_PuffArcCellBiasY, gBattleFx_PuffArcCells, gBattleFx_GlintCells, gBattleFx_GlintCellWidths, gBattleFx_GlintCellHeights, gTargetStrike_Records, gTargetStrike_Widths, gTargetStrike_Heights, gTargetStrike_Offsets, gTargetStrike_Reach, gDeathPlunge_CellWidths, gDeathPlunge_CellHeights, gDeathPlunge_Cells, gDeathPlunge_PieceHeights, gDeathPlunge_PieceCells, gDeathPlunge_PieceStartX, gDeathPlunge_PieceStartY, gDeathPlunge_X, gDeathPlunge_Y, gDeathPlunge_DrawFlags, gSpiderWeb_CellWidths, gSpiderWeb_CellHeights, gSpiderWeb_Cells, gSpiderWeb_CellX, gSpiderWeb_CellBiasY, gMirroredWall_Cells, gMirroredWall_CellWidths, gMirroredWall_CellHeights, gDjinnBeams_HeadOffsets, gDjinnBeams_HeadWidths, gDjinnBeams_HeadHeights, gLobbedShells_ShardHeights, gLobbedShells_ShardOffsets, gCondemn_PanelY, gStars_Radii, gProcne_GridX, gProcne_GridY, gProcne_Frames, gProcne_CellWidths, gProcne_CellHeights, gProcne_CellBiasY, gProcne_Cells, gTiamat_StreakWidths, gTiamat_StreakHeights, gTiamat_StreakDrops, gTiamat_StreakOffsets, gPrism_ShardWidths, gPrism_ShardHeights, gPrism_ShardOffsets, gCybele_ThornOffsets, gCybele_ThornWidths, gCybele_ThornHeights, gCybele_LeafOffsets, gCybele_LeafSizes, gCybele_ChipOffsets, gCybele_ChipWidths, gCybele_ChipHeights, gCybele_SparkOffsets, gCybele_SparkSizes, gCybele_EmberOffsets, gCybele_EmberSizes, gBoreas_RockCells, gBoreas_RockWidths, gBoreas_RockHeights, gBoreas_DebrisWidths, gBoreas_DebrisHeights, gBoreas_DebrisCells, gBoreas_SprayWidths, gBoreas_SprayHeights, gBoreas_SprayCells, gBoreas_BoulderCells, gBoreas_BoulderWidths, gBoreas_BoulderHeights, gBoreas_FallWidths, gBoreas_FallHeights, gBoreas_FallCells, gStatChange_ShardCells, gStatChange_ShardWidths, gStatChange_ShardHeights, gFire_FlareWidths, gFire_FlareHeights, gFire_FlareBiasY, gFire_FlareCells, gFrost_MoteWidths, gFrost_MoteHeights, gFrost_MoteCells, gFrost_ColumnCells, gFrost_ColumnHeights, gFrost_ChipWidths, gFrost_ChipHeights, gFrost_ChipCells, gEruption_PuffCells, gEruption_PuffSizes, gUnused_SheetCells6, gUnused_SheetCells, gUnused_SheetWidths, gUnused_SheetHeights, gGrowth_VineWidths, gGrowth_HeightLimits, gGrowth_VineCells, gGrowth_PillarWidths, gGrowth_PillarCells, gGrowth_ColumnCounts, gGrowth_ColumnX, gGrowth_PillarHeights, gGrowth_PuffWidths, gGrowth_PuffHeights, gGrowth_PuffCells, gGrowth_Kinds, gGrowth_X, gGrowth_ThornPuffWidths, gGrowth_ThornPuffHeights, gGrowth_ThornPuffCells, gBolt_GlintFlips, gBolt_GlintModes, gProjectiles_FlashWidths, gProjectiles_FlashHeights, gProjectiles_FlashSteps, gProjectiles_FlashRises, gProjectiles_FlashOffsets, gHail_CellWidths, gHail_CellHeights, gHail_Cells, gHail_ChipWidths, gHail_ChipHeights, gHail_ChipCells, gHail_ChipX, gHail_ChipY, gSpire_RockX, gSpire_DropFrames, gSpire_RockCounts, gSpire_ShardWidths, gSpire_ShardHeights, gSpire_ShardCells, gGaia_RowCells, gGaia_RowWidths, gGaia_MoundCells, gGaia_MoundWidths, gGaia_MoundHeights, gBeams_CellWidths, gBeams_CellHeights, gBeams_Cells, gBeams_CellReaches, gCastingImpact_ImageX, gCastingImpact_ImageY, gHelmSplitter_CellWidths, gHelmSplitter_CellHeights, gHelmSplitter_Cells, gHelmSplitter_CellBiasX, gHelmSplitter_CellBiasY, gHelmSplitter_TwelveX, gHelmSplitter_TwelveZ, gHelmSplitter_RightEightX, gHelmSplitter_RightEightZ, gHelmSplitter_SmallEightX, gHelmSplitter_SmallEightZ, gHelmSplitter_ImpactBurstCellWidths, gHelmSplitter_ImpactBurstCellHeights, gHelmSplitter_ImpactBurstCells, gParticleStreams_FlashCells, gParticleStreams_FlashSizes, gRamses_ObjectColumns, gRamses_ObjectRows, gRamses_PuffCells, gRamses_PuffSizes, gJudgment_BurstHeights, gJudgment_BurstCells, gJudgment_ShardCells, gJudgment_ShardWidths, gJudgment_ShardHeights, gKirin_Columns, gKirin_Rows, gNeptune_ObjectX, gNeptune_ObjectY, gUndeadSword_SparkCells, gUndeadSword_SparkSizes.

On this page

Folderseffect.ceffect_bits.cGlobalsgUnused_BitOperandseffect_internal.hFunctionsDma_StopEnumerationsCanvasTransferModeMacrosEFFECT_DISPCNTEFFECT_WIN0_LAYERSEFFECT_WINOUTEFFECT_SLOTCANVAS_SLOTDMA_CONTROL_HALFDMA_FILL_WORDSEFFECT_GET_WORK_AND_CANVASEFFECT_GET_SLOTSEFFECT_FREE_PARTICLESEFFECT_VIEW_FROM_CAMERAEFFECT_STRIKE_TARGETEFFECT_SHOW_DAMAGECANVAS_BYTESEFFECT_BEGIN_NARROW_CANVASEFFECT_LOAD_BLITTEREFFECT_SET_TRANSFEREFFECT_START_TRANSFEREFFECT_PRESENT_FRAMEEFFECT_END_FRAMEEFFECT_RELEASE_BLITTERSEFFECT_FINISH_CANVASEFFECT_FINISH_CANVAS_ONE_BLITTERMOTE_SET_BYTESEFFECT_DRAW_MOTEEFFECT_DRAW_FLAREEFFECT_SHOW_WIDE_CANVASWINDOW_SPAN_INVERTEDEFFECT_CALLBACK_ORDEREFFECT_PLAYBACK_ORDERBLUE_RAMP_PIXELSEFFECT_CAP_LEVELLIGHTNING_BOLT_CELL_BYTESEFFECT_SET_BATTLE_WINDOWSEFFECT_SET_CANVAS_AFFINEEFFECT_WRITE_CANVAS_MAP_ROWeffect_table.cMacrosFLAME_PUFF_CELLSFLAME_PUFF_CELL_BIAS_YBLAST_CELL_SIZESBLAST_CELLSEARTH_WALL_CELLSSLASH_CELL_REACHFLASH_FADE_CELLSGLINT_FLIPSGlobalsgBattleFx_MoteCellsgBattleFx_FlareCellsgBattleFx_PuffCellsgBattleFx_PuffSizesgFalling_IceCountsgFalling_CountsgStreaks_RecordsgStreaks_TremblegTargetStrike_ColumnStagesgTargetStrike_GlintDrawFlagsgDeathPlunge_PieceWidthsgGatheringLights_CountsgDjinnBeams_MotePicturesgLobbedShells_RecordsgLobbedShells_ShardWidthsgCondemn_PanelXgBind_VertexgBind_TriangleStrikeVertexgStars_PointsgTiamat_DropSpeedsgTiamat_SparkPixelsgTiamat_DropSizesgNereid_ColumnsgNereid_GravitygVortices_CountsgVortices_ShapesgPrism_ShardStartsgPrism_CountsgPlasma_SparksgPlasma_ColumnsgPlasma_CountsgPlasma_ShapesgPlasma_FlashCellsgVolcano_CountsgVolcano_DepthsgVolcano_StartFramesgTargetMotes_GlintFlipsgBattleFx_EffectHandlersgCybele_ObjectPosesgBoreas_PointsgBoreas_ShakeOffsetsgBoreas_AnimationsgDrain_GravitiesgQuake_TimingsgFire_CountsgFrost_ColumnSpotsgFrost_TimingsgRay_SparksgEruption_CountsgAtalanta_UnitScalegGrowth_ColumnOffsetsgGrowth_CountsgBolt_CountsgProjectiles_CometHeightsgProjectiles_ModesgProjectiles_PelletOffsetsgDjinnAttacks_LaunchFramesgHail_ChipFlipsgThor_TargetPalettesgThor_SmokeFlipsgSpire_ShardOffsetsgBurstScene_RecordsgGaia_Bg2ShiftsgGaia_LateRockColumnsgCastingImpact_GlintDrawFlagsgCastingImpact_IceChipCellsgParticleStreams_OrbitPointsgParticleStreams_DropPointsgRagnarok_StrikeColumnsgRagnarok_FlashCellsgTitanBlade_FlashCellsgTitanBlade_DustGravitygNeptune_Gravity