Skip to Content
The Alchemy Project

src/scene/altmiller_cave.c

Altmiller Cave, north of Tolbi, where the party finds Babi while all of Tolbi searches for him during Colosso (babi_palace.c). More…

Structures

NameDescription
structLIGHT_WHEELThe ring of five lights above the rocks as it spins to its next light.
structROCK_PUZZLE_STATEThe rock puzzle's two bytes, from CAVE_PUZZLE.

Macros

NameDescription
#defineALTMILLER_CAVE_DARKNESS_BLENDBLEND_ALPHA gives each level.
#defineALTMILLER_CAVE_DARK_ALPHA BLEND_ALPHA(4, 12)A dark room's weights, which the passage's levels do not use.
#defineALTMILLER_CAVE_LIGHT_STEPS 5The light around the party is a window, an ellipse a little taller than wide around the leader (WINDOW_TRANSITION_LEADER_LOW); the transition's progress sets its size, 5 pixels to each side of the leader for each step.
#defineALTMILLER_CAVE_LIGHT_FULL 32The light's progress once Babi is found: wide enough to fill the screen.
#defineALTMILLER_CAVE_STEPS_LIGHT_WININInside the light where the passage darkens by steps: every layer but BG1, with no blend, so the party's surroundings show at full brightness.
#defineALTMILLER_CAVE_STEPS_LIGHT_WINOUT WINOUT_WIN01_ALLOutside that light: everything, blended to the step's darkness.
#defineALTMILLER_CAVE_DARK_LIGHT_WININ (WININ_WIN0_ALL | WININ_WIN1_ALL)Inside the light of an evenly dark room: everything, blended at ALTMILLER_CAVE_DARK_ALPHA.
#defineALTMILLER_CAVE_DARK_LIGHT_WINOUTOutside it: every layer with no blend, so BG1 covers the room.
#defineALTMILLER_CAVE_BRIGHTENING_WINOUT (WINOUT_WIN01_ALL | WINOUT_WINOBJ_ALL)Outside the light once Babi is found: everything, blended, so the whole room brightens as BG1 fades.
#defineCAVE_STATE (byte) (((Uint8 *)SceneLocalState)[byte])A byte of the cave's state; the chosen light and the darkness are signed.
#defineCAVE_SIGNED_STATE (byte) (((Sint8 *)SceneLocalState)[byte])
#defineROCK_PUZZLE ((ROCK_PUZZLE_STATE *)&CAVE_STATE(CAVE_PUZZLE))The rock puzzle's bytes in the cave's state.

Enumerations

NameDescription
enumanonymous enum { ACTOR_INVISIBLE_BABI, ACTOR_BABI, ACTOR_FIRST_SOLDIER, ACTOR … }The actors of Babi's room: Babi while invisible and once seen, and the two men from Tolbi who come looking for him.
enumanonymous enum { ACTOR_FIRST_FALLEN_COLUMN, ACTOR_SQUALL_ROOM_PUDDLE, ACTOR_S … }Squall's hall and the hall at the bottom place first the three fallen columns the party pushes.
enumanonymous enum { ACTOR_FIRST_LIGHT, ACTOR_BLUE_LIGHT, ACTOR_GREEN_LIGHT, ACTO … }The rock room, after the hall's three fallen columns: the five colored lights and the five rocks, each in Babi's order, the rocks left to right.
enumanonymous enum { LIGHT_COUNT }The lights, one of each colour.
enumanonymous enum { COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_YELLOW, COLOR_RE … }The colour mode that draws a light or a rock in each of Babi's five colors, a shuffle or tint of the sprite's own colours, and greyscale for a rock while Reveal is off.
enumanonymous enum { FLAG_ALTMILLER_CAVE_DARK, FLAG_ALTMILLER_CAVE_DARKENS_BY_STE … }The scene temp flags the cave keeps.
enumALTMILLER_CAVE_CUE_METATILE { METATILE_BEHAVIOR_ALTMILLER_CAVE_FULL_LIGHT, METATILE_BEHAVI … }The metatile behaviors the rooms' cue tables answer, besides their exits, whose metatiles carry the exit's own number.
enumanonymous enum { WHEEL_SPEEDING_UP, WHEEL_COASTING, WHEEL_SLOWING, WHEEL_STOP … }The ring speeds up, coasts half a second, slows down, then stops with the chosen light at the top.
enumanonymous enum { WHEEL_SPEED_STEP, WHEEL_TOP_SPEED, WHEEL_LOW_SPEED }The ring's speeds, in angle a tick.
enumanonymous enum { WALL_BURST_PIECES }The pieces the wall bursts into (scAltmillerCaveReleaseWallBurst).
enumanonymous enum { CAVE_ROUNDS_MATCHED, CAVE_PUZZLE, CAVE_CHOSEN_LIGHT, CAVE_DA … }The cave's own state, bytes of SceneLocalState: the rock puzzle and the passage's darkness.
enumanonymous enum { PUZZLE_START, PUZZLE_LEFT_ROCK_TURNED, PUZZLE_LIGHTS_SHOWN, … }The puzzle's states.

Functions

