Skip to Content
The Alchemy Project

src/scene/goma_cave_entrance.c

Goma Cave Entrance (SceneIdGomaCaveEntrance), the foot of the cliffs in the Goma Range between Vault and Bilibin, where Ivan joins the party. More…

Macros

NameDescription
#defineSTUMP_LANDING_X 160Where the stump lands from the ledge and where it bounces on to and sinks, in pixels, and the ground's height there.
#defineSTUMP_LANDING_Z 192
#defineSTUMP_RESTING_X 139
#defineSTUMP_RESTING_Z 196
#defineSTUMP_FLOOR_HEIGHT toFIXED(32)
#defineSHAMANS_ROD_TRIES 1000The tries at making room for the Shaman's Rod before a slot is cleared by force.

Enumerations

NameDescription
enumGOMA_CAVE_ENTRANCE_ACTOR_ID { ACTOR_STUMP, ACTOR_WEST_PILLAR, ACTOR_EAST_PILLAR, ACTOR_SUN … }The room's actors.
enumanonymous enum { CUE_PUSH_WEST_PILLAR_EAST, CUE_PUSH_WEST_PILLAR_WEST }The metatiles beside the pillar by the ladder from which walking into it pushes it east, from its west side, and west, from its east side.

Functions

NameDescription
static voidscGomaCaveEntranceWhirlwindOnStumpIvy (void)Ivan casts Whirlwind on the stump's ivy, and the script waits for it.
static voidscLeapStump (Sint32 stumpId)The stump tips over the ledge, leaps spinning into the water, lands with a shake and a ring of dust, bounces once and sinks with a splash.
static voidscGomaCaveEntranceGiveShamansRod (void)Gives Ivan the Shaman's Rod and equips it.
static voidscGomaCaveEntranceSayThenWait (Sint32 actorId, Sint32 ticks)Shows the next message over the speaker, then pauses.
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)Both scenes share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)Some villagers only turn back after talking once the flood is over or their family has gone home.
static voidscGomaCaveEntranceMoveWestPillar (void)Isaac casts Move on the pillar by the ladder at the foot of the cliff, and each push of it ends here: in front of the ladder, metatile (16, 18), it blocks the climb, and to either side of it the ladder climbs the cliff again.
static voidscGomaCaveEntranceMoveEastPillar (void)Isaac casts Move on the pillar on the ledge across the gap: pulled west into the gap, metatile (23, 17), it drops in until its top is level with the ground, and Isaac can walk across it.
static voidscGomaCaveEntrancePushWestPillar (void)Isaac walks into the pillar by the ladder from the west or the east, leans on it and pushes it one step.
static voidscGomaCaveEntranceNoOperationA (void)
static voidscGomaCaveEntranceNoOperationB (void)
static voidscGomaCaveEntranceBlowAwayIvy (void)Isaac casts Whirlwind on the tall ivy over the cave's mouth: it is blown away for good, and the way into the cave is open.
const CUE *scGetCues (void)The first water beast's cave changes its cues once the first drain has lowered its water: the beast is gone and its two puddles can be frozen.
Sint32scInit (void)Sets up Goma Cave Entrance as the party arrives: Retreat is barred, the waterfall's sound plays, and the stump, the pillars and the metatiles that go with them are where the party left them.
static voidscGomaCaveEntranceIvanJoins (void)Isaac casts Move on the ivy-bound stump in front of the cave's mouth.
static voidscGomaCaveEntranceMoveStump (void)Isaac casts Move on the freed stump in front of the cave's mouth: pushed west to the column's edge, it tips, leaps spinning into the pool under the waterfall with a crash and a splash, and sinks until only its top shows (FLAG_GOMA_CAVE_ENTRANCE_STUMP_MOVED).

Variables

NameDescription
extern SCENE_ENTRANCEGomaCaveEntranceEntrances []
extern Uint32GomaCaveEntranceExits []
extern ACTOR_PLACEGomaCaveEntranceActorPlacements []
extern CUEGomaCaveEntranceCues []
const Sint32 *FieldEffectDurationScripts []The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION.
Sint32GomaCaveEntranceTallIvyScript []Stretches the tall ivy over the cave's mouth to 1.6 times its height.

Description

