What every part of the battle effect object shares: its includes, macros and frame-loop helpers. More...
Go to the source code of this file.
Macros | |
| #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. | |
| #define | EFFECT_WIN0_LAYERS |
| Window 0, the battle view, shows BG0 to BG2, sprites and blending. | |
| #define | EFFECT_WINOUT (WINOUT_WIN01_BG0 | WINOUT_WIN01_CLR | WINOUT_WINOBJ_ALL) |
| Outside the battle view: BG0 and blending only. | |
| #define | EFFECT_SLOT(slots, slot) |
| A work slot read through a pointer to the effect's own slot, gWorkSlot[HEAP_SLOT_BATTLE_EFFECT]. | |
| #define | CANVAS_SLOT(slots, slot) |
| A work slot read through a pointer to the canvas slot, gWorkSlot[HEAP_SLOT_BATTLE_CANVAS], just after the effect's own. | |
| #define | DMA_CONTROL_HALF 5 |
| Index of DMAxCNT_H, the control half, in a channel's 16-bit registers. | |
| #define | DMA_FILL_WORDS(n) |
| DMA control word that fills n words from one fixed source word. | |
| #define | EFFECT_GET_WORK_AND_CANVAS(cursor, work, canvas) |
| The work block and canvas occupy adjacent slots, starting at HEAP_SLOT_BATTLE_EFFECT. | |
| #define | EFFECT_GET_SLOTS(slots, cursor, work, canvas) |
| Starts at the effect's entry in the whole work-slot array. | |
| #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. | |
| #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. | |
| #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). | |
| #define | EFFECT_SHOW_DAMAGE(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. | |
| #define | CANVAS_BYTES (128 * 128) |
| The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1). | |
| #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. | |
| #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. | |
| #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). | |
| #define | EFFECT_START_TRANSFER(work, mode, value) |
| Sets the transfer, then starts copying the canvas to VRAM once a frame. | |
| #define | EFFECT_PRESENT_FRAME(work) |
| Ends a frame of a canvas effect: marks the canvas ready for the transfer callback, then waits for the next 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. | |
| #define | EFFECT_RELEASE_BLITTERS() |
| Frees the two blitters, the alternate first. | |
| #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. | |
| #define | EFFECT_FINISH_CANVAS_ONE_BLITTER() |
| The same for an effect that drew through one blitter. | |
| #define | MOTE_SET_BYTES 770 |
| The bytes of one set of the ten mote cells: 2 * (1 + 4 + ... + 100). | |
| #define | EFFECT_DRAW_MOTE(draw, canvas, sheet, x, y, size) |
| Particle sheets hold ten mote cells, 1x2 to 10x20 pixels. | |
| #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. | |
| #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. | |
| #define | WINDOW_SPAN_INVERTED WIN_RANGE(1, 0) |
| A WIN0H value whose left edge is past its right edge. | |
| #define | EFFECT_CALLBACK_ORDER 0x480 |
| The scheduler order of every per-frame effect callback (Scheduler_AddOrUpdateCallback sorts the frame's callbacks by order). | |
| #define | EFFECT_PLAYBACK_ORDER 0xc80 |
| The order where the battle's own playback runs, which the palette fade and the element streaks take. | |
| #define | BLUE_RAMP_PIXELS Ram_MapCellBuffer |
| The full-screen picture Graphics_ConvertBackgroundToBlueRamp (bind.c) works on, which Condemn draws too. | |
| #define | EFFECT_CAP_LEVEL(level, cap) |
| Caps a colour level at cap, and at 0 from below. | |
| #define | LIGHTNING_BOLT_CELL_BYTES 2880 |
| Closing bolts and lightning columns use the same 24x120 picture cells. | |
| #define | EFFECT_SET_BATTLE_WINDOWS() |
| Windows 0 and 1 both cover the battle view: the full width, lines 16 to. | |
| #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. | |
| #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. | |
Enumerations | |
| enum | CanvasTransferMode { CANVAS_COPY , CANVAS_COPY_AND_CLEAR , CANVAS_COPY_AND_FADE , CANVAS_COPY_AND_DARKEN , CANVAS_COPY_AND_BRIGHTEN } |
| 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. More... | |
Functions | |
| static 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. | |
What every part of the battle effect object shares: its includes, macros and frame-loop helpers.
effect.c includes it before the parts, and each part includes it too, so that a part read on its own still resolves.
Definition in file effect_internal.h.
| #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.
Definition at line 83 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_RunAtalanta(), BattleFx_RunShatteringOpening(), BattleFx_SetupBlendedDisplay(), and BattleFx_SetupCanvasTileMap().
| #define EFFECT_WIN0_LAYERS |
Window 0, the battle view, shows BG0 to BG2, sprites and blending.
Effects pick window 1's layers themselves.
Definition at line 89 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_RunBoreas(), BattleFx_RunDouse(), BattleFx_RunIce(), BattleFx_RunKirin(), BattleFx_RunNeptune(), BattleFx_RunRamses(), BattleFx_RunShatteringOpening(), and BattleFx_SetupCanvasTileMap().
| #define EFFECT_WINOUT (WINOUT_WIN01_BG0 | WINOUT_WIN01_CLR | WINOUT_WINOBJ_ALL) |
Outside the battle view: BG0 and blending only.
Definition at line 94 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_RunShatteringOpening(), and BattleFx_SetupCanvasTileMap().
| #define EFFECT_SLOT | ( | slots, | |
| slot ) |
A work slot read through a pointer to the effect's own slot, gWorkSlot[HEAP_SLOT_BATTLE_EFFECT].
Definition at line 98 of file effect_internal.h.
Referenced 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(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetStrike(), BattleFx_RunTriangleStrike(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), and Camera_ApplyPhasedDelta().
| #define CANVAS_SLOT | ( | slots, | |
| slot ) |
A work slot read through a pointer to the canvas slot, gWorkSlot[HEAP_SLOT_BATTLE_CANVAS], just after the effect's own.
Definition at line 101 of file effect_internal.h.
Referenced by BattleFx_RunBoreas(), BattleFx_RunBurstShower(), BattleFx_RunCurse(), BattleFx_RunJudgment(), BattleFx_RunNeptune(), BattleFx_RunPaletteParticles(), and BattleFx_RunProcne().
| #define DMA_CONTROL_HALF 5 |
Index of DMAxCNT_H, the control half, in a channel's 16-bit registers.
Definition at line 104 of file effect_internal.h.
Referenced by Dma_Stop().
| #define DMA_FILL_WORDS | ( | n | ) |
DMA control word that fills n words from one fixed source word.
Definition at line 107 of file effect_internal.h.
Referenced by BattleFx_RunParticleStreams().
| #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.
Definition at line 133 of file effect_internal.h.
Referenced 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(), and BattleFx_RunWhirlwind().
| #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.
Definition at line 138 of file effect_internal.h.
Referenced 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_RunSwirlingStars(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetStrike(), BattleFx_RunTitanBlade(), BattleFx_RunUndeadSword(), and BattleFx_RunVenus().
| #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.
Definition at line 144 of file effect_internal.h.
Referenced 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(), and BattleFx_RunVenus().
| #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.
Definition at line 151 of file effect_internal.h.
Referenced 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(), BattleFx_RunSwirlingStars(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunTriangleStrike(), BattleFx_RunVolcano(), and BattleUnit_ProjectToScreen().
| #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).
Definition at line 158 of file effect_internal.h.
Referenced by BattleFx_RunGround(), BattleFx_RunJupiter(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunTargetStrike(), and BattleFx_RunVenus().
| #define EFFECT_SHOW_DAMAGE | ( | 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.
Definition at line 170 of file effect_internal.h.
Referenced by BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunBeamSequence(), BattleFx_RunBind(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBreak(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCurse(), 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(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShiningStar(), BattleFx_RunSleep(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunSpire(), BattleFx_RunStatBoost(), BattleFx_RunStatReduction(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunTriangleStrike(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVolcano(), and BattleFx_RunWhirlwind().
| #define CANVAS_BYTES (128 * 128) |
The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1).
Definition at line 174 of file effect_internal.h.
Referenced 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(), and CastingImpact_EndPrelude().
| #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.
Definition at line 178 of file effect_internal.h.
Referenced by BattleFx_RunAtalanta(), BattleFx_RunBladeRain(), BattleFx_RunCurse(), 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(), and BattleFx_RunUndeadSword().
| #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.
Definition at line 184 of file effect_internal.h.
Referenced 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_RunCurse(), 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(), BattleFx_RunOrbitingSpirals(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSleep(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunSpire(), BattleFx_RunStatBoost(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunTriangleStrike(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), and BattleFx_RunWhirlwind().
| #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).
Definition at line 189 of file effect_internal.h.
Referenced 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(), and BattleFx_RunThor().
| #define EFFECT_START_TRANSFER | ( | work, | |
| mode, | |||
| value ) |
Sets the transfer, then starts copying the canvas to VRAM once a frame.
Definition at line 193 of file effect_internal.h.
Referenced 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(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRay(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunSleep(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunSpire(), BattleFx_RunStatReduction(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlingStars(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunTitanBlade(), BattleFx_RunTorch(), BattleFx_RunTriangleStrike(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), and BattleFx_RunWhirlwind().
| #define EFFECT_PRESENT_FRAME | ( | work | ) |
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.
Definition at line 200 of file effect_internal.h.
Referenced by BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBind(), BattleFx_RunBoreas(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunCurse(), 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(), and BattleFx_WipeCanvas().
| #define EFFECT_END_FRAME | ( | work | ) |
The usual end of an effect frame: counts down the targets' flash timers (ObjectGroup_TickMemberTimers), then presents the canvas.
Definition at line 204 of file effect_internal.h.
Referenced 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(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunSpire(), BattleFx_RunStatBoost(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), and BattleFx_RunWhirlwind().
| #define EFFECT_RELEASE_BLITTERS | ( | ) |
Frees the two blitters, the alternate first.
Definition at line 208 of file effect_internal.h.
Referenced 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(), and CastingImpact_EndPrelude().
| #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.
Definition at line 214 of file effect_internal.h.
Referenced 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(), and BattleFx_RunVine().
| #define EFFECT_FINISH_CANVAS_ONE_BLITTER | ( | ) |
The same for an effect that drew through one blitter.
Definition at line 219 of file effect_internal.h.
Referenced by BattleFx_RunBolt(), BattleFx_RunBreak(), BattleFx_RunCurse(), BattleFx_RunDeathPlunge(), BattleFx_RunDrain(), BattleFx_RunEruption(), BattleFx_RunGround(), BattleFx_RunJudgment(), BattleFx_RunKirin(), BattleFx_RunOrbitingSkulls(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunSpire(), and BattleFx_RunSwirlSwipe().
| #define MOTE_SET_BYTES 770 |
The bytes of one set of the ten mote cells: 2 * (1 + 4 + ... + 100).
Definition at line 224 of file effect_internal.h.
Referenced by BattleFx_RunEruption(), BattleFx_RunJudgment(), BattleFx_RunParticleStreams(), BattleFx_RunSceneEffect(), BattleFx_RunShatteringOpening(), BattleFx_RunSwirlingStars(), and BattleFx_RunTableEffect().
| #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.
Definition at line 230 of file effect_internal.h.
Referenced 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(), and BattleFx_RunVolcano().
| #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.
Definition at line 237 of file effect_internal.h.
Referenced by BattleFx_RunBeamSequence(), BattleFx_RunDouse(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunRingAndSparkScene(), and BattleFx_RunStatBoost().
| #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.
Definition at line 245 of file effect_internal.h.
Referenced by BattleFx_RunAtalanta(), BattleFx_RunBoreas(), BattleFx_RunJudgment(), BattleFx_RunKirin(), BattleFx_RunNeptune(), BattleFx_RunRamses(), and BattleFx_RunThor().
| #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.
Definition at line 253 of file effect_internal.h.
| #define EFFECT_CALLBACK_ORDER 0x480 |
The scheduler order of every per-frame effect callback (Scheduler_AddOrUpdateCallback sorts the frame's callbacks by order).
Definition at line 257 of file effect_internal.h.
Referenced by BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBoreas(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunCurse(), 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_RunStatBoost(), BattleFx_RunTargetMotes(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTorch(), and BattleFx_StartElementStreaks().
| #define EFFECT_PLAYBACK_ORDER 0xc80 |
The order where the battle's own playback runs, which the palette fade and the element streaks take.
Definition at line 260 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_OpenCanvasLayer(), BattleFx_RunRingAndSparkScene(), and BattleFx_StartElementStreaks().
| #define BLUE_RAMP_PIXELS Ram_MapCellBuffer |
The full-screen picture Graphics_ConvertBackgroundToBlueRamp (bind.c) works on, which Condemn draws too.
Definition at line 264 of file effect_internal.h.
Referenced by Graphics_ConvertBackgroundToBlueRamp().
| #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.
Definition at line 269 of file effect_internal.h.
Referenced by BattleFx_RunJudgment(), BattleFx_RunStatReduction(), and BattleFx_RunThor().
| #define LIGHTNING_BOLT_CELL_BYTES 2880 |
Closing bolts and lightning columns use the same 24x120 picture cells.
Definition at line 278 of file effect_internal.h.
Referenced by BattleFx_RunBolt(), BattleFx_RunCastingImpact(), and BattleFx_RunRay().
| #define EFFECT_SET_BATTLE_WINDOWS | ( | ) |
Windows 0 and 1 both cover the battle view: the full width, lines 16 to.
Definition at line 282 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_RunShatteringOpening(), and BattleFx_SetupCanvasTileMap().
| #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.
Definition at line 288 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_OpenCanvasLayer(), and BattleFx_RunShatteringOpening().
| #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.
Definition at line 295 of file effect_internal.h.
Referenced by BattleFx_BeginCanvasLayer(), BattleFx_BeginTiledCanvas(), and BattleFx_OpenCanvasLayer().
| 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.
Definition at line 122 of file effect_internal.h.
|
inlinestatic |
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.
Definition at line 113 of file effect_internal.h.
Referenced by BattleFx_ArmBg2AffineHBlankDma(), BattleFx_ArmPaletteHBlankDma(), BattleFx_ArmWin0HBlankDma(), BattleFx_BuildWindowEdgeTable(), and Dma_Stop().