Alchemy
Loading...
Searching...
No Matches

target_motes.c File Reference

Status motes: Taint, Delude, Paralyze, Sleep, Curse .... More...

Go to the source code of this file.

Macros

#define TARGET_MOTES_START_WIDE(mode)
 Styles whose motes start in a wide ball and last 64 frames more.
#define TARGET_MOTES_CLOSE_IN(mode)
 Styles whose motes close in on the target; the others rise.
#define TARGET_MOTES_RIPPLE(mode)
 Modes other than 0, 1 and 3 ripple the canvas: BG2's x is set line by line from work->bg2xLines (BattleFx_ArmBg2AffineHBlankDma).
#define TARGET_MOTES   512
 motes scattered at the start
#define TARGET_MOTES_SLOTS   64
 particles reserved for each target
#define TARGET_MOTES_CYCLE   24
 frames of a mote's image cycle
#define SLEEP_FRAMES   148
#define SLEEP_SEEDED   32
 particles cleared at the start
#define SLEEP_SHEEP   12
 sheep dropped
#define CURSE_MARKER_CELLS   1728
 the marker picture in the sheet

Enumerations

enum  { TARGET_MOTES_GLINT_CELLS = 0x2580 }
 Where mode 3 keeps its glint images in work->sheet. More...

Functions

void BattleFx_RunTaint (struct BattleEffectArgument *effect)
 Lime smoke (effect->variant 0) or pink smoke.
UNUSED void BattleFx_RunTargetMotesMode1 (struct BattleEffectArgument *effect)
 Pink smoke; no ☀️ effect table entry points here.
void BattleFx_RunDelude (struct BattleEffectArgument *effect)
 Cyan smoke that rises.
void BattleFx_RunParalyze (struct BattleEffectArgument *effect)
 Rising smoke with glints.
void BattleFx_RunHeartrender (struct BattleEffectArgument *effect)
 Hearts.
void BattleFx_RunMysticFlame (struct BattleEffectArgument *effect)
 Glowing orbs.
void BattleFx_RunDemonFire (struct BattleEffectArgument *effect)
 Glowing orbs in Mars Djinn colours, and the user strikes.
void BattleFx_RunDrown (struct BattleEffectArgument *effect)
 Vortex motes.
void BattleFx_RunTargetMotes (struct BattleEffectArgument *effect, u32 mode)
 Around each target in turn, 8 frames apart, motes (smoke, hearts, orbs) turn about a point 20 pixels up, either closing in on it or rising, and the target flashes until the end; the battle shows the damage 32 frames before the end.
void BattleFx_RunSleep (struct BattleEffectArgument *effect)
 Twelve sheep drop onto the targets' side, one every 4 frames, tumbling through eight images (the last four mirrored both ways); each target takes its damage pose in turn from frame 64, and the battle shows the result on frame 80.
void BattleFx_RunCurse (struct BattleEffectArgument *effect)
 A small flame burns above each target in turn, 16 frames apart, for 72 frames each, over a marker at its feet; the battle shows the result on frame 32.

Detailed Description

Status motes: Taint, Delude, Paralyze, Sleep, Curse ....

Part of effect.c, the battle effect object, compiled only through it.

Definition in file target_motes.c.

Macro Definition Documentation

◆ TARGET_MOTES_START_WIDE

#define TARGET_MOTES_START_WIDE ( mode)
Value:
((mode) <= 1 || (mode) == 4 || (mode) == 5 || (mode) == 6 || (mode) == 7)

Styles whose motes start in a wide ball and last 64 frames more.

Definition at line 70 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ TARGET_MOTES_CLOSE_IN

#define TARGET_MOTES_CLOSE_IN ( mode)
Value:
((mode) <= 1 || (mode) == 4 || (mode) == 5 || (mode) == 6)

Styles whose motes close in on the target; the others rise.

Definition at line 73 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ TARGET_MOTES_RIPPLE

#define TARGET_MOTES_RIPPLE ( mode)
Value:
(!((mode) <= 1 || (mode) == 3))

Modes other than 0, 1 and 3 ripple the canvas: BG2's x is set line by line from work->bg2xLines (BattleFx_ArmBg2AffineHBlankDma).

Definition at line 78 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ TARGET_MOTES

#define TARGET_MOTES   512

motes scattered at the start

Definition at line 83 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ TARGET_MOTES_SLOTS

#define TARGET_MOTES_SLOTS   64

particles reserved for each target

Definition at line 84 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ TARGET_MOTES_CYCLE

#define TARGET_MOTES_CYCLE   24

frames of a mote's image cycle

Definition at line 85 of file target_motes.c.

Referenced by BattleFx_RunTargetMotes().

◆ SLEEP_FRAMES

#define SLEEP_FRAMES   148

Definition at line 341 of file target_motes.c.

Referenced by BattleFx_RunSleep().

◆ SLEEP_SEEDED

#define SLEEP_SEEDED   32

particles cleared at the start

Definition at line 342 of file target_motes.c.

Referenced by BattleFx_RunSleep().

◆ SLEEP_SHEEP

#define SLEEP_SHEEP   12

sheep dropped

Definition at line 343 of file target_motes.c.

Referenced by BattleFx_RunSleep().

◆ CURSE_MARKER_CELLS

#define CURSE_MARKER_CELLS   1728

the marker picture in the sheet

Definition at line 459 of file target_motes.c.

Referenced by BattleFx_RunCurse().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Where mode 3 keeps its glint images in work->sheet.

Enumerator
TARGET_MOTES_GLINT_CELLS 

Definition at line 81 of file target_motes.c.

