colosso_wall.c
Colosso's second finals course: Isaac races another warrior through the Mini-Maze, the shifting floor, the Log-Rolling Stage, the Wall and the Board Walk to the arena.
games/tbs/src/scene/colosso_wall.c on GitHub
Colosso's second finals course: Isaac races another warrior through the Mini-Maze, the shifting floor, the Log-Rolling Stage, the Wall and the Board Walk to the arena.
Functions
InitializeActorZero
static inline void InitializeActorZero(void)
Sets the party leader's walking speed and acceleration.
Used by Colosso_AskReadyToRace.
InitializeSelectedActor
static inline void InitializeSelectedActor(s32 actorId)
Sets the specified actor's walking speed and acceleration.
Used by Colosso_AskReadyToRace.
Scene_GetExits
const u32 *Scene_GetExits(void)
Returns the packed course and battle-result exits.
Scene_GetPlacements
const struct ScenePlacement *Scene_GetPlacements(void)
Returns the course's competitors, obstacles and attendants.
Event_IgnoreMove
static void Event_IgnoreMove(void)
Move on the first two rocks does nothing.
Used by gColossoLogEvents, gColossoWallEvents.
Event_PushRock
static void Event_PushRock(void)
Pushes the obstacle immediately ahead of the selected actor.
Used by Event_PushRockOrCheckAhead, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.
Event_UpdateMovedRockCell
static void Event_UpdateMovedRockCell(void)
Updates the first movable obstacle's collision after Move.
Used by Event_PushRockAndUpdateCells, gColossoWallEvents.
Event_PushRockAndUpdateCells
static void Event_PushRockAndUpdateCells(void)
Pushes an obstacle, then restores the first obstacle's collision cell.
Used by gColossoWallEvents.
Event_SaveMovedRockColumns
static void Event_SaveMovedRockColumns(void)
Saves the movable obstacles' columns and rebuilds their collision cells.
Used by gColossoWallEvents.
Event_PrepareForce
static void Event_PrepareForce(void)
Enables the child effect for Force on the course obstacle.
Used by gColossoWallEvents.
Event_KnockDownObstacle
static void Event_KnockDownObstacle(void)
Force on the target: the obstacle spins down into place and the way past it opens (0x330).
Used by gColossoWallEvents.
Event_FreezeWestTarget
static void Event_FreezeWestTarget(void)
Frost on the western target: it freezes and its crossing opens (0x331).
Used by gColossoWallEvents.
Event_FreezeEastTarget
static void Event_FreezeEastTarget(void)
Frost on the eastern target: it freezes and its crossing opens (0x332).
Used by gColossoWallEvents.
Event_GrowPlant
static void Event_GrowPlant(void)
Growth on the plant: it grows into a strip that can be climbed (0x333).
Used by gBilibinCaveEvents3, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.
Event_RunRisingSequence
static void Event_RunRisingSequence(void)
Runs the rising-object sequence for the actor touching the obstacle.
Used by gColossoWallEvents.
ColossoWall_MovePusherAndLog
static void ColossoWall_MovePusherAndLog(s32 logId, s32 offsetX, s32 offsetZ)
Moves a riding log and its pusher to aligned cell centers.
Used by Event_RideLog.
Event_RideLog
static void Event_RideLog(void)
Moves the aligned riding log in the direction the player holds.
Used by gColossoWallEvents.
ColossoWall_RollLogToCell
static void ColossoWall_RollLogToCell(s32 logId, s32 halfCellX, s32 halfCellZ)
Rolls a log to half-cell coordinates while its pusher follows halfway.
Used by ColossoWall_RollCenterLogNorth, ColossoWall_RollCenterLogSouth, Event_RollEastLogEast, Event_RollEastLogWest, Event_RollWestLogEast, Event_RollWestLogWest.
ColossoWall_UpdateRollingLogCollision
static void ColossoWall_UpdateRollingLogCollision(void)
Rebuilds the three rolling logs' collision rectangles at their positions.
Used by ColossoWall_Initialize, ColossoWall_RollCenterLogNorth, ColossoWall_RollCenterLogSouth, Event_RollEastLogEast, Event_RollEastLogWest, Event_RollWestLogEast, Event_RollWestLogWest.
ColossoWall_RollCenterLogNorth
static UNUSED void ColossoWall_RollCenterLogNorth(void)
Rolls the center log north and rebuilds the log collision rectangles.
ColossoWall_RollCenterLogSouth
static UNUSED void ColossoWall_RollCenterLogSouth(void)
Rolls the center log south and rebuilds the log collision rectangles.
ColossoWall_UpdateMovingPlatforms
static void ColossoWall_UpdateMovingPlatforms(void)
Carries the selected actor on the moving platforms and alternates their routes.
Used by ColossoWall_Initialize, ColossoWall_ResetMovingPlatforms, ColossoWall_StartMovingPlatforms, Event_HaltLifts.
ColossoWall_ResetMovingPlatforms
static void ColossoWall_ResetMovingPlatforms(void)
Stops the moving-platform task and restores its starting row.
Used by Event_TalkToShiftingFloorAttendant.
ColossoWall_StartMovingPlatforms
static void ColossoWall_StartMovingPlatforms(void)
Starts the moving-platform task and releases its pause flag.
Used by Event_TalkToShiftingFloorAttendant.
ColossoWall_WaitForPlatformCrossingPhase
static void ColossoWall_WaitForPlatformCrossingPhase(void)
Waits for the demonstration's crossing phase, with a ten-second timeout.
Used by Event_TalkToShiftingFloorAttendant.
Event_HaltLifts
static void Event_HaltLifts(void)
Halt on the lift operator: the lifts stop and leave a crossing (0x334).
Used by gColossoWallEvents.
Event_ReachArena
static void Event_ReachArena(void)
Reaching the arena: the leader takes a prize (the Chain Mail if first, the Cotton Shirt if second), and he and his opponent face off and fight. FLAG_SCENE_TEMP_11 says the arena was already reached; the arena's touch works while FLAG_SCENE_TEMP_10 is clear.
Used by gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.
Scene_GetEvents
const struct SceneEvent *Scene_GetEvents(void)
Returns the course's obstacle interactions and attendant dialogue.
ColossoWall_StageBattleResult
static void ColossoWall_StageBattleResult(s32 result)
Back from the battle: the two warriors stand in the arena as the result is shown.
Used by ColossoWall_Initialize.
ColossoWall_Initialize
s32 ColossoWall_Initialize(void)
Restores obstacle progress and sets up the selected course entrance.
ColossoWall_IntroduceSecondFinals
static void ColossoWall_IntroduceSecondFinals(s32 attendantId)
Introduces the second finals course, then gathers the party behind Isaac.
Used by ColossoWall_Initialize.
Event_TalkToMiniMazeAttendant
static void Event_TalkToMiniMazeAttendant(s32 attendant)
The Mini-Maze's attendant: the first time, a warrior runs the maze; then the objective.
Used by gColossoWallEvents.
Event_TalkToShiftingFloorAttendant
static void Event_TalkToShiftingFloorAttendant(s32 attendant)
The shifting floor's attendant: the first time, a warrior rides the lifts; then, that the lifts' operator will cheer for Isaac.
Used by gColossoWallEvents.
Event_TalkToLogRollingAttendant
static void Event_TalkToLogRollingAttendant(s32 attendant)
The Log-Rolling Stage's attendant: a warrior rides a log across; then the objective.
Used by gColossoLogEvents, gColossoWallEvents.
Event_TalkToWallAttendant
static void Event_TalkToWallAttendant(s32 attendant)
The Wall's attendant: a warrior climbs it; then the objective.
Used by gColossoWallEvents.
ColossoWall_PushBlockToCell
static void ColossoWall_PushBlockToCell(s32 obstacleId, s32 column, s32 row)
Moves a demonstration obstacle to pixel coordinates while its pusher follows.
Used by Event_TalkToBoardWalkAttendant.
Event_TalkToBoardWalkAttendant
static void Event_TalkToBoardWalkAttendant(s32 attendant)
The Board Walk's attendant: a warrior rolls a log into a path; then the objective.
Used by gColossoWallEvents.
ColossoWall_StartLetteringAnimation
static void ColossoWall_StartLetteringAnimation(u32 mode, u32 tileVariant)
Chooses the lettering animation script and resets its task state.
Used by ColossoWall_ShowRoundStartLettering.
ColossoWall_ShowRoundStartLettering
static void ColossoWall_ShowRoundStartLettering(s32 mode)
Shows the course-opening lettering and plays its timed audio cues.
Used by ColossoWall_Initialize.
ColossoWall_ShowBattleResultLettering
static void ColossoWall_ShowBattleResultLettering(s32 result)
Shows the win-or-loss lettering and the appropriate competitor's reaction.
Used by ColossoWall_StageBattleResult.
Text_WriteU32AsHex
static UNUSED void Text_WriteU32AsHex(u8 *destination, u32 value)
Writes eight uppercase hexadecimal digits followed by a terminator.
SceneState_EmptyHook
static void SceneState_EmptyHook(void)
Retains the empty hook called before the finish sequence.
Used by Event_ReachArena.
ColossoWall_SpawnRandomSceneEffect
static void ColossoWall_SpawnRandomSceneEffect(union FieldObject *fieldObject)
Occasionally spawns a falling particle around the linked finish effect.
Used by gColossoWall_RaiseScript.
ColossoWall_RaiseLinkedSceneEffect
static s32 ColossoWall_RaiseLinkedSceneEffect(struct ScriptInterpreter *interpreter)
Raises the linked finish effect, starts its script and clears the link.
Used by gColossoWall_ApproachScript, gColosso_RivalFinishScript.
ColossoWall_ApproachFinishAndTakeItem
static s32 ColossoWall_ApproachFinishAndTakeItem(s32 firstItem, s32 secondItem)
Approaches the finish item on the unused side and shows the item message.
Used by Event_ReachArena.
FieldScene_BuildDescriptorAndInstallTask
void FieldScene_BuildDescriptorAndInstallTask(s32 leaderId, s32 rivalId, s32 segments, s32 finishX, s32 finishZ, s32 firstItem, s32 secondItem)
Allocates the race work, records both competitors and installs the gauge task.
Used by ColossoWall_Initialize.
ColossoWall_StartRivalPath
static void ColossoWall_StartRivalPath(s32 pathResource)
Decodes the rival's recorded path and starts its playback task.
Used by ColossoWall_Initialize.
ColossoWall_PushAdjacentObstacle
static void ColossoWall_PushAdjacentObstacle(void)
Pushes the adjacent obstacle only when the destination and space above are clear.
Used by Event_PushRock, Event_PushRockAndUpdateCells.
Also, functions without a comment: Scene_GetEntrances, Scene_GetRegions, Event_CheckAhead, Event_RollWestLogWest, Event_RollWestLogEast, Event_RollEastLogWest, Event_RollEastLogEast, ColossoWall_MarkRivalFinished, ColossoWall_WaitForRivalFinish.
Macros, without a comment: COLOSSO_WALL_FIRST_PLATFORM, COLOSSO_WALL_LAST_PLATFORM, COLOSSO_WALL_PLATFORM_CYCLE_FRAMES, COLOSSO_WALL_PLATFORM_CROSSING_FRAME, COLOSSO_WALL_DEMONSTRATION_TIMEOUT_FRAMES, COLOSSO_WALL_LOG_TRAVEL_PIXELS, COLOSSO_WALL_OFFSET_FIXED, COLOSSO_WALL_OFFSET_FIXED, COLOSSO_WALL_ALTERNATE_PORTRAIT_PALETTE_OFFSET, COLOSSO_WALL_ALTERNATE_PORTRAIT_PALETTE_OFFSET, COLOSSO_WALL_INTRO_SCALE, COLOSSO_WALL_INTRO_SCALE, COLOSSO_WALL_PULSE_FIRST_SCALE, COLOSSO_WALL_PULSE_HIGH_SCALE, COLOSSO_WALL_PULSE_LOW_SCALE, COLOSSO_WALL_PULSE_FIRST_SCALE, COLOSSO_WALL_PULSE_HIGH_SCALE, COLOSSO_WALL_PULSE_LOW_SCALE, COLOSSO_WALL_PULSE_FIRST_SCALE, COLOSSO_WALL_PULSE_HIGH_SCALE, COLOSSO_WALL_PULSE_LOW_SCALE, COLOSSO_WALL_SHOW_MESSAGE, COLOSSO_WALL_MOVE_ACTOR_PAIR, COLOSSO_WALL_START_MODE_TASK, COLOSSO_WALL_APPLY_MATCHING_SLOT_VALUE, COLOSSO_WALL_SHOW_MESSAGE, COLOSSO_WALL_MOVE_ACTOR_PAIR, COLOSSO_WALL_START_MODE_TASK, COLOSSO_WALL_APPLY_MATCHING_SLOT_VALUE, DIRECTION_STEP.
Globals, without a comment: gColossoWall_RollLogScript, gColosso_LetteringPaletteOffsets, gColossoWall_ModeRecordTwo, gColossoWall_ModeRecordThreeAlt, gHexDigits, gColossoWall_SparkScript, gColossoWall_RaiseScript, gColossoWall_DirectionSteps, gColossoWallEntrances, gColossoWallExits, gColossoWallPlacements, gColossoWall_SpectatorPhase, gColossoWall_SpectatorTimer, gColossoWallEvents, gColosso_LetteringSlot, gColossoWall_ModeRecordDefault, gColossoWall_ModeRecordFour, gColossoWall_ModeRecordThree, gColosso_MarkerSlot, gColosso_RivalFinishScript, gColossoWall_ApproachScript.