Alchemy
Loading...
Searching...
No Matches

crossbone_isle_platform_rooms.c File Reference

Crossbone Isle's platform rooms: the room of keys, the room of pursuers that Cloak and Halt get past, and the room of blocks where Bane hides. More...

Go to the source code of this file.

Macros

#define FLAG_CROSSBONE_ISLE_THIRD_BLOCK_LOWERED   0x300
#define CROSSBONE_PURSUER_STEP_Z   16
#define CROSSBONE_LEADER_STEP_Z   24
#define DJINNI_BANE   6
#define DIRECTION_STEP(dx, dz)
 Pixel step by direction: X in the upper halfword, Z in the lower.

Enumerations

enum  { BANE = 15 }
 The Djinni Bane, in the block room: Venus Djinni 6 (name message 1125). More...
enum  { PASSAGE_INDEX_MASK = 0xff , PASSAGE_PLAY_OPENING = 0x100 }

Functions

static void Event_PushFirstBlock (void)
 Pushing the first block (trigger 51); standing at the ladder in column 38, the leader climbs instead.
static void CrossboneIslePlatformRooms_FollowSecondBlock (void)
 Keeps actor fourteen just above and behind the second block.
static void CrossboneIslePlatformRooms_PositionSecondBlockMapObject (void)
 Aligns map object 107 with the second block.
static void CrossboneIslePlatformRooms_InitializeScene1 (void)
 Restores collected keys and already opened passages.
static void CrossboneIslePlatformRooms_InitializeScene2 (void)
 Configures the pursuers, their chase triggers and blending.
static void CrossboneIslePlatformRooms_InitializeScene3 (void)
 Restores movable blocks, terrain and the Djinni escape progress.
static __inline__ void SceneState_StoreStep (s16 *field, s32 step)
 Publishes the next raised-event trigger.
static __inline__ void LiftBlock (s32 column, u8 motionFlags)
 Lifts the first block and clears the terrain beneath its column.
static void Event_BaneJoins (void)
 Raised once the battle with Bane is won: Bane joins the party.
static UNUSED void CrossboneIslePlatformRooms_UnusedHook (void)
const struct SceneEntrance * Scene_GetEntrances (void)
const struct SceneRegion * Scene_GetRegions (void)
const u32 * Scene_GetExits (void)
 Both scenes share one exit table.
const struct ScenePlacement * Scene_GetPlacements (void)
static void Event_HaltPursuer (void)
 Halt on a pursuer: nothing beyond the Psynergy's own effect.
static s32 CrossboneIslePlatformRooms_FaceBaneTowardLeader (union FieldObject *fieldObject)
static void Event_BaneFirstEscape (void)
 The first time the party comes near: Bane notices them and hops away.
static void Event_BaneSecondEscape (void)
 Coming near again: Bane hops, dashes across the platforms and crashes into the far wall, shaking the room, and is left squashing and stretching.
static void Event_BaneLastEscape (void)
 The third time: Bane recovers, hops down a winding path to the room's last corner and keeps watching the leader.
static void Event_BaneKeepsAway (void)
 Stepping on the triggers around Bane's corner (30 to 41): Bane runs to the matching spot, as fast as the leader, unless Halt holds it.
static void Event_HaltBane (void)
 Halt on Bane: it freezes in place.
const struct SceneEvent * Scene_GetEvents (void)
static void Event_CheckLeaderAhead (void)
 Walking south into the third or fourth blue door: look at what is ahead.
static void CrossboneIslePlatformRooms_OpenPassage (s32 passageInfo)
 Opens the selected blue-key passage, optionally playing its opening.
static void CrossboneIslePlatformRooms_OpenPlatformPassage (s32 passageInfo)
 Opens the red-key passage, optionally playing its opening.
static void Event_UseRedKey (void)
 Facing the red door with the Red Key: the door rumbles open, and the key is used up.
static void CrossboneIslePlatformRooms_UseBlueKey (s32 doorIndex)
 Facing a blue door with a Blue Key: the door rumbles open, and the key is used up.
static void Event_OpenFirstBlueDoor (void)
 Touching the first blue door.
static void Event_OpenSecondBlueDoor (void)
 Touching the second blue door.
static void Event_OpenThirdBlueDoor (void)
 Touching the third blue door; pressing on it from the north looks ahead every dozen blocked steps.
static void Event_OpenFourthBlueDoor (void)
 Touching the fourth blue door; pressing on it from the north looks ahead every dozen blocked steps.
static void Event_ShowRedKey (void)
 Reveal in the key room: the hidden Red Key appears on its tile.
static void Event_HideRedKey (void)
 Reveal wears off: the Red Key's tile is hidden again.
static void CrossboneIslePlatformRooms_CollectKey (s32 actorId, s32 itemId, s32 collectedFlag)
 Collects the selected key, hides its actor and remembers it was taken.
static void Event_CatchFirstBlueKey (void)
 Catch on the first Blue Key: the party gets it.
static void Event_CatchSecondBlueKey (void)
 Catch on the second Blue Key.
static void Event_CatchThirdBlueKey (void)
 Catch on the third Blue Key.
static void Event_CatchFourthBlueKey (void)
 Catch on the fourth Blue Key.
static void Event_CatchRedKey (void)
 Catch on the revealed Red Key.
