Alchemy
Loading...
Searching...
No Matches

vault_cave.c File Reference

Vault's cave puzzles: movable switches, Frost targets, falling objects and the rumbling mechanism restored when the party returns. More...

Go to the source code of this file.

Data Structures

struct  DirectionSteps
 The step table read as one word per heading: the x step in pixels in the high halfword, the z step in the low. More...

Macros

#define TILE(position)
#define DIRECTION_STEP(heading)

Enumerations

enum  {
  FLAG_WEST_UPPER_FROZEN = FLAG_SCENE_TEMP_00 , FLAG_WEST_LOWER_FROZEN = FLAG_SCENE_TEMP_01 , FLAG_INNER_WEST_LOWER_FROZEN = FLAG_SCENE_TEMP_02 , FLAG_EAST_UPPER_FROZEN = FLAG_SCENE_TEMP_03 ,
  FLAG_EAST_LOWER_FROZEN = FLAG_SCENE_TEMP_04 , FLAG_FAR_EAST_FROZEN = FLAG_SCENE_TEMP_05 , FLAG_NORTH_BLOCK_STRUCK = FLAG_SCENE_TEMP_07 , FLAG_WHIRLWIND_USED = FLAG_SCENE_TEMP_00 + 0x100
}
 Scene flags. More...

Functions

static void VaultCave_ApplySouthernSwitchCells (void)
 Restores the map cells and attributes of the completed southern switch.
static void VaultCave_UseUnderfootFrostPriorities (void)
 Keeps all six Frost targets beneath the leader's feet.
static void VaultCave_UseAutomaticFrostPriorities (void)
 Restores automatic draw priority for the same six targets.
static void VaultCave_SpawnPuffs (struct FieldActor *source)
 Spawns up to four short-lived puffs around a landing object.
const struct SceneEntrance * Scene_GetEntrances (void)
const struct SceneRegion * Scene_GetRegions (void)
 Returns the region boxes used by the cave exits.
const u32 * Scene_GetExits (void)
 Both scenes share one exit table.
const struct ScenePlacement * Scene_GetPlacements (void)
 Selects the movable blocks, falling objects and Frost targets.
static struct FieldActor * VaultCave_FindCollidableActorAtCell (s32 column, s32 row)
 Finds a placed actor with collision enabled at the requested map cell.
static void VaultCave_PushBlockAhead (void)
 Pushes the faced block one cell unless another actor or terrain blocks it.
static void Event_UseWhirlwind (void)
 Whirlwind on the target in the second map blows it away for good.
static void Event_ShowLockedDoor (void)
 Searching the locked door. "The door is tightly locked.".
const struct SceneEvent * Scene_GetEvents (void)
 Selects the cave map's searches, movement checks and Psynergy callbacks.
static s32 VaultCave_IsSouthernBlockOnSwitch (void)
 Tests the southern block's cell, rounding fixed coordinates toward zero.
static void VaultCave_CompleteSouthernSwitch (void)
 Finishes the southern switch only after the block reaches its target cell.
static void Event_PushSouthernBlock (void)
 Pushing the southern block; once it rests on its switch, the puzzle chime plays and the switch opens the way.
static void Event_MoveSouthernBlock (void)
 Move on the southern block, with the same switch check.
static void UNUSED VaultCave_UnusedNoOp (void)
static void VaultCave_ApplyNorthernSwitchCells (void)
 Restores the map cells and attributes of the completed northern switch.
static s32 VaultCave_IsNorthernBlockOnSwitch (void)
 Tests the northern block's cell with the same signed-coordinate rounding.
static void VaultCave_CompleteNorthernSwitch (void)
 The northern switch also waits until the falling-object guard is clear.
static void Event_PushNorthernBlock (void)
 Pushing the northern block; it opens its switch only if no falling object has struck it.
static void Event_IgnoreMove (void)
 Move on the southern block in the third map does nothing.
static void Event_MoveNorthernBlock (void)
 Move on the northern block, with the same switch check.
static void Event_FreezeWestUpperTarget (void)
 Frost on the upper western target freezes it and changes its map cell; arriving again re-freezes every target whose flag is set.
static void Event_FreezeWestLowerTarget (void)
static void Event_FreezeInnerWestLowerTarget (void)
static void Event_FreezeEastUpperTarget (void)
static void Event_FreezeEastLowerTarget (void)
static void Event_FreezeFarEastTarget (void)
static void VaultCave_UpdateFrostTargetPriorities (void)
 Changes the Frost targets' draw priorities when the leader is above them.
