Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_liquifier.c

Liquifier, and the canvas bursts: a glowing ball that strikes the target in flames and sparks. More…

Included by battle_effect.c.

Macros

NameDescription
#defineLIQUIFIER_TICKS 111
#defineLIQUIFIER_SPARKS 32The state's particles: the sparks, then the beams.
#defineLIQUIFIER_FIRST_BEAM LIQUIFIER_SPARKS
#defineLIQUIFIER_BEAMS 16
#defineLIQUIFIER_STRIKE_TICK 54From LIQUIFIER_STRIKE_TICK a beam stabs down every LIQUIFIER_BEAM_INTERVAL ticks, each for LIQUIFIER_BEAM_TICKS, and the target is struck LIQUIFIER_STRIKES times, every LIQUIFIER_STRIKE_INTERVAL ticks.
#defineLIQUIFIER_BEAM_INTERVAL 2
#defineLIQUIFIER_BEAM_TICKS 16
#defineLIQUIFIER_STRIKES 8
#defineLIQUIFIER_STRIKE_INTERVAL 4
#defineLIQUIFIER_FLAMES 8The flames that fan out above the user, each for LIQUIFIER_FLAME_TICKS.
#defineLIQUIFIER_FLAME_TICKS 16
#defineLIQUIFIER_BURST_SHIFT 8The sparks' speeds: a sine times 512 to 1023, shifted down by this as they burst out, one less upward, and two more as they gather.
#defineLIQUIFIER_FLASH_BURST_PICTURES (RamMapMetatileBuffer + 16384)Where FlashBurstSheet is decoded: the map cell buffer's second 16 KB, where FireRingTexture, decoded to EffectScratch, replaces it.
#defineLIQUIFIER_GLOW_BAND 4096Where GlowBandTextureA is decoded in the effect's pictures.
#defineCANVAS_BURST_BALL (&state->particles[ARRAY_COUNT(state->particles) - 1])The ball: the state's last particle.
#defineCANVAS_BURST_FLASH_BURST_PICTURES 2048Where FlashBurstSheet is decoded in the effect's pictures.
#defineCANVAS_BURST_RAYS 16The state's particles: Shred's rays, then at the hit the flames, and the sparks after them.
#defineCANVAS_BURST_FLAMES 16
#defineCANVAS_BURST_FIRST_SPARK CANVAS_BURST_FLAMES
#defineCANVAS_BURST_SPARKS 47
#defineCANVAS_BURST_LIFE 17A flame's or spark's ticks to live at the hit, one more for every third; a flame shows its six pictures over its last 18.
#defineCANVAS_BURST_DISCS 32The shaded discs drawn into the map cell buffer, 2 to 64 pixels across.
#defineCANVAS_BURST_GLOW_SIZE 64Shred's glow grows to the largest disc; the balls grow to these.
#defineCANVAS_BURST_SMALL_BALL_SIZE 24
#defineCANVAS_BURST_LARGE_BALL_SIZE 40
#defineCANVAS_BURST_RAY_MOTES 16The motes of each of Shred's rays.
#defineCANVAS_BURST_RAY_FIRST 15
#defineCANVAS_BURST_RAY_LAST (-32)
#defineCANVAS_BURST_BALL_STEP_SHIFT 10The ball steps a 64th of the screen's distance a tick (1 << 10 in 16.16).

Enumerations

NameDescription
enumCANVAS_BURST_MODE { CANVAS_BURST_SHRED, CANVAS_BURST_SMALL_BALL, CANVAS_BURST_LA … }The canvas burst's modes (btEffectRunCanvasBurst).

Functions

NameDescription
voidbtEffectRunLiquifier (BATTLE_EFFECT_PARM *args)Sparks fall into the user as two rings of fire swell about it (ticks 0 to 15); then the sparks burst from it and eight flames fan out above it and sink back.
voidbtEffectRunBallAttack (BATTLE_EFFECT_PARM *args)An enemy class's plain attack that throws a glowing ball (ATTACK_EFFECT_BURST): a small ball, or a large one for its critical hit.
voidbtEffectRunShred (BATTLE_EFFECT_PARM *args)A glow grows on the first target as sixteen rays of motes close on it, and it bursts into flames and sparks; Impair follows.
voidbtEffectRunMineBall (BATTLE_EFFECT_PARM *args)From the user's leap pose, a glowing ball in BlueFlameSheet's colours flies to the targets' midpoint and bursts into flames and sparks.
static inline voidDrawDisc (void *canvas, Sint16 *discs, Sint32 cells, Sint32 x, Sint32 y, Sint32 size, Sint32 index)Draws a disc of the given size from the discs in the map cell buffer as its four quarters about (x, y), the same quarter mirrored each way.
voidbtEffectRunCanvasBurst (BATTLE_EFFECT_PARM *args, Uint32 mode)A glowing ball, or Shred's glow growing on the target as sixteen rays close on it, hits the target; at the hit the targets flash and recoil, sixteen flames rise and 47 sparks scatter.

