Skip to Content
The Alchemy Project

src/scene/altin_peak.c

Altin Peak, the mine under Altin that the villagers and the Alpine Crossing's signpost call Altin Mine. More…

Macros

NameDescription
#defineFLAG_ALTIN_PEAK_SECOND_WATER_BEAST_ROOM_SWITCH FLAG_AREA_TEMP(0x23)The rail switches by the forks, each set once flipped from its first position; they are area temp flags, kept until the party leaves the mine.
#defineFLAG_ALTIN_PEAK_THIRD_WATER_BEAST_ROOM_SWITCH FLAG_AREA_TEMP(0x25)
#defineFLAG_ALTIN_PEAK_POOL_ROOM_SWITCH FLAG_AREA_TEMP(0x26)
#defineFLAG_ALTIN_PEAK_SPRITZ_ROOM_SWITCH FLAG_AREA_TEMP(0x27)
#definescAltinPeakStartSpitting (x, y, z, facing)scAltinPeakStartSpittingFX from a point in whole pixels.
#defineWATER_BEAST_HOP_PERIOD 60The ticks from one of a water beast's hops to the next.

Enumerations

NameDescription
enumALTIN_PEAK_CUE_METATILE { METATILE_BEHAVIOR_ALTIN_PEAK_BEFORE_FIRST_BEAST, METATILE_BE … }The metatile behaviors the rooms' cue tables answer, besides their exits and chests.
enumanonymous enum { DUST_PUFF_ANIMATION_QUICK }SPRITE_DUST_PUFF's quick puff, the spit's drops: its eight pictures once, two to four ticks each.
enumanonymous enum { ROCK_ANIMATION_ROLL_FAST }SPRITE_ROCK rolling fast, the falling boulder.
enumHYDROS_STATUE_ANIMATION { HYDROS_STATUE_ANIMATION_STONE, HYDROS_STATUE_ANIMATION_ADVAN … }SPRITE_HYDROS_STATUE's animations (hydros_statue.tsv).
enumMINE_CART_ANIMATION { MINE_CART_ANIMATION_ROLL, MINE_CART_ANIMATION_UPHILL, MINE_C … }SPRITE_MINE_CART's animations (mine_cart.tsv), as the ride picks them.
enumanonymous enum { ENTRANCE_ROOM_START, ENTRANCE_AFTER_BATTLE }Each water beast's battle and the Hydros Statue's return the party to its room by ENTRANCE_AFTER_BATTLE, where the room's setup plays what follows.
enumanonymous enum { ENCOUNTER_SLOT_LIVING_STATUE, ENCOUNTER_SLOT_HYDROS_STATUE }The mine's battles, by their slots in ENCOUNTER_ZONE_SCRIPTED_MOGALL_ALTIN_LAMAKAN.
enumanonymous enum { ACTOR_CART }The rooms' actors, from their actor placements.
enumanonymous enum { ACTOR_FIRST_WATER_BEAST_ROOM_PUDDLE, ACTOR_FIRST_WATER_BEAST … }The first water beast's cave: the puddle that appears by the west ladder when the water drains, the puddle in the gap between the ledges, and the beast.
enumanonymous enum { ACTOR_SECOND_WATER_BEAST, ACTOR_SECOND_WATER_BEAST_ROOM_BOUL … }The lake room, the second water beast's.
enumanonymous enum { ACTOR_THIRD_WATER_BEAST_ROOM_PUDDLE, ACTOR_THIRD_WATER_BEAST }The third water beast's room: its puddle and the beast.
enumanonymous enum { ACTOR_POOL_ROOM_PUDDLE }The pool room's puddle.
enumanonymous enum { ACTOR_SPRITZ_ROOM_PUDDLE, ACTOR_SPRITZ_ROOM_PILLAR, ACTOR_SP … }Spritz's room: its puddles and pillar, an unused boulder, and the Djinni.
enumanonymous enum { ACTOR_JUNCTION_ROOM_BOULDER }The junction's boulder.
enumanonymous enum { ACTOR_FALLING_BOULDER, ACTOR_BOULDER_SHADOW, ACTOR_STANDING_ … }The falling-rocks passage: the boulder that falls and its shadow, the log standing upright at the dead end, which topples as the boulder comes down, the wall Force is cast on, and the sign.
enumanonymous enum { ACTOR_STATUE, ACTOR_STATUE_SHADOW }The Hydros statue's room: the statue on its dais and its shadow.
enumanonymous enum { ACTOR_WEST_EXIT_ROOM_BOULDER, ACTOR_WEST_EXIT_ROOM_PILLAR }The west exit's room: its boulder and pillar.
enumanonymous enum { FLAG_ALTIN_PEAK_PUDDLE_FROZEN, FLAG_ALTIN_PEAK_SECOND_PUDDLE … }The rooms' frozen puddles and Garet at the sign.
enumanonymous enum { QUARTER_PIXEL_SHIFT }A 16.16 height shifted down to whole quarter pixels.
enumanonymous enum { DRAIN_SINK_PIXELS }The pixels the water layer sinks in a drain, one every fourth tick.
enumanonymous enum { CART_COUNTDOWN_TICKS, CART_COUNTDOWN_TURN }A countdown metatile's ticks: SE_CART_TURN plays with CART_COUNTDOWN_TURN ticks left, from when the cart's slope animation is picked again, and SE_CART_ROLL at the end.
enumALTIN_PEAK_METATILE_BEHAVIOR { METATILE_BEHAVIOR_ALTIN_PEAK_CART_COUNTDOWN, METATILE_BEHAVI … }The metatile behaviors that mark the mine cart's route, on the overhead layer (map rows 64 and up): its turns, a countdown before a turn, and its stop.

Functions

NameDescription
BSS_DATAALIGNED (4)The next byte of AltinPeakPaletteScript; 0 again at its -1.
static voidscAltinPeakRunBoulderChase (Sint32 boulderDelay)The rockfall in the falling-rocks passage: Isaac looks up at the rumble, a boulder drops beside the toppled log, and he runs down the winding path ahead of it to the clearing at the bottom, where it crashes into the old doorway in a shower of rocks and opens the way down.
static voidscAltinPeakRestoreFirstWaterBeastRoom (void)Sets up the first water beast's cave: back from its battle, the Frost Jewel and the drain; before the drain, the beast where it last went; after it, the two puddles, frozen if Frost has frozen them on this visit.
static voidscAltinPeakRestoreSecondWaterBeastRoom (void)Sets up the lake room: back from its battle, the drain; before it, the beast spitting water at the lake; and the switch's arrow and the fork as last flipped.
static voidscAltinPeakRestoreSouthEntranceRoom (void)Sets up the south entrance: its flooded chamber dries with the second drain, and coming in from the Alpine Crossing shows no area name.
static voidscAltinPeakRestoreThirdWaterBeastRoom (void)Sets up the third water beast's room: back from its battle, the drain; before it, the beast spitting water; the frozen puddle; and the switch.
static voidscAltinPeakRestorePoolRoom (void)Sets up the pool cave: the mine cart waiting at (358, 104) when the party comes back up from the south-west part, the frozen puddle, the pool gone after the third drain, and the switch.
static voidscAltinPeakRestoreSpritzRoom (void)Sets up Spritz's room: the stone pillar where it stands, the three puddles frozen on this visit, and the switch.
static voidscAltinPeakRestoreFallingRocksRoom (void)Sets up the falling-rocks passage: the upright log and the sign, and once the boulder has fallen, the log lying toppled and the doorway broken open.
static voidscAltinPeakRestoreHydrosStatueRoom (void)Sets up the Hydros statue's room: the statue stands on its dais until it is beaten, and back from its battle the party talks it over.
static voidscAltinPeakRestoreWestExitRoom (void)Sets up the west exit: coming back out of the Vial's chest room, the stone pillar stands a metatile west of its first place, at (184, 328).
static voidscAltinPeakStartSpittingFX (FIXED x, FIXED y, FIXED z, Sint32 facing)A water beast starts spitting water from (x, y, z), in 16.16 fixed point, toward facing (FACING_EAST or FACING_WEST), with its sound (SE_AMBIENT_WATER).
static voidscAltinPeakSpawnDebris (void)While the boulder crashes into the doorway, a piece of rock of random size flies up from the crash every third tick and falls, and a crash or a clatter sounds every ninth.
static voidfdEffectUpdateFrostGlint (ACTOR *actor)Makes the frozen puddle glint (frost_glint.h).
static voidscAltinPeakBeastFreezesSecondPuddle (void)The first water beast casts Frost on the puddle in the gap of its cave, the screen turning red as when the party casts it, and the puddle freezes into an ice pillar.
static voidscAltinPeakAwardFrostJewelAndDrain (void)Back from the first water beast's battle, on the west ledge where it last stood: the beast is gone, "Isaac got the Frost Jewel.", and the view moves over the cave as the water drains away (scAltinPeakDrainFirstWater).
static voidscAltinPeakDrainAfterSecondBeast (void)Back from the second water beast's battle: the beast is gone, the mine cart waits where its ride ended, at (328, 424), the switch is back in its first position, and the water drains (scAltinPeakDrainSecondWater).
static voidscAltinPeakDrainAfterThirdBeast (void)Back from the third water beast's battle, the same way: the beast is gone, the cart waits at (488, 138), the switch is back in its first position, and the last water drains (scAltinPeakDrainThirdWater).
static voidscAltinPeakCelebrateHydrosVictory (void)Back from the Hydros Statue's battle, Garet, Ivan and Mia step out beside Isaac on the dais.
static voidscAltinPeakUpdateFrostPillarPriority (void)In Spritz's room, while Isaac stands higher than 48 pixels, the ice pillar of the north-west puddle is drawn under the party and the one north of the rails further back.
static voidscAltinPeakWallOffPuddle (Sint32 actorId)Lets the party pass through a puddle's actor and makes its map metatile a wall instead, until Frost gives the metatile a hop square.
static voidscAltinPeakRollCart (Sint32 id, Sint32 heading)Rolls the mine cart Isaac rides, the view following it, from where it stands along the rails until its stop.
static voidscAltinPeakStartPaletteAnimation (void)Starts the water's palette cycle.
static voidscAltinPeakTalkToDjinni (void)Talking to Spritz, the Mercury Djinni waiting in its big room of the mine, starts its battle; beaten, it joins the party.
static UNREAD_RESULTscAltinPeakShadowFollowBoulder (ACTOR *follower)The falling boulder's shadow keeps under it, on the ground 12 pixels down, while the boulder bounces.
static Sint32scAltinPeakFlyDebris (ACTOR *actor)Each tick of a piece of the crash's debris: it flies by its velocity and drops under its gravity, swelling by its z velocity as though it flew toward the screen.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The falling-rocks passage and the Hydros statue's room have exit regions, round the ladder between them.
const Uint32 *scGetExits (void)All the rooms share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)Some villagers only turn back after talking once the flood is over or their family has gone home.
static voidscAltinPeakRideCart (Sint32 cartId)Isaac jumps into a mine cart when he talks to it, and it rolls him along the rails until the end of its line, where he jumps out to the south.
static voidscAltinPeakFightFirstWaterBeast (void)Talking to the first water beast, or reading its mind, starts its battle (a Living Statue), wherever it stands in its cave.
static voidscAltinPeakFightSecondWaterBeast (void)Talking to the second water beast at the lake, or reading its mind, starts its battle, as the first one's does.
static voidscAltinPeakFightThirdWaterBeast (void)Talking to the third water beast, or reading its mind, starts its battle, as the first one's does.
static voidscAltinPeakSettleSpritzRoomPillar (void)Move on the stone pillar in Spritz's room, in the channel below the ladder (first at metatile (25, 26)), slides it a metatile, and its top becomes a square Isaac can hop onto, a step of the path he makes there with the frozen puddle beside it.
static voidscAltinPeakFreezeFirstWaterBeastRoomPuddle (void)Frost on the puddle by the west ladder of the first water beast's cave (metatile (9, 13)), which appears when the water drains, freezes it into an ice pillar against the ledge, whose top Isaac can hop onto.
static voidscAltinPeakFreezeFirstWaterBeastRoomSecondPuddle (void)Frost on the puddle in the gap between the two ledges of the first water beast's cave (metatiles (17, 13) to (19, 13)) freezes it into an ice pillar in the gap again, after the drain has taken the beast's own ice away.
static voidscAltinPeakFreezeSpritzRoomPuddle (void)Frost on the puddle beside the stone pillar in Spritz's room (metatile (26, 26)) freezes it into an ice pillar whose top Isaac can hop onto, the rest of the path across the channel below the ladder.
static voidscAltinPeakFreezeThirdWaterBeastRoomPuddle (void)Frost on the puddle in the middle of the third water beast's room (metatile (25, 13)), in the low channel between the ledges, freezes it into an ice pillar whose top Isaac can hop onto.
static voidscAltinPeakFreezePoolRoomPuddle (void)Frost on the puddle on the way to the third water beast's room, in the pool cave's south-east part (metatile (43, 41)), freezes it into an ice pillar whose top Isaac can hop onto.
static voidscAltinPeakFreezeSpritzRoomSecondPuddle (void)Frost on the puddle between the two torches in the north-west of Spritz's room (metatile (17, 10)) freezes it into an ice pillar whose top Isaac can hop onto, on the way out of the room.
static voidscAltinPeakFreezeSpritzRoomThirdPuddle (void)Frost on the puddle north of the rails at the top of the ladder in Spritz's room (metatile (26, 15)) freezes it into an ice pillar whose top Isaac can hop onto.
static voidscAltinPeakFlickerWaterOut (void)HBlank handler while the water layer vanishes: a line shows the water while a random number below 100 reaches the timer, so ever fewer lines show it.
static inline voidscAltinPeakFlickerWaterAway (void)Flickers the water away while the timer counts to 100, then lets the screen settle; every drain ends this way.
static voidscAltinPeakDrainFirstWater (void)The first drain, after the Frost Jewel is found: with a rumble the water of the first water beast's cave sinks, flickers and is gone, and a new puddle grows by the west ladder as it goes.
static voidscAltinPeakDrainSecondWater (void)The second drain, after the beast at the lake: the water sinks and flickers away in the same way.
static voidscAltinPeakDrainThirdWater (void)The third drain, after the third beast: the same sinking and flicker, which empties the last of the mine's water.
static voidscAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles (void)Turns the arrow of the lake room's switch to point the other way and sends the mine cart down the other branch of the fork below it.
static voidscAltinPeakFlipSecondWaterBeastRoomSwitch (void)Searching the switch by the torch in the lake room (metatile (24, 13)) flips it: "Isaac flipped the switch." Its red arrow, first pointing west over the fork below it, turns east, and the mine cart takes the other branch.
static voidscAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles (void)Turns the arrow of the third water beast's room's switch and the fork's turn, as scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles does.
static voidscAltinPeakFlipThirdWaterBeastRoomSwitch (void)Searching the switch on the small ledge by the torch at the top of the third water beast's room (metatile (11, 7)) flips it: "Isaac flipped the switch." Its red arrow over the fork below turns from west to east, or back, and the mine cart takes the other branch.
static voidscAltinPeakFlipPoolRoomSwitch (void)Searching the switch below the fork in the north of the pool cave (metatile (16, 31)) flips it: "Isaac flipped the switch." Its red arrow turns from east to west, or back, and the mine cart takes the other branch.
static voidscAltinPeakFlipSpritzRoomSwitch (void)Searching the switch east of the ladder's top in Spritz's room (metatile (29, 20)) flips it: "Isaac flipped the switch." Its red arrow by the fork turns from east to west, or back, and the mine cart takes the other branch.
static voidscAltinPeakPlacePillarUnderLeader (void)Nothing visible happens when Isaac steps onto the top of the ladder down to the stone pillar in Spritz's room (metatiles (25, 18) to (27, 19)); the game only has the pillar drawn beneath him while he is up there.
static voidscAltinPeakRestorePillarAutomaticPriority (void)Nothing visible happens when Isaac steps onto the foot of the ladder down to the stone pillar in Spritz's room (metatiles (25, 20) to (27, 21)); the game draws the pillar in front of or behind him by where each stands again, as before he climbed up.
static voidscAltinPeakPushSpritzRoomPillar (void)Walking east into the stone pillar in Spritz's room from metatile (23, 26), after Move has slid it a metatile west, pushes it back with a scrape to where it first stood, Isaac following behind it.
static voidscAltinPeakForceLogOver (void)Force on the wall at the dead end of the falling-rocks passage, past the sign, sends the upright log standing there rocking and toppling over, and a boulder drops and chases Isaac down the winding path.
static voidscAltinPeakReadFallingRockSign (void)Reading the sign at the dead end of the falling-rocks passage (metatile (49, 6)) says "Watch for falling rocks!
const CUE *scGetCues (void)The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen.
static voidscAltinPeakUpdateBeastHops (ACTOR *updated)A water beast's update function while it hops along a route: it leaps every WATER_BEAST_HOP_PERIOD ticks with SE_JUMP, and lands with a splash (SE_SPLASH) that shakes the screen for a few ticks.
static inline voidscAltinPeakPlayLandingShake (Sint32 amplitude, Sint32 holdTicks)The beast lands with a splash, shaking the screen by amplitude pixels for holdTicks.
static voidscAltinPeakShowFirstBeastRoute (void)Walking up the passage to the water beast in its cave (metatiles (17, 24) to (19, 24)) makes it show the way: it cries out, hops north into the cave to the gap between the two ledges, freezes the puddle in the gap with Frost, hops round by the east ledge and across the ice to the west ledge, and cries again.
static voidscAltinPeakFirstBeastHopsAway (void)When Isaac reaches the east ledge at the edge of the gap (metatiles (21, 13) and (21, 14)), the water beast across the ice cries out, hops away to the west end of its ledge and settles there to spit water east.
Sint32scInit (void)Sets up the room being entered, with what the party has done there put back and its water as low as the drains have left it.
static inline voidscAltinPeakDrawUnderParty (Sint32 actorId)Draws an actor under the party, as a frozen puddle's ice pillar is once Isaac can stand on it.
static voidscAltinPeakInitSpit (ACTOR *spit)Gives a new drop of spit its look.
static voidscAltinPeakDriftSpit (ACTOR *spit)A drop of spit's update function: it drifts the way the beast spits, slowing as it goes, with a random wobble, and moves down the screen as it grows; in its last few ticks it spreads flat and shoots on half a pixel a tick.
static voidscAltinPeakSpawnSpit (void)While a beast spits, a drop of spit starts from its spout every fourth tick and lives 20 ticks.
DEFINE_FROST_GLINT(static , fdActorSetSpriteColor)The glint of the ice the first beast leaves in the gap of its cave.
static voidscAltinPeakPlayHydrosRumble (void)While the Hydros Statue wakes, the floor rumbles (SE_STONE_RUMBLE) once a second.
static voidscAltinPeakStartHydrosBattle (void)Climbing the steps onto the dais before the guardian statue in the ruins' room (metatiles (19, 7) to (21, 7)) wakes the Hydros Statue: Isaac walks up to it, it roars and slides toward him with the floor rumbling, and its battle starts.
static voidscAltinPeakFlickerStatue (void)As the Hydros Statue sinks it flickers, white and grey by turns, two ticks each.
static voidscAltinPeakRequestPsynergy (void)Unused: asks the field to have Felix use Frost.
static voidscAltinPeakStopCartAndJumpOff (ACTOR *actor)The mine cart reaches the end of its line with a crunch: it settles in the middle of its metatile and Isaac jumps out of it to the south.
static voidscAltinPeakUnusedNoOperation (void)Unused: does nothing, and nothing calls it.
static voidscAltinPeakTurnCartRight (ACTOR *actor)The cart turns a quarter turn right around the corner it reaches.
static voidscAltinPeakTurnCartLeft (ACTOR *actor)The cart turns a quarter turn left.
static voidscAltinPeakStartCartCountdown (ACTOR *actor)The cart rolls over a countdown metatile.
static voidscAltinPeakAdvanceCart (ACTOR *actor)Rolls the cart on by a tick and picks its animation from the terrain ahead of and behind it: flat, uphill or downhill.
static voidscAltinPeakStepPaletteAnimation (void)Each tick of the water's colour cycle, through AltinPeakPaletteScript.

