Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_streaks.c

Streak volleys (Sonic Wave, Shriek, War Cry ...) and mote fountains (Sleep Star, Soothing Star, Slaver). More…

Included by battle_effect.c.

Macros

NameDescription
#defineSTREAK_VALUE (mode, n) StreakStyles[(mode) * 4 + (n)]Column n of style mode's row of StreakStyles, four flags a style.
#defineSTREAK_ANIMATE 0Nonzero: the streak cycles through three images.
#defineSTREAK_HIT 1Nonzero: play the hit sound and flash the target.
#defineSTREAK_MOTION 2The target's knockback on the hit (BATTLE_KNOCKBACK, -1: none).
#defineSTREAK_SHAKE 3Nonzero: the struck target trembles from side to side.
#defineSTREAK_MAX 3streaks fired at each target
#defineSTREAK_WIDTH 20FlameArcSheet's streaks: three animation frames, each six pictures that grow; each picture is the lower half of a ring, and the upper half is it drawn flipped, so a streak flies as a ring of light.
#defineSTREAK_HEIGHT 40
#defineSTREAK_FRAME_BYTES (6 * PICTURE_BYTES(STREAK))
#defineSTREAK_SPACING 6ticks between streaks
#defineSTREAK_FLIGHT 24ticks from user to target
#defineSTREAK_TARGET_DELAY 32ticks between targets
#defineMOTE_FOUNTAIN_TICKS 128
#defineMOTE_FOUNTAIN_SLAVER_TICKS 96
#defineFLARE_DEPTH_NEAR 314The projected depths over which a mote is sized, nearest to farthest: it is drawn MOTE_FOUNTAIN_LARGEST pixels wide (and twice as tall) at FLARE_DEPTH_NEAR or nearer, a pixel narrower for every MOTE_FOUNTAIN_DEPTH_STEP farther.
#defineFLARE_DEPTH_FAR 634
#defineMOTE_FOUNTAIN_LARGEST 6
#defineMOTE_FOUNTAIN_DEPTH_STEP 64

Enumerations

NameDescription
enumSTREAK_STYLE { STREAK_STYLE_EMBER, STREAK_STYLE_LIME, STREAK_STYLE_VIOLET, … }The streak volley's styles (btEffectRunStreakVolley): its colour and its row of StreakStyles.
enumMOTE_FOUNTAIN_MODE { MOTE_FOUNTAIN_HEALING, MOTE_FOUNTAIN_DRIFTING, MOTE_FOUNTAIN … }The mote fountain's modes (btEffectRunMoteFountain).
enumanonymous enum { MOTE_FOUNTAIN_INITIALIZED_COUNT, MOTE_VISIBLE_COUNT }The motes the fountain sets up, and how many of them it moves and draws.

Functions

NameDescription
voidbtEffectRunSonicWave (BATTLE_EFFECT_PARM *args)Three streaks of ember light fly from the user at each target in turn; each target flashes and recoils.
voidbtEffectRunShriek (BATTLE_EFFECT_PARM *args)Three streaks of lime light fly from the user at each target in turn; each target flashes and recoils.
voidbtEffectRunBansheeHowl (BATTLE_EFFECT_PARM *args)Three streaks of violet light fly from the user at each target in turn; each target flashes and trembles.
voidbtEffectRunWarCry (BATTLE_EFFECT_PARM *args)Three flickering cyan streaks fly from the user at each target in turn; each target flashes and recoils.
voidbtEffectRunWickedHowl (BATTLE_EFFECT_PARM *args)Three flickering red streaks fly from the user at each target in turn; each target flashes and trembles.
voidbtEffectRunLimeStreaks (BATTLE_EFFECT_PARM *args)Unused: no entry of the effect table points here.
voidbtEffectRunStreakVolley (BATTLE_EFFECT_PARM *args, Sint32 mode)Fires the streaks at each target in turn from above the user; each leaves a fading trail.
voidbtEffectRunSleepStar (BATTLE_EFFECT_PARM *args)Motes burst out of the user and float up, wobbling, as they drift across the field onto the targets, and each target flinches in turn.
voidbtEffectRunSoothingStar (BATTLE_EFFECT_PARM *args)Orange healing motes burst out of the user and float up close to it, and each target glows in turn with the recovery sound.
voidbtEffectRunSlaver (BATTLE_EFFECT_PARM *args)Green drops are flung up from the user in a half-circle fan and fall, bouncing off the ground, then Impair plays on the targets.
voidbtEffectRunMoteFountain (BATTLE_EFFECT_PARM *args, Sint32 mode)Motes burst out of the user and float upwards, wobbling, and each target reacts in turn.

Description

