Death Plunge, the blade rain, the element pillar, the element burst and the shattering picture. More...
Go to the source code of this file.
Data Structures | |
| struct | Streak |
| One streak of light of the element streak burst, laid over the same 28-byte records as PARTICLES: a line along a randomly turned axis from tail to head, in distance from the centre. More... | |
Macros | |
| #define | DEATH_PLUNGE_FRAMES 96 |
| #define | BLADE_RAIN_FRAMES 120 |
| #define | ELEMENT_PILLAR_FRAMES 56 |
| #define | SHATTERING_OPENING_PLOT_PIXEL(x, y) |
| Sets the pixel at (x, y) of the 256x120 8bpp tile picture in Ram_MapCellBuffer (32 tiles across) to colour 2. | |
| #define | SHATTERING_OPENING_PLOT_CORNERS(x1, x2, y1, y2) |
| Plots the four corners (x1 or x2, y1 or y2): one point of the circle mirrored into four octants. | |
| #define | SHATTERING_OPENING_FRAMES 128 |
| #define | SHATTERING_OPENING_FLASHES 32 |
| flashes thrown as the picture breaks | |
| #define | SHATTERING_OPENING_PIECES 33 |
| pieces the picture breaks into | |
| #define | SHATTERING_OPENING_DISC_X 96 |
| the centre of the opening disc | |
| #define | SHATTERING_OPENING_DISC_Y 60 |
| the centre of the opening disc | |
Functions | |
| void | BattleFx_RunDeathPlunge (struct BattleEffectArgument *effect) |
| The user runs 9/10 of the way to the first target, then both leap and turn upside down in the air; on frame 54 the target is hit and both bounce back, while flashes burst from the user and rise in a widening ring. | |
| UNUSED void | BattleFx_RunBladeRain (struct BattleEffectArgument *effect) |
| Drops 16 swords, one every 4 frames, slanting in towards the first target (the middle of the canvas, x 64) and sticking in the ground, where their bottom 4 pixels are hidden. | |
| void | BattleFx_RunElementPillar (struct BattleEffectArgument *effect) |
| The glow of an element around a unit: a symmetrical pillar of light stands at the unit's feet while motes spiral up around it, for 56 frames, and the first target flashes. | |
| void | BattleFx_RunShatteringOpening (struct BattleEffectArgument *effect) |
| The shattering opening of the battle on the Venus aerie storm backdrop: the screen turns white and a grey disc grows from (96, 60) by 32 pixels a frame while the TileAnimationMask picture breaks into 33 pieces that fly apart and fall; background palettes 6 to 13 then ease from white back to the battle backdrop's colours, and from frame 51 32 flashes rise. | |
| void | BattleFx_RunElementBurst (struct BattleEffectArgument *effect) |
| The burst of an element over a unit, for 56 frames: sparks flare at the four corners around the unit, motes spiral in, and from frame 28 a burst of light plays over the unit while the first target flashes. | |
| void | BattleFx_DrawStreaks (void) |
| Draws a frame of the element streak burst: on its first frame seeds 256 streaks with random axes, then each frame draws the first 64 (streak i from frame i / 4) as lines three pixels thick that shrink 4 pixels a frame towards the centre of the canvas, a little below its middle. | |
| void | BattleFx_StartElementStreaks (s32 element) |
| Starts the element streak burst and returns at once: opens the canvas and schedules BattleFx_DrawStreaks with a canvas that darkens each frame. | |
| void | BattleFx_EndElementStreaks (void) |
| Ends the element streak burst that BattleFx_StartElementStreaks started: stops its callbacks and the background palette fade, clears the canvas in VRAM and frees the work and the canvas. | |
Death Plunge, the blade rain, the element pillar, the element burst and the shattering picture.
Part of effect.c, the battle effect object, compiled only through it.
Definition in file death_plunge.c.
| #define DEATH_PLUNGE_FRAMES 96 |
Definition at line 28 of file death_plunge.c.
Referenced by BattleFx_RunDeathPlunge().
| #define BLADE_RAIN_FRAMES 120 |
Definition at line 175 of file death_plunge.c.
Referenced by BattleFx_RunBladeRain().
| #define ELEMENT_PILLAR_FRAMES 56 |
Definition at line 340 of file death_plunge.c.
Referenced by BattleFx_RunElementPillar().
| #define SHATTERING_OPENING_PLOT_PIXEL | ( | x, | |
| y ) |
Sets the pixel at (x, y) of the 256x120 8bpp tile picture in Ram_MapCellBuffer (32 tiles across) to colour 2.
Definition at line 512 of file death_plunge.c.
| #define SHATTERING_OPENING_PLOT_CORNERS | ( | x1, | |
| x2, | |||
| y1, | |||
| y2 ) |
Plots the four corners (x1 or x2, y1 or y2): one point of the circle mirrored into four octants.
Definition at line 518 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| #define SHATTERING_OPENING_FRAMES 128 |
Definition at line 524 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| #define SHATTERING_OPENING_FLASHES 32 |
flashes thrown as the picture breaks
Definition at line 525 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| #define SHATTERING_OPENING_PIECES 33 |
pieces the picture breaks into
Definition at line 526 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| #define SHATTERING_OPENING_DISC_X 96 |
the centre of the opening disc
Definition at line 527 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| #define SHATTERING_OPENING_DISC_Y 60 |
the centre of the opening disc
Definition at line 528 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| void BattleFx_RunDeathPlunge | ( | struct BattleEffectArgument * | effect | ) |
The user runs 9/10 of the way to the first target, then both leap and turn upside down in the air; on frame 54 the target is hit and both bounce back, while flashes burst from the user and rise in a widening ring.
Abilities: Death Plunge (kind 53).
Definition at line 35 of file death_plunge.c.
Referenced by BattleFx_RunDeathPlunge().
| UNUSED void BattleFx_RunBladeRain | ( | struct BattleEffectArgument * | effect | ) |
Drops 16 swords, one every 4 frames, slanting in towards the first target (the middle of the canvas, x 64) and sticking in the ground, where their bottom 4 pixels are hidden.
Sword i falls from frame 4i + 16 and sticks at frame 4i + 25. Every 4 frames from 24 to 84 the target flashes white in its damage pose for 2 frames and the screen shakes; every 8 frames the hit sound plays.
Nothing reaches it: no handler table entry or call names it. Places 64 swords in work->particles but draws only the first 16, and moves BG2X to centre the canvas on the target.
Definition at line 188 of file death_plunge.c.
Referenced by BattleFx_RunBladeRain().
| void BattleFx_RunElementPillar | ( | struct BattleEffectArgument * | effect | ) |
The glow of an element around a unit: a symmetrical pillar of light stands at the unit's feet while motes spiral up around it, for 56 frames, and the first target flashes.
Called through BattleFx_RunElementPillarFar by BattleFx_PlayUnitElementEffect (its mode 2) and four times in a row, one for each element, by BattlePres_RunUnitAction. Allocates and frees its own work, canvas and sheet slots; loads the element's colours over the first 64 of the background palette, fills PARTICLES 0 to 127 and moves BG2X with the unit. Increments effect->variant in place, so BattlePres_RunUnitAction's four calls draw ever larger motes.
effect->kind : the element, which picks the palette: 0 Venus yellow, 1 Mercury blue, 2 Mars red, others Jupiter violet. effect->variant : the mote size less one, kept to 1 to 4 after adding 1.
Definition at line 357 of file death_plunge.c.
Referenced by BattleFx_RunElementPillar().
| void BattleFx_RunShatteringOpening | ( | struct BattleEffectArgument * | effect | ) |
The shattering opening of the battle on the Venus aerie storm backdrop: the screen turns white and a grey disc grows from (96, 60) by 32 pixels a frame while the TileAnimationMask picture breaks into 33 pieces that fly apart and fall; background palettes 6 to 13 then ease from white back to the battle backdrop's colours, and from frame 51 32 flashes rise.
Runs for 128 frames.
Called through BattleFx_RunShatteringOpeningFar by BattlePres_RunEntryTransition, as a battle opens. Allocates and frees its own work, canvas and sheet slots; sets up BG2 as the canvas itself, as BattleFx_BeginCanvasLayer would; draws the disc in Ram_MapCellBuffer and copies it over 0x7800 bytes of BG character block 2; writes background colours 1 to 63 and palettes 6 to 13; reloads the battle backdrop on BG1 on frame 5, and on its way out restores gBgScroll[1], starts the battle's palette fade (mode 2) and queues a DISPCNT without BG1.
effect : only effect->actors[0], the unit that flashes, is read.
Definition at line 547 of file death_plunge.c.
Referenced by BattleFx_RunShatteringOpening().
| void BattleFx_RunElementBurst | ( | struct BattleEffectArgument * | effect | ) |
The burst of an element over a unit, for 56 frames: sparks flare at the four corners around the unit, motes spiral in, and from frame 28 a burst of light plays over the unit while the first target flashes.
Called through BattleFx_RunElementBurstFar by BattleFx_PlayUnitElementEffect (its mode 3). Allocates and frees its own work, canvas and sheet slots; loads the element's colours over the first 64 of the background palette, fills PARTICLES 0 to 127 and work->particles, and moves BG2X with the unit.
effect->kind : the element, which picks the palette: 0 Venus yellow, 1 Mercury blue, 2 Mars red, others Jupiter violet.
Definition at line 923 of file death_plunge.c.
Referenced by BattleFx_RunElementBurst().
| void BattleFx_DrawStreaks | ( | void | ) |
Draws a frame of the element streak burst: on its first frame seeds 256 streaks with random axes, then each frame draws the first 64 (streak i from frame i / 4) as lines three pixels thick that shrink 4 pixels a frame towards the centre of the canvas, a little below its middle.
Runs each frame as a scheduler callback added by BattleFx_StartElementStreaks and removed by BattleFx_EndElementStreaks. Counts work->frame, keeps the streaks in Ram_MapCellBuffer, draws into the canvas through BattleFx_DrawClippedCanvasLine, resets the render transform and sets work->transferPending.
Definition at line 1062 of file death_plunge.c.
Referenced by BattleFx_DrawStreaks(), BattleFx_EndElementStreaks(), and BattleFx_StartElementStreaks().
| void BattleFx_StartElementStreaks | ( | s32 | element | ) |
Starts the element streak burst and returns at once: opens the canvas and schedules BattleFx_DrawStreaks with a canvas that darkens each frame.
Called through BattleFx_StartElementStreaksFar by BattleFx_PlayUnitElementEffect (its mode 1), which keeps the canvas on its unit and ends the burst with BattleFx_EndElementStreaks. Allocates the work and canvas slots, which the end frees; loads the element's colours over the first 64 of the background palette; adds BattleFx_DrawStreaks and the canvas transfer to the scheduler, beside the backdrop fade BattleFx_BeginCanvasLayer adds.
element: the element, which picks the palette: 0 Venus yellow, 1 Mercury blue, 2 Mars red, 3 Jupiter violet, others a dusty grey.
Definition at line 1136 of file death_plunge.c.
Referenced by BattleFx_StartElementStreaks().
| void BattleFx_EndElementStreaks | ( | void | ) |
Ends the element streak burst that BattleFx_StartElementStreaks started: stops its callbacks and the background palette fade, clears the canvas in VRAM and frees the work and the canvas.
Called through BattleFx_EndElementStreaksFar by BattleFx_PlayUnitElementEffect. Unlike BattleFx_EndCanvasLayer it leaves BG2's settings and the backdrop's colours as they are.
Definition at line 1183 of file death_plunge.c.
Referenced by BattleFx_EndElementStreaks().