src/scene/vale_cave.c
Vale Cave, the optional cave above Vale where Kite, a Jupiter Djinni, hides. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "debug/debug.h"#include "field/field_effect.h"#include "graphics/graphics.h"#include "sound/sound_driver_symbols.h"#include "game/system_call.h"#include "shared/field_effect_create.c"#include "shared/field_effect_spawn.c"#include "shared/pushed_actor.c"#include "shared/log_ride.c"#include "shared/field_effect_duration_scripts.c"#include "shared/pushed_actor_tables.c"#include "shared/scene_entrances_default.c"
Macros
| Name | Description | |
|---|---|---|
#define | WEST_CRATES_SINK_COLUMN 23 | The map columns where the riding log's pool's western and eastern crates sink: the western stack at metatile (23, 39), after two Moves east, and the eastern one at metatile (27, 41), after one Move or push west. |
#define | EAST_CRATES_SINK_COLUMN 27 | |
#define | LEDGE_EDGE_COLUMN 17 | The map column at the west end of the east log's ledge, metatile (17, 16), from which the log rolls off into the pool. |
#define | SOUTH_LOG_SOUTH_ROW 20 | The map row the south log can stop on when pushed north. |
#define | FLAG_KITE (FLAG_DJINNI(DJINNI_KITE)) | The flag of Kite, set once it is caught. |
#define | FLAG_VALE_CAVE_WEST_CRATES_SUNK FLAG_SCENE_TEMP(0x00) | The cave's scene flags: each room reuses them for its own puzzle, so the first room's two have one name at the riding log's pool and another in Kite's part. |
#define | FLAG_VALE_CAVE_EAST_CRATES_SUNK FLAG_SCENE_TEMP(0x01) | The riding log's pool: the eastern crates have sunk into the water. |
#define | FLAG_VALE_CAVE_KITE_RAN_OFF FLAG_SCENE_TEMP(0x00) | Kite's part: Kite has run off once (scValeCaveKiteRunsOff). |
#define | FLAG_VALE_CAVE_KITE_RAN_BEHIND_ROCKS FLAG_SCENE_TEMP(0x01) | Kite's part: Kite has run behind the mossy rocks (scValeCaveKiteRunsBehindRocks). |
#define | FLAG_VALE_CAVE_RIDING_LOG_EAST FLAG_AREA_TEMP(0x01) | The cave's area flags. |
#define | FLAG_VALE_CAVE_KITE_BEHIND_ROCKS FLAG_AREA_TEMP(0x02) | Kite has run behind the mossy rocks and keeps to their far side. |
#define | FLAG_VALE_CAVE_WEST_LOG_PUSHED_OFF_LEDGE FLAG_SCENE_TEMP(0x02) | In the room of logs, the west log has been rolled into the pool. |
#define | FLAG_VALE_CAVE_EAST_LOG_PUSHED_OVER_EDGE FLAG_SCENE_TEMP(0x03) | In the room of logs, the east log has been pushed along its ledge and has rolled off into the pool. |
#define | FLAG_VALE_CAVE_SOUTH_LOG_ON_NORTH_ROW FLAG_SCENE_TEMP(0x04) | In the room of logs, the south log has been pushed north and stopped on the northern of its two rows. |
#define | FLAG_VALE_CAVE_SOUTH_LOG_ON_SOUTH_ROW FLAG_SCENE_TEMP(0x05) | In the room of logs, the south log has been pushed north and stopped on the southern of its two rows (SOUTH_LOG_SOUTH_ROW). |
#define | VALE_CAVE_FACE_LEADER_CALLBACK scValeCaveFaceActorTowardLeader |
Enumerations
| Name | Description | |
|---|---|---|
enum | VALE_CAVE_MOUTH_ACTOR_ID { ACTOR_VALE_CAVE_MOUTH_FIRST_CRATES, ACTOR_VALE_CAVE_MOUTH_FI … } | The clearing's actor placements (ValeCaveMouthActorPlacements), numbered from ACTOR_FIRST_PLACED. |
enum | VALE_CAVE_KITE_ACTOR_ID { ACTOR_KITE, ACTOR_WEST_CRATES, ACTOR_EAST_CRATES, ACTOR_RIDI … } | The first room's actor placements (ValeCaveKiteActorPlacements), numbered from ACTOR_FIRST_PLACED. |
enum | VALE_CAVE_LOGS_ACTOR_ID { ACTOR_WEST_LOG, ACTOR_EAST_LOG, ACTOR_SOUTH_LOG } | The room of logs' actor placements (ValeCaveLogsActorPlacements), numbered from ACTOR_FIRST_PLACED. |
enum | VALE_CAVE_METATILE_BEHAVIOR { METATILE_BEHAVIOR_VALE_CAVE_RIDING_LOG_WEST_END, METATILE_BE … } | The metatiles the cave's step cues answer. |
enum | VALE_CAVE_LOGS_METATILE_BEHAVIOR { METATILE_BEHAVIOR_VALE_CAVE_EAST_LOG_LEDGE, METATILE_BEHAVIO … } | The metatiles of the room of logs' step cues. |
enum | anonymous enum { CRATES_ANIMATION_SUNK } | SPRITE_CRATES sunk into the water: its top crate alone, as a square to walk on (crates.png). |
enum | VALE_CAVE_LOG_ANIMATION { LOG_WEST_EAST_ANIMATION_ROLL } | The pushed logs' animations beyond LOG_ANIMATION, from log_north_south.tsv and log_west_east.tsv, which order theirs alike. |
Functions
| Name | Description | |
|---|---|---|
static void | scValeCaveCenterActorOnMetatile (Sint32 actorId, Sint32 column, Sint32 row) | Centers an actor on a map metatile and gives it underfoot priority. |
static void | scValeCaveApplyEntryState (void) | Restores, on entry, Kite behind its mossy rocks and the crates and logs of the puzzles already solved. |
static void | scValeCaveTalkToKite (void) | Talking to Kite, once Halt has stopped it on the round floor below the ridge, makes the Jupiter Djinni join the party. |
static void | scValeCaveWaitForActorLanding (ACTOR *actor) | Waits for an actor to land, bounded by a one-second timeout. |
static UNREAD_RESULT | scValeCaveFaceActorTowardLeader (ACTOR *actor) | Turns Kite to face the party leader each tick, so that it watches Isaac from behind its rocks. |
const SCENE_ENTRANCE * | scGetEntrances (void) | Selects entrance positions and camera bounds for the current cave room. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Returns the shared packed exits for all cave rooms. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Selects the current room's actor placements, which are Kite, and the crates and logs. |
static void | scValeCaveHideRevealedTile (void) | When Reveal fades in the pool just inside the cave, the post it showed at metatile (15, 15) is gone again and the gap in the row of posts is water. |
static void | scValeCaveRevealHiddenTile (void) | Reveal, cast in the pool just inside the cave's mouth, shows the post missing from the row of posts across the water, at metatile (15, 15), so that Isaac can hop over it to the west side. |
static inline void | scValeCaveSinkActorWithParticles ( Sint32 actorId, Sint32 baseX, Sint32 baseZ, EFFECT_OPTIONS *particleOptions) | Sinks a stack of crates into the water over 68 ticks, with a white splash of spray round it. |
static void | scValeCaveMoveWestCratesIntoWater (void) | Move on the western stack of crates in the riding log's pool sinks it into the water once a second Move has brought it to metatile (23, 39), just south of the floating log. |
static void | scValeCaveMoveEastCratesIntoWater (void) | Move on the eastern stack of crates, at the foot of the rock pillar in the riding log's pool, slides it one metatile west into the water at metatile (27, 41). |
static void | scValeCavePushEastCratesIntoWater (void) | Pushing the eastern stack of crates west, from the bank east of it at metatile (29, 41), slides it a metatile into the water, where it sinks as it does under Move (scValeCaveMoveEastCratesIntoWater). |
static Bool | scValeCaveLeapOffRidingLog (Sint32 unusedArgument) | Walking south off the riding log, once it has carried him to the east side of its pool (metatile (35, 36)), Isaac leaps down onto the rock bank below. |
static void | scValeCaveKiteRunsOff (void) | Walking onto the narrow ridge that runs south between two channels of water in Kite's part (metatile (49, 11)) startles Kite, who stands further down it. |
static void | scValeCaveKiteRunsBehindRocks (void) | Reaching the foot of the ridge (metatile (49, 16)) after Kite has fled makes it run round behind the three mossy rocks on the round floor, where it turns to watch Isaac. |
static void | scValeCaveKiteKeepsAway (void) | As Isaac walks round the three mossy rocks, Kite keeps to their far side, matching his pace, until Halt stops it. |
static void | scValeCaveHaltKite (void) | Halt on Kite stops it where it stands behind the mossy rocks, so that Isaac can walk round and talk to it. |
static void | scValeCavePushLogOverEdge (void) | Pushing the log standing on the ledge east of the pool in the room of logs moves it west a metatile at a time. |
static void | scValeCavePushLogOffLedge (void) | Pushing the log standing on the ledge west of the pool in the room of logs, from metatile (11, 16), rolls it east off the ledge into the pool. |
static void | scValeCavePushLogNorth (void) | Pushing the log that lies across the floor south of the pool in the room of logs north tips it into the pool's south end, where it floats with a splash and makes a way across. |
const CUE * | scGetCues (void) | Selects the current room's step, Psynergy and examine cues. |
Sint32 | scInit (void) | Arriving in any of the three rooms chooses the entry transition and restores the room's puzzle state. |
static void | scValeCaveLeaveRoom (void) | In the clearing outside Vale Cave, Isaac walks into the cave's mouth (metatile (8, 10)) or down either path back to Kraden's cottage: the lower path at metatiles (5..7, 22) or the raised one east of it at (8, 23..25). |
static void | scValeCaveUpdateRidingLogPassage (void) | Puts the riding log at the end of its pool where it was left, and makes that end the one Isaac can step onto. |
static void | scValeCaveRideLogEast (void) | Walking east onto the riding log at the west end of its pool (metatile (23, 35)) has it float east along the north wall with Isaac on it, to the pool's east side, where a post leads to the passage into the room of logs. |
static void | scValeCaveRideLogWest (void) | Walking west onto the riding log at the east end of its pool (metatile (35, 35)) has it float back west along the north wall with Isaac on it. |
static void | scValeCaveTouchRidingLog (void) | Stepping onto either end of the riding log makes it dip under Isaac's step. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | ValeCaveWalkTargets [][2] | The twelve points round Kite's mossy rocks, x then z in pixels, one for each metatile behavior from METATILE_BEHAVIOR_VALE_CAVE_FIRST_KITE_ROUTE on. |
extern SCENE_ENTRANCE | ValeCaveMouthEntrances [] | |
extern SCENE_ENTRANCE | ValeCaveKiteEntrances [] | |
extern SCENE_ENTRANCE | ValeCaveLogsEntrances [] | |
extern Uint32 | ValeCaveExits [] | |
extern ACTOR_PLACE | ValeCaveMouthActorPlacements [] | |
extern ACTOR_PLACE | ValeCaveKiteActorPlacements [] | |
extern ACTOR_PLACE | ValeCaveLogsActorPlacements [] | |
extern CUE | ValeCaveCuesOther [] | |
extern CUE | ValeCaveMouthCues [] | |
extern CUE | ValeCaveKiteCues [] | |
extern CUE | ValeCaveLogsCues [] | |
const Sint32 * | FieldEffectDurationScripts [] | The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION. |
Description
Vale Cave, the optional cave above Vale where Kite, a Jupiter Djinni, hides. Its overlay holds three scenes.
- The clearing outside (Vale,
SceneIdValeCaveMouth), a grassy hillside reached by the two paths that run north past the west side of Kraden's cottage. The lower path comes in at metatiles (5..7, 22) and the raised path east of it at (8, 23..25); both lead back down (scValeCaveLeaveRoom). The cave's mouth is a dark opening in the cliff at metatile (8, 10), beside stacked crates and two logs. The game still calls the clearing Vale, so arriving here clearsFLAG_SHOW_AREA_NAME. - The first room of the cave (
SceneIdValeCaveKite), one map holding three parts that the player meets as separate rooms, joined by passages. Inside the mouth is a pool crossed by hopping from post to post. Reveal shows the post missing from the row, at metatile (15, 15) (scValeCaveRevealHiddenTile). Beyond it, a passage in the north-west leads to a pool with two stacks of crates and a log floating by its north wall. Move or a push sinks the eastern stack into the water, where its top becomes a square to walk across on the way to Kite's part. Two Moves sink the western stack beside the log. Isaac then hops onto the log, which carries him across the pool to the passage on its east side (scValeCaveRideLogEast). - The room of logs (
SceneIdValeCaveLogs). Its southern passage leads round to a pool between two ledges, each with a log standing on it, and a third log lying across the floor south of the water. Isaac rolls the two standing logs into the water, hops down, and pushes the lying log north into the pool, where it floats and lets him across. - Kite's part of the first room, reached from the room of logs and from
the riding log's pool. The Halt Gem's and the Nut's chests are near the
top of a narrow ridge. Walking down the ridge startles Kite, who hops
off its south end onto the round floor below, where three mossy rocks stand
in a row (
scValeCaveKiteRunsOff). Kite then runs round behind the rocks (scValeCaveKiteRunsBehindRocks) and keeps to their far side as Isaac walks round them (scValeCaveKiteKeepsAway). Halt stops it, and talking to it then makes it join the party (scValeCaveTalkToKite,FLAG_KITE).
No story flag is read here and no message is shown. Each room's progress
lives in scene and area flags, and on every arrival scValeCaveApplyEntryState
rebuilds the metatiles of each puzzle already solved and puts Kite back
behind its rocks. The two rooms of the cave proper are one area, so their
area flags (the riding log's end, Kite behind the rocks) last while the party
goes between them.
Macros in detail
WEST_CRATES_SINK_COLUMN
#define WEST_CRATES_SINK_COLUMN 23
The map columns where the riding log's pool's western and eastern crates sink: the western stack at metatile (23, 39), after two Moves east, and the eastern one at metatile (27, 41), after one Move or push west.
Referenced by scValeCaveMoveWestCratesIntoWater().
Definition at line 190 of file vale_cave.c.
EAST_CRATES_SINK_COLUMN
#define EAST_CRATES_SINK_COLUMN 27
Referenced by scValeCaveMoveEastCratesIntoWater().
Definition at line 191 of file vale_cave.c.
LEDGE_EDGE_COLUMN
#define LEDGE_EDGE_COLUMN 17
The map column at the west end of the east log's ledge, metatile (17, 16), from which the log rolls off into the pool.
Referenced by scValeCavePushLogOverEdge().
Definition at line 194 of file vale_cave.c.
SOUTH_LOG_SOUTH_ROW
#define SOUTH_LOG_SOUTH_ROW 20
The map row the south log can stop on when pushed north.
Referenced by scValeCavePushLogNorth().
Definition at line 196 of file vale_cave.c.
FLAG_KITE
#define FLAG_KITE (FLAG_DJINNI(DJINNI_KITE))
The flag of Kite, set once it is caught.
Referenced by scValeCaveApplyEntryState(), ValeCaveKiteActorPlacements, ValeCaveKiteCues and ValeCaveLogsActorPlacements.
Definition at line 199 of file vale_cave.c.
FLAG_VALE_CAVE_WEST_CRATES_SUNK
#define FLAG_VALE_CAVE_WEST_CRATES_SUNK FLAG_SCENE_TEMP(0x00)
The cave's scene flags: each room reuses them for its own puzzle, so the first room's two have one name at the riding log's pool and another in Kite's part. The riding log's pool: the western crates have sunk into the water.
Referenced by scValeCaveApplyEntryState(), scValeCaveMoveWestCratesIntoWater() and ValeCaveKiteCues.
Definition at line 204 of file vale_cave.c.
FLAG_VALE_CAVE_EAST_CRATES_SUNK
#define FLAG_VALE_CAVE_EAST_CRATES_SUNK FLAG_SCENE_TEMP(0x01)
The riding log's pool: the eastern crates have sunk into the water.
Referenced by scValeCaveApplyEntryState(), scValeCaveMoveEastCratesIntoWater() and ValeCaveKiteCues.
Definition at line 206 of file vale_cave.c.
FLAG_VALE_CAVE_KITE_RAN_OFF
#define FLAG_VALE_CAVE_KITE_RAN_OFF FLAG_SCENE_TEMP(0x00)
Kite's part: Kite has run off once (scValeCaveKiteRunsOff).
Referenced by scValeCaveApplyEntryState(), scValeCaveKiteRunsBehindRocks() and scValeCaveKiteRunsOff().
Definition at line 208 of file vale_cave.c.
FLAG_VALE_CAVE_KITE_RAN_BEHIND_ROCKS
#define FLAG_VALE_CAVE_KITE_RAN_BEHIND_ROCKS FLAG_SCENE_TEMP(0x01)
Kite's part: Kite has run behind the mossy rocks
(scValeCaveKiteRunsBehindRocks).
Referenced by scValeCaveApplyEntryState() and scValeCaveKiteRunsBehindRocks().
Definition at line 211 of file vale_cave.c.
FLAG_VALE_CAVE_RIDING_LOG_EAST
#define FLAG_VALE_CAVE_RIDING_LOG_EAST FLAG_AREA_TEMP(0x01)
The cave's area flags. The first room and the room of logs are one area, so these last while the party goes between them; the clearing is another. The riding log is at the east end of its pool.
Referenced by scValeCaveRideLogEast(), scValeCaveRideLogWest() and scValeCaveUpdateRidingLogPassage().
Definition at line 216 of file vale_cave.c.
FLAG_VALE_CAVE_KITE_BEHIND_ROCKS
#define FLAG_VALE_CAVE_KITE_BEHIND_ROCKS FLAG_AREA_TEMP(0x02)
Kite has run behind the mossy rocks and keeps to their far side.
Referenced by scValeCaveApplyEntryState(), scValeCaveKiteKeepsAway() and scValeCaveKiteRunsBehindRocks().
Definition at line 218 of file vale_cave.c.
FLAG_VALE_CAVE_WEST_LOG_PUSHED_OFF_LEDGE
#define FLAG_VALE_CAVE_WEST_LOG_PUSHED_OFF_LEDGE FLAG_SCENE_TEMP(0x02)
In the room of logs, the west log has been rolled into the pool.
Referenced by scValeCaveApplyEntryState() and scValeCavePushLogOffLedge().
Definition at line 229 of file vale_cave.c.
FLAG_VALE_CAVE_EAST_LOG_PUSHED_OVER_EDGE
#define FLAG_VALE_CAVE_EAST_LOG_PUSHED_OVER_EDGE FLAG_SCENE_TEMP(0x03)
In the room of logs, the east log has been pushed along its ledge and has rolled off into the pool.
Referenced by scValeCaveApplyEntryState() and scValeCavePushLogOverEdge().
Definition at line 232 of file vale_cave.c.
FLAG_VALE_CAVE_SOUTH_LOG_ON_NORTH_ROW
#define FLAG_VALE_CAVE_SOUTH_LOG_ON_NORTH_ROW FLAG_SCENE_TEMP(0x04)
In the room of logs, the south log has been pushed north and stopped on the northern of its two rows.
Referenced by scValeCaveApplyEntryState() and scValeCavePushLogNorth().
Definition at line 235 of file vale_cave.c.
FLAG_VALE_CAVE_SOUTH_LOG_ON_SOUTH_ROW
#define FLAG_VALE_CAVE_SOUTH_LOG_ON_SOUTH_ROW FLAG_SCENE_TEMP(0x05)
In the room of logs, the south log has been pushed north and stopped on the
southern of its two rows (SOUTH_LOG_SOUTH_ROW).
Referenced by scValeCaveApplyEntryState() and scValeCavePushLogNorth().
Definition at line 238 of file vale_cave.c.
VALE_CAVE_FACE_LEADER_CALLBACK
#define VALE_CAVE_FACE_LEADER_CALLBACK scValeCaveFaceActorTowardLeader
#define VALE_CAVE_FACE_LEADER_CALLBACK
Referenced by scValeCaveApplyEntryState() and scValeCaveKiteRunsBehindRocks().
Definition at lines 276 and 278 of file vale_cave.c.
Enumerations in detail
VALE_CAVE_MOUTH_ACTOR_ID
enum VALE_CAVE_MOUTH_ACTOR_ID
The clearing's actor placements (ValeCaveMouthActorPlacements), numbered from
ACTOR_FIRST_PLACED.
They are three stacks of crates, drawn as the crates of the Bilibin Barricade
in bilibin.c, then two logs, as in Kolima Forest. None of them moves.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_VALE_CAVE_MOUTH_FIRST_CRATES | ACTOR_FIRST_PLACED | |
ACTOR_VALE_CAVE_MOUTH_FIRST_LOG | ACTOR_FIRST_PLACED + 3 | |
ACTOR_VALE_CAVE_MOUTH_SECOND_LOG |
Definition at line 70 of file vale_cave.c.
VALE_CAVE_KITE_ACTOR_ID
enum VALE_CAVE_KITE_ACTOR_ID
The first room's actor placements (ValeCaveKiteActorPlacements), numbered
from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_KITE | ACTOR_FIRST_PLACED | Kite, a Jupiter Djinni, placed until it joins (FLAG_KITE). |
ACTOR_WEST_CRATES | The two stacks of crates at the edge of | |
ACTOR_EAST_CRATES | the riding log's pool, which sink into the water. The western stack sinks under Move, the eastern one under Move or a push. | |
ACTOR_RIDING_LOG | The log floating by the north wall of its pool, which carries Isaac from one end of the pool to the other. It is drawn as the north-south log of Colosso's Lumber Water Crossing Area (colosseum_azart_match.c). | |
ACTOR_FIRST_STANDING_CRATES | Two stacks of crates and two logs, stacked by the passage to the room of logs as they are at the cave's mouth. | |
ACTOR_SECOND_STANDING_CRATES | ||
ACTOR_FIRST_STANDING_LOG | ||
ACTOR_SECOND_STANDING_LOG |
Definition at line 79 of file vale_cave.c.
VALE_CAVE_LOGS_ACTOR_ID
enum VALE_CAVE_LOGS_ACTOR_ID
The room of logs' actor placements (ValeCaveLogsActorPlacements), numbered
from ACTOR_FIRST_PLACED.
Its first row places Kite as the first room's does, out of sight of this room. Its three logs are pushed, and are drawn as Kolima Forest's.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_WEST_LOG | ACTOR_FIRST_PLACED + 1 | Standing on the ledge west of the pool, rolled east into the water. |
ACTOR_EAST_LOG | Standing on the ledge east of the pool, pushed west until it rolls off. | |
ACTOR_SOUTH_LOG | Lying west to east across the floor south of the pool, pushed north. |
Definition at line 108 of file vale_cave.c.
VALE_CAVE_METATILE_BEHAVIOR
enum VALE_CAVE_METATILE_BEHAVIOR
The metatiles the cave's step cues answer.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_VALE_CAVE_RIDING_LOG_WEST_END | 20 | The riding log's |
METATILE_BEHAVIOR_VALE_CAVE_RIDING_LOG_EAST_END | west end, metatiles (23, 34..36), and its east end, metatiles (35, 34..36). Only the end the log lies at holds its behavior. | |
METATILE_BEHAVIOR_VALE_CAVE_EAST_CRATES_BANK | 24 | The bank east of the riding log's pool's eastern crates, metatile (29, 41). |
METATILE_BEHAVIOR_VALE_CAVE_KITE_RIDGE_TOP | 40 | In Kite's part, the |
METATILE_BEHAVIOR_VALE_CAVE_KITE_RIDGE_FOOT | top of the ridge, metatile (49, 11), and its foot, metatile (49, 16). | |
METATILE_BEHAVIOR_VALE_CAVE_FIRST_KITE_ROUTE | 45 | The first of the twelve metatile behaviors on the ring of floor round Kite's mossy rocks |
METATILE_BEHAVIOR_VALE_CAVE_HALT_GEM_CHEST | 100 | (scValeCaveKiteKeepsAway), one for each of ValeCaveWalkTargets. In Kite's part, the |
METATILE_BEHAVIOR_VALE_CAVE_NUT_CHEST | chests of the Halt Gem and of the Nut. |
Definition at line 122 of file vale_cave.c.
VALE_CAVE_LOGS_METATILE_BEHAVIOR
enum VALE_CAVE_LOGS_METATILE_BEHAVIOR
The metatiles of the room of logs' step cues.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_VALE_CAVE_EAST_LOG_LEDGE | 20 | The ledge east of the east log, metatiles (20, 16..17). |
METATILE_BEHAVIOR_VALE_CAVE_WEST_LOG_LEDGE | The ledge west of the west log, metatiles (11, 16..17). | |
METATILE_BEHAVIOR_VALE_CAVE_SOUTH_LOG_FLOOR | The floor south of the south log, metatiles (13..16, 23). |
Definition at line 158 of file vale_cave.c.
anonymous enum
enum { CRATES_ANIMATION_SUNK }
SPRITE_CRATES sunk into the water: its top crate alone, as a square to walk
on (crates.png).
| Enumerator | Value | Description |
|---|---|---|
CRATES_ANIMATION_SUNK | 2 |
Definition at line 173 of file vale_cave.c.
VALE_CAVE_LOG_ANIMATION
enum VALE_CAVE_LOG_ANIMATION
The pushed logs' animations beyond LOG_ANIMATION, from log_north_south.tsv
and log_west_east.tsv, which order theirs alike.
| Enumerator | Value | Description |
|---|---|---|
LOG_WEST_EAST_ANIMATION_ROLL | 3 | log_west_east.tsv's roll in the order of LOG_ANIMATION_ROLL_WEST, as the south log tips north into the pool. |
Definition at line 180 of file vale_cave.c.
Functions in detail
scValeCaveCenterActorOnMetatile
static void scValeCaveCenterActorOnMetatile(Sint32 actorId, Sint32 column, Sint32 row)
Centers an actor on a map metatile and gives it underfoot priority.
References fdActorGet(), fdActorSetSpritePriority() and Sint32.
Referenced by scValeCaveUpdateRidingLogPassage().
Definition at lines 220 and 862 of file vale_cave.c.
scValeCaveApplyEntryState
static void scValeCaveApplyEntryState(void)
Restores, on entry, Kite behind its mossy rocks and the crates and logs of the puzzles already solved.
References fdActorGet(), fdActorSetSpritePriority(), fdMapGridCopyMetatileAttributes(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scMapGridFillCollisionRectangle(), scPushedActorBlockFootprint(), scValeCaveUpdateRidingLogPassage(), Sint32 and sySynch().
Referenced by scInit().
Definition at lines 222 and 879 of file vale_cave.c.
scValeCaveTalkToKite
static void scValeCaveTalkToKite(void)
Talking to Kite, once Halt has stopped it on the round floor below the ridge, makes the Jupiter Djinni join the party.
References fdDjinnJoinParty().
Referenced by ValeCaveKiteCues.
Definition at line 242 of file vale_cave.c.
scValeCaveWaitForActorLanding
static void scValeCaveWaitForActorLanding(ACTOR *actor)
Waits for an actor to land, bounded by a one-second timeout.
References Sint32 and sySynch().
Referenced by scValeCavePushLogOffLedge() and scValeCavePushLogOverEdge().
Definition at line 248 of file vale_cave.c.
scValeCaveFaceActorTowardLeader
static UNREAD_RESULT scValeCaveFaceActorTowardLeader(ACTOR *actor)
Turns Kite to face the party leader each tick, so that it watches Isaac from behind its rocks.
References fdActorGet() and syAtan().
Definition at line 264 of file vale_cave.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
Selects entrance positions and camera bounds for the current cave room.
References MainRoutineStateWork, SceneFallbackEntrances, ValeCaveKiteEntrances, ValeCaveLogsEntrances and ValeCaveMouthEntrances.
Definition at line 283 of file vale_cave.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 302 of file vale_cave.c.
scGetExits
const Uint32 *scGetExits(void)
Returns the shared packed exits for all cave rooms.
References ValeCaveExits.
Definition at line 308 of file vale_cave.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Selects the current room's actor placements, which are Kite, and the crates and logs.
References MainRoutineStateWork, ValeCaveKiteActorPlacements, ValeCaveLogsActorPlacements and ValeCaveMouthActorPlacements.
Definition at line 315 of file vale_cave.c.
scValeCaveHideRevealedTile
static void scValeCaveHideRevealedTile(void)
When Reveal fades in the pool just inside the cave, the post it showed at metatile (15, 15) is gone again and the gap in the row of posts is water.
References fdMapGridCopyMetatiles().
Referenced by ValeCaveKiteCues.
Definition at line 336 of file vale_cave.c.
scValeCaveRevealHiddenTile
static void scValeCaveRevealHiddenTile(void)
Reveal, cast in the pool just inside the cave's mouth, shows the post missing from the row of posts across the water, at metatile (15, 15), so that Isaac can hop over it to the west side.
The post is copied from a spare one at metatile (16, 17), and
scValeCaveHideRevealedTile puts the water back when Reveal fades.
References fdMapGridCopyMetatiles().
Referenced by ValeCaveKiteCues.
Definition at line 347 of file vale_cave.c.
scValeCaveSinkActorWithParticles
static inline void scValeCaveSinkActorWithParticles( Sint32 actorId, Sint32 baseX, Sint32 baseZ, EFFECT_OPTIONS *particleOptions)
Sinks a stack of crates into the water over 68 ticks, with a white splash of spray round it.
References fdActorGet(), fdScriptWait() and Sint32.
Referenced by scValeCaveMoveEastCratesIntoWater() and scValeCaveMoveWestCratesIntoWater().
Definition at line 354 of file vale_cave.c.
scValeCaveMoveWestCratesIntoWater
static void scValeCaveMoveWestCratesIntoWater(void)
Move on the western stack of crates in the riding log's pool sinks it into the water once a second Move has brought it to metatile (23, 39), just south of the floating log. Its top is then a square Isaac hops onto, on his way to the log.
The game's Move has already slid the stack a metatile east. Short of the sink column the script does nothing more.
References fdActorFaceDirection(), fdActorGet(), fdActorMoveToAndWait(), fdActorRelease(), fdActorSetAnimation(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scPlaceTranslucentBlackActorFX(), scValeCaveSinkActorWithParticles() and sySoundPlay().
Referenced by ValeCaveKiteCues.
Definition at line 384 of file vale_cave.c.
scValeCaveMoveEastCratesIntoWater
static void scValeCaveMoveEastCratesIntoWater(void)
Move on the eastern stack of crates, at the foot of the rock pillar in the riding log's pool, slides it one metatile west into the water at metatile (27, 41). It sinks with a splash until only its top shows, a square of floor Isaac can walk across.
References fdActorGet(), fdActorRelease(), fdActorSetAnimation(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scPlaceTranslucentBlackActorFX(), scValeCaveSinkActorWithParticles() and sySoundPlay().
Referenced by scValeCavePushEastCratesIntoWater() and ValeCaveKiteCues.
Definition at line 432 of file vale_cave.c.
scValeCavePushEastCratesIntoWater
static void scValeCavePushEastCratesIntoWater(void)
Pushing the eastern stack of crates west, from the bank east of it at
metatile (29, 41), slides it a metatile into the water, where it sinks as it
does under Move (scValeCaveMoveEastCratesIntoWater).
References fdScriptEnd(), fdScriptStart(), scPushedActorAdvancePair() and scValeCaveMoveEastCratesIntoWater().
Referenced by ValeCaveKiteCues.
Definition at line 480 of file vale_cave.c.
scValeCaveLeapOffRidingLog
static Bool scValeCaveLeapOffRidingLog(Sint32 unusedArgument)
Walking south off the riding log, once it has carried him to the east side of its pool (metatile (35, 36)), Isaac leaps down onto the rock bank below.
He lands two metatiles south, at metatile (35, 38), and only if nothing stands there.
References fdActorGet(), fdActorMoveToAndWait(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdScriptEnd(), fdScriptStart(), scFieldActorCheckMovementCollision(), Sint32, sySoundPlay() and sySynch().
Referenced by ValeCaveKiteCues.
Definition at line 493 of file vale_cave.c.
scValeCaveKiteRunsOff
static void scValeCaveKiteRunsOff(void)
Walking onto the narrow ridge that runs south between two channels of water in Kite's part (metatile (49, 11)) startles Kite, who stands further down it. The camera follows Kite as it gives a start and hops off the ridge's south end onto the round floor below.
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAttachedEffect(), fdActorWalkToAndWait(), fdCameraFollowActor(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), fdScriptWait(), gmFlagSet() and sySoundPlay().
Referenced by ValeCaveKiteCues.
Definition at line 539 of file vale_cave.c.
scValeCaveKiteRunsBehindRocks
static void scValeCaveKiteRunsBehindRocks(void)
Reaching the foot of the ridge (metatile (49, 16)) after Kite has fled makes it run round behind the three mossy rocks on the round floor, where it turns to watch Isaac.
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAttachedEffect(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), fdScriptWait(), gmFlagGet() and gmFlagSet().
Referenced by ValeCaveKiteCues.
Definition at line 569 of file vale_cave.c.
scValeCaveKiteKeepsAway
static void scValeCaveKiteKeepsAway(void)
As Isaac walks round the three mossy rocks, Kite keeps to their far side, matching his pace, until Halt stops it.
Each metatile of the ring of floor round the rocks (metatiles (46..52,
17..20)) sends Kite to the point opposite, from ValeCaveWalkTargets.
References fdActorGet(), fdActorWalkTo(), gmFlagGet(), MainRoutineStateWork, Sint32, state and ValeCaveWalkTargets.
Referenced by ValeCaveKiteCues.
Definition at line 599 of file vale_cave.c.
scValeCaveHaltKite
static void scValeCaveHaltKite(void)
Halt on Kite stops it where it stands behind the mossy rocks, so that Isaac can walk round and talk to it.
References fdActorSetAnimation(), fdScriptEnd() and fdScriptStart().
Referenced by ValeCaveKiteCues.
Definition at line 620 of file vale_cave.c.
scValeCavePushLogOverEdge
static void scValeCavePushLogOverEdge(void)
Pushing the log standing on the ledge east of the pool in the room of logs moves it west a metatile at a time. At the ledge's west end, metatile (17, 16), it rolls off into the pool.
References fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetSpritePriority(), fdActorWaitForMoveById(), fdScriptEnd(), fdScriptStart(), gmFlagSet(), scMapGridFillCollisionRectangle(), scPushedActorFindClearPos(), scPushedActorRoll(), scValeCaveWaitForActorLanding() and sySoundPlay().
Referenced by ValeCaveLogsCues.
Definition at line 630 of file vale_cave.c.
scValeCavePushLogOffLedge
static void scValeCavePushLogOffLedge(void)
Pushing the log standing on the ledge west of the pool in the room of logs, from metatile (11, 16), rolls it east off the ledge into the pool.
References fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetSpritePriority(), fdActorWaitForMoveById(), fdScriptEnd(), fdScriptPlaySound(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scMapGridFillCollisionRectangle(), scValeCaveWaitForActorLanding() and sySoundPlay().
Referenced by ValeCaveLogsCues.
Definition at line 683 of file vale_cave.c.
scValeCavePushLogNorth
static void scValeCavePushLogNorth(void)
Pushing the log that lies across the floor south of the pool in the room of logs north tips it into the pool's south end, where it floats with a splash and makes a way across.
References fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scMapGridFillCollisionRectangle(), scPushedActorFindClearPos(), scPushedActorRoll() and sySoundPlay().
Referenced by ValeCaveLogsCues.
Definition at line 722 of file vale_cave.c.
scGetCues
const CUE *scGetCues(void)
Selects the current room's step, Psynergy and examine cues.
References MainRoutineStateWork, ValeCaveCuesOther, ValeCaveKiteCues, ValeCaveLogsCues and ValeCaveMouthCues.
Definition at line 759 of file vale_cave.c.
scInit
Sint32 scInit(void)
Arriving in any of the three rooms chooses the entry transition and restores the room's puzzle state.
References fdActorSetSpritePriority(), gmFlagClear(), MainRoutineStateWork, scValeCaveApplyEntryState(), Sint32 and sySynch().
Definition at line 780 of file vale_cave.c.
scValeCaveLeaveRoom
static void scValeCaveLeaveRoom(void)
In the clearing outside Vale Cave, Isaac walks into the cave's mouth (metatile (8, 10)) or down either path back to Kraden's cottage: the lower path at metatiles (5..7, 22) or the raised one east of it at (8, 23..25).
Each plays the exit sound first. The metatile's behavior is the exit's number.
References Sint32, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by ValeCaveMouthCues.
Definition at line 803 of file vale_cave.c.
scValeCaveUpdateRidingLogPassage
static void scValeCaveUpdateRidingLogPassage(void)
Puts the riding log at the end of its pool where it was left, and makes that end the one Isaac can step onto.
The passage's metatiles are copied back from their spare copy at metatiles (0..12, 34..36), and the far end is then covered with water.
References fdMapGridCopyMetatileAttributes(), gmFlagGet() and scValeCaveCenterActorOnMetatile().
Referenced by scValeCaveApplyEntryState(), scValeCaveRideLogEast() and scValeCaveRideLogWest().
Definition at line 816 of file vale_cave.c.
scValeCaveRideLogEast
static void scValeCaveRideLogEast(void)
Walking east onto the riding log at the west end of its pool (metatile (23, 35)) has it float east along the north wall with Isaac on it, to the pool's east side, where a post leads to the passage into the room of logs.
References gmFlagSet(), scActorFloatLogWithLeader(), scValeCaveUpdateRidingLogPassage(), sySoundPlay() and sySynch().
Referenced by ValeCaveKiteCues.
Definition at line 837 of file vale_cave.c.
scValeCaveRideLogWest
static void scValeCaveRideLogWest(void)
Walking west onto the riding log at the east end of its pool (metatile (35, 35)) has it float back west along the north wall with Isaac on it.
References gmFlagClear(), scActorFloatLogWithLeader(), scValeCaveUpdateRidingLogPassage(), sySoundPlay() and sySynch().
Referenced by ValeCaveKiteCues.
Definition at line 850 of file vale_cave.c.
scValeCaveTouchRidingLog
static void scValeCaveTouchRidingLog(void)
Stepping onto either end of the riding log makes it dip under Isaac's step. Setting it bobbing first starts the dip over if it is already playing.
References fdActorSetAnimation().
Referenced by ValeCaveKiteCues.
Definition at line 1006 of file vale_cave.c.
Variables in detail
ValeCaveWalkTargets
extern Sint32 ValeCaveWalkTargets[][2]
Sint32 ValeCaveWalkTargets[][2]
The twelve points round Kite's mossy rocks, x then z in pixels, one for each metatile behavior
from METATILE_BEHAVIOR_VALE_CAVE_FIRST_KITE_ROUTE on.
References Sint32.
Referenced by scValeCaveKiteKeepsAway().
Definition at lines 52 and 1019 of file vale_cave.c.
ValeCaveMouthEntrances
extern SCENE_ENTRANCE ValeCaveMouthEntrances[]
SCENE_ENTRANCE ValeCaveMouthEntrances[]
Referenced by scGetEntrances().
Definition at lines 53 and 1042 of file vale_cave.c.
ValeCaveKiteEntrances
extern SCENE_ENTRANCE ValeCaveKiteEntrances[]
SCENE_ENTRANCE ValeCaveKiteEntrances[]
Referenced by scGetEntrances().
Definition at lines 54 and 1053 of file vale_cave.c.
ValeCaveLogsEntrances
extern SCENE_ENTRANCE ValeCaveLogsEntrances[]
SCENE_ENTRANCE ValeCaveLogsEntrances[]
Referenced by scGetEntrances().
Definition at lines 55 and 1078 of file vale_cave.c.
ValeCaveExits
extern Uint32 ValeCaveExits[]
Uint32 ValeCaveExits[]
Referenced by scGetExits().
Definition at lines 56 and 1093 of file vale_cave.c.
ValeCaveMouthActorPlacements
extern ACTOR_PLACE ValeCaveMouthActorPlacements[]
ACTOR_PLACE ValeCaveMouthActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 57 and 1138 of file vale_cave.c.
ValeCaveKiteActorPlacements
extern ACTOR_PLACE ValeCaveKiteActorPlacements[]
ACTOR_PLACE ValeCaveKiteActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 58 and 1152 of file vale_cave.c.
ValeCaveLogsActorPlacements
extern ACTOR_PLACE ValeCaveLogsActorPlacements[]
ACTOR_PLACE ValeCaveLogsActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 59 and 1172 of file vale_cave.c.
ValeCaveCuesOther
extern CUE ValeCaveCuesOther[]
CUE ValeCaveCuesOther[]
Referenced by scGetCues().
Definition at lines 60 and 1184 of file vale_cave.c.
ValeCaveMouthCues
extern CUE ValeCaveMouthCues[]
CUE ValeCaveMouthCues[]
References scValeCaveLeaveRoom().
Referenced by scGetCues().
Definition at lines 61 and 1188 of file vale_cave.c.
ValeCaveKiteCues
extern CUE ValeCaveKiteCues[]
CUE ValeCaveKiteCues[]
References scValeCaveHaltKite(), scValeCaveHideRevealedTile(), scValeCaveKiteKeepsAway(), scValeCaveKiteRunsBehindRocks(), scValeCaveKiteRunsOff(), scValeCaveLeapOffRidingLog(), scValeCaveMoveEastCratesIntoWater(), scValeCaveMoveWestCratesIntoWater(), scValeCavePushEastCratesIntoWater(), scValeCaveRevealHiddenTile(), scValeCaveRideLogEast(), scValeCaveRideLogWest(), scValeCaveTalkToKite() and scValeCaveTouchRidingLog().
Referenced by scGetCues().
Definition at lines 62 and 1198 of file vale_cave.c.
ValeCaveLogsCues
extern CUE ValeCaveLogsCues[]
CUE ValeCaveLogsCues[]
References scValeCavePushLogNorth(), scValeCavePushLogOffLedge() and scValeCavePushLogOverEdge().
Referenced by scGetCues().
Definition at lines 63 and 1272 of file vale_cave.c.
FieldEffectDurationScripts
const Sint32 *FieldEffectDurationScripts[]
References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.
Definition at line 1034 of file vale_cave.c.