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…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "macros.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "field/field_psynergy_state.h"#include "graphics/display_transition.h"#include "graphics/graphics.h"#include "scene/walk_into_leader.h"#include "text/msg_ids.h"#include "shared/pushed_actor.c"#include "shared/pushed_actor_push.c"#include "shared/pushed_actor_tables.c"
Structures
| Name | Description | |
|---|---|---|
struct | LIGHT_WHEEL | The ring of five lights above the rocks as it spins to its next light. |
struct | ROCK_PUZZLE_STATE | The rock puzzle's two bytes, from CAVE_PUZZLE. |
Macros
| Name | Description | |
|---|---|---|
#define | ALTMILLER_CAVE_DARKNESS_BLEND | BLEND_ALPHA gives each level. |
#define | ALTMILLER_CAVE_DARK_ALPHA BLEND_ALPHA(4, 12) | A dark room's weights, which the passage's levels do not use. |
#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. |
#define | ALTMILLER_CAVE_LIGHT_FULL 32 | The light's progress once Babi is found: wide enough to fill the screen. |
#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. |
#define | ALTMILLER_CAVE_STEPS_LIGHT_WINOUT WINOUT_WIN01_ALL | Outside that light: everything, blended to the step's darkness. |
#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. |
#define | ALTMILLER_CAVE_DARK_LIGHT_WINOUT | Outside it: every layer with no blend, so BG1 covers the room. |
#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. |
#define | CAVE_STATE (byte) (((Uint8 *)SceneLocalState)[byte]) | A byte of the cave's state; the chosen light and the darkness are signed. |
#define | CAVE_SIGNED_STATE (byte) (((Sint8 *)SceneLocalState)[byte]) | |
#define | ROCK_PUZZLE ((ROCK_PUZZLE_STATE *)&CAVE_STATE(CAVE_PUZZLE)) | The rock puzzle's bytes in the cave's state. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous 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. |
enum | anonymous 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. |
enum | anonymous 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. |
enum | anonymous enum { LIGHT_COUNT } | The lights, one of each colour. |
enum | anonymous 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. |
enum | anonymous enum { FLAG_ALTMILLER_CAVE_DARK, FLAG_ALTMILLER_CAVE_DARKENS_BY_STE … } | The scene temp flags the cave keeps. |
enum | ALTMILLER_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. |
enum | anonymous 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. |
enum | anonymous enum { WHEEL_SPEED_STEP, WHEEL_TOP_SPEED, WHEEL_LOW_SPEED } | The ring's speeds, in angle a tick. |
enum | anonymous enum { WALL_BURST_PIECES } | The pieces the wall bursts into (scAltmillerCaveReleaseWallBurst). |
enum | anonymous 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. |
enum | anonymous enum { PUZZLE_START, PUZZLE_LEFT_ROCK_TURNED, PUZZLE_LIGHTS_SHOWN, … } | The puzzle's states. |
Functions
| Name | Description | |
|---|---|---|
static void | scAltmillerCaveReleaseWallBurst (void) | The wall above the middle rock bursts open. |
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. |
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 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. |
static void | scAltmillerCaveSetFadeLevel (Sint32 level) | Keeps the passage's darkness level, and shows it unless Reveal is lighting the passage. |
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. |
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)). |
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)). |
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)). |
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)). |
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)). |
static void | scAltmillerCaveInitDarkness (void) | Darkens the room on entry, with the light around the party. |
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. |
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. |
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. |
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. |
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. |
static void | scAltmillerCaveCheckPuddleCovered (void) | Before Frost is cast on the puddle in Squall's hall, the game checks whether anything stands on it. |
static void | scAltmillerCaveFreezePuddle (void) | Frost on the puddle in Squall's hall (metatile (23, 17)) turns it into a pillar of ice. |
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. |
static void | scAltmillerCavePulseLight (ACTOR *light) | Update function of the light at the top of the stopped ring. |
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. |
static void | scAltmillerCavePlaceLights (Sint32 angle) | Spaces the five lights evenly around the ring, the first at the given angle. |
static void | scAltmillerCaveSpinLights (void) | Event that spins the ring of lights. |
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. |
static inline void | scAltmillerCaveFacePartyNorth (void) | The party turns north, toward Babi. |
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. |
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. |
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. |
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." |
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 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. |
static inline void | scAltmillerCaveBlockFallenColumnMetatiles (void) | Walls off the metatiles the three fallen columns stand on. |
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. |
static void | scAltmillerCaveUpdateWallFragment (FIELD_PARTICLE *fragment) | Update function of a piece of the burst wall. |
Variables
| Name | Description | |
|---|---|---|
extern struct LIGHT_WHEEL * | AltmillerCaveLightWheel | The ring of lights, as the cave's code reaches it. |
extern SCENE_ENTRANCE | AltmillerCaveEntrances [] | |
extern Uint32 | AltmillerCaveExits [] | |
extern ACTOR_PLACE | AltmillerCaveActorPlacementsOther [] | |
extern ACTOR_PLACE | AltmillerCaveBabiActorPlacements [] | |
extern ACTOR_PLACE | AltmillerCaveSquallActorPlacements [] | |
extern ACTOR_PLACE | AltmillerCaveDraughtActorPlacements [] | |
extern Uint32 | AltmillerCavePulseScales [] | The sizes the light at the top pulses through. |
extern Sint32 | AltmillerCaveGuardsArrivePath [] | The two men from Tolbi walk in to Babi from the south. |
extern Sint32 | AltmillerCaveSecondGuardLeavePath [] | Babi and the two men walk out of the room, each by his own path. |
extern Sint32 | AltmillerCaveFirstGuardLeavePath [] | |
extern Sint32 | AltmillerCaveBabiLeavePath [] | |
extern CUE | AltmillerCaveCuesOther [] | |
extern CUE | AltmillerCaveBabiCues [] | |
extern CUE | AltmillerCaveVialChestCues [] | |
extern CUE | AltmillerCaveSquallCues [] | |
extern CUE | AltmillerCaveCookieChestCues [] | |
extern CUE | AltmillerCaveDraughtCues [] | |
LIGHT_WHEEL | AltmillerCaveLightWheelState | The 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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_INVISIBLE_BABI | ACTOR_FIRST_PLACED | Babi while invisible (SPRITE_INVISIBLE_BABI), seen only as a white outline lying on the floor near the middle of his room. |
ACTOR_BABI | SPRITE_BABI, the same old man once he has drunk the draught. | |
ACTOR_FIRST_SOLDIER | Their sprite is a helmeted | |
ACTOR_SECOND_SOLDIER | soldier 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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_FALLEN_COLUMN | ACTOR_FIRST_PLACED | |
ACTOR_SQUALL_ROOM_PUDDLE | ACTOR_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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_LIGHT | ACTOR_FIRST_FALLEN_COLUMN + 3 | |
ACTOR_BLUE_LIGHT | ACTOR_FIRST_LIGHT | |
ACTOR_GREEN_LIGHT | ||
ACTOR_WHITE_LIGHT | ||
ACTOR_YELLOW_LIGHT | ||
ACTOR_RED_LIGHT | ||
ACTOR_FIRST_ROCK | ||
ACTOR_BLUE_ROCK | ACTOR_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.
| Enumerator | Value | Description |
|---|---|---|
LIGHT_COUNT | 5 |
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.
| Enumerator | Value | Description |
|---|---|---|
COLOR_BLUE | SPRITE_COLOR_GRB | |
COLOR_GREEN | SPRITE_COLOR_GBR | |
COLOR_WHITE | SPRITE_COLOR_GREEN_TINT | |
COLOR_YELLOW | SPRITE_COLOR_RBG | |
COLOR_RED | SPRITE_COLOR_BGR | |
COLOR_NONE | SPRITE_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.
| Enumerator | Value | Description |
|---|---|---|
FLAG_ALTMILLER_CAVE_DARK | FLAG_SCENE_TEMP(0x00) | The room is dark. It is |
FLAG_ALTMILLER_CAVE_DARKENS_BY_STEPS | FLAG_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_FROZEN | FLAG_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_PLACE | FLAG_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.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_ALTMILLER_CAVE_FULL_LIGHT | 60 | The 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_1 | 61 | Each 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_2 | 62 | North 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_3 | 63 | Along 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_4 | 64 | The 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_5 | 65 | The last stretch before the hole into the torch-lit chamber, metatiles (8, 21) to (10, 21). |
METATILE_BEHAVIOR_ALTMILLER_CAVE_BESIDE_BABI | 19 | Babi'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_FLOOR | 70 | The floor of |
METATILE_BEHAVIOR_ALTMILLER_CAVE_SQUALL_COLUMN_FLOOR | 71 | the 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_PUDDLE | 72 | Squall's hall: the four metatiles around the puddle at (23, 17), north, east, south and west of it. |
METATILE_BEHAVIOR_ALTMILLER_CAVE_EAST_OF_PUDDLE | 73 | |
METATILE_BEHAVIOR_ALTMILLER_CAVE_SOUTH_OF_PUDDLE | 74 | |
METATILE_BEHAVIOR_ALTMILLER_CAVE_WEST_OF_PUDDLE | 75 | |
METATILE_BEHAVIOR_ALTMILLER_CAVE_WEST_OF_PILLAR | 77 | Squall's hall: the ledge just west of the stone pillar, metatile (28, 20). |
METATILE_BEHAVIOR_ALTMILLER_CAVE_CHEST | 100 | The 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.
| Enumerator | Value | Description |
|---|---|---|
WHEEL_SPEEDING_UP | ||
WHEEL_COASTING | ||
WHEEL_SLOWING | ||
WHEEL_STOPPING | ||
WHEEL_STOPPED | 99 |
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.
| Enumerator | Value | Description |
|---|---|---|
WHEEL_SPEED_STEP | TRIG_TURN / 4096 | |
WHEEL_TOP_SPEED | TRIG_TURN * 3 / 64 | |
WHEEL_LOW_SPEED | TRIG_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).
| Enumerator | Value | Description |
|---|---|---|
WALL_BURST_PIECES | 24 |
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.
| Enumerator | Value | Description |
|---|---|---|
CAVE_ROUNDS_MATCHED | 0 | the rounds of lights matched, up to three |
CAVE_PUZZLE | 1 | the rock puzzle's state |
CAVE_CHOSEN_LIGHT | 2 | the light the ring stops with at the top, 0 to 4 |
CAVE_DARKNESS | 4 | the 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.
| Enumerator | Value | Description |
|---|---|---|
PUZZLE_START | ||
PUZZLE_LEFT_ROCK_TURNED | ||
PUZZLE_LIGHTS_SHOWN | ||
PUZZLE_SOLVED | 99 |
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.