Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_gaia.c

Gaia, and the effect sprites with tiles of their own. More…

Included by battle_effect.c.

Structures

NameDescription
structSPR_WORDSA SPR as btEffectSpriteCreateWithTiles searches and fills it: its OAM attributes and its shadow's written as words.

Macros

NameDescription
#defineGAIA_TICKS 192Ticks of Gaia.
#defineGAIA_WALL_WIDEN_TICK 64The shaft of light widens into the wall a row every three ticks from GAIA_WALL_WIDEN_TICK, stands once it has risen, and sinks away a row every three ticks.
#defineGAIA_WALL_STAND_TICK 88
#defineGAIA_WALL_SINK_TICK 160
#defineGAIA_ROCKS 11Rock sprites tumbling up through the wall.
#defineGAIA_EARLY_ROCKS 6The rocks that fly from the start; the rest join them from tick 72.
#defineGAIA_FIRST_ROCK 10The rocks' motion is state->particles[GAIA_FIRST_ROCK] on.
#defineGAIA_LATE_ROCK_COLUMNS 6The columns GaiaLateRockColumns gives the rocks after the early ones.
#defineGAIA_ROCK_STAGGER 4A rock waits this many ticks longer than the rock after it before it first flies.
#defineGAIA_DUST 256Dust in PARTICLES.
#defineGAIA_DUST_SHOWN 64The dust drawn: the rest is set out and never shown.
#defineGAIA_ROW_HEIGHT 32The pictures Gaia rebuilds from the earth wall sprite sheet: the rising wall's rows, the standing wall's top and foot, then the flames.
#defineGAIA_ROW_PICTURES 9The rising wall's rows, narrowest first, and the flames at its foot.
#defineGAIA_FLAME_PICTURES 3
#defineGAIA_WALL_TOP_WIDTH 48The standing wall's top, stretched from a 48x32 row, and its foot.
#defineGAIA_WALL_TOP_HEIGHT 96
#defineGAIA_WALL_FOOT_WIDTH 48
#defineGAIA_WALL_FOOT_HEIGHT 21

Enumerations

NameDescription
enumEARTH_WALL_SHEET_PICTURE { GAIA_WALL_TOP, GAIA_WALL_FOOT }Where each picture starts in EarthWallSheet, in bytes.

Functions

NameDescription
voidbtEffectRunGaia (BATTLE_EFFECT_PARM *args)Flames flicker at the targets' feet under a narrow shaft of orange light, which widens into a glowing wall and stands while rocks tumble up through it and the targets are battered, then narrows away again.
SPR_ANIMATION *btAnimationObjectAllocateEmpty (void)Takes the first free animation entry of the 64 and clears it for use.
void *btEffectSpriteCreateWithTiles (Sint32 width, Sint32 height, Sint32 attributes, Sint32 flags)Makes an effect sprite with tiles of its own in object VRAM: a free VRAM cache entry and the first free effect sprite of the 64, as btEffectSpriteAcquire takes, set up for fdSpriteStartAnimationStub.

Description

Gaia, and the effect sprites with tiles of their own. Part of battle_effect.c.

Macros in detail

GAIA_TICKS

#define GAIA_TICKS 192

Ticks of Gaia.

Referenced by btEffectRunGaia().

Definition at line 5 of file battle_effect_gaia.c.

GAIA_WALL_WIDEN_TICK

#define GAIA_WALL_WIDEN_TICK 64

The shaft of light widens into the wall a row every three ticks from GAIA_WALL_WIDEN_TICK, stands once it has risen, and sinks away a row every three ticks.

Referenced by btEffectRunGaia().

Definition at line 9 of file battle_effect_gaia.c.

GAIA_WALL_STAND_TICK

#define GAIA_WALL_STAND_TICK 88

Referenced by btEffectRunGaia().

Definition at line 10 of file battle_effect_gaia.c.

GAIA_WALL_SINK_TICK

#define GAIA_WALL_SINK_TICK 160

Referenced by btEffectRunGaia().

Definition at line 11 of file battle_effect_gaia.c.

GAIA_ROCKS

#define GAIA_ROCKS 11

Rock sprites tumbling up through the wall.

Referenced by btEffectRunGaia().

Definition at line 14 of file battle_effect_gaia.c.

GAIA_EARLY_ROCKS

#define GAIA_EARLY_ROCKS 6

The rocks that fly from the start; the rest join them from tick 72.

Referenced by btEffectRunGaia().

Definition at line 16 of file battle_effect_gaia.c.

GAIA_FIRST_ROCK

#define GAIA_FIRST_ROCK 10

The rocks' motion is state->particles[GAIA_FIRST_ROCK] on.

Referenced by btEffectRunGaia().

Definition at line 18 of file battle_effect_gaia.c.

GAIA_LATE_ROCK_COLUMNS

#define GAIA_LATE_ROCK_COLUMNS 6

The columns GaiaLateRockColumns gives the rocks after the early ones.

Referenced by btEffectRunGaia().

Definition at line 20 of file battle_effect_gaia.c.

GAIA_ROCK_STAGGER