Description

Liquifier, and the canvas bursts: a glowing ball that strikes the target in flames and sparks. Part of battle_effect.c.

Macros in detail

LIQUIFIER_TICKS

#define LIQUIFIER_TICKS 111

Referenced by btEffectRunLiquifier().

Definition at line 4 of file battle_effect_liquifier.c.

LIQUIFIER_SPARKS

#define LIQUIFIER_SPARKS 32

The state's particles: the sparks, then the beams.

Referenced by btEffectRunLiquifier().

Definition at line 6 of file battle_effect_liquifier.c.

LIQUIFIER_FIRST_BEAM

#define LIQUIFIER_FIRST_BEAM LIQUIFIER_SPARKS

Referenced by btEffectRunLiquifier().

Definition at line 7 of file battle_effect_liquifier.c.

LIQUIFIER_BEAMS

#define LIQUIFIER_BEAMS 16

Referenced by btEffectRunLiquifier().

Definition at line 8 of file battle_effect_liquifier.c.

LIQUIFIER_STRIKE_TICK

#define LIQUIFIER_STRIKE_TICK 54

From LIQUIFIER_STRIKE_TICK a beam stabs down every LIQUIFIER_BEAM_INTERVAL ticks, each for LIQUIFIER_BEAM_TICKS, and the target is struck LIQUIFIER_STRIKES times, every LIQUIFIER_STRIKE_INTERVAL ticks.

Referenced by btEffectRunLiquifier().

Definition at line 12 of file battle_effect_liquifier.c.

LIQUIFIER_BEAM_INTERVAL

#define LIQUIFIER_BEAM_INTERVAL 2

Referenced by btEffectRunLiquifier().

Definition at line 13 of file battle_effect_liquifier.c.

LIQUIFIER_BEAM_TICKS

#define LIQUIFIER_BEAM_TICKS 16

Referenced by btEffectRunLiquifier().

Definition at line 14 of file battle_effect_liquifier.c.

LIQUIFIER_STRIKES

#define LIQUIFIER_STRIKES 8

Referenced by btEffectRunLiquifier().

Definition at line 15 of file battle_effect_liquifier.c.

LIQUIFIER_STRIKE_INTERVAL

#define LIQUIFIER_STRIKE_INTERVAL 4

Referenced by btEffectRunLiquifier().

Definition at line 16 of file battle_effect_liquifier.c.

LIQUIFIER_FLAMES

#define LIQUIFIER_FLAMES 8

The flames that fan out above the user, each for LIQUIFIER_FLAME_TICKS.

Referenced by btEffectRunLiquifier().

Definition at line 18 of file battle_effect_liquifier.c.

LIQUIFIER_FLAME_TICKS

#define LIQUIFIER_FLAME_TICKS 16

Referenced by btEffectRunLiquifier().

Definition at line 19 of file battle_effect_liquifier.c.

LIQUIFIER_BURST_SHIFT

#define LIQUIFIER_BURST_SHIFT 8

The sparks' speeds: a sine times 512 to 1023, shifted down by this as they burst out, one less upward, and two more as they gather.

Referenced by btEffectRunLiquifier().

Definition at line 22 of file battle_effect_liquifier.c.

LIQUIFIER_FLASH_BURST_PICTURES

#define LIQUIFIER_FLASH_BURST_PICTURES (RamMapMetatileBuffer + 16384)

Where FlashBurstSheet is decoded: the map cell buffer's second 16 KB, where FireRingTexture, decoded to EffectScratch, replaces it.

Referenced by btEffectRunLiquifier().

Definition at line 26 of file battle_effect_liquifier.c.

LIQUIFIER_GLOW_BAND

#define LIQUIFIER_GLOW_BAND 4096

Where GlowBandTextureA is decoded in the effect's pictures.

Referenced by btEffectRunLiquifier().

Definition at line 29 of file battle_effect_liquifier.c.

CANVAS_BURST_BALL

