judgment.c
The Judgment summon.
games/tbs/src/effect/parts/judgment.c on GitHub
The Judgment summon. Part of effect.c, the battle effect object, compiled only through it. The folder README describes its two parts, the gathering and the sweep, under "Effect families".
Functions
BattleFx_RunJudgment
void BattleFx_RunJudgment(struct BattleEffectArgument *effect)
The battle wipes away to a violet sky where a formation flies forward while motes gather into it, bursts in a flash and sends out a ring of light.
Abilities: Judgment (scene kind 9).
The scene then cuts to an aerial view where the blast spreads in rings, to a beach, and to a forest swept by an explosion front, before brightening back into the battle. The folder README describes both parts. The scene leaves gProjection.centerY at 240.
Used by BattleFx_RunSceneEffect.
Structures
JudgmentWork
struct JudgmentWork
Judgment's work block, laid over struct BattleEffectWork from its start. The sweep's 120x120 wave picture, from the block's start, later overwrites both fields.
| Field | Declared as | |
|---|---|---|
sheet | u8 sheet[JUDGMENT_SHEET_BYTES] | The gathering's pictures: the pink burst, the burst's quarters and the tornado sheet. |
ramp | u8 ramp[8][MOTE_SET_BYTES] | Eight copies of the mote sheet, copy i with every level capped at 64 - 7i; the gathering's ring of motes steps through them. |
Used by BattleFx_RunJudgment.
Macros
JUDGMENT_SHEET_BYTES
#define JUDGMENT_SHEET_BYTES 0x2710
The bytes of Judgment's work block before its dimmed mote copies.
Used by BattleFx_RunJudgment.
JUDGMENT_SPARKS
#define JUDGMENT_SPARKS (&PARTICLES[128])
The gathering's 128 sparks, after its 128 motes in PARTICLES.
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_TORNADO
#define JUDGMENT_SHEET_TORNADO 0x95c
The tornado sheet, whose six glint pictures are the burst's shards (gJudgment_ShardCells counts from the sheet's start).
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_EXPLOSION
#define JUDGMENT_SHEET_EXPLOSION 0x4000
The explosion's four 32x54 pictures, loaded over the flares on the sweep's frame 64.
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_FLARE_A
#define JUDGMENT_SHEET_FLARE_A 0x4000
The first 24x24 flare picture, from the crescent sheet the sweep loads.
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_FLASH_SMALL
#define JUDGMENT_SHEET_FLASH_SMALL 0x6000
The 16x17 small flash, the first of OverlayImageA's three pictures.
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_FLASH_LARGE
#define JUDGMENT_SHEET_FLASH_LARGE 0x6110
The 24x41 large flash picture.
Used by BattleFx_RunJudgment.
JUDGMENT_SHEET_FLASH_STREAK
#define JUDGMENT_SHEET_FLASH_STREAK 0x64e8
The 22x44 flash streak picture.
Used by BattleFx_RunJudgment.
JUDGMENT_DMA_FILL_CANVAS
#define JUDGMENT_DMA_FILL_CANVAS DMA_FILL_WORDS(0x1000)
DMA word that fills the 128x128 canvas.
Used by BattleFx_RunJudgment.
JUDGMENT_DMA_FILL_WAVE
#define JUDGMENT_DMA_FILL_WAVE DMA_FILL_WORDS(0xe10)
DMA word that fills the 120x120 wave picture.
Used by BattleFx_RunJudgment.
Also, macros without a comment: JUDGMENT_GATHER_FRAMES, JUDGMENT_SWEEP_FRAMES, JUDGMENT_SHEET_FLARE_B, JUDGMENT_FORMATION_OBJECTS, JUDGMENT_DEBRIS_OBJECTS, JUDGMENT_SHEET_BURST, JUDGMENT_EXPLOSION_CELL_BYTES, JUDGMENT_WAVE_SIZE.