The Mercury, Jupiter, Venus and Mars Djinn attacks. More...
Go to the source code of this file.
Macros | |
| #define | MERCURY_FRAMES 96 |
| #define | DJINN_ATTACKS_FLAME2_CELLS (17 * 104) |
| The blue flame sheet holds a 17x104 flame, then a 34x65 one; Mercury turns both on their side after its Djinni, Venus draws the second. | |
| #define | MERCURY_TALL_FLAME_CELLS 0x2a8 |
| The first flame turned, 104x17, after the 20x34 Djinni; never drawn. | |
| #define | MERCURY_FLAME_CELLS 0x990 |
| 65x34 | |
| #define | MERCURY_FLAMES 5 |
| flames thrown | |
| #define | MERCURY_MOTE_SLOTS 256 |
| The mote slots Mercury walks: room for more than MERCURY_FLAMES * DJINN_ATTACKS_MOTES_PER_FLAME. | |
| #define | DJINN_ATTACKS_MOTES_PER_FLAME 32 |
| slots for each flame's motes | |
| #define | DJINN_ATTACKS_MOTE_SLOTS 512 |
| #define | JUPITER_FRAMES 96 |
| #define | JUPITER_FLAMEBALLS 8 |
| flameballs that fall | |
| #define | JUPITER_GROUND_Y 95 |
| where the flameballs land | |
| #define | JUPITER_FLAMEBALL_CELLS 0x320 |
| after the 20x40 Djinni | |
| #define | VENUS_FRAMES 96 |
| #define | VENUS_COLUMNS 10 |
| columns of flame that rise | |
| #define | VENUS_FLAME_SHEET 0x2f8 |
| The blue flame sheet, after the 20x38 Djinni, and its second flame. | |
| #define | VENUS_COLUMN_CELLS (VENUS_FLAME_SHEET + DJINN_ATTACKS_FLAME2_CELLS) |
| #define | MARS_FRAMES 112 |
| #define | MARS_STRIKE_FRAME 32 |
| the Djinni strikes the ground | |
| #define | MARS_FLAMES 9 |
| flames along the arc | |
| #define | MARS_EMBERS_PER_FLAME 16 |
| embers in each flame | |
| #define | MARS_ORB_CELLS 0x320 |
| six 40x40 orb pictures, after the Djinni | |
Functions | |
| void | Graphics_TransposeCopy (const u8 *src, u8 *dst, s32 w, s32 h) |
| Copies a w x h byte picture into an h x w one turned 90 degrees clockwise: the top row of src becomes the right column of dst. | |
| void | BattleFx_RunMercury (struct BattleEffectArgument *effect) |
| Mercury Djinni flames: the small Mercury Djinni spirals around (96, 60) and fires five blue flames to the left; each flame shatters into 32 motes after 5 frames, hitting every target. | |
| void | BattleFx_RunJupiter (struct BattleEffectArgument *effect) |
| Jupiter Djinni fall: the small Jupiter Djinni spirals while eight flameballs fall from the top right to the bottom left, 4 frames apart; each shatters into 32 motes below line 95, hitting every target. | |
| void | Resource_LoadAndDecompress (s32 id, void *dst, s32 skipPalette, s32 copyPalette) |
| Decompresses a resource whose first 128 bytes may be a palette. | |
| void | BattleFx_RunVenus (struct BattleEffectArgument *effect) |
| Venus Djinni columns: the small Venus Djinni sways while ten columns of flame in its colours rise from the ground one after another, each bursting into motes and hitting every target. | |
| void | BattleFx_RunMars (struct BattleEffectArgument *effect) |
| Mars Djinni flames: a glowing orb flares, the small Mars Djinni dives to the ground, and nine flames erupt in a row while embers rise. | |
The Mercury, Jupiter, Venus and Mars Djinn attacks.
Part of effect.c, the battle effect object, compiled only through it.
Definition in file djinn_attacks.c.
| #define MERCURY_FRAMES 96 |
Definition at line 46 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury().
| #define DJINN_ATTACKS_FLAME2_CELLS (17 * 104) |
The blue flame sheet holds a 17x104 flame, then a 34x65 one; Mercury turns both on their side after its Djinni, Venus draws the second.
Definition at line 49 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury().
| #define MERCURY_TALL_FLAME_CELLS 0x2a8 |
The first flame turned, 104x17, after the 20x34 Djinni; never drawn.
Definition at line 51 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury().
| #define MERCURY_FLAME_CELLS 0x990 |
| #define MERCURY_FLAMES 5 |
| #define MERCURY_MOTE_SLOTS 256 |
The mote slots Mercury walks: room for more than MERCURY_FLAMES * DJINN_ATTACKS_MOTES_PER_FLAME.
Definition at line 56 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury().
| #define DJINN_ATTACKS_MOTES_PER_FLAME 32 |
slots for each flame's motes
Definition at line 62 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter(), BattleFx_RunMercury(), and BattleFx_RunVenus().
| #define DJINN_ATTACKS_MOTE_SLOTS 512 |
Definition at line 63 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter(), BattleFx_RunMercury(), and BattleFx_RunVenus().
| #define JUPITER_FRAMES 96 |
Definition at line 203 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter().
| #define JUPITER_FLAMEBALLS 8 |
flameballs that fall
Definition at line 204 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter().
| #define JUPITER_GROUND_Y 95 |
where the flameballs land
Definition at line 205 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter().
| #define JUPITER_FLAMEBALL_CELLS 0x320 |
after the 20x40 Djinni
Definition at line 206 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter().
| #define VENUS_FRAMES 96 |
Definition at line 348 of file djinn_attacks.c.
Referenced by BattleFx_RunVenus().
| #define VENUS_COLUMNS 10 |
columns of flame that rise
Definition at line 349 of file djinn_attacks.c.
Referenced by BattleFx_RunVenus().
| #define VENUS_FLAME_SHEET 0x2f8 |
The blue flame sheet, after the 20x38 Djinni, and its second flame.
Definition at line 351 of file djinn_attacks.c.
Referenced by BattleFx_RunVenus().
| #define VENUS_COLUMN_CELLS (VENUS_FLAME_SHEET + DJINN_ATTACKS_FLAME2_CELLS) |
Definition at line 352 of file djinn_attacks.c.
Referenced by BattleFx_RunVenus().
| #define MARS_FRAMES 112 |
Definition at line 472 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().
| #define MARS_STRIKE_FRAME 32 |
the Djinni strikes the ground
Definition at line 473 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().
| #define MARS_FLAMES 9 |
flames along the arc
Definition at line 474 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().
| #define MARS_EMBERS_PER_FLAME 16 |
embers in each flame
Definition at line 475 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().
| #define MARS_ORB_CELLS 0x320 |
six 40x40 orb pictures, after the Djinni
Definition at line 476 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().
Copies a w x h byte picture into an h x w one turned 90 degrees clockwise: the top row of src becomes the right column of dst.
Called twice by BattleFx_RunMercury, to lay its blue flames on their side. Writes only dst.
Definition at line 12 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury(), and Graphics_TransposeCopy().
| void BattleFx_RunMercury | ( | struct BattleEffectArgument * | effect | ) |
Mercury Djinni flames: the small Mercury Djinni spirals around (96, 60) and fires five blue flames to the left; each flame shatters into 32 motes after 5 frames, hitting every target.
Abilities: Mercury (kind 251).
work->particles 0 to 4 hold the flames, variant -1 until launched and then counting the frames since; Ram_MapCellBuffer takes the blue flame sheet before it is turned. Sets work->shakeFrames as each flame shatters, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.
effect: the targets.
Definition at line 78 of file djinn_attacks.c.
Referenced by BattleFx_RunMercury().
| void BattleFx_RunJupiter | ( | struct BattleEffectArgument * | effect | ) |
Jupiter Djinni fall: the small Jupiter Djinni spirals while eight flameballs fall from the top right to the bottom left, 4 frames apart; each shatters into 32 motes below line 95, hitting every target.
Abilities: Jupiter (kind 253).
work->particles holds the flameballs. Copies the Djinni's palette over the first 128 bytes of BG palette RAM, writes REG_BLDALPHA, sets work->shakeFrames as each ball lands, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.
effect: the targets.
Definition at line 220 of file djinn_attacks.c.
Referenced by BattleFx_RunJupiter().
Decompresses a resource whose first 128 bytes may be a palette.
Called by nearly every effect to load its pictures. Writes dst and, with copyPalette, the first 128 bytes of BG palette RAM.
id: the resource. dst: receives the decompressed data. skipPalette: the resource starts with a palette to skip. copyPalette: copy that palette to the start of background palette RAM.
Definition at line 337 of file djinn_attacks.c.
Referenced by BattleFx_RunAnnihilation(), BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBladeRain(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBreak(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCurse(), BattleFx_RunCybele(), BattleFx_RunDeathPlunge(), BattleFx_RunDjinnHeal(), BattleFx_RunDjinniEntrance(), BattleFx_RunDouse(), BattleFx_RunDragonCloud(), BattleFx_RunDrain(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunEruption(), BattleFx_RunFire(), BattleFx_RunFlare(), BattleFx_RunFlashingStrike(), BattleFx_RunFrost(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunHealingMotes(), BattleFx_RunHelmSplitter(), BattleFx_RunIce(), BattleFx_RunImpactBurst(), BattleFx_RunJudgment(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunMoteFountain(), BattleFx_RunNeptune(), BattleFx_RunParticleStreams(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunSleep(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunSpire(), BattleFx_RunStatBoost(), BattleFx_RunStatReduction(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlingStars(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), CastingImpact_LoadResource(), and Resource_LoadAndDecompress().
| void BattleFx_RunVenus | ( | struct BattleEffectArgument * | effect | ) |
Venus Djinni columns: the small Venus Djinni sways while ten columns of flame in its colours rise from the ground one after another, each bursting into motes and hitting every target.
Abilities: Venus (kind 250).
work->particles holds the columns. Copies the Djinni's palette over the first 128 bytes of BG palette RAM, writes REG_BLDALPHA, sets work->shakeFrames as each column appears, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.
effect: the targets.
Definition at line 366 of file djinn_attacks.c.
Referenced by BattleFx_RunVenus().
| void BattleFx_RunMars | ( | struct BattleEffectArgument * | effect | ) |
Mars Djinni flames: a glowing orb flares, the small Mars Djinni dives to the ground, and nine flames erupt in a row while embers rise.
Abilities: Mars (kind 252).
The scene runs for 112 frames:
0 to 23 the orb flares 20 to 31 the Djinni appears, then dives from frame 24 32 it strikes: the screen shakes and the flames start erupting 38 every target is hit 40 on the embers rise, 16 more every 2 frames
work->particles holds the nine flames, PARTICLES their 144 embers. The BG palette's first 128 bytes change three times: the glow orb's at the start, the Djinni's on frame 20 and the ember streak's on frame 32, when the streak sheet replaces the Djinni in work->sheet. Sets work->shakeFrames on the strike, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.
effect: the targets.
Definition at line 499 of file djinn_attacks.c.
Referenced by BattleFx_RunMars().