Alchemy

kolima_forest_bridge.c

Kolima Forest's bridge, where the road from the world map enters the forest.

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

Kolima Forest's bridge, where the road from the world map enters the forest. Of its three logs, the one pushed west to the bank tips into the river and bridges it. Arriving from the world map before the party has seen the curse in Kolima, they see it fall here: sparkles of Tret's glamour rain down, domes of their own Psynergy shield them, and Tret and Laurel, unseen, speak of the dying forest.

FLAG_SCENE_TEMP_00: the log is in the river.

Functions

KolimaForestBridge_FlashHitBarriers

static s32 KolimaForestBridge_FlashHitBarriers(struct ScriptInterpreter *interpreter)

The end of a dome's growing: if a sparkle has burst on a dome, the dome takes its next pose.

Used by gKolimaForestBridge_BarrierGrowAction.

Line 75

KolimaForestBridge_TwinkleGroundSparkle

static s32 KolimaForestBridge_TwinkleGroundSparkle(struct ScriptInterpreter *interpreter)

Each frame: a ground sparkle's timer runs on at random, and the sparkle shows its bright frame (7) while the timer is past 1000, its dim one (10) before; at 1200 the timer starts over.

Used by gKolimaForestBridge_GroundSparkleAction.

Line 89

KolimaForestBridge_GetEntrances

const struct SceneEntrance *KolimaForestBridge_GetEntrances(void)

Where the party enters from the clearing and the world map.

Line 106

KolimaForestBridge_GetExits

const u32 *KolimaForestBridge_GetExits(void)

The paths to the clearing and the world map.

Line 113

KolimaForestBridge_GetPlacements

const struct ScenePlacement *KolimaForestBridge_GetPlacements(void)

The party's companions, the logs, Tret, Laurel, the domes and the ground sparkles.

Line 119

KolimaForestBridge_PushLog

static void KolimaForestBridge_PushLog(void)

Walking into a log: it rolls ahead until something stops it. The river log, stopped at the bank (cell column 20), tips over with a splash and floats in the water; its cells become ground the party can cross.

Used by gKolimaForestBridge_Events.

Line 126

KolimaForestBridge_GetEvents

const struct SceneEvent *KolimaForestBridge_GetEvents(void)

The logs, the jump east from the bank and the two paths.

Line 155

KolimaForestBridge_Initialize

s32 KolimaForestBridge_Initialize(void)

On entry a log already in the river floats there again and the logs mark the cells they cover. From the world map, before the curse has been seen, the party sees it fall; once the curse is lifted the ground sparkles are gone.

Line 163

KolimaForestBridge_WitnessForestCurse

static void KolimaForestBridge_WitnessForestCurse(void)

The party, on the bridge, sees the curse fall. Ivan notices sparkly stuff on the ground; sparkles rain from the sky, the party sinks under them, and domes of Psynergy rise around each member before the sparkles reach them. They argue over whose Psynergy it was, the sparkles fall again and the domes rise again, and Tret and Laurel speak: Tret turned Kolima's people into trees for cutting him, and only his gentle side, deep in the forest, can save them. Lines and choices for Mia are skipped when she is not in the party.

Used by KolimaForestBridge_Initialize.

Line 196

KolimaForestBridge_FaceActorAndWait

static void KolimaForestBridge_FaceActorAndWait(s32 actorId, s32 facing, s32 waitFrames)

Turns an actor at once, then leaves time for the next beat.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1018

KolimaForestBridge_SpawnCurseSparkle

static void KolimaForestBridge_SpawnCurseSparkle(void)

Every eighth frame a sparkle of Tret's glamour (object 26) falls toward the party, with its tinkle while the rain is at its height.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1028

KolimaForestBridge_BurstOnBarrier

static s32 KolimaForestBridge_BurstOnBarrier(struct ScriptInterpreter *interpreter)

The end of a sparkle's fall: one that lands on a dome (the domes' area, which differs with Mia) bursts with a sound, and the domes are told.

Used by gFallingEffectScript.

Line 1065

KolimaForestBridge_FlickerBarriers

static void KolimaForestBridge_FlickerBarriers(void)

Each frame the domes flicker: two show on even frames and two on odd, the hidden ones lifted 500 pixels out of sight.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1107

Also, functions without a comment: KolimaForestBridge_GetRegions, KolimaForestBridge_ShowMessageAndWait.

Macros

DIRECTION_STEP

#define DIRECTION_STEP(dx, dz) (((dx) << 16) | ((dz) & 0xffff))

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 1149

Globals

gKolimaForestBridge_GaretAction

s32 gKolimaForestBridge_GaretAction[]

Garet, Ivan and Mia walk to their places beside the leader.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1176

gKolimaForestBridge_SquashAction

s32 gKolimaForestBridge_SquashAction[]

The glamour presses the party down: each squashes and wobbles until released.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1196

gKolimaForestBridge_BarrierGrowAction

s32 gKolimaForestBridge_BarrierGrowAction[]

A dome grows from a tenth of its size over 70 frames.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1212

gKolimaForestBridge_BarrierShrinkAction

s32 gKolimaForestBridge_BarrierShrinkAction[]

A dome sinks and shrinks away over 90 frames.

Used by KolimaForestBridge_WitnessForestCurse.

Line 1226

gKolimaForestBridge_Exits

u32 gKolimaForestBridge_Exits[]

Exit 1 to the clearing (scene 41) and exit 4 to the world map (scene 2). Exits 2 and 3, which no event uses, lead into this map (scene 40).

Used by KolimaForestBridge_GetExits.

Line 1257

gKolimaForestBridge_SparkleBurstScript

s32 gKolimaForestBridge_SparkleBurstScript[]

A sparkle bursts on a dome: it doubles in size and is gone.

Used by KolimaForestBridge_BurstOnBarrier.

Line 1318

Also, globals without a comment: gKolimaForestBridge_BarrierHit, gKolimaForestBridge_MiaInParty, gKolimaForestBridge_SparkleSoundOn, gKolimaForestBridge_BarrierHit, gKolimaForestBridge_MiaInParty, gKolimaForestBridge_SparkleSoundOn, gStagedActor_DirectionSteps, gStagedActor_FootprintKinds, gStagedActor_FootprintBounds, gKolimaForestBridge_IvanAction, gKolimaForestBridge_MiaAction, gKolimaForestBridge_RestoreScaleAction, gKolimaForestBridge_GroundSparkleAction, gKolimaForestBridge_Entrances, gKolimaForestBridge_Placements, gKolimaForestBridge_Events, gKolimaForestBridge_SparkleScript, gFallingEffectScript.

On this page