Variables

NameDescription
Uint16AltinPeakFlickerTimerHow far a drain's flicker has gone, 0 to 100: the chance in a hundred that a screen line no longer shows the water (scAltinPeakFlickerWaterAway).
Sint32AltinPeakSpitDirectionThe spit's direction, FACING_EAST or FACING_WEST.
Sint32AltinPeakSpitOrigin [3]Where a beast's spit starts, its spout: x, y and z in 16.16 pixels.
Uint8AltinPeakUnusedAfterSpitOrigin [16]Unused: nothing reads or writes these bytes.
Sint16AltinPeakPaletteHoldTicks left on the water palette's current step (AltinPeakPaletteScript).
Sint16AltinPeakPaletteStepThe next byte of AltinPeakPaletteScript; 0 again at its -1.
extern Sint8AltinPeakPaletteScript []The water's palette cycle: pairs of a colour offset and the ticks it holds, repeating from the top at -1.
extern Sint32AltinPeakFaceLeaderScript []The first water beast keeps turning to face Isaac.
extern Sint32AltinPeakPuddleGrowScript []The puddle that appears by the west ladder as the first drain lowers the water grows from a tenth of its size to nearly full, by a 120th a tick over 108 ticks.
extern Sint32AltinPeakBoulderPath []The falling boulder rolls straight down the passage, over the bends Isaac runs round, and marks its arrival.
extern Sint32AltinPeakLeaderFleePath []The party leader flees down the winding path ahead of the boulder, marks the arrival, steps aside and turns round.
extern Sint32AltinPeakDebrisScript []A piece of debris flies for 60 ticks and is released.
extern Sint32AltinPeakGaretScript []Garet, Ivan and Mia step out beside the leader after the Hydros battle.
extern Sint32AltinPeakIvanScript []
extern Sint32AltinPeakMiaScript []
extern Sint32AltinPeakStatueSinkScript []The Hydros statue and its shadow flatten into the floor: over 60 ticks they squash to a sixteenth of their height and spread an eighth wider, then move to (0, 0, 0).
extern Sint32AltinPeakRejoinScript []Garet, Ivan and Mia walk back to the leader and rejoin the party.
extern SCENE_ENTRANCEAltinPeakEntrancesOther []
extern SCENE_ENTRANCEAltinPeakFirstWaterBeastEntrances []
extern SCENE_ENTRANCEAltinPeakRailTunnelEntrances []
extern SCENE_ENTRANCEAltinPeakSecondWaterBeastEntrances []
extern SCENE_ENTRANCEAltinPeakSouthEntranceEntrances []
extern SCENE_ENTRANCEAltinPeakThirdWaterBeastEntrances []
extern SCENE_ENTRANCEAltinPeakPoolEntrances []
extern SCENE_ENTRANCEAltinPeakSpritzEntrances []
extern SCENE_ENTRANCEAltinPeakJunctionEntrances []
extern SCENE_ENTRANCEAltinPeakFallingRocksEntrances []
extern SCENE_ENTRANCEAltinPeakHydrosStatueEntrances []
extern SCENE_ENTRANCEAltinPeakWestExitEntrances []
extern SCENE_EXIT_REGIONAltinPeakFallingRocksRegions []
extern SCENE_EXIT_REGIONAltinPeakHydrosStatueRegions []
extern Uint32AltinPeakExits []
extern ACTOR_PLACEAltinPeakActorPlacementsOther []
extern ACTOR_PLACEAltinPeakFirstWaterBeastActorPlacements []
extern ACTOR_PLACEAltinPeakSecondWaterBeastActorPlacements []
extern ACTOR_PLACEAltinPeakThirdWaterBeastActorPlacements []
extern ACTOR_PLACEAltinPeakPoolActorPlacements []
extern ACTOR_PLACEAltinPeakSpritzActorPlacements []
extern ACTOR_PLACEAltinPeakJunctionActorPlacements []
extern ACTOR_PLACEAltinPeakFallingRocksActorPlacements []
extern ACTOR_PLACEAltinPeakHydrosStatueActorPlacements []
extern ACTOR_PLACEAltinPeakWestExitActorPlacements []
extern CUEAltinPeakCuesOther []
extern CUEAltinPeakFirstWaterBeastCues []
extern CUEAltinPeakFirstWaterBeastCuesDrained []
extern CUEAltinPeakRailTunnelCues []
extern CUEAltinPeakSecondWaterBeastCues []
extern CUEAltinPeakSouthEntranceCues []
extern CUEAltinPeakThirdWaterBeastCues []
extern CUEAltinPeakPoolCues []
extern CUEAltinPeakSpritzCues []
extern CUEAltinPeakJunctionCues []
extern CUEAltinPeakFallingRocksCues []
extern CUEAltinPeakHydrosStatueCues []
extern CUEAltinPeakWestExitCues []
extern Sint32AltinPeakRumbleTicksTicks since the statue's last rumble.
extern FIXEDAltinPeakCartSpeeds []The cart's speed by its height against where it set off, of which it rolls three quarters a tick: 2 at that height, doubling for each 16 pixels lower and halving for each 16 higher.

Description

Altin Peak, the mine under Altin that the villagers and the Alpine Crossing's signpost call Altin Mine. Its rooms are eleven scenes, all named Altin Peak, except that the international editions name the south entrance the Alpine Crossing when the party comes in from there.

Altin is flooded because water beasts are spitting water in the mine. They look just like Altin's guardian statues, and their battles call each one a Living Statue. Each beast Isaac beats lowers the water a step, in the mine and in the village (FLAG_ALTIN_MINE_FIRST_DRAIN to _THIRD_DRAIN). The party goes down three times, each time by another doorway of Altin. Before any of that, the passage Move opens behind Altin's first guardian statue leads to a small cave with the Psy Crystal's chest, a corner of Spritz's room's map.

First, through the doorway in Altin's west cliff, the party follows the beast it saw spitting by the village into its cave. When the party walks up the passage to it, it hops into the cave, freezes the puddle in the gap between two ledges with Frost and hops across the ice. When Isaac climbs the ladder onto the east ledge, it hops off west and settles there to spit. Talking to it, or reading its mind, starts the battle. Back from it, Isaac gets the Frost Jewel and the water drains away; from then on Frost freezes the mine's puddles into ice pillars to hop across. A pillar stays frozen only until the party leaves its room.

Second, through the rail tunnel in the north cliff, the rails lead to the second beast's lake. Isaac flips the switch so its arrow points east and rides the mine cart to the beast. After it the water drains from the south entrance's flooded chamber, which leads on to the pool cave: a switch, a Mimic in a chest, and a puddle to freeze on the way to the third beast's room. There a frozen puddle and a cart ride reach the Dragon Shield, and the switch and another ride lead to the beast. The third drain empties the pool and the rest of Altin.

