Alchemy

colosso_river.c

A Colosso finals course: Isaac races another warrior through the Rock Challenge, the Pipeworks, the Broken Bridge and the Lumber Water Crossing Area to the arena, where the two fight.

games/tbs/src/scene/colosso_river.c on GitHub

A Colosso finals course: Isaac races another warrior through the Rock Challenge, the Pipeworks, the Broken Bridge and the Lumber Water Crossing Area to the arena, where the two fight.

Functions

ColossoRiver_UpdateBrokenBridge

static void ColossoRiver_UpdateBrokenBridge(void)

Advances the bridge animation and its walkable collision cells.

Used by ColossoRiver_Initialize, ColossoRiver_ResetBrokenBridge, ColossoRiver_StartBrokenBridge.

Line 127

ColossoRiver_ResetBrokenBridge

static void ColossoRiver_ResetBrokenBridge(void)

Stops the bridge task and restores its closed frame.

Used by Event_TalkToBridgeAttendant.

Line 157

ColossoRiver_StartBrokenBridge

static void ColossoRiver_StartBrokenBridge(void)

Starts the bridge's repeating opening sequence.

Used by Event_TalkToBridgeAttendant.

Line 167

ColossoRiver_WaitForBridgeOpening

static void ColossoRiver_WaitForBridgeOpening(void)

Waits for the crossing window, bounded by one bridge cycle.

Used by Event_TalkToBridgeAttendant.

Line 173

Event_SettleRocks

static void Event_SettleRocks(void)

