Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_vortices.c

Froth's bubbles that burst into whirling vortices, and Whirlwind's tornadoes. More…

Included by battle_effect.c.

Macros

NameDescription
#defineWHIRLWIND_TICKS 80
#defineFROTH_VORTEX_HALF_WIDTH 16The vortex sheet: three turns of the vortex's left half, drawn with its mirror beside it, then the bubble.
#defineFROTH_VORTEX_HALF_HEIGHT 64
#defineFROTH_VORTEX_TURNS 3
#defineFROTH_BUBBLE_PICTURE_WIDTH 12
#defineFROTH_BUBBLE_PICTURE_HEIGHT 24
#defineFROTH_BUBBLE_PICTURE
#defineFROTH_BUBBLE_SLOTS 30The bubbles set out in the effect's particles, of which each variant flies its FROTH_BUBBLE_COUNT; the targets' places follow from FROTH_FIRST_TARGET.
#defineFROTH_FIRST_TARGET 32
#defineFROTH_VORTEX_TICKS 16The ticks a vortex whirls where a bubble landed.
#defineWHIRLWIND_GLINTS_EACH 4The glints that sparkle on the tornadoes, four on each of at most four.
#defineWHIRLWIND_GLINTS (4 * WHIRLWIND_GLINTS_EACH)
#defineWHIRLWIND_GLINT_TICKS 6A glint shows three pictures, two ticks each, then starts again elsewhere on its tornado.
#defineWHIRLWIND_SWEEP_SWAY 16The sweep sways this far either way, a sway every 64 ticks, and each tornado turns round it every 32.
#defineWHIRLWIND_TORNADO_PICTURES GLINT_SET_BYTESThe tornado pictures, after the six glint pictures in the sheet: a tornado is three strips stacked, in three turns, the sheet holding each turn's top and bottom strips in pairs, then the three middle strips.
#defineWHIRLWIND_SECTION_BYTES PICTURE_BYTES(TORNADO_STRIP)

Functions

NameDescription
voidbtEffectRunFroth (BATTLE_EFFECT_PARM *args)Bubbles fly out of the user, hang, and home in on the targets; each that lands bursts into a whirling vortex, knocking back its target, while the camera swings round.
voidbtEffectRunWhirlwind (BATTLE_EFFECT_PARM *args)Tornadoes sweep across the targets, sparkling with glints, and the targets reel again and again.

Description

Froth's bubbles that burst into whirling vortices, and Whirlwind's tornadoes. Part of battle_effect.c.

Macros in detail

WHIRLWIND_TICKS

#define WHIRLWIND_TICKS 80

Referenced by btEffectRunWhirlwind().

Definition at line 4 of file battle_effect_vortices.c.

FROTH_VORTEX_HALF_WIDTH

#define FROTH_VORTEX_HALF_WIDTH 16

The vortex sheet: three turns of the vortex's left half, drawn with its mirror beside it, then the bubble.

Referenced by btEffectRunFroth().

Definition at line 8 of file battle_effect_vortices.c.

FROTH_VORTEX_HALF_HEIGHT

#define FROTH_VORTEX_HALF_HEIGHT 64

Referenced by btEffectRunFroth().

Definition at line 9 of file battle_effect_vortices.c.

FROTH_VORTEX_TURNS

#define FROTH_VORTEX_TURNS 3

Referenced by btEffectRunFroth().

Definition at line 10 of file battle_effect_vortices.c.

FROTH_BUBBLE_PICTURE_WIDTH

#define FROTH_BUBBLE_PICTURE_WIDTH 12

Referenced by btEffectRunFroth().

Definition at line 11 of file battle_effect_vortices.c.

FROTH_BUBBLE_PICTURE_HEIGHT

#define FROTH_BUBBLE_PICTURE_HEIGHT 24

Referenced by btEffectRunFroth().

Definition at line 12 of file battle_effect_vortices.c.

FROTH_BUBBLE_PICTURE

#define FROTH_BUBBLE_PICTURE

Referenced by btEffectRunFroth().

Definition at line 13 of file battle_effect_vortices.c.

FROTH_BUBBLE_SLOTS

#define FROTH_BUBBLE_SLOTS 30