Goma Cave Entrance (SceneIdGomaCaveEntrance), the foot of the cliffs in the Goma Range between Vault and Bilibin, where Ivan joins the party. The cave's mouth is high on a column of rock beside a waterfall, hidden behind tall ivy, with a stump caught in ivy in front of it.

The party comes in from the World Map at the bottom of the map, crosses the river on a stump sunk in it (ACTOR_SUNKEN_STUMP) and climbs the cliffs. On the way a stone pillar stands by a ladder at the foot of a cliff: walked into or moved with Move, it slides a step at a time, blocking the ladder while it stands in front of it (FLAG_GOMA_CAVE_ENTRANCE_WEST_PILLAR_ONE_STEP and _TWO_STEPS). Higher up, Move pulls the second pillar off its ledge into the gap beside it, where its top makes a bridge (FLAG_GOMA_CAVE_ENTRANCE_EAST_PILLAR_IN_PLACE).

On the column by the cave, Move on the ivy-bound stump makes Garet say their Psynergy can't free it. Once the thieves in Vault are jailed (FLAG_VAULT_THIEVES_JAILED), Ivan then comes up, blows the ivy off with Whirlwind and joins the party with the Shaman's Rod (FLAG_GOMA_CAVE_IVAN_JOINED). Move then sends the stump leaping off the column into the pool under the waterfall, where it sinks until only its top shows and can be jumped across (FLAG_GOMA_CAVE_ENTRANCE_STUMP_MOVED). Whirlwind on the tall ivy blows it away for good and opens the cave's mouth (FLAG_GOMA_CAVE_ENTRANCE_IVY_BLOWN_AWAY).

Retreat does not work here. GOMA_CAVE_ENTRANCE_TO_GOMA_CAVE_STREAM leads into Goma Cave (SceneIdGomaCaveStream) and GOMA_CAVE_ENTRANCE_TO_WORLD_MAP out to the World Map.

Macros in detail

STUMP_LANDING_X

#define STUMP_LANDING_X 160

Where the stump lands from the ledge and where it bounces on to and sinks, in pixels, and the ground's height there.

Referenced by scLeapStump().

Definition at line 566 of file goma_cave_entrance.c.

STUMP_LANDING_Z

#define STUMP_LANDING_Z 192

Referenced by scLeapStump().

Definition at line 567 of file goma_cave_entrance.c.

STUMP_RESTING_X

#define STUMP_RESTING_X 139

Referenced by scLeapStump().

Definition at line 568 of file goma_cave_entrance.c.

STUMP_RESTING_Z

#define STUMP_RESTING_Z 196

Referenced by scLeapStump().

Definition at line 569 of file goma_cave_entrance.c.

STUMP_FLOOR_HEIGHT

#define STUMP_FLOOR_HEIGHT toFIXED(32)

Referenced by scLeapStump().

Definition at line 570 of file goma_cave_entrance.c.

SHAMANS_ROD_TRIES

#define SHAMANS_ROD_TRIES 1000

The tries at making room for the Shaman's Rod before a slot is cleared by force.

Referenced by scGomaCaveEntranceGiveShamansRod().

Definition at line 577 of file goma_cave_entrance.c.

Enumerations in detail

GOMA_CAVE_ENTRANCE_ACTOR_ID

enum GOMA_CAVE_ENTRANCE_ACTOR_ID

The room's actors.

Garet's and Ivan's rows go to their party slots, and the rows after them number from ACTOR_FIRST_PLACED.

EnumeratorValueDescription
ACTOR_STUMPACTOR_FIRST_PLACEDThe stump caught in ivy in front of the cave's mouth.
ACTOR_WEST_PILLARThe pillar by the ladder at the foot of a cliff.
ACTOR_EAST_PILLARThe pillar on the ledge that Move pulls into the gap beside it.
ACTOR_SUNKEN_STUMPA second stump, sunk in the river until only its top shows, that the party crosses on.
ACTOR_UNUSED_FIRST_MOVE_HANDUnused: two Move hands and a third stump, placed at the map's origin outside the camera's bounds. Nothing in the overlay addresses them, and Move spawns its own hand (fdEffectSpawnMoveHand), so the player never sees them.
ACTOR_UNUSED_SECOND_MOVE_HAND
ACTOR_UNUSED_STUMP
ACTOR_STUMP_IVYThe ivy holding the stump, until Ivan blows it away.
ACTOR_IVYThe tall ivy over the cave's mouth.