static void VaultCave_RunRumble (void)
 Moves the third map layer through its phases, then fades the mechanism's final map state.
static void Event_FlipSwitch (void)
 Flips the switch.
static s32 VaultCave_ResetFallingObjectAtActorCell (s32 subjectActorId)
 Resets a low falling object sharing the subject's cell and reports a hit.
static void VaultCave_UpdateTimedFallingObjects (void)
 Drops four objects on a repeating schedule and handles their landings.
static void VaultCave_UpdateFrostControlledFallingObjects (void)
 Drops a random object every 64 frames, with reset height set by its Frost target.
static void VaultCave_OffsetActorRadially (struct FieldActor *actor, s32 radius, s32 angle)
 Offsets an actor's current position by a polar displacement.
static void VaultCave_StartFrostControlledFalls (void)
 Initializes six falling objects and starts their Frost-controlled updater.
static void VaultCave_StartTimedFalls (void)
 Initializes four falling objects and starts their timed updater.
s32 Scene_Initialize (void)
 Restores each room's puzzles and actors, then sets the Retreat destination.

Variables

const s16 gVaultCave_DirectionSteps []
const s32 gVaultCave_PuffScript []
struct SceneEntrance gVaultCaveEntrancesOther []
struct SceneEntrance gVaultCaveEntrances1 []
struct SceneEntrance gVaultCaveEntrances2 []
struct SceneEntrance gVaultCaveEntrances3 []
struct SceneRegion gVaultCaveRegions []
u32 gVaultCaveExitsOther []
u32 gVaultCaveExits1 []
u32 gVaultCaveExits2 []
u32 gVaultCaveExits3 []
struct ScenePlacement gVaultCavePlacementsOther []
struct ScenePlacement gVaultCavePlacements1 []
struct ScenePlacement gVaultCavePlacements2 []
struct ScenePlacement gVaultCavePlacements3 []
struct SceneEvent gVaultCaveEventsOther []
struct SceneEvent gVaultCaveEvents1 []
struct SceneEvent gVaultCaveEvents2 []
struct SceneEvent gVaultCaveEvents3 []
u32 gVaultCave_ScheduleFrames []
s32 gVaultCave_ScheduleTimer = 0
s32 gVaultCave_ScheduleIndex = 0
s32 gVaultCave_TickCounter = 0
s32 gVaultCave_TickValue = 0

Detailed Description

Vault's cave puzzles: movable switches, Frost targets, falling objects and the rumbling mechanism restored when the party returns.

Definition in file vault_cave.c.

Macro Definition Documentation

◆ TILE

#define TILE ( position)
Value:
((position) / 0x100000)

Definition at line 48 of file vault_cave.c.

Referenced by VaultCave_ResetFallingObjectAtActorCell().

◆ DIRECTION_STEP

#define DIRECTION_STEP ( heading)
Value:
(((struct DirectionSteps *)gVaultCave_DirectionSteps)->xz[heading])
The step table read as one word per heading: the x step in pixels in the high halfword,...
Definition vault_cave.c:155
const s16 gVaultCave_DirectionSteps[]
Definition vault_cave.c:917

Definition at line 159 of file vault_cave.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Scene flags.

The six Frost targets of the second map keep their frozen state in six flags in a row, read by index as well.

Enumerator
FLAG_WEST_UPPER_FROZEN 
FLAG_WEST_LOWER_FROZEN 
FLAG_INNER_WEST_LOWER_FROZEN 
FLAG_EAST_UPPER_FROZEN 
FLAG_EAST_LOWER_FROZEN 
FLAG_FAR_EAST_FROZEN 
FLAG_NORTH_BLOCK_STRUCK 

A falling object struck the northern block before it reached its switch.

FLAG_WHIRLWIND_USED 

Definition at line 52 of file vault_cave.c.

Function Documentation

◆ VaultCave_ApplySouthernSwitchCells()

void VaultCave_ApplySouthernSwitchCells ( void )
static

Restores the map cells and attributes of the completed southern switch.

Definition at line 297 of file vault_cave.c.

Referenced by Scene_Initialize(), VaultCave_ApplySouthernSwitchCells(), and VaultCave_CompleteSouthernSwitch().

