Projectile volleys (Slash, Shuriken, Wing Flutter, Blizzard ...). More...
Go to the source code of this file.
Macros | |
| #define | PROJECTILE_VOLLEY_ANIMATION_STEP_FAST 0x30 |
| the user's, while firing | |
| #define | PROJECTILE_VOLLEY_ANIMATION_STEP_NORMAL 0x10 |
| The user's animation step after the volley: the usual speed. | |
| #define | PROJECTILE_VOLLEY_PARTICLE_COUNT 1024 |
| PARTICLES holds the hit flashes from 0, the sparks from 100 and the fireball trails from 512. | |
| #define | PROJECTILE_VOLLEY_COMET_CELLS 0x1000 |
| comets: the top half of each | |
| #define | PROJECTILE_VOLLEY_STREAK_CELLS 0x2000 |
| wind streaks | |
| #define | PROJECTILE_VOLLEY_FLASH_TURNED 0x128a |
| The hit flashes turned on their side, after the upright ones. | |
| #define | PROJECTILE_VOLLEY_MEDIUM_SPARK_CELLS (12 * 8) |
| The yellow spark sheet: the small spark (12x8) first, then the medium one (18x13), then the large one. | |
| #define | PROJECTILE_VOLLEY_LARGE_SPARK_CELLS (12 * 8 + 18 * 13) |
| #define | PROJECTILE_VOLLEY_DJINNI_CELLS 0x65c0 |
| the small Mercury djinni | |
| #define | PROJECTILE_VOLLEY_FIRST_SPARK 100 |
| the first spark in PARTICLES | |
| #define | PROJECTILE_VOLLEY_FIRST_TRAIL 512 |
| the first trail in PARTICLES | |
Enumerations | |
| enum | VolleyField { PROJECTILE_VOLLEY_SHOTS , PROJECTILE_VOLLEY_STEPS , PROJECTILE_VOLLEY_STAGGER , PROJECTILE_VOLLEY_DELAY , PROJECTILE_VOLLEY_SPARKS } |
| The bytes of a gProjectiles_Modes row. More... | |
Functions | |
| void | BattleFx_RunDjinniEntrance (struct BattleEffectArgument *effect, s32 mode, s32 side, s32 anchor, s32 *outX, s32 *outY) |
| Djinni entrance: sparks swirl around a point that travels from the user to the goal and gather into the Djinni, which sways for 16 frames and bursts into motes. | |
| void | BattleFx_RunSlash (struct BattleEffectArgument *effect) |
| Six comets fly at each target, three frames apart, and burst into a flash and sparks; the effect's variant picks one of three comets. | |
| void | BattleFx_RunShuriken (struct BattleEffectArgument *effect) |
| Four spinning shurikens fly at each target, five frames apart, and vanish once past it. | |
| void | BattleFx_RunCrazyVoice (struct BattleEffectArgument *effect) |
| Ten pellets fly slowly at each target and bounce off it, up or down at random. | |
| void | BattleFx_RunWingFlutter (struct BattleEffectArgument *effect) |
| Five yellow sparks fly level at each target, five frames apart. | |
| void | BattleFx_RunWingStroke (struct BattleEffectArgument *effect) |
| Ten large yellow sparks stream level at each target, one a frame, spread up and down. | |
| void | BattleFx_RunWingBeat (struct BattleEffectArgument *effect) |
| Ten small yellow sparks stream level at each target, one a frame. | |
| static void | BattleFx_RunVolleyWithAction (struct BattleEffectArgument *effect, s32 mode) |
| Puts the user into its action pose (2) and fires the volley in this mode while its animation runs fast. | |
| void | BattleFx_RunCuttingEdge (struct BattleEffectArgument *effect) |
| From the user's action pose, one large comet in ice colours flies at each target and bursts into 80 sparks. | |
| void | BattleFx_RunHeatWave (struct BattleEffectArgument *effect) |
| From the user's action pose, seven fireballs trailing embers fly at each target, two frames apart, each bursting into 40 sparks. | |
| void | BattleFx_RunSleet (struct BattleEffectArgument *effect) |
| Thirty ice chips fall from high above the user onto each target, without shaking the screen or knocking the target back; the battle shows the damage on frame 48. | |
| void | BattleFx_RunIceBlessing (struct BattleEffectArgument *effect) |
| Sixty ice chips stream at each target, one a frame, without knocking it back. | |
| void | BattleFx_RunBlizzard (struct BattleEffectArgument *effect) |
| From the user's action pose, sixty ice chips stream at each target, one a frame, scattered up and down, without knocking it back. | |
| void | BattleFx_RunProjectileVolley (struct BattleEffectArgument *effect, s32 mode) |
| Projectile volley: shots fly from the user to each target and burst into a flash and sparks when they pass it. | |
| UNUSED void | BattleFx_InitializeRisingObject (s32 id) |
| Sends a battler back to its place (its anchor) with a hop. | |
| void | BattleFx_SetApproachMotion (s32 id, s32 targetId, s32 frames) |
| Moves a battler 80% of the way to another one over a number of frames, in its action pose. | |
Projectile volleys (Slash, Shuriken, Wing Flutter, Blizzard ...).
Part of effect.c, the battle effect object, compiled only through it.
Definition in file projectiles.c.
| #define PROJECTILE_VOLLEY_ANIMATION_STEP_FAST 0x30 |
the user's, while firing
Definition at line 260 of file projectiles.c.
Referenced by BattleFx_RunVolleyWithAction().
| #define PROJECTILE_VOLLEY_ANIMATION_STEP_NORMAL 0x10 |
The user's animation step after the volley: the usual speed.
Definition at line 262 of file projectiles.c.
Referenced by BattleFx_RunVolleyWithAction().
| #define PROJECTILE_VOLLEY_PARTICLE_COUNT 1024 |
PARTICLES holds the hit flashes from 0, the sparks from 100 and the fireball trails from 512.
Definition at line 361 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_COMET_CELLS 0x1000 |
comets: the top half of each
Definition at line 373 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_STREAK_CELLS 0x2000 |
wind streaks
Definition at line 374 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_FLASH_TURNED 0x128a |
The hit flashes turned on their side, after the upright ones.
Definition at line 376 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_MEDIUM_SPARK_CELLS (12 * 8) |
The yellow spark sheet: the small spark (12x8) first, then the medium one (18x13), then the large one.
Definition at line 379 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_LARGE_SPARK_CELLS (12 * 8 + 18 * 13) |
Definition at line 380 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_DJINNI_CELLS 0x65c0 |
the small Mercury djinni
Definition at line 381 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_FIRST_SPARK 100 |
the first spark in PARTICLES
Definition at line 382 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| #define PROJECTILE_VOLLEY_FIRST_TRAIL 512 |
the first trail in PARTICLES
Definition at line 383 of file projectiles.c.
Referenced by BattleFx_RunProjectileVolley().
| enum VolleyField |
The bytes of a gProjectiles_Modes row.
Definition at line 364 of file projectiles.c.
| void BattleFx_RunDjinniEntrance | ( | struct BattleEffectArgument * | effect, |
| s32 | mode, | ||
| s32 | side, | ||
| s32 | anchor, | ||
| s32 * | outX, | ||
| s32 * | outY ) |
Djinni entrance: sparks swirl around a point that travels from the user to the goal and gather into the Djinni, which sways for 16 frames and bursts into motes.
Leaves the canvas cleared for the effect that follows.
The prelude of the stat boosts, the projectile volleys, the healing motes, the Djinn beams, the burst scenes, Bind, Hail, Ground, Torch and Vine, called with the work block they then use. Opens the canvas layer but does not close it: it removes the transfer and palette fade callbacks, frees both blitters, clears the canvas and its VRAM, and sets REG_BLDALPHA back to 16/16. Copies the Djinni's palette over the first 128 bytes of BG palette RAM, starts a 24-frame backdrop fade (work->fadeFrames), and uses PARTICLES 0 to 63 for the sparks and work->particles for the motes.
effect: the user and the targets. mode: the Djinni: 0 Venus, 1 Mercury, 2 Mars, 3 Jupiter; 4 to 7 the same over 84 frames instead of 64. side: 1 mirrors the pictures. anchor: where the Djinni appears: 0 over the first target, 1 at the first target's x at depth 0, 2 over the user, 3 at the user's x at depth 0, 4 in the centre of the field. outX, outY: receive the Djinni's last screen position.
Definition at line 29 of file projectiles.c.
Referenced by BattleFx_RunBind(), BattleFx_RunBurstScene(), BattleFx_RunDjinnBeams(), BattleFx_RunDjinniEntrance(), BattleFx_RunGround(), BattleFx_RunHail(), BattleFx_RunHealingMotes(), BattleFx_RunKite(), BattleFx_RunProjectileVolley(), BattleFx_RunStatBoost(), BattleFx_RunTorch(), and BattleFx_RunVine().
| void BattleFx_RunSlash | ( | struct BattleEffectArgument * | effect | ) |
Six comets fly at each target, three frames apart, and burst into a flash and sparks; the effect's variant picks one of three comets.
Abilities: Slash, Wind Slash, Sonic Slash (kind 19).
Definition at line 268 of file projectiles.c.
Referenced by BattleFx_RunSlash().
| void BattleFx_RunShuriken | ( | struct BattleEffectArgument * | effect | ) |
Four spinning shurikens fly at each target, five frames apart, and vanish once past it.
Abilities: Shuriken (kind 54).
Definition at line 275 of file projectiles.c.
Referenced by BattleFx_RunShuriken().
| void BattleFx_RunCrazyVoice | ( | struct BattleEffectArgument * | effect | ) |
Ten pellets fly slowly at each target and bounce off it, up or down at random.
Abilities: Crazy Voice (kind 303).
Definition at line 282 of file projectiles.c.
Referenced by BattleFx_RunCrazyVoice().
| void BattleFx_RunWingFlutter | ( | struct BattleEffectArgument * | effect | ) |
Five yellow sparks fly level at each target, five frames apart.
Abilities: Wing Flutter (kind 307).
Definition at line 288 of file projectiles.c.
Referenced by BattleFx_RunWingFlutter().
| void BattleFx_RunWingStroke | ( | struct BattleEffectArgument * | effect | ) |
Ten large yellow sparks stream level at each target, one a frame, spread up and down.
Abilities: Wing Stroke (kind 381).
Definition at line 295 of file projectiles.c.
Referenced by BattleFx_RunWingStroke().
| void BattleFx_RunWingBeat | ( | struct BattleEffectArgument * | effect | ) |
Ten small yellow sparks stream level at each target, one a frame.
Abilities: Wing Beat (kind 306).
Definition at line 301 of file projectiles.c.
Referenced by BattleFx_RunWingBeat().
|
inlinestatic |
Puts the user into its action pose (2) and fires the volley in this mode while its animation runs fast.
Called by Cutting Edge, Heat Wave and Blizzard. Leaves the user in its action pose, its animation back at the usual speed.
Definition at line 310 of file projectiles.c.
Referenced by BattleFx_RunBlizzard(), BattleFx_RunCuttingEdge(), BattleFx_RunHeatWave(), and BattleFx_RunVolleyWithAction().
| void BattleFx_RunCuttingEdge | ( | struct BattleEffectArgument * | effect | ) |
From the user's action pose, one large comet in ice colours flies at each target and bursts into 80 sparks.
Abilities: Cutting Edge (kind 57).
Definition at line 326 of file projectiles.c.
Referenced by BattleFx_RunCuttingEdge().
| void BattleFx_RunHeatWave | ( | struct BattleEffectArgument * | effect | ) |
From the user's action pose, seven fireballs trailing embers fly at each target, two frames apart, each bursting into 40 sparks.
Abilities: Heat Wave (kind 59).
Definition at line 333 of file projectiles.c.
Referenced by BattleFx_RunHeatWave().
| void BattleFx_RunSleet | ( | struct BattleEffectArgument * | effect | ) |
Thirty ice chips fall from high above the user onto each target, without shaking the screen or knocking the target back; the battle shows the damage on frame 48.
Abilities: Sleet (kind 205).
Definition at line 341 of file projectiles.c.
Referenced by BattleFx_RunSleet().
| void BattleFx_RunIceBlessing | ( | struct BattleEffectArgument * | effect | ) |
Sixty ice chips stream at each target, one a frame, without knocking it back.
Abilities: Ice Blessing (kind 402).
Definition at line 348 of file projectiles.c.
Referenced by BattleFx_RunIceBlessing().
| void BattleFx_RunBlizzard | ( | struct BattleEffectArgument * | effect | ) |
From the user's action pose, sixty ice chips stream at each target, one a frame, scattered up and down, without knocking it back.
Abilities: Blizzard (kind 63).
Definition at line 355 of file projectiles.c.
Referenced by BattleFx_RunBlizzard().
| void BattleFx_RunProjectileVolley | ( | struct BattleEffectArgument * | effect, |
| s32 | mode ) |
Projectile volley: shots fly from the user to each target and burst into a flash and sparks when they pass it.
The hit sound plays at most once every 8 frames.
Called by the eleven wrappers above, and by casting impacts 15 (mode 9) and 26 (mode 8, which no wrapper uses) once their prelude ends. With more than 63 shots in all it fires at the first target only, writing work->effect->count. Writes REG_BLDCNT in mode 1 and the first 128 bytes of BG palette RAM in modes 2 and 5; sets work->shakeFrames on each hit but in mode 7. Ends with the transfer callback removed, the blitter freed and the canvas layer closed; the second blitter is built and freed for each picture that needs it.
effect: the user and the targets. variant picks the comet in mode 0 (mode 5 always uses comet 2, mode 8 comet 0); with prelude 1 a Mercury Djinni enters first. mode: the shot and its flight (0 to 11): 0, 5 and 8 comets (5 in the ice palette), 1 shurikens, 2 bouncing pellets, 3, 4 and 11 yellow sparks, 6 fireballs with trails, 7, 9 and 10 ice chips.
Definition at line 404 of file projectiles.c.
Referenced by BattleFx_RunCastingImpact(), BattleFx_RunCrazyVoice(), BattleFx_RunIceBlessing(), BattleFx_RunProjectileVolley(), BattleFx_RunShuriken(), BattleFx_RunSlash(), BattleFx_RunSleet(), BattleFx_RunVolleyWithAction(), BattleFx_RunWingBeat(), BattleFx_RunWingFlutter(), and BattleFx_RunWingStroke().
Sends a battler back to its place (its anchor) with a hop.
Nothing calls it; ObjMotRst (battle/motion.c) sets the same motion without the hop. Sets the battler's motion object to move at up to 8 pixels a frame, jumping at 4 pixels a frame under the usual gravity, and selects its animation 1.
Definition at line 960 of file projectiles.c.
Referenced by BattleFx_InitializeRisingObject().
Moves a battler 80% of the way to another one over a number of frames, in its action pose.
The speed is that distance over the frames; the distance is taken in 1/256 pixels so its square fits in 32 bits.
Called by BattleFx_RunRushingStrike. Sets the battler's acceleration, speed limit and gravity, turns it to face its motion, starts it moving on the ground towards that point and selects its animation 2.
Definition at line 984 of file projectiles.c.
Referenced by BattleFx_RunRushingStrike(), and BattleFx_SetApproachMotion().