NameDescription
static voidscAltmillerCaveReleaseWallBurst (void)The wall above the middle rock bursts open.
static voidscAltmillerCaveStartDjinnBattle (void)Talking to Squall, the Jupiter Djinni in the north-west corner of the hall of fallen columns, starts a battle with it.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)Both scenes 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 voidscAltmillerCaveApplyFadeBlend (void)Darkens the passage in to its current level: everything outside the light around the party is drawn at its full brightness at level 0, and two sixteenths dimmer at each level after, down to six sixteenths at level 5.
static voidscAltmillerCaveSetFadeLevel (Sint32 level)Keeps the passage's darkness level, and shows it unless Reveal is lighting the passage.
static voidscAltmillerCaveDarkenToLevel0 (void)Walking back toward the cave mouth past the first bend north of it (metatiles (27, 19) to (27, 21)) lifts the darkness: the passage is as bright as at the mouth again.
static voidscAltmillerCaveDarkenToLevel1 (void)Everything outside the light around the party grows a little darker as Isaac walks on east from the first bend north of the cave mouth (metatiles (28, 19) and (28, 20)), or comes back down the passage from the north (metatile (26, 10)).
static voidscAltmillerCaveDarkenToLevel2 (void)The passage grows darker again as Isaac walks on north up it (metatile (26, 9)), or comes back east along the north wall (metatiles (18, 4) and (18, 5)).
static voidscAltmillerCaveDarkenToLevel3 (void)The passage grows darker again as Isaac walks on west along the cave's north wall (metatiles (17, 4) and (17, 5)), or comes back from the north-west turn (metatiles (7, 8) and (7, 9)).
static voidscAltmillerCaveDarkenToLevel4 (void)The passage grows darker again as Isaac turns south at its north-west end (metatiles (6, 8) and (6, 9)), or comes back up the west side (metatiles (7, 20) to (9, 20)).
static voidscAltmillerCaveDarkenToLevel5 (void)The passage is at its darkest, only the light around the party bright, as Isaac walks down the west side into the last stretch before the small torch-lit chamber (metatiles (8, 21) to (10, 21)).
static voidscAltmillerCaveInitDarkness (void)Darkens the room on entry, with the light around the party.
static voidscAltmillerCaveStartReveal (void)Casting Reveal in the passage in lights the whole passage while Reveal lasts, and in the rock room at the bottom of the cave shows each of the five rocks in its color.
static voidscAltmillerCaveEndReveal (void)When Reveal wears off, a dark room goes dark again around the light, and the five rocks in the rock room turn back to plain grey.
static voidscAltmillerCaveStartRetreat (void)Casting Retreat in the dark rooms of the cave first turns Isaac to face the screen, then lets the spell carry the party out.
static voidscAltmillerCaveDropPillarIntoPit (void)Once the stone pillar on the ledge in Squall's hall has been pushed east over the edge, with Move or by hand, it drops into the pit below (metatile (30, 20)), and its top fills the gap so the party can cross to the way on.
static voidscAltmillerCavePushPillar (void)Walking east into the stone pillar on the ledge in Squall's hall, from metatile (28, 20), pushes it a metatile and over the edge into the pit.
static voidscAltmillerCaveCheckPuddleCovered (void)Before Frost is cast on the puddle in Squall's hall, the game checks whether anything stands on it.
static voidscAltmillerCaveFreezePuddle (void)Frost on the puddle in Squall's hall (metatile (23, 17)) turns it into a pillar of ice.
static voidscAltmillerCaveHopOverPuddle (void)Pushing against the puddle in Squall's hall from any side (metatiles (23, 16), (24, 17), (23, 18) and (22, 17)) makes Isaac hop over it, if the ground two metatiles on is clear.
static voidscAltmillerCavePulseLight (ACTOR *light)Update function of the light at the top of the stopped ring.
static voidscAltmillerCavePlaceLight (Sint32 actorId, Sint32 radius, Sint32 angle)Puts a light on the ring, radius pixels from its center above the rocks, at the given angle.
static voidscAltmillerCavePlaceLights (Sint32 angle)Spaces the five lights evenly around the ring, the first at the given angle.
static voidscAltmillerCaveSpinLights (void)Event that spins the ring of lights.
static voidscAltmillerCaveTurnRock (Sint32 rock)Pressing A at one of the five rocks in the rock room at the bottom of the cave turns it: "Isaac rotated the rock." A chime says it was the right rock and an error sound the wrong one.
static inline voidscAltmillerCaveFacePartyNorth (void)The party turns north, toward Babi.
static voidscAltmillerCaveRestoreBabiAndInviteParty (void)Talking to the invisible Babi in his room, or reading his mind, once the party has the Mystic Draught: he drinks it and appears.
static voidscAltmillerCaveMeetInvisibleBabi (void)Talking to the white outline lying on the floor near the middle of Babi's room, or reading its mind with Mind Read, the first time: the invisible Babi, too weak to move, asks the party to bring his draught from deep in the cave and tells them the order of the rocks' colors.
static voidscAltmillerCaveRepeatRockOrder (void)Talking to the invisible Babi again before the draught is found: he asks whether the party forgot the order of the rock colors, and tells it again.
static voidscAltmillerCaveBabiCallsPartyBack (void)As the party walks away from the invisible Babi toward the stairs down in the north-west of his room (metatiles (11, 9) to (13, 9)), he calls them back once: "Wait..." Isaac turns, and Babi tells where the draught is: "The draught is... on a table behind the door."
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 voidscAltmillerCaveMatchLeaderPriority (ACTOR *actor)Update function of the fallen columns in the hall at the bottom of the cave: each is drawn at the leader's own sprite priority.
static inline voidscAltmillerCaveBlockFallenColumnMetatiles (void)Walls off the metatiles the three fallen columns stand on.
Sint32scInit (void)Sets up the room being entered: darkness, the ice pillar in Squall's hall as the party left it, Babi still lying there or gone, and in the rock room the rocks and lights as far as the puzzle got.
static voidscAltmillerCaveUpdateWallFragment (FIELD_PARTICLE *fragment)Update function of a piece of the burst wall.

Variables

NameDescription
extern struct LIGHT_WHEEL *AltmillerCaveLightWheelThe ring of lights, as the cave's code reaches it.
extern SCENE_ENTRANCEAltmillerCaveEntrances []
extern Uint32AltmillerCaveExits []
extern ACTOR_PLACEAltmillerCaveActorPlacementsOther []
extern ACTOR_PLACEAltmillerCaveBabiActorPlacements []
extern ACTOR_PLACEAltmillerCaveSquallActorPlacements []
extern ACTOR_PLACEAltmillerCaveDraughtActorPlacements []
extern Uint32AltmillerCavePulseScales []The sizes the light at the top pulses through.
extern Sint32AltmillerCaveGuardsArrivePath []The two men from Tolbi walk in to Babi from the south.
extern Sint32AltmillerCaveSecondGuardLeavePath []Babi and the two men walk out of the room, each by his own path.
extern Sint32AltmillerCaveFirstGuardLeavePath []
extern Sint32AltmillerCaveBabiLeavePath []
extern CUEAltmillerCaveCuesOther []
extern CUEAltmillerCaveBabiCues []
extern CUEAltmillerCaveVialChestCues []
extern CUEAltmillerCaveSquallCues []
extern CUEAltmillerCaveCookieChestCues []
extern CUEAltmillerCaveDraughtCues []
LIGHT_WHEELAltmillerCaveLightWheelStateThe ring of lights.

Description

Altmiller Cave, north of Tolbi, where the party finds Babi while all of Tolbi searches for him during Colosso (babi_palace.c). Its six scenes share this overlay and the area name Altmiller Cave. In the order the party goes through them:

  • The winding passage in from the cave mouth (AltmillerCaveEntrance). It grows darker in steps as the party walks in, until only a circle of light around them is bright. At its end a hole leads into a small chamber, where a torch burns beside the doorway down.
  • The big dark room below (AltmillerCaveBabi). Near its middle an old man lies on the floor, seen only as a white outline: the invisible Babi (scAltmillerCaveMeetInvisibleBabi). He asks the party to fetch his draught from the bottom of the cave and tells them the order of the five rocks' colors. The chest on the room's east side is a Mimic.
  • Two dark rooms with a chest each: the Vial (AltmillerCaveVialChest) and, further down, the Cookie (AltmillerCaveCookieChest).
  • Between them, a lit hall with a brick floor (AltmillerCaveSquall): three fallen columns to push, a puddle Frost turns into an ice pillar to stop them, Squall, a Jupiter Djinni, in the north-west corner, and a stone pillar on a ledge to push into the pit before the way on.
  • The lit rooms at the bottom (AltmillerCaveDraught): a hall of three more fallen columns, the room of the five rocks (scAltmillerCaveTurnRock), and behind the wall the rocks open, the Mystic Draught's chest on a stone table.

Back in Babi's room with the draught, the party watches him drink it and appear, and two men from Tolbi come to take him home (scAltmillerCaveRestoreBabiAndInviteParty). Saving him (FLAG_BABI_SAVED) is the story flag the rest of Tolbi waits on. Everything else the cave remembers is kept in scene temp flags and SceneLocalState, so the puzzles start over on every ordinary arrival.

