Skip to Content
The Alchemy Project

include/scene/airs_rock.h

What Air's Rock's outside (airs_rock.c) and inside (airs_rock_inside.c) share: the whirlwinds the statues breathe and the leader rides, and the outside's tables, scripts and scripts.

Included by airs_rock.c and airs_rock_inside.c.

Macros

NameDescription
#defineFLAG_RIDING_WHIRLWIND FLAG_SCENE_TEMP(0x50)Set while the leader rides a statue's whirlwind (scAirsRockRideWhirlwind, scAirsRockInsideRideWhirlwind): the statues breathe theirs without a flare.
#defineWHIRLWIND_REACH 8How near across the ground a statue's whirlwind comes to pick up the leader, in pixels; on Air's Rock's outside, also how near it comes to another actor to end on it.
#defineWHIRLWIND_BREATH_TICKS 240A statue breathes a whirlwind every this many ticks.

Functions

NameDescription
Sint32scMapMetatileGetAttributes (Uint32 layer, Sint32 x, Sint32 y)Returns a metatile's collision code and attributes as a halfword.
voidscAirsRockDriftFog (void)The fog over the wall drifts, thickening and thinning between FOG_WEIGHT and half that while its lines ripple.
voidscAirsRockLiftFog (void)As the fog lifts, the great whirlwind sways and scatters the more the higher it stands above its foot, while the fog ripples and thickens and thins as in scAirsRockDriftFog.
voidscAirsRockScrollWave (void)The great whirlwind's sway: BG0's line scroll, by HBlank DMA.
voidscAirsRockExamineWindStone (void)Felix reads a Wind Stone on the first screen: "Beware the Wind Stones." and its warning that the stones magnify the wind.
voidscAirsRockEnterTheRock (void)Felix walks north into the golden door low on the cliff, beside the first pillar's gap (metatile (19, 43)): the door slides open, he walks in and the screen wipes to the great hall inside Air's Rock.
voidscAirsRockMoveFirstPillar (void)Felix casts Move on the left of the two pillars on the ledges below the fog.
voidscAirsRockMoveThirdPillar (void)Felix casts Move on the pillar in the fog: pushed one metatile east into the gap (metatile (11, 17)), it stays there for good, a way across the gap and a shortcut back.
voidscAirsRockDropOffLedge (void)Felix walks south off the edge of the ledges below the fog, in front of the two pillars (metatile (33, 55), on the second level): he hops over the edge, lowers himself a little way down the rock face, lets go and drops to the ledge below.
voidscAirsRockStartWhirlwind (void)Nothing visible happens of its own as Felix starts casting Whirlwind on a Wind Stone or a twister rock; the game clears what is pending so that the cast can go on to the stone's or rock's own whirlwind (scAirsRockTakeOverWhirlwind).
voidscAirsRockTakeOverWhirlwind (void)Nothing visible happens of its own as Felix casts Whirlwind on a Wind Stone or a twister rock; the game tells Whirlwind to leave out its usual little whirlwind, so that what follows is the stone's or the rock's own (scAirsRockBlowGust and the rest).
voidscAirsRockBlowGust (void)Felix casts Whirlwind on one of the five Wind Stones on the first screen: a whirlwind rises from the stone, which flickers as it grows, then blows off the way Felix faces, sparkling as it goes.
voidscAirsRockWhirlwindClearsWall (void)Felix casts Whirlwind on the huge twister-shaped rock below the cliff on the first screen: it glows, the view pans north to the wall caked in mud, and a great whirlwind rises and blows the mud away, baring the holds that climb it.
voidscAirsRockRideWhirlwind (void)Felix is caught by one of the little whirlwinds the cliff's statues breathe: he spins round on top of it as it carries him along, and where it fades he jumps off.
voidscAirsRockLiftPillar (void)Nothing visible happens as Felix starts to push one of the cliff's pillars, or casts Move on one; the game takes it off the metatiles it was closing so that it can slide.
voidscAirsRockPlacePillar (void)Once Felix has pushed or moved one of the cliff's pillars: if it now stands over a gap it drops into it with a thump, closing the gap so the party can walk over it, and it stays there for good.
voidscAirsRockFreezePuddle (void)Felix casts Frost on the puddle on the cliff and it freezes into a pillar of ice.
voidscAirsRockWhirlwindOpensTheTop (void)Felix casts Whirlwind on the twister rock at the top of Air's Rock: it glows, the light turns yellow, lightning strikes the pile of rocks in the hollow below it twice and they crumble with a crash and a flash (scAirsRockCrumbleRock), clearing the way to the doorway into the rock.
voidscAirsRockWhirlwindClearsFog (void)Felix casts Whirlwind on the twister rock at the foot of the foggy wall: a great whirlwind rises from it and the fog lifts (scAirsRockLiftFog) for good, so that the wall can be climbed out of it.
voidscAirsRockSetLedgeMetatilesByLevel (void)Nothing visible happens: as Felix climbs or drops between the four levels of the ledges below the fog, the game swaps in the metatiles of the ledges in front of the two pillars for the level he is on, since the ledges of all four levels are drawn over the same rows of the map.

