Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_whorl.c

The twisting column of Whorl, Gale, Lethe Albion, Poison Flow and Raging Flood, and the Djinn Core and Cannon. More…

Included by battle_effect.c.

Macros

NameDescription
#defineTWISTING_COLUMN_DJINN_TICKS 38The ticks Whorl and Gale last, and the others.
#defineTWISTING_COLUMN_TICKS 52
#defineTWISTING_COLUMN_CORNERS ((Sint8 (*)[2][4])RamMapMetatileBuffer)The column's rows of corners, two (x, y, z, pad) each, as the strip's quads join them: TWISTING_COLUMN_QUADS quads, one row more.
#defineTWISTING_COLUMN_QUADS 32
#defineTWISTING_COLUMN_ROWS (TWISTING_COLUMN_QUADS + 1)
#defineTWISTING_COLUMN_VERTICES (TWISTING_COLUMN_ROWS * 2)
#defineTWISTING_COLUMN_TRANSFORMED (RamMapMetatileBuffer + 4096)The column's transformed corners, its strip's mesh and the second sprite sheet, in the map cell buffer.
#defineTWISTING_COLUMN_MESH (RamMapMetatileBuffer + 8192)
#defineTWISTING_COLUMN_SHEET (RamMapMetatileBuffer + 16384)
#defineTWISTING_COLUMN_JUPITER_DJINN_SMALL_PICTURES 8192Where JupiterDjinnSmallSheet is decoded in the effect's pictures.
#defineTWISTING_COLUMN_FLASH_BURST 20480Where FlashBurstSheet is decoded in the map cell buffer.
#defineTWISTING_COLUMN_SAVED_TARGET 63The last particle keeps the target's position, and its scale in velocityX and velocityY, to restore when the column ends; the particles before it are the motes and flashes.
#defineTWISTING_COLUMN_MOTES 16The motes that trail the funnel of Whorl and Gale.
#defineTWISTING_COLUMN_BOB_STEP 3304The angle a tick the Jupiter Djinni's bob turns by as it rides the funnel, about 18 degrees: a bob every 20 ticks.
#defineTWISTING_COLUMN_DJINNI_SWAY 16How far the Jupiter Djinni sways to either side as it rides the funnel, a sway every 32 ticks.
#defineTWISTING_COLUMN_DRIFT_STEPS 128Whorl draws its target toward the Djinni, 1/128 of the way a tick at first, then 1/16 a tick as it shrinks toward a quarter of its size.
#defineTWISTING_COLUMN_LIFT_STEPS 16
#defineTWISTING_COLUMN_BAND_HALF_LENGTH 64Lethe Albion's and Raging Flood's bands of water: 128 pixels long and 48 wide, rippling up to 28 pixels from their axis, and stretched to about 2.09 times their length, wider than the screen.
#defineTWISTING_COLUMN_BAND_WIDTH 48
#defineTWISTING_COLUMN_BAND_RIPPLE 28
#defineTWISTING_COLUMN_BAND_STRETCH 137072
#defineTWISTING_COLUMN_SWIRL_STRETCH 85536
#defineTWISTING_COLUMN_STREAM_RIPPLE 64Poison Flow's stream ripples up to 64 pixels from its axis.
#defineTWISTING_COLUMN_FUNNEL_HALF_WIDTH 40Whorl's and Gale's funnel widens to 80 pixels and ripples up to 96 from its axis.
#defineTWISTING_COLUMN_FUNNEL_RIPPLE 96
#defineTWISTING_COLUMN_WAVE_RISE 64Lethe Albion's and Raging Flood's three bands of water rise TWISTING_COLUMN_WAVE_RISE pixels and settle again over the cast, half a turn of a sine.
#defineTWISTING_COLUMN_WAVE_RISE_STEP (TRIG_TURN / 2 / TWISTING_COLUMN_TICKS)
#defineTWISTING_COLUMN_LEAN 3096How far Whorl's and Gale's funnel turns about its length from the upright, about 17 degrees: it slants down from the top right onto the target.
#defineTWISTING_COLUMN_BAND_SHADE (-20)The column's brightest shades (RENDER_MODEL.shade), and the ticks it starts to fade out.
#defineTWISTING_COLUMN_FLOOD_SHADE (-8)
#defineTWISTING_COLUMN_FADE_TICK 46
#defineTWISTING_COLUMN_FUNNEL_FADE_TICK 30