The rooms share one entrance table and one exit table, and the other getters choose by MainRoutineStateWork.next. scInit sends an entry from outside the cave (entrance 0) to the room's first entrance, darkens the dark rooms and puts back what the party has done.

The darkness is BG1 laid over the rest (ALTMILLER_CAVE_DARKNESS_BLEND), and the light around the party is a display window, an ellipse around the leader inside which the layers are drawn differently (scAltmillerCaveInitDarkness). In the dark rooms BG1 covers everything outside the light, so the room is black there but for the glow of the torches on its walls, and inside it BG1 only dims the ground.

The passage in darkens by steps instead (FLAG_ALTMILLER_CAVE_DARKENS_BY_STEPS). Six kinds of metatile along it each set a darkness level, kept in the cave's state: at the mouth the passage is fully lit, and five lines further in each make everything outside the light a little dimmer (scAltmillerCaveApplyFadeBlend). Where one level meets the next a metatile of each lies side by side, so the level is always that of the last metatile stepped on, whichever way the party walks.

Reveal lights the passage in while it lasts and shows the rocks' colors (scAltmillerCaveStartReveal, scAltmillerCaveEndReveal).

The rock puzzle keeps the rounds matched, its state and the light at the top in the cave's state. Turning the leftmost rock and then the rightmost brings out a ring of five lights above the rocks. The ring spins (scAltmillerCaveSpinLights, an event) and stops with one light at the top. Turning that light's rock spins it on to a different light. A wrong rock puts the lights away. The third match bursts the wall behind the rocks open (scAltmillerCaveReleaseWallBurst). Coming up to the rocks from the hall of fallen columns (ALTMILLER_CAVE_DRAUGHT_ROCKS_PILLAR_CAVE) starts the puzzle over.

Macros in detail

ALTMILLER_CAVE_DARKNESS_BLEND

#define ALTMILLER_CAVE_DARKNESS_BLEND

BLEND_ALPHA gives each level.

Referenced by scAltmillerCaveApplyFadeBlend(), scAltmillerCaveInitDarkness() and scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 273 of file altmiller_cave.c.

ALTMILLER_CAVE_DARK_ALPHA

#define ALTMILLER_CAVE_DARK_ALPHA BLEND_ALPHA(4, 12)

A dark room's weights, which the passage's levels do not use.

Referenced by scAltmillerCaveInitDarkness() and scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 276 of file altmiller_cave.c.

ALTMILLER_CAVE_LIGHT_STEPS

#define ALTMILLER_CAVE_LIGHT_STEPS 5

The light around the party is a window, an ellipse a little taller than wide around the leader (WINDOW_TRANSITION_LEADER_LOW); the transition's progress sets its size, 5 pixels to each side of the leader for each step. The light's progress: 25 pixels to each side of the leader.

Referenced by scAltmillerCaveInitDarkness() and scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 282 of file altmiller_cave.c.

ALTMILLER_CAVE_LIGHT_FULL

#define ALTMILLER_CAVE_LIGHT_FULL 32

The light's progress once Babi is found: wide enough to fill the screen.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 284 of file altmiller_cave.c.

ALTMILLER_CAVE_STEPS_LIGHT_WININ

#define ALTMILLER_CAVE_STEPS_LIGHT_WININ

Inside the light where the passage darkens by steps: every layer but BG1, with no blend, so the party's surroundings show at full brightness.

Referenced by scAltmillerCaveInitDarkness().

Definition at line 287 of file altmiller_cave.c.

ALTMILLER_CAVE_STEPS_LIGHT_WINOUT

#define ALTMILLER_CAVE_STEPS_LIGHT_WINOUT WINOUT_WIN01_ALL

Outside that light: everything, blended to the step's darkness.

Referenced by scAltmillerCaveInitDarkness().

Definition at line 291 of file altmiller_cave.c.

ALTMILLER_CAVE_DARK_LIGHT_WININ

#define ALTMILLER_CAVE_DARK_LIGHT_WININ (WININ_WIN0_ALL | WININ_WIN1_ALL)

Inside the light of an evenly dark room: everything, blended at ALTMILLER_CAVE_DARK_ALPHA.

Referenced by scAltmillerCaveInitDarkness().

Definition at line 294 of file altmiller_cave.c.

ALTMILLER_CAVE_DARK_LIGHT_WINOUT

#define ALTMILLER_CAVE_DARK_LIGHT_WINOUT

Outside it: every layer with no blend, so BG1 covers the room.

Referenced by scAltmillerCaveInitDarkness() and scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 296 of file altmiller_cave.c.

ALTMILLER_CAVE_BRIGHTENING_WINOUT

#define ALTMILLER_CAVE_BRIGHTENING_WINOUT (WINOUT_WIN01_ALL | WINOUT_WINOBJ_ALL)

Outside the light once Babi is found: everything, blended, so the whole room brightens as BG1 fades.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 301 of file altmiller_cave.c.

CAVE_STATE

#define CAVE_STATE(byte) (((Uint8 *)SceneLocalState)[byte])

A byte of the cave's state; the chosen light and the darkness are signed.

Referenced by scAltmillerCaveSetFadeLevel(), scAltmillerCaveTurnRock() and scInit().

Definition at line 355 of file altmiller_cave.c.

CAVE_SIGNED_STATE

#define CAVE_SIGNED_STATE(byte) (((Sint8 *)SceneLocalState)[byte])

Referenced by scAltmillerCaveApplyFadeBlend(), scAltmillerCaveSpinLights() and scInit().

Definition at line 356 of file altmiller_cave.c.

ROCK_PUZZLE

#define ROCK_PUZZLE ((ROCK_PUZZLE_STATE *)&CAVE_STATE(CAVE_PUZZLE))

The rock puzzle's bytes in the cave's state.

Referenced by scAltmillerCaveTurnRock().

Definition at line 366 of file altmiller_cave.c.

Enumerations in detail

anonymous enum

enum { ACTOR_INVISIBLE_BABI, ACTOR_BABI, ACTOR_FIRST_SOLDIER, ACTOR_SECOND_SOLDIER }

The actors of Babi's room: Babi while invisible and once seen, and the two men from Tolbi who come looking for him. Garet, Ivan and Mia are placed first, in their own party slots.

EnumeratorValueDescription
ACTOR_INVISIBLE_BABIACTOR_FIRST_PLACEDBabi while invisible (SPRITE_INVISIBLE_BABI), seen only as a white outline lying on the floor near the middle of his room.
ACTOR_BABISPRITE_BABI, the same old man once he has drunk the draught.
ACTOR_FIRST_SOLDIERTheir sprite is a helmeted
ACTOR_SECOND_SOLDIERsoldier carrying a torch (SPRITE_SOLDIER_WITH_TORCH).

Definition at line 104 of file altmiller_cave.c.

anonymous enum

enum { ACTOR_FIRST_FALLEN_COLUMN, ACTOR_SQUALL_ROOM_PUDDLE, ACTOR_SQUALL_ROOM_PILLAR, ACTOR_SQUALL }

