Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_haunt.c

Haunt and the orbiting spirals. More…

Included by battle_effect.c.

Macros

NameDescription
#defineHAUNT_SCATTERED 512The spirits scattered at the start, up to 64 pixels from their centre.
#defineHAUNT_SPIRITS 8evil spirits drawn around each target
#defineHAUNT_SLOTS 64particles reserved for each target
#defineORBITING_SPIRALS 4The spirals: ORBITING_SPIRALS a quarter turn apart, circling ORBITING_SPIRALS_RADIUS pixels out, each target's ORBITING_SPIRALS_INTERVAL ticks after the one before and for ORBITING_SPIRALS_LIFE ticks less one.
#defineORBITING_SPIRALS_RADIUS 16
#defineORBITING_SPIRALS_INTERVAL 16
#defineORBITING_SPIRALS_LIFE 60
#defineORBITING_SPIRALS_PARTY_START_X (NARROW_CANVAS_PARTY_X - 8)The canvas's scroll on the party side until the first tick's wave rows replace it, 8 pixels short of NARROW_CANVAS_PARTY_X.

Functions

NameDescription
voidbtEffectRunHaunt (BATTLE_EFFECT_PARM *args)Evil spirits (SkullSheet's skulls, smeared pink by the ripple) close in on each target in turn.
voidbtEffectRunUnusedOrbitingSpirals (BATTLE_EFFECT_PARM *args)Unused: no row of AbilityBattleEffects in either game names its kind, and the handler table is reached with no other kind (btEffectRunFromTable), so the player never sees it.

Description

Haunt and the orbiting spirals. Part of battle_effect.c.

Macros in detail

HAUNT_SCATTERED

#define HAUNT_SCATTERED 512

The spirits scattered at the start, up to 64 pixels from their centre.

Referenced by btEffectRunHaunt().

Definition at line 4 of file battle_effect_haunt.c.

HAUNT_SPIRITS

#define HAUNT_SPIRITS 8

evil spirits drawn around each target

Referenced by btEffectRunHaunt().

Definition at line 5 of file battle_effect_haunt.c.

HAUNT_SLOTS

#define HAUNT_SLOTS 64

particles reserved for each target

Referenced by btEffectRunHaunt().

Definition at line 6 of file battle_effect_haunt.c.

ORBITING_SPIRALS

#define ORBITING_SPIRALS 4

The spirals: ORBITING_SPIRALS a quarter turn apart, circling ORBITING_SPIRALS_RADIUS pixels out, each target's ORBITING_SPIRALS_INTERVAL ticks after the one before and for ORBITING_SPIRALS_LIFE ticks less one.

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 131 of file battle_effect_haunt.c.

ORBITING_SPIRALS_RADIUS

#define ORBITING_SPIRALS_RADIUS 16

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 132 of file battle_effect_haunt.c.

ORBITING_SPIRALS_INTERVAL

#define ORBITING_SPIRALS_INTERVAL 16

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 133 of file battle_effect_haunt.c.

ORBITING_SPIRALS_LIFE

#define ORBITING_SPIRALS_LIFE 60

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 134 of file battle_effect_haunt.c.

ORBITING_SPIRALS_PARTY_START_X

#define ORBITING_SPIRALS_PARTY_START_X (NARROW_CANVAS_PARTY_X - 8)

The canvas's scroll on the party side until the first tick's wave rows replace it, 8 pixels short of NARROW_CANVAS_PARTY_X.

Referenced by btEffectRunUnusedOrbitingSpirals().

Definition at line 137 of file battle_effect_haunt.c.

Functions in detail

btEffectRunHaunt

void btEffectRunHaunt(BATTLE_EFFECT_PARM *args)

Evil spirits (SkullSheet's skulls, smeared pink by the ripple) close in on each target in turn.

Abilities: Haunt.

References btEffectArmBg2AffineHBlankDMA(), btEffectBuildCanvasBlitters(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btResourceLoadAndDecompress(), Sint32, syCloseEvent(), syMatrixTranslateVector(), syRandom(), syResourceGetTableEntry(), syRotX(), sySetEvent(), sySin(), sySoundPlayStub() and sySquartIWRAM().

Referenced by BattleEffectHandlers.

Definition at line 12 of file battle_effect_haunt.c.

btEffectRunUnusedOrbitingSpirals

void btEffectRunUnusedOrbitingSpirals(BATTLE_EFFECT_PARM *args)

Unused: no row of AbilityBattleEffects in either game names its kind, and the handler table is reached with no other kind (btEffectRunFromTable), so the player never sees it. Its code draws the spirals about the point 40 pixels above each target, one target after another, turning a 128th of a turn a tick; each target takes its damage pose 32 ticks into its turn.

References btEffectArmBg2AffineHBlankDMA(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btResourceLoadAndDecompress(), Sint32, syCloseEvent(), syCos(), sySetEvent() and sySin().

Referenced by BattleEffectHandlers.

Definition at line 144 of file battle_effect_haunt.c.