#define GAIA_ROCK_STAGGER 4

A rock waits this many ticks longer than the rock after it before it first flies.

Referenced by btEffectRunGaia().

Definition at line 23 of file battle_effect_gaia.c.

GAIA_DUST

#define GAIA_DUST 256

Dust in PARTICLES.

Referenced by btEffectRunGaia().

Definition at line 25 of file battle_effect_gaia.c.

GAIA_DUST_SHOWN

#define GAIA_DUST_SHOWN 64

The dust drawn: the rest is set out and never shown.

Referenced by btEffectRunGaia().

Definition at line 27 of file battle_effect_gaia.c.

GAIA_ROW_HEIGHT

#define GAIA_ROW_HEIGHT 32

The pictures Gaia rebuilds from the earth wall sprite sheet: the rising wall's rows, the standing wall's top and foot, then the flames.

Referenced by btEffectRunGaia().

Definition at line 31 of file battle_effect_gaia.c.

GAIA_ROW_PICTURES

#define GAIA_ROW_PICTURES 9

The rising wall's rows, narrowest first, and the flames at its foot.

Referenced by btEffectRunGaia().

Definition at line 33 of file battle_effect_gaia.c.

GAIA_FLAME_PICTURES

#define GAIA_FLAME_PICTURES 3

Referenced by btEffectRunGaia().

Definition at line 34 of file battle_effect_gaia.c.

GAIA_WALL_TOP_WIDTH

#define GAIA_WALL_TOP_WIDTH 48

The standing wall's top, stretched from a 48x32 row, and its foot.

Referenced by btEffectRunGaia().

Definition at line 36 of file battle_effect_gaia.c.

GAIA_WALL_TOP_HEIGHT

#define GAIA_WALL_TOP_HEIGHT 96

Referenced by btEffectRunGaia().

Definition at line 37 of file battle_effect_gaia.c.

GAIA_WALL_FOOT_WIDTH

#define GAIA_WALL_FOOT_WIDTH 48

Referenced by btEffectRunGaia().

Definition at line 38 of file battle_effect_gaia.c.

GAIA_WALL_FOOT_HEIGHT

#define GAIA_WALL_FOOT_HEIGHT 21

Referenced by btEffectRunGaia().

Definition at line 39 of file battle_effect_gaia.c.

Enumerations in detail

EARTH_WALL_SHEET_PICTURE

enum EARTH_WALL_SHEET_PICTURE

Where each picture starts in EarthWallSheet, in bytes.

EnumeratorValueDescription
GAIA_WALL_TOPGAIA_ROW_HEIGHT * (5 + 6 + 9 + 12 + 15 + 18 + 21 + 32 + 40)
GAIA_WALL_FOOTGAIA_WALL_TOP + PICTURE_BYTES(GAIA_WALL_TOP)

Definition at line 42 of file battle_effect_gaia.c.

Functions in detail

btEffectRunGaia

void btEffectRunGaia(BATTLE_EFFECT_PARM *args)

Flames flicker at the targets' feet under a narrow shaft of orange light, which widens into a glowing wall and stands while rocks tumble up through it and the targets are battered, then narrows away again.

Abilities: Gaia, Mother Gaia, Grand Gaia, Rockfall, Rockslide, Avalanche.

References BattleEffectMotePictures, btCameraShake(), btEffectEndCanvasLayer(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btResourceLoadAndDecompress(), fdRenderApplyProjectedPlacementStub(), fdSpriteCreateStub(), fdSpriteDestroyStub(), fdSpriteStartAnimationStub(), GaiaBg2Shifts, GaiaFlameHeights, GaiaFlamePictures, GaiaFlameWidths, GaiaLateRockColumns, GaiaRowPictures, GaiaRowWidths, GaiaUnitScale, Sint32, syCloseEvent(), syRandom(), syResourceGetTableEntry() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 53 of file battle_effect_gaia.c.

btAnimationObjectAllocateEmpty

SPR_ANIMATION *btAnimationObjectAllocateEmpty(void)

Takes the first free animation entry of the 64 and clears it for use. With none free it clears the entry at address 0.

References Sint32.

Referenced by btEffectSpriteAcquire() and btEffectSpriteCreateWithTiles().

Definition at line 453 of file battle_effect_gaia.c.

btEffectSpriteCreateWithTiles

void *btEffectSpriteCreateWithTiles(Sint32 width, Sint32 height, Sint32 attributes, Sint32 flags)

Makes an effect sprite with tiles of its own in object VRAM: a free VRAM cache entry and the first free effect sprite of the 64, as btEffectSpriteAcquire takes, set up for fdSpriteStartAnimationStub. The Lost Age's own.

References btAnimationObjectAllocateEmpty(), fdSpriteStartAnimationStub(), Sint32, syVRAMCacheFindFreeEntry(), syVRAMCacheLoad() and VramCacheEntries.

Referenced by btEffectRunAtalanta(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunHaures(), btEffectRunIris(), btEffectRunJudgment() and btEffectRunNeptune().

Definition at line 527 of file battle_effect_gaia.c.