static void CrossboneIslePlatformRooms_CheckFirstPursuerTrigger (void)
 Starts the first chase when an uncloaked leader enters its area.
static void Event_DodgeFirstPursuer (void)
 Lets the first pursuer follow the leader, then returns it home.
static void CrossboneIslePlatformRooms_CheckSecondPursuerTrigger (void)
 Starts the second chase when the leader enters column ten.
static void Event_DodgeSecondPursuer (void)
 Lets the second pursuer follow the leader, then returns it home.
static void CrossboneIslePlatformRooms_TrackPursuerColumn (s32 pursuerIndex)
 Moves a pursuer to the leader column and remembers its last column.
static void Event_TrackThirdPursuerColumn (void)
static void Event_TrackFourthPursuerColumn (void)
static UNUSED void CrossboneIslePlatformRooms_TrackFifthPursuerColumn (void)
static void Event_DodgeThirdPursuer (void)
 Lets the third pursuer follow the leader, then returns it home.
static void Event_DodgeFourthPursuer (void)
 Aligns the fourth pursuer before sending it after the leader.
static void CrossboneIslePlatformRooms_CheckFifthPursuerTrigger (void)
 Starts the fifth chase when the leader enters column nineteen.
static void Event_DodgeFifthPursuer (void)
 Lets the fifth pursuer follow the leader, then returns it home.
static void Event_BeginRevealBlend (void)
 Reveal in the pursuer room: the translucent layer over the room vanishes while it lasts.
static void Event_EndRevealBlend (void)
 Reveal wears off: the translucent layer returns.
static void Event_UseLadder (void)
 At the ladder by the second block: climb up or down, look ahead to the east, or push the first block from the floor to the west.
static UNUSED void CrossboneIslePlatformRooms_UnusedCallback (void)
static void Event_FreezePuddle (void)
 Frost on the puddle: it freezes into a pillar of ice the party can stand on.
static void Event_LookAheadOrPushFirstBlock (void)
 Walking into the first block from the ladder side (trigger 70): facing east, look ahead; otherwise push the block.
static void CrossboneIslePlatformRooms_RestoreFirstBlockTerrain (void)
 Restores the first block row before applying its current footprint.
static void CrossboneIslePlatformRooms_RestoreEastUnderfootCell (void)
 Restores support under the first block at the eastern cell.
static void CrossboneIslePlatformRooms_RestoreMiddleUnderfootCell (void)
 Restores support under the first block at the middle cell.
static void CrossboneIslePlatformRooms_RestoreWestUnderfootCell (void)
 Restores support under the first block at the western cell.
static void Event_UpdateFirstBlockTerrain (void)
 Rebuilds the first block support cells from its height and column.
static void CrossboneIslePlatformRooms_ReleaseSecondBlockPlatform (void)
 Detaches the second block follower and restores the ladder cell.
static void Event_UpdateSecondBlockTerrain (void)
 Releases the second block platform when it reaches the ladder cell.
static void Event_PushSecondBlock (void)
 Pushing the second block (trigger 52); at the ladder, the platform riding on it stays there.
static void CrossboneIslePlatformRooms_RestoreThirdBlockTerrain (void)
 Restores the terrain at both ends of the third block row.
static void CrossboneIslePlatformRooms_RestoreThirdBlockWestCell (void)
 Restores the third block support at the western end.
static void CrossboneIslePlatformRooms_RestoreThirdBlockEastCell (void)
 Restores the third block support at the eastern end.
static void Event_UpdateThirdBlockTerrain (void)
 Rebuilds support for the third block from its height and destination.
static void Event_PushThirdBlock (void)
 Pushing the third block (trigger 50).
static void Event_TouchThirdBlock (void)
 Walking into the third block (trigger 54): facing south, the rising sequence plays; otherwise the block is pushed.
static void CrossboneIslePlatformRooms_RestoreFourthAndFifthBlockTerrain (void)
 Clears the support row before repainting the fourth and fifth blocks.
static void CrossboneIslePlatformRooms_RepaintFourthAndFifthBlockCells (void)
 Places support cells beneath the fourth and fifth blocks.
static void Event_UpdateFourthBlockTerrain (void)
 Refreshes the shared support row after the fourth block moves.
static void Event_PushFourthBlock (void)
 Pushing the fourth block (trigger 53).
static void Event_UpdateFifthBlockTerrain (void)
 Refreshes the shared support row after the fifth block moves.
static UNUSED void CrossboneIslePlatformRooms_MoveFifthBlock (void)
 Unused callback that moves the fifth block and refreshes its terrain.
static void CrossboneIslePlatformRooms_UpdateBlockPriorities (void)
 Chooses block drawing priorities from the leader height and row.
s32 Scene_Initialize (void)
 Initializes the key, pursuer or movable-block room.
static UNUSED void CrossboneIslePlatformRooms_UpdateItemIcons (void)
 Unused callback that cycles key icon displays.

Variables

