Skip to Content
The Alchemy Project

src/scene/airs_rock.c

Air's Rock, the great purple rock in the desert south of Yampi, climbed from outside over three screens before the way inside opens. More…

Macros

NameDescription
#defineFLAG_AIRS_ROCK_PILLAR_PLACED_FIRST 0x85fSet once the first of the cliff's pillars has dropped into its gap, by the golden door, metatile (16, 43).
#defineFLAG_AIRS_ROCK_PILLAR_PLACED_SECOND 0x860As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the second, metatile (45, 45).
#defineFLAG_AIRS_ROCK_PILLAR_PLACED_THIRD 0x861As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the third, metatile (21, 48).
#defineFLAG_AIRS_ROCK_PILLAR_PLACED_FOURTH 0x862As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the fourth, metatile (39, 49).
#defineFLAG_AIRS_ROCK_PILLAR_PLACED_FIFTH 0x887As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the fifth, metatile (49, 18).
#defineFLAG_AIRS_ROCK_THIRD_PILLAR_MOVED 0x879Set once Move has pushed the pillar in the fog into its gap (scAirsRockMoveThirdPillar).
#defineFLAG_FIRST_PILLAR_MOVED_WEST FLAG_AREA_TEMP(0x10)Set while the left and the right of the two pillars on the ledges below the fog stand moved one metatile west (scAirsRockMoveFirstPillar, scAirsRockMoveSecondPillar), so that they stand there when the party comes back.
#defineFLAG_SECOND_PILLAR_MOVED_WEST FLAG_AREA_TEMP(0x11)
#defineFLAG_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00)Set while Frost holds the cliff's puddle frozen into a pillar.
#defineFLAG_AIRS_ROCK_FIRST_BARRIER_BLOWN 0x850Story flags: the eight barriers the Wind Stones' gusts blow away, in the order of AirsRockGustTargets, then the mud blown from the wall, the fog cleared and the way to the top opened.
#defineFLAG_AIRS_ROCK_WALL_CLEARED 0x858
#defineFLAG_AIRS_ROCK_FOG_CLEARED 0x87a
#defineFLAG_AIRS_ROCK_TOP_OPENED 0x87b
#defineCLEAR_SAND_MOUND (x, z)Clears a barrier a gust blew away on an earlier visit: a mound three metatiles wide or a bank three metatiles tall, (x, z) its north-west metatile.
#defineCLEAR_SAND_BANK (x, z)
#defineEFFECT_SET_MODE fdActorSelectAnimation
#defineEFFECT_SET_SCRIPT fdActorStartScript
#defineEFFECT_SPRITE_PRIORITY
#defineGUST_LAP_STEP (TRIG_TURN / 32)The turn a gust's spark makes each tick: a lap every 32 ticks.
#defineWAVE_SCROLL scAirsRockScrollWaveThe great whirlwind's sway: BG0's line scroll, by HBlank DMA.
#defineWAVE_SCROLL_LINES AirsRockWaveLines
#defineWHIRLWIND_TILE_ROW_SIZE (WHIRLWIND_ROW_TILES * TILE_SIZE_4BPP)The bytes of one row of the whirlwind's tiles.
#defineWHIRLWIND_MAP_ROW_OFFSET 15Where each row of the whirlwind's map is copied into its screen block row, in bytes: the word copy drops the odd bytes, so the picture's rows start at column 6.
#defineWHIRLWIND_REACH_ON_WALL 16How near a whirlwind passes to pick up the leader across the wall he climbs, in pixels; across the ground it is WHIRLWIND_REACH.
#defineCRUMBLE_DUST_CLOUDS 12A crumbling rock's clouds of dust, every fourth at its own size and the rest twice as big, and the pieces of rubble it scatters.
#defineCRUMBLE_PIECES 6
#defineFOG_WEIGHT 8The fog's blend weight at its thickest; it breathes down to half that.
#defineFOG_RIPPLE_SHIFT 13A fog line's ripple: a sine shifted down to at most 8 pixels either way.
#defineCLIMB_LEVEL_HEIGHT 112The climb's levels are this many pixels apart.
#defineLEADER () fdActorGetById(MainRoutineStateWork.leaderActorId)
#defineFOG_WRAP 4The fog's picture repeats every FOG_WRAP map metatiles (64 pixels) across and down.
#defineSTART_BREATHING (id, ticks)Sets a statue breathing whirlwinds (scAirsRockStatueBreathesWhirlwind), its count started at ticks of WHIRLWIND_BREATH_TICKS.
#defineHANG_BREATHING (id, height, ticks)The same for a statue hung on the cliff at the given height.

Enumerations

NameDescription
enumAIRS_ROCK_METATILE_MARK { METATILE_MARK_FIRST_GUST_TARGET, METATILE_MARK_WHIRLWIND_END … }What these rooms mark as the collision code (METATILE_CODE) of a metatile on the second layer.
enumAIRS_ROCK_GUST_BARRIER { GUST_BARRIER_BLOWN_NORTH, GUST_BARRIER_BLOWN_SOUTH, GUST_BAR … }The kinds of barrier a gust sweeps away, each a row of AirsRockGustTargets, by the way the gust crosses it: a bank of sand across an east-west path the gust blows north or south through a metatile at a time, or a mound across a north-south path it blows west through a column at a time.
enumAIRS_ROCK_ENTRANCE_ACTOR_ID { ACTOR_TWISTER_ROCK_BY_THE_WALL, ACTOR_WIND_STONE_A, ACTOR_WI … }The entrance, numbering AirsRockEntrancePlacements.
enumAIRS_ROCK_CLIFF_ACTOR_ID { ACTOR_FIRST_SLOPE_STATUE, ACTOR_SECOND_SLOPE_STATUE, ACTOR_T … }The slopes by the way into the rock, numbering AirsRockCliffPlacements.
enumAIRS_ROCK_SUMMIT_ACTOR_ID { ACTOR_FIRST_BREATHING_STATUE, ACTOR_SECOND_BREATHING_STATUE, … }The summit, numbering AirsRockSummitPlacements.
enumAIRS_ROCK_CLIFF_ENTRANCE { ENTRANCE_DOWN_FROM_THE_CLIFF_WEST, ENTRANCE_DOWN_FROM_THE_CL … }The slopes' own ways in, where the leader climbs between the lower slopes and the cliff above them.
enumAIRS_ROCK_SUMMIT_ENTRANCE { ENTRANCE_LEDGES_FROM_LOWER_PATH, ENTRANCE_LEDGES_FROM_UPPER_ … }The summit's own ways in: off its ledges onto the paths west of them and back, and up and down its wall into and out of the fog.

Functions

