Alchemy

quake.c

Quake.

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

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

Functions

BattleFx_RunQuake

void BattleFx_RunQuake(struct BattleEffectArgument *effect)

Rock wall: three rock pillars rise from the left, 4 frames apart, and sink again, throwing the targets standing on them into the air.

Abilities: Quake, Earthquake, Quake Sphere (kind 1).

Each pillar is capped with a strip of ground cut from the background.

Writes REG_BG2PA, REG_BLDCNT and, on side 1, REG_BG2X; overwrites the first 0x8000 bytes of Ram_MapCellBuffer with BG tiles; sets the targets' vertical velocity and gravity; arms work->shakeFrames. Ends with the transfer callback removed, the blitter freed and the canvas layer closed.

effect: the targets; variant picks the row of gQuake_Timings.

Used by gBattleFx_EffectHandlers.

Line 37

Structures

RockWallHeights

struct RockWallHeights

The heights of Quake's rock pillars.

FieldDeclared as
columns32 column[4]each pillar's height in pixels

Used by BattleFx_RunQuake.

Line 15

Macros

QUAKE_WALL_CELLS

#define QUAKE_WALL_CELLS 0x1e00

The rock picture in the sheet; the sheet starts with the 40x16 strip of ground cut from the background.

Used by BattleFx_RunQuake.

Line 22

Also, macros without a comment: QUAKE_PILLAR_WIDTH.

On this page