s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds []
s32 gStagedActor_FootprintBounds []
s32 gCrossboneIslePlatformRooms_BaneSquashScript []
s32 gCrossboneIslePlatformRooms_BaneWalkTargets []
struct SceneEntrance gCrossboneIslePlatformRoomsEntrancesOther []
struct SceneEntrance gCrossboneIslePlatformRoomsEntrances1 []
struct SceneEntrance gCrossboneIslePlatformRoomsEntrances2 []
struct SceneEntrance gCrossboneIslePlatformRoomsEntrances3 []
u32 gCrossboneIslePlatformRoomsExits []
struct ScenePlacement gCrossboneIslePlatformRoomsPlacementsOther []
struct ScenePlacement gCrossboneIslePlatformRoomsPlacements1 []
struct ScenePlacement gCrossboneIslePlatformRoomsPlacements2 []
struct ScenePlacement gCrossboneIslePlatformRoomsPlacements3 []
struct SceneEvent gCrossboneIslePlatformRoomsEventsOther []
struct SceneEvent gCrossboneIslePlatformRoomsEvents1 []
struct SceneEvent gCrossboneIslePlatformRoomsEvents2 []
struct SceneEvent gCrossboneIslePlatformRoomsEvents3 []
u32 gCrossboneIslePlatformRooms_SlotColumns []
s32 gCrossboneIslePlatformRooms_IconTimer = 0

Detailed Description

Crossbone Isle's platform rooms: the room of keys, the room of pursuers that Cloak and Halt get past, and the room of blocks where Bane hides.

Definition in file crossbone_isle_platform_rooms.c.

Macro Definition Documentation

◆ FLAG_CROSSBONE_ISLE_THIRD_BLOCK_LOWERED

#define FLAG_CROSSBONE_ISLE_THIRD_BLOCK_LOWERED   0x300

Definition at line 52 of file crossbone_isle_platform_rooms.c.

Referenced by Event_UpdateThirdBlockTerrain().

◆ CROSSBONE_PURSUER_STEP_Z

#define CROSSBONE_PURSUER_STEP_Z   16

Definition at line 55 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeFirstPursuer().

◆ CROSSBONE_LEADER_STEP_Z

#define CROSSBONE_LEADER_STEP_Z   24

◆ DJINNI_BANE

#define DJINNI_BANE   6

Definition at line 71 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneJoins().

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((u32)(dx) << 16) | ((dz) & 0xffff))
unsigned int u32
Definition types.h:15

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 1261 of file crossbone_isle_platform_rooms.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The Djinni Bane, in the block room: Venus Djinni 6 (name message 1125).

Enumerator
BANE 

Definition at line 70 of file crossbone_isle_platform_rooms.c.

◆ anonymous enum

anonymous enum
Enumerator
PASSAGE_INDEX_MASK 
PASSAGE_PLAY_OPENING 

Definition at line 73 of file crossbone_isle_platform_rooms.c.

Function Documentation

◆ Event_PushFirstBlock()

void Event_PushFirstBlock ( void )
static

Pushing the first block (trigger 51); standing at the ladder in column 38, the leader climbs instead.

Definition at line 884 of file crossbone_isle_platform_rooms.c.

Referenced by Event_LookAheadOrPushFirstBlock(), Event_PushFirstBlock(), and Event_UseLadder().

◆ CrossboneIslePlatformRooms_FollowSecondBlock()

void CrossboneIslePlatformRooms_FollowSecondBlock ( void )
static

◆ CrossboneIslePlatformRooms_PositionSecondBlockMapObject()

void CrossboneIslePlatformRooms_PositionSecondBlockMapObject ( void )
static

Aligns map object 107 with the second block.

Definition at line 1062 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_PositionSecondBlockMapObject(), and CrossboneIslePlatformRooms_ReleaseSecondBlockPlatform().

◆ CrossboneIslePlatformRooms_InitializeScene1()

void CrossboneIslePlatformRooms_InitializeScene1 ( void )
static

Restores collected keys and already opened passages.

Definition at line 1149 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene1(), and Scene_Initialize().

◆ CrossboneIslePlatformRooms_InitializeScene2()

void CrossboneIslePlatformRooms_InitializeScene2 ( void )
static

Configures the pursuers, their chase triggers and blending.

Definition at line 1186 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene2(), and Scene_Initialize().

◆ CrossboneIslePlatformRooms_InitializeScene3()

void CrossboneIslePlatformRooms_InitializeScene3 ( void )
static

Restores movable blocks, terrain and the Djinni escape progress.

Definition at line 1207 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), and Scene_Initialize().

◆ SceneState_StoreStep()

__inline__ void SceneState_StoreStep ( s16 * field,
s32 step )
static

◆ LiftBlock()

__inline__ void LiftBlock ( s32 column,
u8 motionFlags )
static

Lifts the first block and clears the terrain beneath its column.

Definition at line 86 of file crossbone_isle_platform_rooms.c.

Referenced by Event_UpdateFirstBlockTerrain(), and LiftBlock().

◆ Event_BaneJoins()

void Event_BaneJoins ( void )
static

Raised once the battle with Bane is won: Bane joins the party.

Definition at line 98 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneJoins().

◆ CrossboneIslePlatformRooms_UnusedHook()

UNUSED void CrossboneIslePlatformRooms_UnusedHook ( void )
static

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 104 of file crossbone_isle_platform_rooms.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 119 of file crossbone_isle_platform_rooms.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 121 of file crossbone_isle_platform_rooms.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

Definition at line 123 of file crossbone_isle_platform_rooms.c.

◆ Event_HaltPursuer()

void Event_HaltPursuer ( void )
static

Halt on a pursuer: nothing beyond the Psynergy's own effect.