NameDescription
Sint32scAirsRockClearScriptedActorSpriteFlags (Sint32 actorId)Clears the actor's sprite flags, as a script's call; always 0.
voidscBlocksUnmarkMetatiles (ACTOR *block)Frees the metatiles ahead of and behind a block that scBlocksMarkMetatiles blocked, and clears its mark.
const SCENE_ENTRANCE *scGetEntrances (void)Where the party can enter: the cave under the spring has its own entrances.
const SCENE_REGION *scGetExitRegions (void)The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room.
const Uint32 *scGetExits (void)The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN.
const ACTOR_PLACE *scGetActorPlacements (void)The scene's actor placements: a room of names for its entrance, else the debug room's.
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.
voidscAirsRockMoveSecondPillar (void)Felix casts Move on the right of the two pillars on the ledges below the fog, from across the gap east of them.
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.
const CUE *scGetCues (void)The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's.
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).
voidscAirsRockSpiralGust (ACTOR *actor)A gust's spark: circles the centre kept in bounce and sceneWord, a lap every 32 ticks, its radius growing as it rises.
voidscAirsRockSpiralSpark (ACTOR *actor)The same circle on a smaller radius, twice as wide, blinking blue every other two ticks.
voidscAirsRockFlickerTarget (ACTOR *actor)A Whirlwind target's update while the gust gathers: it flickers to the colour mode in sceneCount (a SPR_COL_MODE), at the rate sceneByte sets.
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.
BSS_DATAALIGNED (16)The line scroll of the great whirlwind or the fog, a halfword a line; three a line while the fog lifts.
voidscAirsRockSwirlDust (ACTOR *actor)A cloud of the wall's mud swept round the great whirlwind: west of x 320 it speeds up eastward and grows, past it westward and shrinks, passing in front of the whirlwind going east and behind it going west, and it spins.
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.
voidscAirsRockMoveWhirlwind (ACTOR *shot)A statue's whirlwind's update: it travels its way, picks up a leader it touches and fades on a wall or another statue.
voidscAirsRockStatueBreathesWhirlwind (ACTOR *actor)A statue's update: while no Psynergy, menu or item is in use it counts ticks, and every WHIRLWIND_BREATH_TICKS breathes a whirlwind (scAirsRockMoveWhirlwind) 8 pixels ahead of it with a puff of dust, with a gust's sound unless the leader is riding one.
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.
voidscAirsRockCrumbleRock (Sint32 x, Sint32 z)A rock crumbles at x, z into rubble that scatters, shaking the screen.
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.
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.
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.
Sint32scInit (void)Opens the room through the window transition, and in the debug room draws the cat 1.7 times its size.
Sint32scPrepareMap (void)Once Briggs is caught the pool has dried up: its colours take the dry ground's.

Variables

NameDescription
extern SCENE_REGIONAirsRockSummitRegions []
extern Sint16AirsRockGustTargets [][4]The kinds of barrier a gust sweeps away (AIRS_ROCK_GUST_BARRIER), a row each: the map metatile the cleared ground's picture is copied from, and how far the barrier's pictures lie from the metatiles the gust crosses, 64 metatiles east.
Sint16AirsRockWaveLines [DISPLAY_HEIGHT * 3]The line scroll of the great whirlwind or the fog, a halfword a line; three a line while the fog lifts.
extern Uint32AirsRockWhirlwindRisesScript []
extern Uint32AirsRockWhirlwindFadesScript []
extern Sint32AirsRockRubbleScript []
extern Sint32AirsRockLeaderLevelThe ledges' level the leader stood on when their metatiles were last swapped; -1 before.
Sint16AirsRockCliffPillars []The five pillars on the cliff's ledges that Move pushes, ended by -1.
const Sint32 *FieldEffectDurationScripts []The field effects' three scripts by how long an effect lasts: short, medium and long.
Sint32AirsRockWindStoneScript []
Sint16AirsRockFrozenPuddle []The puddle Frost freezes into a pillar, and the flag set while it stands (fdFlagBlockPlaceAll).
SCENE_REGIONAirsRockEntranceRegions []
SCENE_REGIONAirsRockCliffRegions []
Uint32SceneExits []The room has no exits of its own.
ACTOR_PLACEAirsRockEntrancePlacements []
ACTOR_PLACEAirsRockCliffPlacements []
ACTOR_PLACEAirsRockSummitPlacements []
CUEAirsRockEntranceCues []
CUEAirsRockCliffCues []
CUEAirsRockSummitCues []
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).
Sint8AirsRockFogAlphaStep
Sint8AirsRockLiftingFogAlphaAs AirsRockFogAlpha, while the fog lifts (scAirsRockLiftFog).
Sint8AirsRockLiftingFogAlphaStep

Description

Air's Rock, the great purple rock in the desert south of Yampi, climbed from outside over three screens before the way inside opens.

On the first, where the party arrives, Felix casts Whirlwind on the Wind Stones to blow away the barriers of sand and rock on the paths, then on the huge twister-shaped rock at the foot of the cliff, whose great whirlwind blows the mud off the wall above it so that it can be climbed. The second is the cliff: statues breathe little whirlwinds that carry Felix along and up it, pillars pushed or moved over gaps close them, a puddle Frost turns into a pillar, and a golden door low on the cliff leads into the rock's great hall. The third holds the ledges below the fog, where the party climbs down level by level and rides the statues' whirlwinds back up, the fog Whirlwind lifts from the wall above, and the top, where Whirlwind on the last twister rock calls down lightning on a pile of rocks and opens the way in (airs_rock_inside.c).

Macros in detail

FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST

#define FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST 0x85f

Set once the first of the cliff's pillars has dropped into its gap, by the golden door, metatile (16, 43).

Referenced by AirsRockCliffCues, scAirsRockPlacePillar() and scInit().

Definition at line 30 of file airs_rock.c.

FLAG_AIRS_ROCK_PILLAR_PLACED_SECOND

#define FLAG_AIRS_ROCK_PILLAR_PLACED_SECOND 0x860

As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the second, metatile (45, 45).

Referenced by AirsRockCliffCues, scAirsRockPlacePillar() and scInit().

Definition at line 32 of file airs_rock.c.

FLAG_AIRS_ROCK_PILLAR_PLACED_THIRD

#define FLAG_AIRS_ROCK_PILLAR_PLACED_THIRD 0x861

As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the third, metatile (21, 48).

Referenced by AirsRockCliffCues, scAirsRockPlacePillar() and scInit().

Definition at line 34 of file airs_rock.c.

FLAG_AIRS_ROCK_PILLAR_PLACED_FOURTH

#define FLAG_AIRS_ROCK_PILLAR_PLACED_FOURTH 0x862

As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the fourth, metatile (39, 49).

Referenced by AirsRockCliffCues, scAirsRockPlacePillar() and scInit().

Definition at line 36 of file airs_rock.c.

FLAG_AIRS_ROCK_PILLAR_PLACED_FIFTH

#define FLAG_AIRS_ROCK_PILLAR_PLACED_FIFTH 0x887

As FLAG_AIRS_ROCK_PILLAR_PLACED_FIRST, the fifth, metatile (49, 18).

Referenced by AirsRockCliffCues, scAirsRockPlacePillar() and scInit().

Definition at line 38 of file airs_rock.c.

FLAG_AIRS_ROCK_THIRD_PILLAR_MOVED

#define FLAG_AIRS_ROCK_THIRD_PILLAR_MOVED 0x879