◆ VaultCave_UseUnderfootFrostPriorities()

void VaultCave_UseUnderfootFrostPriorities ( void )
static

Keeps all six Frost targets beneath the leader's feet.

Definition at line 473 of file vault_cave.c.

Referenced by VaultCave_UpdateFrostTargetPriorities(), and VaultCave_UseUnderfootFrostPriorities().

◆ VaultCave_UseAutomaticFrostPriorities()

void VaultCave_UseAutomaticFrostPriorities ( void )
static

Restores automatic draw priority for the same six targets.

Definition at line 485 of file vault_cave.c.

Referenced by VaultCave_UpdateFrostTargetPriorities(), and VaultCave_UseAutomaticFrostPriorities().

◆ VaultCave_SpawnPuffs()

void VaultCave_SpawnPuffs ( struct FieldActor * source)
static

Spawns up to four short-lived puffs around a landing object.

Definition at line 723 of file vault_cave.c.

Referenced by VaultCave_SpawnPuffs(), and VaultCave_UpdateTimedFallingObjects().

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 64 of file vault_cave.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Returns the region boxes used by the cave exits.

Definition at line 80 of file vault_cave.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 82 of file vault_cave.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

Selects the movable blocks, falling objects and Frost targets.

Definition at line 98 of file vault_cave.c.

◆ VaultCave_FindCollidableActorAtCell()

struct FieldActor * VaultCave_FindCollidableActorAtCell ( s32 column,
s32 row )
static

Finds a placed actor with collision enabled at the requested map cell.

Definition at line 114 of file vault_cave.c.

Referenced by VaultCave_FindCollidableActorAtCell(), and VaultCave_PushBlockAhead().

◆ VaultCave_PushBlockAhead()

void VaultCave_PushBlockAhead ( void )
static

Pushes the faced block one cell unless another actor or terrain blocks it.

Definition at line 164 of file vault_cave.c.

Referenced by Event_PushNorthernBlock(), Event_PushSouthernBlock(), and VaultCave_PushBlockAhead().

◆ Event_UseWhirlwind()

void Event_UseWhirlwind ( void )
static

Whirlwind on the target in the second map blows it away for good.

Definition at line 230 of file vault_cave.c.

Referenced by Event_UseWhirlwind().

◆ Event_ShowLockedDoor()

void Event_ShowLockedDoor ( void )
static

Searching the locked door. "The door is tightly locked.".

Definition at line 235 of file vault_cave.c.

Referenced by Event_ShowLockedDoor().

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

Selects the cave map's searches, movement checks and Psynergy callbacks.

Definition at line 240 of file vault_cave.c.

◆ VaultCave_IsSouthernBlockOnSwitch()

s32 VaultCave_IsSouthernBlockOnSwitch ( void )
static

Tests the southern block's cell, rounding fixed coordinates toward zero.

Definition at line 256 of file vault_cave.c.

Referenced by VaultCave_CompleteSouthernSwitch(), and VaultCave_IsSouthernBlockOnSwitch().

◆ VaultCave_CompleteSouthernSwitch()

void VaultCave_CompleteSouthernSwitch ( void )
inlinestatic

Finishes the southern switch only after the block reaches its target cell.

Definition at line 279 of file vault_cave.c.

Referenced by Event_MoveSouthernBlock(), Event_PushSouthernBlock(), and VaultCave_CompleteSouthernSwitch().

◆ Event_PushSouthernBlock()

void Event_PushSouthernBlock ( void )
static

Pushing the southern block; once it rests on its switch, the puzzle chime plays and the switch opens the way.

Definition at line 289 of file vault_cave.c.

Referenced by Event_PushSouthernBlock().

◆ Event_MoveSouthernBlock()

void Event_MoveSouthernBlock ( void )
static

Move on the southern block, with the same switch check.

Definition at line 304 of file vault_cave.c.

Referenced by Event_MoveSouthernBlock().

◆ VaultCave_UnusedNoOp()

void UNUSED VaultCave_UnusedNoOp ( void )
static

Definition at line 310 of file vault_cave.c.

Referenced by VaultCave_UnusedNoOp().

◆ VaultCave_ApplyNorthernSwitchCells()

void VaultCave_ApplyNorthernSwitchCells ( void )
static

Restores the map cells and attributes of the completed northern switch.

Definition at line 313 of file vault_cave.c.

