Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_hail.c

Hail and Ground, and the battle camera's shakes. More…

Included by battle_effect.c.

Macros

NameDescription
#defineHAIL_CHIPS 64ice chips in PARTICLES
#defineGROUND_TICKS 96ticks of Ground
#defineHAIL_TICKS 64ticks of Hail
#defineHAIL_FADE_TICKS 16Hail's last ticks, fading the canvas out
#defineHAIL_CHIP_PICTURES
#definePORTAL_WIDTH 24PortalSheet's portal
#definePORTAL_HEIGHT 48
#defineHAIL_DJINNI_PICTURE 26048the small Mercury Djinni
#defineGROUND_DJINNI_PICTURE 26048The small Venus Djinni in the portal sprite sheet.
#defineGROUND_FIRST_CRACKLE 32The crackles round the portals, four a portal, in state->particles from GROUND_FIRST_CRACKLE.
#defineGROUND_CRACKLES 32
#defineGROUND_CRACKLES_PER_PORTAL 4
#defineGROUND_PORTALS 6

Functions

NameDescription
voidbtEffectRunHail (BATTLE_EFFECT_PARM *args)After a Mercury Djinni enters, ice chips burst out of the first target and waves of water rise along the bottom of the screen.
voidbtEffectRunGround (BATTLE_EFFECT_PARM *args)After a Venus Djinni enters, six glowing portals leave the user, swirl and close in on the first target, each striking it as it arrives.
voidbtCameraShake (Sint32 rangeX, Uint32 rangeY)Shakes the battle view while the effect's shake lasts: BG1 and the projection's centre move by a random offset each tick, and once the shake runs out BG1 goes back to where it was.
voidbtCameraApplyVerticalShake (Sint32 range)Shakes the battle view up and down only, by a random offset within range, while the effect's shake lasts.

Description

Hail and Ground, and the battle camera's shakes. Part of battle_effect.c.

Macros in detail

HAIL_CHIPS

#define HAIL_CHIPS 64

ice chips in PARTICLES

Referenced by btEffectRunHail().

Definition at line 3 of file battle_effect_hail.c.

GROUND_TICKS

#define GROUND_TICKS 96

ticks of Ground

Referenced by btEffectRunGround().

Definition at line 5 of file battle_effect_hail.c.

HAIL_TICKS

#define HAIL_TICKS 64

ticks of Hail

Referenced by btEffectRunHail().

Definition at line 6 of file battle_effect_hail.c.

HAIL_FADE_TICKS

#define HAIL_FADE_TICKS 16

Hail's last ticks, fading the canvas out

Referenced by btEffectRunHail().

Definition at line 7 of file battle_effect_hail.c.

HAIL_CHIP_PICTURES

#define HAIL_CHIP_PICTURES

Referenced by btEffectRunHail().

Definition at line 9 of file battle_effect_hail.c.

PORTAL_WIDTH

#define PORTAL_WIDTH 24

PortalSheet's portal

Referenced by btEffectRunGround().

Definition at line 11 of file battle_effect_hail.c.

PORTAL_HEIGHT

#define PORTAL_HEIGHT 48

Referenced by btEffectRunGround().

Definition at line 12 of file battle_effect_hail.c.

HAIL_DJINNI_PICTURE

#define HAIL_DJINNI_PICTURE 26048

the small Mercury Djinni

Referenced by btEffectRunHail().

Definition at line 13 of file battle_effect_hail.c.

GROUND_DJINNI_PICTURE

#define GROUND_DJINNI_PICTURE 26048

The small Venus Djinni in the portal sprite sheet.

Referenced by btEffectRunGround().

Definition at line 187 of file battle_effect_hail.c.

GROUND_FIRST_CRACKLE

#define GROUND_FIRST_CRACKLE 32

The crackles round the portals, four a portal, in state->particles from GROUND_FIRST_CRACKLE.

Referenced by btEffectRunGround().

Definition at line 190 of file battle_effect_hail.c.

GROUND_CRACKLES

#define GROUND_CRACKLES 32

Referenced by btEffectRunGround().

Definition at line 191 of file battle_effect_hail.c.

GROUND_CRACKLES_PER_PORTAL

#define GROUND_CRACKLES_PER_PORTAL 4

Referenced by btEffectRunGround().

Definition at line 192 of file battle_effect_hail.c.

GROUND_PORTALS

#define GROUND_PORTALS 6

Referenced by btEffectRunGround().

Definition at line 193 of file battle_effect_hail.c.

Functions in detail

btEffectRunHail

void btEffectRunHail(BATTLE_EFFECT_PARM *args)

After a Mercury Djinni enters, ice chips burst out of the first target and waves of water rise along the bottom of the screen.

Abilities: Hail.

References btCameraShake(), btEffectBuildCanvasBlitters(), btEffectPosProjectBattler(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), HailPictureHeights, HailPictures, HailPictureWidths, Sint32, syCos(), syRandom() and sySin().

Referenced by BattleEffectHandlers.

Definition at line 19 of file battle_effect_hail.c.

btEffectRunGround

void btEffectRunGround(BATTLE_EFFECT_PARM *args)

After a Venus Djinni enters, six glowing portals leave the user, swirl and close in on the first target, each striking it as it arrives.

Abilities: Ground.

References btCameraShake(), btEffectPosProjectPoint(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btEffectStepPaletteToResource(), btObjectGetStub(), btResourceLoadAndDecompress(), GroundCrackleFlips, GroundPortalHeights, GroundPortalPictures, GroundPortalWidths, GroundPortalX, GroundPortalY, Sint32, syCos(), syHeapSlotRelease(), syRandom(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 199 of file battle_effect_hail.c.

btCameraShake

void btCameraShake(Sint32 rangeX, Uint32 rangeY)

Shakes the battle view while the effect's shake lasts: BG1 and the projection's centre move by a random offset each tick, and once the shake runs out BG1 goes back to where it was.

rangeX, rangeY: the offsets' ranges, powers of two. Both offsets are centred
                                on half of rangeY, so with rangeX the smaller
the view only shakes to the left.

References BgScrollWork, ProjectionWork, Sint32 and syRandom().

Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBallLightning(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBoreas(), btEffectRunBreaths(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCondemn(), btEffectRunCool(), btEffectRunCrescentSlash(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunDeathPlunge(), btEffectRunDiamondBerg(), btEffectRunDjinniCharge(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunElementCards(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFire(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunFroth(), btEffectRunFume(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunGeyser(), btEffectRunGround(), btEffectRunGrowingColumns(), btEffectRunHail(), btEffectRunHaures(), btEffectRunHeartbreak(), btEffectRunHeavyBlow(), btEffectRunHelmSplitter(), btEffectRunHurricane() and 61 more.

Definition at line 430 of file battle_effect_hail.c.

btCameraApplyVerticalShake

void btCameraApplyVerticalShake(Sint32 range)

Shakes the battle view up and down only, by a random offset within range, while the effect's shake lasts.

References BgScrollWork, ProjectionWork, Sint32 and syRandom().

Referenced by btEffectRunCatastrophe(), btEffectRunCharon() and btEffectRunOdyssey().

Definition at line 456 of file battle_effect_hail.c.