Alchemy
Loading...
Searching...
No Matches

streaks.c File Reference

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

Go to the source code of this file.

Macros

#define STREAKS_VALUE(mode, n)
 Column n of style mode's row of gStreaks_Records, four flags a style.
#define STREAKS_ANIMATE   0
 nonzero: the streak cycles through three images
#define STREAKS_HIT   1
 nonzero: play the hit sound and flash the target
#define STREAKS_MOTION   2
 the target's recoil motion on the hit (-1: none)
#define STREAKS_SHAKE   3
 nonzero: the struck target trembles from side to side
#define STREAKS_MAX   3
 streaks fired at each target
#define STREAKS_SPACING   6
 frames between streaks
#define STREAKS_FLIGHT   24
 frames from user to target
#define STREAKS_TARGET_DELAY   32
 frames between targets
#define MOTE_FOUNTAIN_FOUNTAIN_FRAMES   128

Enumerations

enum  StreakStyle {
  STREAKS_STYLE_EMBER , STREAKS_STYLE_LIME , STREAKS_STYLE_VIOLET , STREAKS_STYLE_RED ,
  STREAKS_STYLE_CYAN
}
 The streak volley's styles: its colour and its row of gStreaks_Records. More...
enum  MoteFountainMode { MOTE_FOUNTAIN_FOUNTAIN_HEALING , MOTE_FOUNTAIN_DRIFTING }
 The mote fountain's modes (BattleFx_RunMoteFountain). More...
enum  { MOTE_FOUNTAIN_INITIALIZED_COUNT = 256 , MOTE_VISIBLE_COUNT = 128 }
 The fountain launches 256 motes in PARTICLES but draws only the first 128. More...

Functions

void BattleFx_RunSonicWave (struct BattleEffectArgument *effect)
 Ember streaks.
void BattleFx_RunShriek (struct BattleEffectArgument *effect)
 Lime streaks.
void BattleFx_RunBansheeHowl (struct BattleEffectArgument *effect)
 Violet streaks.
void BattleFx_RunWarCry (struct BattleEffectArgument *effect)
 Cyan streaks.
void BattleFx_RunWickedHowl (struct BattleEffectArgument *effect)
 Red streaks.
UNUSED void BattleFx_RunLimeStreaks (struct BattleEffectArgument *effect)
 The streak volley in lime. UNUSED: no effect table entry points here.
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.
void BattleFx_RunSleepStar (struct BattleEffectArgument *effect)
 Rising motes that drift onto the targets and strike.
void BattleFx_RunSoothingStar (struct BattleEffectArgument *effect)
 Rising healing motes.
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.

Detailed Description

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.

Definition in file streaks.c.

Macro Definition Documentation

◆ STREAKS_VALUE

#define STREAKS_VALUE ( mode,
n )
Value:
gStreaks_Records[(mode)][(n)]
s8 gStreaks_Records[][4]
Each streak style's animation, hit, motion and shake, by the STREAKS_ columns (streaks....

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

Definition at line 13 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_ANIMATE

#define STREAKS_ANIMATE   0

nonzero: the streak cycles through three images

Definition at line 14 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_HIT

#define STREAKS_HIT   1

nonzero: play the hit sound and flash the target

Definition at line 15 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_MOTION

#define STREAKS_MOTION   2

the target's recoil motion on the hit (-1: none)

Definition at line 16 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_SHAKE

#define STREAKS_SHAKE   3

nonzero: the struck target trembles from side to side

Definition at line 18 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_MAX

#define STREAKS_MAX   3

streaks fired at each target

Definition at line 20 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_SPACING

#define STREAKS_SPACING   6

frames between streaks

Definition at line 81 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_FLIGHT

#define STREAKS_FLIGHT   24

frames from user to target

Definition at line 82 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ STREAKS_TARGET_DELAY

#define STREAKS_TARGET_DELAY   32

frames between targets

Definition at line 83 of file streaks.c.

Referenced by BattleFx_RunStreakVolley().

◆ MOTE_FOUNTAIN_FOUNTAIN_FRAMES

#define MOTE_FOUNTAIN_FOUNTAIN_FRAMES   128

Definition at line 315 of file streaks.c.

Referenced by BattleFx_RunMoteFountain().

Enumeration Type Documentation

◆ StreakStyle

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

Enumerator
STREAKS_STYLE_EMBER 
STREAKS_STYLE_LIME 
STREAKS_STYLE_VIOLET 
STREAKS_STYLE_RED 
STREAKS_STYLE_CYAN 

Definition at line 23 of file streaks.c.

◆ MoteFountainMode

The mote fountain's modes (BattleFx_RunMoteFountain).

Enumerator
MOTE_FOUNTAIN_FOUNTAIN_HEALING 

Soothing Star.

MOTE_FOUNTAIN_DRIFTING 

Sleep Star.

Definition at line 289 of file streaks.c.

◆ anonymous enum

anonymous enum

The fountain launches 256 motes in PARTICLES but draws only the first 128.

Enumerator
MOTE_FOUNTAIN_INITIALIZED_COUNT 
MOTE_VISIBLE_COUNT 

Definition at line 295 of file streaks.c.

Function Documentation

◆ 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.

Definition at line 37 of file streaks.c.

Referenced by BattleFx_RunSonicWave().

◆ 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.

Definition at line 46 of file streaks.c.

Referenced by BattleFx_RunShriek().

◆ 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.

Definition at line 55 of file streaks.c.

Referenced by BattleFx_RunBansheeHowl().

◆ 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.

Definition at line 64 of file streaks.c.

Referenced by BattleFx_RunWarCry().

◆ 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.

Definition at line 73 of file streaks.c.

Referenced by BattleFx_RunWickedHowl().

◆ BattleFx_RunLimeStreaks()

UNUSED void BattleFx_RunLimeStreaks ( struct BattleEffectArgument * effect)

The streak volley in lime. UNUSED: no effect table entry points here.

Definition at line 77 of file streaks.c.

Referenced by BattleFx_RunLimeStreaks().

◆ 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.

Definition at line 99 of file streaks.c.

Referenced by BattleFx_RunBansheeHowl(), BattleFx_RunLimeStreaks(), BattleFx_RunShriek(), BattleFx_RunSonicWave(), BattleFx_RunStreakVolley(), BattleFx_RunWarCry(), and 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.

Definition at line 303 of file streaks.c.

Referenced by BattleFx_RunSleepStar().

◆ 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.

Definition at line 312 of file streaks.c.

Referenced by BattleFx_RunSoothingStar().

◆ 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).

Definition at line 330 of file streaks.c.

Referenced by BattleFx_RunMoteFountain(), BattleFx_RunSleepStar(), and BattleFx_RunSoothingStar().