Streak volleys (Sonic Wave, Shriek, War Cry ...) and mote fountains (Sleep Star, Soothing Star, Slaver). Part of battle_effect.c.

Macros in detail

STREAK_VALUE

#define STREAK_VALUE(mode, n) StreakStyles[(mode) * 4 + (n)]

Column n of style mode's row of StreakStyles, four flags a style.

Referenced by btEffectRunStreakVolley().

Definition at line 5 of file battle_effect_streaks.c.

STREAK_ANIMATE

#define STREAK_ANIMATE 0

Nonzero: the streak cycles through three images.

Referenced by btEffectRunStreakVolley().

Definition at line 7 of file battle_effect_streaks.c.

STREAK_HIT

#define STREAK_HIT 1

Nonzero: play the hit sound and flash the target.

Referenced by btEffectRunStreakVolley().

Definition at line 9 of file battle_effect_streaks.c.

STREAK_MOTION

#define STREAK_MOTION 2

The target's knockback on the hit (BATTLE_KNOCKBACK, -1: none).

Referenced by btEffectRunStreakVolley().

Definition at line 11 of file battle_effect_streaks.c.

STREAK_SHAKE

#define STREAK_SHAKE 3

Nonzero: the struck target trembles from side to side.

Referenced by btEffectRunStreakVolley().

Definition at line 13 of file battle_effect_streaks.c.

STREAK_MAX

#define STREAK_MAX 3

streaks fired at each target

Referenced by btEffectRunStreakVolley().

Definition at line 15 of file battle_effect_streaks.c.

STREAK_WIDTH

#define STREAK_WIDTH 20

FlameArcSheet's streaks: three animation frames, each six pictures that grow; each picture is the lower half of a ring, and the upper half is it drawn flipped, so a streak flies as a ring of light.

Referenced by btEffectRunStreakVolley().

Definition at line 84 of file battle_effect_streaks.c.

STREAK_HEIGHT

#define STREAK_HEIGHT 40

Referenced by btEffectRunStreakVolley().

Definition at line 85 of file battle_effect_streaks.c.

STREAK_FRAME_BYTES

#define STREAK_FRAME_BYTES (6 * PICTURE_BYTES(STREAK))

Referenced by btEffectRunStreakVolley().

Definition at line 86 of file battle_effect_streaks.c.

STREAK_SPACING

#define STREAK_SPACING 6

ticks between streaks

Referenced by btEffectRunStreakVolley().

Definition at line 87 of file battle_effect_streaks.c.

STREAK_FLIGHT

#define STREAK_FLIGHT 24

ticks from user to target

Referenced by btEffectRunStreakVolley().

Definition at line 88 of file battle_effect_streaks.c.

STREAK_TARGET_DELAY

#define STREAK_TARGET_DELAY 32

ticks between targets

Referenced by btEffectRunStreakVolley().

Definition at line 89 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_TICKS

#define MOTE_FOUNTAIN_TICKS 128

Referenced by btEffectRunMoteFountain().

Definition at line 381 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_SLAVER_TICKS

#define MOTE_FOUNTAIN_SLAVER_TICKS 96

Referenced by btEffectRunMoteFountain().

Definition at line 382 of file battle_effect_streaks.c.

FLARE_DEPTH_NEAR

#define FLARE_DEPTH_NEAR 314

The projected depths over which a mote is sized, nearest to farthest: it is drawn MOTE_FOUNTAIN_LARGEST pixels wide (and twice as tall) at FLARE_DEPTH_NEAR or nearer, a pixel narrower for every MOTE_FOUNTAIN_DEPTH_STEP farther.

Referenced by btEffectRunMoteFountain().

Definition at line 388 of file battle_effect_streaks.c.

FLARE_DEPTH_FAR

#define FLARE_DEPTH_FAR 634

Referenced by btEffectRunMoteFountain().

Definition at line 389 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_LARGEST

#define MOTE_FOUNTAIN_LARGEST 6

Referenced by btEffectRunMoteFountain().

Definition at line 390 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_DEPTH_STEP

#define MOTE_FOUNTAIN_DEPTH_STEP 64

Referenced by btEffectRunMoteFountain().

Definition at line 391 of file battle_effect_streaks.c.

Enumerations in detail

STREAK_STYLE

enum STREAK_STYLE

The streak volley's styles (btEffectRunStreakVolley): its colour and its row of StreakStyles.

EnumeratorValueDescription
STREAK_STYLE_EMBERSonic Wave
STREAK_STYLE_LIMEShriek and Harpy, and the unused btEffectRunLimeStreaks
STREAK_STYLE_VIOLETBanshee Howl
STREAK_STYLE_REDWicked Howl
STREAK_STYLE_CYANWar Cry

Definition at line 19 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_MODE

enum MOTE_FOUNTAIN_MODE

