Alchemy

orbiting.c

Swirling stars, orbiting skulls and target bursts.

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

Swirling stars, orbiting skulls and target bursts. Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_RunSwirlingStars

UNUSED void BattleFx_RunSwirlingStars(struct BattleEffectArgument *effect)

Swirling stars: 64 stars scattered around a point 80 pixels up spin about it, each on its own axis, appearing four a frame; 30 frames after it appears, each star is drawn back towards the centre. Stars are drawn smaller the further away they are. The scene runs for 160 frames. All 256 stars of the pool are seeded, at rest in a cube 255 pixels across, though only 64 are drawn.

Nothing calls it. Draws through the side's blitters mirrored (side ^ 1), and ends with the transfer callback removed, the blitters freed and the canvas layer closed.

Line 25

BattleFx_RunOrbitingSkulls

UNUSED void BattleFx_RunOrbitingSkulls(void)

Orbiting skulls: three skulls circle each target in turn, 16 frames apart, for 64 frames each, a third of a turn apart on a circle of 8 pixels around the target. Runs with the effect already in gBattleFxWork.

Nothing calls it. Copies the skull palette over the first 128 bytes of BG palette RAM; writes REG_BG2PA, REG_BG2X and REG_BLDALPHA; keeps each skull's angle in velocityX of work->particles, three to a target. Ends with the transfer callback removed, the blitter freed and the canvas layer closed.

Line 123

BattleFx_RunTargetBursts

UNUSED void BattleFx_RunTargetBursts(struct BattleEffectArgument *effect)

Target bursts: on each target in turn, 8 frames apart, a burst flares up in the middle while five puffs of smoke scatter around it, for 40 frames.

Nothing calls it. Copies the pink burst palette over the first 128 bytes of BG palette RAM, uses work->particles six to a target, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.

Line 237

Macros

TARGET_BURSTS_CELLS

#define TARGET_BURSTS_CELLS 0x1b00

The burst picture in the sheet, after the smoke.

Used by BattleFx_RunTargetBursts.

Line 226

Also, macros without a comment: SWIRLING_STARS_FRAMES, SWIRLING_STARS_COUNT, TARGET_BURSTS_FRAMES.

On this page