colosso_log.c
Colosso's third finals course: Isaac races another warrior through the Scales of Justice, the Stepping-Stone Stage, the Wall Wedge, the Free-Climb Area, the Moving Sidewalk Stage and a log-rolling area to the arena.
games/tbs/src/scene/colosso_log.c on GitHub
Colosso's third finals course: Isaac races another warrior through the Scales of Justice, the Stepping-Stone Stage, the Wall Wedge, the Free-Climb Area, the Moving Sidewalk Stage and a log-rolling area to the arena.
Functions
InitializeActorZero
static inline void InitializeActorZero(void)
Sets the leader speed for the shared solo-party placement routine.
Used by Colosso_AskReadyToRace.
InitializeSelectedActor
static inline void InitializeSelectedActor(s32 actorId)
Sets a companion speed for the shared solo-party placement routine.
Used by Colosso_AskReadyToRace.
ColossoLogRollingStage_SceneTask
static void ColossoLogRollingStage_SceneTask(void)
Cycles the moving wall and raises the opening event beneath the rider.
Used by ColossoLogRollingStage_ResetAndRunSceneTask, ColossoLogRollingStage_StartSceneTask, ColossoLog_Initialize, Event_HaltWall.
ColossoLogRollingStage_ResetAndRunSceneTask
static void ColossoLogRollingStage_ResetAndRunSceneTask(void)
Resets the moving wall to its first displayed pattern.
Used by Event_TalkToWallWedgeAttendant.
ColossoLogRollingStage_StartSceneTask
static void ColossoLogRollingStage_StartSceneTask(void)
Resumes cycling the moving wall.
Used by Event_TalkToWallWedgeAttendant.
ColossoLogRollingStage_WaitForSceneTask
static void ColossoLogRollingStage_WaitForSceneTask(void)
Waits for the wall pattern used by the tutorial, with a bounded timeout.
Used by Event_TalkToWallWedgeAttendant.
Event_RideMovingSidewalk
static void Event_RideMovingSidewalk(void)
On the Moving Sidewalk, until 0x363 is set, the belt carries the controlled actor and the camera west.
Used by gColossoLogEvents.
Event_GrowPlant
static void Event_GrowPlant(void)
Growth on the plant: it grows and opens a shortcut (0x360).
Used by gBilibinCaveEvents3, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.
ColossoLog_MoveOnScales
static inline void ColossoLog_MoveOnScales(struct FieldActor *pan, s32 height)
Moves a scale pan vertically at the shared speed and acceleration.
Used by Event_FreezeOnScales, Event_SetWeightOnScales, Event_StepOffScales, Event_StepOnScales, Event_TalkToScalesAttendant.
Event_FreezeOnScales
static void Event_FreezeOnScales(void)
Frost on the target on the eastern pan: it freezes and the Scales of Justice tip, the western pan down and the eastern pan up (0x362).
Used by gColossoLogEvents.
Event_StepOnScales
static void Event_StepOnScales(void)
Stepping onto the western pan, unless the scales are frozen: it sinks with the rider as the eastern pan rises (0x367).
Used by gColossoLogEvents.
Event_StepOffScales
static void Event_StepOffScales(void)
Stepping off the western pan: the scales swing back.
Used by gColossoLogEvents.
Event_SetWeightOnScales
static void Event_SetWeightOnScales(void)
When the weight reaches the western pan, it sinks the pan and the eastern pan rises (0x368).
Used by Event_PushWeight, gColossoLogEvents.
Event_PushWeight
static void Event_PushWeight(void)
Walking into the weight pushes it, perhaps onto the scales.
Used by Event_PushWeightOrCheckAhead, gColossoLogEvents.
Event_MoveStone
static void Event_MoveStone(void)
After Move on the stone: its column is kept (byte flag 0x370) and its cell rebuilt.
Used by gColossoLogEvents.
Event_IgnoreMove
static void Event_IgnoreMove(void)
Move on this rock needs nothing more.
Used by gColossoLogEvents, gColossoWallEvents.
Event_PushRock
static void Event_PushRock(void)
Walking into a rock pushes it.
Used by Event_PushRockOrCheckAhead, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.
Event_SettleRocks
static void Event_SettleRocks(void)
A rock resting on the floor becomes a step (FLAG_SCENE_TEMP_14 to _16).
Used by Event_PushRock, Event_RollLongLog, gColossoLogEvents, gColossoRiver_Events.
ColossoLog_UpdateEastEndCollision
static void ColossoLog_UpdateEastEndCollision(void)
Changes the eastern end collision according to the rider facing.
Used by ColossoLog_Initialize.
ColossoLogRollingStage_CheckObstacleDestination
static s32 ColossoLogRollingStage_CheckObstacleDestination(s32 x, s32 z)
Rejects blocked cells and cells occupied by one of the three obstacles.
Used by ColossoLogRollingStage_CheckPathClearance.
ColossoLogRollingStage_CheckPathClearance
static s32 ColossoLogRollingStage_CheckPathClearance(s32 x, s32 z)
Checks all four cells covered by the long rolling log.
Used by Event_RollLongLog.
Event_RollLongLog
static void Event_RollLongLog(void)
Walking into the long log rolls it, with the leader, the way the pad is held until something stops it; at the east end it drops into place and the path is made (0x369). Away from the log, a rock ahead is pushed instead.
Used by gColossoLogEvents.
ColossoLog_ShowActivatedSidewalkLayer
static s32 ColossoLog_ShowActivatedSidewalkLayer(struct ScriptInterpreter *interpreter)
Displays the activated moving sidewalk and plays its arrival sounds.
Used by gColossoSceneEventEffect.
Event_ForceSidewalkBlock
static void Event_ForceSidewalkBlock(void)
Force on the Moving Sidewalk's block: it slides away and the belt carries no one any more (0x363).
Used by gColossoLogEvents.
Event_HaltWall
static void Event_HaltWall(void)
Halt on the wall operator: the Wall Wedge stops at its next open pattern (0x361).
Used by gColossoLogEvents.
Event_PassNorthWallOpening
static void Event_PassNorthWallOpening(void)
The rider passes through the moving wall's northern opening.
Used by gColossoLogEvents.
Event_PassSouthWallOpening
static void Event_PassSouthWallOpening(void)
The rider passes through the moving wall's southern opening.
Used by Event_TalkToWallWedgeAttendant, gColossoLogEvents.
ColossoLog_RunCompetitorTalk
UNUSED static void ColossoLog_RunCompetitorTalk(s32 competitorId)
Offers to practise the course with a selected solo competitor.
Event_ReachArena
static void Event_ReachArena(void)
Reaching the arena: the leader takes a prize (the Claymore if first, the Hunter's Sword 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.
Event_CheckAhead
static void Event_CheckAhead(void)
Walking into something: unless it is an actor, it is checked.
Used by gBilibinEvents2, gBilibinEvents3, gColossoLogEvents, gColossoWallEvents, gGondowanCaveEvents3, gSolSanctumElementalStarRoom_Events.
Event_PushWeightOrCheckAhead
static void Event_PushWeightOrCheckAhead(void)
Walking into something: the weight is pushed, anything else is checked.
Used by gColossoLogEvents.
ColossoLog_Initialize
s32 ColossoLog_Initialize(void)
Restores obstacle progress, then enters practice, introduction or battle aftermath.
ColossoLogRollingStage_AdvanceParticleMotion
static s32 ColossoLogRollingStage_AdvanceParticleMotion( struct ScriptInterpreter *interpreter)
Advances a reunion particle; timer and work hold signed 1/256-pixel steps.
Used by gColossoParticleKinds.
ColossoLogRollingStage_SpawnPeriodicParticle
static void ColossoLogRollingStage_SpawnPeriodicParticle(void)
Shows one of three reunion particles at its scheduled point in the cycle.
Used by ColossoLog_PlayPostBattleReunion.
ColossoLog_PlayPostBattleReunion
static void ColossoLog_PlayPostBattleReunion(s32 battleResult)
Reunites the party after the battle and plays the resting conversation.
Used by ColossoLog_Initialize.
ColossoLog_IntroduceFinalCourse
static void ColossoLog_IntroduceFinalCourse(s32 guideId)
Stages the party behind the guide for the introduction to the third finals.
Used by ColossoLog_Initialize.
Event_TalkToScalesAttendant
static void Event_TalkToScalesAttendant(s32 guideId)
The Scales of Justice's attendant: the first time, the pans are shown; then the objective.
Used by gColossoLogEvents.
Event_TalkToSteppingStoneAttendant
static void Event_TalkToSteppingStoneAttendant(s32 guideId)
The Stepping-Stone Stage's attendant: the first time, a warrior finds the way; then the objective.
Used by gColossoLogEvents.
Event_TalkToWallWedgeAttendant
static void Event_TalkToWallWedgeAttendant(s32 guideId)
The Wall Wedge's attendant: the first time, a warrior times his way through the moving wall; then that its operator will cheer for Isaac.
Used by gColossoLogEvents.
Event_TalkToFreeClimbAttendant
static void Event_TalkToFreeClimbAttendant(s32 guideId)
The Free-Climb Area's attendant: the first time, a warrior climbs across; then the objective.
Used by gColossoLogEvents.
ColossoLogRollingStage_PositionActor
static void ColossoLogRollingStage_PositionActor(s32 selector, s32 x, s32 z)
Starts a scripted pixel destination while preserving the actor height.
Used by Event_TalkToMovingSidewalkAttendant.
ColossoLogRollingStage_PositionAndActivateActor
static void ColossoLogRollingStage_PositionAndActivateActor(s32 selector, s32 x, s32 z)
Moves to a scripted pixel destination, waits, then restores the idle mode.
Used by Event_TalkToMovingSidewalkAttendant.
Event_TalkToMovingSidewalkAttendant
static void Event_TalkToMovingSidewalkAttendant(s32 guideId)
The Moving Sidewalk Stage's attendant: the first time, a warrior walks against the belt; then the objective.
Used by gColossoLogEvents.
Event_TalkToLogRollingAttendant
static void Event_TalkToLogRollingAttendant(s32 actor)
The log-rolling area's attendant: the first time, a marker traces the log's route; then the objective.
Used by gColossoLogEvents, gColossoWallEvents.
ColossoLogRollingStage_InitializeModeTask
static void ColossoLogRollingStage_InitializeModeTask(u32 mode, u32 parameter)
Selects the portrait task script and clears its movement state.
Used by ColossoLogRollingStage_RunScriptedTransition.
ColossoLogRollingStage_RunScriptedTransition
static void ColossoLogRollingStage_RunScriptedTransition(s32 mode)
Plays the countdown portraits and the start-of-race transition.
Used by ColossoLog_Initialize.
FieldScene_RunScene3bcSequenceA
UNUSED static void FieldScene_RunScene3bcSequenceA(s32 countdown)
Unused portrait countdown for a signed number of seconds.
WriteU32AsHex
UNUSED static void WriteU32AsHex(u8 *hexText, u32 value)
Writes eight hexadecimal digits followed by a terminator.
ColossoLog_MarkRivalFinished
UNUSED static void ColossoLog_MarkRivalFinished(void)
Marks the rival path recorder as finished.
ColossoLog_WaitForRivalToFinish
static void ColossoLog_WaitForRivalToFinish(void)
Waits until the rival path recorder reaches its finished mode.
Used by Event_ReachArena.
ColossoLogRollingStage_SpawnRandomSceneEffect
static void ColossoLogRollingStage_SpawnRandomSceneEffect(union FieldObject *fieldObject)
Occasionally scatters an effect around a moving source actor.
Used by gColossoLinkedEffect.
ColossoLogRollingStage_RaiseLinkedSceneEffect
static s32 ColossoLogRollingStage_RaiseLinkedSceneEffect( struct ScriptInterpreter *interpreter)
Raises the linked item actor and clears the source link.
Used by gColossoLog_PlaceScript, gColosso_RivalFinishScript.
ColossoLog_CollectFinishEquipment
static s32 ColossoLog_CollectFinishEquipment(s32 firstItem, s32 secondItem)
Moves to the available finish item, equips it and announces it.
Used by Event_ReachArena.
ColossoLog_PushActorAhead
static void ColossoLog_PushActorAhead(void)
Pushes a neighboring actor one cell when its destination and overhead are clear.
Used by Event_PushRock, Event_PushWeight, Event_RollLongLog.
Also, functions without a comment: ColossoLog_GetEntrances, ColossoLog_GetRegions, ColossoLog_GetExits, ColossoLog_GetPlacements, ColossoLogRollingStage_NoopSceneEventHook, ColossoLog_GetEvents, ColossoLogRollingStage_NoopSceneHook.
Types, without a comment: SceneTaskEntry.
Macros
DIRECTION_STEP
#define DIRECTION_STEP(x, z) ((u32)(x) << 16 | (u16)(z))
Pixel step by direction: X in the upper halfword, Z in the lower.
Used by gBilibinCave_PushSteps, gBilibin_FacingCellSteps, gColossoRiver_DirectionSteps, gColossoWall_DirectionSteps, gStagedActor_DirectionSteps.
Also, macros without a comment: COLOSSO_LOG_FACE_DIRECTION, COLOSSO_LOG_INITIALIZE_MODE_TASK, COLOSSO_LOG_APPLY_MATCHING_SLOT_VALUES, COLOSSO_LOG_FACE_DIRECTION, COLOSSO_LOG_INITIALIZE_MODE_TASK, COLOSSO_LOG_APPLY_MATCHING_SLOT_VALUES.
Globals, without a comment: gColossoParticleCount, gColossoLog_Record30Script, gColossoLog_LogPattern, gColossoEarlySequenceData, gColossoSceneEventEffect, gColosso_LetteringPaletteOffsets, gColossoModeScript2, gColossoModeScript3B, gColossoHexChars, gColossoRandomEffect, gColossoLinkedEffect, gStagedActor_DirectionSteps, gColossoLogEntrances, gColossoLogExits, gColossoLogPlacements, gColossoSceneTaskStatus, gColossoSceneTaskState, gColossoLogEvents, gColossoLog_Actor8Action, gColossoLog_LeaderActionA, gColossoLog_LeaderActionB, gColossoLog_LeaderActionC, gColossoMultiPhaseData, gColossoParticleKinds, gColosso_LetteringSlot, gColossoModeScriptDefault, gColossoModeScript4, gColossoModeScript3A, gColosso_MarkerSlot, gColosso_RivalFinishScript, gColossoLog_PlaceScript.