Alchemy

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.

Line 116

InitializeSelectedActor

static inline void InitializeSelectedActor(s32 actorId)

Sets a companion speed for the shared solo-party placement routine.

Used by Colosso_AskReadyToRace.

Line 121

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.

Line 140

ColossoLogRollingStage_ResetAndRunSceneTask

static void ColossoLogRollingStage_ResetAndRunSceneTask(void)

Resets the moving wall to its first displayed pattern.

Used by Event_TalkToWallWedgeAttendant.

Line 179

ColossoLogRollingStage_StartSceneTask

static void ColossoLogRollingStage_StartSceneTask(void)

Resumes cycling the moving wall.

Used by Event_TalkToWallWedgeAttendant.

Line 190

ColossoLogRollingStage_WaitForSceneTask

static void ColossoLogRollingStage_WaitForSceneTask(void)

Waits for the wall pattern used by the tutorial, with a bounded timeout.

Used by Event_TalkToWallWedgeAttendant.

Line 195

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.

Line 212

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.

Line 227

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.

Line 236

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.

Line 244

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.

Line 264

Event_StepOffScales

static void Event_StepOffScales(void)

Stepping off the western pan: the scales swing back.

Used by gColossoLogEvents.

Line 301

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.

Line 324

Event_PushWeight

static void Event_PushWeight(void)

Walking into the weight pushes it, perhaps onto the scales.

Used by Event_PushWeightOrCheckAhead, gColossoLogEvents.

Line 355

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.

Line 362

Event_IgnoreMove

static void Event_IgnoreMove(void)

Move on this rock needs nothing more.

Used by gColossoLogEvents, gColossoWallEvents.

Line 374

Event_PushRock

static void Event_PushRock(void)

Walking into a rock pushes it.

Used by Event_PushRockOrCheckAhead, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.

Line 377

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.

Line 380

ColossoLog_UpdateEastEndCollision

static void ColossoLog_UpdateEastEndCollision(void)

Changes the eastern end collision according to the rider facing.

Used by ColossoLog_Initialize.

Line 405

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.

Line 424

ColossoLogRollingStage_CheckPathClearance

static s32 ColossoLogRollingStage_CheckPathClearance(s32 x, s32 z)

Checks all four cells covered by the long rolling log.

Used by Event_RollLongLog.

Line 448

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.

Line 461

ColossoLog_ShowActivatedSidewalkLayer

static s32 ColossoLog_ShowActivatedSidewalkLayer(struct ScriptInterpreter *interpreter)

Displays the activated moving sidewalk and plays its arrival sounds.

Used by gColossoSceneEventEffect.

Line 578

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.

Line 589

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.

Line 605

Event_PassNorthWallOpening

static void Event_PassNorthWallOpening(void)

The rider passes through the moving wall's northern opening.

Used by gColossoLogEvents.

Line 616

Event_PassSouthWallOpening

static void Event_PassSouthWallOpening(void)

The rider passes through the moving wall's southern opening.

Used by Event_TalkToWallWedgeAttendant, gColossoLogEvents.

Line 644

ColossoLog_RunCompetitorTalk

UNUSED static void ColossoLog_RunCompetitorTalk(s32 competitorId)

Offers to practise the course with a selected solo competitor.

Line 678

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.

Line 714

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.

Line 754

Event_PushWeightOrCheckAhead

static void Event_PushWeightOrCheckAhead(void)

Walking into something: the weight is pushed, anything else is checked.

Used by gColossoLogEvents.

Line 761

ColossoLog_Initialize

s32 ColossoLog_Initialize(void)

Restores obstacle progress, then enters practice, introduction or battle aftermath.

Line 775

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.

Line 990

ColossoLogRollingStage_SpawnPeriodicParticle

static void ColossoLogRollingStage_SpawnPeriodicParticle(void)

Shows one of three reunion particles at its scheduled point in the cycle.

Used by ColossoLog_PlayPostBattleReunion.

Line 1003

ColossoLog_PlayPostBattleReunion

static void ColossoLog_PlayPostBattleReunion(s32 battleResult)

Reunites the party after the battle and plays the resting conversation.

