src/battle_effect/battle_effect_casting_impact.c
The casting impacts, the Djinn attacks, weapons' unleashes and enemy abilities that open the same way: sparks close in on the caster, a streak shoots at the target and a ring of light bursts over it in a spray of sparks, and then each impact plays its own effect over the target (enum CASTING_IMPACT). More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | CASTING_IMPACT_ORB_PICTURES (6 * PICTURE_BYTES(FIRE_STREAK)) | The impact orb's pictures, packed at half width, after the streak's. |
#define | CASTING_IMPACT_DJINNI_WIDTH 20 | The Djinni's picture, in RamMapGridMetatileBuffer after the impact's own: past room for the six glints and six flash bursts, more than any impact loads (Squall's glints and lightning bolts are the most). |
#define | CASTING_IMPACT_DJINNI_HEIGHT 40 | |
#define | CASTING_IMPACT_DJINNI_PICTURE | |
#define | CASTING_IMPACT_GATHER_TICKS 32 | Ticks the sparks gather. |
#define | CASTING_IMPACT_SPARKS 64 | Sparks in state->particles. |
#define | CASTING_IMPACT_SPARK_DEPTH 60 | How far either side of the caster the gathering sparks' depth is clamped. |
#define | CASTING_IMPACT_SPARK_LIFE 32 | A spark scattered over the target lives this long at the least, counted down two a tick (the draw visits each spark twice); it is drawn a mote size smaller for every 16 of life lost. |
#define | CASTING_IMPACT_PARTICLES | The impact pictures' particles, in RamMapGridMetatileBuffer after the Djinni. |
#define | CASTING_IMPACT_PARTICLE_COUNT 64 | |
#define | CASTING_IMPACT_RISING_PICTURES 16 | The impact particles that carry the rising pictures: flash bursts, skulls or puffs of smoke. |
#define | CASTING_IMPACT_RISING_LIFE 24 | The ticks a rising puff of smoke lives, four to each of its six pictures, and a flash burst, two to each of its six. |
#define | CASTING_IMPACT_BURST_LIFE 12 | |
#define | BROIL_STREAKS 12 | Broil's ember streaks. |
#define | ASURA_SHEET_LOW_WIDTH 80 | Asura's sprite sheet: the masked swordsman with his sword low, then swung up, then the red crescent his stroke leaves. |
#define | ASURA_SHEET_LOW_HEIGHT 96 | |
#define | ASURA_SHEET_SWUNG_WIDTH 80 | |
#define | ASURA_SHEET_SWUNG_HEIGHT 104 | |
#define | ASURA_SHEET_CRESCENT_WIDTH 128 | |
#define | ASURA_SHEET_CRESCENT_HEIGHT 91 | |
#define | ASURA_LOW_DRAW_HEIGHT | How tall the swordsman with his sword low is drawn. |
#define | ASURA_CRESCENT_FADE_A_HEIGHT 91 | RedCrescentSheetB, Asura's crescent fading in four pictures the width of the canvas. |
#define | ASURA_CRESCENT_FADE_B_HEIGHT 59 | |
#define | ASURA_CRESCENT_FADE_C_HEIGHT 29 | |
#define | ASURA_CRESCENT_FADE_D_HEIGHT 26 | |
#define | ROCK_SPIRE_WIDTH 32 | Terra Strike's rock spire at its tallest. |
#define | ROCK_SPIRE_HEIGHT 96 | |
#define | FALLING_FLAME_WIDTH 32 | The flame Forcible Arm and Truncheon Fist drop. |
#define | FALLING_FLAME_HEIGHT 64 | |
#define | BAD_OMEN_SKULL_LIFT_SHIFT 11 | Bad Omen's skulls rise faster by the tick, the slowest by toFIXED(1) / 32 more a tick, written as a shift of 1, and each of the next three twice as fast as the one before. |
#define | CASTING_IMPACT_PICTURE_X (side, picture) | Where Mortal Danger draws picture, one of the reaper's seven pictures (REAPER_PICTURE_X), for the casting side. |
Enumerations
| Name | Description | |
|---|---|---|
enum | CASTING_IMPACT { CASTING_IMPACT_BANE, CASTING_IMPACT_SMOG, CASTING_IMPACT_MIS … } | The casting impacts, by effect kind less EFFECT_RANGE_CASTING_IMPACT: each is named for the first ability whose AbilityBattleEffects entry selects it; the four no ability selects are named UNUSED_ and for the effect they hand off to. |
enum | ASURA_SHEET_PICTURE { ASURA_SHEET_LOW, ASURA_SHEET_SWUNG, ASURA_SHEET_CRESCENT } | Where each of Asura's pictures begins in its sheet, in bytes. |
enum | ASURA_CRESCENT_FADE_PICTURE { ASURA_CRESCENT_FADE_A, ASURA_CRESCENT_FADE_B, ASURA_CRESCENT … } |
Functions
| Name | Description | |
|---|---|---|
void | btEffectStepPaletteToResource (Sint32 resourceId) | Steps background colours 0 to 63 one level towards a palette resource. |
static inline void | btCastingImpactEndPrelude (BATTLE_EFFECT_STATE *state, void *canvas) | Clears the prelude image, stops its events and releases its blitters before the next effect takes over. |
void | btEffectRunCastingImpact (BATTLE_EFFECT_PARM *args, Sint32 mode) | Gathers sparks around the caster, launches the Djinni and draws the impact on the first target. |
Description
The casting impacts, the Djinn attacks, weapons' unleashes and enemy
abilities that open the same way: sparks close in on the caster, a streak
shoots at the target and a ring of light bursts over it in a spray of sparks,
and then each impact plays its own effect over the target (enum
CASTING_IMPACT). Part of battle_effect.c.
Macros in detail
CASTING_IMPACT_ORB_PICTURES
#define CASTING_IMPACT_ORB_PICTURES (6 * PICTURE_BYTES(FIRE_STREAK))
The impact orb's pictures, packed at half width, after the streak's.
Referenced by btEffectRunCastingImpact().
Definition at line 103 of file battle_effect_casting_impact.c.
CASTING_IMPACT_DJINNI_WIDTH
#define CASTING_IMPACT_DJINNI_WIDTH 20
The Djinni's picture, in RamMapGridMetatileBuffer after the impact's own:
past room for the six glints and six flash bursts, more than any impact loads
(Squall's glints and lightning bolts are the most).
Referenced by btEffectRunCastingImpact().
Definition at line 107 of file battle_effect_casting_impact.c.
CASTING_IMPACT_DJINNI_HEIGHT
#define CASTING_IMPACT_DJINNI_HEIGHT 40
Referenced by btEffectRunCastingImpact().
Definition at line 108 of file battle_effect_casting_impact.c.
CASTING_IMPACT_DJINNI_PICTURE
#define CASTING_IMPACT_DJINNI_PICTURE
Referenced by btEffectRunCastingImpact().
Definition at line 109 of file battle_effect_casting_impact.c.
CASTING_IMPACT_GATHER_TICKS
#define CASTING_IMPACT_GATHER_TICKS 32
Ticks the sparks gather.
Referenced by btEffectRunCastingImpact().
Definition at line 112 of file battle_effect_casting_impact.c.
CASTING_IMPACT_SPARKS
#define CASTING_IMPACT_SPARKS 64
Sparks in state->particles.
Referenced by btEffectRunCastingImpact().
Definition at line 114 of file battle_effect_casting_impact.c.
CASTING_IMPACT_SPARK_DEPTH
#define CASTING_IMPACT_SPARK_DEPTH 60
How far either side of the caster the gathering sparks' depth is clamped.
Referenced by btEffectRunCastingImpact().
Definition at line 116 of file battle_effect_casting_impact.c.
CASTING_IMPACT_SPARK_LIFE
#define CASTING_IMPACT_SPARK_LIFE 32
A spark scattered over the target lives this long at the least, counted down two a tick (the draw visits each spark twice); it is drawn a mote size smaller for every 16 of life lost.
Referenced by btEffectRunCastingImpact().
Definition at line 120 of file battle_effect_casting_impact.c.
CASTING_IMPACT_PARTICLES
#define CASTING_IMPACT_PARTICLES
The impact pictures' particles, in RamMapGridMetatileBuffer after the Djinni.
Referenced by btEffectRunCastingImpact().
Definition at line 122 of file battle_effect_casting_impact.c.
CASTING_IMPACT_PARTICLE_COUNT
#define CASTING_IMPACT_PARTICLE_COUNT 64
Referenced by btEffectRunCastingImpact().
Definition at line 124 of file battle_effect_casting_impact.c.
CASTING_IMPACT_RISING_PICTURES
#define CASTING_IMPACT_RISING_PICTURES 16
The impact particles that carry the rising pictures: flash bursts, skulls or puffs of smoke.
Referenced by btEffectRunCastingImpact().
Definition at line 127 of file battle_effect_casting_impact.c.
CASTING_IMPACT_RISING_LIFE
#define CASTING_IMPACT_RISING_LIFE 24
The ticks a rising puff of smoke lives, four to each of its six pictures, and a flash burst, two to each of its six.
Referenced by btEffectRunCastingImpact().
Definition at line 130 of file battle_effect_casting_impact.c.
CASTING_IMPACT_BURST_LIFE
#define CASTING_IMPACT_BURST_LIFE 12
Referenced by btEffectRunCastingImpact().
Definition at line 131 of file battle_effect_casting_impact.c.
BROIL_STREAKS
#define BROIL_STREAKS 12
Broil's ember streaks.
Referenced by btEffectRunCastingImpact().
Definition at line 133 of file battle_effect_casting_impact.c.
ASURA_SHEET_LOW_WIDTH
#define ASURA_SHEET_LOW_WIDTH 80
Asura's sprite sheet: the masked swordsman with his sword low, then swung up, then the red crescent his stroke leaves.
Referenced by btEffectRunCastingImpact().
Definition at line 137 of file battle_effect_casting_impact.c.
ASURA_SHEET_LOW_HEIGHT
#define ASURA_SHEET_LOW_HEIGHT 96
Definition at line 138 of file battle_effect_casting_impact.c.
ASURA_SHEET_SWUNG_WIDTH
#define ASURA_SHEET_SWUNG_WIDTH 80
Referenced by btEffectRunCastingImpact().
Definition at line 139 of file battle_effect_casting_impact.c.
ASURA_SHEET_SWUNG_HEIGHT
#define ASURA_SHEET_SWUNG_HEIGHT 104
Referenced by btEffectRunCastingImpact().
Definition at line 140 of file battle_effect_casting_impact.c.
ASURA_SHEET_CRESCENT_WIDTH
#define ASURA_SHEET_CRESCENT_WIDTH 128
Referenced by btEffectRunCastingImpact().
Definition at line 141 of file battle_effect_casting_impact.c.
ASURA_SHEET_CRESCENT_HEIGHT
#define ASURA_SHEET_CRESCENT_HEIGHT 91
Referenced by btEffectRunCastingImpact().
Definition at line 142 of file battle_effect_casting_impact.c.
ASURA_LOW_DRAW_HEIGHT
#define ASURA_LOW_DRAW_HEIGHT
How tall the swordsman with his sword low is drawn. BUG: as tall as the swung picture, 8 rows more than the low one, so the draw reads on into the swung picture's top rows: the tip of the raised sword, a few pixels at the right edge, under the low swordsman's feet.
Referenced by btEffectRunCastingImpact().
Definition at line 147 of file battle_effect_casting_impact.c.
ASURA_CRESCENT_FADE_A_HEIGHT
#define ASURA_CRESCENT_FADE_A_HEIGHT 91
RedCrescentSheetB, Asura's crescent fading in four pictures the width of the canvas.
Referenced by btEffectRunCastingImpact().
Definition at line 162 of file battle_effect_casting_impact.c.
ASURA_CRESCENT_FADE_B_HEIGHT
#define ASURA_CRESCENT_FADE_B_HEIGHT 59
Referenced by btEffectRunCastingImpact().
Definition at line 163 of file battle_effect_casting_impact.c.
ASURA_CRESCENT_FADE_C_HEIGHT
#define ASURA_CRESCENT_FADE_C_HEIGHT 29
Referenced by btEffectRunCastingImpact().
Definition at line 164 of file battle_effect_casting_impact.c.
ASURA_CRESCENT_FADE_D_HEIGHT
#define ASURA_CRESCENT_FADE_D_HEIGHT 26
Referenced by btEffectRunCastingImpact().
Definition at line 165 of file battle_effect_casting_impact.c.
ROCK_SPIRE_WIDTH
#define ROCK_SPIRE_WIDTH 32
Terra Strike's rock spire at its tallest.
Referenced by btEffectRunCastingImpact().
Definition at line 179 of file battle_effect_casting_impact.c.
ROCK_SPIRE_HEIGHT
#define ROCK_SPIRE_HEIGHT 96
Referenced by btEffectRunCastingImpact().
Definition at line 180 of file battle_effect_casting_impact.c.
FALLING_FLAME_WIDTH
#define FALLING_FLAME_WIDTH 32
The flame Forcible Arm and Truncheon Fist drop.
Referenced by btEffectRunCastingImpact().
Definition at line 182 of file battle_effect_casting_impact.c.
FALLING_FLAME_HEIGHT
#define FALLING_FLAME_HEIGHT 64
Referenced by btEffectRunCastingImpact().
Definition at line 183 of file battle_effect_casting_impact.c.
BAD_OMEN_SKULL_LIFT_SHIFT
#define BAD_OMEN_SKULL_LIFT_SHIFT 11
Bad Omen's skulls rise faster by the tick, the slowest by toFIXED(1) / 32
more a tick, written as a shift of 1, and each of the next three twice as
fast as the one before.
Referenced by btEffectRunCastingImpact().
Definition at line 187 of file battle_effect_casting_impact.c.
CASTING_IMPACT_PICTURE_X
#define CASTING_IMPACT_PICTURE_X(side, picture)
Where Mortal Danger draws picture, one of the reaper's seven pictures
(REAPER_PICTURE_X), for the casting side.
Referenced by btEffectRunCastingImpact().
Definition at line 191 of file battle_effect_casting_impact.c.
Enumerations in detail
CASTING_IMPACT
enum CASTING_IMPACT
The casting impacts, by effect kind less EFFECT_RANGE_CASTING_IMPACT: each is
named for the first ability whose AbilityBattleEffects entry selects it; the
four no ability selects are named UNUSED_ and for the effect they hand off
to.
| Enumerator | Value | Description |
|---|---|---|
CASTING_IMPACT_BANE | 0 | smoke |
CASTING_IMPACT_SMOG | smoke | |
CASTING_IMPACT_MIST | smoke | |
CASTING_IMPACT_FEVER | smoke | |
CASTING_IMPACT_FLINT | nothing | |
CASTING_IMPACT_SCORCH | flash bursts rise from the target | |
CASTING_IMPACT_SQUALL | two bolts strike among glints | |
CASTING_IMPACT_SAP | motes fly back to the caster | |
CASTING_IMPACT_TERRA_STRIKE | a rock spire grows and sinks | |
CASTING_IMPACT_POISON_CLOUD | smoke | |
CASTING_IMPACT_DEADLY_POISON | smoke | |
CASTING_IMPACT_MORTAL_DANGER | also Death Size; the reaper swings its scythe | |
CASTING_IMPACT_BAD_OMEN | skulls rise from the target | |
CASTING_IMPACT_LIFE_NOURISH | motes fly back to the caster | |
CASTING_IMPACT_AQUA_SOCK | a blue flame column falls onto the target | |
CASTING_IMPACT_UNUSED_ICE_CHIPS | hands off | |
CASTING_IMPACT_FROST_BITE | ice chips converge on the target | |
CASTING_IMPACT_UNUSED_GATHERING | hands off | |
CASTING_IMPACT_LIFE_LEECH | motes fly back to the caster | |
CASTING_IMPACT_PSY_LEECH | motes fly back to the caster | |
CASTING_IMPACT_BROIL | ember streaks spread sideways | |
CASTING_IMPACT_MELTDOWN | nothing; hands to the stat reduction | |
CASTING_IMPACT_HEAT_MIRAGE | also Heat Flash; smoke | |
CASTING_IMPACT_BARRAGE | flash bursts rise from the target | |
CASTING_IMPACT_UNUSED_MYSTIC_FLAME | hands off | |
CASTING_IMPACT_ACID_BATH | smoke | |
CASTING_IMPACT_UNUSED_COMETS | hands off | |
CASTING_IMPACT_STUN_VOLTAGE | two bolts strike among glints | |
CASTING_IMPACT_BLINDING_SMOG | smoke | |
CASTING_IMPACT_MURK | smoke | |
CASTING_IMPACT_CYCLONE_SLASH | a tornado stands over the target | |
CASTING_IMPACT_PSYPHON_SEAL | a rune opens over the target | |
CASTING_IMPACT_ASURA | a masked swordsman slashes | |
CASTING_IMPACT_FORCIBLE_ARM | a flame falls diagonally | |
CASTING_IMPACT_TRUNCHEON_FIST | a flame falls diagonally | |
CASTING_IMPACT_SEVERE_BLOW | hands off |
Definition at line 60 of file battle_effect_casting_impact.c.
ASURA_SHEET_PICTURE
enum ASURA_SHEET_PICTURE
Where each of Asura's pictures begins in its sheet, in bytes.
| Enumerator | Value | Description |
|---|---|---|
ASURA_SHEET_LOW | 0 | |
ASURA_SHEET_SWUNG | ASURA_SHEET_LOW + PICTURE_BYTES(ASURA_SHEET_LOW) | |
ASURA_SHEET_CRESCENT | ASURA_SHEET_SWUNG + PICTURE_BYTES(ASURA_SHEET_SWUNG) |
Definition at line 153 of file battle_effect_casting_impact.c.
ASURA_CRESCENT_FADE_PICTURE
enum ASURA_CRESCENT_FADE_PICTURE
| Enumerator | Value | Description |
|---|---|---|
ASURA_CRESCENT_FADE_A | 0 | |
ASURA_CRESCENT_FADE_B | ASURA_CRESCENT_FADE_A + CANVAS_SIZE * ASURA_CRESCENT_FADE_A_HEIGHT | |
ASURA_CRESCENT_FADE_C | ASURA_CRESCENT_FADE_B + CANVAS_SIZE * ASURA_CRESCENT_FADE_B_HEIGHT | |
ASURA_CRESCENT_FADE_D | ASURA_CRESCENT_FADE_C + CANVAS_SIZE * ASURA_CRESCENT_FADE_C_HEIGHT |
Definition at line 167 of file battle_effect_casting_impact.c.
Functions in detail
btEffectStepPaletteToResource
void btEffectStepPaletteToResource(Sint32 resourceId)
Steps background colours 0 to 63 one level towards a palette resource.
References Sint32, syResourceGetTableEntry() and syWordsCopy().
Referenced by btEffectRunCastingImpact(), btEffectRunGround(), btEffectRunRagnarok() and btEffectRunTitanBlade().
Definition at line 8 of file battle_effect_casting_impact.c.
btCastingImpactEndPrelude
static inline void btCastingImpactEndPrelude(BATTLE_EFFECT_STATE *state, void *canvas)
Clears the prelude image, stops its events and releases its blitters before the next effect takes over.
References btEffectDarkenBackgroundStep(), btEffectTransferCanvas(), state, syCloseEvent() and syWordsClear().
Referenced by btEffectRunCastingImpact().
Definition at line 45 of file battle_effect_casting_impact.c.
btEffectRunCastingImpact
void btEffectRunCastingImpact(BATTLE_EFFECT_PARM *args, Sint32 mode)
Gathers sparks around the caster, launches the Djinni and draws the impact on the first target.
Abilities: Bane; Smog; Mist; Fever; Flint; Scorch; Squall; Sap; Terra Strike; Poison Cloud; Deadly Poison; Mortal Danger, Death Size; Bad Omen; Life Nourish; Aqua Sock; Frost Bite; Life Leech; Psy Leech; Broil; Meltdown; Heat Mirage, Heat Flash; Barrage; Acid Bath; Stun Voltage; Blinding Smog; Murk; Cyclone Slash; Psyphon Seal; Asura; Forcible Arm; Truncheon Fist; Severe Blow.






References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, BattleEffectPuffArcPictureBiasY, BattleEffectPuffArcPictureHeights, BattleEffectPuffArcPictures, BattleEffectPuffArcPictureWidths, btCameraShake(), btCastingImpactEndPrelude(), btEffectArmBg2AffineHBlankDMA(), btEffectBuildCanvasBlitters(), btEffectPackYellowOrbs(), btEffectRunImpair(), btEffectRunMysticFlame(), btEffectRunProjectileVolley(), btEffectRunSparkGroups(), btEffectStartCanvasLayer(), btEffectStartTiledCanvas(), btEffectStepPaletteToResource(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btProjectionScaledUnit(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), CastingImpactGlintDrawFlags, CastingImpactIceChipPictures, fdActorSelectAnimationStub(), fdActorSetAnimationSpeedStub(), HeapSlots, ReaperPictureY, Sint32, state, syCloseEvent(), syCos(), syHeapSlotRelease(), syInitMatrix(), syRandom(), syRotX(), syRotY(), syRotZ(), sySetEvent(), sySin(), sySoundPlayStub(), syWordsClear(), syWordsFill() and width.
Referenced by btEffectRunByIdRange().
Definition at line 203 of file battle_effect_casting_impact.c.