Referenced by Scene_Initialize(), VaultCave_ApplyNorthernSwitchCells(), and VaultCave_CompleteNorthernSwitch().

◆ VaultCave_IsNorthernBlockOnSwitch()

s32 VaultCave_IsNorthernBlockOnSwitch ( void )
static

Tests the northern block's cell with the same signed-coordinate rounding.

Definition at line 320 of file vault_cave.c.

Referenced by VaultCave_CompleteNorthernSwitch(), and VaultCave_IsNorthernBlockOnSwitch().

◆ VaultCave_CompleteNorthernSwitch()

void VaultCave_CompleteNorthernSwitch ( void )
inlinestatic

The northern switch also waits until the falling-object guard is clear.

Definition at line 343 of file vault_cave.c.

Referenced by Event_MoveNorthernBlock(), Event_PushNorthernBlock(), and VaultCave_CompleteNorthernSwitch().

◆ Event_PushNorthernBlock()

void Event_PushNorthernBlock ( void )
static

Pushing the northern block; it opens its switch only if no falling object has struck it.

Definition at line 357 of file vault_cave.c.

Referenced by Event_PushNorthernBlock().

◆ Event_IgnoreMove()

void Event_IgnoreMove ( void )
static

Move on the southern block in the third map does nothing.

Definition at line 363 of file vault_cave.c.

◆ Event_MoveNorthernBlock()

void Event_MoveNorthernBlock ( void )
static

Move on the northern block, with the same switch check.

Definition at line 366 of file vault_cave.c.

Referenced by Event_MoveNorthernBlock().

◆ Event_FreezeWestUpperTarget()

void Event_FreezeWestUpperTarget ( void )
static

Frost on the upper western target freezes it and changes its map cell; arriving again re-freezes every target whose flag is set.

Definition at line 372 of file vault_cave.c.

Referenced by Event_FreezeWestUpperTarget(), and Scene_Initialize().

◆ Event_FreezeWestLowerTarget()

void Event_FreezeWestLowerTarget ( void )
static

Definition at line 388 of file vault_cave.c.

Referenced by Event_FreezeWestLowerTarget(), and Scene_Initialize().

◆ Event_FreezeInnerWestLowerTarget()

void Event_FreezeInnerWestLowerTarget ( void )
static

Definition at line 402 of file vault_cave.c.

Referenced by Event_FreezeInnerWestLowerTarget(), and Scene_Initialize().

◆ Event_FreezeEastUpperTarget()

void Event_FreezeEastUpperTarget ( void )
static

Definition at line 416 of file vault_cave.c.

Referenced by Event_FreezeEastUpperTarget(), and Scene_Initialize().

◆ Event_FreezeEastLowerTarget()

void Event_FreezeEastLowerTarget ( void )
static

Definition at line 431 of file vault_cave.c.

Referenced by Event_FreezeEastLowerTarget(), and Scene_Initialize().

◆ Event_FreezeFarEastTarget()

void Event_FreezeFarEastTarget ( void )
static

Definition at line 446 of file vault_cave.c.

Referenced by Event_FreezeFarEastTarget(), and Scene_Initialize().

◆ VaultCave_UpdateFrostTargetPriorities()

void VaultCave_UpdateFrostTargetPriorities ( void )
static

Changes the Frost targets' draw priorities when the leader is above them.

Definition at line 462 of file vault_cave.c.

Referenced by Scene_Initialize(), and VaultCave_UpdateFrostTargetPriorities().

◆ VaultCave_RunRumble()

void VaultCave_RunRumble ( void )
static

Moves the third map layer through its phases, then fades the mechanism's final map state.

Definition at line 501 of file vault_cave.c.

Referenced by Event_FlipSwitch(), and VaultCave_RunRumble().

◆ Event_FlipSwitch()

void Event_FlipSwitch ( void )
static

Flips the switch.

"Isaac flipped the switch." The first time, the switch turns, the cave rumbles and shakes for eight seconds and the map changes as it fades.

Definition at line 553 of file vault_cave.c.

Referenced by Event_FlipSwitch().

◆ VaultCave_ResetFallingObjectAtActorCell()

s32 VaultCave_ResetFallingObjectAtActorCell ( s32 subjectActorId)
static

Resets a low falling object sharing the subject's cell and reports a hit.

Definition at line 579 of file vault_cave.c.

Referenced by VaultCave_ResetFallingObjectAtActorCell(), and VaultCave_UpdateTimedFallingObjects().