Set once Move has pushed the pillar in the fog into its gap (scAirsRockMoveThirdPillar).

Referenced by AirsRockSummitCues, scAirsRockMoveThirdPillar() and scInit().

Definition at line 41 of file airs_rock.c.

FLAG_FIRST_PILLAR_MOVED_WEST

#define FLAG_FIRST_PILLAR_MOVED_WEST FLAG_AREA_TEMP(0x10)

Set while the left and the right of the two pillars on the ledges below the fog stand moved one metatile west (scAirsRockMoveFirstPillar, scAirsRockMoveSecondPillar), so that they stand there when the party comes back.

Referenced by scAirsRockMoveFirstPillar() and scInit().

Definition at line 47 of file airs_rock.c.

FLAG_SECOND_PILLAR_MOVED_WEST

#define FLAG_SECOND_PILLAR_MOVED_WEST FLAG_AREA_TEMP(0x11)

Referenced by scAirsRockMoveSecondPillar() and scInit().

Definition at line 48 of file airs_rock.c.

FLAG_PUDDLE_FROZEN

#define FLAG_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00)

Set while Frost holds the cliff's puddle frozen into a pillar.

Referenced by AirsRockCliffCues, AirsRockFrozenPuddle, LemurianShipDeckMainDeckCues, LemurianShipDeckPuddles, LemurianShipPipeRoomCues, LemurianShipPipeRoomPuddles, LemurianShipSixJellyRoomCues, LemurianShipSixJellyRoomPuddles, LemurianShipTwoJellyRoomCues, LemurianShipTwoJellyRoomPuddles, scLemurianShipExamineLiftSwitch(), scLemurianShipFreezeLiftPuddle() and scLemurianShipSetUpSixJellyRoom().

Definition at line 50 of file airs_rock.c.

FLAG_AIRS_ROCK_FIRST_BARRIER_BLOWN

#define FLAG_AIRS_ROCK_FIRST_BARRIER_BLOWN 0x850

Story flags: the eight barriers the Wind Stones' gusts blow away, in the order of AirsRockGustTargets, then the mud blown from the wall, the fog cleared and the way to the top opened.

Referenced by scAirsRockBlowGust() and scInit().

Definition at line 55 of file airs_rock.c.

FLAG_AIRS_ROCK_WALL_CLEARED

#define FLAG_AIRS_ROCK_WALL_CLEARED 0x858

Referenced by AirsRockEntranceCues, scAirsRockWhirlwindClearsWall() and scInit().

Definition at line 56 of file airs_rock.c.

FLAG_AIRS_ROCK_FOG_CLEARED

#define FLAG_AIRS_ROCK_FOG_CLEARED 0x87a

Referenced by AirsRockSummitCues, scAirsRockWhirlwindClearsFog(), SceneExits and scInit().

Definition at line 57 of file airs_rock.c.

FLAG_AIRS_ROCK_TOP_OPENED

#define FLAG_AIRS_ROCK_TOP_OPENED 0x87b

Referenced by AirsRockSummitCues, scAirsRockWhirlwindOpensTheTop() and scInit().

Definition at line 58 of file airs_rock.c.

CLEAR_SAND_MOUND

#define CLEAR_SAND_MOUND(x, z)

Clears a barrier a gust blew away on an earlier visit: a mound three metatiles wide or a bank three metatiles tall, (x, z) its north-west metatile.

Referenced by scInit().

Definition at line 90 of file airs_rock.c.

CLEAR_SAND_BANK

#define CLEAR_SAND_BANK(x, z)

Referenced by scInit().

Definition at line 94 of file airs_rock.c.

EFFECT_SET_MODE

#define EFFECT_SET_MODE fdActorSelectAnimation

Referenced by EFFECT_SPAWN.

Definition at line 205 of file airs_rock.c.

EFFECT_SET_SCRIPT

#define EFFECT_SET_SCRIPT fdActorStartScript

Referenced by EFFECT_SPAWN.

Definition at line 206 of file airs_rock.c.

EFFECT_SPRITE_PRIORITY

#define EFFECT_SPRITE_PRIORITY

Definition at line 207 of file airs_rock.c.

GUST_LAP_STEP

#define GUST_LAP_STEP (TRIG_TURN / 32)

The turn a gust's spark makes each tick: a lap every 32 ticks.

Referenced by scAirsRockSpiralGust() and scAirsRockSpiralSpark().

Definition at line 474 of file airs_rock.c.

WAVE_SCROLL

#define WAVE_SCROLL scAirsRockScrollWave

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

Definition at line 784 of file airs_rock.c.

WAVE_SCROLL_LINES

#define WAVE_SCROLL_LINES AirsRockWaveLines

Referenced by WAVE_SCROLL.

Definition at line 785 of file airs_rock.c.

WHIRLWIND_TILE_ROW_SIZE

#define WHIRLWIND_TILE_ROW_SIZE (WHIRLWIND_ROW_TILES * TILE_SIZE_4BPP)

The bytes of one row of the whirlwind's tiles.

Referenced by scAirsRockWhirlwindClearsFog() and scAirsRockWhirlwindClearsWall().

Definition at line 818 of file airs_rock.c.

WHIRLWIND_MAP_ROW_OFFSET

#define WHIRLWIND_MAP_ROW_OFFSET 15

Where each row of the whirlwind's map is copied into its screen block row, in bytes: the word copy drops the odd bytes, so the picture's rows start at column 6.

Referenced by scAirsRockWhirlwindClearsFog() and scAirsRockWhirlwindClearsWall().

Definition at line 822 of file airs_rock.c.

WHIRLWIND_REACH_ON_WALL

#define WHIRLWIND_REACH_ON_WALL 16

How near a whirlwind passes to pick up the leader across the wall he climbs, in pixels; across the ground it is WHIRLWIND_REACH.

Referenced by scAirsRockMoveWhirlwind().

Definition at line 1188 of file airs_rock.c.

CRUMBLE_DUST_CLOUDS

#define CRUMBLE_DUST_CLOUDS 12

A crumbling rock's clouds of dust, every fourth at its own size and the rest twice as big, and the pieces of rubble it scatters.

Referenced by scAirsRockCrumbleRock().

Definition at line 1416 of file airs_rock.c.

CRUMBLE_PIECES

#define CRUMBLE_PIECES 6

Referenced by scAirsRockCrumbleRock().

Definition at line 1417 of file airs_rock.c.

FOG_WEIGHT

#define FOG_WEIGHT 8

The fog's blend weight at its thickest; it breathes down to half that.

Referenced by scAirsRockDriftFog(), scAirsRockLiftFog(), scAirsRockWhirlwindClearsFog() and scInit().

Definition at line 1654 of file airs_rock.c.

FOG_RIPPLE_SHIFT

#define FOG_RIPPLE_SHIFT 13

A fog line's ripple: a sine shifted down to at most 8 pixels either way.

Referenced by scAirsRockDriftFog() and scAirsRockLiftFog().

Definition at line 1656 of file airs_rock.c.

CLIMB_LEVEL_HEIGHT

#define CLIMB_LEVEL_HEIGHT 112