Functions

NameDescription
voidbtEffectRunTwistingColumn (BATTLE_EFFECT_PARM *args, Uint32 mode)The twisting column shared by the Djinn Whorl and Gale, Lethe Albion, Poison Flow and Raging Flood, a textured strip turned about its length.
voidbtEffectRunCore (BATTLE_EFFECT_PARM *args)Abilities: Core.
voidbtEffectRunCannon (BATTLE_EFFECT_PARM *args)Abilities: Cannon.

Description

The twisting column of Whorl, Gale, Lethe Albion, Poison Flow and Raging Flood, and the Djinn Core and Cannon. Part of battle_effect.c.

Macros in detail

TWISTING_COLUMN_DJINN_TICKS

#define TWISTING_COLUMN_DJINN_TICKS 38

The ticks Whorl and Gale last, and the others.

Referenced by btEffectRunTwistingColumn().

Definition at line 5 of file battle_effect_whorl.c.

TWISTING_COLUMN_TICKS

#define TWISTING_COLUMN_TICKS 52

Referenced by btEffectRunTwistingColumn().

Definition at line 6 of file battle_effect_whorl.c.

TWISTING_COLUMN_CORNERS

#define TWISTING_COLUMN_CORNERS ((Sint8 (*)[2][4])RamMapMetatileBuffer)

The column's rows of corners, two (x, y, z, pad) each, as the strip's quads join them: TWISTING_COLUMN_QUADS quads, one row more. They are built at the start of the map cell buffer, which the transform reads as MapGridMetatileBuffer.

Referenced by btEffectRunTwistingColumn().

Definition at line 12 of file battle_effect_whorl.c.

TWISTING_COLUMN_QUADS

#define TWISTING_COLUMN_QUADS 32

Referenced by btEffectRunTwistingColumn().

Definition at line 13 of file battle_effect_whorl.c.

TWISTING_COLUMN_ROWS

#define TWISTING_COLUMN_ROWS (TWISTING_COLUMN_QUADS + 1)

Referenced by btEffectRunTwistingColumn().

Definition at line 14 of file battle_effect_whorl.c.

TWISTING_COLUMN_VERTICES

#define TWISTING_COLUMN_VERTICES (TWISTING_COLUMN_ROWS * 2)

Referenced by btEffectRunTwistingColumn().

Definition at line 15 of file battle_effect_whorl.c.

TWISTING_COLUMN_TRANSFORMED

#define TWISTING_COLUMN_TRANSFORMED (RamMapMetatileBuffer + 4096)

The column's transformed corners, its strip's mesh and the second sprite sheet, in the map cell buffer.

Referenced by btEffectRunTwistingColumn().

Definition at line 19 of file battle_effect_whorl.c.

TWISTING_COLUMN_MESH

#define TWISTING_COLUMN_MESH (RamMapMetatileBuffer + 8192)

Referenced by btEffectRunTwistingColumn().

Definition at line 20 of file battle_effect_whorl.c.

TWISTING_COLUMN_SHEET

#define TWISTING_COLUMN_SHEET (RamMapMetatileBuffer + 16384)

Referenced by btEffectRunTwistingColumn().

Definition at line 21 of file battle_effect_whorl.c.

TWISTING_COLUMN_JUPITER_DJINN_SMALL_PICTURES

#define TWISTING_COLUMN_JUPITER_DJINN_SMALL_PICTURES 8192

Where JupiterDjinnSmallSheet is decoded in the effect's pictures.

Referenced by btEffectRunTwistingColumn().

Definition at line 24 of file battle_effect_whorl.c.

TWISTING_COLUMN_FLASH_BURST

#define TWISTING_COLUMN_FLASH_BURST 20480

Where FlashBurstSheet is decoded in the map cell buffer.

Referenced by btEffectRunTwistingColumn().

Definition at line 27 of file battle_effect_whorl.c.

TWISTING_COLUMN_SAVED_TARGET

#define TWISTING_COLUMN_SAVED_TARGET 63

The last particle keeps the target's position, and its scale in velocityX and velocityY, to restore when the column ends; the particles before it are the motes and flashes.

Referenced by btEffectRunTwistingColumn().

