Alchemy

gondowan_cave.c

Gondowan Cave: the soldiers guarding the bridge to Gondowan, Iodem waiting there on the way to Babi Lighthouse, and the cave's moving puzzles.

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

Gondowan Cave: the soldiers guarding the bridge to Gondowan, Iodem waiting there on the way to Babi Lighthouse, and the cave's moving puzzles.

Functions

Scene_GetExits

const u32 *Scene_GetExits(void)

All cave sections share the exit table.

Line 78

Scene_GetPlacements

const struct ScenePlacement *Scene_GetPlacements(void)

Iodem waits in the first room once he is on his way to Babi Lighthouse.

Line 81

Scene_GetEvents

const struct SceneEvent *Scene_GetEvents(void)

Each room's events, with Iodem's in the first room when he is there.

Line 100

Event_IodemAsksWhyTurningBack

static void Event_IodemAsksWhyTurningBack(void)

Walking back (trigger 10) with Iodem in the party: he steps out and asks why Isaac is going back. Yes: he waits here for the party's return. No: he rejoins the party and Isaac steps away from the trigger.

Used by gGondowanCaveEvents1WithIodem.

Line 121

Event_IodemRejoins

static void Event_IodemRejoins(void)

Talking to Iodem where he waits, or walking up to him (trigger 11): he joins the party again. "I've been waiting for you, Isaac! We should go to Babi Lighthouse soon."

Used by gGondowanCaveEvents1WithIodem.

Line 175

Event_SoldierAsksAboutCrossing

static void Event_SoldierAsksAboutCrossing(void)

Talking to the first soldier, who asks whether the party will cross into Gondowan. "Do you wish to cross into Gondowan?" Yes: "I won't stop you, but I wouldn't go unless I had business there." No: "That's a good idea. They wouldn't let you into Babi Lighthouse, anyway."

Used by gGondowanCaveEvents1.

Line 203

Event_ReadSoldierMind

static void Event_ReadSoldierMind(void)

Mind Read on the second soldier: once flag 0x950 is set and until Iodem waits here, he grumbles that guard duty made him miss all of Colosso; before, that the warriors fight while he guards the bridge.

Used by gGondowanCaveEvents1.

Line 226

Event_LeaveThroughEntrance

static void Event_LeaveThroughEntrance(void)

Leaving the third room by its first exit (trigger 1). With temporary flag 0x204 set, the puzzle's saved flags return to one arrangement first.

Used by gGondowanCaveEvents3.

Line 237

Event_CheckAhead

static void Event_CheckAhead(void)

Walking into the second object from the east or the west (triggers 10 and 11): look at what is ahead, which starts the push.

Used by gBilibinEvents2, gBilibinEvents3, gColossoLogEvents, gColossoWallEvents, gGondowanCaveEvents3, gSolSanctumElementalStarRoom_Events.

Line 258

Event_MoveFirstObject

static void Event_MoveFirstObject(void)

Move on the first object: from column 30 or less it spins and leaps across, freeing the cell where it stood.

Used by gGondowanCaveEvents3.

Line 262

Event_PushSecondObject

static void Event_PushSecondObject(void)

Pushing the second object (trigger 50): it moves a step, then may have reached its place.

Used by gGondowanCaveEvents3.

Line 279

GondowanCave_PlaceMovedSecondObject

static inline void GondowanCave_PlaceMovedSecondObject(s32 animation)

Hides the second object and shows the one that stands in for it in its place.

Used by Event_MoveSecondObject, Scene_Initialize.

Line 286

Event_MoveSecondObject

static void Event_MoveSecondObject(void)

Move on the second object, and after each push: past column 42 it drops into its place for good.

Used by Event_PushSecondObject, gGondowanCaveEvents3.

Line 294

GondowanCave_RotateLeapingObject

static void GondowanCave_RotateLeapingObject(union FieldObject *fieldObject)

Rotates the sprite during the airborne part of the leap.

Used by GondowanCave_RunSpinningLeap.

Line 312

GondowanCave_WaitForDescent

static void GondowanCave_WaitForDescent(struct FieldActor *actor, s32 heightLimit)

Waits at most forty frames for the actor to descend to the height limit.

Used by GondowanCave_RunSpinningLeap.

Line 317

GondowanCave_RunSpinningLeap

static void GondowanCave_RunSpinningLeap(s32 actorId)

The object spins in place, leaps and lands with a shake and a ring of dust, then comes to rest a little further on.

Used by Event_MoveFirstObject.

Line 332

Event_LiftObject

static void Event_LiftObject(void)

Lift on the third room's actor 11 also takes away actor 12 beside it.

Used by gGondowanCaveEvents3.

Line 387

Scene_Initialize

s32 Scene_Initialize(void)

The first room keeps Iodem out of sight while he travels with the party; the third puts the moved objects where the party left them.

Line 391

Also, functions without a comment: Scene_GetEntrances, Scene_GetRegions, GondowanCave_UnusedActorCallback, GondowanCave_UnusedSceneCallback.

Macros

DIRECTION_STEP

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

Packs signed pixel steps with X in the upper halfword and Z in the lower. Shift the unsigned representation so westward steps remain defined C.

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

Line 435

Also, macros without a comment: SOLDIER_1, SOLDIER_2, SOLDIER_3, IODEM, FIRST_OBJECT, SECOND_OBJECT, SECOND_OBJECT_MOVED.

Globals

gGondowanCaveEvents3

struct SceneEvent gGondowanCaveEvents3[]

Temporary flag 0x205 ends Move on the second object.

Used by Scene_GetEvents.

Line 613

Also, globals without a comment: gEffectScript0, gEffectScript1, gEffectScript2, gStagedActor_DirectionSteps, gStagedActor_FootprintKinds, gStagedActor_FootprintBounds, gEffectScripts, gGondowanCaveEntrancesOther, gGondowanCaveEntrances1, gGondowanCaveEntrances2, gGondowanCaveEntrances3, gGondowanCaveExits, gGondowanCavePlacementsOther, gGondowanCavePlacements1, gGondowanCavePlacements1WithIodem, gGondowanCavePlacements2, gGondowanCavePlacements3, gGondowanCaveEventsOther, gGondowanCaveEvents1, gGondowanCaveEvents1WithIodem, gGondowanCaveEvents2.

On this page