The climb's levels are this many pixels apart.

Referenced by scAirsRockSetLedgeMetatilesByLevel().

Definition at line 1913 of file airs_rock.c.

LEADER

#define LEADER() fdActorGetById(MainRoutineStateWork.leaderActorId)

Referenced by scInit().

Definition at line 1950 of file airs_rock.c.

FOG_WRAP

#define FOG_WRAP 4

The fog's picture repeats every FOG_WRAP map metatiles (64 pixels) across and down.

Referenced by scInit().

Definition at line 1954 of file airs_rock.c.

START_BREATHING

#define START_BREATHING(id, ticks)

Sets a statue breathing whirlwinds (scAirsRockStatueBreathesWhirlwind), its count started at ticks of WHIRLWIND_BREATH_TICKS.

Referenced by scInit().

Definition at line 1958 of file airs_rock.c.

HANG_BREATHING

#define HANG_BREATHING(id, height, ticks)

The same for a statue hung on the cliff at the given height.

Referenced by scInit().

Definition at line 1964 of file airs_rock.c.

Enumerations in detail

AIRS_ROCK_METATILE_MARK

enum AIRS_ROCK_METATILE_MARK

What these rooms mark as the collision code (METATILE_CODE) of a metatile on the second layer.

EnumeratorValueDescription
METATILE_MARK_FIRST_GUST_TARGET30A barrier a gust blows away is marked this plus its kind, a row of AirsRockGustTargets; the metatile beyond it holds the barrier's number plus one, which picks its flag.
METATILE_MARK_WHIRLWIND_END212A statue's whirlwind fades here.
METATILE_MARK_BLOCKED255A gust stops here with nothing to blow, and a whirlwind's rider cannot land here.

Definition at line 62 of file airs_rock.c.

AIRS_ROCK_GUST_BARRIER

enum AIRS_ROCK_GUST_BARRIER

The kinds of barrier a gust sweeps away, each a row of AirsRockGustTargets, by the way the gust crosses it: a bank of sand across an east-west path the gust blows north or south through a metatile at a time, or a mound across a north-south path it blows west through a column at a time.

EnumeratorValueDescription
GUST_BARRIER_BLOWN_NORTH0
GUST_BARRIER_BLOWN_SOUTH2
GUST_BARRIER_BLOWN_WEST

Definition at line 80 of file airs_rock.c.

AIRS_ROCK_ENTRANCE_ACTOR_ID

enum AIRS_ROCK_ENTRANCE_ACTOR_ID

The entrance, numbering AirsRockEntrancePlacements.

EnumeratorValueDescription
ACTOR_TWISTER_ROCK_BY_THE_WALLACTOR_FIRST_PLACEDThe huge twister-shaped rock Whirlwind clears the wall's mud with.
ACTOR_WIND_STONE_AThe five Wind Stones, whose gusts Whirlwind strengthens.
ACTOR_WIND_STONE_B
ACTOR_WIND_STONE_C
ACTOR_WIND_STONE_D
ACTOR_WIND_STONE_E

Definition at line 100 of file airs_rock.c.

AIRS_ROCK_CLIFF_ACTOR_ID

enum AIRS_ROCK_CLIFF_ACTOR_ID

The slopes by the way into the rock, numbering AirsRockCliffPlacements.

EnumeratorValueDescription
ACTOR_FIRST_SLOPE_STATUEACTOR_FIRST_PLACEDThe four statues on the slopes that breathe whirlwinds.
ACTOR_SECOND_SLOPE_STATUE
ACTOR_THIRD_SLOPE_STATUE
ACTOR_FOURTH_SLOPE_STATUE
ACTOR_FIRST_LEDGE_PILLARThe pillars that drop into the cliff's gaps,
ACTOR_SECOND_LEDGE_PILLAReach with its FLAG_AIRS_ROCK_PILLAR_PLACED_ flag.
ACTOR_PUDDLEThe puddle Frost freezes into a pillar.
ACTOR_THIRD_LEDGE_PILLAR
ACTOR_FOURTH_LEDGE_PILLAR
ACTOR_FIRST_CLIFF_STATUEThe four statues hung on the cliff that breathe whirlwinds.
ACTOR_SECOND_CLIFF_STATUE
ACTOR_THIRD_CLIFF_STATUE
ACTOR_FOURTH_CLIFF_STATUE
ACTOR_BREATHING_STATUEThe statue exhaling little whirlwinds to the
ACTOR_FIFTH_LEDGE_PILLARleft.

Definition at line 115 of file airs_rock.c.

AIRS_ROCK_SUMMIT_ACTOR_ID

enum AIRS_ROCK_SUMMIT_ACTOR_ID

The summit, numbering AirsRockSummitPlacements.

EnumeratorValueDescription
ACTOR_FIRST_BREATHING_STATUEACTOR_FIRST_PLACEDThe statues whose
ACTOR_SECOND_BREATHING_STATUEwhirlwinds carry the party up the cliff.
ACTOR_FIRST_PILLARThe left and right of
ACTOR_SECOND_PILLARthe two pillars on the ledges below the fog.
ACTOR_TWISTER_ROCK_IN_THE_FOGThe twister rock whose
ACTOR_THIRD_PILLARwhirlwind clears the fog.
ACTOR_TWISTER_ROCK_AT_THE_TOPThe twister rock whose whirlwind opens the way to the top.

Definition at line 141 of file airs_rock.c.

AIRS_ROCK_CLIFF_ENTRANCE

enum AIRS_ROCK_CLIFF_ENTRANCE

The slopes' own ways in, where the leader climbs between the lower slopes and the cliff above them.

EnumeratorValueDescription
ENTRANCE_DOWN_FROM_THE_CLIFF_WEST5At the top of the lower slopes'
ENTRANCE_DOWN_FROM_THE_CLIFF_EASTwall, climbing down from the cliff.
ENTRANCE_UP_THE_CLIFF_WEST10At the foot of the cliff, climbing
ENTRANCE_UP_THE_CLIFF_EASTup from the lower slopes.

Definition at line 162 of file airs_rock.c.

AIRS_ROCK_SUMMIT_ENTRANCE

enum AIRS_ROCK_SUMMIT_ENTRANCE

The summit's own ways in: off its ledges onto the paths west of them and back, and up and down its wall into and out of the fog.

EnumeratorValueDescription
ENTRANCE_LEDGES_FROM_LOWER_PATH2On the ledges, back from the lower
ENTRANCE_LEDGES_FROM_UPPER_PATHand the upper path.
ENTRANCE_LOWER_PATHOn the paths, from the ledges.
ENTRANCE_UPPER_PATH
ENTRANCE_BELOW_THE_FOG_WESTOn the wall below the fog, climbing
ENTRANCE_BELOW_THE_FOG_EASTdown out of it.
ENTRANCE_INTO_THE_FOG_WESTOn the wall in the fog, climbing up
ENTRANCE_INTO_THE_FOG_EASTinto it; while the fog lasts, the top of the wall leads back here.
ENTRANCE_DOWN_INTO_THE_FOG_WESTAt the top of the wall in the fog,
ENTRANCE_DOWN_INTO_THE_FOG_EASTclimbing down from above it.
ENTRANCE_ABOVE_THE_FOG_WESTOn the wall above the fog, climbing
ENTRANCE_ABOVE_THE_FOG_EASTup out of it once it is cleared.
ENTRANCE_OPEN_THE_TOP99Unused: no exit leads here. The way to the top opens at once (scAirsRockWhirlwindOpensTheTop).