Variables

NameDescription
extern SCENE_REGIONAirsRockEntranceRegions []
extern SCENE_REGIONAirsRockCliffRegions []
extern ACTOR_PLACEAirsRockEntrancePlacements []
extern ACTOR_PLACEAirsRockCliffPlacements []
extern ACTOR_PLACEAirsRockSummitPlacements []
extern CUEAirsRockEntranceCues []
extern CUEAirsRockCliffCues []
extern CUEAirsRockSummitCues []
extern Sint16AirsRockCliffPillars []The five pillars on the cliff's ledges that Move pushes, ended by -1.
extern Sint16AirsRockFrozenPuddle []The puddle Frost freezes into a pillar, and the flag set while it stands (fdFlagBlockPlaceAll).
extern Sint8AirsRockFogAlphaThe fog's blend weight, in sixteenths, and its step every sixteenth tick: it thickens and thins between FOG_WEIGHT / 2 and FOG_WEIGHT (scAirsRockDriftFog).
extern Sint8AirsRockFogAlphaStep
extern Sint8AirsRockLiftingFogAlphaAs AirsRockFogAlpha, while the fog lifts (scAirsRockLiftFog).
extern Sint8AirsRockLiftingFogAlphaStep
extern Uint32FieldEffectShortScript []
extern Uint32FieldEffectMediumScript []The flash about the Tomegathericon: held 45 ticks, then put away and freed.
extern Uint32FieldEffectLongScript []
extern Sint32AirsRockWindStoneScript []

Description

What Air's Rock's outside (airs_rock.c) and inside (airs_rock_inside.c) share: the whirlwinds the statues breathe and the leader rides, and the outside's tables, scripts and scripts.

Macros in detail

FLAG_RIDING_WHIRLWIND

#define FLAG_RIDING_WHIRLWIND FLAG_SCENE_TEMP(0x50)

Set while the leader rides a statue's whirlwind (scAirsRockRideWhirlwind, scAirsRockInsideRideWhirlwind): the statues breathe theirs without a flare.

Referenced by scAirsRockInsideRideWhirlwind(), scAirsRockInsideStatueBreathesPooledWhirlwind(), scAirsRockInsideStatueBreathesWhirlwind(), scAirsRockRideWhirlwind() and scAirsRockStatueBreathesWhirlwind().

Definition at line 13 of file airs_rock.h.

WHIRLWIND_REACH

#define WHIRLWIND_REACH 8

How near across the ground a statue's whirlwind comes to pick up the leader, in pixels; on Air's Rock's outside, also how near it comes to another actor to end on it.

Referenced by scAirsRockInsideMovePooledWhirlwind(), scAirsRockInsideMoveWhirlwind() and scAirsRockMoveWhirlwind().

Definition at line 18 of file airs_rock.h.

WHIRLWIND_BREATH_TICKS

#define WHIRLWIND_BREATH_TICKS 240

A statue breathes a whirlwind every this many ticks.

Referenced by scAirsRockInsideStatueBreathesPooledWhirlwind(), scAirsRockInsideStatueBreathesWhirlwind() and scAirsRockStatueBreathesWhirlwind().

Definition at line 21 of file airs_rock.h.

Functions in detail

scAirsRockScrollWave

void scAirsRockScrollWave(void)

The great whirlwind's sway: BG0's line scroll, by HBlank DMA.

Referenced by scAirsRockWhirlwindClearsFog() and scAirsRockWhirlwindClearsWall().

Definition at line 38 of file airs_rock.h.