Definition at line 49 of file goma_cave_entrance.c.

anonymous enum

enum { CUE_PUSH_WEST_PILLAR_EAST, CUE_PUSH_WEST_PILLAR_WEST }

The metatiles beside the pillar by the ladder from which walking into it pushes it east, from its west side, and west, from its east side.

EnumeratorValueDescription
CUE_PUSH_WEST_PILLAR_EAST5
CUE_PUSH_WEST_PILLAR_WEST6

Definition at line 157 of file goma_cave_entrance.c.

Functions in detail

scGomaCaveEntranceWhirlwindOnStumpIvy

static void scGomaCaveEntranceWhirlwindOnStumpIvy(void)

Ivan casts Whirlwind on the stump's ivy, and the script waits for it.

References fdPsynergyLoadResources(), fdPsynergyRunHandler(), fdPsynergySetupActorPair(), fdPsynergyStartCast() and fdPsynergyStopCasterUpdate().

Referenced by scGomaCaveEntranceIvanJoins().

Definition at lines 72 and 549 of file goma_cave_entrance.c.

scGomaCaveEntranceGiveShamansRod

static void scGomaCaveEntranceGiveShamansRod(void)

Gives Ivan the Shaman's Rod and equips it.

While his pack is full, a weapon of his is thrown away to make room, or failing that a consumable item; after SHAMANS_ROD_TRIES tries a slot is emptied by force.

References gmInventoryAddItem(), gmInventoryDiscard(), gmInventoryEquip(), gmItemGetDefinition(), gmUnitGet() and Sint32.

Referenced by scGomaCaveEntranceIvanJoins().

Definition at lines 74 and 584 of file goma_cave_entrance.c.

scGomaCaveEntranceSayThenWait

static void scGomaCaveEntranceSayThenWait(Sint32 actorId, Sint32 ticks)

Shows the next message over the speaker, then pauses.

References fdScriptShowMessage(), fdScriptWait() and Sint32.

Referenced by scGomaCaveEntranceIvanJoins().

Definition at line 80 of file goma_cave_entrance.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References GomaCaveEntranceEntrances.

Definition at line 86 of file goma_cave_entrance.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 91 of file goma_cave_entrance.c.

scGetExits

const Uint32 *scGetExits(void)

References GomaCaveEntranceExits.

Definition at line 96 of file goma_cave_entrance.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

References GomaCaveEntranceActorPlacements.

Definition at line 101 of file goma_cave_entrance.c.

scGomaCaveEntranceMoveWestPillar

static void scGomaCaveEntranceMoveWestPillar(void)

Isaac casts Move on the pillar by the ladder at the foot of the cliff, and each push of it ends here: in front of the ladder, metatile (16, 18), it blocks the climb, and to either side of it the ladder climbs the cliff again.

The ladder's two metatiles are copied from a spare stretch of the map: climbing metatiles, or flat ground while the pillar stands there. The flags keep the pillar's place for the next visit.

References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptClearFlag(), gmFlagSet() and Sint32.

Referenced by GomaCaveEntranceCues and scGomaCaveEntrancePushWestPillar().

Definition at line 113 of file goma_cave_entrance.c.

scGomaCaveEntranceMoveEastPillar

static void scGomaCaveEntranceMoveEastPillar(void)

Isaac casts Move on the pillar on the ledge across the gap: pulled west into the gap, metatile (23, 17), it drops in until its top is level with the ground, and Isaac can walk across it.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdScriptWait(), gmFlagSet() and Sint32.

Referenced by GomaCaveEntranceCues.

Definition at line 139 of file goma_cave_entrance.c.

scGomaCaveEntrancePushWestPillar

static void scGomaCaveEntrancePushWestPillar(void)

Isaac walks into the pillar by the ladder from the west or the east, leans on it and pushes it one step.

References fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorWaitForMoveById(), fdPlayQueuedMusic(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), scGomaCaveEntranceMoveWestPillar(), Sint32, state and sySoundPlay().

Referenced by GomaCaveEntranceCues.

Definition at line 165 of file goma_cave_entrance.c.

scGomaCaveEntranceNoOperationA

static void scGomaCaveEntranceNoOperationA(void)

Definition at line 193 of file goma_cave_entrance.c.

scGomaCaveEntranceNoOperationB

static void scGomaCaveEntranceNoOperationB(void)