Squall's hall and the hall at the bottom place first the three fallen columns the party pushes. Squall's hall then places its puddle, the stone pillar on the ledge and Squall, a Jupiter Djinni.

EnumeratorValueDescription
ACTOR_FIRST_FALLEN_COLUMNACTOR_FIRST_PLACED
ACTOR_SQUALL_ROOM_PUDDLEACTOR_FIRST_FALLEN_COLUMN + 3
ACTOR_SQUALL_ROOM_PILLAR
ACTOR_SQUALL

Definition at line 122 of file altmiller_cave.c.

anonymous enum

enum { ACTOR_FIRST_LIGHT, ACTOR_BLUE_LIGHT, ACTOR_GREEN_LIGHT, ACTOR_WHITE_LIGHT, … }

The rock room, after the hall's three fallen columns: the five colored lights and the five rocks, each in Babi's order, the rocks left to right.

EnumeratorValueDescription
ACTOR_FIRST_LIGHTACTOR_FIRST_FALLEN_COLUMN + 3
ACTOR_BLUE_LIGHTACTOR_FIRST_LIGHT
ACTOR_GREEN_LIGHT
ACTOR_WHITE_LIGHT
ACTOR_YELLOW_LIGHT
ACTOR_RED_LIGHT
ACTOR_FIRST_ROCK
ACTOR_BLUE_ROCKACTOR_FIRST_ROCK
ACTOR_GREEN_ROCK
ACTOR_WHITE_ROCK
ACTOR_YELLOW_ROCK
ACTOR_RED_ROCK

Definition at line 132 of file altmiller_cave.c.

anonymous enum

enum { LIGHT_COUNT }

The lights, one of each colour.

EnumeratorValueDescription
LIGHT_COUNT5

Definition at line 149 of file altmiller_cave.c.

anonymous enum

enum { COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_YELLOW, … }

The colour mode that draws a light or a rock in each of Babi's five colors, a shuffle or tint of the sprite's own colours, and greyscale for a rock while Reveal is off.

EnumeratorValueDescription
COLOR_BLUESPRITE_COLOR_GRB
COLOR_GREENSPRITE_COLOR_GBR
COLOR_WHITESPRITE_COLOR_GREEN_TINT
COLOR_YELLOWSPRITE_COLOR_RBG
COLOR_REDSPRITE_COLOR_BGR
COLOR_NONESPRITE_COLOR_GREY

Definition at line 157 of file altmiller_cave.c.

anonymous enum

enum { FLAG_ALTMILLER_CAVE_DARK, FLAG_ALTMILLER_CAVE_DARKENS_BY_STEPS, FLAG_ALTMILLER_CAVE_PUDDLE_FROZEN, FLAG_ALTMILLER_CAVE_PILLAR_IN_PLACE }

The scene temp flags the cave keeps.

EnumeratorValueDescription
FLAG_ALTMILLER_CAVE_DARKFLAG_SCENE_TEMP(0x00)The room is dark. It is
FLAG_ALTMILLER_CAVE_DARKENS_BY_STEPSFLAG_SCENE_TEMP(0x01)set on entry everywhere but Squall's hall and the lit rooms at the bottom. The passage in from
FLAG_ALTMILLER_CAVE_PUDDLE_FROZENFLAG_SCENE_TEMP(0x11)the cave mouth darkens by steps as the party walks in. Frost has turned the puddle in
FLAG_ALTMILLER_CAVE_PILLAR_IN_PLACEFLAG_SCENE_TEMP(0x12)Squall's hall into an ice pillar. The stone pillar in Squall's hall has dropped into the pit before the way on. Only the first patch on keeps it: the pit's metatile is then filled again when the party comes back, though the pillar is drawn back on its ledge either way.

Definition at line 168 of file altmiller_cave.c.

ALTMILLER_CAVE_CUE_METATILE

enum ALTMILLER_CAVE_CUE_METATILE

The metatile behaviors the rooms' cue tables answer, besides their exits, whose metatiles carry the exit's own number. Each is a metatile of the map named here.

EnumeratorValueDescription
METATILE_BEHAVIOR_ALTMILLER_CAVE_FULL_LIGHT60The passage in: the first bend north of the cave mouth, on the mouth's side, metatiles (27, 19) to (27, 21). The passage is fully lit.
METATILE_BEHAVIOR_ALTMILLER_CAVE_DARKNESS_161Each further line across the passage, on its far side: the first bend (metatiles (28, 19) and (28, 20)) and the way north (metatile (26, 10)).
METATILE_BEHAVIOR_ALTMILLER_CAVE_DARKNESS_262North up the passage (metatile (26, 9)), and where it turns west along the north wall (metatiles (18, 4) and (18, 5)).
METATILE_BEHAVIOR_ALTMILLER_CAVE_DARKNESS_363Along the north wall (metatiles (17, 4) and (17, 5)), and where the passage turns south in the north-west (metatiles (7, 8) and (7, 9)).
METATILE_BEHAVIOR_ALTMILLER_CAVE_DARKNESS_464The north-west turn (metatiles (6, 8) and (6, 9)), and down the west side (metatiles (7, 20) to (9, 20)).
METATILE_BEHAVIOR_ALTMILLER_CAVE_DARKNESS_565The last stretch before the hole into the torch-lit chamber, metatiles (8, 21) to (10, 21).
METATILE_BEHAVIOR_ALTMILLER_CAVE_BESIDE_BABI19Babi's room: the floor just west of where he lies, on the way to the stairs down, metatiles (11, 9) to (13, 9).
METATILE_BEHAVIOR_ALTMILLER_CAVE_DRAUGHT_COLUMN_FLOOR70The floor of
METATILE_BEHAVIOR_ALTMILLER_CAVE_SQUALL_COLUMN_FLOOR71the fallen columns: in Squall's hall metatiles (19, 11) to (26, 19), and in the hall at the bottom metatiles (23, 24) to (27, 32).
METATILE_BEHAVIOR_ALTMILLER_CAVE_NORTH_OF_PUDDLE72Squall's hall: the four metatiles around the puddle at (23, 17), north, east, south and west of it.
METATILE_BEHAVIOR_ALTMILLER_CAVE_EAST_OF_PUDDLE73
METATILE_BEHAVIOR_ALTMILLER_CAVE_SOUTH_OF_PUDDLE74
METATILE_BEHAVIOR_ALTMILLER_CAVE_WEST_OF_PUDDLE75
METATILE_BEHAVIOR_ALTMILLER_CAVE_WEST_OF_PILLAR77Squall's hall: the ledge just west of the stone pillar, metatile (28, 20).
METATILE_BEHAVIOR_ALTMILLER_CAVE_CHEST100The chest in each room that has one: the Mimic in Babi's room (metatile (28, 36)), the Vial (metatile (25, 13)), the Cookie (metatile (12, 8)) and the Mystic Draught on its table (metatile (11, 7)).

Definition at line 196 of file altmiller_cave.c.

anonymous enum

enum { WHEEL_SPEEDING_UP, WHEEL_COASTING, WHEEL_SLOWING, WHEEL_STOPPING, … }

The ring speeds up, coasts half a second, slows down, then stops with the chosen light at the top.