#define CANVAS_BURST_BALL (&state->particles[ARRAY_COUNT(state->particles) - 1])

The ball: the state's last particle.

Referenced by btEffectRunCanvasBurst().

Definition at line 437 of file battle_effect_liquifier.c.

CANVAS_BURST_FLASH_BURST_PICTURES

#define CANVAS_BURST_FLASH_BURST_PICTURES 2048

Where FlashBurstSheet is decoded in the effect's pictures.

Referenced by btEffectRunCanvasBurst().

Definition at line 483 of file battle_effect_liquifier.c.

CANVAS_BURST_RAYS

#define CANVAS_BURST_RAYS 16

The state's particles: Shred's rays, then at the hit the flames, and the sparks after them.

Referenced by btEffectRunCanvasBurst().

Definition at line 486 of file battle_effect_liquifier.c.

CANVAS_BURST_FLAMES

#define CANVAS_BURST_FLAMES 16

Referenced by btEffectRunCanvasBurst().

Definition at line 487 of file battle_effect_liquifier.c.

CANVAS_BURST_FIRST_SPARK

#define CANVAS_BURST_FIRST_SPARK CANVAS_BURST_FLAMES

Referenced by btEffectRunCanvasBurst().

Definition at line 488 of file battle_effect_liquifier.c.

CANVAS_BURST_SPARKS

#define CANVAS_BURST_SPARKS 47

Referenced by btEffectRunCanvasBurst().

Definition at line 489 of file battle_effect_liquifier.c.

CANVAS_BURST_LIFE

#define CANVAS_BURST_LIFE 17

A flame's or spark's ticks to live at the hit, one more for every third; a flame shows its six pictures over its last 18.

Referenced by btEffectRunCanvasBurst().

Definition at line 492 of file battle_effect_liquifier.c.

CANVAS_BURST_DISCS

#define CANVAS_BURST_DISCS 32

The shaded discs drawn into the map cell buffer, 2 to 64 pixels across.

Referenced by btEffectRunCanvasBurst().

Definition at line 494 of file battle_effect_liquifier.c.

CANVAS_BURST_GLOW_SIZE

#define CANVAS_BURST_GLOW_SIZE 64

Shred's glow grows to the largest disc; the balls grow to these.

Referenced by btEffectRunCanvasBurst().

Definition at line 496 of file battle_effect_liquifier.c.

CANVAS_BURST_SMALL_BALL_SIZE

#define CANVAS_BURST_SMALL_BALL_SIZE 24

Referenced by btEffectRunCanvasBurst().

Definition at line 497 of file battle_effect_liquifier.c.

CANVAS_BURST_LARGE_BALL_SIZE

#define CANVAS_BURST_LARGE_BALL_SIZE 40

Referenced by btEffectRunCanvasBurst().

Definition at line 498 of file battle_effect_liquifier.c.

CANVAS_BURST_RAY_MOTES

#define CANVAS_BURST_RAY_MOTES 16

The motes of each of Shred's rays. A ray counts down from its own delay and shows from CANVAS_BURST_RAY_FIRST to CANVAS_BURST_RAY_LAST; mote j is 2 * (2 * countdown + j) pixels out, so all have closed in on the target by -8.

Referenced by btEffectRunCanvasBurst().

Definition at line 502 of file battle_effect_liquifier.c.

CANVAS_BURST_RAY_FIRST

#define CANVAS_BURST_RAY_FIRST 15

Referenced by btEffectRunCanvasBurst().

Definition at line 503 of file battle_effect_liquifier.c.

CANVAS_BURST_RAY_LAST

#define CANVAS_BURST_RAY_LAST (-32)

Referenced by btEffectRunCanvasBurst().

Definition at line 504 of file battle_effect_liquifier.c.

CANVAS_BURST_BALL_STEP_SHIFT

#define CANVAS_BURST_BALL_STEP_SHIFT 10

The ball steps a 64th of the screen's distance a tick (1 << 10 in 16.16).

Referenced by btEffectRunCanvasBurst().

Definition at line 506 of file battle_effect_liquifier.c.

Enumerations in detail

CANVAS_BURST_MODE

enum CANVAS_BURST_MODE

The canvas burst's modes (btEffectRunCanvasBurst).

EnumeratorValueDescription
CANVAS_BURST_SHREDa glow grows on the target as rays close on it
CANVAS_BURST_SMALL_BALLan enemy's attack: a small ball, no flames
CANVAS_BURST_LARGE_BALLthe same attack's critical hit: a large ball
CANVAS_BURST_MINE_BALLa large ball to the targets' midpoint

