Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_beams.c

The plain attack's slash, and the critical hit's gathering light and crescent. More…

Included by battle_effect.c.

Macros

NameDescription
#defineBEAM_TICKS 32The slash's and the critical hit's length.
#defineBEAM_SPARKS 64Sparks in state->particles, drawn in pairs.
#defineBEAM_SPARK_LIFE 16The ticks the first spark lives, shrinking as it goes; each later one lives a tick longer.
#defineBEAM_CANVAS_SCROLL_Y (96 - BATTLE_VIEW_TOP)BG1's scroll that shows the canvas, 96 pixels down BG1's map (btEffectSetupCanvasTileMap), from the battle view's top line.
#defineCRITICAL_HIT_ZOOM 130The critical hit's camera zoom, in percent, held while it gathers.
#defineCRITICAL_HIT_MOTES 64The motes that close in on the attacker, and how far either side of the centre their depth is clamped.
#defineCRITICAL_HIT_MOTE_DEPTH 60

Enumerations

NameDescription
enumBEAM_KIND { BEAM_PLAIN_ATTACK, BEAM_ARC_A, BEAM_ARC_B, BEAM_IMAGE, BEAM_ … }The plain attack's pictures, by effect kind: the attacker's attack effect.

Functions

NameDescription
voidbtEffectRunAttackSlash (BATTLE_EFFECT_PARM *args)A plain attack: a slash or streak sweeps from the user over its first target, a yellow orb flashes over the target and sparks fly off.
voidbtEffectRunCriticalHit (BATTLE_EFFECT_PARM *args)A critical hit: motes of light close in on the attacker as it hangs in its leap, then a crescent slash sweeps across the first target and sparks fly from it.

Description

The plain attack's slash, and the critical hit's gathering light and crescent. Part of battle_effect.c.

Macros in detail

BEAM_TICKS

#define BEAM_TICKS 32

The slash's and the critical hit's length.

Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().

Definition at line 5 of file battle_effect_beams.c.

BEAM_SPARKS

#define BEAM_SPARKS 64

Sparks in state->particles, drawn in pairs.

Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().

Definition at line 7 of file battle_effect_beams.c.

BEAM_SPARK_LIFE

#define BEAM_SPARK_LIFE 16

The ticks the first spark lives, shrinking as it goes; each later one lives a tick longer.

Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().

Definition at line 10 of file battle_effect_beams.c.

BEAM_CANVAS_SCROLL_Y

#define BEAM_CANVAS_SCROLL_Y (96 - BATTLE_VIEW_TOP)

BG1's scroll that shows the canvas, 96 pixels down BG1's map (btEffectSetupCanvasTileMap), from the battle view's top line.

Referenced by btEffectRunAttackSlash() and btEffectRunCriticalHit().

Definition at line 13 of file battle_effect_beams.c.

CRITICAL_HIT_ZOOM

#define CRITICAL_HIT_ZOOM 130

The critical hit's camera zoom, in percent, held while it gathers.

Referenced by btEffectRunCriticalHit().

Definition at line 15 of file battle_effect_beams.c.

CRITICAL_HIT_MOTES

#define CRITICAL_HIT_MOTES 64

The motes that close in on the attacker, and how far either side of the centre their depth is clamped.

Referenced by btEffectRunCriticalHit().

Definition at line 18 of file battle_effect_beams.c.

CRITICAL_HIT_MOTE_DEPTH

#define CRITICAL_HIT_MOTE_DEPTH 60

Referenced by btEffectRunCriticalHit().

Definition at line 19 of file battle_effect_beams.c.

Enumerations in detail

BEAM_KIND

enum BEAM_KIND

The plain attack's pictures, by effect kind: the attacker's attack effect.

EnumeratorValueDescription
BEAM_PLAIN_ATTACKdrawn as BEAM_ARC_A; no attack has kind 0
BEAM_ARC_Aone blue slash: Isaac's, Garet's and Jenna's
BEAM_ARC_Bthree blue slashes side by side
BEAM_IMAGEa streak of light, growing
BEAM_WAVEthree short blue arcs, backwards: Ivan's and Mia's
BEAM_ARC_A_INVERTEDone blue slash, upside down

Definition at line 22 of file battle_effect_beams.c.

Functions in detail

btEffectRunAttackSlash

void btEffectRunAttackSlash(BATTLE_EFFECT_PARM *args)

A plain attack: a slash or streak sweeps from the user over its first target, a yellow orb flashes over the target and sparks fly off.

References BeamPictureHeights, BeamPictureReaches, BeamPictures, BeamPictureWidths, BgScrollWork, btEffectConfigureEffectDisplay(), btEffectHideBg1AndRestoreBackdrop(), btEffectSetupCanvasTileMap(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionScaledUnit(), btProjectionSprite(), btResourceLoadAndDecompress(), btSpriteHasHeavyImpactStub(), btUnitGetEffectHeightStub(), fdScreenPointCoordinates(), gmUnitGetStub(), Sint32, state, syCloseEvent(), syConvert3Dto2D(), syRandom(), syResourceGetTableEntry(), sySynch() and syWordsCopy().

Referenced by btEffectRunByIdRange().

Definition at line 34 of file battle_effect_beams.c.

btEffectRunCriticalHit

void btEffectRunCriticalHit(BATTLE_EFFECT_PARM *args)

A critical hit: motes of light close in on the attacker as it hangs in its leap, then a crescent slash sweeps across the first target and sparks fly from it.

References BgScrollWork, btBackgroundSetPaletteLevelStub(), btCameraSetViewAtPairMidpointStub(), btEffectDarkenBackgroundStep(), btEffectHideBg1AndRestoreBackdrop(), btEffectSetupCanvasTileMap(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btProjectionScaledUnit(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), fdActorSetAnimationSpeedStub(), Sint32, state, syCloseEvent(), syInitMatrix(), syRandom(), syResourceGetTableEntry(), syRotX(), syRotY(), syRotZ(), sySetEvent(), sySoundPlayStub(), sySynch(), syWordsClear() and syWordsCopy().

Referenced by btEffectRunByIdRange().

Definition at line 320 of file battle_effect_beams.c.