◆ VaultCave_UpdateTimedFallingObjects()

void VaultCave_UpdateTimedFallingObjects ( void )
static

Drops four objects on a repeating schedule and handles their landings.

Definition at line 609 of file vault_cave.c.

Referenced by VaultCave_StartTimedFalls(), and VaultCave_UpdateTimedFallingObjects().

◆ VaultCave_UpdateFrostControlledFallingObjects()

void VaultCave_UpdateFrostControlledFallingObjects ( void )
static

Drops a random object every 64 frames, with reset height set by its Frost target.

Definition at line 660 of file vault_cave.c.

Referenced by VaultCave_StartFrostControlledFalls(), and VaultCave_UpdateFrostControlledFallingObjects().

◆ VaultCave_OffsetActorRadially()

void VaultCave_OffsetActorRadially ( struct FieldActor * actor,
s32 radius,
s32 angle )
static

Offsets an actor's current position by a polar displacement.

Definition at line 709 of file vault_cave.c.

Referenced by VaultCave_OffsetActorRadially(), and VaultCave_SpawnPuffs().

◆ VaultCave_StartFrostControlledFalls()

void VaultCave_StartFrostControlledFalls ( void )
static

Initializes six falling objects and starts their Frost-controlled updater.

Definition at line 750 of file vault_cave.c.

Referenced by Scene_Initialize(), and VaultCave_StartFrostControlledFalls().

◆ VaultCave_StartTimedFalls()

void VaultCave_StartTimedFalls ( void )
static

Initializes four falling objects and starts their timed updater.

Definition at line 771 of file vault_cave.c.

Referenced by Scene_Initialize(), and VaultCave_StartTimedFalls().

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Restores each room's puzzles and actors, then sets the Retreat destination.

Sets up whichever scene is being entered and runs its arrival events.

Definition at line 793 of file vault_cave.c.

Variable Documentation

◆ gVaultCave_DirectionSteps

const s16 gVaultCave_DirectionSteps[]
Initial value:
= {
0, 16,
0, 16,
0, 16,
16, 0,
16, 0,
16, 0,
16, 0,
0, -16,
0, -16,
0, -16,
0, -16,
-16, 0,
-16, 0,
-16, 0,
-16, 0,
0, 16,
}

Definition at line 917 of file vault_cave.c.

◆ gVaultCave_PuffScript

const s32 gVaultCave_PuffScript[]
Initial value:
= {
}
#define SC_FREE
Release.
Definition objcmd.h:43

Definition at line 936 of file vault_cave.c.

Referenced by VaultCave_SpawnPuffs().

◆ gVaultCaveEntrancesOther

struct SceneEntrance gVaultCaveEntrancesOther[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 940 of file vault_cave.c.

Referenced by Scene_GetEntrances().

◆ gVaultCaveEntrances1

struct SceneEntrance gVaultCaveEntrances1[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 424, 0, 216, FACING_SOUTH, 0, 72, 8, 480, 320, 0 },
{ 2, CONDITION_ALWAYS, 136, 0, 104, FACING_SOUTH, 0, 72, 8, 480, 320, 0 },
{ 3, CONDITION_ALWAYS, 120, 0, 256, FACING_NORTH, 0, 72, 8, 480, 320, 0 },
{ 4, CONDITION_ALWAYS, 184, 0, 264, FACING_NORTH, 0, 72, 8, 480, 320, 0 },
{ 5, CONDITION_ALWAYS, 344, 0, 464, FACING_SOUTH, 0, 280, 360, 640, 640, 0 },
{ 6, CONDITION_ALWAYS, 488, 0, 488, FACING_SOUTH, 0, 280, 360, 640, 640, 0 },
{ 7, CONDITION_ALWAYS, 584, 0, 608, FACING_SOUTH, 0, 280, 360, 640, 640, 0 },
{ 8, CONDITION_ALWAYS, 344, 0, 632, FACING_NORTH, 0, 280, 360, 640, 640, 0 },
{ 13, CONDITION_ALWAYS, 408, 0, 472, FACING_SOUTH, 0, 280, 360, 640, 640, 0 },
{ 9, CONDITION_ALWAYS, 88, 0, 704, FACING_SOUTH, 0, 40, 632, 352, 912, 0 },
{ 12, CONDITION_ALWAYS, 184, 0, 864, FACING_SOUTH, 0, 40, 632, 352, 912, 0 },
{ 10, CONDITION_ALWAYS, 456, 0, 800, FACING_SOUTH, 0, 336, 696, 576, 856, 0 },
{ 11, CONDITION_ALWAYS, 456, 0, 840, FACING_NORTH, 0, 336, 696, 576, 856, 0 },
}
@ FACING_NORTH
Definition field_scene.h:32