EnumeratorValueDescription
WHEEL_SPEEDING_UP
WHEEL_COASTING
WHEEL_SLOWING
WHEEL_STOPPING
WHEEL_STOPPED99

Definition at line 319 of file altmiller_cave.c.

anonymous enum

enum { WHEEL_SPEED_STEP, WHEEL_TOP_SPEED, WHEEL_LOW_SPEED }

The ring's speeds, in angle a tick. It speeds up by WHEEL_SPEED_STEP a tick to WHEEL_TOP_SPEED and slows by half a step a tick to WHEEL_LOW_SPEED, then stops on the chosen light once it is within a tick's turn of the top.

EnumeratorValueDescription
WHEEL_SPEED_STEPTRIG_TURN / 4096
WHEEL_TOP_SPEEDTRIG_TURN * 3 / 64
WHEEL_LOW_SPEEDTRIG_TURN * 3 / 256

Definition at line 331 of file altmiller_cave.c.

anonymous enum

enum { WALL_BURST_PIECES }

The pieces the wall bursts into (scAltmillerCaveReleaseWallBurst).

EnumeratorValueDescription
WALL_BURST_PIECES24

Definition at line 339 of file altmiller_cave.c.

anonymous enum

enum { CAVE_ROUNDS_MATCHED, CAVE_PUZZLE, CAVE_CHOSEN_LIGHT, CAVE_DARKNESS }

The cave's own state, bytes of SceneLocalState: the rock puzzle and the passage's darkness.

EnumeratorValueDescription
CAVE_ROUNDS_MATCHED0the rounds of lights matched, up to three
CAVE_PUZZLE1the rock puzzle's state
CAVE_CHOSEN_LIGHT2the light the ring stops with at the top, 0 to 4
CAVE_DARKNESS4the passage's darkness level, 0 to 5

Definition at line 346 of file altmiller_cave.c.

anonymous enum

enum { PUZZLE_START, PUZZLE_LEFT_ROCK_TURNED, PUZZLE_LIGHTS_SHOWN, PUZZLE_SOLVED }

The puzzle's states. The leftmost rock is turned, then the rightmost, which shows the lights. After three lights matched the wall opens.

EnumeratorValueDescription
PUZZLE_START
PUZZLE_LEFT_ROCK_TURNED
PUZZLE_LIGHTS_SHOWN
PUZZLE_SOLVED99

Definition at line 370 of file altmiller_cave.c.

Functions in detail

scAltmillerCaveReleaseWallBurst

static void scAltmillerCaveReleaseWallBurst(void)

The wall above the middle rock bursts open. Pieces of rock fly out from where the ring was, with heavy thuds, the wall becomes an opening into the Mystic Draught's room, and the shaking calms. While the WALL_BURST_PIECES pieces fly, the field's colors are tinted (mnShopSaveAndTintFieldPalette).

