Meteor and Outer Space. More...
Go to the source code of this file.
Macros | |
| #define | PARTICLE_STREAMS_EMBERS (&PARTICLES[128]) |
| The burst's embers, 512 in PARTICLES after its 128 flashes. | |
| #define | PARTICLE_STREAMS_RISE_FRAMES 192 |
| frames, at most, of the rise | |
| #define | PARTICLE_STREAMS_BURST_FRAMES 54 |
| frames of the burst | |
| #define | PARTICLE_STREAMS_MOTE_CELLS 0x3200 |
| The mote pictures in the sheet: two sets, MOTE_SET_BYTES apart. | |
Functions | |
| void | Palette_BrightenBgEntries (s32 blueStep, s32 greenStep, s32 redStep) |
| Adds per-channel steps to background colours 1 to 63, capped at 31. | |
| void | BattleFx_ArmPaletteHBlankDma (void) |
| Arms DMA 0 to write one halfword of the table at work->sheet + 0x1f80 into background colour 0 at each horizontal blank, so the backdrop colour changes line by line. | |
| void | BattleFx_RunMeteor (struct BattleEffectArgument *effect) |
| A formation rises out of a dissolving starfield and bursts into embers and flashes: the particle stream in mode 0, with one spawned object rising. | |
| void | BattleFx_RunOuterSpace (struct BattleEffectArgument *effect) |
| The user leaps up, and two objects rise out of a dissolving starfield and burst into embers and flashes: the particle stream in mode 1, in the lightning bolt's colours. | |
| void | BattleFx_RunParticleStreams (struct BattleEffectArgument *effect, s32 mode) |
| The stream runs in two halves. | |
Meteor and Outer Space.
Part of effect.c, the battle effect object, compiled only through it.
Definition in file particle_streams.c.
| #define PARTICLE_STREAMS_EMBERS (&PARTICLES[128]) |
The burst's embers, 512 in PARTICLES after its 128 flashes.
Definition at line 68 of file particle_streams.c.
Referenced by BattleFx_RunParticleStreams().
| #define PARTICLE_STREAMS_RISE_FRAMES 192 |
frames, at most, of the rise
Definition at line 70 of file particle_streams.c.
Referenced by BattleFx_RunParticleStreams().
| #define PARTICLE_STREAMS_BURST_FRAMES 54 |
frames of the burst
Definition at line 71 of file particle_streams.c.
Referenced by BattleFx_RunParticleStreams().
| #define PARTICLE_STREAMS_MOTE_CELLS 0x3200 |
The mote pictures in the sheet: two sets, MOTE_SET_BYTES apart.
Definition at line 74 of file particle_streams.c.
Referenced by BattleFx_RunParticleStreams().
Adds per-channel steps to background colours 1 to 63, capped at 31.
Called once a frame to whiten the colours over a few frames: by BattleFx_RunParticleStreams from frame 36 of its burst, and by Tiamat's BattleFx_RunPaletteParticles. Rewrites background palette RAM.
Definition at line 12 of file particle_streams.c.
Referenced by BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), and Palette_BrightenBgEntries().
| void BattleFx_ArmPaletteHBlankDma | ( | void | ) |
Arms DMA 0 to write one halfword of the table at work->sheet + 0x1f80 into background colour 0 at each horizontal blank, so the backdrop colour changes line by line.
Runs each frame as a scheduler callback (order 0x4fe) that BattleFx_RunParticleStreams adds for its rise and removes after it; the rise rewrites the 160 colours, its heat lines, every frame. Stops DMA 0 and sets it up again, so the table is read from line 0.
Definition at line 42 of file particle_streams.c.
Referenced by BattleFx_ArmPaletteHBlankDma(), and BattleFx_RunParticleStreams().
| void BattleFx_RunMeteor | ( | struct BattleEffectArgument * | effect | ) |
A formation rises out of a dissolving starfield and bursts into embers and flashes: the particle stream in mode 0, with one spawned object rising.
Abilities: Meteor (scene kind 11).
Definition at line 54 of file particle_streams.c.
Referenced by BattleFx_RunMeteor(), and BattleFx_RunSceneEffect().
| void BattleFx_RunOuterSpace | ( | struct BattleEffectArgument * | effect | ) |
The user leaps up, and two objects rise out of a dissolving starfield and burst into embers and flashes: the particle stream in mode 1, in the lightning bolt's colours.
Abilities: Outer Space (kind 384).
Definition at line 63 of file particle_streams.c.
Referenced by BattleFx_RunOuterSpace().
| void BattleFx_RunParticleStreams | ( | struct BattleEffectArgument * | effect, |
| s32 | mode ) |
The stream runs in two halves.
The rise dissolves the battle map into a starfield, then for up to PARTICLE_STREAMS_RISE_FRAMES lifts a formation of objects while motes, orbiting sparks and falling drops are drawn into the map buffer over a heat-tinted scanline palette. The burst then switches to a blended half-scale canvas and throws embers, screen motes and growing flashes from the origin for PARTICLE_STREAMS_BURST_FRAMES shaking frames.
Particle slots: the burst's flashes use PARTICLES 0 to 127 and its embers the 512 after them (PARTICLE_STREAMS_EMBERS); work->particles holds the rising motes (0 to 31) and the flames (32 to 47).
Called by BattleFx_RunMeteor (mode 0) and BattleFx_RunOuterSpace (mode 1). The rise shows Ram_MapCellBuffer on BG1 through BattleFx_FlushPendingGraphicsTransfer, scrolls BG2 with BattleFx_AdvanceBg2OnInterval and colours the backdrop with BattleFx_ArmPaletteHBlankDma, and removes all three after; it also moves the projection centre down to line 240 and sets the background view's active flag while it runs. The burst sets BG2 back to the half-scale canvas and ends the canvas layer. Releases the formation objects it spawned (mode 1's on frame 48 of the burst).
Starts a flame in the first free particle slot from 32 to 47; called for each drop that reaches rows 94 and 95. A flame is never drawn.
Starts a mote in the first free particle slot from 0 to 31. Nothing calls it: the rise starts its motes inline.
Definition at line 96 of file particle_streams.c.
Referenced by BattleFx_RunMeteor(), BattleFx_RunOuterSpace(), and BattleFx_RunParticleStreams().