Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_internal.h

What every part of the battle effect object shares: its includes, macros and tick-loop helpers.

Included by battle_effect.c.

Macros

NameDescription
#defineEFFECT_BLEND_ADD BLEND_ALPHA(BLEND_WEIGHT_MAX, BLEND_WEIGHT_MAX)The canvas added to the battle under it: both blend weights whole.
#defineEFFECT_BLEND_CANVAS (level) BLEND_ALPHA(level, BLEND_WEIGHT_MAX)The canvas at level sixteenths over the whole battle under it.
#defineCANVAS_BLEND_LEVEL 14The canvas's usual weight over the battle, in sixteenths: every canvas opens with it.
#defineEFFECT_DISPCNTThe battle screen's display mode while an effect plays: background mode 1 with BG0 to BG2, sprites and both windows on.
#defineEFFECT_WIN0_LAYERSWindow 0, the battle view, shows BG0 to BG2, sprites and blending.
#defineEFFECT_WINOUT (WINOUT_WIN01_BG0 | WINOUT_WIN01_CLR | WINOUT_WINOBJ_ALL)Outside the battle view: BG0 and blending only.
#defineDMA_CONTROL_HALF 5Index of DMAxCNT_H, the control half, in a channel's 16-bit registers.
#defineEFFECT_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.
#defineEFFECT_VIEW_FROM_CAMERA (camera)Starts a tick's 3D projection from the battle camera.
#defineEFFECT_STRIKE_TARGET (effect, i, ticks, motion)Strikes target i: it flashes white in its damage pose and is knocked back by motion.
#defineEFFECT_SHOW_DAMAGE (hitSound) btPlaybackStartStub(hitSound)Lets the battle show the damage, playing hitSound (0 keeps the one queued) as the targets react; a second use changes nothing.
#defineCANVAS_SIZE 128The canvas: 128x128 pixels, one byte each, in its heap slot and in VRAM at BG_CHAR_BLOCK(1).
#defineCANVAS_BYTES (CANVAS_SIZE * CANVAS_SIZE)
#defineCANVAS_TILES (CANVAS_SIZE / 8)The canvas's rows and columns of 8x8 tiles.
#defineCANVAS_PIXEL_OFFSET (x, y)The byte of canvas pixel (x, y): the canvas is laid out in 8x8 tiles, row by row, each tile 64 bytes row by row.
#defineBACKGROUND_PIXEL_OFFSET (x, y)The byte of pixel (x, y) of the battle background: 8x8 tiles of 256 colours, 64 bytes each, 32 to a row, from BG_CHAR_BLOCK(2).
#defineBATTLE_VIEW_TOP 16The battle view, under the top window and over the menus: screen lines 16 to 135.
#defineBATTLE_VIEW_HEIGHT 120
#defineBATTLE_VIEW_BOTTOM (BATTLE_VIEW_TOP + BATTLE_VIEW_HEIGHT)
#defineNARROW_CANVAS_PARTY_X (DISPLAY_WIDTH - CANVAS_SIZE)How far right the narrow canvas is set to show over the party: against the screen's right edge.
#defineSUMMON_PROJECTION_CENTER_Y 240Where Atalanta and Boreas centre the projection while their formations fly, lower than the battle's BATTLE_PROJECTION_CENTER_Y.
#defineBACKGROUND_DARKEN_TICKS 24The ticks the battle background darkens behind an effect's canvas (state->fadeFrame, btEffectDarkenBackgroundStep).
#defineBACKGROUND_DARKENED_LEVEL BACKGROUND_DARKEN_TICKSThe level a canvas darkens the battle background to, a level a tick.
#defineSHEET_PALETTE_COLORS 64A sprite sheet resource opens with its 64 colours, ahead of its compressed pictures.
#defineSHEET_PALETTE_BYTES (SHEET_PALETTE_COLORS * 2)
#definePARTICLE_DAMPING_NONE DAMPING_SCALEbtParticleAdvanceWithGravity3D's and 2D's damping that keeps a particle's whole speed.
#defineEFFECT_START_NARROW_CANVAS (bgControl)Opens the canvas layer at the canvas's own width.
#defineEFFECT_LOAD_BLITTER (slot, flags, mode)Builds a blitter for the 128x128 canvas (its width and height given to btEffectBuildBlitter as powers of two) in heap slot slot, for one clip, mirror and blend mode.
#defineEFFECT_BLITTER (slot) ((DRAW_RECTANGLE)HeapSlots[slot])The blitter built in heap slot slot.
#defineEFFECT_SET_TRANSFER (state, mode, value)Sets what the canvas transfer leaves in the canvas after each copy.
#defineEFFECT_START_TRANSFER (state, mode, value)Sets the transfer, then starts copying the canvas to VRAM once a tick.
#defineEFFECT_PRESENT_CANVAS (state) ((state)->transferPending = 1, sySynch(1))Presents the canvas and waits for the next tick.
#defineEFFECT_END_TICK (state)The usual end of an effect's tick: counts down the targets' flash timers, then presents the canvas.
#defineEFFECT_RELEASE_BLITTERS ()Frees the two blitters, the alternate first.
#defineEFFECT_FINISH_CANVAS ()The usual end of a canvas effect: the transfer, the blitters, then the canvas layer.
#defineEFFECT_FINISH_CANVAS_ONE_BLITTER ()The same for an effect that drew through one blitter.
#definePICTURE_BYTES (name) (name##_WIDTH * name##_HEIGHT)The bytes of a sprite sheet picture, one byte a pixel, from its name's _WIDTH and _HEIGHT.
#defineEFFECT_DRAW_PICTURE (draw, canvas, sheet, name, x, y)Draws picture name of sheet at its own size, its top left at (x, y).
#defineMOTE_SET_BYTES 770The bytes of one set of the ten mote pictures: 2 * (1 + 4 + ...
#defineDIMMED_COPIES 8A picture's dimmed copies: DIMMED_COPIES of it, copy i with every level capped at DIMMED_COPY_CAP(i), 7 levels lower than the copy before, copy 0 not at all.
#defineDIMMED_COPY_CAP (copy) (CANVAS_LEVEL_BRIGHTEST + 1 - (copy) * 7)
#defineGLINT_SET_BYTESThe bytes of the six glint pictures that open the tornado sprite sheet.
#defineEFFECT_DRAW_MOTE (draw, canvas, sheet, x, y, size)Draws mote picture size (1 to MOTE_SIZE_MAX: size pixels wide, twice that tall), centred across x and standing on y.
#defineMOTE_SIZE_MAX 10The largest of the ten mote pictures.
#defineMOTE_DEPTH_NEAR 160A mote sized by its depth is drawn one size smaller for every MOTE_DEPTH_STEP past MOTE_DEPTH_NEAR, its depth held between MOTE_DEPTH_NEAR and MOTE_DEPTH_FAR.
#defineMOTE_DEPTH_FAR 799
#defineMOTE_DEPTH_STEP 64
#defineEFFECT_DRAW_FLARE (draw, canvas, sheet, x, y, size)Draws flare picture size, a square, centred on (x, y).
#defineEFFECT_SWELL_MOTE (size, tick)Swells a falling mote as the drops clear (Nereid's drops, Titan Blade's dust).
#defineEFFECT_FALL_MOTE (velocityY, gravity, tick)A falling mote's vertical speed: it falls under gravity, then from tick 80 rises.
#defineEFFECT_SHOW_WIDE_CANVAS (top)Shows the canvas stretched to twice its width, top sixteenths of its colour added over what lies under it.
#defineWINDOW_SPAN_INVERTED WIN_RANGE(1, 0)A WIN0H value whose left edge is past its right edge, written only on lines outside window 0.
#defineBATTLE_BACKGROUND_WIDTH 256The battle background's image as BG1 shows it from BG character block 2, one byte a pixel.
#defineBATTLE_BACKGROUND_HEIGHT 120
#defineBATTLE_BACKGROUND_BYTES
#defineWINDOW_EDGE_RIGHT ((Uint16 *)RamMapGridMetatileBuffer)RamMapGridMetatileBuffer as btEffectBuildWindowEdgeTable reads it: window 0's right edge, how far each of its lines is set in from that edge, and the right edge it builds for every screen line.
#defineWINDOW_EDGE_INSETS (RamMapGridMetatileBuffer + 2)
#defineWINDOW_EDGE_INSET_LINES 128
#defineWINDOW_EDGE_LINES (WINDOW_EDGE_INSETS + WINDOW_EDGE_INSET_LINES)
#defineBLUE_RAMP_PIXELS RamMapGridMetatileBufferRamMapGridMetatileBuffer as the unused blue ramp uses it: a working copy of the battle background's image.
#defineEFFECT_CAP_LEVEL (level, cap)Caps a colour level at cap, and at 0 from below.
#defineREAPER_SHEET_RAISED_WIDTH 57The reaper in ReaperSheet, which Condemn and Mortal Danger decode: the reaper with its scythe raised, then swung, then the red crescent the swing leaves.
#defineREAPER_SHEET_RAISED_HEIGHT 98
#defineREAPER_SHEET_SWUNG_WIDTH 99
#defineREAPER_SHEET_SWUNG_HEIGHT 69
#defineREAPER_SHEET_CRESCENT_WIDTH 128
#defineREAPER_SHEET_CRESCENT_HEIGHT 91
#defineRED_CRESCENT_FADE_A_WIDTH 128RedCrescentSheetA: the swing's crescent fading in four pictures.
#defineRED_CRESCENT_FADE_A_HEIGHT 91
#defineRED_CRESCENT_FADE_B_WIDTH 128
#defineRED_CRESCENT_FADE_B_HEIGHT 59
#defineRED_CRESCENT_FADE_C_WIDTH 122
#defineRED_CRESCENT_FADE_C_HEIGHT 29
#defineRED_CRESCENT_FADE_D_WIDTH 76
#defineRED_CRESCENT_FADE_D_HEIGHT 25
#defineLIGHTNING_BOLT_WIDTH 24Closing bolts and lightning columns use the same 24x120 pictures.
#defineLIGHTNING_BOLT_HEIGHT 120
#defineLIGHTNING_BOLT_PICTURE_BYTES PICTURE_BYTES(LIGHTNING_BOLT)
#defineBLUE_FLAME_COLUMN_WIDTH 17BlueFlameSheet: the column of flame, then the flame that splashes from it, twice its width.
#defineBLUE_FLAME_COLUMN_HEIGHT 104
#defineBLUE_FLAME_SPLASH_WIDTH 34
#defineBLUE_FLAME_SPLASH_HEIGHT 65
#defineWAVE_WIDTH 48WaveSheet's six pictures, BlueArcSheetA and B's six, and YellowOrbSheet's.
#defineWAVE_HEIGHT 16
#defineBLUE_ARC_WIDTH 48
#defineBLUE_ARC_HEIGHT 72
#defineYELLOW_ORB_WIDTH 40
#defineYELLOW_ORB_HEIGHT 48
#defineYELLOW_ORB_PACKED_WIDTH (YELLOW_ORB_WIDTH / 2)The yellow orb as btEffectPackYellowOrbs packs it, every second byte.
#defineYELLOW_ORB_PACKED_HEIGHT YELLOW_ORB_HEIGHT
#defineYELLOW_ORB_PICTURES 6
#defineSLASH_PICTURE_SIZE 120The slash pictures as wide and tall as the canvas's view: StarBurstSheet's, CrescentSheet's and the reveal masks.
#defineFIRE_STREAK_WIDTH 48FireStreakSheet's six pictures and FireBurstSheet's.
#defineFIRE_STREAK_HEIGHT 72
#defineFIRE_BURST_WIDTH 40
#defineFIRE_BURST_HEIGHT 80
#defineMERCURY_SMALL_DJINNI_HEIGHT 34The small Djinn sprite sheets' pictures are SMALL_DJINNI_WIDTH wide; Mercury's and Venus's are shorter than SMALL_DJINNI_HEIGHT.
#defineVENUS_SMALL_DJINNI_HEIGHT 38
#defineFIRE_BLOB_WIDTH 48FireBlobSheet's blobs and CrystalSheet's crystal.
#defineFIRE_BLOB_HEIGHT 32
#defineCRYSTAL_WIDTH 32
#defineCRYSTAL_HEIGHT 64
#defineLIGHTNING_PILLAR_WIDTH 48LightningPillarSheet's pillar, in two pictures.
#defineLIGHTNING_PILLAR_HEIGHT 112
#defineFIRE_PILLAR_WIDTH 34FirePillarSheetA: the pillar of fire, then two flames.
#defineFIRE_PILLAR_HEIGHT 104
#defineFIRE_PILLAR_FLAME_WIDTH 20
#defineFIRE_PILLAR_FLAME_HEIGHT 37
#defineSPIRAL_WIDTH 32SpiralSheet's pictures.
#defineSPIRAL_HEIGHT 32
#defineFLAMEBALL_WIDTH 40FlameballSheet and FireballSheet's pictures.
#defineFLAMEBALL_HEIGHT 64
#defineRUNE_HALF_WIDTH 24Each half of RuneSheet's rune, the second drawn mirrored.
#defineRUNE_HALF_HEIGHT 48
#defineDJINNI_WIDTH 40A Djinni's picture: each frame of the full Djinn sprite sheets (VenusDjinnSheet and its kind), and the one picture of the small sprite sheets.
#defineDJINNI_HEIGHT 40
#defineSMALL_DJINNI_WIDTH 20
#defineSMALL_DJINNI_HEIGHT 40
#defineSMOKE_PUFF_WIDTH 24The pictures of the sprite sheets several effects share, each sprite sheet's pictures all one size: SmokeSheet's puffs, FlashBurstSheet's bursts, SkullSheet's skulls and the tornado strips after TornadoSheet's glints.
#defineSMOKE_PUFF_HEIGHT 48
#defineFLASH_BURST_WIDTH 32
#defineFLASH_BURST_HEIGHT 64
#defineSKULL_WIDTH 24
#defineSKULL_HEIGHT 24
#defineTORNADO_STRIP_WIDTH 40
#defineTORNADO_STRIP_HEIGHT 32
#defineDAGGER_WIDTH 24The pictures of DaggerSheet, ShieldSheet, GlowOrbSheet, VioletStreakSheet and WispSheet.
#defineDAGGER_HEIGHT 40
#defineSHIELD_WIDTH 40
#defineSHIELD_HEIGHT 40
#defineGLOW_ORB_WIDTH 40
#defineGLOW_ORB_HEIGHT 40
#defineVIOLET_STREAK_WIDTH 32
#defineVIOLET_STREAK_HEIGHT 64
#defineWISP_WIDTH 64
#defineWISP_HEIGHT 32
#defineVORTEX_WIDTH 24VortexSheet's six pictures and HeartSheet's heart.
#defineVORTEX_HEIGHT 48
#defineHEART_WIDTH 22
#defineHEART_HEIGHT 42
#defineWATER_WAVE_WIDTH 32WaterSpraySheet: the wave, then the splash's pictures.
#defineWATER_WAVE_HEIGHT 32
#defineWATER_SPLASH_WIDTH 48
#defineWATER_SPLASH_HEIGHT 48
#defineEFFECT_SET_BATTLE_WINDOWS ()Windows 0 and 1 both cover the battle view: the full width, lines 16 to 135.
#defineEFFECT_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.
#defineCANVAS_WAVE_BG2X (sway) ((sway) >> 10)A line's sideways sway as its BG2X value in state->bg2xLines, which the wave HBlank DMA writes line by line.
#defineEFFECT_WRITE_CANVAS_MAP_ROW (row, column, offset)Writes one row of BG2's map for the canvas, two tiles at a time.