Definition at line 139 of file crossbone_isle_platform_rooms.c.

Referenced by Event_HaltPursuer().

◆ CrossboneIslePlatformRooms_FaceBaneTowardLeader()

s32 CrossboneIslePlatformRooms_FaceBaneTowardLeader ( union FieldObject * fieldObject)
static

◆ Event_BaneFirstEscape()

void Event_BaneFirstEscape ( void )
static

The first time the party comes near: Bane notices them and hops away.

Definition at line 164 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneFirstEscape().

◆ Event_BaneSecondEscape()

void Event_BaneSecondEscape ( void )
static

Coming near again: Bane hops, dashes across the platforms and crashes into the far wall, shaking the room, and is left squashing and stretching.

Definition at line 189 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneSecondEscape().

◆ Event_BaneLastEscape()

void Event_BaneLastEscape ( void )
static

The third time: Bane recovers, hops down a winding path to the room's last corner and keeps watching the leader.

Definition at line 245 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneLastEscape().

◆ Event_BaneKeepsAway()

void Event_BaneKeepsAway ( void )
static

Stepping on the triggers around Bane's corner (30 to 41): Bane runs to the matching spot, as fast as the leader, unless Halt holds it.

Definition at line 298 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneKeepsAway().

◆ Event_HaltBane()

void Event_HaltBane ( void )
static

Halt on Bane: it freezes in place.

Definition at line 328 of file crossbone_isle_platform_rooms.c.

Referenced by Event_HaltBane().

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

Definition at line 334 of file crossbone_isle_platform_rooms.c.

◆ Event_CheckLeaderAhead()

void Event_CheckLeaderAhead ( void )
static

Walking south into the third or fourth blue door: look at what is ahead.

Definition at line 350 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CheckLeaderAhead().

◆ CrossboneIslePlatformRooms_OpenPassage()

void CrossboneIslePlatformRooms_OpenPassage ( s32 passageInfo)
static

Opens the selected blue-key passage, optionally playing its opening.

Definition at line 353 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene1(), CrossboneIslePlatformRooms_OpenPassage(), and CrossboneIslePlatformRooms_UseBlueKey().

◆ CrossboneIslePlatformRooms_OpenPlatformPassage()

void CrossboneIslePlatformRooms_OpenPlatformPassage ( s32 passageInfo)
static

Opens the red-key passage, optionally playing its opening.

Definition at line 371 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene1(), CrossboneIslePlatformRooms_OpenPlatformPassage(), and Event_UseRedKey().

◆ Event_UseRedKey()

void Event_UseRedKey ( void )
static

Facing the red door with the Red Key: the door rumbles open, and the key is used up.

Definition at line 386 of file crossbone_isle_platform_rooms.c.

Referenced by Event_UseRedKey().

◆ CrossboneIslePlatformRooms_UseBlueKey()

void CrossboneIslePlatformRooms_UseBlueKey ( s32 doorIndex)
static

Facing a blue door with a Blue Key: the door rumbles open, and the key is used up.

Definition at line 403 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_UseBlueKey(), Event_OpenFirstBlueDoor(), Event_OpenFourthBlueDoor(), Event_OpenSecondBlueDoor(), and Event_OpenThirdBlueDoor().

◆ Event_OpenFirstBlueDoor()

void Event_OpenFirstBlueDoor ( void )
static

Touching the first blue door.

Definition at line 423 of file crossbone_isle_platform_rooms.c.

Referenced by Event_OpenFirstBlueDoor().

◆ Event_OpenSecondBlueDoor()

void Event_OpenSecondBlueDoor ( void )
static

Touching the second blue door.

Definition at line 428 of file crossbone_isle_platform_rooms.c.

Referenced by Event_OpenSecondBlueDoor().

◆ Event_OpenThirdBlueDoor()

void Event_OpenThirdBlueDoor ( void )
static

Touching the third blue door; pressing on it from the north looks ahead every dozen blocked steps.

Definition at line 434 of file crossbone_isle_platform_rooms.c.

Referenced by Event_OpenThirdBlueDoor().

◆ Event_OpenFourthBlueDoor()

void Event_OpenFourthBlueDoor ( void )
static

Touching the fourth blue door; pressing on it from the north looks ahead every dozen blocked steps.

Definition at line 453 of file crossbone_isle_platform_rooms.c.

Referenced by Event_OpenFourthBlueDoor().

◆ Event_ShowRedKey()

void Event_ShowRedKey ( void )
static

Reveal in the key room: the hidden Red Key appears on its tile.

Definition at line 471 of file crossbone_isle_platform_rooms.c.

Referenced by Event_ShowRedKey().

◆ Event_HideRedKey()

void Event_HideRedKey ( void )
static

Reveal wears off: the Red Key's tile is hidden again.

Definition at line 483 of file crossbone_isle_platform_rooms.c.

Referenced by Event_HideRedKey().

◆ CrossboneIslePlatformRooms_CollectKey()

void CrossboneIslePlatformRooms_CollectKey ( s32 actorId,
s32 itemId,
s32 collectedFlag )
inlinestatic

Collects the selected key, hides its actor and remembers it was taken.

Definition at line 489 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_CollectKey(), Event_CatchFirstBlueKey(), Event_CatchFourthBlueKey(), Event_CatchRedKey(), Event_CatchSecondBlueKey(), and Event_CatchThirdBlueKey().