References fdCameraWorldToScreen(), fdEffectInitSlots(), fdEffectReleaseSlots(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdMapGridWaitForShakeToSettle(), fdParticleInit(), fdParticleSetAnimation(), fdParticleSetCallback(), fdSpriteSetAnimationColorModes(), mnShopRestoreFieldPalette(), mnShopSaveAndTintFieldPalette(), scAltmillerCaveUpdateWallFragment(), Sint32, syMathDivideUnsigned(), syRandomNext() and sySynch().

Referenced by scAltmillerCaveTurnRock().

Definition at lines 303 and 2549 of file altmiller_cave.c.

scAltmillerCaveStartDjinnBattle

static void scAltmillerCaveStartDjinnBattle(void)

Talking to Squall, the Jupiter Djinni in the north-west corner of the hall of fallen columns, starts a battle with it.

References fdRequestDjinnBattle().

Referenced by AltmillerCaveSquallCues.

Definition at line 385 of file altmiller_cave.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

The six rooms share one entrance table.

References AltmillerCaveEntrances.

Definition at line 391 of file altmiller_cave.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 396 of file altmiller_cave.c.

scGetExits

const Uint32 *scGetExits(void)

References AltmillerCaveExits.

Definition at line 401 of file altmiller_cave.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References AltmillerCaveActorPlacementsOther, AltmillerCaveBabiActorPlacements, AltmillerCaveDraughtActorPlacements, AltmillerCaveSquallActorPlacements and MainRoutineStateWork.

Definition at line 406 of file altmiller_cave.c.

scAltmillerCaveApplyFadeBlend

static void scAltmillerCaveApplyFadeBlend(void)

Darkens the passage in to its current level: everything outside the light around the party is drawn at its full brightness at level 0, and two sixteenths dimmer at each level after, down to six sixteenths at level 5.

Referenced by scAltmillerCaveInitDarkness() and scAltmillerCaveSetFadeLevel().

Definition at line 428 of file altmiller_cave.c.

scAltmillerCaveSetFadeLevel

static void scAltmillerCaveSetFadeLevel(Sint32 level)

Keeps the passage's darkness level, and shows it unless Reveal is lighting the passage.

References scAltmillerCaveApplyFadeBlend(), Sint32 and state.

Referenced by scAltmillerCaveDarkenToLevel0(), scAltmillerCaveDarkenToLevel1(), scAltmillerCaveDarkenToLevel2(), scAltmillerCaveDarkenToLevel3(), scAltmillerCaveDarkenToLevel4() and scAltmillerCaveDarkenToLevel5().

Definition at line 461 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel0

static void scAltmillerCaveDarkenToLevel0(void)

Walking back toward the cave mouth past the first bend north of it (metatiles (27, 19) to (27, 21)) lifts the darkness: the passage is as bright as at the mouth again.

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 475 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel1

static void scAltmillerCaveDarkenToLevel1(void)

Everything outside the light around the party grows a little darker as Isaac walks on east from the first bend north of the cave mouth (metatiles (28, 19) and (28, 20)), or comes back down the passage from the north (metatile (26, 10)).

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 484 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel2

static void scAltmillerCaveDarkenToLevel2(void)

The passage grows darker again as Isaac walks on north up it (metatile (26, 9)), or comes back east along the north wall (metatiles (18, 4) and (18, 5)).

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 491 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel3

static void scAltmillerCaveDarkenToLevel3(void)

The passage grows darker again as Isaac walks on west along the cave's north wall (metatiles (17, 4) and (17, 5)), or comes back from the north-west turn (metatiles (7, 8) and (7, 9)).

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 500 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel4

static void scAltmillerCaveDarkenToLevel4(void)

The passage grows darker again as Isaac turns south at its north-west end (metatiles (6, 8) and (6, 9)), or comes back up the west side (metatiles (7, 20) to (9, 20)).

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 508 of file altmiller_cave.c.

scAltmillerCaveDarkenToLevel5

static void scAltmillerCaveDarkenToLevel5(void)

The passage is at its darkest, only the light around the party bright, as Isaac walks down the west side into the last stretch before the small torch-lit chamber (metatiles (8, 21) to (10, 21)).

References scAltmillerCaveSetFadeLevel().

Referenced by AltmillerCaveCuesOther.

Definition at line 516 of file altmiller_cave.c.

scAltmillerCaveInitDarkness

static void scAltmillerCaveInitDarkness(void)

Darkens the room on entry, with the light around the party. The passage in darkens by its levels, the other dark rooms evenly, black outside the light.

References fdScreenTransitionStartHeldWindow(), gmFlagGet(), scAltmillerCaveApplyFadeBlend(), state and sySynch().

Referenced by scAltmillerCaveEndReveal() and scInit().

Definition at line 523 of file altmiller_cave.c.

scAltmillerCaveStartReveal

static void scAltmillerCaveStartReveal(void)

Casting Reveal in the passage in lights the whole passage while Reveal lasts, and in the rock room at the bottom of the cave shows each of the five rocks in its color. The rocks are blue, green, white, yellow and red from the left, the order Babi gives.

References fdActorSetSpriteColorById() and MainRoutineStateWork.

Referenced by AltmillerCaveCuesOther and AltmillerCaveDraughtCues.

Definition at line 551 of file altmiller_cave.c.

scAltmillerCaveEndReveal

static void scAltmillerCaveEndReveal(void)

When Reveal wears off, a dark room goes dark again around the light, and the five rocks in the rock room turn back to plain grey.

References fdActorSetSpriteColorById(), gmFlagGet(), MainRoutineStateWork and scAltmillerCaveInitDarkness().

Referenced by AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther, AltmillerCaveDraughtCues and AltmillerCaveVialChestCues.

Definition at line 569 of file altmiller_cave.c.

scAltmillerCaveStartRetreat

static void scAltmillerCaveStartRetreat(void)

Casting Retreat in the dark rooms of the cave first turns Isaac to face the screen, then lets the spell carry the party out. Retreat plays on a copy of him made after the turn, and the leader himself stops updating.

References fdActorFaceDirection(), fdActorSetSpriteColorMode(), fdScriptWait(), scFieldActorCreate() and syDMAXCopy().

Referenced by AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther and AltmillerCaveVialChestCues.

Definition at line 593 of file altmiller_cave.c.

scAltmillerCaveDropPillarIntoPit

static void scAltmillerCaveDropPillarIntoPit(void)

Once the stone pillar on the ledge in Squall's hall has been pushed east over the edge, with Move or by hand, it drops into the pit below (metatile (30, 20)), and its top fills the gap so the party can cross to the way on. Pushed anywhere else, nothing more happens.

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

Referenced by AltmillerCaveSquallCues and scAltmillerCavePushPillar().

Definition at line 620 of file altmiller_cave.c.

scAltmillerCavePushPillar

static void scAltmillerCavePushPillar(void)

Walking east into the stone pillar on the ledge in Squall's hall, from metatile (28, 20), pushes it a metatile and over the edge into the pit.

References scAltmillerCaveDropPillarIntoPit() and scPushedActorAdvancePair().

Referenced by AltmillerCaveSquallCues.

Definition at line 639 of file altmiller_cave.c.

scAltmillerCaveCheckPuddleCovered

static void scAltmillerCaveCheckPuddleCovered(void)

Before Frost is cast on the puddle in Squall's hall, the game checks whether anything stands on it. If so, nothing freezes.

References fdActorGet() and scFieldActorCheckMovementCollision().

Referenced by AltmillerCaveSquallCues.

Definition at line 647 of file altmiller_cave.c.

scAltmillerCaveFreezePuddle

static void scAltmillerCaveFreezePuddle(void)

Frost on the puddle in Squall's hall (metatile (23, 17)) turns it into a pillar of ice. A fallen column pushed toward it stops against it, which is how the party wedges the columns out of the way to reach Squall. The puddle's metatile becomes a wall, copied from a spare metatile of the map.

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

Referenced by AltmillerCaveSquallCues.

Definition at line 668 of file altmiller_cave.c.

scAltmillerCaveHopOverPuddle

static void scAltmillerCaveHopOverPuddle(void)

Pushing against the puddle in Squall's hall from any side (metatiles (23, 16), (24, 17), (23, 18) and (22, 17)) makes Isaac hop over it, if the ground two metatiles on is clear. Once the puddle is frozen he can no longer hop it.

References fdActorGet(), fdActorMoveToAndWait(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdScriptEnd(), fdScriptStart(), MainRoutineStateWork, scFieldActorCheckMovementCollision(), Sint32, sySoundPlay(), sySynch() and syVectorAddPolarOffset().

Referenced by AltmillerCaveSquallCues.

Definition at line 693 of file altmiller_cave.c.

scAltmillerCavePulseLight

static void scAltmillerCavePulseLight(ACTOR *light)

Update function of the light at the top of the stopped ring. It pulses through four sizes.

References AltmillerCavePulseScales and Sint32.

Referenced by scAltmillerCaveSpinLights().

Definition at line 741 of file altmiller_cave.c.

scAltmillerCavePlaceLight

static void scAltmillerCavePlaceLight(Sint32 actorId, Sint32 radius, Sint32 angle)

Puts a light on the ring, radius pixels from its center above the rocks, at the given angle.

References fdActorGet(), Sint32 and syVectorAddPolarOffset().

Referenced by scAltmillerCavePlaceLights() and scAltmillerCaveTurnRock().

Definition at line 753 of file altmiller_cave.c.

scAltmillerCavePlaceLights

static void scAltmillerCavePlaceLights(Sint32 angle)

Spaces the five lights evenly around the ring, the first at the given angle.

References scAltmillerCavePlaceLight() and Sint32.

Referenced by scAltmillerCaveSpinLights() and scInit().

Definition at line 771 of file altmiller_cave.c.

scAltmillerCaveSpinLights

static void scAltmillerCaveSpinLights(void)

Event that spins the ring of lights.

References AltmillerCaveLightWheel, fdActorGet(), scAltmillerCavePlaceLights(), scAltmillerCavePulseLight(), Sint32, syMathDivide() and sySoundPlay().

Referenced by scAltmillerCaveTurnRock().

Definition at line 783 of file altmiller_cave.c.

scAltmillerCaveTurnRock

static void scAltmillerCaveTurnRock(Sint32 rock)

Pressing A at one of the five rocks in the rock room at the bottom of the cave turns it: "Isaac rotated the rock." A chime says it was the right rock and an error sound the wrong one. The leftmost and then the rightmost bring out the ring of five lights on the wall above the middle rock; after that, the rock of the light at the top spins the ring on, and the third such match makes the ground shake, the ring spiral into nothing and the wall behind the rocks burst open.

References AltmillerCaveLightWheel, fdActorGet(), fdEndBusyAndReveal(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), scAltmillerCavePlaceLight(), scAltmillerCaveReleaseWallBurst(), scAltmillerCaveSpinLights(), Sint32, state, syCloseEvent(), sySetTickEvent(), sySoundPlay() and sySynch().

Referenced by AltmillerCaveDraughtCues.

Definition at line 853 of file altmiller_cave.c.

scAltmillerCaveFacePartyNorth

static inline void scAltmillerCaveFacePartyNorth(void)

The party turns north, toward Babi.

References fdActorFaceDirection().

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at line 1036 of file altmiller_cave.c.

scAltmillerCaveRestoreBabiAndInviteParty

static void scAltmillerCaveRestoreBabiAndInviteParty(void)

Talking to the invisible Babi in his room, or reading his mind, once the party has the Mystic Draught: he drinks it and appears. Ivan reads his mind and learns who he is, Lord Babi of Tolbi. Two men from Tolbi arrive with torches to take him home, and he asks the party to enter Colosso's finals. They decide whether to.

References AltmillerCaveBabiLeavePath, AltmillerCaveFirstGuardLeavePath, AltmillerCaveGuardsArrivePath, AltmillerCaveSecondGuardLeavePath, fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetScript(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdActorWatchAndSetScript(), fdCameraFollowActor(), fdCameraMoveToActorById(), fdCameraWaitForMove(), fdEndBusyAndReveal(), fdPsynergyLoadResources(), fdPsynergyRunHandler(), fdPsynergySetupActorPair(), fdPsynergyStartCast(), fdPsynergyStopCasterUpdate(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), gmPartyInventoryDiscard(), gmPlayMusic(), scAltmillerCaveFacePartyNorth(), scFieldActorLaunchFromLeader(), scWalkIntoLeader(), Sint32, state, sySoundPlay() and sySynch().

Referenced by AltmillerCaveBabiCues.

Definition at line 1049 of file altmiller_cave.c.

scAltmillerCaveMeetInvisibleBabi

static void scAltmillerCaveMeetInvisibleBabi(void)

Talking to the white outline lying on the floor near the middle of Babi's room, or reading its mind with Mind Read, the first time: the invisible Babi, too weak to move, asks the party to bring his draught from deep in the cave and tells them the order of the rocks' colors.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkByAndWait(), fdActorWalkToAndWait(), fdEndBusyAndReveal(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), gmPlayMusic(), line, scFieldActorLaunchFromLeader(), Sint32 and sySoundPlay().

Referenced by AltmillerCaveBabiCues.

Definition at line 1894 of file altmiller_cave.c.

scAltmillerCaveRepeatRockOrder

static void scAltmillerCaveRepeatRockOrder(void)

Talking to the invisible Babi again before the draught is found: he asks whether the party forgot the order of the rock colors, and tells it again.

References fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and Sint32.

Referenced by AltmillerCaveBabiCues.

Definition at line 2223 of file altmiller_cave.c.

scAltmillerCaveBabiCallsPartyBack

static void scAltmillerCaveBabiCallsPartyBack(void)

As the party walks away from the invisible Babi toward the stairs down in the north-west of his room (metatiles (11, 9) to (13, 9)), he calls them back once: "Wait..." Isaac turns, and Babi tells where the draught is: "The draught is... on a table behind the door."

References fdActorFaceActor(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet() and gmFlagSet().

Referenced by AltmillerCaveBabiCues.

Definition at line 2253 of file altmiller_cave.c.

scGetCues

const CUE *scGetCues(void)

References AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther, AltmillerCaveDraughtCues, AltmillerCaveSquallCues, AltmillerCaveVialChestCues and MainRoutineStateWork.

Definition at line 2277 of file altmiller_cave.c.

scAltmillerCaveMatchLeaderPriority

static void scAltmillerCaveMatchLeaderPriority(ACTOR *actor)

Update function of the fallen columns in the hall at the bottom of the cave: each is drawn at the leader's own sprite priority.

References fdActorGet().

Referenced by scInit().

Definition at line 2306 of file altmiller_cave.c.

scAltmillerCaveBlockFallenColumnMetatiles

static inline void scAltmillerCaveBlockFallenColumnMetatiles(void)

Walls off the metatiles the three fallen columns stand on.

References scPushedActorBlockFootprint().

Referenced by scInit().

Definition at line 2317 of file altmiller_cave.c.

scInit

Sint32 scInit(void)

Sets up the room being entered: darkness, the ice pillar in Squall's hall as the party left it, Babi still lying there or gone, and in the rock room the rocks and lights as far as the puzzle got. Returns 0.

References AltmillerCaveLightWheel, fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesLayered(), fdScriptClearFlag(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scAltmillerCaveBlockFallenColumnMetatiles(), scAltmillerCaveInitDarkness(), scAltmillerCaveMatchLeaderPriority(), scAltmillerCavePlaceLights() and Sint32.

Definition at line 2327 of file altmiller_cave.c.

scAltmillerCaveUpdateWallFragment

static void scAltmillerCaveUpdateWallFragment(FIELD_PARTICLE *fragment)

Update function of a piece of the burst wall. It flies from the wall's center to a random point 120 pixels away, then starts again from the center.

References fdParticleFree(), fdParticleHasPendingTarget(), FrameCount, Sint32, syRandomNext(), sySoundPlay() and syVectorAddPolarOffset().

Referenced by scAltmillerCaveReleaseWallBurst().

Definition at line 2507 of file altmiller_cave.c.

Variables in detail

AltmillerCaveLightWheel

extern struct LIGHT_WHEEL *AltmillerCaveLightWheel

LIGHT_WHEEL *AltmillerCaveLightWheel

The ring of lights, as the cave's code reaches it.

References AltmillerCaveLightWheelState.

Referenced by scAltmillerCaveSpinLights(), scAltmillerCaveTurnRock() and scInit().

Definition at lines 82 and 2599 of file altmiller_cave.c.

AltmillerCaveEntrances

extern SCENE_ENTRANCE AltmillerCaveEntrances[]

SCENE_ENTRANCE AltmillerCaveEntrances[]

Referenced by scGetEntrances().

Definition at lines 83 and 2601 of file altmiller_cave.c.

AltmillerCaveExits

extern Uint32 AltmillerCaveExits[]

Uint32 AltmillerCaveExits[]

Referenced by scGetExits().

Definition at lines 84 and 2725 of file altmiller_cave.c.

AltmillerCaveActorPlacementsOther

extern ACTOR_PLACE AltmillerCaveActorPlacementsOther[]

ACTOR_PLACE AltmillerCaveActorPlacementsOther[]

Referenced by scGetActorPlacements().

Definition at lines 85 and 2786 of file altmiller_cave.c.

AltmillerCaveBabiActorPlacements

extern ACTOR_PLACE AltmillerCaveBabiActorPlacements[]

ACTOR_PLACE AltmillerCaveBabiActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 86 and 2790 of file altmiller_cave.c.

AltmillerCaveSquallActorPlacements

extern ACTOR_PLACE AltmillerCaveSquallActorPlacements[]

ACTOR_PLACE AltmillerCaveSquallActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 87 and 2857 of file altmiller_cave.c.

AltmillerCaveDraughtActorPlacements

extern ACTOR_PLACE AltmillerCaveDraughtActorPlacements[]

ACTOR_PLACE AltmillerCaveDraughtActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 88 and 2915 of file altmiller_cave.c.

AltmillerCavePulseScales

extern Uint32 AltmillerCavePulseScales[]

Uint32 AltmillerCavePulseScales[]

The sizes the light at the top pulses through.

Referenced by scAltmillerCavePulseLight().

Definition at lines 89 and 3037 of file altmiller_cave.c.

AltmillerCaveGuardsArrivePath

extern Sint32 AltmillerCaveGuardsArrivePath[]

Sint32 AltmillerCaveGuardsArrivePath[]

The two men from Tolbi walk in to Babi from the south.

References Sint32.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at lines 90 and 3045 of file altmiller_cave.c.

AltmillerCaveSecondGuardLeavePath

extern Sint32 AltmillerCaveSecondGuardLeavePath[]

Sint32 AltmillerCaveSecondGuardLeavePath[]

Babi and the two men walk out of the room, each by his own path.

References Sint32.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at lines 91 and 3058 of file altmiller_cave.c.

AltmillerCaveFirstGuardLeavePath

extern Sint32 AltmillerCaveFirstGuardLeavePath[]

Sint32 AltmillerCaveFirstGuardLeavePath[]

References Sint32.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at lines 92 and 3070 of file altmiller_cave.c.

AltmillerCaveBabiLeavePath

extern Sint32 AltmillerCaveBabiLeavePath[]

Sint32 AltmillerCaveBabiLeavePath[]

References Sint32.

Referenced by scAltmillerCaveRestoreBabiAndInviteParty().

Definition at lines 93 and 3084 of file altmiller_cave.c.

AltmillerCaveCuesOther

extern CUE AltmillerCaveCuesOther[]

CUE AltmillerCaveCuesOther[]

References scAltmillerCaveDarkenToLevel0(), scAltmillerCaveDarkenToLevel1(), scAltmillerCaveDarkenToLevel2(), scAltmillerCaveDarkenToLevel3(), scAltmillerCaveDarkenToLevel4(), scAltmillerCaveDarkenToLevel5(), scAltmillerCaveEndReveal(), scAltmillerCaveStartRetreat() and scAltmillerCaveStartReveal().

Referenced by scGetCues().

Definition at lines 94 and 3099 of file altmiller_cave.c.

AltmillerCaveBabiCues

extern CUE AltmillerCaveBabiCues[]

CUE AltmillerCaveBabiCues[]

References scAltmillerCaveBabiCallsPartyBack(), scAltmillerCaveEndReveal(), scAltmillerCaveMeetInvisibleBabi(), scAltmillerCaveRepeatRockOrder(), scAltmillerCaveRestoreBabiAndInviteParty() and scAltmillerCaveStartRetreat().

Referenced by scGetCues().

Definition at lines 95 and 3138 of file altmiller_cave.c.

AltmillerCaveVialChestCues

extern CUE AltmillerCaveVialChestCues[]

CUE AltmillerCaveVialChestCues[]

References scAltmillerCaveEndReveal() and scAltmillerCaveStartRetreat().

Referenced by scGetCues().

Definition at lines 96 and 3172 of file altmiller_cave.c.

AltmillerCaveSquallCues

extern CUE AltmillerCaveSquallCues[]

CUE AltmillerCaveSquallCues[]

References scAltmillerCaveCheckPuddleCovered(), scAltmillerCaveDropPillarIntoPit(), scAltmillerCaveFreezePuddle(), scAltmillerCaveHopOverPuddle(), scAltmillerCavePushPillar(), scAltmillerCaveStartDjinnBattle() and scPushedActorPushIfClear().

Referenced by scGetCues().

Definition at lines 97 and 3188 of file altmiller_cave.c.

AltmillerCaveCookieChestCues

extern CUE AltmillerCaveCookieChestCues[]

CUE AltmillerCaveCookieChestCues[]

References scAltmillerCaveEndReveal() and scAltmillerCaveStartRetreat().

Referenced by scGetCues().

Definition at lines 98 and 3225 of file altmiller_cave.c.

AltmillerCaveDraughtCues

extern CUE AltmillerCaveDraughtCues[]

CUE AltmillerCaveDraughtCues[]

References scAltmillerCaveEndReveal(), scAltmillerCaveStartReveal(), scAltmillerCaveTurnRock() and scPushedActorPushIfClear().

Referenced by scGetCues().

Definition at lines 99 and 3242 of file altmiller_cave.c.

AltmillerCaveLightWheelState

LIGHT_WHEEL AltmillerCaveLightWheelState

The ring of lights.

Referenced by AltmillerCaveLightWheel.

Definition at line 379 of file altmiller_cave.c.

On this page

StructuresMacrosEnumerationsFunctionsVariablesDescriptionMacros in detailALTMILLER_CAVE_DARKNESS_BLENDALTMILLER_CAVE_DARK_ALPHAALTMILLER_CAVE_LIGHT_STEPSALTMILLER_CAVE_LIGHT_FULLALTMILLER_CAVE_STEPS_LIGHT_WININALTMILLER_CAVE_STEPS_LIGHT_WINOUTALTMILLER_CAVE_DARK_LIGHT_WININALTMILLER_CAVE_DARK_LIGHT_WINOUTALTMILLER_CAVE_BRIGHTENING_WINOUTCAVE_STATECAVE_SIGNED_STATEROCK_PUZZLEEnumerations in detailanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumALTMILLER_CAVE_CUE_METATILEanonymous enumanonymous enumanonymous enumanonymous enumanonymous enumFunctions in detailscAltmillerCaveReleaseWallBurstscAltmillerCaveStartDjinnBattlescGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscAltmillerCaveApplyFadeBlendscAltmillerCaveSetFadeLevelscAltmillerCaveDarkenToLevel0scAltmillerCaveDarkenToLevel1scAltmillerCaveDarkenToLevel2scAltmillerCaveDarkenToLevel3scAltmillerCaveDarkenToLevel4scAltmillerCaveDarkenToLevel5scAltmillerCaveInitDarknessscAltmillerCaveStartRevealscAltmillerCaveEndRevealscAltmillerCaveStartRetreatscAltmillerCaveDropPillarIntoPitscAltmillerCavePushPillarscAltmillerCaveCheckPuddleCoveredscAltmillerCaveFreezePuddlescAltmillerCaveHopOverPuddlescAltmillerCavePulseLightscAltmillerCavePlaceLightscAltmillerCavePlaceLightsscAltmillerCaveSpinLightsscAltmillerCaveTurnRockscAltmillerCaveFacePartyNorthscAltmillerCaveRestoreBabiAndInvitePartyscAltmillerCaveMeetInvisibleBabiscAltmillerCaveRepeatRockOrderscAltmillerCaveBabiCallsPartyBackscGetCuesscAltmillerCaveMatchLeaderPriorityscAltmillerCaveBlockFallenColumnMetatilesscInitscAltmillerCaveUpdateWallFragmentVariables in detailAltmillerCaveLightWheelAltmillerCaveEntrancesAltmillerCaveExitsAltmillerCaveActorPlacementsOtherAltmillerCaveBabiActorPlacementsAltmillerCaveSquallActorPlacementsAltmillerCaveDraughtActorPlacementsAltmillerCavePulseScalesAltmillerCaveGuardsArrivePathAltmillerCaveSecondGuardLeavePathAltmillerCaveFirstGuardLeavePathAltmillerCaveBabiLeavePathAltmillerCaveCuesOtherAltmillerCaveBabiCuesAltmillerCaveVialChestCuesAltmillerCaveSquallCuesAltmillerCaveCookieChestCuesAltmillerCaveDraughtCuesAltmillerCaveLightWheelState