Last, through the doorway in the middle of the village, the party passes the Lucky Medal's chest and comes to the big room where Spritz, a Mercury Djinni, waits. Isaac moves the stone pillar there and freezes three puddles into a path, and a switch and the mine cart take him to Spritz. The way out of that room leads past many small rocks to a narrow passage that ends at a sign: "Watch for falling rocks! Do not strike the wall! Rocks may fall!" Garet strikes the wall anyway, or Isaac uses Force on it, and a boulder chases Isaac down the winding path and crashes into the old doorway at its foot. A ladder there now goes down to a room of ruins buried in the mine, where the Hydros Statue wakes and fights the party. When it is beaten, the statue sinks into the floor and the chest behind it holds the Lifting Gem, whose Lift frees Hsu at the Alpine Crossing (alpine_crossing_lama_temple.c). In the mine, Lift raises the round boulders of the lake room's side chamber (by the Cookie's chest), the junction and the west exit; the field does that alone, and their rows run no script of this file's.

The south entrance also opens onto the Alpine Crossing, and the west exit onto the World Map.

Every room's tables are picked by MainRoutineStateWork.next, all the rooms share one exit table, and scInit calls the setup of the room being entered (scAltinPeakRestoreFirstWaterBeastRoom and so on), which puts back what the party has already done there. A beast is SPRITE_WATER_BEAST drawn with its green and blue swapped (SPRITE_COLOR_RBG), and its spit is SPRITE_DUST_PUFF recoloured, as in Altin. The falling boulder is SPRITE_ROCK with a SPRITE_BLANK_LARGE actor for its shadow, and its pieces in the crash are SPRITE_ROCK again, scaled down (scAltinPeakSpawnDebris).

Macros in detail

FLAG_ALTIN_PEAK_SECOND_WATER_BEAST_ROOM_SWITCH

#define FLAG_ALTIN_PEAK_SECOND_WATER_BEAST_ROOM_SWITCH FLAG_AREA_TEMP(0x23)

The rail switches by the forks, each set once flipped from its first position; they are area temp flags, kept until the party leaves the mine.

Referenced by scAltinPeakDrainAfterSecondBeast(), scAltinPeakRestoreSecondWaterBeastRoom() and scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles().

Definition at line 142 of file altin_peak.c.

FLAG_ALTIN_PEAK_THIRD_WATER_BEAST_ROOM_SWITCH

#define FLAG_ALTIN_PEAK_THIRD_WATER_BEAST_ROOM_SWITCH FLAG_AREA_TEMP(0x25)

Referenced by scAltinPeakDrainAfterThirdBeast(), scAltinPeakRestoreThirdWaterBeastRoom() and scAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles().

Definition at line 143 of file altin_peak.c.

FLAG_ALTIN_PEAK_POOL_ROOM_SWITCH

#define FLAG_ALTIN_PEAK_POOL_ROOM_SWITCH FLAG_AREA_TEMP(0x26)

Referenced by scAltinPeakFlipPoolRoomSwitch() and scAltinPeakRestorePoolRoom().

Definition at line 144 of file altin_peak.c.

FLAG_ALTIN_PEAK_SPRITZ_ROOM_SWITCH

#define FLAG_ALTIN_PEAK_SPRITZ_ROOM_SWITCH FLAG_AREA_TEMP(0x27)

Referenced by scAltinPeakFlipSpritzRoomSwitch() and scAltinPeakRestoreSpritzRoom().

Definition at line 145 of file altin_peak.c.

scAltinPeakStartSpitting

#define scAltinPeakStartSpitting(x, y, z, facing)

scAltinPeakStartSpittingFX from a point in whole pixels.

Referenced by scAltinPeakFirstBeastHopsAway(), scAltinPeakRestoreFirstWaterBeastRoom(), scAltinPeakRestoreSecondWaterBeastRoom() and scAltinPeakRestoreThirdWaterBeastRoom().

Definition at line 249 of file altin_peak.c.

WATER_BEAST_HOP_PERIOD

#define WATER_BEAST_HOP_PERIOD 60

The ticks from one of a water beast's hops to the next.

Referenced by scAltinBeastHop() and scAltinPeakUpdateBeastHops().

Definition at line 1522 of file altin_peak.c.

Enumerations in detail

ALTIN_PEAK_CUE_METATILE

enum ALTIN_PEAK_CUE_METATILE

The metatile behaviors the rooms' cue tables answer, besides their exits and chests. Each is a metatile of the map named here.

EnumeratorValueDescription
METATILE_BEHAVIOR_ALTIN_PEAK_BEFORE_FIRST_BEAST10The first water beast's cave: the passage just south of the beast, metatiles (17, 24) to (19, 24).
METATILE_BEHAVIOR_ALTIN_PEAK_EAST_LEDGE_BY_GAP11The first water beast's cave: the east ledge at the edge of the gap, metatiles (21, 13) and (21, 14).
METATILE_BEHAVIOR_ALTIN_PEAK_LAKE_SWITCH83The lake room: the switch by the fork below the torch, metatile (24, 13).
METATILE_BEHAVIOR_ALTIN_PEAK_SWITCH50The switch of the third water beast's room (metatile (11, 7)), the pool cave (metatile (16, 31)) and Spritz's room
METATILE_BEHAVIOR_ALTIN_PEAK_LADDER_TOP10(metatile (29, 20)). Spritz's room: the top of the ladder down to the stone pillar, metatiles (25, 18) to (27, 19).
METATILE_BEHAVIOR_ALTIN_PEAK_LADDER_FOOT11Spritz's room: the
METATILE_BEHAVIOR_ALTIN_PEAK_WEST_OF_PILLAR12foot of that ladder, metatiles (25, 20) to (27, 21). Spritz's room: west of the stone pillar's first
METATILE_BEHAVIOR_ALTIN_PEAK_FALLING_ROCK_SIGN12place, metatile (23, 26). The falling-rock
METATILE_BEHAVIOR_ALTIN_PEAK_BEFORE_HYDROS_STATUE10sign, metatile (49, 6). The Hydros statue's
METATILE_BEHAVIOR_ALTIN_PEAK_CHEST100room: the top of the steps before the statue, metatiles (19, 7) to (21, 7). A room's chest.
METATILE_BEHAVIOR_ALTIN_PEAK_PSY_CRYSTAL_CHEST101The Psy Crystal's chest, in the small cave behind Altin's first guardian statue that is a corner of Spritz's room's map.

Definition at line 149 of file altin_peak.c.

anonymous enum

enum { DUST_PUFF_ANIMATION_QUICK }

SPRITE_DUST_PUFF's quick puff, the spit's drops: its eight pictures once, two to four ticks each.

EnumeratorValueDescription
DUST_PUFF_ANIMATION_QUICK1

Definition at line 206 of file altin_peak.c.

anonymous enum

enum { ROCK_ANIMATION_ROLL_FAST }

SPRITE_ROCK rolling fast, the falling boulder.

EnumeratorValueDescription
ROCK_ANIMATION_ROLL_FAST4

Definition at line 212 of file altin_peak.c.

HYDROS_STATUE_ANIMATION

enum HYDROS_STATUE_ANIMATION

SPRITE_HYDROS_STATUE's animations (hydros_statue.tsv).

EnumeratorValueDescription
HYDROS_STATUE_ANIMATION_STONEANIM_STILLGrey stone, held: the statue once beaten.
HYDROS_STATUE_ANIMATION_ADVANCE2Awake and moving, as it comes at Isaac.

Definition at line 218 of file altin_peak.c.

MINE_CART_ANIMATION

enum MINE_CART_ANIMATION

SPRITE_MINE_CART's animations (mine_cart.tsv), as the ride picks them.

EnumeratorValueDescription
MINE_CART_ANIMATION_ROLL2rolling on the flat
MINE_CART_ANIMATION_UPHILL3the ground ahead higher
MINE_CART_ANIMATION_DOWNHILL4the ground ahead lower
MINE_CART_ANIMATION_TURN_RIGHT5
MINE_CART_ANIMATION_TURN_LEFT6

Definition at line 227 of file altin_peak.c.

anonymous enum

enum { ENTRANCE_ROOM_START, ENTRANCE_AFTER_BATTLE }

Each water beast's battle and the Hydros Statue's return the party to its room by ENTRANCE_AFTER_BATTLE, where the room's setup plays what follows.

ENTRANCE_ROOM_START stands at the way in of each water beast's room and the Hydros statue's, and the statue room's setup lands the party there as it does from the falling-rocks passage. Unused: no exit or script leads to it.

EnumeratorValueDescription
ENTRANCE_ROOM_START98
ENTRANCE_AFTER_BATTLE99

Definition at line 270 of file altin_peak.c.

anonymous enum

enum { ENCOUNTER_SLOT_LIVING_STATUE, ENCOUNTER_SLOT_HYDROS_STATUE }

The mine's battles, by their slots in ENCOUNTER_ZONE_SCRIPTED_MOGALL_ALTIN_LAMAKAN.

EnumeratorValueDescription
ENCOUNTER_SLOT_LIVING_STATUE2each water beast
ENCOUNTER_SLOT_HYDROS_STATUE3

Definition at line 278 of file altin_peak.c.

anonymous enum

enum { ACTOR_CART }

The rooms' actors, from their actor placements.

The lake room, the third water beast's room, the pool cave and Spritz's room place their mine cart first.

EnumeratorValueDescription
ACTOR_CARTACTOR_FIRST_PLACED

Definition at line 288 of file altin_peak.c.

anonymous enum

enum { ACTOR_FIRST_WATER_BEAST_ROOM_PUDDLE, ACTOR_FIRST_WATER_BEAST_ROOM_SECOND_PUDDLE, ACTOR_FIRST_WATER_BEAST }

The first water beast's cave: the puddle that appears by the west ladder when the water drains, the puddle in the gap between the ledges, and the beast.

EnumeratorValueDescription
ACTOR_FIRST_WATER_BEAST_ROOM_PUDDLEACTOR_FIRST_PLACED
ACTOR_FIRST_WATER_BEAST_ROOM_SECOND_PUDDLE
ACTOR_FIRST_WATER_BEASTIts battle names it a Living Statue.

Definition at line 295 of file altin_peak.c.

anonymous enum

enum { ACTOR_SECOND_WATER_BEAST, ACTOR_SECOND_WATER_BEAST_ROOM_BOULDER }

The lake room, the second water beast's.

EnumeratorValueDescription
ACTOR_SECOND_WATER_BEASTACTOR_CART + 1
ACTOR_SECOND_WATER_BEAST_ROOM_BOULDER

Definition at line 303 of file altin_peak.c.

anonymous enum

enum { ACTOR_THIRD_WATER_BEAST_ROOM_PUDDLE, ACTOR_THIRD_WATER_BEAST }

The third water beast's room: its puddle and the beast.

EnumeratorValueDescription
ACTOR_THIRD_WATER_BEAST_ROOM_PUDDLEACTOR_CART + 1
ACTOR_THIRD_WATER_BEAST

Definition at line 310 of file altin_peak.c.

anonymous enum

enum { ACTOR_POOL_ROOM_PUDDLE }

The pool room's puddle.

EnumeratorValueDescription
ACTOR_POOL_ROOM_PUDDLEACTOR_CART + 1

Definition at line 317 of file altin_peak.c.

anonymous enum

enum { ACTOR_SPRITZ_ROOM_PUDDLE, ACTOR_SPRITZ_ROOM_PILLAR, ACTOR_SPRITZ_ROOM_SECOND_PUDDLE, ACTOR_SPRITZ_ROOM_THIRD_PUDDLE, … }

Spritz's room: its puddles and pillar, an unused boulder, and the Djinni.

EnumeratorValueDescription
ACTOR_SPRITZ_ROOM_PUDDLEACTOR_CART + 1
ACTOR_SPRITZ_ROOM_PILLAR
ACTOR_SPRITZ_ROOM_SECOND_PUDDLE
ACTOR_SPRITZ_ROOM_THIRD_PUDDLE
ACTOR_UNUSED_SPRITZ_ROOM_BOULDERUnused: a round boulder at (520, 632), outside both of the room's camera boxes, so the player never sees it, and no cue names it. The boxes are AltinPeakSpritzEntrances'. One ends at z 568, the one below it at x 384. The boulder stands almost where the junction places its own boulder, (536, 636).
ACTOR_SPRITZThe Mercury Djinni, placed until it has joined.

Definition at line 323 of file altin_peak.c.

anonymous enum

enum { ACTOR_JUNCTION_ROOM_BOULDER }

The junction's boulder.

EnumeratorValueDescription
ACTOR_JUNCTION_ROOM_BOULDERACTOR_FIRST_PLACED

Definition at line 343 of file altin_peak.c.

anonymous enum

enum { ACTOR_FALLING_BOULDER, ACTOR_BOULDER_SHADOW, ACTOR_STANDING_LOG, ACTOR_WALL, … }

The falling-rocks passage: the boulder that falls and its shadow, the log standing upright at the dead end, which topples as the boulder comes down, the wall Force is cast on, and the sign.

EnumeratorValueDescription
ACTOR_FALLING_BOULDERACTOR_FIRST_PLACED
ACTOR_BOULDER_SHADOW
ACTOR_STANDING_LOGSPRITE_LOG_NORTH_SOUTH.
ACTOR_WALLSPRITE_BLANK, at the dead end's wall.
ACTOR_FALLING_ROCK_SIGNThe falling-rock sign, drawn with the sprite of Lalivero's sign and the Kolima Forest floodgate's (SPRITE_SIGNPOST). It is read by searching its metatile, METATILE_BEHAVIOR_ALTIN_PEAK_FALLING_ROCK_SIGN (scAltinPeakReadFallingRockSign).

Definition at line 351 of file altin_peak.c.

anonymous enum

enum { ACTOR_STATUE, ACTOR_STATUE_SHADOW }

The Hydros statue's room: the statue on its dais and its shadow.

EnumeratorValueDescription
ACTOR_STATUEACTOR_FIRST_PLACED
ACTOR_STATUE_SHADOW

Definition at line 366 of file altin_peak.c.

anonymous enum

enum { ACTOR_WEST_EXIT_ROOM_BOULDER, ACTOR_WEST_EXIT_ROOM_PILLAR }

The west exit's room: its boulder and pillar.

EnumeratorValueDescription
ACTOR_WEST_EXIT_ROOM_BOULDERACTOR_FIRST_PLACED
ACTOR_WEST_EXIT_ROOM_PILLAR

Definition at line 373 of file altin_peak.c.

anonymous enum

enum { FLAG_ALTIN_PEAK_PUDDLE_FROZEN, FLAG_ALTIN_PEAK_SECOND_PUDDLE_FROZEN, FLAG_ALTIN_PEAK_THIRD_PUDDLE_FROZEN, FLAG_ALTIN_PEAK_GARET_WATCHING_ROCKS }

The rooms' frozen puddles and Garet at the sign. They are scene temp flags, kept within one visit to a room, across its battles.

EnumeratorValueDescription
FLAG_ALTIN_PEAK_PUDDLE_FROZENFLAG_SCENE_TEMP(0x00)Frost has frozen the
FLAG_ALTIN_PEAK_SECOND_PUDDLE_FROZENFLAG_SCENE_TEMP(0x01)room's first puddle. Frost has frozen the
FLAG_ALTIN_PEAK_THIRD_PUDDLE_FROZENFLAG_SCENE_TEMP(0x04)puddle in the gap of the first water beast's cave, or the second puddle of Spritz's room. Frost has frozen the
FLAG_ALTIN_PEAK_GARET_WATCHING_ROCKSFLAG_SCENE_TEMP(0x05)third puddle of Spritz's room. Garet has come out at the falling-rock sign and struck the wall.

Definition at line 381 of file altin_peak.c.

anonymous enum

enum { QUARTER_PIXEL_SHIFT }

A 16.16 height shifted down to whole quarter pixels.

EnumeratorValueDescription
QUARTER_PIXEL_SHIFT14

Definition at line 561 of file altin_peak.c.

anonymous enum

enum { DRAIN_SINK_PIXELS }

The pixels the water layer sinks in a drain, one every fourth tick.

EnumeratorValueDescription
DRAIN_SINK_PIXELS24

Definition at line 845 of file altin_peak.c.

anonymous enum

enum { CART_COUNTDOWN_TICKS, CART_COUNTDOWN_TURN }

A countdown metatile's ticks: SE_CART_TURN plays with CART_COUNTDOWN_TURN ticks left, from when the cart's slope animation is picked again, and SE_CART_ROLL at the end.

EnumeratorValueDescription
CART_COUNTDOWN_TICKS33
CART_COUNTDOWN_TURN20

Definition at line 2852 of file altin_peak.c.

ALTIN_PEAK_METATILE_BEHAVIOR

enum ALTIN_PEAK_METATILE_BEHAVIOR

The metatile behaviors that mark the mine cart's route, on the overhead layer (map rows 64 and up): its turns, a countdown before a turn, and its stop.

EnumeratorValueDescription
METATILE_BEHAVIOR_ALTIN_PEAK_CART_COUNTDOWN96scAltinPeakStartCartCountdown
METATILE_BEHAVIOR_ALTIN_PEAK_CART_TURN_LEFT97
METATILE_BEHAVIOR_ALTIN_PEAK_CART_TURN_RIGHT98
METATILE_BEHAVIOR_ALTIN_PEAK_CART_STOP99The end of the route, where the leader jumps off.

Definition at line 2916 of file altin_peak.c.

Functions in detail

scAltinPeakRunBoulderChase

static void scAltinPeakRunBoulderChase(Sint32 boulderDelay)

The rockfall in the falling-rocks passage: Isaac looks up at the rumble, a boulder drops beside the toppled log, and he runs down the winding path ahead of it to the clearing at the bottom, where it crashes into the old doorway in a shower of rocks and opens the way down. If Garet struck the wall, he waits at the bottom and comes back to rejoin Isaac.

boulderDelay is the ticks Isaac's start is given over the boulder's. The doorway's metatiles from (43, 35) take the broken ones kept from (25, 35), and FLAG_ALTIN_PEAK_BOULDER_FALLEN keeps them on later visits.

References AltinPeakBoulderPath, AltinPeakLeaderFleePath, fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetScript(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForMove(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptGetFlag(), fdScriptWait(), gmFlagGet(), gmFlagSet(), gmPlayMusic(), scAltinPeakShadowFollowBoulder(), scAltinPeakSpawnDebris(), Sint32, syCloseEvent(), sySetTickEvent(), sySoundPlay() and sySynch().

Referenced by scAltinPeakForceLogOver() and scAltinPeakReadFallingRockSign().

Definition at lines 236 and 1216 of file altin_peak.c.

scAltinPeakRestoreFirstWaterBeastRoom

static void scAltinPeakRestoreFirstWaterBeastRoom(void)

Sets up the first water beast's cave: back from its battle, the Frost Jewel and the drain; before the drain, the beast where it last went; after it, the two puddles, frozen if Frost has frozen them on this visit.

References AltinPeakFaceLeaderScript, fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdEffectUpdateFrostGlint(), fdMapGridCopyMetatileAttributes(), gmFlagGet(), MainRoutineStateWork, scAltinPeakAwardFrostJewelAndDrain(), scAltinPeakStartPaletteAnimation(), scAltinPeakWallOffPuddle() and scFieldActorWatchAndStartScript().

Referenced by scInit().

Definition at lines 237 and 1850 of file altin_peak.c.

scAltinPeakRestoreSecondWaterBeastRoom

static void scAltinPeakRestoreSecondWaterBeastRoom(void)

Sets up the lake room: back from its battle, the drain; before it, the beast spitting water at the lake; and the switch's arrow and the fork as last flipped.

References fdActorSetAnimation(), fdActorSetSpriteColorById(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet(), MainRoutineStateWork, scAltinPeakDrainAfterSecondBeast() and scAltinPeakStartPaletteAnimation().

Referenced by scInit().

Definition at lines 238 and 1954 of file altin_peak.c.

scAltinPeakRestoreSouthEntranceRoom

static void scAltinPeakRestoreSouthEntranceRoom(void)

Sets up the south entrance: its flooded chamber dries with the second drain, and coming in from the Alpine Crossing shows no area name.

References fdMapGridCopyMetatileAttributes(), gmFlagClear(), gmFlagGet() and MainRoutineStateWork.

Referenced by scInit().

Definition at lines 239 and 1997 of file altin_peak.c.

scAltinPeakRestoreThirdWaterBeastRoom

static void scAltinPeakRestoreThirdWaterBeastRoom(void)

Sets up the third water beast's room: back from its battle, the drain; before it, the beast spitting water; the frozen puddle; and the switch.

References fdActorSetAnimation(), fdActorSetSpriteColorById(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet(), MainRoutineStateWork, scAltinPeakDrainAfterThirdBeast(), scAltinPeakDrawUnderParty(), scAltinPeakStartPaletteAnimation() and scAltinPeakWallOffPuddle().

Referenced by scInit().

Definition at lines 240 and 2028 of file altin_peak.c.

scAltinPeakRestorePoolRoom

static void scAltinPeakRestorePoolRoom(void)

Sets up the pool cave: the mine cart waiting at (358, 104) when the party comes back up from the south-west part, the frozen puddle, the pool gone after the third drain, and the switch.

References fdActorGet(), fdActorSetAnimation(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet(), MainRoutineStateWork and scAltinPeakWallOffPuddle().

Referenced by scInit().

Definition at lines 241 and 2077 of file altin_peak.c.

scAltinPeakRestoreSpritzRoom

static void scAltinPeakRestoreSpritzRoom(void)

Sets up Spritz's room: the stone pillar where it stands, the three puddles frozen on this visit, and the switch.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), gmFlagGet(), scAltinPeakDrawUnderParty(), scAltinPeakSettleSpritzRoomPillar(), scAltinPeakUpdateFrostPillarPriority(), scAltinPeakWallOffPuddle() and sySetTickEvent().

Referenced by scInit().

Definition at lines 242 and 2117 of file altin_peak.c.

scAltinPeakRestoreFallingRocksRoom

static void scAltinPeakRestoreFallingRocksRoom(void)

Sets up the falling-rocks passage: the upright log and the sign, and once the boulder has fallen, the log lying toppled and the doorway broken open. Climbing up the ladder from the Hydros statue's room, Isaac comes up out of the hole.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork and sySynch().

Referenced by scInit().

Definition at lines 243 and 2166 of file altin_peak.c.

scAltinPeakRestoreHydrosStatueRoom

static void scAltinPeakRestoreHydrosStatueRoom(void)

Sets up the Hydros statue's room: the statue stands on its dais until it is beaten, and back from its battle the party talks it over.

References fdActorGet(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdScriptEnd(), fdScriptStart(), gmFlagGet(), MainRoutineStateWork, scAltinPeakCelebrateHydrosVictory() and Sint32.

Referenced by scInit().

Definition at lines 244 and 2210 of file altin_peak.c.

scAltinPeakRestoreWestExitRoom

static void scAltinPeakRestoreWestExitRoom(void)

Sets up the west exit: coming back out of the Vial's chest room, the stone pillar stands a metatile west of its first place, at (184, 328).

References fdActorGet(), fdActorSetSpriteFlags() and MainRoutineStateWork.

Referenced by scInit().

Definition at lines 245 and 2253 of file altin_peak.c.

scAltinPeakStartSpittingFX

static void scAltinPeakStartSpittingFX(FIXED x, FIXED y, FIXED z, Sint32 facing)

A water beast starts spitting water from (x, y, z), in 16.16 fixed point, toward facing (FACING_EAST or FACING_WEST), with its sound (SE_AMBIENT_WATER).

References AltinPeakSpitDirection, AltinPeakSpitOrigin, fdQueueMusic(), scAltinPeakSpawnSpit(), Sint32 and sySetTickEvent().

Definition at lines 246 and 2346 of file altin_peak.c.

scAltinPeakSpawnDebris

static void scAltinPeakSpawnDebris(void)

While the boulder crashes into the doorway, a piece of rock of random size flies up from the crash every third tick and falls, and a crash or a clatter sounds every ninth.

References AltinPeakDebrisScript, fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), scFieldActorCreate(), sySoundPlay() and TickCount.

Referenced by scAltinPeakRunBoulderChase().

Definition at lines 251 and 2358 of file altin_peak.c.

fdEffectUpdateFrostGlint

static void fdEffectUpdateFrostGlint(ACTOR *actor)

Makes the frozen puddle glint (frost_glint.h).

Referenced by fdPsynergyFrost() and scAltinPeakRestoreFirstWaterBeastRoom().

Definition at line 253 of file altin_peak.c.

scAltinPeakBeastFreezesSecondPuddle

static void scAltinPeakBeastFreezesSecondPuddle(void)

The first water beast casts Frost on the puddle in the gap of its cave, the screen turning red as when the party casts it, and the puddle freezes into an ice pillar.

The beast's colours are set back to its green and blue swapped after each step of the cast.

References fdActorSetSpriteColorById(), fdPsynergyEnd(), fdPsynergyLoadResources(), fdPsynergyRunHandler(), fdPsynergySetupActorPair(), fdPsynergyStartCast(), fdPsynergyStopCasterUpdate() and sySoundPlay().

Referenced by scAltinPeakShowFirstBeastRoute().

Definition at lines 254 and 2406 of file altin_peak.c.

scAltinPeakAwardFrostJewelAndDrain

static void scAltinPeakAwardFrostJewelAndDrain(void)

Back from the first water beast's battle, on the west ledge where it last stood: the beast is gone, "Isaac got the Frost Jewel.", and the view moves over the cave as the water drains away (scAltinPeakDrainFirstWater).

References AltinPeakFirstWaterBeastCuesDrained, fdActorGet(), fdCameraGetActor(), fdCameraMoveToFX(), fdCameraWaitForMove(), fdScriptEnd(), fdScriptSetCues(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmItemShowFound(), gmPartyGiveItem() and scAltinPeakDrainFirstWater().

Referenced by scAltinPeakRestoreFirstWaterBeastRoom().

Definition at lines 255 and 2425 of file altin_peak.c.

scAltinPeakDrainAfterSecondBeast

static void scAltinPeakDrainAfterSecondBeast(void)

Back from the second water beast's battle: the beast is gone, the mine cart waits where its ride ended, at (328, 424), the switch is back in its first position, and the water drains (scAltinPeakDrainSecondWater).

References fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), gmFlagSet(), scAltinPeakDrainSecondWater(), scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles() and sySynch().

Referenced by scAltinPeakRestoreSecondWaterBeastRoom().

Definition at lines 256 and 2457 of file altin_peak.c.

scAltinPeakDrainAfterThirdBeast

static void scAltinPeakDrainAfterThirdBeast(void)

Back from the third water beast's battle, the same way: the beast is gone, the cart waits at (488, 138), the switch is back in its first position, and the last water drains (scAltinPeakDrainThirdWater).

References fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), gmFlagSet(), scAltinPeakDrainThirdWater(), scAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles() and sySynch().

Referenced by scAltinPeakRestoreThirdWaterBeastRoom().

Definition at lines 257 and 2479 of file altin_peak.c.

scAltinPeakCelebrateHydrosVictory

static void scAltinPeakCelebrateHydrosVictory(void)

Back from the Hydros Statue's battle, Garet, Ivan and Mia step out beside Isaac on the dais. "We did it, Isaac! We beat the last water beast!" Ivan wonders why Altin's guardian statues turned into monsters, and Mia says they were made long, long ago. The statue flashes white and sinks into the floor, Ivan spots a treasure chest behind it, and Garet says they should check it.

References AltinPeakGaretScript, AltinPeakIvanScript, AltinPeakMiaScript, AltinPeakRejoinScript, AltinPeakStatueSinkScript, fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetPosFX(), fdActorSetScript(), fdActorSetSpriteColorById(), fdActorShowEmote(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptSkipMessages(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagClear(), gmFlagSet(), scAltinPeakFlickerStatue(), Sint32, state, syCloseEvent(), sySetTickEvent() and sySoundPlay().

Referenced by scAltinPeakRestoreHydrosStatueRoom().

Definition at lines 258 and 2560 of file altin_peak.c.

scAltinPeakUpdateFrostPillarPriority

static void scAltinPeakUpdateFrostPillarPriority(void)

In Spritz's room, while Isaac stands higher than 48 pixels, the ice pillar of the north-west puddle is drawn under the party and the one north of the rails further back.

References fdActorGet() and fdActorSetSpritePriority().

Referenced by scAltinPeakRestoreSpritzRoom().

Definition at lines 259 and 2708 of file altin_peak.c.

scAltinPeakWallOffPuddle

static void scAltinPeakWallOffPuddle(Sint32 actorId)

Lets the party pass through a puddle's actor and makes its map metatile a wall instead, until Frost gives the metatile a hop square.

References fdActorGet(), fdMapGridSetMetatileBehaviorAt() and Sint32.

Referenced by scAltinPeakRestoreFirstWaterBeastRoom(), scAltinPeakRestorePoolRoom(), scAltinPeakRestoreSpritzRoom() and scAltinPeakRestoreThirdWaterBeastRoom().

Definition at lines 260 and 2724 of file altin_peak.c.

scAltinPeakRollCart

static void scAltinPeakRollCart(Sint32 id, Sint32 heading)

Rolls the mine cart Isaac rides, the view following it, from where it stands along the rails until its stop.

heading is the way it sets off, or -1 for the way it faces; if no rail leads that way, the next quarter turns are tried. Each tick it reads the route's metatile under it (ALTIN_PEAK_METATILE_BEHAVIOR) and rolls faster downhill (AltinPeakCartSpeeds).

References fdActorGet(), fdActorLookup(), fdActorWaitForMove(), fdCameraFollowActor(), fdCameraWaitForMove(), fdMapGridGetMetatileBehaviorAt(), fdMapGridGetTerrainHeight(), fdScriptEnd(), fdScriptStart(), fdSpriteAddAnimation(), MainRoutineStateWork, scAltinPeakAdvanceCart(), scAltinPeakStartCartCountdown(), scAltinPeakStopCartAndJumpOff(), scAltinPeakTurnCartLeft(), scAltinPeakTurnCartRight(), scFieldActorSetMoveTargetFX(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakRideCart().

Definition at lines 261 and 2933 of file altin_peak.c.

scAltinPeakStartPaletteAnimation

static void scAltinPeakStartPaletteAnimation(void)

Starts the water's palette cycle.

References AltinPeakPaletteHold, AltinPeakPaletteStep, scAltinPeakStepPaletteAnimation() and sySetTickEvent().

Referenced by scAltinPeakRestoreFirstWaterBeastRoom(), scAltinPeakRestoreSecondWaterBeastRoom() and scAltinPeakRestoreThirdWaterBeastRoom().

Definition at lines 262 and 3036 of file altin_peak.c.

scAltinPeakTalkToDjinni

static void scAltinPeakTalkToDjinni(void)

Talking to Spritz, the Mercury Djinni waiting in its big room of the mine, starts its battle; beaten, it joins the party.

References fdRequestDjinnBattle().

Referenced by AltinPeakSpritzCues.

Definition at line 404 of file altin_peak.c.

scAltinPeakShadowFollowBoulder

static UNREAD_RESULT scAltinPeakShadowFollowBoulder(ACTOR *follower)

The falling boulder's shadow keeps under it, on the ground 12 pixels down, while the boulder bounces.

References fdActorGet().

Referenced by scAltinPeakRunBoulderChase().

Definition at line 413 of file altin_peak.c.

scAltinPeakFlyDebris

static Sint32 scAltinPeakFlyDebris(ACTOR *actor)

Each tick of a piece of the crash's debris: it flies by its velocity and drops under its gravity, swelling by its z velocity as though it flew toward the screen.

References Sint32.

Referenced by AltinPeakDebrisScript.

Definition at line 428 of file altin_peak.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References AltinPeakEntrancesOther, AltinPeakFallingRocksEntrances, AltinPeakFirstWaterBeastEntrances, AltinPeakHydrosStatueEntrances, AltinPeakJunctionEntrances, AltinPeakPoolEntrances, AltinPeakRailTunnelEntrances, AltinPeakSecondWaterBeastEntrances, AltinPeakSouthEntranceEntrances, AltinPeakSpritzEntrances, AltinPeakThirdWaterBeastEntrances, AltinPeakWestExitEntrances and MainRoutineStateWork.

Definition at line 443 of file altin_peak.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

The falling-rocks passage and the Hydros statue's room have exit regions, round the ladder between them.

References AltinPeakFallingRocksRegions, AltinPeakHydrosStatueRegions and MainRoutineStateWork.

Definition at line 496 of file altin_peak.c.

scGetExits

const Uint32 *scGetExits(void)

All the rooms share one exit table.

References AltinPeakExits.

Definition at line 512 of file altin_peak.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References AltinPeakActorPlacementsOther, AltinPeakFallingRocksActorPlacements, AltinPeakFirstWaterBeastActorPlacements, AltinPeakHydrosStatueActorPlacements, AltinPeakJunctionActorPlacements, AltinPeakPoolActorPlacements, AltinPeakSecondWaterBeastActorPlacements, AltinPeakSpritzActorPlacements, AltinPeakThirdWaterBeastActorPlacements, AltinPeakWestExitActorPlacements and MainRoutineStateWork.

Definition at line 517 of file altin_peak.c.

scAltinPeakRideCart

static void scAltinPeakRideCart(Sint32 cartId)

Isaac jumps into a mine cart when he talks to it, and it rolls him along the rails until the end of its line, where he jumps out to the south.

The ride itself is scAltinPeakRollCart; its turns are metatiles of the map, so a switch changes where it goes.

References fdActorGet(), fdActorSetAnimation(), fdActorWaitForMoveById(), fdEndBusyAndReveal(), fdPlayQueuedMusic(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), scAltinPeakRollCart(), scFieldActorSetMoveTargetFX(), Sint32, sySoundPlay() and sySynch().

Referenced by AltinPeakPoolCues, AltinPeakSecondWaterBeastCues, AltinPeakSpritzCues and AltinPeakThirdWaterBeastCues.

Definition at line 571 of file altin_peak.c.

scAltinPeakFightFirstWaterBeast

static void scAltinPeakFightFirstWaterBeast(void)

Talking to the first water beast, or reading its mind, starts its battle (a Living Statue), wherever it stands in its cave.

References fdRequestBattleFromEncounterTable() and fdScriptSetAfterBattleDestination().

Referenced by AltinPeakFirstWaterBeastCues.

Definition at line 612 of file altin_peak.c.

scAltinPeakFightSecondWaterBeast

static void scAltinPeakFightSecondWaterBeast(void)

Talking to the second water beast at the lake, or reading its mind, starts its battle, as the first one's does.

References fdRequestBattleFromEncounterTable() and fdScriptSetAfterBattleDestination().

Referenced by AltinPeakSecondWaterBeastCues.

Definition at line 624 of file altin_peak.c.

scAltinPeakFightThirdWaterBeast

static void scAltinPeakFightThirdWaterBeast(void)

Talking to the third water beast, or reading its mind, starts its battle, as the first one's does.

References fdRequestBattleFromEncounterTable() and fdScriptSetAfterBattleDestination().

Referenced by AltinPeakThirdWaterBeastCues.

Definition at line 636 of file altin_peak.c.

scAltinPeakSettleSpritzRoomPillar

static void scAltinPeakSettleSpritzRoomPillar(void)

Move on the stone pillar in Spritz's room, in the channel below the ladder (first at metatile (25, 26)), slides it a metatile, and its top becomes a square Isaac can hop onto, a step of the path he makes there with the frozen puddle beside it.

The field's Move slides the pillar; this script runs after it, and the room's setup and scAltinPeakPushSpritzRoomPillar call it too. It puts back the floor of both metatiles the pillar can stand on, then gives the one it stands on the hop square kept at metatile (0, 0).

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), Sint32 and sySynch().

Referenced by AltinPeakSpritzCues, scAltinPeakPushSpritzRoomPillar() and scAltinPeakRestoreSpritzRoom().

Definition at line 655 of file altin_peak.c.

scAltinPeakFreezeFirstWaterBeastRoomPuddle

static void scAltinPeakFreezeFirstWaterBeastRoomPuddle(void)

Frost on the puddle by the west ladder of the first water beast's cave (metatile (9, 13)), which appears when the water drains, freezes it into an ice pillar against the ledge, whose top Isaac can hop onto.

The puddle's metatile takes the hop square kept at metatile (7, 13), and the pillar is raised 32 pixels and drawn under the party.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakFirstWaterBeastCuesDrained.

Definition at line 686 of file altin_peak.c.

scAltinPeakFreezeFirstWaterBeastRoomSecondPuddle

static void scAltinPeakFreezeFirstWaterBeastRoomSecondPuddle(void)

Frost on the puddle in the gap between the two ledges of the first water beast's cave (metatiles (17, 13) to (19, 13)) freezes it into an ice pillar in the gap again, after the drain has taken the beast's own ice away.

The three metatiles of the gap take the ones kept at metatiles (29, 1) to (31, 1), a hop square between two plain metatiles, and the ice is left to fall to the gap's floor.

References fdActorGet(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakFirstWaterBeastCuesDrained.

Definition at line 708 of file altin_peak.c.

scAltinPeakFreezeSpritzRoomPuddle

static void scAltinPeakFreezeSpritzRoomPuddle(void)

Frost on the puddle beside the stone pillar in Spritz's room (metatile (26, 26)) freezes it into an ice pillar whose top Isaac can hop onto, the rest of the path across the channel below the ladder.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakSpritzCues.

Definition at line 724 of file altin_peak.c.

scAltinPeakFreezeThirdWaterBeastRoomPuddle

static void scAltinPeakFreezeThirdWaterBeastRoomPuddle(void)

Frost on the puddle in the middle of the third water beast's room (metatile (25, 13)), in the low channel between the ledges, freezes it into an ice pillar whose top Isaac can hop onto.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakThirdWaterBeastCues.

Definition at line 742 of file altin_peak.c.

scAltinPeakFreezePoolRoomPuddle

static void scAltinPeakFreezePoolRoomPuddle(void)

Frost on the puddle on the way to the third water beast's room, in the pool cave's south-east part (metatile (43, 41)), freezes it into an ice pillar whose top Isaac can hop onto.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakPoolCues.

Definition at line 760 of file altin_peak.c.

scAltinPeakFreezeSpritzRoomSecondPuddle

static void scAltinPeakFreezeSpritzRoomSecondPuddle(void)

Frost on the puddle between the two torches in the north-west of Spritz's room (metatile (17, 10)) freezes it into an ice pillar whose top Isaac can hop onto, on the way out of the room.

Its metatile takes the hop square kept at metatile (1, 0), of another ground shape than the one the first puddle takes at metatile (0, 0).

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakSpritzCues.

Definition at line 781 of file altin_peak.c.

scAltinPeakFreezeSpritzRoomThirdPuddle

static void scAltinPeakFreezeSpritzRoomThirdPuddle(void)

Frost on the puddle north of the rails at the top of the ladder in Spritz's room (metatile (26, 15)) freezes it into an ice pillar whose top Isaac can hop onto.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().

Referenced by AltinPeakSpritzCues.

Definition at line 799 of file altin_peak.c.

scAltinPeakFlickerWaterOut

static void scAltinPeakFlickerWaterOut(void)

HBlank handler while the water layer vanishes: a line shows the water while a random number below 100 reaches the timer, so ever fewer lines show it.

References AltinPeakFlickerTimer.

Referenced by scAltinPeakFlickerWaterAway().

Definition at line 816 of file altin_peak.c.

scAltinPeakFlickerWaterAway

static inline void scAltinPeakFlickerWaterAway(void)

Flickers the water away while the timer counts to 100, then lets the screen settle; every drain ends this way.

References AltinPeakFlickerTimer, fdScriptWait(), scAltinPeakFlickerWaterOut(), syIntFunction(), sySoundPlay() and sySynch().

Referenced by scAltinPeakDrainFirstWater(), scAltinPeakDrainSecondWater() and scAltinPeakDrainThirdWater().

Definition at line 829 of file altin_peak.c.

scAltinPeakDrainFirstWater

static void scAltinPeakDrainFirstWater(void)

The first drain, after the Frost Jewel is found: with a rumble the water of the first water beast's cave sinks, flickers and is gone, and a new puddle grows by the west ladder as it goes.

The water is the overhead map layer, scrolled down a pixel at a time; the two metatiles under the west ladder (3, 14) and (3, 15) then take their dry form from metatile (0, 0).

References AltinPeakPuddleGrowScript, fdActorGet(), fdActorSetScript(), fdMapGridCopyMetatileAttributes(), fdScriptWait(), gmFlagSet(), scAltinPeakFlickerWaterAway(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakAwardFrostJewelAndDrain().

Definition at line 857 of file altin_peak.c.

scAltinPeakDrainSecondWater

static void scAltinPeakDrainSecondWater(void)

The second drain, after the beast at the lake: the water sinks and flickers away in the same way.

The metatiles (77, 28) to (92, 31) take the pictures kept at (93, 41) while the water goes, and their dry form, kept at (77, 41), once it has gone.

References fdMapGridCopyMetatiles(), fdScriptWait(), gmFlagSet(), scAltinPeakFlickerWaterAway(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakDrainAfterSecondBeast().

Definition at line 892 of file altin_peak.c.

scAltinPeakDrainThirdWater

static void scAltinPeakDrainThirdWater(void)

The third drain, after the third beast: the same sinking and flicker, which empties the last of the mine's water.

The metatiles round (103, 17) take the pictures kept at (111, 31) and nearby while the water goes, and their dry form, kept at (103, 14), once it has gone.

References fdMapGridCopyMetatilesTo(), fdScriptWait(), gmFlagSet(), scAltinPeakFlickerWaterAway(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakDrainAfterThirdBeast().

Definition at line 919 of file altin_peak.c.

scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles

static void scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles(void)

Turns the arrow of the lake room's switch to point the other way and sends the mine cart down the other branch of the fork below it.

The arrow is the pair of metatiles (24, 11) and (24, 12), redrawn from metatiles (0, 1) or (2, 1). The fork's turn is the cart route's metatile (24, 16) on the overhead layer (row 80 of the grid), set to turn right or left from metatile (0, 0) or (2, 0) (METATILE_BEHAVIOR_ALTIN_PEAK_CART_TURN_RIGHT or _LEFT).

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptGetFlag(), gmFlagClear() and gmFlagSet().

Referenced by scAltinPeakDrainAfterSecondBeast() and scAltinPeakFlipSecondWaterBeastRoomSwitch().

Definition at line 950 of file altin_peak.c.

scAltinPeakFlipSecondWaterBeastRoomSwitch

static void scAltinPeakFlipSecondWaterBeastRoomSwitch(void)

Searching the switch by the torch in the lake room (metatile (24, 13)) flips it: "Isaac flipped the switch." Its red arrow, first pointing west over the fork below it, turns east, and the mine cart takes the other branch.

The way to the second beast is to point the arrow east and then ride the cart.

References fdPlayQueuedMusic(), fdScriptEnd(), fdScriptStart(), mnFieldMessageShow(), scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles(), sySoundPlay() and sySynch().

Referenced by AltinPeakSecondWaterBeastCues.

Definition at line 972 of file altin_peak.c.

scAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles

static void scAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles(void)

Turns the arrow of the third water beast's room's switch and the fork's turn, as scAltinPeakToggleSecondWaterBeastRoomSwitchMetatiles does.

The arrow is metatiles (11, 4) and (11, 5), redrawn from (48, 32) or (49, 32), and the turn is the route's metatile (11, 9) (row 73), from (12, 72) or (10, 72).

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdScriptGetFlag(), gmFlagClear() and gmFlagSet().

Referenced by scAltinPeakDrainAfterThirdBeast() and scAltinPeakFlipThirdWaterBeastRoomSwitch().

Definition at line 989 of file altin_peak.c.

scAltinPeakFlipThirdWaterBeastRoomSwitch

static void scAltinPeakFlipThirdWaterBeastRoomSwitch(void)

Searching the switch on the small ledge by the torch at the top of the third water beast's room (metatile (11, 7)) flips it: "Isaac flipped the switch." Its red arrow over the fork below turns from west to east, or back, and the mine cart takes the other branch.

References fdPlayQueuedMusic(), fdScriptEnd(), fdScriptStart(), mnFieldMessageShow(), scAltinPeakToggleThirdWaterBeastRoomSwitchMetatiles(), sySoundPlay() and sySynch().

Referenced by AltinPeakThirdWaterBeastCues.

Definition at line 1009 of file altin_peak.c.

scAltinPeakFlipPoolRoomSwitch

static void scAltinPeakFlipPoolRoomSwitch(void)

Searching the switch below the fork in the north of the pool cave (metatile (16, 31)) flips it: "Isaac flipped the switch." Its red arrow turns from east to west, or back, and the mine cart takes the other branch.

The arrow is metatiles (16, 28) and (16, 29), redrawn from (46, 29) or (47, 29), and the turn is the route's metatile (16, 28) (row 92), from (17, 93) or (15, 93).

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdPlayQueuedMusic(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagClear(), gmFlagSet(), mnFieldMessageShow(), sySoundPlay() and sySynch().

Referenced by AltinPeakPoolCues.

Definition at line 1027 of file altin_peak.c.

scAltinPeakFlipSpritzRoomSwitch

static void scAltinPeakFlipSpritzRoomSwitch(void)

Searching the switch east of the ladder's top in Spritz's room (metatile (29, 20)) flips it: "Isaac flipped the switch." Its red arrow by the fork turns from east to west, or back, and the mine cart takes the other branch.

The arrow is metatiles (29, 17) and (29, 18), redrawn from (46, 28) or (47, 28), and the turn is the route's metatile (29, 17) (row 81), from (30, 82) or (28, 82).

References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdPlayQueuedMusic(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagClear(), gmFlagSet(), mnFieldMessageShow(), sySoundPlay() and sySynch().

Referenced by AltinPeakSpritzCues.

Definition at line 1056 of file altin_peak.c.

scAltinPeakPlacePillarUnderLeader

static void scAltinPeakPlacePillarUnderLeader(void)

Nothing visible happens when Isaac steps onto the top of the ladder down to the stone pillar in Spritz's room (metatiles (25, 18) to (27, 19)); the game only has the pillar drawn beneath him while he is up there.

It sets the pillar's ACTOR_PRIORITY_UNDERFOOT; scAltinPeakRestorePillarAutomaticPriority clears it at the ladder's foot.

References fdActorGet().

Referenced by AltinPeakSpritzCues.

Definition at line 1084 of file altin_peak.c.

scAltinPeakRestorePillarAutomaticPriority

static void scAltinPeakRestorePillarAutomaticPriority(void)

Nothing visible happens when Isaac steps onto the foot of the ladder down to the stone pillar in Spritz's room (metatiles (25, 20) to (27, 21)); the game draws the pillar in front of or behind him by where each stands again, as before he climbed up.

References fdActorGet().

Referenced by AltinPeakSpritzCues.

Definition at line 1094 of file altin_peak.c.

scAltinPeakPushSpritzRoomPillar

static void scAltinPeakPushSpritzRoomPillar(void)

Walking east into the stone pillar in Spritz's room from metatile (23, 26), after Move has slid it a metatile west, pushes it back with a scrape to where it first stood, Isaac following behind it.

Its metatiles are then set as after Move (scAltinPeakSettleSpritzRoomPillar).

References fdActorGet(), fdActorSetAnimation(), fdActorSetDestination(), fdActorWaitForMoveById(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), scAltinPeakSettleSpritzRoomPillar() and sySoundPlay().

Referenced by AltinPeakSpritzCues.

Definition at line 1105 of file altin_peak.c.

scAltinPeakForceLogOver

static void scAltinPeakForceLogOver(void)

Force on the wall at the dead end of the falling-rocks passage, past the sign, sends the upright log standing there rocking and toppling over, and a boulder drops and chases Isaac down the winding path.

The Force row is on the blank actor at the wall, and needs the boulder not to have fallen yet. The log is rocked to each side and then falls with its sprite turning, before scAltinPeakRunBoulderChase.

References fdActorGet(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), scAltinPeakRunBoulderChase(), syCos(), sySin(), sySoundPlay() and sySynch().

Referenced by AltinPeakFallingRocksCues.

Definition at line 1129 of file altin_peak.c.

scAltinPeakReadFallingRockSign

static void scAltinPeakReadFallingRockSign(void)

Reading the sign at the dead end of the falling-rocks passage (metatile (49, 6)) says "Watch for falling rocks! Do not strike the wall! Rocks may fall!". Without the Orb of Force, Garet then steps out: "Tch! We came this deep into the mine just to find a dead end!" He strikes the wall, the cave rumbles, and he shouts "...I have a bad feeling about this. Run, Isaac! Now!" and runs off down the path before the boulder comes.

Once the boulder has fallen, or with the Orb of Force, the sign is only read, and Force on the wall brings the rockfall (scAltinPeakForceLogOver).

References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorMoveToAndWait(), fdActorSetAnimation(), fdActorSetPosFX(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), mnFieldMessageShow(), scAltinPeakRunBoulderChase(), Sint32 and sySoundPlay().

Referenced by AltinPeakFallingRocksCues.

Definition at line 1375 of file altin_peak.c.

scGetCues

const CUE *scGetCues(void)

The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen.

References AltinPeakCuesOther, AltinPeakFallingRocksCues, AltinPeakFirstWaterBeastCues, AltinPeakFirstWaterBeastCuesDrained, AltinPeakHydrosStatueCues, AltinPeakJunctionCues, AltinPeakPoolCues, AltinPeakRailTunnelCues, AltinPeakSecondWaterBeastCues, AltinPeakSouthEntranceCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltinPeakWestExitCues, gmFlagGet() and MainRoutineStateWork.

Definition at line 1459 of file altin_peak.c.

scAltinPeakUpdateBeastHops

static void scAltinPeakUpdateBeastHops(ACTOR *updated)

A water beast's update function while it hops along a route: it leaps every WATER_BEAST_HOP_PERIOD ticks with SE_JUMP, and lands with a splash (SE_SPLASH) that shakes the screen for a few ticks. Altin's scAltinBeastHop is the same hop in that scene's overlay, its landing shaking the screen up and down where this one shakes it sideways.

References fdActorSelectAnimation() and sySoundPlay().

Referenced by scAltinPeakFirstBeastHopsAway() and scAltinPeakShowFirstBeastRoute().

Definition at line 1529 of file altin_peak.c.

scAltinPeakPlayLandingShake

static inline void scAltinPeakPlayLandingShake(Sint32 amplitude, Sint32 holdTicks)

The beast lands with a splash, shaking the screen by amplitude pixels for holdTicks.

References fdMapGridSetShakeFX(), fdScriptWait(), Sint32 and sySoundPlay().

Referenced by scAltinPeakFirstBeastHopsAway() and scAltinPeakShowFirstBeastRoute().

Definition at line 1576 of file altin_peak.c.

scAltinPeakShowFirstBeastRoute

static void scAltinPeakShowFirstBeastRoute(void)

Walking up the passage to the water beast in its cave (metatiles (17, 24) to (19, 24)) makes it show the way: it cries out, hops north into the cave to the gap between the two ledges, freezes the puddle in the gap with Frost, hops round by the east ledge and across the ice to the west ledge, and cries again.

It happens once (FLAG_ALTIN_PEAK_FIRST_BEAST_CROSSED_GAP). The beast then keeps turning to face Isaac. The ice stays a square to hop on, at metatile (18, 13), so Isaac can follow it across.

References AltinPeakFaceLeaderScript, fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdCameraMoveWithinMapBounds(), fdCameraWaitForMove(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scAltinPeakBeastFreezesSecondPuddle(), scAltinPeakPlayLandingShake(), scAltinPeakUpdateBeastHops(), scFieldActorWatchAndStartScript() and sySoundPlay().

Referenced by AltinPeakFirstWaterBeastCues.

Definition at line 1594 of file altin_peak.c.

scAltinPeakFirstBeastHopsAway

static void scAltinPeakFirstBeastHopsAway(void)

When Isaac reaches the east ledge at the edge of the gap (metatiles (21, 13) and (21, 14)), the water beast across the ice cries out, hops away to the west end of its ledge and settles there to spit water east.

It happens once (FLAG_ALTIN_PEAK_FIRST_BEAST_HOPPED_AWAY), and the beast spits there until its battle. The view stays on it for one to two seconds, less if a button is pressed, before going back to Isaac.

References fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdActorStop(), fdCameraMoveWithinMapBounds(), fdCameraWaitForMove(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), PerPush, scAltinPeakPlayLandingShake(), scAltinPeakUpdateBeastHops() and sySoundPlay().

Referenced by AltinPeakFirstWaterBeastCues.

Definition at line 1720 of file altin_peak.c.

scInit

Sint32 scInit(void)

Sets up the room being entered, with what the party has done there put back and its water as low as the drains have left it.

References MainRoutineStateWork, scAltinPeakRestoreFallingRocksRoom(), scAltinPeakRestoreFirstWaterBeastRoom(), scAltinPeakRestoreHydrosStatueRoom(), scAltinPeakRestorePoolRoom(), scAltinPeakRestoreSecondWaterBeastRoom(), scAltinPeakRestoreSouthEntranceRoom(), scAltinPeakRestoreSpritzRoom(), scAltinPeakRestoreThirdWaterBeastRoom(), scAltinPeakRestoreWestExitRoom() and Sint32.

Definition at line 1804 of file altin_peak.c.

scAltinPeakDrawUnderParty

static inline void scAltinPeakDrawUnderParty(Sint32 actorId)

Draws an actor under the party, as a frozen puddle's ice pillar is once Isaac can stand on it.

References fdActorGet() and Sint32.

Referenced by scAltinPeakRestoreSpritzRoom() and scAltinPeakRestoreThirdWaterBeastRoom().

Definition at line 2019 of file altin_peak.c.

scAltinPeakInitSpit

static void scAltinPeakInitSpit(ACTOR *spit)

Gives a new drop of spit its look. It stands still, on sprite priority 1 and at 0.3 scale.

References fdActorSetSpriteColor() and fdActorSetSpriteFlags().

Referenced by scAltinPeakSpawnSpit().

Definition at line 2264 of file altin_peak.c.

scAltinPeakDriftSpit

static void scAltinPeakDriftSpit(ACTOR *spit)

A drop of spit's update function: it drifts the way the beast spits, slowing as it goes, with a random wobble, and moves down the screen as it grows; in its last few ticks it spreads flat and shoots on half a pixel a tick. It flashes white the more often the nearer its end, and is released after its countdown.

References AltinPeakSpitDirection, fdActorRelease(), fdActorSetSpriteColor() and Sint32.

Referenced by scAltinPeakSpawnSpit().

Definition at line 2279 of file altin_peak.c.

scAltinPeakSpawnSpit

static void scAltinPeakSpawnSpit(void)

While a beast spits, a drop of spit starts from its spout every fourth tick and lives 20 ticks.

References AltinPeakSpitOrigin, fdActorCreate(), fdActorSelectAnimation(), scAltinPeakDriftSpit(), scAltinPeakInitSpit() and TickCount.

Referenced by scAltinPeakStartSpittingFX().

Definition at line 2320 of file altin_peak.c.

static

DEFINE_FROST_GLINT(static, fdActorSetSpriteColor)

The glint of the ice the first beast leaves in the gap of its cave.

Definition at line 2398 of file altin_peak.c.

scAltinPeakPlayHydrosRumble

static void scAltinPeakPlayHydrosRumble(void)

While the Hydros Statue wakes, the floor rumbles (SE_STONE_RUMBLE) once a second.

References AltinPeakRumbleTicks and sySoundPlay().

Referenced by scAltinPeakStartHydrosBattle().

Definition at line 2500 of file altin_peak.c.

scAltinPeakStartHydrosBattle

static void scAltinPeakStartHydrosBattle(void)

Climbing the steps onto the dais before the guardian statue in the ruins' room (metatiles (19, 7) to (21, 7)) wakes the Hydros Statue: Isaac walks up to it, it roars and slides toward him with the floor rumbling, and its battle starts.

References fdActorSetAnimation(), fdActorSetDestination(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkToAndWait(), fdRequestBattleFromEncounterTable(), fdScriptSetAfterBattleDestination(), fdScriptStart(), fdScriptWait(), scAltinPeakPlayHydrosRumble(), sySetTickEvent() and sySoundPlay().

Referenced by AltinPeakHydrosStatueCues.

Definition at line 2514 of file altin_peak.c.

scAltinPeakFlickerStatue

static void scAltinPeakFlickerStatue(void)

As the Hydros Statue sinks it flickers, white and grey by turns, two ticks each.

References fdActorSetSpriteColorById() and TickCount.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at line 2543 of file altin_peak.c.

scAltinPeakRequestPsynergy

static void scAltinPeakRequestPsynergy(void)

Unused: asks the field to have Felix use Frost. Nothing calls it.

Definition at line 2698 of file altin_peak.c.

scAltinPeakStopCartAndJumpOff

static void scAltinPeakStopCartAndJumpOff(ACTOR *actor)

The mine cart reaches the end of its line with a crunch: it settles in the middle of its metatile and Isaac jumps out of it to the south.

References fdActorLookup(), fdActorSelectAnimation(), fdActorWaitForMove(), fdSpriteAnimationClear(), MainRoutineStateWork, scFieldActorSetMoveTargetFX(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakRollCart().

Definition at line 2737 of file altin_peak.c.

scAltinPeakUnusedNoOperation

static void scAltinPeakUnusedNoOperation(void)

Unused: does nothing, and nothing calls it.

Definition at line 2783 of file altin_peak.c.

scAltinPeakTurnCartRight

static void scAltinPeakTurnCartRight(ACTOR *actor)

The cart turns a quarter turn right around the corner it reaches.

References fdActorSelectAnimation(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakRollCart().

Definition at line 2788 of file altin_peak.c.

scAltinPeakTurnCartLeft

static void scAltinPeakTurnCartLeft(ACTOR *actor)

The cart turns a quarter turn left.

References fdActorSelectAnimation(), Sint32, sySoundPlay() and sySynch().

Referenced by scAltinPeakRollCart().

Definition at line 2819 of file altin_peak.c.

scAltinPeakStartCartCountdown

static void scAltinPeakStartCartCountdown(ACTOR *actor)

The cart rolls over a countdown metatile. SE_STOP_ACTION_SE plays, and SE_CART_TURN and SE_CART_ROLL follow as its countdown runs out.

References sySoundPlay().

Referenced by scAltinPeakRollCart().

Definition at line 2860 of file altin_peak.c.

scAltinPeakAdvanceCart

static void scAltinPeakAdvanceCart(ACTOR *actor)

Rolls the cart on by a tick and picks its animation from the terrain ahead of and behind it: flat, uphill or downhill.

References AltinPeakCartSpeeds, fdActorSelectAnimation(), fdMapGridGetTerrainHeight(), scFieldVectorAddPolarOffsetFX(), Sint32, syMulFX() and sySoundPlay().

Referenced by scAltinPeakRollCart().

Definition at line 2868 of file altin_peak.c.

scAltinPeakStepPaletteAnimation

static void scAltinPeakStepPaletteAnimation(void)

Each tick of the water's colour cycle, through AltinPeakPaletteScript.

References AltinPeakPaletteHold, AltinPeakPaletteScript, AltinPeakPaletteStep, Sint32 and syDMAXCopy().

Referenced by scAltinPeakStartPaletteAnimation().

Definition at line 3008 of file altin_peak.c.

Variables in detail

AltinPeakFlickerTimer

Uint16 AltinPeakFlickerTimer

How far a drain's flicker has gone, 0 to 100: the chance in a hundred that a screen line no longer shows the water (scAltinPeakFlickerWaterAway).

Referenced by scAltinPeakFlickerWaterAway() and scAltinPeakFlickerWaterOut().

Definition at line 76 of file altin_peak.c.

AltinPeakSpitDirection

Sint32 AltinPeakSpitDirection

The spit's direction, FACING_EAST or FACING_WEST.

References Sint32.

Referenced by scAltinPeakDriftSpit() and scAltinPeakStartSpittingFX().

Definition at line 78 of file altin_peak.c.

AltinPeakSpitOrigin

Sint32 AltinPeakSpitOrigin[3]

Where a beast's spit starts, its spout: x, y and z in 16.16 pixels.

References Sint32.

Referenced by scAltinPeakSpawnSpit() and scAltinPeakStartSpittingFX().

Definition at line 80 of file altin_peak.c.

AltinPeakUnusedAfterSpitOrigin

Uint8 AltinPeakUnusedAfterSpitOrigin[16]

Unused: nothing reads or writes these bytes.

Definition at line 82 of file altin_peak.c.

AltinPeakPaletteHold

Sint16 AltinPeakPaletteHold

Ticks left on the water palette's current step (AltinPeakPaletteScript).

Referenced by scAltinPeakStartPaletteAnimation() and scAltinPeakStepPaletteAnimation().

Definition at line 84 of file altin_peak.c.

AltinPeakPaletteStep

Sint16 AltinPeakPaletteStep

The next byte of AltinPeakPaletteScript; 0 again at its -1.

Referenced by scAltinPeakStartPaletteAnimation() and scAltinPeakStepPaletteAnimation().

Definition at line 86 of file altin_peak.c.

AltinPeakPaletteScript

extern Sint8 AltinPeakPaletteScript[]

Sint8 AltinPeakPaletteScript[]

The water's palette cycle: pairs of a colour offset and the ticks it holds, repeating from the top at -1.

Referenced by scAltinPeakStepPaletteAnimation().

Definition at lines 88 and 3046 of file altin_peak.c.

AltinPeakFaceLeaderScript

extern Sint32 AltinPeakFaceLeaderScript[]

Sint32 AltinPeakFaceLeaderScript[]

The first water beast keeps turning to face Isaac.

References scTurnTowardTarget() and Sint32.

Referenced by scAltinPeakRestoreFirstWaterBeastRoom() and scAltinPeakShowFirstBeastRoute().

Definition at lines 89 and 3055 of file altin_peak.c.

AltinPeakPuddleGrowScript

extern Sint32 AltinPeakPuddleGrowScript[]

Sint32 AltinPeakPuddleGrowScript[]

The puddle that appears by the west ladder as the first drain lowers the water grows from a tenth of its size to nearly full, by a 120th a tick over 108 ticks.

References Sint32.

Referenced by scAltinPeakDrainFirstWater().

Definition at lines 90 and 3062 of file altin_peak.c.

AltinPeakBoulderPath

extern Sint32 AltinPeakBoulderPath[]

Sint32 AltinPeakBoulderPath[]

The falling boulder rolls straight down the passage, over the bends Isaac runs round, and marks its arrival.

References Sint32.

Referenced by scAltinPeakRunBoulderChase().

Definition at lines 91 and 3072 of file altin_peak.c.

AltinPeakLeaderFleePath

extern Sint32 AltinPeakLeaderFleePath[]

Sint32 AltinPeakLeaderFleePath[]

The party leader flees down the winding path ahead of the boulder, marks the arrival, steps aside and turns round.

References Sint32.

Referenced by scAltinPeakRunBoulderChase().

Definition at lines 92 and 3089 of file altin_peak.c.

AltinPeakDebrisScript

extern Sint32 AltinPeakDebrisScript[]

Sint32 AltinPeakDebrisScript[]

A piece of debris flies for 60 ticks and is released.

References scAltinPeakFlyDebris() and Sint32.

Referenced by scAltinPeakSpawnDebris().

Definition at lines 93 and 3150 of file altin_peak.c.

AltinPeakGaretScript

extern Sint32 AltinPeakGaretScript[]

Sint32 AltinPeakGaretScript[]

Garet, Ivan and Mia step out beside the leader after the Hydros battle.

References Sint32.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at lines 94 and 3160 of file altin_peak.c.

AltinPeakIvanScript

extern Sint32 AltinPeakIvanScript[]

Sint32 AltinPeakIvanScript[]

References Sint32.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at lines 95 and 3169 of file altin_peak.c.

AltinPeakMiaScript

extern Sint32 AltinPeakMiaScript[]

Sint32 AltinPeakMiaScript[]

References Sint32.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at lines 96 and 3178 of file altin_peak.c.

AltinPeakStatueSinkScript

extern Sint32 AltinPeakStatueSinkScript[]

Sint32 AltinPeakStatueSinkScript[]

The Hydros statue and its shadow flatten into the floor: over 60 ticks they squash to a sixteenth of their height and spread an eighth wider, then move to (0, 0, 0).

References Sint32.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at lines 97 and 3189 of file altin_peak.c.

AltinPeakRejoinScript

extern Sint32 AltinPeakRejoinScript[]

Sint32 AltinPeakRejoinScript[]

Garet, Ivan and Mia walk back to the leader and rejoin the party.

References Sint32.

Referenced by scAltinPeakCelebrateHydrosVictory().

Definition at lines 98 and 3200 of file altin_peak.c.

AltinPeakEntrancesOther

extern SCENE_ENTRANCE AltinPeakEntrancesOther[]

SCENE_ENTRANCE AltinPeakEntrancesOther[]

Referenced by scGetEntrances().

Definition at lines 99 and 3209 of file altin_peak.c.

AltinPeakFirstWaterBeastEntrances

extern SCENE_ENTRANCE AltinPeakFirstWaterBeastEntrances[]

SCENE_ENTRANCE AltinPeakFirstWaterBeastEntrances[]

Referenced by scGetEntrances().

Definition at lines 100 and 3214 of file altin_peak.c.

AltinPeakRailTunnelEntrances

extern SCENE_ENTRANCE AltinPeakRailTunnelEntrances[]

SCENE_ENTRANCE AltinPeakRailTunnelEntrances[]

Referenced by scGetEntrances().

Definition at lines 101 and 3223 of file altin_peak.c.

AltinPeakSecondWaterBeastEntrances

extern SCENE_ENTRANCE AltinPeakSecondWaterBeastEntrances[]

SCENE_ENTRANCE AltinPeakSecondWaterBeastEntrances[]

Referenced by scGetEntrances().

Definition at lines 102 and 3232 of file altin_peak.c.

AltinPeakSouthEntranceEntrances

extern SCENE_ENTRANCE AltinPeakSouthEntranceEntrances[]

SCENE_ENTRANCE AltinPeakSouthEntranceEntrances[]

Referenced by scGetEntrances().

Definition at lines 103 and 3245 of file altin_peak.c.

AltinPeakThirdWaterBeastEntrances

extern SCENE_ENTRANCE AltinPeakThirdWaterBeastEntrances[]

SCENE_ENTRANCE AltinPeakThirdWaterBeastEntrances[]

Referenced by scGetEntrances().

Definition at lines 104 and 3264 of file altin_peak.c.

AltinPeakPoolEntrances

extern SCENE_ENTRANCE AltinPeakPoolEntrances[]

SCENE_ENTRANCE AltinPeakPoolEntrances[]

Referenced by scGetEntrances().

Definition at lines 105 and 3273 of file altin_peak.c.

AltinPeakSpritzEntrances

extern SCENE_ENTRANCE AltinPeakSpritzEntrances[]

SCENE_ENTRANCE AltinPeakSpritzEntrances[]

Referenced by scGetEntrances().

Definition at lines 106 and 3290 of file altin_peak.c.

AltinPeakJunctionEntrances

extern SCENE_ENTRANCE AltinPeakJunctionEntrances[]

SCENE_ENTRANCE AltinPeakJunctionEntrances[]

Referenced by scGetEntrances().

Definition at lines 107 and 3301 of file altin_peak.c.

AltinPeakFallingRocksEntrances

extern SCENE_ENTRANCE AltinPeakFallingRocksEntrances[]

SCENE_ENTRANCE AltinPeakFallingRocksEntrances[]

Referenced by scGetEntrances().

Definition at lines 108 and 3316 of file altin_peak.c.

AltinPeakHydrosStatueEntrances

extern SCENE_ENTRANCE AltinPeakHydrosStatueEntrances[]

SCENE_ENTRANCE AltinPeakHydrosStatueEntrances[]

Referenced by scGetEntrances().

Definition at lines 109 and 3333 of file altin_peak.c.

AltinPeakWestExitEntrances

extern SCENE_ENTRANCE AltinPeakWestExitEntrances[]

SCENE_ENTRANCE AltinPeakWestExitEntrances[]

Referenced by scGetEntrances().

Definition at lines 110 and 3342 of file altin_peak.c.

AltinPeakFallingRocksRegions

extern SCENE_EXIT_REGION AltinPeakFallingRocksRegions[]

SCENE_EXIT_REGION AltinPeakFallingRocksRegions[]

Referenced by scGetExitRegions().

Definition at lines 111 and 3355 of file altin_peak.c.

AltinPeakHydrosStatueRegions

extern SCENE_EXIT_REGION AltinPeakHydrosStatueRegions[]

SCENE_EXIT_REGION AltinPeakHydrosStatueRegions[]

Referenced by scGetExitRegions().

Definition at lines 112 and 3368 of file altin_peak.c.

AltinPeakExits

extern Uint32 AltinPeakExits[]

Uint32 AltinPeakExits[]

Referenced by scGetExits().

Definition at lines 113 and 3379 of file altin_peak.c.

AltinPeakActorPlacementsOther

extern ACTOR_PLACE AltinPeakActorPlacementsOther[]

ACTOR_PLACE AltinPeakActorPlacementsOther[]

Referenced by scGetActorPlacements().

Definition at lines 114 and 3503 of file altin_peak.c.

AltinPeakFirstWaterBeastActorPlacements

extern ACTOR_PLACE AltinPeakFirstWaterBeastActorPlacements[]

ACTOR_PLACE AltinPeakFirstWaterBeastActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 115 and 3507 of file altin_peak.c.

AltinPeakSecondWaterBeastActorPlacements

extern ACTOR_PLACE AltinPeakSecondWaterBeastActorPlacements[]

ACTOR_PLACE AltinPeakSecondWaterBeastActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 116 and 3517 of file altin_peak.c.

AltinPeakThirdWaterBeastActorPlacements

extern ACTOR_PLACE AltinPeakThirdWaterBeastActorPlacements[]

ACTOR_PLACE AltinPeakThirdWaterBeastActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 117 and 3527 of file altin_peak.c.

AltinPeakPoolActorPlacements

extern ACTOR_PLACE AltinPeakPoolActorPlacements[]

ACTOR_PLACE AltinPeakPoolActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 118 and 3537 of file altin_peak.c.

AltinPeakSpritzActorPlacements

extern ACTOR_PLACE AltinPeakSpritzActorPlacements[]

ACTOR_PLACE AltinPeakSpritzActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 119 and 3545 of file altin_peak.c.

AltinPeakJunctionActorPlacements

extern ACTOR_PLACE AltinPeakJunctionActorPlacements[]

ACTOR_PLACE AltinPeakJunctionActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 120 and 3563 of file altin_peak.c.

AltinPeakFallingRocksActorPlacements

extern ACTOR_PLACE AltinPeakFallingRocksActorPlacements[]

ACTOR_PLACE AltinPeakFallingRocksActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 121 and 3569 of file altin_peak.c.

AltinPeakHydrosStatueActorPlacements

extern ACTOR_PLACE AltinPeakHydrosStatueActorPlacements[]

ACTOR_PLACE AltinPeakHydrosStatueActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 122 and 3585 of file altin_peak.c.

AltinPeakWestExitActorPlacements

extern ACTOR_PLACE AltinPeakWestExitActorPlacements[]

ACTOR_PLACE AltinPeakWestExitActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 123 and 3599 of file altin_peak.c.

AltinPeakCuesOther

extern CUE AltinPeakCuesOther[]

CUE AltinPeakCuesOther[]

Referenced by scGetCues().

Definition at lines 124 and 3607 of file altin_peak.c.

AltinPeakFirstWaterBeastCues

extern CUE AltinPeakFirstWaterBeastCues[]

CUE AltinPeakFirstWaterBeastCues[]

References scAltinPeakFightFirstWaterBeast(), scAltinPeakFirstBeastHopsAway() and scAltinPeakShowFirstBeastRoute().

Referenced by scGetCues().

Definition at lines 125 and 3611 of file altin_peak.c.

AltinPeakFirstWaterBeastCuesDrained

extern CUE AltinPeakFirstWaterBeastCuesDrained[]

CUE AltinPeakFirstWaterBeastCuesDrained[]

References scAltinPeakFreezeFirstWaterBeastRoomPuddle() and scAltinPeakFreezeFirstWaterBeastRoomSecondPuddle().

Referenced by scAltinPeakAwardFrostJewelAndDrain() and scGetCues().

Definition at lines 126 and 3625 of file altin_peak.c.

AltinPeakRailTunnelCues

extern CUE AltinPeakRailTunnelCues[]

CUE AltinPeakRailTunnelCues[]

Referenced by scGetCues().

Definition at lines 127 and 3636 of file altin_peak.c.

AltinPeakSecondWaterBeastCues

extern CUE AltinPeakSecondWaterBeastCues[]

CUE AltinPeakSecondWaterBeastCues[]

References scAltinPeakFightSecondWaterBeast(), scAltinPeakFlipSecondWaterBeastRoomSwitch() and scAltinPeakRideCart().

Referenced by scGetCues().

Definition at lines 128 and 3644 of file altin_peak.c.

AltinPeakSouthEntranceCues

extern CUE AltinPeakSouthEntranceCues[]

CUE AltinPeakSouthEntranceCues[]

Referenced by scGetCues().

Definition at lines 129 and 3672 of file altin_peak.c.

AltinPeakThirdWaterBeastCues

extern CUE AltinPeakThirdWaterBeastCues[]

CUE AltinPeakThirdWaterBeastCues[]

References scAltinPeakFightThirdWaterBeast(), scAltinPeakFlipThirdWaterBeastRoomSwitch(), scAltinPeakFreezeThirdWaterBeastRoomPuddle() and scAltinPeakRideCart().

Referenced by scGetCues().

Definition at lines 130 and 3690 of file altin_peak.c.

AltinPeakPoolCues

extern CUE AltinPeakPoolCues[]

CUE AltinPeakPoolCues[]

References scAltinPeakFlipPoolRoomSwitch(), scAltinPeakFreezePoolRoomPuddle() and scAltinPeakRideCart().

Referenced by scGetCues().

Definition at lines 131 and 3712 of file altin_peak.c.

AltinPeakSpritzCues

extern CUE AltinPeakSpritzCues[]

CUE AltinPeakSpritzCues[]

References scAltinPeakFlipSpritzRoomSwitch(), scAltinPeakFreezeSpritzRoomPuddle(), scAltinPeakFreezeSpritzRoomSecondPuddle(), scAltinPeakFreezeSpritzRoomThirdPuddle(), scAltinPeakPlacePillarUnderLeader(), scAltinPeakPushSpritzRoomPillar(), scAltinPeakRestorePillarAutomaticPriority(), scAltinPeakRideCart(), scAltinPeakSettleSpritzRoomPillar() and scAltinPeakTalkToDjinni().

Referenced by scGetCues().

Definition at lines 132 and 3736 of file altin_peak.c.

AltinPeakJunctionCues

extern CUE AltinPeakJunctionCues[]

CUE AltinPeakJunctionCues[]

Referenced by scGetCues().

Definition at lines 133 and 3766 of file altin_peak.c.

AltinPeakFallingRocksCues

extern CUE AltinPeakFallingRocksCues[]

CUE AltinPeakFallingRocksCues[]

References scAltinPeakForceLogOver() and scAltinPeakReadFallingRockSign().

Referenced by scGetCues().

Definition at lines 134 and 3791 of file altin_peak.c.

AltinPeakHydrosStatueCues

extern CUE AltinPeakHydrosStatueCues[]

CUE AltinPeakHydrosStatueCues[]

References scAltinPeakStartHydrosBattle().

Referenced by scGetCues().

Definition at lines 135 and 3816 of file altin_peak.c.

AltinPeakWestExitCues

extern CUE AltinPeakWestExitCues[]

CUE AltinPeakWestExitCues[]

Referenced by scGetCues().

Definition at lines 136 and 3826 of file altin_peak.c.

AltinPeakRumbleTicks

extern Sint32 AltinPeakRumbleTicks

Sint32 AltinPeakRumbleTicks

Ticks since the statue's last rumble.

References Sint32.

Referenced by scAltinPeakPlayHydrosRumble().

Definition at lines 137 and 3852 of file altin_peak.c.

AltinPeakCartSpeeds

extern FIXED AltinPeakCartSpeeds[]

FIXED AltinPeakCartSpeeds[]

The cart's speed by its height against where it set off, of which it rolls three quarters a tick: 2 at that height, doubling for each 16 pixels lower and halving for each 16 higher. Entry i is about 2 to the power i / 16.

Referenced by scAltinPeakAdvanceCart().

Definition at lines 138 and 3857 of file altin_peak.c.

On this page

MacrosEnumerationsFunctionsVariablesDescriptionMacros in detailFLAG_ALTIN_PEAK_SECOND_WATER_BEAST_ROOM_SWITCHFLAG_ALTIN_PEAK_THIRD_WATER_BEAST_ROOM_SWITCHFLAG_ALTIN_PEAK_POOL_ROOM_SWITCHFLAG_ALTIN_PEAK_SPRITZ_ROOM_SWITCHscAltinPeakStartSpittingWATER_BEAST_HOP_PERIODEnumerations in detailALTIN_PEAK_CUE_METATILEanonymous enumanonymous enumHYDROS_STATUE_ANIMATIONMINE_CART_ANIMATIONanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumALTIN_PEAK_METATILE_BEHAVIORFunctions in detailscAltinPeakRunBoulderChasescAltinPeakRestoreFirstWaterBeastRoomscAltinPeakRestoreSecondWaterBeastRoomscAltinPeakRestoreSouthEntranceRoomscAltinPeakRestoreThirdWaterBeastRoomscAltinPeakRestorePoolRoomscAltinPeakRestoreSpritzRoomscAltinPeakRestoreFallingRocksRoomscAltinPeakRestoreHydrosStatueRoomscAltinPeakRestoreWestExitRoomscAltinPeakStartSpittingFXscAltinPeakSpawnDebrisfdEffectUpdateFrostGlintscAltinPeakBeastFreezesSecondPuddlescAltinPeakAwardFrostJewelAndDrainscAltinPeakDrainAfterSecondBeastscAltinPeakDrainAfterThirdBeastscAltinPeakCelebrateHydrosVictoryscAltinPeakUpdateFrostPillarPriorityscAltinPeakWallOffPuddlescAltinPeakRollCartscAltinPeakStartPaletteAnimationscAltinPeakTalkToDjinniscAltinPeakShadowFollowBoulderscAltinPeakFlyDebrisscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscAltinPeakRideCartscAltinPeakFightFirstWaterBeastscAltinPeakFightSecondWaterBeastscAltinPeakFightThirdWaterBeastscAltinPeakSettleSpritzRoomPillarscAltinPeakFreezeFirstWaterBeastRoomPuddlescAltinPeakFreezeFirstWaterBeastRoomSecondPuddlescAltinPeakFreezeSpritzRoomPuddlescAltinPeakFreezeThirdWaterBeastRoomPuddlescAltinPeakFreezePoolRoomPuddlescAltinPeakFreezeSpritzRoomSecondPuddlescAltinPeakFreezeSpritzRoomThirdPuddlescAltinPeakFlickerWaterOutscAltinPeakFlickerWaterAwayscAltinPeakDrainFirstWaterscAltinPeakDrainSecondWaterscAltinPeakDrainThirdWaterscAltinPeakToggleSecondWaterBeastRoomSwitchMetatilesscAltinPeakFlipSecondWaterBeastRoomSwitchscAltinPeakToggleThirdWaterBeastRoomSwitchMetatilesscAltinPeakFlipThirdWaterBeastRoomSwitchscAltinPeakFlipPoolRoomSwitchscAltinPeakFlipSpritzRoomSwitchscAltinPeakPlacePillarUnderLeaderscAltinPeakRestorePillarAutomaticPriorityscAltinPeakPushSpritzRoomPillarscAltinPeakForceLogOverscAltinPeakReadFallingRockSignscGetCuesscAltinPeakUpdateBeastHopsscAltinPeakPlayLandingShakescAltinPeakShowFirstBeastRoutescAltinPeakFirstBeastHopsAwayscInitscAltinPeakDrawUnderPartyscAltinPeakInitSpitscAltinPeakDriftSpitscAltinPeakSpawnSpitstaticscAltinPeakPlayHydrosRumblescAltinPeakStartHydrosBattlescAltinPeakFlickerStatuescAltinPeakRequestPsynergyscAltinPeakStopCartAndJumpOffscAltinPeakUnusedNoOperationscAltinPeakTurnCartRightscAltinPeakTurnCartLeftscAltinPeakStartCartCountdownscAltinPeakAdvanceCartscAltinPeakStepPaletteAnimationVariables in detailAltinPeakFlickerTimerAltinPeakSpitDirectionAltinPeakSpitOriginAltinPeakUnusedAfterSpitOriginAltinPeakPaletteHoldAltinPeakPaletteStepAltinPeakPaletteScriptAltinPeakFaceLeaderScriptAltinPeakPuddleGrowScriptAltinPeakBoulderPathAltinPeakLeaderFleePathAltinPeakDebrisScriptAltinPeakGaretScriptAltinPeakIvanScriptAltinPeakMiaScriptAltinPeakStatueSinkScriptAltinPeakRejoinScriptAltinPeakEntrancesOtherAltinPeakFirstWaterBeastEntrancesAltinPeakRailTunnelEntrancesAltinPeakSecondWaterBeastEntrancesAltinPeakSouthEntranceEntrancesAltinPeakThirdWaterBeastEntrancesAltinPeakPoolEntrancesAltinPeakSpritzEntrancesAltinPeakJunctionEntrancesAltinPeakFallingRocksEntrancesAltinPeakHydrosStatueEntrancesAltinPeakWestExitEntrancesAltinPeakFallingRocksRegionsAltinPeakHydrosStatueRegionsAltinPeakExitsAltinPeakActorPlacementsOtherAltinPeakFirstWaterBeastActorPlacementsAltinPeakSecondWaterBeastActorPlacementsAltinPeakThirdWaterBeastActorPlacementsAltinPeakPoolActorPlacementsAltinPeakSpritzActorPlacementsAltinPeakJunctionActorPlacementsAltinPeakFallingRocksActorPlacementsAltinPeakHydrosStatueActorPlacementsAltinPeakWestExitActorPlacementsAltinPeakCuesOtherAltinPeakFirstWaterBeastCuesAltinPeakFirstWaterBeastCuesDrainedAltinPeakRailTunnelCuesAltinPeakSecondWaterBeastCuesAltinPeakSouthEntranceCuesAltinPeakThirdWaterBeastCuesAltinPeakPoolCuesAltinPeakSpritzCuesAltinPeakJunctionCuesAltinPeakFallingRocksCuesAltinPeakHydrosStatueCuesAltinPeakWestExitCuesAltinPeakRumbleTicksAltinPeakCartSpeeds