◆ Event_CatchFirstBlueKey()

void Event_CatchFirstBlueKey ( void )
static

Catch on the first Blue Key: the party gets it.

Definition at line 500 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CatchFirstBlueKey().

◆ Event_CatchSecondBlueKey()

void Event_CatchSecondBlueKey ( void )
static

Catch on the second Blue Key.

Definition at line 505 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CatchSecondBlueKey().

◆ Event_CatchThirdBlueKey()

void Event_CatchThirdBlueKey ( void )
static

Catch on the third Blue Key.

Definition at line 510 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CatchThirdBlueKey().

◆ Event_CatchFourthBlueKey()

void Event_CatchFourthBlueKey ( void )
static

Catch on the fourth Blue Key.

Definition at line 515 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CatchFourthBlueKey().

◆ Event_CatchRedKey()

void Event_CatchRedKey ( void )
static

Catch on the revealed Red Key.

Definition at line 520 of file crossbone_isle_platform_rooms.c.

Referenced by Event_CatchRedKey().

◆ CrossboneIslePlatformRooms_CheckFirstPursuerTrigger()

void CrossboneIslePlatformRooms_CheckFirstPursuerTrigger ( void )
static

Starts the first chase when an uncloaked leader enters its area.

Definition at line 525 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_CheckFirstPursuerTrigger(), and CrossboneIslePlatformRooms_InitializeScene2().

◆ Event_DodgeFirstPursuer()

void Event_DodgeFirstPursuer ( void )
static

Lets the first pursuer follow the leader, then returns it home.

Definition at line 540 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeFirstPursuer().

◆ CrossboneIslePlatformRooms_CheckSecondPursuerTrigger()

void CrossboneIslePlatformRooms_CheckSecondPursuerTrigger ( void )
static

Starts the second chase when the leader enters column ten.

Definition at line 564 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_CheckSecondPursuerTrigger(), and CrossboneIslePlatformRooms_InitializeScene2().

◆ Event_DodgeSecondPursuer()

void Event_DodgeSecondPursuer ( void )
static

Lets the second pursuer follow the leader, then returns it home.

Definition at line 578 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeSecondPursuer().

◆ CrossboneIslePlatformRooms_TrackPursuerColumn()

void CrossboneIslePlatformRooms_TrackPursuerColumn ( s32 pursuerIndex)
static

◆ Event_TrackThirdPursuerColumn()

void Event_TrackThirdPursuerColumn ( void )
static

Definition at line 626 of file crossbone_isle_platform_rooms.c.

Referenced by Event_TrackThirdPursuerColumn().

◆ Event_TrackFourthPursuerColumn()

void Event_TrackFourthPursuerColumn ( void )
static

Definition at line 630 of file crossbone_isle_platform_rooms.c.

Referenced by Event_TrackFourthPursuerColumn().

◆ CrossboneIslePlatformRooms_TrackFifthPursuerColumn()

UNUSED void CrossboneIslePlatformRooms_TrackFifthPursuerColumn ( void )
static

◆ Event_DodgeThirdPursuer()

void Event_DodgeThirdPursuer ( void )
static

Lets the third pursuer follow the leader, then returns it home.

Definition at line 639 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeThirdPursuer().

◆ Event_DodgeFourthPursuer()

void Event_DodgeFourthPursuer ( void )
static

Aligns the fourth pursuer before sending it after the leader.

Definition at line 665 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeFourthPursuer().

◆ CrossboneIslePlatformRooms_CheckFifthPursuerTrigger()

void CrossboneIslePlatformRooms_CheckFifthPursuerTrigger ( void )
static

Starts the fifth chase when the leader enters column nineteen.

Definition at line 702 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_CheckFifthPursuerTrigger(), and CrossboneIslePlatformRooms_InitializeScene2().

◆ Event_DodgeFifthPursuer()

void Event_DodgeFifthPursuer ( void )
static

Lets the fifth pursuer follow the leader, then returns it home.

Definition at line 717 of file crossbone_isle_platform_rooms.c.

Referenced by Event_DodgeFifthPursuer().

◆ Event_BeginRevealBlend()

void Event_BeginRevealBlend ( void )
static

Reveal in the pursuer room: the translucent layer over the room vanishes while it lasts.

Definition at line 741 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BeginRevealBlend().

◆ Event_EndRevealBlend()

void Event_EndRevealBlend ( void )
static

Reveal wears off: the translucent layer returns.

Definition at line 749 of file crossbone_isle_platform_rooms.c.

Referenced by Event_EndRevealBlend().

◆ Event_UseLadder()

void Event_UseLadder ( void )
static

At the ladder by the second block: climb up or down, look ahead to the east, or push the first block from the floor to the west.

Definition at line 757 of file crossbone_isle_platform_rooms.c.

Referenced by Event_UseLadder().

◆ CrossboneIslePlatformRooms_UnusedCallback()

UNUSED void CrossboneIslePlatformRooms_UnusedCallback ( void )
static

◆ Event_FreezePuddle()

void Event_FreezePuddle ( void )
static

Frost on the puddle: it freezes into a pillar of ice the party can stand on.

Definition at line 796 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), and Event_FreezePuddle().

◆ Event_LookAheadOrPushFirstBlock()

void Event_LookAheadOrPushFirstBlock ( void )
static