Definition at line 945 of file vault_cave.c.

Referenced by Scene_GetEntrances().

◆ gVaultCaveEntrances2

struct SceneEntrance gVaultCaveEntrances2[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 136, 0, 104, FACING_SOUTH, 0, 40, 8, 400, 328, 0 },
{ 2, CONDITION_ALWAYS, 344, 0, 152, FACING_SOUTH, 0, 40, 8, 400, 328, 0 },
{ 3, CONDITION_ALWAYS, 344, 0, 184, FACING_NORTH, 0, 40, 8, 400, 328, 0 },
{ 4, CONDITION_ALWAYS, 168, 0, 328, FACING_NORTH, 0, 40, 8, 400, 328, 0 },
{ 5, CONDITION_ALWAYS, 56, 0, 480, FACING_SOUTH, 0, 8, 408, 248, 656, 0 },
{ 6, CONDITION_ALWAYS, 152, 0, 472, FACING_SOUTH, 0, 8, 408, 248, 656, 0 },
{ 7, CONDITION_ALWAYS, 120, 0, 576, FACING_SOUTH, 0, 8, 408, 248, 656, 0 },
{ 8, CONDITION_ALWAYS, 344, 0, 456, FACING_SOUTH, 0, 280, 344, 544, 672, 0 },
{ 9, CONDITION_ALWAYS, 424, 0, 664, FACING_NORTH, 0, 280, 344, 544, 672, 0 },
{ 14, CONDITION_ALWAYS, 456, 0, 472, FACING_SOUTH, 0, 280, 344, 544, 672, 0 },
{ 10, CONDITION_ALWAYS, 200, 0, 776, FACING_SOUTH, 0, 104, 696, 344, 944, 0 },
{ 11, CONDITION_ALWAYS, 264, 0, 808, FACING_SOUTH, 0, 104, 696, 344, 944, 0 },
{ 13, CONDITION_ALWAYS, 536, 0, 168, FACING_NORTH, 0, 416, 24, 656, 184, 0 },
}

Definition at line 963 of file vault_cave.c.

Referenced by Scene_GetEntrances().

◆ gVaultCaveEntrances3

struct SceneEntrance gVaultCaveEntrances3[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 312, 0, 664, FACING_NORTH, 0, 200, 520, 440, 680, 0 },
{ 2, CONDITION_ALWAYS, 312, 0, 600, FACING_SOUTH, 0, 200, 520, 440, 680, 0 },
{ 3, CONDITION_ALWAYS, 88, 0, 568, FACING_SOUTH, 0, 8, 472, 248, 632, 0 },
{ 4, CONDITION_ALWAYS, 168, 0, 544, FACING_SOUTH, 0, 8, 472, 248, 632, 0 },
{ 5, CONDITION_ALWAYS, 248, 0, 336, FACING_NORTH, 0, 128, 40, 376, 384, 0 },
{ 6, CONDITION_ALWAYS, 280, 0, 104, FACING_SOUTH, 0, 128, 40, 376, 384, 0 },
}

Definition at line 981 of file vault_cave.c.

Referenced by Scene_GetEntrances().

◆ gVaultCaveRegions

struct SceneRegion gVaultCaveRegions[]
Initial value:
= {
{ 447, 47, 783, 463, 63, 799, -1, 10 },
{ -1, 0, 0, 0, 0, 0, 0, 0 },
}

Definition at line 992 of file vault_cave.c.

Referenced by Scene_GetRegions().

◆ gVaultCaveExitsOther