Definition at line 394 of file battle_effect_liquifier.c.

Functions in detail

btEffectRunLiquifier

void btEffectRunLiquifier(BATTLE_EFFECT_PARM *args)

Sparks fall into the user as two rings of fire swell about it (ticks 0 to 15); then the sparks burst from it and eight flames fan out above it and sink back. From tick 54 sixteen beams of light stab down about the target, one every two ticks, each narrowing away over a ring of fire that spreads on the ground, and the target is struck every four ticks; the eighth strike shows the damage.

Abilities: Liquifier.

References BattleEffectBeamCorners, BattleEffectGroundSquareCorners, BattleEffectLargeSquareMesh, BattleEffectMotePictures, BattleEffectSmallSquareMesh, BattleEffectSquareCorners, BattleEffectTallMesh, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectPosProjectBattler(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btParticleAdvanceWithGravity2D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderTransformVertices(), btResourceLoadAndDecompress(), EffectScratch, LiquifierSplashCorners, LiquifierSplashHeights, LiquifierSplashStarts, Sint32, syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix(), syRandom(), syRotX(), syRotZ(), syScale(), sySin(), sySoundPlayStub() and syTranslate().

Referenced by BattleEffectHandlers.

Definition at line 39 of file battle_effect_liquifier.c.

btEffectRunBallAttack

void btEffectRunBallAttack(BATTLE_EFFECT_PARM *args)

An enemy class's plain attack that throws a glowing ball (ATTACK_EFFECT_BURST): a small ball, or a large one for its critical hit.

References btEffectRunCanvasBurst().

Referenced by btEffectRunByIdRange().

Definition at line 404 of file battle_effect_liquifier.c.

btEffectRunShred

void btEffectRunShred(BATTLE_EFFECT_PARM *args)

A glow grows on the first target as sixteen rays of motes close on it, and it bursts into flames and sparks; Impair follows.

Abilities: Shred.

References btEffectRunCanvasBurst().

Referenced by BattleEffectHandlers.

Definition at line 416 of file battle_effect_liquifier.c.

btEffectRunMineBall

void btEffectRunMineBall(BATTLE_EFFECT_PARM *args)

From the user's leap pose, a glowing ball in BlueFlameSheet's colours flies to the targets' midpoint and bursts into flames and sparks.

Abilities: Mine Ball.

References btEffectRunCanvasBurst(), btObjectGetStub(), fdActorSelectAnimationStub() and fdActorSetAnimationSpeedStub().

Referenced by BattleEffectHandlers.

Definition at line 425 of file battle_effect_liquifier.c.

DrawDisc

static inline void DrawDisc(void *canvas, Sint16 *discs, Sint32 cells, Sint32 x, Sint32 y, Sint32 size, Sint32 index)

Draws a disc of the given size from the discs in the map cell buffer as its four quarters about (x, y), the same quarter mirrored each way.

References Sint32 and syHeapSlotRelease().

Referenced by btEffectRunCanvasBurst().

Definition at line 441 of file battle_effect_liquifier.c.

btEffectRunCanvasBurst

void btEffectRunCanvasBurst(BATTLE_EFFECT_PARM *args, Uint32 mode)

A glowing ball, or Shred's glow growing on the target as sixteen rays close on it, hits the target; at the hit the targets flash and recoil, sixteen flames rise and 47 sparks scatter. Shred plays 78 ticks, hits at 54 and runs btEffectRunImpair after; the small ball plays 66, hits at 32, nudges the targets and throws its sparks at half speed, without flames; the large ball plays 66 and hits at 32; Mine Ball's flies to the targets' midpoint in its own colours, plays 58 and hits at 24. The balls of an enemy's attack close by restoring the battle display themselves.

References BattleEffectMotePictures, BgScrollWork, btBackgroundSetModeStub(), btCameraShake(), btEffectDarkenBackgroundStep(), btEffectDrawShadedDiscQuarter(), btEffectEndCanvasLayer(), btEffectGetTargetsMidpoint(), btEffectPosProjectBattler(), btEffectRunImpair(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), CanvasBurstFlamePictures, DrawDisc(), Sint32, syCloseEvent(), syCos(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub(), sySynch(), syWordsClear() and syWordsCopy().

Referenced by btEffectRunBallAttack(), btEffectRunMineBall() and btEffectRunShred().

Definition at line 516 of file battle_effect_liquifier.c.