src/battle_effect/battle_effect_djinn_attacks.c
The summons that spend one Djinni: Mercury, Jupiter, Venus and Mars. More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | DJINN_ATTACK_DAMAGE_TICK 56 | The tick each Djinni's attack shows its damage. |
#define | MERCURY_TICKS 96 | |
#define | BLUE_FLAME_SHEET_FLAME PICTURE_BYTES(BLUE_FLAME_COLUMN) | The blue flame sprite sheet's flame, after its shaft; Mercury turns both on their side, and Venus draws the flame as its rising columns. |
#define | MERCURY_FLAMES 5 | flames thrown |
#define | MERCURY_MOTE_SLOTS 256 | slots of PARTICLES the motes may take |
#define | DJINN_ATTACKS_MOTES_PER_FLAME 32 | In each summon what bursts throws its motes into its own slots of PARTICLES (DJINN_ATTACKS_MOTES_PER_FLAME slots per flame); a mote falls, slows and shrinks a size for each DJINN_ATTACKS_MOTE_SHRINK_TICKS of its life it loses. |
#define | DJINN_ATTACKS_MOTE_SLOTS 512 | |
#define | DJINN_ATTACKS_MOTE_SHRINK_TICKS 16 | |
#define | JUPITER_TICKS 96 | |
#define | JUPITER_FLAMEBALLS 8 | Flameballs that fall. |
#define | JUPITER_FLAMEBALL_SLOTS 32 | The flameballs given a place to start from, of which only JUPITER_FLAMEBALLS fall. |
#define | JUPITER_BURST_Y 95 | A flameball bursts once below this line. |
#define | JUPITER_FLAMEBALL PICTURE_BYTES(SMALL_DJINNI) | After the Djinni. |
#define | VENUS_TICKS 96 | |
#define | VENUS_COLUMNS 10 | columns of flame that rise |
#define | VENUS_COLUMN_SLOTS 32 | The columns given a place to rise from, of which only VENUS_COLUMNS rise. |
#define | VENUS_MOTES_PER_COLUMN 16 | |
#define | VENUS_DJINNI_SWAY 24 | How far the Djinni sways to either side as it drops. |
#define | MARS_TICKS 112 | |
#define | MARS_FLAMES 9 | Flames along the arc. |
#define | MARS_EMBERS_PER_FLAME 16 | |
#define | MARS_ROW_X 32 | The row of flames: from the canvas's x MARS_ROW_X out to MARS_ROW_REACH to either side, along line MARS_ROW_Y bowed four pixels. |
#define | MARS_ROW_Y 52 | |
#define | MARS_ROW_REACH 24 | |
#define | MARS_FLAME_LIFE 48 | The ticks a flame burns: eight to each of its six pictures. |
#define | MARS_GLOW_ORB PICTURE_BYTES(SMALL_DJINNI) | Six pictures, after the Djinni. |
Enumerations
| Name | Description | |
|---|---|---|
enum | MERCURY_SHEET_PICTURE { MERCURY_TURNED_SHAFT, MERCURY_TURNED_FLAME } | Mercury's sprite sheet: its Djinni, then the blue flame sprite sheet's two pictures turned on their side. |
enum | VENUS_SHEET_PICTURE { VENUS_BLUE_FLAME_SHEET, VENUS_COLUMN } | Venus's sprite sheet: its Djinni, then the blue flame sprite sheet. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectTransposeCopy (const Uint8 *src, Uint8 *dest, Sint32 w, Sint32 h) | Copies a byte picture turned 90 degrees clockwise. |
void | btEffectRunMercury (BATTLE_EFFECT_PARM *args) | The Mercury Djinni rises from below on the caster's side and whirls there, washed white, firing five blue flames to the left; trailing like comets, each bursts into a spray of motes over the targets and hits them all. |
void | btEffectRunJupiter (BATTLE_EFFECT_PARM *args) | The Jupiter Djinni whirls by the caster, trailing pink, while eight pink flameballs fall from the top right onto the targets, 4 ticks apart; each bursts into 32 motes and hits every target. |
void | btResourceLoadAndDecompress (Sint32 id, void *dest, Sint32 skipPalette, Sint32 copyPalette) | Decompresses resource id into dest. |
void | btEffectRunVenus (BATTLE_EFFECT_PARM *args) | The Venus Djinni drops in from above the targets, swaying and trailing yellow, while ten columns of yellow fire shoot up from the ground beneath them one after another, each bursting into motes and hitting every target. |
void | btEffectRunMars (BATTLE_EFFECT_PARM *args) | A fireball blooms high over the targets and burns out, the Mars Djinni appears where it was and dives onto them, nine flames erupt in a row along the ground beneath them and embers stream up. |
Description
The summons that spend one Djinni: Mercury, Jupiter, Venus and Mars. Each
shows its Djinni washed bright, Mercury's white and the others in their
element's colour, while what it throws bursts over every target. Part of
battle_effect.c.
Macros in detail
DJINN_ATTACK_DAMAGE_TICK
#define DJINN_ATTACK_DAMAGE_TICK 56
The tick each Djinni's attack shows its damage.
Referenced by btEffectRunJupiter(), btEffectRunMars(), btEffectRunMercury() and btEffectRunVenus().
Definition at line 20 of file battle_effect_djinn_attacks.c.
MERCURY_TICKS
#define MERCURY_TICKS 96
Referenced by btEffectRunMercury().
Definition at line 22 of file battle_effect_djinn_attacks.c.
BLUE_FLAME_SHEET_FLAME
#define BLUE_FLAME_SHEET_FLAME PICTURE_BYTES(BLUE_FLAME_COLUMN)
The blue flame sprite sheet's flame, after its shaft; Mercury turns both on their side, and Venus draws the flame as its rising columns.
Referenced by btEffectRunMercury().
Definition at line 25 of file battle_effect_djinn_attacks.c.
MERCURY_FLAMES
#define MERCURY_FLAMES 5
flames thrown
Referenced by btEffectRunMercury().
Definition at line 39 of file battle_effect_djinn_attacks.c.
MERCURY_MOTE_SLOTS
#define MERCURY_MOTE_SLOTS 256
slots of PARTICLES the motes may take
Referenced by btEffectRunMercury().
Definition at line 40 of file battle_effect_djinn_attacks.c.
DJINN_ATTACKS_MOTES_PER_FLAME
#define DJINN_ATTACKS_MOTES_PER_FLAME 32
In each summon what bursts throws its motes into its own slots of PARTICLES
(DJINN_ATTACKS_MOTES_PER_FLAME slots per flame); a mote falls, slows and
shrinks a size for each DJINN_ATTACKS_MOTE_SHRINK_TICKS of its life it loses.
Referenced by btEffectRunJupiter(), btEffectRunMercury() and btEffectRunVenus().
Definition at line 45 of file battle_effect_djinn_attacks.c.
DJINN_ATTACKS_MOTE_SLOTS
#define DJINN_ATTACKS_MOTE_SLOTS 512
Referenced by btEffectRunJupiter(), btEffectRunMercury() and btEffectRunVenus().
Definition at line 46 of file battle_effect_djinn_attacks.c.
DJINN_ATTACKS_MOTE_SHRINK_TICKS
#define DJINN_ATTACKS_MOTE_SHRINK_TICKS 16
Referenced by btEffectRunJupiter(), btEffectRunMercury() and btEffectRunVenus().
Definition at line 47 of file battle_effect_djinn_attacks.c.
JUPITER_TICKS
#define JUPITER_TICKS 96
Referenced by btEffectRunJupiter().
Definition at line 205 of file battle_effect_djinn_attacks.c.
JUPITER_FLAMEBALLS
#define JUPITER_FLAMEBALLS 8
Flameballs that fall.
Referenced by btEffectRunJupiter().
Definition at line 207 of file battle_effect_djinn_attacks.c.
JUPITER_FLAMEBALL_SLOTS
#define JUPITER_FLAMEBALL_SLOTS 32
The flameballs given a place to start from, of which only JUPITER_FLAMEBALLS
fall.
Referenced by btEffectRunJupiter().
Definition at line 210 of file battle_effect_djinn_attacks.c.
JUPITER_BURST_Y
#define JUPITER_BURST_Y 95
A flameball bursts once below this line.
Referenced by btEffectRunJupiter().
Definition at line 212 of file battle_effect_djinn_attacks.c.
JUPITER_FLAMEBALL
#define JUPITER_FLAMEBALL PICTURE_BYTES(SMALL_DJINNI)
After the Djinni.
Referenced by btEffectRunJupiter().
Definition at line 214 of file battle_effect_djinn_attacks.c.
VENUS_TICKS
#define VENUS_TICKS 96
Referenced by btEffectRunVenus().
Definition at line 364 of file battle_effect_djinn_attacks.c.
VENUS_COLUMNS
#define VENUS_COLUMNS 10
columns of flame that rise
Referenced by btEffectRunVenus().
Definition at line 365 of file battle_effect_djinn_attacks.c.
VENUS_COLUMN_SLOTS
#define VENUS_COLUMN_SLOTS 32
The columns given a place to rise from, of which only VENUS_COLUMNS rise.
Referenced by btEffectRunVenus().
Definition at line 367 of file battle_effect_djinn_attacks.c.
VENUS_MOTES_PER_COLUMN
#define VENUS_MOTES_PER_COLUMN 16
Referenced by btEffectRunVenus().
Definition at line 368 of file battle_effect_djinn_attacks.c.
VENUS_DJINNI_SWAY
#define VENUS_DJINNI_SWAY 24
How far the Djinni sways to either side as it drops.
Referenced by btEffectRunVenus().
Definition at line 370 of file battle_effect_djinn_attacks.c.
MARS_TICKS
#define MARS_TICKS 112
Referenced by btEffectRunMars().
Definition at line 511 of file battle_effect_djinn_attacks.c.
MARS_FLAMES
#define MARS_FLAMES 9
Flames along the arc.
Referenced by btEffectRunMars().
Definition at line 513 of file battle_effect_djinn_attacks.c.
MARS_EMBERS_PER_FLAME
#define MARS_EMBERS_PER_FLAME 16
Referenced by btEffectRunMars().
Definition at line 514 of file battle_effect_djinn_attacks.c.
MARS_ROW_X
#define MARS_ROW_X 32
The row of flames: from the canvas's x MARS_ROW_X out to MARS_ROW_REACH to
either side, along line MARS_ROW_Y bowed four pixels.
Referenced by btEffectRunMars().
Definition at line 517 of file battle_effect_djinn_attacks.c.
MARS_ROW_Y
#define MARS_ROW_Y 52
Referenced by btEffectRunMars().
Definition at line 518 of file battle_effect_djinn_attacks.c.
MARS_ROW_REACH
#define MARS_ROW_REACH 24
Referenced by btEffectRunMars().
Definition at line 519 of file battle_effect_djinn_attacks.c.
MARS_FLAME_LIFE
#define MARS_FLAME_LIFE 48
The ticks a flame burns: eight to each of its six pictures.
Referenced by btEffectRunMars().
Definition at line 521 of file battle_effect_djinn_attacks.c.
MARS_GLOW_ORB
#define MARS_GLOW_ORB PICTURE_BYTES(SMALL_DJINNI)
Six pictures, after the Djinni.
Referenced by btEffectRunMars().
Definition at line 523 of file battle_effect_djinn_attacks.c.
Enumerations in detail
MERCURY_SHEET_PICTURE
enum MERCURY_SHEET_PICTURE
Mercury's sprite sheet: its Djinni, then the blue flame sprite sheet's two pictures turned on their side.
| Enumerator | Value | Description |
|---|---|---|
MERCURY_TURNED_SHAFT | SMALL_DJINNI_WIDTH * MERCURY_SMALL_DJINNI_HEIGHT | The shaft turned; never drawn. |
MERCURY_TURNED_FLAME | MERCURY_TURNED_SHAFT + BLUE_FLAME_COLUMN_HEIGHT * BLUE_FLAME_COLUMN_WIDTH | The flame turned to fly left. |
Definition at line 29 of file battle_effect_djinn_attacks.c.
VENUS_SHEET_PICTURE
enum VENUS_SHEET_PICTURE
Venus's sprite sheet: its Djinni, then the blue flame sprite sheet.
| Enumerator | Value | Description |
|---|---|---|
VENUS_BLUE_FLAME_SHEET | SMALL_DJINNI_WIDTH * VENUS_SMALL_DJINNI_HEIGHT | |
VENUS_COLUMN | VENUS_BLUE_FLAME_SHEET + BLUE_FLAME_SHEET_FLAME | 34x65, the flame, drawn upside down as a rising column. |
Definition at line 373 of file battle_effect_djinn_attacks.c.
Functions in detail
btEffectTransposeCopy
void btEffectTransposeCopy(const Uint8 *src, Uint8 *dest, Sint32 w, Sint32 h)
Copies a byte picture turned 90 degrees clockwise.
References Sint32.
Referenced by btEffectRunMercury().
Definition at line 7 of file battle_effect_djinn_attacks.c.
btEffectRunMercury
void btEffectRunMercury(BATTLE_EFFECT_PARM *args)
The Mercury Djinni rises from below on the caster's side and whirls there, washed white, firing five blue flames to the left; trailing like comets, each bursts into a spray of motes over the targets and hits them all.
Abilities: Mercury.
References btCameraShake(), btEffectBuildCanvasBlitters(), btEffectStartCanvasLayer(), btEffectTransposeCopy(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), DjinnAttacksLaunchTicks, Sint32, state, syCos(), syRandom(), sySin() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 54 of file battle_effect_djinn_attacks.c.
btEffectRunJupiter
void btEffectRunJupiter(BATTLE_EFFECT_PARM *args)
The Jupiter Djinni whirls by the caster, trailing pink, while eight pink flameballs fall from the top right onto the targets, 4 ticks apart; each bursts into 32 motes and hits every target.
Abilities: Jupiter.
References btCameraShake(), btEffectBuildCanvasBlitters(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), Sint32, state, syCos(), syRandom(), sySin() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 221 of file battle_effect_djinn_attacks.c.
btResourceLoadAndDecompress
void btResourceLoadAndDecompress(Sint32 id, void *dest, Sint32 skipPalette, Sint32 copyPalette)
Decompresses resource id into dest. A sheet opens with its palette: a
nonzero copyPalette copies it into the first BG colours, and a nonzero
skipPalette steps over it to the pictures.
References Sint32, syDecompressTaggedLZ(), syResourceGetTableEntry() and syWordsCopy().
Referenced by btEffectRunAnnihilation(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnHeal(), btEffectRunDjinniEntrance(), btEffectRunDouse(), btEffectRunDragonCloud(), btEffectRunDrain(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFrost(), btEffectRunGaia(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHealingMotes(), btEffectRunHelmSplitter(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunJudgment(), btEffectRunJupiter(), btEffectRunKirin(), btEffectRunMars(), btEffectRunMercury(), btEffectRunMoteFountain(), btEffectRunNeptune(), btEffectRunPlasma(), btEffectRunPrism(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRagnarok(), btEffectRunRamses(), btEffectRunRay(), btEffectRunRushingStrike(), btEffectRunShatteringOpening() and 20 more.
Definition at line 350 of file battle_effect_djinn_attacks.c.
btEffectRunVenus
void btEffectRunVenus(BATTLE_EFFECT_PARM *args)
The Venus Djinni drops in from above the targets, swaying and trailing yellow, while ten columns of yellow fire shoot up from the ground beneath them one after another, each bursting into motes and hitting every target.
Abilities: Venus.
References btCameraShake(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), Sint32, state, syCos(), syRandom(), sySin() and sySoundPlayStub().
Referenced by BattleEffectHandlers.
Definition at line 385 of file battle_effect_djinn_attacks.c.
btEffectRunMars
void btEffectRunMars(BATTLE_EFFECT_PARM *args)
A fireball blooms high over the targets and burns out, the Mars Djinni appears where it was and dives onto them, nine flames erupt in a row along the ground beneath them and embers stream up.
Abilities: Mars.
References BattleEffectPuffArcPictureBiasY, BattleEffectPuffArcPictureHeights, BattleEffectPuffArcPictures, BattleEffectPuffArcPictureWidths, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), Sint32, state, syCos(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub(), syWordsCopy() and width.
Referenced by BattleEffectHandlers.
Definition at line 530 of file battle_effect_djinn_attacks.c.