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). More…

Included by battle_effect.c.

Macros

NameDescription
#defineSTREAK_VALUE (mode, n) StreakStyles[(mode)][(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
#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; the lower half is the upper drawn flipped.
#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_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 MOTE_FOUNTAIN_DEPTH_NEAR or nearer, a pixel narrower for every MOTE_FOUNTAIN_DEPTH_STEP farther.
#defineMOTE_FOUNTAIN_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: its colour and its row of StreakStyles.
enumMOTE_FOUNTAIN_MODE { MOTE_FOUNTAIN_HEALING, MOTE_FOUNTAIN_DRIFTING }The mote fountain's modes (btEffectRunMoteFountain).
enumanonymous enum { MOTE_FOUNTAIN_MOTES, MOTE_FOUNTAIN_MOTES_DRAWN }The motes the fountains set out, and the ones drawn.

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, cycling through three colour rows, fly from the user at each target in turn; each target flashes and recoils.
voidbtEffectRunWickedHowl (BATTLE_EFFECT_PARM *args)Three flickering red streaks, cycling through three colour rows, 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.
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). Part of battle_effect.c.

Macros in detail

STREAK_VALUE

#define STREAK_VALUE(mode, n) StreakStyles[(mode)][(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 6 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 7 of file battle_effect_streaks.c.

STREAK_MOTION

#define STREAK_MOTION

Referenced by btEffectRunStreakVolley().

Definition at line 8 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 11 of file battle_effect_streaks.c.

STREAK_MAX

#define STREAK_MAX 3

streaks fired at each target

Referenced by btEffectRunStreakVolley().

Definition at line 13 of file battle_effect_streaks.c.

STREAK_WIDTH

#define STREAK_WIDTH 20

FlameArcSheet's streaks: three animation frames, each six pictures that grow; the lower half is the upper drawn flipped.

Referenced by btEffectRunStreakVolley().

Definition at line 79 of file battle_effect_streaks.c.

STREAK_HEIGHT

#define STREAK_HEIGHT 40

Referenced by btEffectRunStreakVolley().

Definition at line 80 of file battle_effect_streaks.c.

STREAK_FRAME_BYTES

#define STREAK_FRAME_BYTES (6 * PICTURE_BYTES(STREAK))

Referenced by btEffectRunStreakVolley().

Definition at line 81 of file battle_effect_streaks.c.

STREAK_SPACING

#define STREAK_SPACING 6

ticks between streaks

Referenced by btEffectRunStreakVolley().

Definition at line 82 of file battle_effect_streaks.c.

STREAK_FLIGHT

#define STREAK_FLIGHT 24

ticks from user to target

Referenced by btEffectRunStreakVolley().

Definition at line 83 of file battle_effect_streaks.c.

STREAK_TARGET_DELAY

#define STREAK_TARGET_DELAY 32

ticks between targets

Referenced by btEffectRunStreakVolley().

Definition at line 84 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_TICKS

#define MOTE_FOUNTAIN_TICKS 128

Referenced by btEffectRunMoteFountain().

Definition at line 345 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_DEPTH_NEAR

#define MOTE_FOUNTAIN_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 MOTE_FOUNTAIN_DEPTH_NEAR or nearer, a pixel narrower for every MOTE_FOUNTAIN_DEPTH_STEP farther.

Referenced by btEffectRunMoteFountain().

Definition at line 351 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_DEPTH_FAR

#define MOTE_FOUNTAIN_DEPTH_FAR 634

Referenced by btEffectRunMoteFountain().

Definition at line 352 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_LARGEST

#define MOTE_FOUNTAIN_LARGEST 6

Referenced by btEffectRunMoteFountain().

Definition at line 353 of file battle_effect_streaks.c.

MOTE_FOUNTAIN_DEPTH_STEP

#define MOTE_FOUNTAIN_DEPTH_STEP 64

Referenced by btEffectRunMoteFountain().

Definition at line 354 of file battle_effect_streaks.c.

Enumerations in detail

STREAK_STYLE

enum STREAK_STYLE

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

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

Definition at line 16 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

Definition at line 314 of file battle_effect_streaks.c.

anonymous enum

enum { MOTE_FOUNTAIN_MOTES, MOTE_FOUNTAIN_MOTES_DRAWN }

The motes the fountains set out, and the ones drawn.

EnumeratorValueDescription
MOTE_FOUNTAIN_MOTES256
MOTE_FOUNTAIN_MOTES_DRAWN128

Definition at line 321 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 29 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.

References btEffectRunStreakVolley().

Referenced by BattleEffectHandlers.

Definition at line 38 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 47 of file battle_effect_streaks.c.

btEffectRunWarCry

void btEffectRunWarCry(BATTLE_EFFECT_PARM *args)

Three flickering cyan streaks, cycling through three colour rows, 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 56 of file battle_effect_streaks.c.

btEffectRunWickedHowl

void btEffectRunWickedHowl(BATTLE_EFFECT_PARM *args)

Three flickering red streaks, cycling through three colour rows, 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 65 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 72 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(), btEffectStartCanvasLayer(), btEffectTintBattler(), btMotionApplyKnockbackStub(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btResourceLoadAndDecompress(), Sint32, state, StreakTremble, syResourceGetTableEntry(), sySin(), sySoundPlayStub() and syWordsCopy().

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

Definition at line 88 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 331 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 340 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 btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btResourceLoadAndDecompress(), Sint32, state, syCos(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub() and syWordsCopy().

Referenced by btEffectRunSleepStar() and btEffectRunSoothingStar().

Definition at line 358 of file battle_effect_streaks.c.