The bubbles set out in the effect's particles, of which each variant flies its FROTH_BUBBLE_COUNT; the targets' places follow from FROTH_FIRST_TARGET.

Referenced by btEffectRunFroth().

Definition at line 17 of file battle_effect_vortices.c.

FROTH_FIRST_TARGET

#define FROTH_FIRST_TARGET 32

Referenced by btEffectRunFroth().

Definition at line 18 of file battle_effect_vortices.c.

FROTH_VORTEX_TICKS

#define FROTH_VORTEX_TICKS 16

The ticks a vortex whirls where a bubble landed.

Referenced by btEffectRunFroth().

Definition at line 20 of file battle_effect_vortices.c.

WHIRLWIND_GLINTS_EACH

#define WHIRLWIND_GLINTS_EACH 4

The glints that sparkle on the tornadoes, four on each of at most four.

Referenced by btEffectRunWhirlwind().

Definition at line 23 of file battle_effect_vortices.c.

WHIRLWIND_GLINTS

#define WHIRLWIND_GLINTS (4 * WHIRLWIND_GLINTS_EACH)

Referenced by btEffectRunWhirlwind().

Definition at line 24 of file battle_effect_vortices.c.

WHIRLWIND_GLINT_TICKS

#define WHIRLWIND_GLINT_TICKS 6

A glint shows three pictures, two ticks each, then starts again elsewhere on its tornado.

Referenced by btEffectRunWhirlwind().

Definition at line 27 of file battle_effect_vortices.c.

WHIRLWIND_SWEEP_SWAY

#define WHIRLWIND_SWEEP_SWAY 16

The sweep sways this far either way, a sway every 64 ticks, and each tornado turns round it every 32.

Referenced by btEffectRunWhirlwind().

Definition at line 30 of file battle_effect_vortices.c.

WHIRLWIND_TORNADO_PICTURES

#define WHIRLWIND_TORNADO_PICTURES GLINT_SET_BYTES

The tornado pictures, after the six glint pictures in the sheet: a tornado is three strips stacked, in three turns, the sheet holding each turn's top and bottom strips in pairs, then the three middle strips.

Referenced by btEffectRunWhirlwind().

Definition at line 35 of file battle_effect_vortices.c.

WHIRLWIND_SECTION_BYTES

#define WHIRLWIND_SECTION_BYTES PICTURE_BYTES(TORNADO_STRIP)

Referenced by btEffectRunWhirlwind().

Definition at line 36 of file battle_effect_vortices.c.

Functions in detail

btEffectRunFroth

void btEffectRunFroth(BATTLE_EFFECT_PARM *args)

Bubbles fly out of the user, hang, and home in on the targets; each that lands bursts into a whirling vortex, knocking back its target, while the camera swings round.

Abilities: Froth, Froth Sphere, Froth Spiral.

Froth
Froth
Froth Sphere
Froth Sphere
Froth Spiral
Froth Spiral

References btCameraApplyPhasedDelta(), btCameraShake(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btObjectGetStub(), btProjectionPoint(), btUnitGetEffectHeightStub(), Sint32, state, syCloseEvent(), syDecompressTaggedLZ(), syRandom(), syResourceGetTableEntry(), sySetEvent(), sySoundPlayStub(), syWordsCopy() and VorticesCounts.

Referenced by BattleEffectHandlers.

Definition at line 43 of file battle_effect_vortices.c.

btEffectRunWhirlwind

void btEffectRunWhirlwind(BATTLE_EFFECT_PARM *args)

Tornadoes sweep across the targets, sparkling with glints, and the targets reel again and again.

Abilities: Whirlwind, Tornado, Tempest, Gale, Typhoon, Hurricane.

Whirlwind
Whirlwind
Tornado
Tornado
Tempest
Tempest
Gale
Gale
Typhoon
Typhoon
Hurricane
Hurricane

References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, btCameraShake(), btEffectEndCanvasLayer(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), Sint32, state, syCloseEvent(), syCos(), syDecompressTaggedLZ(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub(), sySynch(), syWordsCopy(), syWordsFill() and VorticesShapes.

Referenced by BattleEffectHandlers.

Definition at line 213 of file battle_effect_vortices.c.