Alchemy
Loading...
Searching...
No Matches

hail.c File Reference

Hail and Ground. More...

Go to the source code of this file.

Macros

#define HAIL_CHIP_COUNT   64
 ice chips
#define HAIL_CHIP_CELLS   0x400
 the ice chips, after the 32x32 wave
#define HAIL_DJINNI_CELLS   0x65c0
 the small Mercury Djinni
#define HAIL_FRAMES   64
#define GROUND_DJINNI_CELLS   0x65c0
 The small Venus Djinni in the rock toss's sheet.
#define GROUND_FRAMES   96
#define GROUND_LAUNCHED   8
 rocks launched
#define GROUND_CHIPS   32
 chip slots
#define GROUND_ROCKS   6
 rocks thrown
#define GROUND_CHIPS_PER_ROCK   4
 chips each rock sheds

Functions

void BattleFx_RunHail (struct BattleEffectArgument *effect)
 Water burst: after a Mercury Djinni enters, ice chips burst out of the first target and waves rise along the bottom of the screen; the canvas fades out over the last 16 of its 64 frames.
void BattleFx_RunGround (struct BattleEffectArgument *effect)
 Venus Djinni rock toss: after a Venus Djinni enters, six rocks rise from the user shedding chips, swirl, and home in on the first target, each hitting it as it lands.
void Camera_ApplyShake (s32 rangeX, u32 rangeY)
 Shakes the battle view while gBattleFxWork's shakeFrames lasts, moving BG1 and the projection centre by a random offset; once the shake runs out, BG1 returns to its saved position and the centre to (120, 120).

Detailed Description

Hail and Ground.

Part of effect.c, the battle effect object, compiled only through it.

Definition in file hail.c.

Macro Definition Documentation

◆ HAIL_CHIP_COUNT

#define HAIL_CHIP_COUNT   64

ice chips

Definition at line 7 of file hail.c.

Referenced by BattleFx_RunHail().

◆ HAIL_CHIP_CELLS

#define HAIL_CHIP_CELLS   0x400

the ice chips, after the 32x32 wave

Definition at line 9 of file hail.c.

Referenced by BattleFx_RunHail().

◆ HAIL_DJINNI_CELLS

#define HAIL_DJINNI_CELLS   0x65c0

the small Mercury Djinni

Definition at line 10 of file hail.c.

Referenced by BattleFx_RunHail().

◆ HAIL_FRAMES

#define HAIL_FRAMES   64

Definition at line 12 of file hail.c.

Referenced by BattleFx_RunHail().

◆ GROUND_DJINNI_CELLS

#define GROUND_DJINNI_CELLS   0x65c0

The small Venus Djinni in the rock toss's sheet.

Definition at line 164 of file hail.c.

Referenced by BattleFx_RunGround().

◆ GROUND_FRAMES

#define GROUND_FRAMES   96

Definition at line 166 of file hail.c.

Referenced by BattleFx_RunGround().

◆ GROUND_LAUNCHED

#define GROUND_LAUNCHED   8

rocks launched

Definition at line 167 of file hail.c.

Referenced by BattleFx_RunGround().

◆ GROUND_CHIPS

#define GROUND_CHIPS   32

chip slots

Definition at line 168 of file hail.c.

Referenced by BattleFx_RunGround().

◆ GROUND_ROCKS

#define GROUND_ROCKS   6

rocks thrown

Definition at line 169 of file hail.c.

Referenced by BattleFx_RunGround().

◆ GROUND_CHIPS_PER_ROCK

#define GROUND_CHIPS_PER_ROCK   4

chips each rock sheds

Definition at line 170 of file hail.c.

Referenced by BattleFx_RunGround().

Function Documentation

◆ BattleFx_RunHail()

void BattleFx_RunHail ( struct BattleEffectArgument * effect)

Water burst: after a Mercury Djinni enters, ice chips burst out of the first target and waves rise along the bottom of the screen; the canvas fades out over the last 16 of its 64 frames.

Abilities: Hail (kind 207).

The 64 chips start together and are let go four a frame from frame 4, alternately mirrored; the battle shows the damage on frame 8. The chips live in PARTICLES, since work holds the waves' sheet.

The Djinni entrance plays whatever the prelude. Writes REG_BLDALPHA and the first 128 bytes of BG palette RAM (the water spray's, then the ice chips' on frame 1), sets work->shakeFrames on frame 8, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.

effect: the user and the targets; prelude 1 keeps the Djinni circling.

Definition at line 30 of file hail.c.

Referenced by BattleFx_RunHail().

◆ BattleFx_RunGround()

void BattleFx_RunGround ( struct BattleEffectArgument * effect)

Venus Djinni rock toss: after a Venus Djinni enters, six rocks rise from the user shedding chips, swirl, and home in on the first target, each hitting it as it lands.

Abilities: Ground (kind 203).

A rock's variant is 1 while it flies and 0 once it has hit; the chips are particles 32 to 63, four for each rock, each with its picture in velocityX and its blitter flags in velocityY. The Djinni entrance plays whatever the prelude. From frame 17 the BG palette steps towards the portal sheet's (BattleFx_StepPaletteToResource). Writes REG_BLDALPHA, sets work->shakeFrames on each hit, and ends with the transfer callback removed, the blitter freed and the canvas layer closed.

effect: the user and the targets; prelude 1 keeps the Djinni circling.

Definition at line 187 of file hail.c.

Referenced by BattleFx_RunGround().

◆ Camera_ApplyShake()

void Camera_ApplyShake ( s32 rangeX,
u32 rangeY )

Shakes the battle view while gBattleFxWork's shakeFrames lasts, moving BG1 and the projection centre by a random offset; once the shake runs out, BG1 returns to its saved position and the centre to (120, 120).

It takes two random numbers each shaking frame, x first.

Called once a frame by nearly every effect, before it presents the frame. Writes gBgScroll[1] and gProjection.centerX and centerY, and counts down work->shakeFrames. The x offset is centred on half of rangeY too, so with rangeX smaller (Hail's 4 and 8) the x offset is never positive.

rangeX: the horizontal range, a power of two. rangeY: the vertical range, a power of two; both offsets are centred on half of it.

Definition at line 364 of file hail.c.

Referenced by BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBladeRain(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCybele(), BattleFx_RunDeathPlunge(), BattleFx_RunDragonCloud(), BattleFx_RunEruption(), BattleFx_RunFire(), BattleFx_RunFlashingStrike(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunHelmSplitter(), BattleFx_RunIce(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunLobbedShells(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunMirroredWall(), BattleFx_RunNeptune(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRushingStrike(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunSpire(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), and Camera_ApplyShake().