src/effect
games/tbs/src/effect on GitHub
The Battle effects guide explains this folder.
Folders
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_PlaceFormationObjectsREADME.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.
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.
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_COPY | copy as drawn | |
CANVAS_COPY_AND_CLEAR | copy, then fill the canvas with transferValue | |
CANVAS_COPY_AND_FADE | copy, keeping 50% or 75% (transferValue) of each pixel in the canvas for the next frame | |
CANVAS_COPY_AND_DARKEN | copy, then darken the canvas by transferValue | |
CANVAS_COPY_AND_BRIGHTEN | copy, then brighten the canvas by transferValue |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
EARTH_WALL_CELLS
#define EARTH_WALL_CELLS {2702, 3535, 4580}
Where each earth wall picture begins.
Used by gDjinnBeams_HeadOffsets, gMirroredWall_Cells.
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.
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.
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.
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.
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.
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.
gBattleFx_PuffSizes
u8 gBattleFx_PuffSizes[]
Each puff cell's side.
Used by BattleFx_RunBoreas, BattleFx_RunDjinnHeal, BattleFx_RunFrost, BattleFx_RunHealingMotes, BattleFx_RunIce.
gFalling_IceCounts
u8 gFalling_IceCounts[][2]
Ice, by variant: shards and frames (ICE_SHARD_COUNT, ICE_FRAMES).
Used by BattleFx_RunIce.
gFalling_Counts
u8 gFalling_Counts[][4]
Douse, by variant: the FALLING_BOLT_ columns.
Used by BattleFx_RunDouse.
gStreaks_Records
s8 gStreaks_Records[][4]
Each streak style's animation, hit, motion and shake, by the STREAKS_ columns (streaks.c).
gStreaks_Tremble
s8 gStreaks_Tremble[]
Pixels the target trembles by, frame by frame.
Used by BattleFx_RunStreakVolley.
gTargetStrike_ColumnStages
u8 gTargetStrike_ColumnStages[]
The column stage shown by each picture of a rise.
Used by BattleFx_RunTargetStrike.
gTargetStrike_GlintDrawFlags
u8 gTargetStrike_GlintDrawFlags[]
The flips a glint may be drawn in.
Used by BattleFx_RunTargetStrike.
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.
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.
gDjinnBeams_MotePictures
u8 gDjinnBeams_MotePictures[]
The picture of each step of a mote's eight-step cycle.
Used by BattleFx_RunDjinnBeams.
gLobbedShells_Records
s8 gLobbedShells_Records[]
Two bytes for each lobbed shell mode.
Used by BattleFx_RunLobbedShells.
gLobbedShells_ShardWidths
u8 gLobbedShells_ShardWidths[]
Lobbed shells: nine tumbling images in two sets, the second (cells 9 to 17) smaller.
Used by BattleFx_RunLobbedShells.
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.
gBind_Vertex
struct Vector3 gBind_Vertex[]
The spinning triangle's first vertex, 24 up from its centre.
Used by BattleFx_RunBind.
gBind_TriangleStrikeVertex
struct Vector3 gBind_TriangleStrikeVertex[]
The striking triangle's first vertex, the same.
Used by BattleFx_RunTriangleStrike.
gStars_Points
struct Vector3 gStars_Points[]
The two star points, 48 and 28 pixels up (16.16).
Used by BattleFx_RunAstralBlast.
gTiamat_DropSpeeds
u8 gTiamat_DropSpeeds[]
Ember speeds, by ember index & 3.
Used by BattleFx_RunPaletteParticles.
gTiamat_SparkPixels
u8 gTiamat_SparkPixels[]
A spark's 1x2 picture.
Used by BattleFx_RunPaletteParticles.
gTiamat_DropSizes
u8 gTiamat_DropSizes[]
Ember sizes, by ember index & 3.
Used by BattleFx_RunPaletteParticles.
gNereid_Columns
u8 gNereid_Columns[][2]
Nereid's four columns of fire (NEREID_COLUMN_X, NEREID_COLUMN_Y).
Used by BattleFx_RunNereid.
gNereid_Gravity
s32 gNereid_Gravity[]
Ember gravity while falling, by ember index & 3.
Used by BattleFx_RunNereid.
gVortices_Counts
u8 gVortices_Counts[][2]
Froth, by variant: motes and frames.
Used by BattleFx_RunFroth.
gVortices_Shapes
u8 gVortices_Shapes[][3]
Whirlwind, by variant: the WHIRLWIND_ columns.
Used by BattleFx_RunWhirlwind.
gPrism_ShardStarts
u8 gPrism_ShardStarts[][2]
Where each of the 16 shards starts in the crystal: x, then y.
Used by BattleFx_RunPrism.
gPrism_Counts
u8 gPrism_Counts[][2]
Prism, by variant: crystals and frames.
Used by BattleFx_RunPrism.
gPlasma_Sparks
u16 gPlasma_Sparks[][2]
Plasma, by variant: sparks per pillar and shake frames.
Used by BattleFx_RunPlasma.
gPlasma_Columns
u8 gPlasma_Columns[][7]
Each pillar's canvas x, seven for each side.
gPlasma_Counts
u8 gPlasma_Counts[]
How many pillars strike, by variant.
Used by BattleFx_RunPlasma.
gPlasma_Shapes
u16 gPlasma_Shapes[][5]
The spark groups, by variant: the SPARK_GROUPS_ columns.
Used by BattleFx_RunSparkGroups.
gPlasma_FlashCells
u8 gPlasma_FlashCells[]
The flash picture for each three frames at the end of a flash's life.
Used by BattleFx_RunSparkGroups.
gVolcano_Counts
u8 gVolcano_Counts[]
How many pillars stand, by variant.
Used by BattleFx_RunVolcano.
gVolcano_Depths
s8 gVolcano_Depths[][4]
Each pillar's depth, by variant.
Used by BattleFx_RunVolcano.
gVolcano_StartFrames
u8 gVolcano_StartFrames[]
The frame each pillar starts.
Used by BattleFx_RunVolcano.
gTargetMotes_GlintFlips
u8 gTargetMotes_GlintFlips[]
Glint orientations: none, and mirrored each way and both.
Used by BattleFx_RunTargetMotes.
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.
gCybele_ObjectPoses
u8 gCybele_ObjectPoses[][2]
Poses of objects 3 and 4 while they wave, three pairs.
Used by BattleFx_RunCybele.
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.
gBoreas_ShakeOffsets
s8 gBoreas_ShakeOffsets[]
The backdrop's jolt on frames 176 to 179.
Used by BattleFx_RunBoreas.
gBoreas_Animations
u8 gBoreas_Animations[]
The third object's animations from frame 209, one every 4 frames.
Used by BattleFx_RunBoreas.
gDrain_Gravities
s32 gDrain_Gravities[]
Ice shards: shard i falls with gravity i & 3.
Used by BattleFx_RunBreak.
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.
gFire_Counts
u8 gFire_Counts[]
Embers by variant, at most FIRE_EMBERS (fire.c).
Used by BattleFx_RunFire.
gFrost_ColumnSpots
u8 gFrost_ColumnSpots[][2]
Where each ice column stands: x, then the y of its foot.
Used by BattleFx_RunFrost.
gFrost_Timings
u8 gFrost_Timings[][3]
Motes, ice columns and the burst frame, for each variant.
Used by BattleFx_RunFrost.
gRay_Sparks
u8 gRay_Sparks[][2]
Sparks by variant; [1] is how many each bolt throws a frame.
Used by BattleFx_RunRay.
gEruption_Counts
u8 gEruption_Counts[][3]
Motes, puffs of smoke and frames, for each variant.
Used by BattleFx_RunEruption.
gAtalanta_UnitScale
struct SpriteScale gAtalanta_UnitScale
Staged particle scale: Atalanta's formation objects keep this scale, one to one, throughout.
Used by BattleFx_RunAtalanta.
gGrowth_ColumnOffsets
s8 gGrowth_ColumnOffsets[]
Each vine's root, across from the middle of the targets.
Used by BattleFx_RunVine.
gGrowth_Counts
u8 gGrowth_Counts[]
Thorns by variant.
Used by BattleFx_RunThorn.
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.
gProjectiles_CometHeights
u8 gProjectiles_CometHeights[]
Comet picture heights, by comet kind.
Used by BattleFx_RunProjectileVolley.
gProjectiles_Modes
u8 gProjectiles_Modes[][5]
Each projectile volley mode, by the PROJECTILE_VOLLEY_ columns (projectiles.c).
Used by BattleFx_RunProjectileVolley.
gProjectiles_PelletOffsets
u16 gProjectiles_PelletOffsets[]
Ice chip pictures, by shot index & 3.
Used by BattleFx_RunProjectileVolley.
gDjinnAttacks_LaunchFrames
u8 gDjinnAttacks_LaunchFrames[]
The frames on which the Djinni fires each of its five flames.
Used by BattleFx_RunMercury.
gHail_ChipFlips
u8 gHail_ChipFlips[]
The composite flips a chip may take.
Used by BattleFx_RunGround.
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.
gThor_SmokeFlips
u8 gThor_SmokeFlips[]
Flip flags for the smoke puffs, chosen at random.
Used by BattleFx_RunThor.
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.
gBurstScene_Records
u8 gBurstScene_Records[][7]
Each burst scene mode, by the BURST_SCENE_ columns (burst_scene.c).
Used by BattleFx_RunBurstScene.
gGaia_Bg2Shifts
s8 gGaia_Bg2Shifts[][3]
BG2's x shift, by side and variant.
Used by BattleFx_RunGaia.
gGaia_LateRockColumns
u8 gGaia_LateRockColumns[]
The columns rock particles[16] to particles[21] take.
Used by BattleFx_RunGaia.
gCastingImpact_GlintDrawFlags
u8 gCastingImpact_GlintDrawFlags[]
The flips a glint may take, picked at random.
Used by BattleFx_RunCastingImpact.
gCastingImpact_IceChipCells
u16 gCastingImpact_IceChipCells[]
The four ice chip cells, 8x8.
Used by BattleFx_RunCastingImpact.
gParticleStreams_OrbitPoints
s16 gParticleStreams_OrbitPoints[][3]
The seven sparks that orbit the rising formation.
Used by BattleFx_RunParticleStreams.
gParticleStreams_DropPoints
s16 gParticleStreams_DropPoints[][2]
Where the seven drops fall, in pixels.
Used by BattleFx_RunParticleStreams.
gRagnarok_StrikeColumns
u8 gRagnarok_StrikeColumns[][3]
The canvas x of each strike column, three for each side.
gRagnarok_FlashCells
u8 gRagnarok_FlashCells[]
The flash picture for each three frames at the end of a flash's life.
Used by BattleFx_RunRagnarok.
gTitanBlade_FlashCells
u8 gTitanBlade_FlashCells[]
The flash picture for each three frames at the end of a flash's life.
Used by BattleFx_RunTitanBlade.
gTitanBlade_DustGravity
s32 gTitanBlade_DustGravity[]
Dust gravity, by particle index & 3.
Used by BattleFx_RunTitanBlade.
gNeptune_Gravity
s32 gNeptune_Gravity[]
Spray gravity, by particle index & 3.
Used by BattleFx_RunNeptune.
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.