Alchemy

neptune.c

The Neptune summon.

games/tbs/src/effect/parts/neptune.c on GitHub

The Neptune summon. Part of effect.c, the battle effect object, compiled only through it.

Functions

Graphics_ResetBg2Pa

void Graphics_ResetBg2Pa(void)

Sets BG2's horizontal scale back to one texel a pixel, for the lines above Graphics_SetBg2AffineScaleHalf's interrupt. BattleFx_RunNeptune schedules it as a frame callback for its first stage.

Used by BattleFx_RunNeptune.

Line 10

Graphics_SetBg2AffineScaleHalf

void Graphics_SetBg2AffineScaleHalf(void)

Stretches BG2 to twice its width from the current line down. BattleFx_RunNeptune installs it as the VCount interrupt handler, on line 0 and from frame 152 on line 96, for its first stage.

Used by BattleFx_RunNeptune.

Line 15

BattleFx_RunNeptune

void BattleFx_RunNeptune(struct BattleEffectArgument *effect)

Over dusk clouds a formation of objects flies in through rising spray, gathers a ring of flares into a burst of light, then five blue flame columns drop onto the targets, throwing sparks.

Abilities: Neptune (scene kind 6).

The scene runs in two stages. The first (244 frames; A or B ends it after frame 16) places NEPTUNE_OBJECTS objects at one and a half times their size, opens the window with an edge table built every frame, sprays particles under gravity, converges a ring of flares, then breaks into a burst of light; meanwhile a frame callback and an interrupt change BG2's horizontal scale. The second stage (144 frames) drops five blue flame columns onto the targets, one every 16 frames; each throws sparks when it reaches the ground (NEPTUNE_FLAME_GROUND). The battle shows the damage on its frame 96. The scene leaves gProjection.centerY at 240.

Particles: in the first stage work->particles 0 to 31 are the converging flares, then from frame 222 0 to 63 the burst points; PARTICLES holds the spray (variant counts its frames, -1 when free). In the second stage work->particles 0 to 4 are the flame columns (variant their frames on the ground) and PARTICLES the sparks (variant their frames left, 0 when free). The window's edge step, noise and scanline table use the map cell buffer's first 450 bytes on frames 0 to 15, over spray particles 0 to 16, which are already launched.

Used by BattleFx_RunSceneEffect.

Line 51

Macros

NEPTUNE_LIGHT_CELLS

#define NEPTUNE_LIGHT_CELLS 0x400

The 48x48 light pictures (9 * 256 bytes each), after the spray sheet's 32x32 spray picture.

Used by BattleFx_RunNeptune.

Line 23

NEPTUNE_FLAME_HEAD

#define NEPTUNE_FLAME_HEAD 0x6e8

The blue flame column's 34x65 head, after its 17x104 shaft.

Used by BattleFx_RunNeptune.

Line 25

Also, macros without a comment: NEPTUNE_FLAME_GROUND, NEPTUNE_OBJECTS, NEPTUNE_PARTICLES, NEPTUNE_FLARE_SHEET.

On this page