Definition at line 175 of file airs_rock.c.

Functions in detail

scAirsRockClearScriptedActorSpriteFlags

Sint32 scAirsRockClearScriptedActorSpriteFlags(Sint32 actorId)

Clears the actor's sprite flags, as a script's call; always 0.

References fdActorSetSpriteFlags() and Sint32.

Referenced by AirsRockWindStoneScript.

Definition at line 211 of file airs_rock.c.

scBlocksUnmarkMetatiles

void scBlocksUnmarkMetatiles(ACTOR *block)

Frees the metatiles ahead of and behind a block that scBlocksMarkMetatiles blocked, and clears its mark.

References Sint32.

Referenced by scAirsRockLiftPillar().

Definition at line 228 of file airs_rock.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References SceneEntrances.

Definition at line 252 of file airs_rock.c.

scGetExitRegions

const SCENE_REGION *scGetExitRegions(void)

References AirsRockCliffRegions, AirsRockEntranceRegions, AirsRockSummitRegions, MainRoutineStateWork and Sint32.

Definition at line 259 of file airs_rock.c.

scGetExits

const Uint32 *scGetExits(void)

References SceneExits.

Definition at line 270 of file airs_rock.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References AirsRockCliffPlacements, AirsRockEntrancePlacements, AirsRockSummitPlacements, MainRoutineStateWork and Sint32.

Definition at line 275 of file airs_rock.c.

scAirsRockExamineWindStone

void scAirsRockExamineWindStone(void)

Felix reads a Wind Stone on the first screen: "Beware the Wind Stones." and its warning that the stones magnify the wind.

References fdScriptEnd(), fdScriptStart(), mnMessageShowCentered(), scFieldScriptEndLastingPsynergy() and Sint32.

Referenced by AirsRockEntranceCues.

Definition at line 288 of file airs_rock.c.

scAirsRockEnterTheRock