After a rock is moved: a rock resting on the floor becomes a step (the second rock's column is kept in byte flag 0x310).

Used by Event_PushRock, Event_RollLongLog, gColossoLogEvents, gColossoRiver_Events.

Line 191

Event_PushRock

static void Event_PushRock(void)

Walking into a rock pushes it one cell.

Used by Event_PushRockOrCheckAhead, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.

Line 224

Event_GrowPlant

static void Event_GrowPlant(void)

Growth on the plant: it grows and its cell becomes walkable (0x303 keeps it grown).

Used by gBilibinCaveEvents3, gColossoLogEvents, gColossoRiver_Events, gColossoWallEvents.

Line 232

Event_DousePipe

static void Event_DousePipe(void)

Douse on the west pipe: the camera turns to the Pipeworks and the two pipes rise as it fills (0x301).

Used by gColossoRiver_Events.

Line 242

ColossoRiver_MoveActorPairByOffset

static void ColossoRiver_MoveActorPairByOffset(s32 actorId, s32 dx, s32 dz)

Moves the leader and a course object together between cell centers.

Used by Event_RollLogEastWest, Event_RollLogNorthSouth.

Line 270

Event_RollLogNorthSouth

static void Event_RollLogNorthSouth(void)

Walking into the north-south log rolls it, with the leader, to the other bank.

Used by gColossoRiver_Events.

Line 310

Event_RollLogEastWest

static void Event_RollLogEastWest(void)

Walking into the east-west log rolls it, with the leader, the way the pad is held.

Used by gColossoRiver_Events.

Line 330

ColossoRiver_AnimatePipeworksWater

static inline void ColossoRiver_AnimatePipeworksWater(void)

Runs the five frames that show water entering the Pipeworks channel.

Used by Event_PushPipeworksBlock.

Line 372

Event_PushPipeworksBlock

static void Event_PushPipeworksBlock(void)

Pushing the Pipeworks block west: water runs into the channel, and the first time the pipes rise (0x302, 0x301).

Used by gColossoRiver_Events.

Line 386

Event_ReachArena

static void Event_ReachArena(void)

Reaching the arena: the leader takes a prize (the Iron Shield if first, the Padded Gloves 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 465

Event_PushRockOrCheckAhead

static void Event_PushRockOrCheckAhead(void)

Walking into something: a rock is pushed, anything else is checked.

Used by gColossoRiver_Events.

Line 507

ColossoRiver_RestoreMatchResult

static void ColossoRiver_RestoreMatchResult(s32 result)

Back from the battle: the two warriors stand in the arena as the result is shown.

Used by ColossoRiver_Initialize.

Line 522

ColossoRiver_MarkCourseTerrain

static void ColossoRiver_MarkCourseTerrain(s32 actor)

Marks actors standing in the course's finish terrain.

Used by ColossoRiver_Initialize.

Line 546

ColossoRiver_Initialize

s32 ColossoRiver_Initialize(void)

Restores the stages as they were left, then by the arrival: the race (1 and 2), the guide's explanation (3), or the match won (4) or lost (5).

Line 563

ColossoRiver_ExplainFinalsRules

static void ColossoRiver_ExplainFinalsRules(s32 guide)

The guide shows the party the first finals course: the race through the stages to the arena, the prizes there, and where the companions cheer from.

Used by ColossoRiver_Initialize.

Line 683

Event_TalkToRockAttendant

static void Event_TalkToRockAttendant(s32 scene)

The Rock Challenge's attendant: the first time, a warrior shows how to push the rocks into steps; then the objective.

Used by gColossoRiver_Events.

Line 815

ColossoRiver_SetPipeHeight

static inline void ColossoRiver_SetPipeHeight(struct FieldActor *actor, s32 height)

Moves a Pipeworks actor with the speed used throughout its demonstration.

Used by Event_TalkToPipeworksAttendant.

Line 873

Event_TalkToPipeworksAttendant

static void Event_TalkToPipeworksAttendant(s32 attendant)

The Pipeworks' attendant: a marker shows how the pipes rise and fall like scales; then the objective.

Used by gColossoRiver_Events.

Line 883

Event_TalkToBridgeAttendant

static void Event_TalkToBridgeAttendant(s32 scene)

The Broken Bridge's attendant: a warrior times his crossing; then the objective.

Used by gColossoRiver_Events.

Line 945

Event_TalkToLumberAttendant

static void Event_TalkToLumberAttendant(s32 scene)

The Lumber Water Crossing Area's attendant: a warrior rolls a log across; then the objective.

Used by gColossoRiver_Events.

Line 988

InitializeActorZero

static inline void InitializeActorZero(void)

Sets the leader's movement speed for the shared Colosso dialogue.

Used by Colosso_AskReadyToRace.

Line 1043

InitializeSelectedActor

static inline void InitializeSelectedActor(s32 actorId)

Sets an attendant's movement speed for the shared Colosso dialogue.

Used by Colosso_AskReadyToRace.

Line 1048

AdvanceMessage

static __inline__ void AdvanceMessage(s32 amount)

Advances to the next message in the current explanation.

Line 1053

ColossoRiver_SelectPresentationScript

static void ColossoRiver_SelectPresentationScript(u32 mode, u32 param)

Selects a presentation script and resets its playback state.

Used by ColossoRiver_ShowRoundIntroduction.

Line 1062

ColossoRiver_ShowRoundIntroduction

static void ColossoRiver_ShowRoundIntroduction(s32 round)

The match opens: portraits of the warriors and the round announced.

Used by ColossoRiver_Initialize.

Line 1093

ColossoRiver_ShowMatchResult

static void ColossoRiver_ShowMatchResult(s32 result)

The result: the winner's portrait and fanfare, then the course closes.

Used by ColossoRiver_RestoreMatchResult.

Line 1140

Text_WriteU32AsHex

UNUSED static void Text_WriteU32AsHex(u8 *buf, u32 value)

Writes eight hexadecimal digits and a terminating null.

Line 1184

ColossoRiver_MarkStageReady

UNUSED static void ColossoRiver_MarkStageReady(void)

Marks the shared stage state ready for the waiting event.

Line 1200

ColossoRiver_WaitForStageReady

static void ColossoRiver_WaitForStageReady(void)

Waits until the stage's setup task reports readiness.

Used by Event_ReachArena.

Line 1208

ColossoRiver_SpawnRandomEffect

static void ColossoRiver_SpawnRandomEffect(union FieldObject *fieldObject)

Occasionally spawns an animated effect around the finish item.

Used by gColossoRiver_ScriptB.

Line 1217

ColossoRiver_PlaceFinishItemAboveActor

static s32 ColossoRiver_PlaceFinishItemAboveActor(struct ScriptInterpreter *interpreter)

Presents the collected item above its collector and signals completion.

Used by gColossoRiver_ApproachScript, gColosso_RivalFinishScript.

Line 1253

ColossoRiver_CollectFinishItem

static s32 ColossoRiver_CollectFinishItem(s32 firstItem, s32 secondItem)

Moves to the selected finish item and presents it to the party.

Used by Event_ReachArena.

Line 1268

ColossoRiver_PushObjectAhead

static void ColossoRiver_PushObjectAhead(void)

Checks the next cell and pushes its object one step if clear.

Used by Event_PushRock, Event_TalkToRockAttendant.

Line 1335

Also, functions without a comment: ColossoRiver_GetEntrances, ColossoRiver_GetRegions, ColossoRiver_GetExits, ColossoRiver_GetPlacements, ColossoRiver_SetCourseFlag, ColossoRiver_GetEvents, ColossoRiver_NoOp.

Types, without a comment: SceneTask.

Macros

DIRECTION_STEP

#define DIRECTION_STEP(x, z) ((u32)(x) << 16 | (u16)(z))

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

Used by gBilibinCave_PushSteps, gBilibin_FacingCellSteps, gColossoRiver_DirectionSteps, gColossoWall_DirectionSteps, gStagedActor_DirectionSteps.

Line 1491

Also, macros without a comment: COLOSSO_RIVER_FACE_DIRECTION, COLOSSO_RIVER_PLACE_STAGED_PAIR, COLOSSO_RIVER_SELECT_MODE_BLOCK, COLOSSO_RIVER_APPLY_MATCHING_SLOT_VALUES, COLOSSO_RIVER_FACE_DIRECTION, COLOSSO_RIVER_PLACE_STAGED_PAIR, COLOSSO_RIVER_SELECT_MODE_BLOCK, COLOSSO_RIVER_APPLY_MATCHING_SLOT_VALUES.

Globals, without a comment: gColosso_LetteringPaletteOffsets, gColossoRiver_ModeRecordTwo, gColossoRiver_SpanB, gHexDigits, gColossoRiver_ScriptA, gColossoRiver_ScriptB, gColossoRiver_DirectionSteps, gColossoRiver_Entrances, gColossoRiver_Exits, gColossoRiver_Placements, gColossoRiver_Countdown, gColossoRiver_Events, gColosso_LetteringSlot, gColossoRiver_RoundSpans, gColossoRiver_ModeRecordFour, gColossoRiver_SpanA, gColosso_MarkerSlot, gColosso_RivalFinishScript, gColossoRiver_ApproachScript.

On this page