Definition at line 197 of file goma_cave_entrance.c.

scGomaCaveEntranceBlowAwayIvy

static void scGomaCaveEntranceBlowAwayIvy(void)

Isaac casts Whirlwind on the tall ivy over the cave's mouth: it is blown away for good, and the way into the cave is open.

References fdScriptEnd(), fdScriptStart() and gmFlagSet().

Referenced by GomaCaveEntranceCues.

Definition at line 203 of file goma_cave_entrance.c.

scGetCues

const CUE *scGetCues(void)

References GomaCaveEntranceCues.

Definition at line 210 of file goma_cave_entrance.c.

scInit

Sint32 scInit(void)

Sets up Goma Cave Entrance as the party arrives: Retreat is barred, the waterfall's sound plays, and the stump, the pillars and the metatiles that go with them are where the party left them.

References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdQueueMusic(), fdScriptWait(), gmFlagGet(), gmFlagSet() and Sint32.

Definition at line 218 of file goma_cave_entrance.c.

scGomaCaveEntranceIvanJoins

static void scGomaCaveEntranceIvanJoins(void)

Isaac casts Move on the ivy-bound stump in front of the cave's mouth. Garet shakes his head: "It's no use. Our Psynergy isn't strong enough to free that stump." Once the thieves in Vault are jailed, Ivan then comes up from the east, blows the ivy off with Whirlwind and joins the party.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetPosFX(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorTurnToFaceEachOther(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdMapGridCopyMetatileAttributes(), fdPlayQueuedMusic(), fdScriptAddPartyMember(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), scGomaCaveEntranceGiveShamansRod(), scGomaCaveEntranceSayThenWait() and scGomaCaveEntranceWhirlwindOnStumpIvy().

Referenced by GomaCaveEntranceCues.

Definition at line 284 of file goma_cave_entrance.c.

scGomaCaveEntranceMoveStump

static void scGomaCaveEntranceMoveStump(void)

Isaac casts Move on the freed stump in front of the cave's mouth: pushed west to the column's edge, it tips, leaps spinning into the pool under the waterfall with a crash and a splash, and sinks until only its top shows (FLAG_GOMA_CAVE_ENTRANCE_STUMP_MOVED).

The metatiles by the pool change so that Isaac can jump across on it.

References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), gmFlagSet(), scLeapStump() and Sint32.

Referenced by GomaCaveEntranceCues.

Definition at line 531 of file goma_cave_entrance.c.

Variables in detail

GomaCaveEntranceEntrances

extern SCENE_ENTRANCE GomaCaveEntranceEntrances[]

SCENE_ENTRANCE GomaCaveEntranceEntrances[]

Referenced by scGetEntrances().

Definition at lines 40 and 655 of file goma_cave_entrance.c.

GomaCaveEntranceExits

extern Uint32 GomaCaveEntranceExits[]

Uint32 GomaCaveEntranceExits[]

Referenced by scGetExits().

Definition at lines 41 and 686 of file goma_cave_entrance.c.

GomaCaveEntranceActorPlacements

extern ACTOR_PLACE GomaCaveEntranceActorPlacements[]

ACTOR_PLACE GomaCaveEntranceActorPlacements[]

References GomaCaveEntranceTallIvyScript and Sint32.

Referenced by scGetActorPlacements().

Definition at lines 42 and 698 of file goma_cave_entrance.c.

GomaCaveEntranceCues

extern CUE GomaCaveEntranceCues[]

CUE GomaCaveEntranceCues[]

References scGomaCaveEntranceBlowAwayIvy(), scGomaCaveEntranceIvanJoins(), scGomaCaveEntranceMoveEastPillar(), scGomaCaveEntranceMoveStump(), scGomaCaveEntranceMoveWestPillar() and scGomaCaveEntrancePushWestPillar().

Referenced by scGetCues().

Definition at lines 43 and 725 of file goma_cave_entrance.c.

FieldEffectDurationScripts

const Sint32 *FieldEffectDurationScripts[]

References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.

Definition at line 643 of file goma_cave_entrance.c.

GomaCaveEntranceTallIvyScript

Sint32 GomaCaveEntranceTallIvyScript[]

Stretches the tall ivy over the cave's mouth to 1.6 times its height.

References Sint32.

Referenced by GomaCaveEntranceActorPlacements.

Definition at line 650 of file goma_cave_entrance.c.