Alchemy
Loading...
Searching...
No Matches

rushing_strike.c File Reference

Rushing strikes (Bone Charge, Brute Force, Onslaught, Headbutt). More...

Go to the source code of this file.

Macros

#define RUSHING_STRIKE_SPARK_COUNT   64
 sparks
#define RUSHING_STRIKE_RING_BYTES   0x3c0
 one 20x48 ring picture
#define RUSHING_STRIKE_FRAMES   60
#define RUSHING_STRIKE_FRAME   10
 the user strikes

Functions

void Graphics_PackTileRows (u8 *src, u8 *dst, s32 stride, s32 rowCount)
 Packs 288 rows of 40 bytes to half width, keeping every second byte (the bytes of the odd columns win).
void BattleFx_RunBoneCharge (struct BattleEffectArgument *effect)
 Rushes the target and scatters sparks in the fire pillar palette.
void BattleFx_RunBruteForce (struct BattleEffectArgument *effect)
 Rushes the target and scatters sparks in the ice-block palette.
void BattleFx_RunOnslaught (struct BattleEffectArgument *effect)
 Rushes the target and scatters sparks in the pink-burst palette.
void BattleFx_RunHeadbutt (struct BattleEffectArgument *effect)
 Rushes the target and scatters sparks in the blast palette.
void BattleFx_RunRushingStrike (struct BattleEffectArgument *effect, s32 mode)
 Rushing strike: the user rushes at the first target and strikes it on frame 10; a ring flares where it hits and 64 sparks scatter, over 60 frames in all.

Detailed Description

Rushing strikes (Bone Charge, Brute Force, Onslaught, Headbutt).

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

Definition in file rushing_strike.c.

Macro Definition Documentation

◆ RUSHING_STRIKE_SPARK_COUNT

#define RUSHING_STRIKE_SPARK_COUNT   64

sparks

Definition at line 33 of file rushing_strike.c.

Referenced by BattleFx_RunRushingStrike().

◆ RUSHING_STRIKE_RING_BYTES

#define RUSHING_STRIKE_RING_BYTES   0x3c0

one 20x48 ring picture

Definition at line 34 of file rushing_strike.c.

Referenced by BattleFx_RunRushingStrike().

◆ RUSHING_STRIKE_FRAMES

#define RUSHING_STRIKE_FRAMES   60

Definition at line 60 of file rushing_strike.c.

Referenced by BattleFx_RunRushingStrike().

◆ RUSHING_STRIKE_FRAME

#define RUSHING_STRIKE_FRAME   10

the user strikes

Definition at line 61 of file rushing_strike.c.

Referenced by BattleFx_RunRushingStrike().

Function Documentation

◆ Graphics_PackTileRows()

void Graphics_PackTileRows ( u8 * src,
u8 * dst,
s32 stride,
s32 rowCount )

Packs 288 rows of 40 bytes to half width, keeping every second byte (the bytes of the odd columns win).

Called by BattleFx_RunRushingStrike and twice by the casting impacts, to squeeze a 40-pixel-wide sheet into 20-pixel pictures. Writes only dst.

src: the rows to pack. dst: receives the packed rows, half the stride apart. stride: the bytes in one row of src. rowCount: ignored; 288 rows are always packed.

Definition at line 17 of file rushing_strike.c.

Referenced by BattleFx_RunRushingStrike(), CastingImpact_PackRows(), and Graphics_PackTileRows().

◆ BattleFx_RunBoneCharge()

void BattleFx_RunBoneCharge ( struct BattleEffectArgument * effect)

Rushes the target and scatters sparks in the fire pillar palette.

Abilities: Bone Charge (kind 311).

Definition at line 39 of file rushing_strike.c.

Referenced by BattleFx_RunBoneCharge().

◆ BattleFx_RunBruteForce()

void BattleFx_RunBruteForce ( struct BattleEffectArgument * effect)

Rushes the target and scatters sparks in the ice-block palette.

Abilities: Brute Force (kind 314).

Definition at line 45 of file rushing_strike.c.

Referenced by BattleFx_RunBruteForce().

◆ BattleFx_RunOnslaught()

void BattleFx_RunOnslaught ( struct BattleEffectArgument * effect)

Rushes the target and scatters sparks in the pink-burst palette.

Abilities: Onslaught (kind 326).

Definition at line 51 of file rushing_strike.c.

Referenced by BattleFx_RunOnslaught().

◆ BattleFx_RunHeadbutt()

void BattleFx_RunHeadbutt ( struct BattleEffectArgument * effect)

Rushes the target and scatters sparks in the blast palette.

Abilities: Headbutt (kind 339).

Definition at line 57 of file rushing_strike.c.

Referenced by BattleFx_RunHeadbutt().

◆ BattleFx_RunRushingStrike()

void BattleFx_RunRushingStrike ( struct BattleEffectArgument * effect,
s32 mode )

Rushing strike: the user rushes at the first target and strikes it on frame 10; a ring flares where it hits and 64 sparks scatter, over 60 frames in all.

Called by the four wrappers above. work->particles holds the sparks, each variant its frames left; the six packed ring pictures go to Ram_MapCellBuffer. Moves the user with BattleFx_SetApproachMotion and does not bring it back. Copies the mode's palette over the first 128 bytes of BG palette RAM, sets work->shakeFrames on the strike, and ends with the transfer callback removed, the blitters freed and the canvas layer closed.

effect: the user and the targets. mode : the palette: 0 fire pillar, 1 ice block, 2 pink burst, 3 blast.

Definition at line 76 of file rushing_strike.c.

Referenced by BattleFx_RunBoneCharge(), BattleFx_RunBruteForce(), BattleFx_RunHeadbutt(), BattleFx_RunOnslaught(), and BattleFx_RunRushingStrike().