Alchemy

rushing_strike.c

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

games/tbs/src/effect/parts/rushing_strike.c on GitHub

Rushing strikes (Bone Charge, Brute Force, Onslaught, Headbutt). Part of effect.c, the battle effect object, compiled only through it.

Functions

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.

Used by BattleFx_RunRushingStrike, CastingImpact_PackRows.

Line 17

BattleFx_RunBoneCharge

void BattleFx_RunBoneCharge(struct BattleEffectArgument *effect)

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

Abilities: Bone Charge (kind 311).

Used by gBattleFx_EffectHandlers.

Line 39

BattleFx_RunBruteForce

void BattleFx_RunBruteForce(struct BattleEffectArgument *effect)

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

Abilities: Brute Force (kind 314).

Used by gBattleFx_EffectHandlers.

Line 45

BattleFx_RunOnslaught

void BattleFx_RunOnslaught(struct BattleEffectArgument *effect)

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

Abilities: Onslaught (kind 326).

Used by gBattleFx_EffectHandlers.

Line 51

BattleFx_RunHeadbutt

void BattleFx_RunHeadbutt(struct BattleEffectArgument *effect)

Rushes the target and scatters sparks in the blast palette.

Abilities: Headbutt (kind 339).

Used by gBattleFx_EffectHandlers.

Line 57

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.

Used by BattleFx_RunBoneCharge, BattleFx_RunBruteForce, BattleFx_RunHeadbutt, BattleFx_RunOnslaught.

Line 76

Macros, without a comment: RUSHING_STRIKE_SPARK_COUNT, RUSHING_STRIKE_RING_BYTES, RUSHING_STRIKE_FRAMES, RUSHING_STRIKE_FRAME.

On this page