The cave above Vale: three rooms of Psynergy puzzles, where the Jupiter Djinni Kite hides. More...
Go to the source code of this file.
Macros | |
| #define | ACTOR_KITE 8 |
| #define | WESTERN_MOVABLE_OBJECT 9 |
| #define | EASTERN_MOVABLE_OBJECT 10 |
| #define | SLIDING_OBJECT 11 |
| #define | OBJECT_SINK_FRAMES 68 |
| #define | OBJECT_SINK_STEP 0x8000 |
| #define | ACTOR_LANDING_TIMEOUT 60 |
| #define | FIRST_DJINNI_ROUTE_TRIGGER 45 |
| #define | FLAG_KITE (FLAG_DJINNI_0 + 3 * 20 + 4) |
| The flag of Kite, set once it is caught. | |
| #define | FLAG_VALE_CAVE_SLIDERS_EAST 0x301 |
| The sliding objects of the second room are at their eastern end. | |
| #define | FLAG_VALE_CAVE_KITE_BEHIND_LEDGE 0x302 |
| Kite has run behind the ledge and keeps to its far side. | |
| #define | VALE_CAVE_FACE_LEADER_CALLBACK ((void (*)(union FieldObject *))ValeCave_FaceActorTowardLeader) |
| #define | DIRECTION_STEP(dx, dz) |
Functions | |
| static void | ValeCave_CenterActorOnCell (s32 actorId, s32 column, s32 row) |
| Centers an actor on a map cell and gives it underfoot priority. | |
| static void | ValeCave_ApplyEntryState (void) |
| Restores the Djinni route and completed movable-object puzzles on entry. | |
| static void | Event_TalkToKite (void) |
| Talking to Kite after Halt: it joins the party. | |
| static void | ValeCave_WaitForActorLanding (struct FieldActor *actor) |
| Waits for an actor to land, bounded by a one-second timeout. | |
| static s32 | ValeCave_FaceActorTowardLeader (union FieldObject *fieldObject) |
| Turns Kite to face the party leader each frame. | |
| const struct SceneEntrance * | ValeCave_GetEntrances (void) |
| Selects entrance positions and camera bounds for the current cave room. | |
| const struct SceneRegion * | ValeCave_GetRegions (void) |
| const u32 * | ValeCave_GetExits (void) |
| Returns the shared packed exits for all cave rooms. | |
| const struct ScenePlacement * | ValeCave_GetPlacements (void) |
| Selects the current room's actors and movable objects. | |
| static void | Event_HideRevealedTile (void) |
| Reveal ends: the hidden tile is hidden again. | |
| static void | Event_RevealHiddenTile (void) |
| Reveal shows a hidden tile in the second room. | |
| static void | ValeCave_SinkObjectWithParticles (s32 actorId, s32 baseX, s32 baseZ, struct EffectOptions *particleOptions) |
| Lowers one object while emitting a particle each frame around its opening. | |
| static void | Event_MoveWestObjectIntoHole (void) |
| Move on the western object: once over its hole, Isaac steps aside and the object sinks into the floor in a cloud of dust. | |
| static void | Event_MoveEastObjectIntoHole (void) |
| Move on the eastern object: once over its hole, it sinks into the floor. | |
| static void | Event_PushEastObjectIntoHole (void) |
| Pushing the eastern object: it moves a cell, and sinks if over its hole. | |
| static s32 | Event_HopDownLedge (s32 unusedArgument) |
| Walking south off the ledge: Isaac hops down if the cell below is free. | |
| static void | Event_KiteRunsOff (void) |
| Coming near Kite: the camera finds it; it notices the party and hops away up the ledge. | |
| static void | Event_KiteRunsBehindLedge (void) |
| Coming near again: Kite runs behind the ledge and turns to watch the party. | |
| static void | Event_KiteKeepsAway (void) |
| Walking around the ledge: Kite keeps to the far side of it, unless Halt has stopped it. | |
| static void | Event_HaltKite (void) |
| Halt on Kite: it stops where it stands. | |
| static void | Event_PushObjectOverEdge (void) |
| Pushing an object along the ledge: at its edge the object falls off, opening the way. | |
| static void | Event_PushObjectOffLedge (void) |
| Pushing the western object east: it falls off the ledge, opening the way. | |
| static void | Event_PushObjectNorth (void) |
| Pushing the object north: it slides a cell, opening the way. | |
| const struct SceneEvent * | ValeCave_GetEvents (void) |
| Selects the current room's touch, Psynergy and search bindings. | |
| s32 | ValeCave_Initialize (void) |
| Chooses the entry transition and restores the room's puzzle state. | |
| static void | Event_LeaveRoom (void) |
| The first room's exits play the exit sound before leaving. | |
| static void | ValeCave_UpdateSlidingObjectPassage (void) |
| Rebuilds the passage cells around the sliding object's saved side. | |
| static void | Event_SlideObjectsEast (void) |
| Walking east onto the sliding objects: they slide to the eastern end. | |
| static void | Event_SlideObjectsWest (void) |
| Walking west onto the sliding objects: they slide back to the western end. | |
| static void | Event_TouchSlidingObjects (void) |
| Touching the sliding objects restarts their animation. | |
Variables | |
| s32 | gEffectScript0 [] |
| s32 | gEffectScript1 [] |
| s32 | gEffectScript2 [] |
| s32 | gStagedActor_DirectionSteps [] |
| Pixel step by direction: X in the upper halfword, Z in the lower. | |
| u32 | gStagedActor_FootprintKinds [] |
| s32 | gStagedActor_FootprintBounds [] |
| s32 | gValeCave_WalkTargets [] |
| const s32 * | gEffectScripts [] |
| struct SceneEntrance | gValeCave_EntrancesOther [] |
| struct SceneEntrance | gValeCave_Entrances1 [] |
| struct SceneEntrance | gValeCave_Entrances2 [] |
| struct SceneEntrance | gValeCave_Entrances3 [] |
| u32 | gValeCave_Exits [] |
| struct ScenePlacement | gValeCave_Placements1 [] |
| struct ScenePlacement | gValeCave_Placements2 [] |
| struct ScenePlacement | gValeCave_Placements3 [] |
| struct SceneEvent | gValeCave_EventsOther [] |
| struct SceneEvent | gValeCave_Events1 [] |
| struct SceneEvent | gValeCave_Events2 [] |
| struct SceneEvent | gValeCave_Events3 [] |
The cave above Vale: three rooms of Psynergy puzzles, where the Jupiter Djinni Kite hides.
Djinn_JoinParty(ACTOR_KITE, 3, 4) gives Jupiter Djinni 4, and the fifth Jupiter Djinni the text names is Kite.
Definition in file vale_cave.c.
| #define ACTOR_KITE 8 |
Definition at line 47 of file vale_cave.c.
Referenced by Event_HaltKite(), Event_KiteKeepsAway(), Event_KiteRunsBehindLedge(), Event_KiteRunsOff(), Event_TalkToKite(), and ValeCave_ApplyEntryState().
| #define WESTERN_MOVABLE_OBJECT 9 |
Definition at line 48 of file vale_cave.c.
Referenced by Event_MoveEastObjectIntoHole(), Event_MoveWestObjectIntoHole(), Event_PushObjectOffLedge(), and ValeCave_ApplyEntryState().
| #define EASTERN_MOVABLE_OBJECT 10 |
Definition at line 49 of file vale_cave.c.
Referenced by Event_MoveEastObjectIntoHole(), Event_PushObjectOverEdge(), and ValeCave_ApplyEntryState().
| #define SLIDING_OBJECT 11 |
Definition at line 50 of file vale_cave.c.
Referenced by Event_PushObjectNorth(), Event_SlideObjectsEast(), Event_SlideObjectsWest(), Event_TouchSlidingObjects(), ValeCave_ApplyEntryState(), ValeCave_Initialize(), and ValeCave_UpdateSlidingObjectPassage().
| #define OBJECT_SINK_FRAMES 68 |
Definition at line 51 of file vale_cave.c.
Referenced by ValeCave_SinkObjectWithParticles().
| #define OBJECT_SINK_STEP 0x8000 |
Definition at line 52 of file vale_cave.c.
Referenced by ValeCave_SinkObjectWithParticles().
| #define ACTOR_LANDING_TIMEOUT 60 |
Definition at line 53 of file vale_cave.c.
Referenced by ValeCave_WaitForActorLanding().
| #define FIRST_DJINNI_ROUTE_TRIGGER 45 |
Definition at line 54 of file vale_cave.c.
Referenced by Event_KiteKeepsAway().
| #define FLAG_KITE (FLAG_DJINNI_0 + 3 * 20 + 4) |
The flag of Kite, set once it is caught.
Definition at line 57 of file vale_cave.c.
Referenced by ValeCave_ApplyEntryState().
| #define FLAG_VALE_CAVE_SLIDERS_EAST 0x301 |
The sliding objects of the second room are at their eastern end.
Definition at line 70 of file vale_cave.c.
Referenced by Event_SlideObjectsEast(), Event_SlideObjectsWest(), and ValeCave_UpdateSlidingObjectPassage().
| #define FLAG_VALE_CAVE_KITE_BEHIND_LEDGE 0x302 |
Kite has run behind the ledge and keeps to its far side.
Definition at line 72 of file vale_cave.c.
Referenced by Event_KiteKeepsAway(), Event_KiteRunsBehindLedge(), and ValeCave_ApplyEntryState().
| #define VALE_CAVE_FACE_LEADER_CALLBACK ((void (*)(union FieldObject *))ValeCave_FaceActorTowardLeader) |
Definition at line 127 of file vale_cave.c.
Referenced by Event_KiteRunsBehindLedge(), and ValeCave_ApplyEntryState().
| #define DIRECTION_STEP | ( | dx, | |
| dz ) |
Definition at line 821 of file vale_cave.c.
Centers an actor on a map cell and gives it underfoot priority.
Definition at line 689 of file vale_cave.c.
Referenced by ValeCave_CenterActorOnCell(), and ValeCave_UpdateSlidingObjectPassage().
|
static |
Restores the Djinni route and completed movable-object puzzles on entry.
Called by ValeCave_Initialize. In Kite's part of the second room (entrances 5 to 7), while Kite is free and FLAG_VALE_CAVE_KITE_BEHIND_LEDGE is set, it sets FLAG_SCENE_TEMP_00 (and _01 from entrance 5) and puts Kite back behind the ledge.
Definition at line 707 of file vale_cave.c.
Referenced by ValeCave_ApplyEntryState(), and ValeCave_Initialize().
|
static |
Talking to Kite after Halt: it joins the party.
Scene_TalkToActor selects this kind 7 event while Kite is the paused actor. Gives Jupiter Djinni 4, setting FLAG_KITE so neither room places Kite again.
Definition at line 85 of file vale_cave.c.
Referenced by Event_TalkToKite().
|
static |
Waits for an actor to land, bounded by a one-second timeout.
Definition at line 88 of file vale_cave.c.
Referenced by Event_PushObjectOffLedge(), Event_PushObjectOverEdge(), and ValeCave_WaitForActorLanding().
|
static |
Turns Kite to face the party leader each frame.
Kite's update hook once it has run behind the ledge, set by Event_KiteRunsBehindLedge and again by ValeCave_ApplyEntryState.
Definition at line 109 of file vale_cave.c.
Referenced by ValeCave_FaceActorTowardLeader().
| const struct SceneEntrance * ValeCave_GetEntrances | ( | void | ) |
Selects entrance positions and camera bounds for the current cave room.
Definition at line 132 of file vale_cave.c.
Referenced by ValeCave_GetEntrances().
| const struct SceneRegion * ValeCave_GetRegions | ( | void | ) |
Definition at line 147 of file vale_cave.c.
Referenced by ValeCave_GetRegions().
| const u32 * ValeCave_GetExits | ( | void | ) |
Returns the shared packed exits for all cave rooms.
Definition at line 150 of file vale_cave.c.
Referenced by ValeCave_GetExits().
| const struct ScenePlacement * ValeCave_GetPlacements | ( | void | ) |
Selects the current room's actors and movable objects.
Definition at line 153 of file vale_cave.c.
Referenced by ValeCave_GetPlacements().
|
static |
Reveal ends: the hidden tile is hidden again.
Reached by Reveal's phase 4 anywhere in the second room.
Definition at line 171 of file vale_cave.c.
Referenced by Event_HideRevealedTile().
|
static |
Reveal shows a hidden tile in the second room.
Reached by Reveal's phase 5 anywhere in the second room; copies cell (16, 17) over cell (15, 15) until Event_HideRevealedTile puts it back.
Definition at line 179 of file vale_cave.c.
Referenced by Event_RevealHiddenTile().
|
inlinestatic |
Lowers one object while emitting a particle each frame around its opening.
Definition at line 185 of file vale_cave.c.
Referenced by Event_MoveEastObjectIntoHole(), Event_MoveWestObjectIntoHole(), and ValeCave_SinkObjectWithParticles().
|
static |
Move on the western object: once over its hole, Isaac steps aside and the object sinks into the floor in a cloud of dust.
Reached by Move on the western object (actor 9) in the second room, until FLAG_SCENE_TEMP_00 is set. Over its hole (column 23) it sets FLAG_SCENE_TEMP_00 and makes the hole's cells walkable.
Definition at line 206 of file vale_cave.c.
Referenced by Event_MoveWestObjectIntoHole().
|
static |
Move on the eastern object: once over its hole, it sinks into the floor.
Reached by Move on the eastern object (actor 10) in the second room, until FLAG_SCENE_TEMP_01 is set, and from Event_PushEastObjectIntoHole. Over its hole (column 27) it sets FLAG_SCENE_TEMP_01 and makes the hole's cells walkable.
Definition at line 252 of file vale_cave.c.
Referenced by Event_MoveEastObjectIntoHole(), and Event_PushEastObjectIntoHole().
|
static |
Pushing the eastern object: it moves a cell, and sinks if over its hole.
Reached by walking into cell code 24 in the second room, until FLAG_SCENE_TEMP_01 is set.
Definition at line 292 of file vale_cave.c.
Referenced by Event_PushEastObjectIntoHole().
Walking south off the ledge: Isaac hops down if the cell below is free.
Reached by walking south into cell code 21 in the second room. Returns 1 when the leader hopped, 0 when the landing cell is blocked.
Definition at line 303 of file vale_cave.c.
Referenced by Event_HopDownLedge().
|
static |
Coming near Kite: the camera finds it; it notices the party and hops away up the ledge.
Reached by stepping on cell code 40 in the second room until Kite is caught (FLAG_KITE); runs once, setting FLAG_SCENE_TEMP_00.
Definition at line 351 of file vale_cave.c.
Referenced by Event_KiteRunsOff().
|
static |
Coming near again: Kite runs behind the ledge and turns to watch the party.
Reached by stepping on cell code 41 in the second room until Kite is caught, once Event_KiteRunsOff has run. Sets FLAG_SCENE_TEMP_01 and FLAG_VALE_CAVE_KITE_BEHIND_LEDGE, and gives Kite the update hook ValeCave_FaceActorTowardLeader.
Definition at line 385 of file vale_cave.c.
Referenced by Event_KiteRunsBehindLedge().
|
static |
Walking around the ledge: Kite keeps to the far side of it, unless Halt has stopped it.
Reached by stepping on cell codes 45 to 56 in the second room until Kite is caught, once FLAG_VALE_CAVE_KITE_BEHIND_LEDGE is set; each code sends Kite to its row of gValeCave_WalkTargets at the leader's speed.
Definition at line 416 of file vale_cave.c.
Referenced by Event_KiteKeepsAway().
|
static |
Halt on Kite: it stops where it stands.
Reached by Halt on Kite (actor 8) in the second room.
Definition at line 451 of file vale_cave.c.
Referenced by Event_HaltKite().
|
static |
Pushing an object along the ledge: at its edge the object falls off, opening the way.
Reached by walking into cell code 20 in the third room. When the object falls (column 17) it sets FLAG_SCENE_TEMP_03 and clears the cells it held.
Definition at line 462 of file vale_cave.c.
Referenced by Event_PushObjectOverEdge().
|
static |
Pushing the western object east: it falls off the ledge, opening the way.
Reached by walking east into cell code 21 in the third room. Sets FLAG_SCENE_TEMP_02 and clears the cells the object held.
Definition at line 514 of file vale_cave.c.
Referenced by Event_PushObjectOffLedge().
|
static |
Pushing the object north: it slides a cell, opening the way.
Reached by walking into cell code 22 in the third room. Sets FLAG_SCENE_TEMP_05 when it stops on row 20, else FLAG_SCENE_TEMP_04, and then opens the cells above it.
Definition at line 560 of file vale_cave.c.
Referenced by Event_PushObjectNorth().
| const struct SceneEvent * ValeCave_GetEvents | ( | void | ) |
Selects the current room's touch, Psynergy and search bindings.
Definition at line 597 of file vale_cave.c.
Referenced by ValeCave_GetEvents().
| s32 ValeCave_Initialize | ( | void | ) |
Chooses the entry transition and restores the room's puzzle state.
The scene's initialize entry. The first room fades in from the backdrop and clears FLAG_SHOW_LOCATION_NAME; the others open with the window transition.
Definition at line 617 of file vale_cave.c.
Referenced by ValeCave_Initialize().
|
static |
The first room's exits play the exit sound before leaving.
Reached by stepping on cell codes 1 to 3 in the first room; takes the exit of the same number.
Definition at line 636 of file vale_cave.c.
Referenced by Event_LeaveRoom().
|
static |
Rebuilds the passage cells around the sliding object's saved side.
Definition at line 644 of file vale_cave.c.
Referenced by Event_SlideObjectsEast(), Event_SlideObjectsWest(), ValeCave_ApplyEntryState(), and ValeCave_UpdateSlidingObjectPassage().
|
static |
Walking east onto the sliding objects: they slide to the eastern end.
Reached by walking east into cell code 20 in the second room. Sets FLAG_VALE_CAVE_SLIDERS_EAST.
Definition at line 662 of file vale_cave.c.
Referenced by Event_SlideObjectsEast().
|
static |
Walking west onto the sliding objects: they slide back to the western end.
Reached by walking west into cell code 21 in the second room. Clears FLAG_VALE_CAVE_SLIDERS_EAST.
Definition at line 677 of file vale_cave.c.
Referenced by Event_SlideObjectsWest().
|
static |
Touching the sliding objects restarts their animation.
Reached by stepping on cell code 20 or 21 in the second room.
Definition at line 796 of file vale_cave.c.
Referenced by Event_TouchSlidingObjects().
| s32 gEffectScript0[] |
Definition at line 801 of file vale_cave.c.
| s32 gEffectScript1[] |
| s32 gEffectScript2[] |
| s32 gStagedActor_DirectionSteps[] |
Pixel step by direction: X in the upper halfword, Z in the lower.
Definition at line 824 of file vale_cave.c.
| u32 gStagedActor_FootprintKinds[] |
Definition at line 834 of file vale_cave.c.
| s32 gStagedActor_FootprintBounds[] |
Definition at line 838 of file vale_cave.c.
| s32 gValeCave_WalkTargets[] |
Definition at line 847 of file vale_cave.c.
Referenced by Event_KiteKeepsAway().
| const s32* gEffectScripts[] |
Definition at line 862 of file vale_cave.c.
| struct SceneEntrance gValeCave_EntrancesOther[] |
Definition at line 868 of file vale_cave.c.
Referenced by ValeCave_GetEntrances().
| struct SceneEntrance gValeCave_Entrances1[] |
Definition at line 873 of file vale_cave.c.
Referenced by ValeCave_GetEntrances().
| struct SceneEntrance gValeCave_Entrances2[] |
Definition at line 881 of file vale_cave.c.
Referenced by ValeCave_GetEntrances().
| struct SceneEntrance gValeCave_Entrances3[] |
Definition at line 896 of file vale_cave.c.
Referenced by ValeCave_GetEntrances().
| u32 gValeCave_Exits[] |
Definition at line 906 of file vale_cave.c.
Referenced by ValeCave_GetExits().
| struct ScenePlacement gValeCave_Placements1[] |
Definition at line 931 of file vale_cave.c.
Referenced by ValeCave_GetPlacements().
| struct ScenePlacement gValeCave_Placements2[] |
Definition at line 945 of file vale_cave.c.
Referenced by ValeCave_GetPlacements().
| struct ScenePlacement gValeCave_Placements3[] |
Definition at line 965 of file vale_cave.c.
Referenced by ValeCave_GetPlacements().
| struct SceneEvent gValeCave_EventsOther[] |
Definition at line 977 of file vale_cave.c.
Referenced by ValeCave_GetEvents().
| struct SceneEvent gValeCave_Events1[] |
Definition at line 981 of file vale_cave.c.
Referenced by ValeCave_GetEvents().
| struct SceneEvent gValeCave_Events2[] |
Definition at line 988 of file vale_cave.c.
Referenced by ValeCave_GetEvents().
| struct SceneEvent gValeCave_Events3[] |
Definition at line 1031 of file vale_cave.c.
Referenced by ValeCave_GetEvents().