Walking into the first block from the ladder side (trigger 70): facing east, look ahead; otherwise push the block.

Definition at line 812 of file crossbone_isle_platform_rooms.c.

Referenced by Event_LookAheadOrPushFirstBlock().

◆ CrossboneIslePlatformRooms_RestoreFirstBlockTerrain()

void CrossboneIslePlatformRooms_RestoreFirstBlockTerrain ( void )
static

Restores the first block row before applying its current footprint.

Definition at line 823 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreFirstBlockTerrain(), Event_PushFirstBlock(), and Event_UpdateFirstBlockTerrain().

◆ CrossboneIslePlatformRooms_RestoreEastUnderfootCell()

void CrossboneIslePlatformRooms_RestoreEastUnderfootCell ( void )
static

Restores support under the first block at the eastern cell.

Definition at line 833 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreEastUnderfootCell(), and Event_UpdateFirstBlockTerrain().

◆ CrossboneIslePlatformRooms_RestoreMiddleUnderfootCell()

void CrossboneIslePlatformRooms_RestoreMiddleUnderfootCell ( void )
static

Restores support under the first block at the middle cell.

Definition at line 840 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreMiddleUnderfootCell(), and Event_UpdateFirstBlockTerrain().

◆ CrossboneIslePlatformRooms_RestoreWestUnderfootCell()

void CrossboneIslePlatformRooms_RestoreWestUnderfootCell ( void )
static

Restores support under the first block at the western cell.

Definition at line 847 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreWestUnderfootCell(), and Event_UpdateFirstBlockTerrain().

◆ Event_UpdateFirstBlockTerrain()

void Event_UpdateFirstBlockTerrain ( void )
static

Rebuilds the first block support cells from its height and column.

Definition at line 854 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), Event_PushFirstBlock(), and Event_UpdateFirstBlockTerrain().

◆ CrossboneIslePlatformRooms_ReleaseSecondBlockPlatform()

void CrossboneIslePlatformRooms_ReleaseSecondBlockPlatform ( void )
static

Detaches the second block follower and restores the ladder cell.

Definition at line 909 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_ReleaseSecondBlockPlatform(), and Event_UpdateSecondBlockTerrain().

◆ Event_UpdateSecondBlockTerrain()

void Event_UpdateSecondBlockTerrain ( void )
static

Releases the second block platform when it reaches the ladder cell.

Definition at line 922 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), Event_PushSecondBlock(), and Event_UpdateSecondBlockTerrain().

◆ Event_PushSecondBlock()

void Event_PushSecondBlock ( void )
static

Pushing the second block (trigger 52); at the ladder, the platform riding on it stays there.

Definition at line 934 of file crossbone_isle_platform_rooms.c.

Referenced by Event_PushSecondBlock().

◆ CrossboneIslePlatformRooms_RestoreThirdBlockTerrain()

void CrossboneIslePlatformRooms_RestoreThirdBlockTerrain ( void )
static

Restores the terrain at both ends of the third block row.

Definition at line 940 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreThirdBlockTerrain(), Event_PushThirdBlock(), and Event_UpdateThirdBlockTerrain().

◆ CrossboneIslePlatformRooms_RestoreThirdBlockWestCell()

void CrossboneIslePlatformRooms_RestoreThirdBlockWestCell ( void )
static

Restores the third block support at the western end.

Definition at line 947 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreThirdBlockWestCell(), and Event_UpdateThirdBlockTerrain().

◆ CrossboneIslePlatformRooms_RestoreThirdBlockEastCell()

void CrossboneIslePlatformRooms_RestoreThirdBlockEastCell ( void )
static

Restores the third block support at the eastern end.

Definition at line 954 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_RestoreThirdBlockEastCell(), and Event_UpdateThirdBlockTerrain().

◆ Event_UpdateThirdBlockTerrain()

void Event_UpdateThirdBlockTerrain ( void )
static

Rebuilds support for the third block from its height and destination.

Definition at line 961 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), Event_PushThirdBlock(), and Event_UpdateThirdBlockTerrain().

◆ Event_PushThirdBlock()

void Event_PushThirdBlock ( void )
static

Pushing the third block (trigger 50).

Definition at line 985 of file crossbone_isle_platform_rooms.c.

Referenced by Event_PushThirdBlock(), and Event_TouchThirdBlock().

◆ Event_TouchThirdBlock()

void Event_TouchThirdBlock ( void )
static

Walking into the third block (trigger 54): facing south, the rising sequence plays; otherwise the block is pushed.

Definition at line 993 of file crossbone_isle_platform_rooms.c.

Referenced by Event_TouchThirdBlock().

◆ CrossboneIslePlatformRooms_RestoreFourthAndFifthBlockTerrain()

void CrossboneIslePlatformRooms_RestoreFourthAndFifthBlockTerrain ( void )
static

◆ CrossboneIslePlatformRooms_RepaintFourthAndFifthBlockCells()

void CrossboneIslePlatformRooms_RepaintFourthAndFifthBlockCells ( void )
static

◆ Event_UpdateFourthBlockTerrain()

void Event_UpdateFourthBlockTerrain ( void )
static

Refreshes the shared support row after the fourth block moves.

Definition at line 1028 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), Event_PushFourthBlock(), and Event_UpdateFourthBlockTerrain().

◆ Event_PushFourthBlock()