Function Documentation

◆ BattleFx_RunTaint()

void BattleFx_RunTaint ( struct BattleEffectArgument * effect)

Lime smoke (effect->variant 0) or pink smoke.

Abilities: Taint, Poison (kind 32).

Definition at line 20 of file target_motes.c.

Referenced by BattleFx_RunTaint().

◆ BattleFx_RunTargetMotesMode1()

UNUSED void BattleFx_RunTargetMotesMode1 ( struct BattleEffectArgument * effect)

Pink smoke; no ☀️ effect table entry points here.

Definition at line 29 of file target_motes.c.

Referenced by BattleFx_RunTargetMotesMode1().

◆ BattleFx_RunDelude()

void BattleFx_RunDelude ( struct BattleEffectArgument * effect)

Cyan smoke that rises.

Abilities: Delude, Confuse, Mist (kind 33).

Definition at line 36 of file target_motes.c.

Referenced by BattleFx_RunDelude().

◆ BattleFx_RunParalyze()

void BattleFx_RunParalyze ( struct BattleEffectArgument * effect)

Rising smoke with glints.

Abilities: Paralyze (kind 36).

Definition at line 42 of file target_motes.c.

Referenced by BattleFx_RunParalyze().

◆ BattleFx_RunHeartrender()

void BattleFx_RunHeartrender ( struct BattleEffectArgument * effect)

Hearts.

Abilities: Heartrender (kind 346); kind 35 is used by no ability.

Definition at line 48 of file target_motes.c.

Referenced by BattleFx_RunHeartrender().

◆ BattleFx_RunMysticFlame()

void BattleFx_RunMysticFlame ( struct BattleEffectArgument * effect)

Glowing orbs.

Abilities: Mystic Flame (kind 312).

Definition at line 54 of file target_motes.c.

Referenced by BattleFx_RunCastingImpact(), and BattleFx_RunMysticFlame().

◆ BattleFx_RunDemonFire()

void BattleFx_RunDemonFire ( struct BattleEffectArgument * effect)

Glowing orbs in Mars Djinn colours, and the user strikes.

Abilities: Demon Fire (kind 64).

Definition at line 60 of file target_motes.c.

Referenced by BattleFx_RunDemonFire().

◆ BattleFx_RunDrown()

void BattleFx_RunDrown ( struct BattleEffectArgument * effect)

Vortex motes.

Abilities: Drown (kind 66).

Definition at line 66 of file target_motes.c.

Referenced by BattleFx_RunDrown().

◆ BattleFx_RunTargetMotes()

void BattleFx_RunTargetMotes ( struct BattleEffectArgument * effect,
u32 mode )

Around each target in turn, 8 frames apart, motes (smoke, hearts, orbs) turn about a point 20 pixels up, either closing in on it or rising, and the target flashes until the end; the battle shows the damage 32 frames before the end.

The effect layer ripples, except in modes 0, 1 and 3. mode : 0 lime smoke, 1 pink smoke, 2 cyan smoke, 3 smoke with glints, 4 hearts, 5 glowing orbs, 6 vortex motes, 7 orbs in Mars Djinn colours, with the user stepping up to strike the first target.

Called by the wrappers above: BattleFx_RunTaint (mode 0 or 1), BattleFx_RunDelude (2), BattleFx_RunParalyze (3), BattleFx_RunHeartrender (4), BattleFx_RunMysticFlame (5), BattleFx_RunDrown (6) and BattleFx_RunDemonFire (7).

Overwrites PARTICLES 0 to 511, loads the mode's palette into the first 64 background colours, and in the rippling modes writes work->bg2xLines each frame for BattleFx_ArmBg2AffineHBlankDma, which it schedules and removes. It builds both blitters afresh for each target every frame and releases them again, mode 3 a mirrored one for each glint too, so it ends with none held. Mode 7 sets work->shakeFrames.

Definition at line 106 of file target_motes.c.

Referenced by BattleFx_RunDelude(), BattleFx_RunDemonFire(), BattleFx_RunDrown(), BattleFx_RunHeartrender(), BattleFx_RunMysticFlame(), BattleFx_RunParalyze(), BattleFx_RunTaint(), BattleFx_RunTargetMotes(), and BattleFx_RunTargetMotesMode1().

◆ BattleFx_RunSleep()

void BattleFx_RunSleep ( struct BattleEffectArgument * effect)

Twelve sheep drop onto the targets' side, one every 4 frames, tumbling through eight images (the last four mirrored both ways); each target takes its damage pose in turn from frame 64, and the battle shows the result on frame 80.

Abilities: Sleep (kind 37).

148 frames. PARTICLES 0 to 31 are the sheep, canvas pixels in 16.16; only the first twelve fall. Loads the sheep palette into the first 64 background colours and sets REG_BLDCNT and BG2's affine registers (the narrow canvas, moved over the party's side when side is 1).

Definition at line 356 of file target_motes.c.

Referenced by BattleFx_RunSleep().

◆ BattleFx_RunCurse()

void BattleFx_RunCurse ( struct BattleEffectArgument * effect)

A small flame burns above each target in turn, 16 frames apart, for 72 frames each, over a marker at its feet; the battle shows the result on frame 32.

Abilities: Curse (kind 41); Lucid Prophecy (kind 354).

work->particles' variants give each flame its starting point in its animation. Loads the flame column palette into the first 64 background colours and sets REG_BLDCNT and BG2's affine registers (the narrow canvas, moved over the party's side when side is 1).

Definition at line 471 of file target_motes.c.

Referenced by BattleFx_RunCurse().