void scAirsRockEnterTheRock(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.

References fdActorWalkTo(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptPlaySound(), fdScriptStart(), fdScriptWaitTransitionTicks(), fdTilesetAnimationResume(), MainRoutineStateWork, scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest() and scFieldScriptWait().

Referenced by AirsRockCliffCues.

Definition at line 301 of file airs_rock.c.

scAirsRockMoveFirstPillar

void scAirsRockMoveFirstPillar(void)

Felix casts Move on the left of the two pillars on the ledges below the fog. Nothing more happens on screen than the move itself; the game remembers whether it now stands one metatile west of where it started (column 31), so that it is still there when the party comes back.

References fdActorGet(), fdScriptClearFlag(), fdScriptEnd(), fdScriptSetFlag(), fdScriptStart() and scFieldScriptEndLastingPsynergy().

Referenced by AirsRockSummitCues.

Definition at line 324 of file airs_rock.c.

scAirsRockMoveSecondPillar

void scAirsRockMoveSecondPillar(void)

Felix casts Move on the right of the two pillars on the ledges below the fog, from across the gap east of them. With the left pillar moved one metatile west, the hand pulls this one west beside it, and the metatile where it stood, (33, 54), is open to walk on: Felix jumps the gap west onto it, and stepping south off it he drops to the ledge below (scAirsRockDropOffLedge), where a whirlwind carries him up past the pillars' ledge to a ledge above (scAirsRockRideWhirlwind). The game remembers the pillar there; anywhere else that metatile stays closed.

The ledge's metatile is changed in the copy of it kept for the level it is on (scAirsRockSetLedgeMetatilesByLevel) and, while Felix stands on that level, in the map itself.

References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptClearFlag(), fdScriptEnd(), fdScriptSetFlag(), fdScriptStart(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scMapMetatileGetAttributes(), scMapMetatileSetAttributes() and Sint32.

Referenced by AirsRockSummitCues and scInit().

Definition at line 354 of file airs_rock.c.

scAirsRockMoveThirdPillar

void scAirsRockMoveThirdPillar(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.

References fdActorGet(), fdScriptEnd(), fdScriptSetFlag(), fdScriptStart() and scFieldScriptEndLastingPsynergy().

Referenced by AirsRockSummitCues.

Definition at line 388 of file airs_rock.c.

scAirsRockDropOffLedge

void scAirsRockDropOffLedge(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.

References fdActorFaceDirection(), fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdScriptNoOperation(), fdScriptPlaySound(), MainRoutineStateWork, scFieldActorSetMoveTargetFX(), scFieldActorWaitForMove() and sySynch().

Referenced by AirsRockSummitCues.

Definition at line 406 of file airs_rock.c.

scGetCues

const CUE *scGetCues(void)

References AirsRockCliffCues, AirsRockEntranceCues, AirsRockSummitCues, MainRoutineStateWork and Sint32.

Definition at line 442 of file airs_rock.c.

scAirsRockStartWhirlwind

void scAirsRockStartWhirlwind(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).

References fdScriptEndLastingPsynergy().

Referenced by AirsRockEntranceCues and AirsRockSummitCues.

Definition at line 457 of file airs_rock.c.

scAirsRockTakeOverWhirlwind

void scAirsRockTakeOverWhirlwind(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).

Referenced by AirsRockEntranceCues and AirsRockSummitCues.

Definition at line 466 of file airs_rock.c.

scAirsRockSpiralGust

void scAirsRockSpiralGust(ACTOR *actor)

A gust's spark: circles the centre kept in bounce and sceneWord, a lap every 32 ticks, its radius growing as it rises.

References Sint32, syCos() and sySin().

Referenced by scAirsRockBlowGust().

Definition at line 478 of file airs_rock.c.

scAirsRockSpiralSpark

void scAirsRockSpiralSpark(ACTOR *actor)

The same circle on a smaller radius, twice as wide, blinking blue every other two ticks.

References scFieldActorSetSpriteColor(), Sint32, syCos(), sySin() and TickCount.

Referenced by scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall() and scAirsRockWhirlwindOpensTheTop().

Definition at line 497 of file airs_rock.c.

scAirsRockFlickerTarget

void scAirsRockFlickerTarget(ACTOR *actor)

A Whirlwind target's update while the gust gathers: it flickers to the colour mode in sceneCount (a SPR_COL_MODE), at the rate sceneByte sets.

References scFieldActorSetSpriteColor() and TickCount.

Referenced by scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall() and scAirsRockWhirlwindOpensTheTop().

Definition at line 517 of file airs_rock.c.

scAirsRockBlowGust

void scAirsRockBlowGust(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. If a barrier of sand or rocks stands in its path it blows it away for good, opening the path; with nothing in its path it fades at the next wall with a whoosh.

The gust looks ahead along the second layer for the first metatile with a mark: a wall (METATILE_MARK_BLOCKED) or a barrier (METATILE_MARK_FIRST_GUST_TARGET plus its kind). It travels to that metatile, sweeps a barrier's metatiles away as it blows three metatiles on, and sets the flag counted from FLAG_AIRS_ROCK_FIRST_BARRIER_BLOWN by the metatile beyond it.

References AirsRockGustTargets, fdActorGetById(), fdActorHasArrived(), fdActorRelease(), fdActorSelectAnimation(), fdActorSetMoveTarget(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorStartScript(), fdActorWaitForMove(), fdCameraMoveToActorById(), fdCameraMoveToFX(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetFlag(), fdScriptStart(), fdScriptWait(), FieldEffectMediumScript, MainRoutineStateWork, scAirsRockSpiralGust(), scFieldActorCreate(), scFieldEffectSpawn(), scMapMetatileGetAttributes(), Sint32, syCos(), syRandom(), sySin(), sySoundPlay() and TickCount.

Referenced by AirsRockEntranceCues.

Definition at line 536 of file airs_rock.c.

scAirsRockSwirlDust

void scAirsRockSwirlDust(ACTOR *actor)

A cloud of the wall's mud swept round the great whirlwind: west of x 320 it speeds up eastward and grows, past it westward and shrinks, passing in front of the whirlwind going east and behind it going west, and it spins.

References scSetActorSpritePriority().

Referenced by scAirsRockWhirlwindClearsWall().

Definition at line 791 of file airs_rock.c.

scAirsRockWhirlwindClearsWall

void scAirsRockWhirlwindClearsWall(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. The rock turns grey, spent.

References fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), FieldEffectMediumScript, MainRoutineStateWork, mnWindowColorApply(), scAirsRockFlickerTarget(), scAirsRockScrollWave(), scAirsRockSpiralSpark(), scAirsRockSwirlDust(), scFieldActorCreate(), scFieldActorSetSpriteColor(), scFieldActorSetSpritePriority(), scFieldCloseEvent(), scFieldEffectSpawn(), scFieldMapGridWaitForShakeToSettle(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scScriptCameraFollowActor(), Sint32, syDecompressTaggedLZ(), syDMAXCopy(), syHeapAllocate(), syHeapRelease(), syPrintClear(), syRandom(), syResourceGetTableEntry(), sySetTickEvent(), sySynch(), syWindowLoadGraphics() and TickCount.

Referenced by AirsRockEntranceCues.

Definition at line 828 of file airs_rock.c.

scAirsRockRideWhirlwind

void scAirsRockRideWhirlwind(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. On a whirlwind blowing up the cliff, he has a moment to hold Up, Left or Right and choose which way to leap onto the ledge at its top; otherwise he drops off where it ends.

References fdActorGetById(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdCameraGetActor(), fdCameraWaitForArrival(), fdMapGetTerrainHeight(), fdScriptClearFlag(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), MainRoutineStateWork, PerWork, scActorWaitUntilLanded(), scFieldActorSetMoveTargetFX(), scFieldActorWaitForMove(), scMapMetatileGetAttributes(), scScriptCameraFollowActor(), Sint32, syGameFlagSet(), sySoundPlay(), sySynch() and TickCount.

Referenced by AirsRockCliffCues and AirsRockSummitCues.

Definition at line 1021 of file airs_rock.c.

scAirsRockMoveWhirlwind

void scAirsRockMoveWhirlwind(ACTOR *shot)

A statue's whirlwind's update: it travels its way, picks up a leader it touches and fades on a wall or another statue.

References AirsRockWhirlwindFadesScript, AirsRockWhirlwindRisesScript, fdActorGetById(), fdActorPlaySoundInView(), fdActorSetAnimationSpeed(), fdActorStartScript(), MainRoutineStateWork, scMapMetatileGetAttributes(), scPosDistanceAbove(), scPosFlatDistance(), Sint32, syCos(), syGameFlagGet() and sySin().

Referenced by scAirsRockStatueBreathesWhirlwind().

Definition at line 1192 of file airs_rock.c.

scAirsRockStatueBreathesWhirlwind

void scAirsRockStatueBreathesWhirlwind(ACTOR *actor)

A statue's update: while no Psynergy, menu or item is in use it counts ticks, and every WHIRLWIND_BREATH_TICKS breathes a whirlwind (scAirsRockMoveWhirlwind) 8 pixels ahead of it with a puff of dust, with a gust's sound unless the leader is riding one.

References fdActorPlaySoundInView(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdScriptGetFlag(), scAirsRockMoveWhirlwind(), scFieldActorCreate(), scFieldEffectSpawn(), syCos(), syMathMulFX() and sySin().

Referenced by scInit().

Definition at line 1301 of file airs_rock.c.

scAirsRockLiftPillar

void scAirsRockLiftPillar(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.

References AirsRockCliffPillars, fdActorLiftTargetBlock() and scBlocksUnmarkMetatiles().

Referenced by AirsRockCliffCues.

Definition at line 1356 of file airs_rock.c.

scAirsRockPlacePillar

void scAirsRockPlacePillar(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.

References AirsRockCliffPillars, fdActorPlaceMovedBlock(), fdMapGetTerrainHeight(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), scActorWaitUntilLanded(), scBlocksMarkMetatiles(), scFieldScriptEndLastingPsynergy() and Sint32.

Referenced by AirsRockCliffCues.

Definition at line 1367 of file airs_rock.c.

scAirsRockFreezePuddle

void scAirsRockFreezePuddle(void)

Felix casts Frost on the puddle on the cliff and it freezes into a pillar of ice.

References AirsRockFrozenPuddle, fdFlagBlockApplyFlags(), fdScriptEnd(), fdScriptStart(), scFieldScriptEndLastingPsynergy() and Sint32.

Referenced by AirsRockCliffCues.

Definition at line 1404 of file airs_rock.c.

scAirsRockCrumbleRock

void scAirsRockCrumbleRock(Sint32 x, Sint32 z)

A rock crumbles at x, z into rubble that scatters, shaking the screen.

References AirsRockRubbleScript, fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), fdSpriteShareVRAMCacheEntry(), scFieldActorCreate(), scFieldActorSetMoveTargetFX(), scFieldEffectSpawn(), Sint32, syCos(), syRandom() and sySin().

Referenced by scAirsRockWhirlwindOpensTheTop().

Definition at line 1420 of file airs_rock.c.

scAirsRockWhirlwindOpensTheTop

void scAirsRockWhirlwindOpensTheTop(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. The rock turns grey, spent.

References BgScrollWork, fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), fdCameraWaitForArrival(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), FieldEffectMediumScript, MainRoutineStateWork, scAirsRockCrumbleRock(), scAirsRockFlickerTarget(), scAirsRockSpiralSpark(), scFieldActorCreate(), scFieldActorSetSpriteColor(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scFieldWindowColorApply(), scScriptCameraFollowActor(), syDecompressTaggedLZ(), syDMAXCopy(), syHeapAllocate(), syHeapRelease(), syPrintClear(), syRandom(), syResourceGetTableEntry(), sySynch(), syWindowLoadGraphics() and TickCount.

Referenced by AirsRockSummitCues and scInit().

Definition at line 1492 of file airs_rock.c.

scAirsRockDriftFog

void scAirsRockDriftFog(void)

The fog over the wall drifts, thickening and thinning between FOG_WEIGHT and half that while its lines ripple.

References AirsRockFogAlpha, AirsRockFogAlphaStep, AirsRockWaveLines, fdMapGridGetLayer(), Sint32, syDMAXCopy() and sySin().

Referenced by scAirsRockWhirlwindClearsFog() and scInit().

Definition at line 1660 of file airs_rock.c.

scAirsRockLiftFog

void scAirsRockLiftFog(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.

References AirsRockLiftingFogAlpha, AirsRockLiftingFogAlphaStep, AirsRockWaveLines, fdMapGridGetLayer(), Sint32, syDMAXCopy(), syRandom(), sySin() and TickCount.

Referenced by scAirsRockWhirlwindClearsFog().

Definition at line 1697 of file airs_rock.c.

scAirsRockWhirlwindClearsFog

void scAirsRockWhirlwindClearsFog(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. The rock turns grey, spent.

References fdActorGet(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), fdCameraWaitForArrival(), fdMapGridGetLayer(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), FieldEffectMediumScript, MainRoutineStateWork, scAirsRockDriftFog(), scAirsRockFlickerTarget(), scAirsRockLiftFog(), scAirsRockScrollWave(), scAirsRockSpiralSpark(), scFieldActorCreate(), scFieldActorSetSpriteColor(), scFieldCloseEvent(), scFieldMapGridWaitForShakeToSettle(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scFieldWindowColorApply(), scScriptCameraFollowActor(), Sint32, syDecompressTaggedLZ(), syDMAXCopy(), syHeapAllocate(), syHeapRelease(), syPrintClear(), syRandom(), syResourceGetTableEntry(), sySetTickEvent(), sySynch(), syWindowLoadGraphics() and TickCount.

Referenced by AirsRockSummitCues.

Definition at line 1753 of file airs_rock.c.

scAirsRockSetLedgeMetatilesByLevel

void scAirsRockSetLedgeMetatilesByLevel(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. On the second level they hold the edge he drops off (scAirsRockDropOffLedge).

References AirsRockLeaderLevel, fdActorGet(), fdMapGridCopyMetatileAttributes(), scFieldPartyGetLeaderActor() and Sint32.

Referenced by scInit() and scPrepareMap().

Definition at line 1920 of file airs_rock.c.

scInit

Sint32 scInit(void)

References AirsRockCliffPillars, AirsRockFrozenPuddle, fdActorGetById(), fdActorPlaceBlocks(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdEffectStartBlankOverlay(), fdFlagBlockPlaceAll(), fdMapGetTerrainHeight(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdMapGridGetLayer(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scAirsRockDriftFog(), scAirsRockMoveSecondPillar(), scAirsRockSetLedgeMetatilesByLevel(), scAirsRockStatueBreathesWhirlwind(), scAirsRockWhirlwindOpensTheTop(), scBlocksMarkMetatiles(), scLeaderLift(), scScriptCameraFollowActor(), Sint32, syGameFlagGet(), sySetTickEvent() and sySynch().

Definition at line 1969 of file airs_rock.c.

scPrepareMap

Sint32 scPrepareMap(void)

References MainRoutineStateWork, scAirsRockSetLedgeMetatilesByLevel() and Sint32.

Definition at line 2262 of file airs_rock.c.

Variables in detail

AirsRockSummitRegions

extern SCENE_REGION AirsRockSummitRegions[]

SCENE_REGION AirsRockSummitRegions[]

Referenced by scGetExitRegions().

Definition at lines 257 and 2352 of file airs_rock.c.

AirsRockGustTargets

extern Sint16 AirsRockGustTargets[][4]

Sint16 AirsRockGustTargets[][4]

The kinds of barrier a gust sweeps away (AIRS_ROCK_GUST_BARRIER), a row each: the map metatile the cleared ground's picture is copied from, and how far the barrier's pictures lie from the metatiles the gust crosses, 64 metatiles east. An odd kind clears a column three metatiles tall, an even one a metatile; no barrier is of kind 1.

Referenced by scAirsRockBlowGust().

Definition at lines 471 and 2594 of file airs_rock.c.

AirsRockWaveLines

Sint16 AirsRockWaveLines[DISPLAY_HEIGHT * 3]

The line scroll of the great whirlwind or the fog, a halfword a line; three a line while the fog lifts.

Referenced by scAirsRockDriftFog() and scAirsRockLiftFog().

Definition at line 781 of file airs_rock.c.

AirsRockWhirlwindRisesScript

extern Uint32 AirsRockWhirlwindRisesScript[]

Uint32 AirsRockWhirlwindRisesScript[]

Referenced by scAirsRockMoveWhirlwind().

Definition at lines 1183 and 2309 of file airs_rock.c.

AirsRockWhirlwindFadesScript

extern Uint32 AirsRockWhirlwindFadesScript[]

Uint32 AirsRockWhirlwindFadesScript[]

Referenced by scAirsRockMoveWhirlwind().

Definition at lines 1184 and 2303 of file airs_rock.c.

AirsRockRubbleScript

extern Sint32 AirsRockRubbleScript[]

Sint32 AirsRockRubbleScript[]

References Sint32.

Referenced by scAirsRockCrumbleRock().

Definition at lines 1412 and 2316 of file airs_rock.c.

AirsRockLeaderLevel

extern Sint32 AirsRockLeaderLevel

Sint32 AirsRockLeaderLevel

The ledges' level the leader stood on when their metatiles were last swapped; -1 before.

References Sint32.

Referenced by scAirsRockSetLedgeMetatilesByLevel().

Definition at lines 1910 and 2611 of file airs_rock.c.

AirsRockCliffPillars

Sint16 AirsRockCliffPillars[]

The five pillars on the cliff's ledges that Move pushes, ended by -1.

Referenced by scAirsRockLiftPillar(), scAirsRockPlacePillar() and scInit().

Definition at line 2285 of file airs_rock.c.

FieldEffectDurationScripts

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Referenced by fdEffectSpawnResident(), scFieldEffectSpawn() and scFieldEffectSpawnLocal().

Definition at line 2290 of file airs_rock.c.

AirsRockWindStoneScript

Sint32 AirsRockWindStoneScript[]

References scAirsRockClearScriptedActorSpriteFlags() and Sint32.

Referenced by AirsRockEntrancePlacements.

Definition at line 2296 of file airs_rock.c.

AirsRockFrozenPuddle

Sint16 AirsRockFrozenPuddle[]

The puddle Frost freezes into a pillar, and the flag set while it stands (fdFlagBlockPlaceAll).

Referenced by scAirsRockFreezePuddle() and scInit().

Definition at line 2328 of file airs_rock.c.

AirsRockEntranceRegions

SCENE_REGION AirsRockEntranceRegions[]

Referenced by scGetExitRegions().

Definition at line 2334 of file airs_rock.c.

AirsRockCliffRegions

SCENE_REGION AirsRockCliffRegions[]

Referenced by scGetExitRegions().

Definition at line 2341 of file airs_rock.c.

SceneExits

Uint32 SceneExits[]

Referenced by scGetExits().

Definition at line 2366 of file airs_rock.c.

AirsRockEntrancePlacements

ACTOR_PLACE AirsRockEntrancePlacements[]

References AirsRockWindStoneScript and Sint32.

Referenced by scGetActorPlacements().

Definition at line 2413 of file airs_rock.c.

AirsRockCliffPlacements

ACTOR_PLACE AirsRockCliffPlacements[]

Referenced by scGetActorPlacements().

Definition at line 2429 of file airs_rock.c.

AirsRockSummitPlacements

ACTOR_PLACE AirsRockSummitPlacements[]

Referenced by scGetActorPlacements().

Definition at line 2463 of file airs_rock.c.

AirsRockEntranceCues

CUE AirsRockEntranceCues[]

References scAirsRockBlowGust(), scAirsRockExamineWindStone(), scAirsRockStartWhirlwind(), scAirsRockTakeOverWhirlwind() and scAirsRockWhirlwindClearsWall().

Referenced by scGetCues().

Definition at line 2481 of file airs_rock.c.

AirsRockCliffCues

CUE AirsRockCliffCues[]

References scAirsRockEnterTheRock(), scAirsRockFreezePuddle(), scAirsRockLiftPillar(), scAirsRockPlacePillar() and scAirsRockRideWhirlwind().

Referenced by scGetCues().

Definition at line 2525 of file airs_rock.c.

AirsRockSummitCues

CUE AirsRockSummitCues[]

References scAirsRockDropOffLedge(), scAirsRockMoveFirstPillar(), scAirsRockMoveSecondPillar(), scAirsRockMoveThirdPillar(), scAirsRockRideWhirlwind(), scAirsRockStartWhirlwind(), scAirsRockTakeOverWhirlwind(), scAirsRockWhirlwindClearsFog() and scAirsRockWhirlwindOpensTheTop().

Referenced by scGetCues().

Definition at line 2556 of file airs_rock.c.

AirsRockFogAlpha

Sint8 AirsRockFogAlpha

The fog's blend weight, in sixteenths, and its step every sixteenth tick: it thickens and thins between FOG_WEIGHT / 2 and FOG_WEIGHT (scAirsRockDriftFog).

Referenced by scAirsRockDriftFog().

Definition at line 2602 of file airs_rock.c.

AirsRockFogAlphaStep

Sint8 AirsRockFogAlphaStep

Referenced by scAirsRockDriftFog().

Definition at line 2603 of file airs_rock.c.

AirsRockLiftingFogAlpha

Sint8 AirsRockLiftingFogAlpha

As AirsRockFogAlpha, while the fog lifts (scAirsRockLiftFog).

Referenced by scAirsRockLiftFog().

Definition at line 2606 of file airs_rock.c.

AirsRockLiftingFogAlphaStep

Sint8 AirsRockLiftingFogAlphaStep

Referenced by scAirsRockLiftFog().

Definition at line 2607 of file airs_rock.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_AIRS_ROCK_PILLAR_PLACED_FIRSTFLAG_AIRS_ROCK_PILLAR_PLACED_SECONDFLAG_AIRS_ROCK_PILLAR_PLACED_THIRDFLAG_AIRS_ROCK_PILLAR_PLACED_FOURTHFLAG_AIRS_ROCK_PILLAR_PLACED_FIFTHFLAG_AIRS_ROCK_THIRD_PILLAR_MOVEDFLAG_FIRST_PILLAR_MOVED_WESTFLAG_SECOND_PILLAR_MOVED_WESTFLAG_PUDDLE_FROZENFLAG_AIRS_ROCK_FIRST_BARRIER_BLOWNFLAG_AIRS_ROCK_WALL_CLEAREDFLAG_AIRS_ROCK_FOG_CLEAREDFLAG_AIRS_ROCK_TOP_OPENEDCLEAR_SAND_MOUNDCLEAR_SAND_BANKEFFECT_SET_MODEEFFECT_SET_SCRIPTEFFECT_SPRITE_PRIORITYGUST_LAP_STEPWAVE_SCROLLWAVE_SCROLL_LINESWHIRLWIND_TILE_ROW_SIZEWHIRLWIND_MAP_ROW_OFFSETWHIRLWIND_REACH_ON_WALLCRUMBLE_DUST_CLOUDSCRUMBLE_PIECESFOG_WEIGHTFOG_RIPPLE_SHIFTCLIMB_LEVEL_HEIGHTLEADERFOG_WRAPSTART_BREATHINGHANG_BREATHINGEnumerations in detailAIRS_ROCK_METATILE_MARKAIRS_ROCK_GUST_BARRIERAIRS_ROCK_ENTRANCE_ACTOR_IDAIRS_ROCK_CLIFF_ACTOR_IDAIRS_ROCK_SUMMIT_ACTOR_IDAIRS_ROCK_CLIFF_ENTRANCEAIRS_ROCK_SUMMIT_ENTRANCEFunctions in detailscAirsRockClearScriptedActorSpriteFlagsscBlocksUnmarkMetatilesscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscAirsRockExamineWindStonescAirsRockEnterTheRockscAirsRockMoveFirstPillarscAirsRockMoveSecondPillarscAirsRockMoveThirdPillarscAirsRockDropOffLedgescGetCuesscAirsRockStartWhirlwindscAirsRockTakeOverWhirlwindscAirsRockSpiralGustscAirsRockSpiralSparkscAirsRockFlickerTargetscAirsRockBlowGustscAirsRockSwirlDustscAirsRockWhirlwindClearsWallscAirsRockRideWhirlwindscAirsRockMoveWhirlwindscAirsRockStatueBreathesWhirlwindscAirsRockLiftPillarscAirsRockPlacePillarscAirsRockFreezePuddlescAirsRockCrumbleRockscAirsRockWhirlwindOpensTheTopscAirsRockDriftFogscAirsRockLiftFogscAirsRockWhirlwindClearsFogscAirsRockSetLedgeMetatilesByLevelscInitscPrepareMapVariables in detailAirsRockSummitRegionsAirsRockGustTargetsAirsRockWaveLinesAirsRockWhirlwindRisesScriptAirsRockWhirlwindFadesScriptAirsRockRubbleScriptAirsRockLeaderLevelAirsRockCliffPillarsFieldEffectDurationScriptsAirsRockWindStoneScriptAirsRockFrozenPuddleAirsRockEntranceRegionsAirsRockCliffRegionsSceneExitsAirsRockEntrancePlacementsAirsRockCliffPlacementsAirsRockSummitPlacementsAirsRockEntranceCuesAirsRockCliffCuesAirsRockSummitCuesAirsRockFogAlphaAirsRockFogAlphaStepAirsRockLiftingFogAlphaAirsRockLiftingFogAlphaStep