void Event_PushFourthBlock ( void )
static

Pushing the fourth block (trigger 53).

Definition at line 1033 of file crossbone_isle_platform_rooms.c.

Referenced by Event_PushFourthBlock().

◆ Event_UpdateFifthBlockTerrain()

void Event_UpdateFifthBlockTerrain ( void )
static

Refreshes the shared support row after the fifth block moves.

Definition at line 1040 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), CrossboneIslePlatformRooms_MoveFifthBlock(), and Event_UpdateFifthBlockTerrain().

◆ CrossboneIslePlatformRooms_MoveFifthBlock()

UNUSED void CrossboneIslePlatformRooms_MoveFifthBlock ( void )
static

Unused callback that moves the fifth block and refreshes its terrain.

Definition at line 1045 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_MoveFifthBlock().

◆ CrossboneIslePlatformRooms_UpdateBlockPriorities()

void CrossboneIslePlatformRooms_UpdateBlockPriorities ( void )
static

Chooses block drawing priorities from the leader height and row.

Definition at line 1069 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_InitializeScene3(), and CrossboneIslePlatformRooms_UpdateBlockPriorities().

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Initializes the key, pursuer or movable-block room.

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

Definition at line 1094 of file crossbone_isle_platform_rooms.c.

◆ CrossboneIslePlatformRooms_UpdateItemIcons()

UNUSED void CrossboneIslePlatformRooms_UpdateItemIcons ( void )
static

Unused callback that cycles key icon displays.

Definition at line 1109 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_UpdateItemIcons().

Variable Documentation

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
Initial value:
= {
DIRECTION_STEP(0, 16), DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0),
DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0), DIRECTION_STEP(0, -16),
DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16),
}
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 1263 of file crossbone_isle_platform_rooms.c.

◆ gStagedActor_FootprintKinds

u32 gStagedActor_FootprintKinds[]
Initial value:
= {
207, 205, 228, 229, 298, 297,
}

Definition at line 1273 of file crossbone_isle_platform_rooms.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
Initial value:
= {
-32, -8, 32, 8,
-8, -32, 8, 32,
-32, -16, 32, 0,
-8, -32, 8, 32,
-32, -8, 32, 8,
-8, -32, 8, 32,
}

Definition at line 1277 of file crossbone_isle_platform_rooms.c.

◆ gCrossboneIslePlatformRooms_BaneSquashScript

s32 gCrossboneIslePlatformRooms_BaneSquashScript[]
Initial value:
= {
SC_WAIT(2),
SC_WAIT(2),
SC_WAIT(2),
SC_WAIT(4),
SC_WAIT(2),
SC_WAIT(2),
SC_WAIT(2),
SC_WAIT(64),
}
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Definition fixed_math.h:10
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 1286 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneSecondEscape().

◆ gCrossboneIslePlatformRooms_BaneWalkTargets

s32 gCrossboneIslePlatformRooms_BaneWalkTargets[]
Initial value:
= {
888, 856,
872, 856,
856, 856,
840, 856,
824, 856,
824, 840,
824, 824,
840, 824,
856, 824,
872, 824,
888, 824,
888, 840,
}

Definition at line 1314 of file crossbone_isle_platform_rooms.c.

Referenced by Event_BaneKeepsAway().

◆ gCrossboneIslePlatformRoomsEntrancesOther

struct SceneEntrance gCrossboneIslePlatformRoomsEntrancesOther[]
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 1329 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEntrances().

◆ gCrossboneIslePlatformRoomsEntrances1

struct SceneEntrance gCrossboneIslePlatformRoomsEntrances1[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 200, 0, 968, FACING_NORTH, 0, 24, 560, 504, 1008, 0 },
{ 2, CONDITION_ALWAYS, 88, 0, 968, FACING_NORTH, 0, 24, 560, 504, 1008, 0 },
}
@ FACING_NORTH
Definition field_scene.h:32

Definition at line 1334 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEntrances().

◆ gCrossboneIslePlatformRoomsEntrances2

struct SceneEntrance gCrossboneIslePlatformRoomsEntrances2[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 200, 0, 408, FACING_NORTH, 0, 40, 0, 464, 440, 0 },
{ 2, CONDITION_ALWAYS, 88, 0, 392, FACING_NORTH, 0, 40, 0, 464, 440, 0 },
}

Definition at line 1340 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEntrances().

◆ gCrossboneIslePlatformRoomsEntrances3

struct SceneEntrance gCrossboneIslePlatformRoomsEntrances3[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 776, 0, 952, FACING_NORTH, 0, 512, 544, 928, 992, 0 },
{ 2, CONDITION_ALWAYS, 664, 0, 952, FACING_NORTH, 0, 512, 544, 928, 992, 0 },
}

Definition at line 1346 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEntrances().

◆ gCrossboneIslePlatformRoomsExits