Enumerations

NameDescription
enumREAPER_SHEET_PICTURE { REAPER_SHEET_RAISED, REAPER_SHEET_SWUNG, REAPER_SHEET_CRESCE … }Where each of the reaper's pictures begins in its sprite sheet, in bytes.
enumRED_CRESCENT_PICTURE { RED_CRESCENT_FADE_A, RED_CRESCENT_FADE_B, RED_CRESCENT_FADE_ … }Where each picture of the fading red crescent begins in its sprite sheet, in bytes.
enumDJINNI_ENTRANCE_LENGTH { DJINNI_ENTRANCE_LONG }What btEffectRunDjinniEntrance takes added to its element; the element alone plays the 64-tick entrance.
enumDJINNI_ENTRANCE_ANCHOR { DJINNI_ANCHOR_OVER_TARGET, DJINNI_ANCHOR_TARGET_X, DJINNI_AN … }Where btEffectRunDjinniEntrance's Djinni appears.
enumSPARK_GROUPS_MODE { SPARK_GROUPS_NOVA, SPARK_GROUPS_DYNAMITE, SPARK_GROUPS_RISIN … }Where btEffectRunSparkGroups' bursts go off.
enumCANVAS_WIPE_DIRECTION { CANVAS_WIPE_DOWN, CANVAS_WIPE_ACROSS }Which way btEffectWipeCanvas sweeps.
enumCANVAS_FILL { CANVAS_WIPE_FILL, CANVAS_WIPE_CLEAR }What btEffectWipeCanvas leaves behind it.
enumSUMMON_FORMATION { SUMMON_FORMATION_THOR, SUMMON_FORMATION_NEREID, SUMMON_FORMA … }The summons' sprite formations (btEffectPlaceFormationSprites and btEffectRunImpactBurst), each named for the summon that keeps it.
enumSPIN_AXIS { SPIN_YAW, SPIN_PITCH, SPIN_ROLL, SPIN_PITCH_AND_ROLL }The axis a swirling spark, mote or star turns about, which its index & 3 picks.
enumCAMERA_PHASE { CAMERA_PHASE_IDLE, CAMERA_PHASE_TICK_DONE, CAMERA_PHASE_HALF … }state->cameraPhase, which btCameraApplyPhasedDelta and the effects that turn the camera through it (Fire, Froth) pass between them.
enumBATTLE_EFFECT_ID_RANGE { EFFECT_RANGE_CASTING_IMPACT, EFFECT_RANGE_BEAM, EFFECT_RANGE … }Where each range of btEffectRunByIdRange's effect kinds starts: the casting impacts, the beams, and the ring and spark effect of critical hits.

Functions

NameDescription
static inline voidbtDMAStop (volatile Uint16 *channel)Stops a DMA channel and reads its control back, so the stop takes effect before the channel is set up again.

Description

What every part of the battle effect object shares: its includes, macros and tick-loop helpers.

Macros in detail

EFFECT_BLEND_ADD

#define EFFECT_BLEND_ADD BLEND_ALPHA(BLEND_WEIGHT_MAX, BLEND_WEIGHT_MAX)

The canvas added to the battle under it: both blend weights whole.