u32 gVaultCaveExitsOther[]
Initial value:
= {
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72

Definition at line 997 of file vault_cave.c.

Referenced by Scene_GetExits().

◆ gVaultCaveExits1

u32 gVaultCaveExits1[]
Initial value:
= {
SCENE_EXIT(1, 98, 2),
SCENE_EXIT(2, 97, 1),
SCENE_EXIT(3, 96, 5),
SCENE_EXIT(4, 96, 13),
SCENE_EXIT(5, 96, 3),
SCENE_EXIT(6, 97, 6),
SCENE_EXIT(7, 97, 10),
SCENE_EXIT(8, 96, 9),
SCENE_EXIT(9, 96, 8),
SCENE_EXIT(10, 23, 13),
SCENE_EXIT(10, 96, 11),
SCENE_EXIT(11, 96, 12),
SCENE_EXIT(12, 96, 11),
SCENE_EXIT(13, 96, 4),
}
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 1001 of file vault_cave.c.

Referenced by Scene_GetExits().

◆ gVaultCaveExits2

u32 gVaultCaveExits2[]
Initial value:
= {
SCENE_EXIT(1, 96, 2),
SCENE_EXIT(2, 98, 6),
SCENE_EXIT(3, 97, 8),
SCENE_EXIT(4, 97, 5),
SCENE_EXIT(5, 97, 4),
SCENE_EXIT(6, 96, 6),
SCENE_EXIT(7, 98, 3),
SCENE_EXIT(8, 97, 3),
SCENE_EXIT(9, 97, 11),
SCENE_EXIT(10, 96, 7),
SCENE_EXIT(11, 97, 9),
SCENE_EXIT(13, 97, 13),
SCENE_EXIT(14, 97, 14),
}

Definition at line 1020 of file vault_cave.c.

Referenced by Scene_GetExits().

◆ gVaultCaveExits3

u32 gVaultCaveExits3[]
Initial value:
= {
SCENE_EXIT(1, 23, 14),
SCENE_EXIT(2, 96, 1),
SCENE_EXIT(3, 97, 7),
SCENE_EXIT(4, 98, 5),
SCENE_EXIT(5, 98, 4),
SCENE_EXIT(6, 97, 2),
}

Definition at line 1038 of file vault_cave.c.

Referenced by Scene_GetExits().

◆ gVaultCavePlacementsOther

struct ScenePlacement gVaultCavePlacementsOther[]
Initial value:
= {
}

Definition at line 1049 of file vault_cave.c.

Referenced by Scene_GetPlacements().

◆ gVaultCavePlacements1

struct ScenePlacement gVaultCavePlacements1[]
Initial value:
= {
}

Definition at line 1053 of file vault_cave.c.

Referenced by Scene_GetPlacements().

◆ gVaultCavePlacements2

struct ScenePlacement gVaultCavePlacements2[]

Definition at line 1057 of file vault_cave.c.

Referenced by Scene_GetPlacements().

◆ gVaultCavePlacements3

struct ScenePlacement gVaultCavePlacements3[]
Initial value:

Definition at line 1091 of file vault_cave.c.

Referenced by Scene_GetPlacements().

◆ gVaultCaveEventsOther

struct SceneEvent gVaultCaveEventsOther[]
Initial value:
= {
}
#define SCENE_EVENTS_END

Definition at line 1109 of file vault_cave.c.

Referenced by Scene_GetEvents().

◆ gVaultCaveEvents1

struct SceneEvent gVaultCaveEvents1[]
Initial value:
= {
{ 0x21, 1, CONDITION_ALWAYS, 1 },
{ 0x31, 2, CONDITION_ALWAYS, 2 },
{ 0x31, 6, CONDITION_ALWAYS, 6 },
{ 0x31, 7, CONDITION_ALWAYS, 7 },
}
@ EVENT_EXIT
#define EVENT_SCRIPT(script)
#define SEARCH(target)
@ SEARCH_UNNAMED
@ SEARCH_CHEST
#define FLAG_VAULT_CAVE_1_CHEST
Definition flags.h:575
static void Event_FlipSwitch(void)
Flips the switch.
Definition vault_cave.c:553
static void Event_ShowLockedDoor(void)
Searching the locked door. "The door is tightly locked.".
Definition vault_cave.c:235

Definition at line 1113 of file vault_cave.c.

Referenced by Scene_GetEvents().

◆ gVaultCaveEvents2

struct SceneEvent gVaultCaveEvents2[]
Initial value:
= {
{ 0x21, 1, CONDITION_ALWAYS, 1 },
{ 0x31, 2, CONDITION_ALWAYS, 2 },
{ 0x21, 6, CONDITION_ALWAYS, 6 },
{ 0x31, 7, CONDITION_ALWAYS, 7 },
{ 0x21, 10, CONDITION_ALWAYS, 10 },
}
@ ABILITY_MOVE
Definition ability_ids.h:15
@ ABILITY_WHIRLWIND
Definition ability_ids.h:13
@ ABILITY_FROST
Definition ability_ids.h:11
#define FIND_ITEM(item)
@ EVENT_TOUCH
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_TOUCH_WALKING
#define FLAG_VAULT_CAVE_2_CHEST
Definition flags.h:576
#define FLAG_VAULT_CAVE_SOUTH_BLOCK_ON_SWITCH
Definition flags.h:573
@ ITEM_VAMBRACE
Definition item_ids.h:32
static void Event_MoveSouthernBlock(void)
Move on the southern block, with the same switch check.
Definition vault_cave.c:304
static void Event_FreezeInnerWestLowerTarget(void)
Definition vault_cave.c:402
@ FLAG_WEST_UPPER_FROZEN
Definition vault_cave.c:53
@ FLAG_WEST_LOWER_FROZEN
Definition vault_cave.c:54
@ FLAG_WHIRLWIND_USED
Definition vault_cave.c:61
@ FLAG_EAST_UPPER_FROZEN
Definition vault_cave.c:56
@ FLAG_INNER_WEST_LOWER_FROZEN
Definition vault_cave.c:55
@ FLAG_FAR_EAST_FROZEN
Definition vault_cave.c:58
@ FLAG_EAST_LOWER_FROZEN
Definition vault_cave.c:57
static void Event_FreezeEastLowerTarget(void)
Definition vault_cave.c:431
static void Event_FreezeFarEastTarget(void)
Definition vault_cave.c:446
static void Event_UseWhirlwind(void)
Whirlwind on the target in the second map blows it away for good.
Definition vault_cave.c:230
static void Event_PushSouthernBlock(void)
Pushing the southern block; once it rests on its switch, the puzzle chime plays and the switch opens ...
Definition vault_cave.c:289
static void Event_FreezeWestLowerTarget(void)
Definition vault_cave.c:388
static void Event_FreezeEastUpperTarget(void)
Definition vault_cave.c:416
static void Event_FreezeWestUpperTarget(void)
Frost on the upper western target freezes it and changes its map cell; arriving again re-freezes ever...
Definition vault_cave.c:372

Definition at line 1133 of file vault_cave.c.

Referenced by Scene_GetEvents().

◆ gVaultCaveEvents3

struct SceneEvent gVaultCaveEvents3[]
Initial value:
= {
{ 0x31, 2, CONDITION_ALWAYS, 2 },
{ 0x21, 3, CONDITION_ALWAYS, 3 },
{ 0x21, 6, CONDITION_ALWAYS, 6 },
}
#define FLAG_VAULT_CAVE_NORTH_BLOCK_ON_SWITCH
Definition flags.h:574
static void Event_IgnoreMove(void)
Move on the southern block in the third map does nothing.
Definition vault_cave.c:363
static void Event_MoveNorthernBlock(void)
Move on the northern block, with the same switch check.
Definition vault_cave.c:366
static void Event_PushNorthernBlock(void)
Pushing the northern block; it opens its switch only if no falling object has struck it.
Definition vault_cave.c:357

Definition at line 1161 of file vault_cave.c.

Referenced by Scene_GetEvents().

◆ gVaultCave_ScheduleFrames

u32 gVaultCave_ScheduleFrames[]
Initial value:
= {
20, 80, 115, 170,
}

Definition at line 1175 of file vault_cave.c.

Referenced by VaultCave_UpdateTimedFallingObjects().

◆ gVaultCave_ScheduleTimer

s32 gVaultCave_ScheduleTimer = 0

Definition at line 1180 of file vault_cave.c.

Referenced by VaultCave_UpdateTimedFallingObjects().

◆ gVaultCave_ScheduleIndex

s32 gVaultCave_ScheduleIndex = 0

Definition at line 1182 of file vault_cave.c.

Referenced by VaultCave_UpdateTimedFallingObjects().

◆ gVaultCave_TickCounter

s32 gVaultCave_TickCounter = 0

Definition at line 1184 of file vault_cave.c.

Referenced by VaultCave_UpdateFrostControlledFallingObjects().

◆ gVaultCave_TickValue

s32 gVaultCave_TickValue = 0

Definition at line 1186 of file vault_cave.c.

Referenced by VaultCave_UpdateFrostControlledFallingObjects().