u32 gCrossboneIslePlatformRoomsExits[]
Initial value:
= {
SCENE_EXIT(1, 128, 3),
SCENE_EXIT(2, 128, 4),
SCENE_EXIT(0, 118, 0),
SCENE_EXIT(1, 129, 3),
SCENE_EXIT(2, 129, 4),
SCENE_EXIT(0, 120, 0),
SCENE_EXIT(1, 131, 3),
SCENE_EXIT(2, 131, 4),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 1352 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetExits().

◆ gCrossboneIslePlatformRoomsPlacementsOther

struct ScenePlacement gCrossboneIslePlatformRoomsPlacementsOther[]
Initial value:
= {
}

Definition at line 1365 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetPlacements().

◆ gCrossboneIslePlatformRoomsPlacements1

struct ScenePlacement gCrossboneIslePlatformRoomsPlacements1[]
Initial value:
= {
}
@ TALK_KEEP_FACING
@ ACTOR_STAND
#define PIXELS(value)

Definition at line 1369 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetPlacements().

◆ gCrossboneIslePlatformRoomsPlacements2

struct ScenePlacement gCrossboneIslePlatformRoomsPlacements2[]

◆ gCrossboneIslePlatformRoomsPlacements3

struct ScenePlacement gCrossboneIslePlatformRoomsPlacements3[]

◆ gCrossboneIslePlatformRoomsEventsOther

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

Definition at line 1418 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEvents().

◆ gCrossboneIslePlatformRoomsEvents1

struct SceneEvent gCrossboneIslePlatformRoomsEvents1[]
Initial value:
= {
{ SEARCH(SEARCH_CHEST), 100, 0xeca, FIND_COINS(333) },
}
@ ABILITY_CATCH
Definition ability_ids.h:23
@ ABILITY_REVEAL
Definition ability_ids.h:19
static void Event_CatchThirdBlueKey(void)
Catch on the third Blue Key.
static void Event_OpenFourthBlueDoor(void)
Touching the fourth blue door; pressing on it from the north looks ahead every dozen blocked steps.
static void Event_ShowRedKey(void)
Reveal in the key room: the hidden Red Key appears on its tile.
static void Event_OpenFirstBlueDoor(void)
Touching the first blue door.
static void Event_CatchSecondBlueKey(void)
Catch on the second Blue Key.
static void Event_CatchFirstBlueKey(void)
Catch on the first Blue Key: the party gets it.
static void Event_HideRedKey(void)
Reveal wears off: the Red Key's tile is hidden again.
static void Event_UseRedKey(void)
Facing the red door with the Red Key: the door rumbles open, and the key is used up.
static void Event_OpenThirdBlueDoor(void)
Touching the third blue door; pressing on it from the north looks ahead every dozen blocked steps.
static void Event_CheckLeaderAhead(void)
Walking south into the third or fourth blue door: look at what is ahead.
static void Event_OpenSecondBlueDoor(void)
Touching the second blue door.
static void Event_CatchFourthBlueKey(void)
Catch on the fourth Blue Key.
static void Event_CatchRedKey(void)
Catch on the revealed Red Key.
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_EXIT
#define PSYNERGY_IN_AREA(ability, phase)
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
@ SEARCH_CHEST
#define FIND_COINS(coins)
@ ITEM_FAIRY_RING
Definition item_ids.h:86
@ ITEM_SMOKE_BOMB
Definition item_ids.h:67
@ ITEM_COOKIE
Definition item_ids.h:51

Definition at line 1422 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEvents().

◆ gCrossboneIslePlatformRoomsEvents2

struct SceneEvent gCrossboneIslePlatformRoomsEvents2[]
Initial value:
= {
{ SEARCH(SEARCH_CHEST), 100, 0xece, FIND_COINS(444) },
}
@ ABILITY_HALT
Definition ability_ids.h:20
static void Event_DodgeFourthPursuer(void)
Aligns the fourth pursuer before sending it after the leader.
static void Event_TrackFourthPursuerColumn(void)
static void Event_TrackThirdPursuerColumn(void)
static void Event_DodgeSecondPursuer(void)
Lets the second pursuer follow the leader, then returns it home.
static void Event_DodgeFirstPursuer(void)
Lets the first pursuer follow the leader, then returns it home.
static void Event_BeginRevealBlend(void)
Reveal in the pursuer room: the translucent layer over the room vanishes while it lasts.
static void Event_EndRevealBlend(void)
Reveal wears off: the translucent layer returns.
static void Event_DodgeFifthPursuer(void)
Lets the fifth pursuer follow the leader, then returns it home.
static void Event_HaltPursuer(void)
Halt on a pursuer: nothing beyond the Psynergy's own effect.
static void Event_DodgeThirdPursuer(void)
Lets the third pursuer follow the leader, then returns it home.
@ EVENT_RAISED
@ ITEM_SLEEP_BOMB
Definition item_ids.h:68
@ ITEM_STORM_GEAR
Definition item_ids.h:28
@ ITEM_PSY_CRYSTAL
Definition item_ids.h:46

Definition at line 1446 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEvents().

◆ gCrossboneIslePlatformRoomsEvents3

struct SceneEvent gCrossboneIslePlatformRoomsEvents3[]

Definition at line 1471 of file crossbone_isle_platform_rooms.c.

Referenced by Scene_GetEvents().

◆ gCrossboneIslePlatformRooms_SlotColumns

u32 gCrossboneIslePlatformRooms_SlotColumns[]
Initial value:
= {
16,
21,
0,
}

Definition at line 1544 of file crossbone_isle_platform_rooms.c.

Referenced by CrossboneIslePlatformRooms_TrackPursuerColumn().

◆ gCrossboneIslePlatformRooms_IconTimer

s32 gCrossboneIslePlatformRooms_IconTimer = 0