Definition at line 32 of file battle_effect_whorl.c.

TWISTING_COLUMN_MOTES

#define TWISTING_COLUMN_MOTES 16

The motes that trail the funnel of Whorl and Gale.

Referenced by btEffectRunTwistingColumn().

Definition at line 35 of file battle_effect_whorl.c.

TWISTING_COLUMN_BOB_STEP

#define TWISTING_COLUMN_BOB_STEP 3304

The angle a tick the Jupiter Djinni's bob turns by as it rides the funnel, about 18 degrees: a bob every 20 ticks.

Referenced by btEffectRunTwistingColumn().

Definition at line 39 of file battle_effect_whorl.c.

TWISTING_COLUMN_DJINNI_SWAY

#define TWISTING_COLUMN_DJINNI_SWAY 16

How far the Jupiter Djinni sways to either side as it rides the funnel, a sway every 32 ticks.

Referenced by btEffectRunTwistingColumn().

Definition at line 43 of file battle_effect_whorl.c.

TWISTING_COLUMN_DRIFT_STEPS

#define TWISTING_COLUMN_DRIFT_STEPS 128

Whorl draws its target toward the Djinni, 1/128 of the way a tick at first, then 1/16 a tick as it shrinks toward a quarter of its size.

Referenced by btEffectRunTwistingColumn().

Definition at line 47 of file battle_effect_whorl.c.

TWISTING_COLUMN_LIFT_STEPS

#define TWISTING_COLUMN_LIFT_STEPS 16

Referenced by btEffectRunTwistingColumn().

Definition at line 48 of file battle_effect_whorl.c.

TWISTING_COLUMN_BAND_HALF_LENGTH

#define TWISTING_COLUMN_BAND_HALF_LENGTH 64

Lethe Albion's and Raging Flood's bands of water: 128 pixels long and 48 wide, rippling up to 28 pixels from their axis, and stretched to about 2.09 times their length, wider than the screen. Their swirls are squares stretched to about 1.31 across and flattened to half their height.

Referenced by btEffectRunTwistingColumn().

Definition at line 54 of file battle_effect_whorl.c.

TWISTING_COLUMN_BAND_WIDTH

#define TWISTING_COLUMN_BAND_WIDTH 48

Referenced by btEffectRunTwistingColumn().

Definition at line 55 of file battle_effect_whorl.c.

TWISTING_COLUMN_BAND_RIPPLE

#define TWISTING_COLUMN_BAND_RIPPLE 28

Referenced by btEffectRunTwistingColumn().

Definition at line 56 of file battle_effect_whorl.c.

TWISTING_COLUMN_BAND_STRETCH

#define TWISTING_COLUMN_BAND_STRETCH 137072

Referenced by btEffectRunTwistingColumn().

Definition at line 57 of file battle_effect_whorl.c.

TWISTING_COLUMN_SWIRL_STRETCH

#define TWISTING_COLUMN_SWIRL_STRETCH 85536

Referenced by btEffectRunTwistingColumn().

Definition at line 58 of file battle_effect_whorl.c.

TWISTING_COLUMN_STREAM_RIPPLE

#define TWISTING_COLUMN_STREAM_RIPPLE 64

Poison Flow's stream ripples up to 64 pixels from its axis.

Referenced by btEffectRunTwistingColumn().

Definition at line 61 of file battle_effect_whorl.c.

TWISTING_COLUMN_FUNNEL_HALF_WIDTH

#define TWISTING_COLUMN_FUNNEL_HALF_WIDTH 40

Whorl's and Gale's funnel widens to 80 pixels and ripples up to 96 from its axis.

Referenced by btEffectRunTwistingColumn().

Definition at line 65 of file battle_effect_whorl.c.

TWISTING_COLUMN_FUNNEL_RIPPLE

#define TWISTING_COLUMN_FUNNEL_RIPPLE 96

Referenced by btEffectRunTwistingColumn().

Definition at line 66 of file battle_effect_whorl.c.

TWISTING_COLUMN_WAVE_RISE

#define TWISTING_COLUMN_WAVE_RISE 64

Lethe Albion's and Raging Flood's three bands of water rise TWISTING_COLUMN_WAVE_RISE pixels and settle again over the cast, half a turn of a sine.

