streaks.c
Streak volleys (Sonic Wave, Shriek, War Cry ...) and mote fountains (Sleep Star, Soothing Star).
games/tbs/src/effect/parts/streaks.c on GitHub
Streak volleys (Sonic Wave, Shriek, War Cry ...) and mote fountains (Sleep Star, Soothing Star). Part of effect.c, the battle effect object, compiled only through it.
Functions
BattleFx_RunSonicWave
void BattleFx_RunSonicWave(struct BattleEffectArgument *effect)
Ember streaks.
Abilities: Sonic Wave (kind 300).
Three streaks of ember light fly from the user at each target in turn; each target flashes and recoils.
Used by gBattleFx_EffectHandlers.
BattleFx_RunShriek
void BattleFx_RunShriek(struct BattleEffectArgument *effect)
Lime streaks.
Abilities: Shriek (kind 301).
Three streaks of lime light fly from the user at each target in turn; each target flashes and recoils.
Used by gBattleFx_EffectHandlers.
BattleFx_RunBansheeHowl
void BattleFx_RunBansheeHowl(struct BattleEffectArgument *effect)
Violet streaks.
Abilities: Banshee Howl (kind 302).
Three streaks of violet light fly from the user at each target in turn; each target flashes and trembles.
Used by gBattleFx_EffectHandlers.
BattleFx_RunWarCry
void BattleFx_RunWarCry(struct BattleEffectArgument *effect)
Cyan streaks.
Abilities: War Cry (kind 304).
Three flickering cyan streaks, cycling through three colour rows, fly from the user at each target in turn; each target flashes and recoils.
Used by gBattleFx_EffectHandlers.
BattleFx_RunWickedHowl
void BattleFx_RunWickedHowl(struct BattleEffectArgument *effect)
Red streaks.
Abilities: Wicked Howl (kind 305).
Three flickering red streaks, cycling through three colour rows, fly from the user at each target in turn; each target flashes and trembles.
Used by gBattleFx_EffectHandlers.
BattleFx_RunLimeStreaks
UNUSED void BattleFx_RunLimeStreaks(struct BattleEffectArgument *effect)
The streak volley in lime. UNUSED: no effect table entry points here.
BattleFx_RunStreakVolley
void BattleFx_RunStreakVolley(struct BattleEffectArgument *effect, s32 mode)
Fires STREAKS_MAX streaks at each target from 20 pixels above the user, one every 6 frames, each reaching 20 pixels above its target 24 frames later; each target's volley starts 32 frames after the previous one's. A streak image is 20x40 and drawn twice, mirrored upwards, as a 20x80 streak that leaves a fading trail.
Called by the five streak handlers above and the unused BattleFx_RunLimeStreaks. Loads the style's colours over the first 64 of the background palette, writes work->bg2xLines and, over the last 16 frames, BLDALPHA; sets work->shakeFrames on a recoiling hit, and moves a trembling target's x.
mode : the style, 0 to 4: the streak colour (ember, lime, violet, red,
cyan) and the row of gStreaks_Records that says how a hit looks.Used by BattleFx_RunBansheeHowl, BattleFx_RunLimeStreaks, BattleFx_RunShriek, BattleFx_RunSonicWave, BattleFx_RunWarCry, BattleFx_RunWickedHowl.
BattleFx_RunSleepStar
void BattleFx_RunSleepStar(struct BattleEffectArgument *effect)
Rising motes that drift onto the targets and strike.
Abilities: Sleep Star (kind 349).
Motes burst out of the user and float up, wobbling, as they drift across the field; each target flinches in turn.
Used by gBattleFx_EffectHandlers.
BattleFx_RunSoothingStar
void BattleFx_RunSoothingStar(struct BattleEffectArgument *effect)
Rising healing motes.
Abilities: Soothing Star (kind 344).
Orange motes burst out of the user and float up close to it, and each target glows in turn with the recovery sound.
Used by gBattleFx_EffectHandlers.
BattleFx_RunMoteFountain
void BattleFx_RunMoteFountain(struct BattleEffectArgument *effect, s32 mode)
Motes burst out of the user in every direction and float upwards, wobbling, for 128 frames; a new group of 32 joins every 8 frames. Each target in turn reacts from frame 48, 8 frames apart.
Called by BattleFx_RunSleepStar and BattleFx_RunSoothingStar. Fills PARTICLES 0 to 255 and loads the mode's colours over the first 64 of the background palette; the healing mode opens the canvas layer with BG control 0 and the drifting mode with 1.
mode 0: orange motes that stay close to the user; each target plays the
recovery sound and glows (a healing effect).
mode 1: motes on the earth palette that drift across towards the far side
of the field; each target flinches (an attack).Used by BattleFx_RunSleepStar, BattleFx_RunSoothingStar.
Enumerations
StreakStyle
enum StreakStyle
The streak volley's styles: its colour and its row of gStreaks_Records.
| Value | = | |
|---|---|---|
STREAKS_STYLE_EMBER | ||
STREAKS_STYLE_LIME | ||
STREAKS_STYLE_VIOLET | ||
STREAKS_STYLE_RED | ||
STREAKS_STYLE_CYAN |
MoteFountainMode
enum MoteFountainMode
The mote fountain's modes (BattleFx_RunMoteFountain).
| Value | = | |
|---|---|---|
MOTE_FOUNTAIN_FOUNTAIN_HEALING | Soothing Star | |
MOTE_FOUNTAIN_DRIFTING | Sleep Star |
Macros
STREAKS_VALUE
#define STREAKS_VALUE(mode, n) gStreaks_Records[(mode)][(n)]
Column n of style mode's row of gStreaks_Records, four flags a style.
Used by BattleFx_RunStreakVolley.
STREAKS_SHAKE
#define STREAKS_SHAKE 3
nonzero: the struck target trembles from side to side
Used by BattleFx_RunStreakVolley.
Also, macros without a comment: STREAKS_ANIMATE, STREAKS_HIT, STREAKS_MOTION, STREAKS_MAX, STREAKS_SPACING, STREAKS_FLIGHT, STREAKS_TARGET_DELAY, MOTE_FOUNTAIN_FOUNTAIN_FRAMES.