The mote fountain's modes (btEffectRunMoteFountain).

EnumeratorValueDescription
MOTE_FOUNTAIN_HEALINGSoothing Star
MOTE_FOUNTAIN_DRIFTINGSleep Star
MOTE_FOUNTAIN_SLAVERSlaver

Definition at line 340 of file battle_effect_streaks.c.

anonymous enum

enum { MOTE_FOUNTAIN_INITIALIZED_COUNT, MOTE_VISIBLE_COUNT }

The motes the fountain sets up, and how many of them it moves and draws.

EnumeratorValueDescription
MOTE_FOUNTAIN_INITIALIZED_COUNT256
MOTE_VISIBLE_COUNT128

Definition at line 348 of file battle_effect_streaks.c.

Functions in detail

btEffectRunSonicWave

void btEffectRunSonicWave(BATTLE_EFFECT_PARM *args)

Three streaks of ember light fly from the user at each target in turn; each target flashes and recoils.

Abilities: Sonic Wave.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 33 of file battle_effect_streaks.c.

btEffectRunShriek

void btEffectRunShriek(BATTLE_EFFECT_PARM *args)

Three streaks of lime light fly from the user at each target in turn; each target flashes and recoils.

Abilities: Shriek, Harpy.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 42 of file battle_effect_streaks.c.

btEffectRunBansheeHowl

void btEffectRunBansheeHowl(BATTLE_EFFECT_PARM *args)

Three streaks of violet light fly from the user at each target in turn; each target flashes and trembles.

Abilities: Banshee Howl.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 51 of file battle_effect_streaks.c.

btEffectRunWarCry

void btEffectRunWarCry(BATTLE_EFFECT_PARM *args)

Three flickering cyan streaks fly from the user at each target in turn; each target flashes and recoils.

Abilities: War Cry.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 60 of file battle_effect_streaks.c.

btEffectRunWickedHowl

void btEffectRunWickedHowl(BATTLE_EFFECT_PARM *args)

Three flickering red streaks fly from the user at each target in turn; each target flashes and trembles.

Abilities: Wicked Howl.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 69 of file battle_effect_streaks.c.

btEffectRunLimeStreaks

void btEffectRunLimeStreaks(BATTLE_EFFECT_PARM *args)

Unused: no entry of the effect table points here. It would have played the same lime streaks as Shriek.

References btEffectRunStreakVolley().

Definition at line 76 of file battle_effect_streaks.c.

btEffectRunStreakVolley

void btEffectRunStreakVolley(BATTLE_EFFECT_PARM *args, Sint32 mode)

Fires the streaks at each target in turn from above the user; each leaves a fading trail.

References btCameraShake(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), Sint32, StreakTremble, syResourceGetTableEntry(), sySin() and sySoundPlayStub().

Referenced by btEffectRunBansheeHowl(), btEffectRunLimeStreaks(), btEffectRunShriek(), btEffectRunSonicWave(), btEffectRunWarCry() and btEffectRunWickedHowl().

Definition at line 93 of file battle_effect_streaks.c.

btEffectRunSleepStar

void btEffectRunSleepStar(BATTLE_EFFECT_PARM *args)

Motes burst out of the user and float up, wobbling, as they drift across the field onto the targets, and each target flinches in turn.

Abilities: Sleep Star.

References btEffectRunMoteFountain().

Referenced by BattleEffectHandlers.

Definition at line 358 of file battle_effect_streaks.c.

btEffectRunSoothingStar

void btEffectRunSoothingStar(BATTLE_EFFECT_PARM *args)

Orange healing motes burst out of the user and float up close to it, and each target glows in turn with the recovery sound.

Abilities: Soothing Star.

References btEffectRunMoteFountain().

Referenced by BattleEffectHandlers.

Definition at line 367 of file battle_effect_streaks.c.

btEffectRunSlaver

void btEffectRunSlaver(BATTLE_EFFECT_PARM *args)

Green drops are flung up from the user in a half-circle fan and fall, bouncing off the ground, then Impair plays on the targets.

Abilities: Slaver.

References btEffectRunMoteFountain().

Referenced by BattleEffectHandlers.

Definition at line 376 of file battle_effect_streaks.c.

btEffectRunMoteFountain

void btEffectRunMoteFountain(BATTLE_EFFECT_PARM *args, Sint32 mode)

Motes burst out of the user and float upwards, wobbling, and each target reacts in turn.

References btEffectDarkenBackgroundStep(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectRunImpair(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), Sint32, syCloseEvent(), syCos(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub() and syWordsClear().

Referenced by btEffectRunSlaver(), btEffectRunSleepStar() and btEffectRunSoothingStar().

Definition at line 395 of file battle_effect_streaks.c.