Referenced by btEffectRunTwistingColumn().

Definition at line 71 of file battle_effect_whorl.c.

TWISTING_COLUMN_WAVE_RISE_STEP

#define TWISTING_COLUMN_WAVE_RISE_STEP (TRIG_TURN / 2 / TWISTING_COLUMN_TICKS)

Referenced by btEffectRunTwistingColumn().

Definition at line 72 of file battle_effect_whorl.c.

TWISTING_COLUMN_LEAN

#define TWISTING_COLUMN_LEAN 3096

How far Whorl's and Gale's funnel turns about its length from the upright, about 17 degrees: it slants down from the top right onto the target.

Referenced by btEffectRunTwistingColumn().

Definition at line 76 of file battle_effect_whorl.c.

TWISTING_COLUMN_BAND_SHADE

#define TWISTING_COLUMN_BAND_SHADE (-20)

The column's brightest shades (RENDER_MODEL.shade), and the ticks it starts to fade out.

Referenced by btEffectRunTwistingColumn().

Definition at line 80 of file battle_effect_whorl.c.

TWISTING_COLUMN_FLOOD_SHADE

#define TWISTING_COLUMN_FLOOD_SHADE (-8)

Referenced by btEffectRunTwistingColumn().

Definition at line 81 of file battle_effect_whorl.c.

TWISTING_COLUMN_FADE_TICK

#define TWISTING_COLUMN_FADE_TICK 46

Referenced by btEffectRunTwistingColumn().

Definition at line 82 of file battle_effect_whorl.c.

TWISTING_COLUMN_FUNNEL_FADE_TICK

#define TWISTING_COLUMN_FUNNEL_FADE_TICK 30

Referenced by btEffectRunTwistingColumn().

Definition at line 83 of file battle_effect_whorl.c.

Functions in detail

btEffectRunTwistingColumn

void btEffectRunTwistingColumn(BATTLE_EFFECT_PARM *args, Uint32 mode)

The twisting column shared by the Djinn Whorl and Gale, Lethe Albion, Poison Flow and Raging Flood, a textured strip turned about its length. For the Djinn the Jupiter Djinni rides the head of a pink funnel of wind that sweeps down on the target, carrying it up (Whorl) or blowing it away (Gale); Poison Flow's red stream sweeps out from the caster through the targets; and Lethe Albion's and Raging Flood's three bands of water surge up over the targets' side and settle, as clouds of spray burst from the target and two swirls (Lethe Albion's runes) spin out over it.

References BattleEffectGroundSquareCorners, BattleEffectSquareMesh, btCameraShake(), btEffectEndCanvasLayer(), btEffectPosProjectBattler(), btEffectPosProjectPoint(), btEffectPosProjectScaledBattler(), btEffectRunDjinniEntrance(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btParticleAdvanceWithGravity3D(), btRenderAllocateModelList(), btRenderBuildQuadStrip(), btRenderDrawModelList(), btRenderProjectVertices(), btRenderTransformVertices(), btResourceLoadAndDecompress(), gmUnitGet(), MapGridMetatileBuffer, ProjectionWork, Sint32, syCloseEvent(), syCos(), syHeapRelease(), syHeapSlotRelease(), syInitMatrix(), syLookAtLoad(), syMatrixScaleUniform(), syMatrixTranslateVector(), syPopMatrix(), syPushMatrix(), syRandom(), syResourceGetTableEntry(), syRotX(), syRotY(), syRotZ(), syScale(), sySin(), sySoundPlayStub() and syTranslate().

Referenced by btEffectRunGale(), btEffectRunLetheAlbion(), btEffectRunPoisonFlow(), btEffectRunRagingFlood() and btEffectRunWhorl().

Definition at line 93 of file battle_effect_whorl.c.

btEffectRunCore

void btEffectRunCore(BATTLE_EFFECT_PARM *args)

Abilities: Core.

References btEffectRunDjinniCharge().

Referenced by BattleEffectHandlers.

Definition at line 914 of file battle_effect_whorl.c.

btEffectRunCannon

void btEffectRunCannon(BATTLE_EFFECT_PARM *args)

Abilities: Cannon.

References btEffectRunDjinniCharge().

Referenced by BattleEffectHandlers.

Definition at line 920 of file battle_effect_whorl.c.