Referenced by btEffectRunBoreas(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunFire(), btEffectRunFlurry(), btEffectRunGaia(), btEffectRunGround(), btEffectRunJudgment(), btEffectRunJupiter(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunNeptune(), btEffectRunNereid(), btEffectRunOrbitingSkulls(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunRagnarok(), btEffectRunShatteringOpening(), btEffectRunSparkGroups(), btEffectRunStarfieldFall(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunThorn(), btEffectRunTitanBlade(), btEffectRunVenus(), btEffectRunVolcano(), btEffectRunWhirlwind() and btEffectStartElementStreaks().

Definition at line 48 of file battle_effect_internal.h.

EFFECT_BLEND_CANVAS

#define EFFECT_BLEND_CANVAS(level) BLEND_ALPHA(level, BLEND_WEIGHT_MAX)

The canvas at level sixteenths over the whole battle under it.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBladeRain(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunDjinniEntrance(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFlare(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunSpiderWeb(), btEffectRunStreakVolley(), btEffectRunThorn(), btEffectRunTorch(), btEffectRunWhirlwind(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 50 of file battle_effect_internal.h.

CANVAS_BLEND_LEVEL

#define CANVAS_BLEND_LEVEL 14

The canvas's usual weight over the battle, in sixteenths: every canvas opens with it.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunFlare(), btEffectRunKirin(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 53 of file battle_effect_internal.h.

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.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunShatteringOpening(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 61 of file battle_effect_internal.h.

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.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBoreas(), btEffectRunDouse(), btEffectRunIce(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunShatteringOpening(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 67 of file battle_effect_internal.h.

EFFECT_WINOUT

#define EFFECT_WINOUT (WINOUT_WIN01_BG0 | WINOUT_WIN01_CLR | WINOUT_WINOBJ_ALL)

Outside the battle view: BG0 and blending only.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunShatteringOpening(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 72 of file battle_effect_internal.h.

DMA_CONTROL_HALF

#define DMA_CONTROL_HALF 5

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

Referenced by btDMAStop().

Definition at line 75 of file battle_effect_internal.h.

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.

Referenced by btEffectRunBolt(), btEffectRunBreak(), btEffectRunDouse(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunGatheringLights(), btEffectRunJupiter(), btEffectRunLobbedShells(), btEffectRunMercury(), btEffectRunNereid(), btEffectRunRamses(), btEffectRunStarfieldFall() and btEffectRunVenus().

Definition at line 88 of file battle_effect_internal.h.

EFFECT_VIEW_FROM_CAMERA

#define EFFECT_VIEW_FROM_CAMERA(camera)

Starts a tick's 3D projection from the battle camera.

Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBreak(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGatheringLights(), btEffectRunGround(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunJudgment(), btEffectRunLobbedShells(), btEffectRunMoteFountain(), btEffectRunOrbitingSkulls(), btEffectRunPlanetDiver(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunSleep(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunSwirlingStars(), btEffectRunTargetBursts(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunUnusedOrbitingSpirals(), btEffectRunUnusedTriangleStrike(), btEffectRunVolcano() and btUnitProjectToScreen().

Definition at line 93 of file battle_effect_internal.h.

EFFECT_STRIKE_TARGET

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

Strikes target i: it flashes white in its damage pose and is knocked back by motion.

Referenced by btEffectRunGround(), btEffectRunJupiter(), btEffectRunMars(), btEffectRunMercury(), btEffectRunTargetStrike() and btEffectRunVenus().

Definition at line 98 of file battle_effect_internal.h.

EFFECT_SHOW_DAMAGE

#define EFFECT_SHOW_DAMAGE(hitSound) btPlaybackStartStub(hitSound)

Lets the battle show the damage, playing hitSound (0 keeps the one queued) as the targets react; a second use changes nothing.

Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDouse(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFrost(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGatheringLights(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunHelmSplitter(), btEffectRunIce(), btEffectRunJudgment(), btEffectRunJupiter(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunNereid(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRagnarok() and 23 more.

Definition at line 107 of file battle_effect_internal.h.

CANVAS_SIZE

#define CANVAS_SIZE 128

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

Referenced by btEffectDrawClippedCanvasLine(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunCastingImpact(), btEffectRunCybele(), btEffectRunDjinnBeams(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunHealingMotes(), btEffectRunMirroredWall(), btEffectRunShiningStar(), btEffectRunSleep(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunThor(), btEffectRunTorch(), btEffectRunUndeadSword(), btEffectRunUnusedTriangleStrike(), btEffectRunVine() and btEffectWipeCanvas().

Definition at line 111 of file battle_effect_internal.h.

CANVAS_BYTES

#define CANVAS_BYTES (CANVAS_SIZE * CANVAS_SIZE)

Referenced by btCastingImpactEndPrelude(), btEffectEndCanvasLayer(), btEffectEndElementStreaks(), btEffectOpenCanvasLayer(), btEffectRunAnnihilation(), btEffectRunBolt(), btEffectRunByIdRange(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDjinniEntrance(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFromTable(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunPlasma(), btEffectRunRay(), btEffectRunShatteringOpening(), btEffectRunSparkGroups(), btEffectRunStarfieldFall(), btEffectRunSummon(), btEffectRunThor(), btEffectRunTitanBlade(), btEffectRunWhirlwind(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks() and btEffectTransferCanvas().

Definition at line 112 of file battle_effect_internal.h.

CANVAS_TILES

#define CANVAS_TILES (CANVAS_SIZE / 8)

The canvas's rows and columns of 8x8 tiles.

Referenced by btEffectOpenCanvasLayer(), btEffectRunShatteringOpening(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer() and btEffectStartTiledCanvas().

Definition at line 114 of file battle_effect_internal.h.

CANVAS_PIXEL_OFFSET

#define CANVAS_PIXEL_OFFSET(x, y)

The byte of canvas pixel (x, y): the canvas is laid out in 8x8 tiles, row by row, each tile 64 bytes row by row.

Referenced by btEffectDrawClippedCanvasLine(), btEffectRunCybele(), btEffectRunStarfieldFall() and btEffectWipeCanvas().

Definition at line 117 of file battle_effect_internal.h.

BACKGROUND_PIXEL_OFFSET

#define BACKGROUND_PIXEL_OFFSET(x, y)

The byte of pixel (x, y) of the battle background: 8x8 tiles of 256 colours, 64 bytes each, 32 to a row, from BG_CHAR_BLOCK(2).

Referenced by btEffectConvertBackgroundToBlueRamp() and btEffectRunQuake().

Definition at line 121 of file battle_effect_internal.h.

BATTLE_VIEW_TOP

#define BATTLE_VIEW_TOP 16

The battle view, under the top window and over the menus: screen lines 16 to 135.

Referenced by btEffectRunRamses() and btEffectRunStarfieldFall().

Definition at line 126 of file battle_effect_internal.h.

BATTLE_VIEW_HEIGHT

#define BATTLE_VIEW_HEIGHT 120

Referenced by btEffectRunBoreas(), btEffectRunCybele() and btEffectRunVolcano().

Definition at line 127 of file battle_effect_internal.h.

BATTLE_VIEW_BOTTOM

#define BATTLE_VIEW_BOTTOM (BATTLE_VIEW_TOP + BATTLE_VIEW_HEIGHT)

Referenced by btEffectRunRamses() and btEffectRunStarfieldFall().

Definition at line 128 of file battle_effect_internal.h.

NARROW_CANVAS_PARTY_X

#define NARROW_CANVAS_PARTY_X (DISPLAY_WIDTH - CANVAS_SIZE)

How far right the narrow canvas is set to show over the party: against the screen's right edge.

Referenced by btEffectRunCurse(), btEffectRunDjinnBeams(), btEffectRunFrost(), btEffectRunGrowingColumns(), btEffectRunOrbitingSkulls(), btEffectRunQuake(), btEffectRunSleep(), btEffectRunStatReduction(), btEffectRunThorn() and btEffectRunUnusedOrbitingSpirals().

Definition at line 132 of file battle_effect_internal.h.

SUMMON_PROJECTION_CENTER_Y

#define SUMMON_PROJECTION_CENTER_Y 240

Where Atalanta and Boreas centre the projection while their formations fly, lower than the battle's BATTLE_PROJECTION_CENTER_Y.

Referenced by btEffectRunAtalanta(), btEffectRunBoreas(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunStarfieldFall() and btEffectRunThor().

Definition at line 136 of file battle_effect_internal.h.

BACKGROUND_DARKEN_TICKS

#define BACKGROUND_DARKEN_TICKS 24

The ticks the battle background darkens behind an effect's canvas (state->fadeFrame, btEffectDarkenBackgroundStep).

Referenced by btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunDjinniEntrance(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunJudgment(), btEffectRunNeptune(), btEffectRunRamses() and btEffectStartElementStreaks().

Definition at line 140 of file battle_effect_internal.h.

BACKGROUND_DARKENED_LEVEL

#define BACKGROUND_DARKENED_LEVEL BACKGROUND_DARKEN_TICKS

The level a canvas darkens the battle background to, a level a tick.

Referenced by btEffectEndCanvasLayer(), btEffectRunCondemn() and btEffectSetupBlendedDisplay().

Definition at line 142 of file battle_effect_internal.h.

SHEET_PALETTE_COLORS

#define SHEET_PALETTE_COLORS 64

A sprite sheet resource opens with its 64 colours, ahead of its compressed pictures.

Referenced by btEffectRunBurstShower(), btEffectRunCybele(), btEffectRunEruption(), btEffectRunGaia(), btEffectRunJudgment(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectStepPaletteToResource() and btPaletteBrightenBgEntries().

Definition at line 146 of file battle_effect_internal.h.

SHEET_PALETTE_BYTES

#define SHEET_PALETTE_BYTES (SHEET_PALETTE_COLORS * 2)

Referenced by btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunDjinnBeams(), btEffectRunDjinniEntrance(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGatheringLights(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunJudgment(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNereid(), btEffectRunOrbitingSkulls(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunSparkGroups(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunSwirlSwipe(), btEffectRunTargetBursts(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunUnusedOrbitingSpirals(), btEffectRunUnusedTriangleStrike(), btEffectRunVolcano(), btEffectRunWhirlwind(), btEffectStartElementStreaks(), btEffectStepPaletteToResource() and 1 more.

Definition at line 147 of file battle_effect_internal.h.

PARTICLE_DAMPING_NONE

#define PARTICLE_DAMPING_NONE DAMPING_SCALE

btParticleAdvanceWithGravity3D's and 2D's damping that keeps a particle's whole speed.

Referenced by btEffectRunBoreas(), btEffectRunCybele(), btEffectRunEruption(), btEffectRunImpactBurst(), btEffectRunMars(), btEffectRunPrism(), btEffectRunRagnarok(), btEffectRunShatteringOpening(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStreakVolley() and btEffectRunTitanBlade().

Definition at line 151 of file battle_effect_internal.h.

EFFECT_START_NARROW_CANVAS

#define EFFECT_START_NARROW_CANVAS(bgControl)

Opens the canvas layer at the canvas's own width.

Referenced by btEffectRunAtalanta(), btEffectRunBladeRain(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDouse(), btEffectRunFrost(), btEffectRunHelmSplitter(), btEffectRunIce(), btEffectRunJudgment(), btEffectRunOrbitingSkulls(), btEffectRunSleep(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStatReduction(), btEffectRunSwirlSwipe(), btEffectRunThor(), btEffectRunUndeadSword(), btEffectRunUnusedOrbitingSpirals() and btEffectRunUnusedTriangleStrike().

Definition at line 154 of file battle_effect_internal.h.

EFFECT_LOAD_BLITTER

#define EFFECT_LOAD_BLITTER(slot, flags, mode)

Builds a blitter for the 128x128 canvas (its width and height given to btEffectBuildBlitter as powers of two) in heap slot slot, for one clip, mirror and blend mode.

Referenced by btEffectBuildCanvasBlitters(), btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinniEntrance(), btEffectRunDouse(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHaunt(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunOrbitingSkulls(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRamses(), btEffectRunRay() and 24 more.

Definition at line 160 of file battle_effect_internal.h.

EFFECT_BLITTER

#define EFFECT_BLITTER(slot) ((DRAW_RECTANGLE)HeapSlots[slot])

The blitter built in heap slot slot.

Referenced by btEffectBuildCanvasBlitters(), btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinniEntrance(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHaunt(), btEffectRunIce(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunOrbitingSkulls(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRamses(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShatteringOpening(), btEffectRunShiningStar(), btEffectRunSleep(), btEffectRunSparkGroups(), btEffectRunSpire() and 13 more.

Definition at line 164 of file battle_effect_internal.h.

EFFECT_SET_TRANSFER

#define EFFECT_SET_TRANSFER(state, mode, value)

Sets what the canvas transfer leaves in the canvas after each copy.

Referenced by btEffectRunAnnihilation(), btEffectRunAtalanta(), btEffectRunBoreas(), btEffectRunBurstShower(), btEffectRunCriticalHit(), btEffectRunDouse(), btEffectRunDragonFire(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunOrbitingSkulls(), btEffectRunPrism(), btEffectRunProjectileVolley(), btEffectRunRamses(), btEffectRunStarfieldFall() and btEffectRunThor().

Definition at line 167 of file battle_effect_internal.h.

EFFECT_START_TRANSFER

#define EFFECT_START_TRANSFER(state, mode, value)

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

Referenced by btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBreak(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFrost(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGatheringLights(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHaunt(), btEffectRunHelmSplitter(), btEffectRunImpactBurst(), btEffectRunJupiter(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNereid(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProcne(), btEffectRunQuake(), btEffectRunRagnarok(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShatteringOpening(), btEffectRunSleep(), btEffectRunSparkGroups(), btEffectRunSpiderWeb(), btEffectRunSpire() and 17 more.

Definition at line 171 of file battle_effect_internal.h.

EFFECT_PRESENT_CANVAS

#define EFFECT_PRESENT_CANVAS(state) ((state)->transferPending = 1, sySynch(1))

Presents the canvas and waits for the next tick.

Referenced by btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBoreas(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCurse(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunFrost(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunNereid(), btEffectRunOrbitingSkulls(), btEffectRunSleep(), btEffectRunStarfieldFall(), btEffectRunStatReduction(), btEffectRunSwirlingStars(), btEffectRunTargetBursts(), btEffectRunThor(), btEffectRunUnusedOrbitingSpirals(), btEffectRunUnusedTriangleStrike() and btEffectWipeCanvas().

Definition at line 176 of file battle_effect_internal.h.

EFFECT_END_TICK

#define EFFECT_END_TICK(state)

The usual end of an effect's tick: counts down the targets' flash timers, then presents the canvas.

Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBreak(), btEffectRunCastingImpact(), btEffectRunCybele(), btEffectRunDouse(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGatheringLights(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunHelmSplitter(), btEffectRunJupiter(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRagnarok(), btEffectRunRamses(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShatteringOpening(), btEffectRunShiningStar(), btEffectRunSparkGroups(), btEffectRunSpiderWeb() and 14 more.

Definition at line 180 of file battle_effect_internal.h.

EFFECT_RELEASE_BLITTERS

#define EFFECT_RELEASE_BLITTERS()

Frees the two blitters, the alternate first.

Referenced by btCastingImpactEndPrelude(), btEffectRunAnnihilation(), btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunBoreas(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDjinnBeams(), btEffectRunDjinniEntrance(), btEffectRunDragonFire(), btEffectRunFire(), btEffectRunFlurry(), btEffectRunFrost(), btEffectRunGaia(), btEffectRunGatheringLights(), btEffectRunHaunt(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunNereid(), btEffectRunShatteringOpening(), btEffectRunStatBoost(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunUndeadSword(), btEffectRunUnusedOrbitingSpirals(), btEffectRunUnusedTriangleStrike(), btEffectRunVolcano() and btEffectRunWhirlwind().

Definition at line 184 of file battle_effect_internal.h.

EFFECT_FINISH_CANVAS

#define EFFECT_FINISH_CANVAS()

The usual end of a canvas effect: the transfer, the blitters, then the canvas layer.

Referenced by btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunBladeRain(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunDjinnHeal(), btEffectRunDouse(), btEffectRunDragonCloud(), btEffectRunFroth(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHealingMotes(), btEffectRunHelmSplitter(), btEffectRunJupiter(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMirroredWall(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProcne(), btEffectRunRagnarok(), btEffectRunRamses(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunSleep(), btEffectRunSparkGroups(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunSwirlingStars(), btEffectRunTargetBursts(), btEffectRunThorn(), btEffectRunTitanBlade(), btEffectRunTorch(), btEffectRunVenus() and btEffectRunVine().

Definition at line 190 of file battle_effect_internal.h.

EFFECT_FINISH_CANVAS_ONE_BLITTER

#define EFFECT_FINISH_CANVAS_ONE_BLITTER()

The same for an effect that drew through one blitter.

Referenced by btEffectRunBolt(), btEffectRunBreak(), btEffectRunCurse(), btEffectRunDeathPlunge(), btEffectRunDrain(), btEffectRunEruption(), btEffectRunGround(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunOrbitingSkulls(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunSpire() and btEffectRunSwirlSwipe().

Definition at line 196 of file battle_effect_internal.h.

PICTURE_BYTES

#define PICTURE_BYTES(name) (name##_WIDTH * name##_HEIGHT)

The bytes of a sprite sheet picture, one byte a pixel, from its name's _WIDTH and _HEIGHT.

Referenced by btEffectRunAnnihilation(), btEffectRunAttackSlash(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGatheringLights(), btEffectRunHaunt(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunLobbedShells(), btEffectRunMars(), btEffectRunNeptune(), btEffectRunOrbitingSkulls(), btEffectRunPlanetDiver(), btEffectRunProjectileVolley(), btEffectRunRagnarok(), btEffectRunShatteringOpening(), btEffectRunSleep(), btEffectRunSparkGroups(), btEffectRunStatBoost(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunTargetBursts(), btEffectRunTargetMotes(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunTitanBlade(), btEffectRunUnusedOrbitingSpirals() and btEffectRunVine().

Definition at line 203 of file battle_effect_internal.h.

EFFECT_DRAW_PICTURE

#define EFFECT_DRAW_PICTURE(draw, canvas, sheet, name, x, y)

Draws picture name of sheet at its own size, its top left at (x, y).

Referenced by btEffectRunAtalanta(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunJudgment(), btEffectRunProjectileVolley() and btEffectRunThor().

Definition at line 206 of file battle_effect_internal.h.

MOTE_SET_BYTES

#define MOTE_SET_BYTES 770

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

Referenced by btEffectRunEruption(), btEffectRunFromTable(), btEffectRunJudgment(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunSummon(), btEffectRunSwirlingStars() and btEffectRunThor().

Definition at line 210 of file battle_effect_internal.h.

DIMMED_COPIES

#define DIMMED_COPIES 8

A picture's dimmed copies: DIMMED_COPIES of it, copy i with every level capped at DIMMED_COPY_CAP(i), 7 levels lower than the copy before, copy 0 not at all. Thor's ring and Judgment's darken through copies of the mote pictures, a stat reduction's shards through copies of the shard.

Referenced by btEffectRunJudgment(), btEffectRunStatReduction() and btEffectRunThor().

Definition at line 215 of file battle_effect_internal.h.

DIMMED_COPY_CAP

#define DIMMED_COPY_CAP(copy) (CANVAS_LEVEL_BRIGHTEST + 1 - (copy) * 7)

Referenced by btEffectRunJudgment(), btEffectRunStatReduction() and btEffectRunThor().

Definition at line 216 of file battle_effect_internal.h.

GLINT_SET_BYTES

#define GLINT_SET_BYTES

The bytes of the six glint pictures that open the tornado sprite sheet.

Referenced by btEffectRunCastingImpact().

Definition at line 219 of file battle_effect_internal.h.

EFFECT_DRAW_MOTE

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

Draws mote picture size (1 to MOTE_SIZE_MAX: size pixels wide, twice that tall), centred across x and standing on y.

Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunBolt(), btEffectRunBreak(), btEffectRunCastingImpact(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDrain(), btEffectRunFire(), btEffectRunFlurry(), btEffectRunGaia(), btEffectRunHealingMotes(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunJupiter(), btEffectRunKirin(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunNereid(), btEffectRunPlanetDiver(), btEffectRunPlasma(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunRamses(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunSparkGroups(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunTitanBlade(), btEffectRunVenus() and btEffectRunVolcano().

Definition at line 224 of file battle_effect_internal.h.

MOTE_SIZE_MAX

#define MOTE_SIZE_MAX 10

The largest of the ten mote pictures.

Referenced by btEffectRunAstralBlast(), btEffectRunFire(), btEffectRunJudgment() and btEffectRunKirin().

Definition at line 232 of file battle_effect_internal.h.

MOTE_DEPTH_NEAR

#define MOTE_DEPTH_NEAR 160

A mote sized by its depth is drawn one size smaller for every MOTE_DEPTH_STEP past MOTE_DEPTH_NEAR, its depth held between MOTE_DEPTH_NEAR and MOTE_DEPTH_FAR.

Referenced by btEffectRunDragonCloud(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFroth() and btEffectRunStarfieldFall().

Definition at line 236 of file battle_effect_internal.h.

MOTE_DEPTH_FAR

#define MOTE_DEPTH_FAR 799

Referenced by btEffectRunDragonCloud(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFroth() and btEffectRunStarfieldFall().

Definition at line 237 of file battle_effect_internal.h.

MOTE_DEPTH_STEP

#define MOTE_DEPTH_STEP 64

Referenced by btEffectRunDragonCloud(), btEffectRunEruption(), btEffectRunFire() and btEffectRunStarfieldFall().

Definition at line 238 of file battle_effect_internal.h.

EFFECT_DRAW_FLARE

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

Draws flare picture size, a square, centred on (x, y).

Referenced by btEffectRunAttackSlash(), btEffectRunBind(), btEffectRunCriticalHit(), btEffectRunDouse(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunNeptune(), btEffectRunStatBoost() and btEffectRunUnusedTriangleStrike().

Definition at line 241 of file battle_effect_internal.h.

EFFECT_SWELL_MOTE

#define EFFECT_SWELL_MOTE(size, tick)

Swells a falling mote as the drops clear (Nereid's drops, Titan Blade's dust).

Referenced by btEffectRunNereid() and btEffectRunTitanBlade().

Definition at line 251 of file battle_effect_internal.h.

EFFECT_FALL_MOTE

#define EFFECT_FALL_MOTE(velocityY, gravity, tick)

A falling mote's vertical speed: it falls under gravity, then from tick 80 rises.

Referenced by btEffectRunNereid() and btEffectRunTitanBlade().

Definition at line 260 of file battle_effect_internal.h.

EFFECT_SHOW_WIDE_CANVAS

#define EFFECT_SHOW_WIDE_CANVAS(top)

Shows the canvas stretched to twice its width, top sixteenths of its colour added over what lies under it.

Referenced by btEffectRunAtalanta(), btEffectRunBoreas(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunRamses() and btEffectRunThor().

Definition at line 265 of file battle_effect_internal.h.

WINDOW_SPAN_INVERTED

#define WINDOW_SPAN_INVERTED WIN_RANGE(1, 0)

A WIN0H value whose left edge is past its right edge, written only on lines outside window 0.

Definition at line 273 of file battle_effect_internal.h.

BATTLE_BACKGROUND_WIDTH

#define BATTLE_BACKGROUND_WIDTH 256

The battle background's image as BG1 shows it from BG character block 2, one byte a pixel.

Referenced by btEffectConvertBackgroundToBlueRamp(), btEffectRunShatteringOpening() and btEffectRunStarfieldFall().

Definition at line 277 of file battle_effect_internal.h.

BATTLE_BACKGROUND_HEIGHT

#define BATTLE_BACKGROUND_HEIGHT 120

Referenced by btEffectConvertBackgroundToBlueRamp() and btEffectRunShatteringOpening().

Definition at line 278 of file battle_effect_internal.h.

BATTLE_BACKGROUND_BYTES

#define BATTLE_BACKGROUND_BYTES

Referenced by btEffectConvertBackgroundToBlueRamp(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall() and btEffectTransferFullScreenImage().

Definition at line 279 of file battle_effect_internal.h.

WINDOW_EDGE_RIGHT

#define WINDOW_EDGE_RIGHT ((Uint16 *)RamMapGridMetatileBuffer)

RamMapGridMetatileBuffer as btEffectBuildWindowEdgeTable reads it: window 0's right edge, how far each of its lines is set in from that edge, and the right edge it builds for every screen line.

Referenced by btEffectBuildWindowEdgeTable(), btEffectRunBoreas() and btEffectRunNeptune().

Definition at line 285 of file battle_effect_internal.h.

WINDOW_EDGE_INSETS

#define WINDOW_EDGE_INSETS (RamMapGridMetatileBuffer + 2)

Referenced by btEffectBuildWindowEdgeTable(), btEffectRunBoreas() and btEffectRunNeptune().

Definition at line 286 of file battle_effect_internal.h.

WINDOW_EDGE_INSET_LINES

#define WINDOW_EDGE_INSET_LINES 128

Referenced by btEffectBuildWindowEdgeTable(), btEffectRunBoreas() and btEffectRunNeptune().

Definition at line 287 of file battle_effect_internal.h.

WINDOW_EDGE_LINES

#define WINDOW_EDGE_LINES (WINDOW_EDGE_INSETS + WINDOW_EDGE_INSET_LINES)

Referenced by btEffectBuildWindowEdgeTable().

Definition at line 288 of file battle_effect_internal.h.

BLUE_RAMP_PIXELS

#define BLUE_RAMP_PIXELS RamMapGridMetatileBuffer

RamMapGridMetatileBuffer as the unused blue ramp uses it: a working copy of the battle background's image.

Referenced by btEffectConvertBackgroundToBlueRamp().

Definition at line 292 of file battle_effect_internal.h.

EFFECT_CAP_LEVEL

#define EFFECT_CAP_LEVEL(level, cap)

Caps a colour level at cap, and at 0 from below.

Referenced by btEffectRunJudgment(), btEffectRunStatReduction() and btEffectRunThor().

Definition at line 295 of file battle_effect_internal.h.

REAPER_SHEET_RAISED_WIDTH

#define REAPER_SHEET_RAISED_WIDTH 57

The reaper in ReaperSheet, which Condemn and Mortal Danger decode: the reaper with its scythe raised, then swung, then the red crescent the swing leaves.

Referenced by btEffectRunCastingImpact() and btEffectRunCondemn().

Definition at line 305 of file battle_effect_internal.h.

REAPER_SHEET_RAISED_HEIGHT

#define REAPER_SHEET_RAISED_HEIGHT 98

Referenced by btEffectRunCastingImpact() and btEffectRunCondemn().

Definition at line 306 of file battle_effect_internal.h.

REAPER_SHEET_SWUNG_WIDTH

#define REAPER_SHEET_SWUNG_WIDTH 99

Definition at line 307 of file battle_effect_internal.h.

REAPER_SHEET_SWUNG_HEIGHT

#define REAPER_SHEET_SWUNG_HEIGHT 69

Definition at line 308 of file battle_effect_internal.h.

REAPER_SHEET_CRESCENT_WIDTH

#define REAPER_SHEET_CRESCENT_WIDTH 128

Definition at line 309 of file battle_effect_internal.h.

REAPER_SHEET_CRESCENT_HEIGHT

#define REAPER_SHEET_CRESCENT_HEIGHT 91

Definition at line 310 of file battle_effect_internal.h.

RED_CRESCENT_FADE_A_WIDTH

#define RED_CRESCENT_FADE_A_WIDTH 128

RedCrescentSheetA: the swing's crescent fading in four pictures.

Definition at line 323 of file battle_effect_internal.h.

RED_CRESCENT_FADE_A_HEIGHT

#define RED_CRESCENT_FADE_A_HEIGHT 91

Definition at line 324 of file battle_effect_internal.h.

RED_CRESCENT_FADE_B_WIDTH

#define RED_CRESCENT_FADE_B_WIDTH 128

Definition at line 325 of file battle_effect_internal.h.

RED_CRESCENT_FADE_B_HEIGHT

#define RED_CRESCENT_FADE_B_HEIGHT 59

Definition at line 326 of file battle_effect_internal.h.

RED_CRESCENT_FADE_C_WIDTH

#define RED_CRESCENT_FADE_C_WIDTH 122

Definition at line 327 of file battle_effect_internal.h.

RED_CRESCENT_FADE_C_HEIGHT

#define RED_CRESCENT_FADE_C_HEIGHT 29

Definition at line 328 of file battle_effect_internal.h.

RED_CRESCENT_FADE_D_WIDTH

#define RED_CRESCENT_FADE_D_WIDTH 76

Definition at line 329 of file battle_effect_internal.h.

RED_CRESCENT_FADE_D_HEIGHT

#define RED_CRESCENT_FADE_D_HEIGHT 25

Definition at line 330 of file battle_effect_internal.h.

LIGHTNING_BOLT_WIDTH

#define LIGHTNING_BOLT_WIDTH 24

Closing bolts and lightning columns use the same 24x120 pictures.

Referenced by btEffectRunBolt(), btEffectRunCastingImpact() and btEffectRunRay().

Definition at line 346 of file battle_effect_internal.h.

LIGHTNING_BOLT_HEIGHT

#define LIGHTNING_BOLT_HEIGHT 120

Referenced by btEffectRunRay().

Definition at line 347 of file battle_effect_internal.h.

LIGHTNING_BOLT_PICTURE_BYTES

#define LIGHTNING_BOLT_PICTURE_BYTES PICTURE_BYTES(LIGHTNING_BOLT)

Referenced by btEffectRunBolt(), btEffectRunCastingImpact() and btEffectRunRay().

Definition at line 348 of file battle_effect_internal.h.

BLUE_FLAME_COLUMN_WIDTH

#define BLUE_FLAME_COLUMN_WIDTH 17

BlueFlameSheet: the column of flame, then the flame that splashes from it, twice its width.

Referenced by btEffectRunCastingImpact(), btEffectRunMercury() and btEffectRunNeptune().

Definition at line 352 of file battle_effect_internal.h.

BLUE_FLAME_COLUMN_HEIGHT

#define BLUE_FLAME_COLUMN_HEIGHT 104

Referenced by btEffectRunCastingImpact(), btEffectRunMercury() and btEffectRunNeptune().

Definition at line 353 of file battle_effect_internal.h.

BLUE_FLAME_SPLASH_WIDTH

#define BLUE_FLAME_SPLASH_WIDTH 34

Referenced by btEffectRunCastingImpact(), btEffectRunMercury(), btEffectRunNeptune() and btEffectRunVenus().

Definition at line 354 of file battle_effect_internal.h.

BLUE_FLAME_SPLASH_HEIGHT

#define BLUE_FLAME_SPLASH_HEIGHT 65

Referenced by btEffectRunCastingImpact(), btEffectRunMercury(), btEffectRunNeptune() and btEffectRunVenus().

Definition at line 355 of file battle_effect_internal.h.

WAVE_WIDTH

#define WAVE_WIDTH 48

WaveSheet's six pictures, BlueArcSheetA and B's six, and YellowOrbSheet's.

Referenced by btEffectRunAttackSlash() and btEffectRunFlurry().

Definition at line 357 of file battle_effect_internal.h.

WAVE_HEIGHT

#define WAVE_HEIGHT 16

Referenced by btEffectRunAttackSlash() and btEffectRunFlurry().

Definition at line 358 of file battle_effect_internal.h.

BLUE_ARC_WIDTH

#define BLUE_ARC_WIDTH 48

Referenced by btEffectRunAttackSlash() and btEffectRunFlurry().

Definition at line 359 of file battle_effect_internal.h.

BLUE_ARC_HEIGHT

#define BLUE_ARC_HEIGHT 72

Referenced by btEffectRunAttackSlash() and btEffectRunFlurry().

Definition at line 360 of file battle_effect_internal.h.

YELLOW_ORB_WIDTH

#define YELLOW_ORB_WIDTH 40

Referenced by btEffectPackYellowOrbs(), btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunFlurry() and btEffectRunRushingStrike().

Definition at line 361 of file battle_effect_internal.h.

YELLOW_ORB_HEIGHT

#define YELLOW_ORB_HEIGHT 48

Referenced by btEffectPackYellowOrbs(), btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunFlurry() and btEffectRunRushingStrike().

Definition at line 362 of file battle_effect_internal.h.

YELLOW_ORB_PACKED_WIDTH

#define YELLOW_ORB_PACKED_WIDTH (YELLOW_ORB_WIDTH / 2)

The yellow orb as btEffectPackYellowOrbs packs it, every second byte.

Referenced by btEffectRunCastingImpact(), btEffectRunFlurry() and btEffectRunRushingStrike().

Definition at line 364 of file battle_effect_internal.h.

YELLOW_ORB_PACKED_HEIGHT

#define YELLOW_ORB_PACKED_HEIGHT YELLOW_ORB_HEIGHT

Referenced by btEffectRunCastingImpact(), btEffectRunFlurry() and btEffectRunRushingStrike().

Definition at line 365 of file battle_effect_internal.h.

YELLOW_ORB_PICTURES

#define YELLOW_ORB_PICTURES 6

Referenced by btEffectPackYellowOrbs(), btEffectRunCastingImpact(), btEffectRunFlurry() and btEffectRunRushingStrike().

Definition at line 366 of file battle_effect_internal.h.

SLASH_PICTURE_SIZE

#define SLASH_PICTURE_SIZE 120

The slash pictures as wide and tall as the canvas's view: StarBurstSheet's, CrescentSheet's and the reveal masks.

Referenced by btEffectRunCriticalHit() and btEffectRunFlashingStrike().

Definition at line 369 of file battle_effect_internal.h.

FIRE_STREAK_WIDTH

#define FIRE_STREAK_WIDTH 48

FireStreakSheet's six pictures and FireBurstSheet's.

Referenced by btEffectRunAnnihilation() and btEffectRunCastingImpact().

Definition at line 372 of file battle_effect_internal.h.

FIRE_STREAK_HEIGHT

#define FIRE_STREAK_HEIGHT 72

Referenced by btEffectRunAnnihilation() and btEffectRunCastingImpact().

Definition at line 373 of file battle_effect_internal.h.

FIRE_BURST_WIDTH

#define FIRE_BURST_WIDTH 40

Referenced by btEffectRunAnnihilation().

Definition at line 374 of file battle_effect_internal.h.

FIRE_BURST_HEIGHT

#define FIRE_BURST_HEIGHT 80

Referenced by btEffectRunAnnihilation().

Definition at line 375 of file battle_effect_internal.h.

MERCURY_SMALL_DJINNI_HEIGHT

#define MERCURY_SMALL_DJINNI_HEIGHT 34

The small Djinn sprite sheets' pictures are SMALL_DJINNI_WIDTH wide; Mercury's and Venus's are shorter than SMALL_DJINNI_HEIGHT.

Referenced by btEffectRunDjinnHeal() and btEffectRunMercury().

Definition at line 378 of file battle_effect_internal.h.

VENUS_SMALL_DJINNI_HEIGHT

#define VENUS_SMALL_DJINNI_HEIGHT 38

Referenced by btEffectRunVenus().

Definition at line 379 of file battle_effect_internal.h.

FIRE_BLOB_WIDTH

#define FIRE_BLOB_WIDTH 48

FireBlobSheet's blobs and CrystalSheet's crystal.

Referenced by btEffectRunKirin().

Definition at line 381 of file battle_effect_internal.h.

FIRE_BLOB_HEIGHT

#define FIRE_BLOB_HEIGHT 32

Referenced by btEffectRunKirin().

Definition at line 382 of file battle_effect_internal.h.

CRYSTAL_WIDTH

#define CRYSTAL_WIDTH 32

Referenced by btEffectRunPrism().

Definition at line 383 of file battle_effect_internal.h.

CRYSTAL_HEIGHT

#define CRYSTAL_HEIGHT 64

Referenced by btEffectRunPrism().

Definition at line 384 of file battle_effect_internal.h.

LIGHTNING_PILLAR_WIDTH

#define LIGHTNING_PILLAR_WIDTH 48

LightningPillarSheet's pillar, in two pictures.

Referenced by btEffectRunPlasma() and btEffectRunThor().

Definition at line 387 of file battle_effect_internal.h.

LIGHTNING_PILLAR_HEIGHT

#define LIGHTNING_PILLAR_HEIGHT 112

Referenced by btEffectRunPlasma() and btEffectRunThor().

Definition at line 388 of file battle_effect_internal.h.

FIRE_PILLAR_WIDTH

#define FIRE_PILLAR_WIDTH 34

FirePillarSheetA: the pillar of fire, then two flames.

Referenced by btEffectRunNereid(), btEffectRunTitanBlade() and btEffectRunVolcano().

Definition at line 390 of file battle_effect_internal.h.

FIRE_PILLAR_HEIGHT

#define FIRE_PILLAR_HEIGHT 104

Referenced by btEffectRunNereid(), btEffectRunTitanBlade() and btEffectRunVolcano().

Definition at line 391 of file battle_effect_internal.h.

FIRE_PILLAR_FLAME_WIDTH

#define FIRE_PILLAR_FLAME_WIDTH 20

Referenced by btEffectRunVolcano().

Definition at line 392 of file battle_effect_internal.h.

FIRE_PILLAR_FLAME_HEIGHT

#define FIRE_PILLAR_FLAME_HEIGHT 37

Referenced by btEffectRunVolcano().

Definition at line 393 of file battle_effect_internal.h.

SPIRAL_WIDTH

#define SPIRAL_WIDTH 32

SpiralSheet's pictures.

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 395 of file battle_effect_internal.h.

SPIRAL_HEIGHT

#define SPIRAL_HEIGHT 32

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 396 of file battle_effect_internal.h.

FLAMEBALL_WIDTH

#define FLAMEBALL_WIDTH 40

FlameballSheet and FireballSheet's pictures.

Referenced by btEffectRunJupiter(), btEffectRunPlanetDiver() and btEffectRunProjectileVolley().

Definition at line 399 of file battle_effect_internal.h.

FLAMEBALL_HEIGHT

#define FLAMEBALL_HEIGHT 64

Referenced by btEffectRunJupiter(), btEffectRunPlanetDiver() and btEffectRunProjectileVolley().

Definition at line 400 of file battle_effect_internal.h.

RUNE_HALF_WIDTH

#define RUNE_HALF_WIDTH 24

Each half of RuneSheet's rune, the second drawn mirrored.

Referenced by btEffectRunBind(), btEffectRunCastingImpact() and btEffectRunUnusedTriangleStrike().

Definition at line 403 of file battle_effect_internal.h.

RUNE_HALF_HEIGHT

#define RUNE_HALF_HEIGHT 48

Referenced by btEffectRunBind(), btEffectRunCastingImpact() and btEffectRunUnusedTriangleStrike().

Definition at line 404 of file battle_effect_internal.h.

DJINNI_WIDTH

#define DJINNI_WIDTH 40

A Djinni's picture: each frame of the full Djinn sprite sheets (VenusDjinnSheet and its kind), and the one picture of the small sprite sheets.

Referenced by btEffectRunBind(), btEffectRunDjinnBeams(), btEffectRunHealingMotes() and btEffectRunStatBoost().

Definition at line 409 of file battle_effect_internal.h.

DJINNI_HEIGHT

#define DJINNI_HEIGHT 40

Referenced by btEffectRunBind(), btEffectRunDjinnBeams(), btEffectRunHealingMotes() and btEffectRunStatBoost().

Definition at line 410 of file battle_effect_internal.h.

SMALL_DJINNI_WIDTH

#define SMALL_DJINNI_WIDTH 20

Referenced by btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunGround(), btEffectRunHail(), btEffectRunHealingMotes(), btEffectRunJupiter(), btEffectRunMars(), btEffectRunMercury(), btEffectRunProjectileVolley() and btEffectRunVenus().

Definition at line 411 of file battle_effect_internal.h.

SMALL_DJINNI_HEIGHT

#define SMALL_DJINNI_HEIGHT 40

Referenced by btEffectRunDjinniEntrance(), btEffectRunGround(), btEffectRunHail(), btEffectRunHealingMotes(), btEffectRunJupiter(), btEffectRunMars() and btEffectRunProjectileVolley().

Definition at line 412 of file battle_effect_internal.h.

SMOKE_PUFF_WIDTH

#define SMOKE_PUFF_WIDTH 24

The pictures of the sprite sheets several effects share, each sprite sheet's pictures all one size: SmokeSheet's puffs, FlashBurstSheet's bursts, SkullSheet's skulls and the tornado strips after TornadoSheet's glints.

Referenced by btEffectRunCastingImpact(), btEffectRunLobbedShells(), btEffectRunTargetBursts(), btEffectRunTargetMotes() and btEffectRunTargetStrike().

Definition at line 417 of file battle_effect_internal.h.

SMOKE_PUFF_HEIGHT

#define SMOKE_PUFF_HEIGHT 48

Referenced by btEffectRunCastingImpact(), btEffectRunLobbedShells(), btEffectRunTargetBursts(), btEffectRunTargetMotes() and btEffectRunTargetStrike().

Definition at line 418 of file battle_effect_internal.h.

FLASH_BURST_WIDTH

#define FLASH_BURST_WIDTH 32

Referenced by btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunDeathPlunge(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunPlanetDiver(), btEffectRunRagnarok(), btEffectRunShatteringOpening(), btEffectRunSparkGroups() and btEffectRunTitanBlade().

Definition at line 419 of file battle_effect_internal.h.

FLASH_BURST_HEIGHT

#define FLASH_BURST_HEIGHT 64

Referenced by btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunDeathPlunge(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunPlanetDiver(), btEffectRunRagnarok(), btEffectRunShatteringOpening(), btEffectRunSparkGroups() and btEffectRunTitanBlade().

Definition at line 420 of file battle_effect_internal.h.

SKULL_WIDTH

#define SKULL_WIDTH 24

Referenced by btEffectRunCastingImpact(), btEffectRunHaunt() and btEffectRunOrbitingSkulls().

Definition at line 421 of file battle_effect_internal.h.

SKULL_HEIGHT

#define SKULL_HEIGHT 24

Referenced by btEffectRunCastingImpact(), btEffectRunHaunt() and btEffectRunOrbitingSkulls().

Definition at line 422 of file battle_effect_internal.h.

TORNADO_STRIP_WIDTH

#define TORNADO_STRIP_WIDTH 40

Referenced by btEffectRunCastingImpact() and btEffectRunWhirlwind().

Definition at line 423 of file battle_effect_internal.h.

TORNADO_STRIP_HEIGHT

#define TORNADO_STRIP_HEIGHT 32

Referenced by btEffectRunCastingImpact() and btEffectRunWhirlwind().

Definition at line 424 of file battle_effect_internal.h.

DAGGER_WIDTH

#define DAGGER_WIDTH 24

The pictures of DaggerSheet, ShieldSheet, GlowOrbSheet, VioletStreakSheet and WispSheet.

Referenced by btEffectRunStatBoost() and btEffectRunStatReduction().

Definition at line 427 of file battle_effect_internal.h.

DAGGER_HEIGHT

#define DAGGER_HEIGHT 40

Referenced by btEffectRunStatBoost() and btEffectRunStatReduction().

Definition at line 428 of file battle_effect_internal.h.

SHIELD_WIDTH

#define SHIELD_WIDTH 40

Referenced by btEffectRunStatBoost() and btEffectRunStatReduction().

Definition at line 429 of file battle_effect_internal.h.

SHIELD_HEIGHT

#define SHIELD_HEIGHT 40

Referenced by btEffectRunStatBoost() and btEffectRunStatReduction().

Definition at line 430 of file battle_effect_internal.h.

GLOW_ORB_WIDTH

#define GLOW_ORB_WIDTH 40

Referenced by btEffectRunMars(), btEffectRunStatBoost() and btEffectRunTargetMotes().

Definition at line 431 of file battle_effect_internal.h.

GLOW_ORB_HEIGHT

#define GLOW_ORB_HEIGHT 40

Referenced by btEffectRunMars(), btEffectRunStatBoost() and btEffectRunTargetMotes().

Definition at line 432 of file battle_effect_internal.h.

VIOLET_STREAK_WIDTH

#define VIOLET_STREAK_WIDTH 32

Referenced by btEffectRunStatBoost().

Definition at line 433 of file battle_effect_internal.h.

VIOLET_STREAK_HEIGHT

#define VIOLET_STREAK_HEIGHT 64

Referenced by btEffectRunStatBoost().

Definition at line 434 of file battle_effect_internal.h.

WISP_WIDTH

#define WISP_WIDTH 64

Referenced by btEffectRunStatBoost().

Definition at line 435 of file battle_effect_internal.h.

WISP_HEIGHT

#define WISP_HEIGHT 32

Referenced by btEffectRunStatBoost().

Definition at line 436 of file battle_effect_internal.h.

VORTEX_WIDTH

#define VORTEX_WIDTH 24

VortexSheet's six pictures and HeartSheet's heart.

Definition at line 438 of file battle_effect_internal.h.

VORTEX_HEIGHT

#define VORTEX_HEIGHT 48

Definition at line 439 of file battle_effect_internal.h.

HEART_WIDTH

#define HEART_WIDTH 22

Referenced by btEffectRunTargetMotes().

Definition at line 440 of file battle_effect_internal.h.

HEART_HEIGHT

#define HEART_HEIGHT 42

Referenced by btEffectRunTargetMotes().

Definition at line 441 of file battle_effect_internal.h.

WATER_WAVE_WIDTH

#define WATER_WAVE_WIDTH 32

WaterSpraySheet: the wave, then the splash's pictures.

Referenced by btEffectRunHail(), btEffectRunNeptune() and btEffectRunNereid().

Definition at line 443 of file battle_effect_internal.h.

WATER_WAVE_HEIGHT

#define WATER_WAVE_HEIGHT 32

Referenced by btEffectRunHail(), btEffectRunNeptune() and btEffectRunNereid().

Definition at line 444 of file battle_effect_internal.h.

WATER_SPLASH_WIDTH

#define WATER_SPLASH_WIDTH 48

Referenced by btEffectRunNeptune().

Definition at line 445 of file battle_effect_internal.h.

WATER_SPLASH_HEIGHT

#define WATER_SPLASH_HEIGHT 48

Referenced by btEffectRunNeptune().

Definition at line 446 of file battle_effect_internal.h.

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.

Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunShatteringOpening(), btEffectSetupCanvasTileMap() and btEffectStartCanvasLayer().

Definition at line 449 of file battle_effect_internal.h.

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.

Referenced by btEffectOpenCanvasLayer(), btEffectRunShatteringOpening() and btEffectStartCanvasLayer().

Definition at line 457 of file battle_effect_internal.h.

CANVAS_WAVE_BG2X

#define CANVAS_WAVE_BG2X(sway) ((sway) >> 10)

A line's sideways sway as its BG2X value in state->bg2xLines, which the wave HBlank DMA writes line by line. BG2X counts 256ths of a canvas pixel, so a sway of toFIXED(n) moves the line n / 4 canvas pixels: n / 2 screen pixels where the canvas is shown at twice its width.

Referenced by btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunGatheringLights(), btEffectRunHaunt(), btEffectRunStreakVolley(), btEffectRunTargetMotes(), btEffectRunTorch() and btEffectRunUnusedOrbitingSpirals().

Definition at line 469 of file battle_effect_internal.h.

EFFECT_WRITE_CANVAS_MAP_ROW

#define EFFECT_WRITE_CANVAS_MAP_ROW(row, column, offset)

Writes one row of BG2's map for the canvas, two tiles at a time.

Referenced by btEffectOpenCanvasLayer(), btEffectStartCanvasLayer() and btEffectStartTiledCanvas().

Definition at line 472 of file battle_effect_internal.h.

Enumerations in detail

REAPER_SHEET_PICTURE

enum REAPER_SHEET_PICTURE

Where each of the reaper's pictures begins in its sprite sheet, in bytes.

EnumeratorValueDescription
REAPER_SHEET_RAISED0
REAPER_SHEET_SWUNGREAPER_SHEET_RAISED + PICTURE_BYTES(REAPER_SHEET_RAISED)
REAPER_SHEET_CRESCENTREAPER_SHEET_SWUNG + PICTURE_BYTES(REAPER_SHEET_SWUNG)

Definition at line 313 of file battle_effect_internal.h.

RED_CRESCENT_PICTURE

enum RED_CRESCENT_PICTURE

Where each picture of the fading red crescent begins in its sprite sheet, in bytes.

EnumeratorValueDescription
RED_CRESCENT_FADE_A0
RED_CRESCENT_FADE_BRED_CRESCENT_FADE_A + PICTURE_BYTES(RED_CRESCENT_FADE_A)
RED_CRESCENT_FADE_CRED_CRESCENT_FADE_B + PICTURE_BYTES(RED_CRESCENT_FADE_B)
RED_CRESCENT_FADE_DRED_CRESCENT_FADE_C + PICTURE_BYTES(RED_CRESCENT_FADE_C)

Definition at line 334 of file battle_effect_internal.h.

DJINNI_ENTRANCE_LENGTH

enum DJINNI_ENTRANCE_LENGTH

What btEffectRunDjinniEntrance takes added to its element; the element alone plays the 64-tick entrance.

EnumeratorValueDescription
DJINNI_ENTRANCE_LONGELEMENT_COUNTThe long entrance: 84 ticks instead of 64, ending in a burst of motes.

Definition at line 484 of file battle_effect_internal.h.

DJINNI_ENTRANCE_ANCHOR

enum DJINNI_ENTRANCE_ANCHOR

Where btEffectRunDjinniEntrance's Djinni appears.

EnumeratorValueDescription
DJINNI_ANCHOR_OVER_TARGETover the first target
DJINNI_ANCHOR_TARGET_Xat the first target's x, at depth 0
DJINNI_ANCHOR_OVER_USER
DJINNI_ANCHOR_USER_Xat the user's x, at depth 0; no caller
DJINNI_ANCHOR_CENTREin the centre of the field

Definition at line 491 of file battle_effect_internal.h.

SPARK_GROUPS_MODE

enum SPARK_GROUPS_MODE

Where btEffectRunSparkGroups' bursts go off.

EnumeratorValueDescription
SPARK_GROUPS_NOVAat (60, 48); the damage shows on tick 24
SPARK_GROUPS_DYNAMITEat (60, 64), orange; the damage shows on tick 2
SPARK_GROUPS_RISINGbelow the user, in the LightningBolt colours, the sparks rising; the damage shows on tick 2

Definition at line 501 of file battle_effect_internal.h.

CANVAS_WIPE_DIRECTION

enum CANVAS_WIPE_DIRECTION

Which way btEffectWipeCanvas sweeps.

EnumeratorValueDescription
CANVAS_WIPE_DOWNtop to bottom
CANVAS_WIPE_ACROSSleft to right

Definition at line 510 of file battle_effect_internal.h.

CANVAS_FILL

enum CANVAS_FILL

What btEffectWipeCanvas leaves behind it.

EnumeratorValueDescription
CANVAS_WIPE_FILLcolour 1, which its callers make black first
CANVAS_WIPE_CLEARcolour 0: the canvas cleared

Definition at line 517 of file battle_effect_internal.h.

SUMMON_FORMATION

enum SUMMON_FORMATION

The summons' sprite formations (btEffectPlaceFormationSprites and btEffectRunImpactBurst), each named for the summon that keeps it.

EnumeratorValueDescription
SUMMON_FORMATION_THORnine in a 3x3 grid at 32-pixel spacing
SUMMON_FORMATION_NEREIDtwelve in rows of 1, 3, 4 and 4, from 16 left and 32 up
SUMMON_FORMATION_CYBELEeight in rows of 3, 2 and 3, from 16 right
SUMMON_FORMATION_TIAMATeight drawn at 1.25 times their size

Definition at line 525 of file battle_effect_internal.h.

SPIN_AXIS

enum SPIN_AXIS

The axis a swirling spark, mote or star turns about, which its index & 3 picks.

EnumeratorValueDescription
SPIN_YAW
SPIN_PITCH
SPIN_ROLL
SPIN_PITCH_AND_ROLL

Definition at line 536 of file battle_effect_internal.h.

CAMERA_PHASE

enum CAMERA_PHASE

state->cameraPhase, which btCameraApplyPhasedDelta and the effects that turn the camera through it (Fire, Froth) pass between them.

EnumeratorValueDescription
CAMERA_PHASE_IDLEnothing marked since the last turn
CAMERA_PHASE_TICK_DONEthe effect has finished a tick: turn the whole delta
CAMERA_PHASE_HALF_TURNEDhalf a delta turned on an unmarked tick

Definition at line 546 of file battle_effect_internal.h.

BATTLE_EFFECT_ID_RANGE

enum BATTLE_EFFECT_ID_RANGE

Where each range of btEffectRunByIdRange's effect kinds starts: the casting impacts, the beams, and the ring and spark effect of critical hits.

EnumeratorValueDescription
EFFECT_RANGE_CASTING_IMPACT100
EFFECT_RANGE_BEAM136
EFFECT_RANGE_RING_AND_SPARKEFFECT_ID_CRITICAL_OFFSET

Definition at line 556 of file battle_effect_internal.h.

Functions in detail

btDMAStop

static inline void btDMAStop(volatile Uint16 *channel)

Stops a DMA channel and reads its control back, so the stop takes effect before the channel is set up again.

Referenced by btEffectArmBg2AffineHBlankDMA(), btEffectArmPaletteHBlankDMA(), btEffectArmWin0HBlankDMA() and btEffectBuildWindowEdgeTable().

Definition at line 79 of file battle_effect_internal.h.

On this page

MacrosEnumerationsFunctionsDescriptionMacros in detailEFFECT_BLEND_ADDEFFECT_BLEND_CANVASCANVAS_BLEND_LEVELEFFECT_DISPCNTEFFECT_WIN0_LAYERSEFFECT_WINOUTDMA_CONTROL_HALFEFFECT_FREE_PARTICLESEFFECT_VIEW_FROM_CAMERAEFFECT_STRIKE_TARGETEFFECT_SHOW_DAMAGECANVAS_SIZECANVAS_BYTESCANVAS_TILESCANVAS_PIXEL_OFFSETBACKGROUND_PIXEL_OFFSETBATTLE_VIEW_TOPBATTLE_VIEW_HEIGHTBATTLE_VIEW_BOTTOMNARROW_CANVAS_PARTY_XSUMMON_PROJECTION_CENTER_YBACKGROUND_DARKEN_TICKSBACKGROUND_DARKENED_LEVELSHEET_PALETTE_COLORSSHEET_PALETTE_BYTESPARTICLE_DAMPING_NONEEFFECT_START_NARROW_CANVASEFFECT_LOAD_BLITTEREFFECT_BLITTEREFFECT_SET_TRANSFEREFFECT_START_TRANSFEREFFECT_PRESENT_CANVASEFFECT_END_TICKEFFECT_RELEASE_BLITTERSEFFECT_FINISH_CANVASEFFECT_FINISH_CANVAS_ONE_BLITTERPICTURE_BYTESEFFECT_DRAW_PICTUREMOTE_SET_BYTESDIMMED_COPIESDIMMED_COPY_CAPGLINT_SET_BYTESEFFECT_DRAW_MOTEMOTE_SIZE_MAXMOTE_DEPTH_NEARMOTE_DEPTH_FARMOTE_DEPTH_STEPEFFECT_DRAW_FLAREEFFECT_SWELL_MOTEEFFECT_FALL_MOTEEFFECT_SHOW_WIDE_CANVASWINDOW_SPAN_INVERTEDBATTLE_BACKGROUND_WIDTHBATTLE_BACKGROUND_HEIGHTBATTLE_BACKGROUND_BYTESWINDOW_EDGE_RIGHTWINDOW_EDGE_INSETSWINDOW_EDGE_INSET_LINESWINDOW_EDGE_LINESBLUE_RAMP_PIXELSEFFECT_CAP_LEVELREAPER_SHEET_RAISED_WIDTHREAPER_SHEET_RAISED_HEIGHTREAPER_SHEET_SWUNG_WIDTHREAPER_SHEET_SWUNG_HEIGHTREAPER_SHEET_CRESCENT_WIDTHREAPER_SHEET_CRESCENT_HEIGHTRED_CRESCENT_FADE_A_WIDTHRED_CRESCENT_FADE_A_HEIGHTRED_CRESCENT_FADE_B_WIDTHRED_CRESCENT_FADE_B_HEIGHTRED_CRESCENT_FADE_C_WIDTHRED_CRESCENT_FADE_C_HEIGHTRED_CRESCENT_FADE_D_WIDTHRED_CRESCENT_FADE_D_HEIGHTLIGHTNING_BOLT_WIDTHLIGHTNING_BOLT_HEIGHTLIGHTNING_BOLT_PICTURE_BYTESBLUE_FLAME_COLUMN_WIDTHBLUE_FLAME_COLUMN_HEIGHTBLUE_FLAME_SPLASH_WIDTHBLUE_FLAME_SPLASH_HEIGHTWAVE_WIDTHWAVE_HEIGHTBLUE_ARC_WIDTHBLUE_ARC_HEIGHTYELLOW_ORB_WIDTHYELLOW_ORB_HEIGHTYELLOW_ORB_PACKED_WIDTHYELLOW_ORB_PACKED_HEIGHTYELLOW_ORB_PICTURESSLASH_PICTURE_SIZEFIRE_STREAK_WIDTHFIRE_STREAK_HEIGHTFIRE_BURST_WIDTHFIRE_BURST_HEIGHTMERCURY_SMALL_DJINNI_HEIGHTVENUS_SMALL_DJINNI_HEIGHTFIRE_BLOB_WIDTHFIRE_BLOB_HEIGHTCRYSTAL_WIDTHCRYSTAL_HEIGHTLIGHTNING_PILLAR_WIDTHLIGHTNING_PILLAR_HEIGHTFIRE_PILLAR_WIDTHFIRE_PILLAR_HEIGHTFIRE_PILLAR_FLAME_WIDTHFIRE_PILLAR_FLAME_HEIGHTSPIRAL_WIDTHSPIRAL_HEIGHTFLAMEBALL_WIDTHFLAMEBALL_HEIGHTRUNE_HALF_WIDTHRUNE_HALF_HEIGHTDJINNI_WIDTHDJINNI_HEIGHTSMALL_DJINNI_WIDTHSMALL_DJINNI_HEIGHTSMOKE_PUFF_WIDTHSMOKE_PUFF_HEIGHTFLASH_BURST_WIDTHFLASH_BURST_HEIGHTSKULL_WIDTHSKULL_HEIGHTTORNADO_STRIP_WIDTHTORNADO_STRIP_HEIGHTDAGGER_WIDTHDAGGER_HEIGHTSHIELD_WIDTHSHIELD_HEIGHTGLOW_ORB_WIDTHGLOW_ORB_HEIGHTVIOLET_STREAK_WIDTHVIOLET_STREAK_HEIGHTWISP_WIDTHWISP_HEIGHTVORTEX_WIDTHVORTEX_HEIGHTHEART_WIDTHHEART_HEIGHTWATER_WAVE_WIDTHWATER_WAVE_HEIGHTWATER_SPLASH_WIDTHWATER_SPLASH_HEIGHTEFFECT_SET_BATTLE_WINDOWSEFFECT_SET_CANVAS_AFFINECANVAS_WAVE_BG2XEFFECT_WRITE_CANVAS_MAP_ROWEnumerations in detailREAPER_SHEET_PICTURERED_CRESCENT_PICTUREDJINNI_ENTRANCE_LENGTHDJINNI_ENTRANCE_ANCHORSPARK_GROUPS_MODECANVAS_WIPE_DIRECTIONCANVAS_FILLSUMMON_FORMATIONSPIN_AXISCAMERA_PHASEBATTLE_EFFECT_ID_RANGEFunctions in detailbtDMAStop