Used by ColossoLog_Initialize.

Line 1054

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.

Line 1257

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.

Line 1326

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.

Line 1392

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.

Line 1447

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.

Line 1504

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.

Line 1568

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.

Line 1580

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.

Line 1596

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.

Line 1655

ColossoLogRollingStage_InitializeModeTask

static void ColossoLogRollingStage_InitializeModeTask(u32 mode, u32 parameter)

Selects the portrait task script and clears its movement state.

Used by ColossoLogRollingStage_RunScriptedTransition.

Line 1700

ColossoLogRollingStage_RunScriptedTransition

static void ColossoLogRollingStage_RunScriptedTransition(s32 mode)

Plays the countdown portraits and the start-of-race transition.

Used by ColossoLog_Initialize.

Line 1735

FieldScene_RunScene3bcSequenceA

UNUSED static void FieldScene_RunScene3bcSequenceA(s32 countdown)

Unused portrait countdown for a signed number of seconds.

Line 1788

WriteU32AsHex

UNUSED static void WriteU32AsHex(u8 *hexText, u32 value)

Writes eight hexadecimal digits followed by a terminator.

Line 1832

ColossoLog_MarkRivalFinished

UNUSED static void ColossoLog_MarkRivalFinished(void)

Marks the rival path recorder as finished.

Line 1848

ColossoLog_WaitForRivalToFinish

static void ColossoLog_WaitForRivalToFinish(void)

Waits until the rival path recorder reaches its finished mode.

Used by Event_ReachArena.

Line 1855

ColossoLogRollingStage_SpawnRandomSceneEffect

static void ColossoLogRollingStage_SpawnRandomSceneEffect(union FieldObject *fieldObject)

Occasionally scatters an effect around a moving source actor.

Used by gColossoLinkedEffect.

Line 1864

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.

Line 1902

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.

Line 1918

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.

Line 1976

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.

Line 2161

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.

On this page

FunctionsInitializeActorZeroInitializeSelectedActorColossoLogRollingStage_SceneTaskColossoLogRollingStage_ResetAndRunSceneTaskColossoLogRollingStage_StartSceneTaskColossoLogRollingStage_WaitForSceneTaskEvent_RideMovingSidewalkEvent_GrowPlantColossoLog_MoveOnScalesEvent_FreezeOnScalesEvent_StepOnScalesEvent_StepOffScalesEvent_SetWeightOnScalesEvent_PushWeightEvent_MoveStoneEvent_IgnoreMoveEvent_PushRockEvent_SettleRocksColossoLog_UpdateEastEndCollisionColossoLogRollingStage_CheckObstacleDestinationColossoLogRollingStage_CheckPathClearanceEvent_RollLongLogColossoLog_ShowActivatedSidewalkLayerEvent_ForceSidewalkBlockEvent_HaltWallEvent_PassNorthWallOpeningEvent_PassSouthWallOpeningColossoLog_RunCompetitorTalkEvent_ReachArenaEvent_CheckAheadEvent_PushWeightOrCheckAheadColossoLog_InitializeColossoLogRollingStage_AdvanceParticleMotionColossoLogRollingStage_SpawnPeriodicParticleColossoLog_PlayPostBattleReunionColossoLog_IntroduceFinalCourseEvent_TalkToScalesAttendantEvent_TalkToSteppingStoneAttendantEvent_TalkToWallWedgeAttendantEvent_TalkToFreeClimbAttendantColossoLogRollingStage_PositionActorColossoLogRollingStage_PositionAndActivateActorEvent_TalkToMovingSidewalkAttendantEvent_TalkToLogRollingAttendantColossoLogRollingStage_InitializeModeTaskColossoLogRollingStage_RunScriptedTransitionFieldScene_RunScene3bcSequenceAWriteU32AsHexColossoLog_MarkRivalFinishedColossoLog_WaitForRivalToFinishColossoLogRollingStage_SpawnRandomSceneEffectColossoLogRollingStage_RaiseLinkedSceneEffectColossoLog_CollectFinishEquipmentColossoLog_PushActorAheadMacrosDIRECTION_STEP