src/scene/goma_cave_stream.c
The first and last rooms of Goma Cave, the cave in the Goma Range between Vault and Bilibin: SceneIdGomaCaveStream and SceneIdGomaCaveBridge, both under the area name Goma Cave. More…
#include "ability_ids.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script.h"#include "graphics/graphics.h"#include "scene/goma_cave.h"#include "shared/field_effect_create.c"#include "shared/field_effect_spawn.c"#include "shared/stump_leap.c"#include "shared/field_effect_duration_scripts.c"
Macros
| Name | Description | |
|---|---|---|
#define | STUMP_LANDING_X 376 | Where the stump lands from the ledge and where it bounces on to and sinks, in pixels, and the ground's height there. |
#define | STUMP_LANDING_Z 288 | |
#define | STUMP_RESTING_X 346 | |
#define | STUMP_RESTING_Z 292 | |
#define | STUMP_FLOOR_HEIGHT 0 |
Enumerations
| Name | Description | |
|---|---|---|
enum | GOMA_CAVE_STREAM_ACTOR_ID { ACTOR_STUMP } | SceneIdGomaCaveStream's actors, numbering its actor placement rows from ACTOR_FIRST_PLACED. |
enum | anonymous enum { ENTRANCE_BESIDE_STUMP } | SceneIdGomaCaveStream's entrance that no exit names, standing the leader just east of the stump, facing it. |
Functions
| Name | Description | |
|---|---|---|
static void | scLeapStump (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. |
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 void | scGomaCaveStreamMoveStump (void) | Isaac casts Move on the stump by the stream: once it has been pushed onto column 24 it leaps into the water. |
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. |
Sint32 | scInit (void) | Sets up SceneIdGomaCaveStream as the party enters (SceneIdGomaCaveBridge needs nothing). |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_ENTRANCE | GomaCaveStreamEntrances [] | |
extern SCENE_ENTRANCE | GomaCaveBridgeEntrances [] | |
extern Uint32 | GomaCaveStreamAndBridgeExits [] | |
extern ACTOR_PLACE | GomaCaveStreamActorPlacements [] | |
extern ACTOR_PLACE | GomaCaveBridgeActorPlacements [] | |
extern CUE | GomaCaveStreamCues [] | |
extern CUE | GomaCaveBridgeCues [] | |
const Sint32 * | FieldEffectDurationScripts [] | The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION. |
Description
The first and last rooms of Goma Cave, the cave in the Goma Range between
Vault and Bilibin: SceneIdGomaCaveStream and SceneIdGomaCaveBridge, both
under the area name Goma Cave.
The getters give SceneIdGomaCaveBridge its own tables and any other scene
SceneIdGomaCaveStream's. The two share one exit table.
-
SceneIdGomaCaveStream, the room a stream runs the length of. The party walks in from the Goma Cave Entrance (GOMA_CAVE_STREAM_GOMA_CAVE_ENTRANCE) at its bottom.A stump answers Move. Once it stands on column 24 it spins in place, leaps, lands with a shake and a ring of dust, then hops on into the water with a splash and sinks until its top shows. The metatiles where it lies change (
FLAG_GOMA_CAVE_STREAM_STUMP_MOVED, a story flag, so it stays there for good).Exits lead back to the Goma Cave Entrance, into the room of two pillars (
goma_cave_pillar.c;GOMA_CAVE_STREAM_GOMA_CAVE_PILLAR_WESTand _EAST) and north intoSceneIdGomaCaveBridge.The same map holds a small cave off Vale's plaza, walled off from the rest of the room in a camera box of its own, with a chest of Power Bread at its north end. Vale's
VALE_PLAZA_CHEST_CAVEleads in atGOMA_CAVE_STREAM_CHEST_CAVE_VALE_PLAZA, which shows no area name. Its only way out is the exit metatile at its south tip, metatile (38, 55), two metatiles south of the arrival, which leads back to the plaza (GOMA_CAVE_STREAM_CHEST_CAVE_VALE_PLAZA). -
SceneIdGomaCaveBridge, the way out, where a wooden bridge crosses the river. It has no actors and only its two exits. They lead back south intoSceneIdGomaCaveStreamand out onto the World Map toward Bilibin (GOMA_CAVE_BRIDGE_WORLD_MAP).
Macros in detail
STUMP_LANDING_X
#define STUMP_LANDING_X 376
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 159 of file goma_cave_stream.c.
STUMP_LANDING_Z
#define STUMP_LANDING_Z 288
Referenced by scLeapStump().
Definition at line 160 of file goma_cave_stream.c.
STUMP_RESTING_X
#define STUMP_RESTING_X 346
Referenced by scLeapStump().
Definition at line 161 of file goma_cave_stream.c.
STUMP_RESTING_Z
#define STUMP_RESTING_Z 292
Referenced by scLeapStump().
Definition at line 162 of file goma_cave_stream.c.
STUMP_FLOOR_HEIGHT
#define STUMP_FLOOR_HEIGHT 0
Referenced by scLeapStump().
Definition at line 163 of file goma_cave_stream.c.
Enumerations in detail
GOMA_CAVE_STREAM_ACTOR_ID
enum GOMA_CAVE_STREAM_ACTOR_ID
SceneIdGomaCaveStream's actors, numbering its actor placement rows from
ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_STUMP | ACTOR_FIRST_PLACED | The stump Move pushes, as Garet calls the one at the Goma Cave Entrance. |
Definition at line 53 of file goma_cave_stream.c.
anonymous enum
enum { ENTRANCE_BESIDE_STUMP }
SceneIdGomaCaveStream's entrance that no exit names, standing the leader just
east of the stump, facing it.
Only the debug scene selector, which exits to any entrance by number, reaches it.
| Enumerator | Value | Description |
|---|---|---|
ENTRANCE_BESIDE_STUMP | 99 |
Definition at line 64 of file goma_cave_stream.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References GomaCaveBridgeEntrances, GomaCaveStreamEntrances and MainRoutineStateWork.
Definition at line 74 of file goma_cave_stream.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 83 of file goma_cave_stream.c.
scGetExits
const Uint32 *scGetExits(void)
References GomaCaveStreamAndBridgeExits.
Definition at line 88 of file goma_cave_stream.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References GomaCaveBridgeActorPlacements, GomaCaveStreamActorPlacements and MainRoutineStateWork.
Definition at line 93 of file goma_cave_stream.c.
scGomaCaveStreamMoveStump
static void scGomaCaveStreamMoveStump(void)
Isaac casts Move on the stump by the stream: once it has been pushed onto column 24 it leaps into the water. The walkable metatiles of the sunken stump are copied over the ground where it lies, from a spare block at (19, 74), off every room of the map.
References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), gmFlagSet() and scLeapStump().
Referenced by GomaCaveStreamCues.
Definition at line 106 of file goma_cave_stream.c.
scGetCues
const CUE *scGetCues(void)
References GomaCaveBridgeCues, GomaCaveStreamCues and MainRoutineStateWork.
Definition at line 118 of file goma_cave_stream.c.
scInit
Sint32 scInit(void)
Sets up SceneIdGomaCaveStream as the party enters (SceneIdGomaCaveBridge
needs nothing).
References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), gmFlagClear(), gmFlagGet(), MainRoutineStateWork and Sint32.
Definition at line 129 of file goma_cave_stream.c.
Variables in detail
GomaCaveStreamEntrances
extern SCENE_ENTRANCE GomaCaveStreamEntrances[]
SCENE_ENTRANCE GomaCaveStreamEntrances[]
Referenced by scGetEntrances().
Definition at lines 43 and 174 of file goma_cave_stream.c.
GomaCaveBridgeEntrances
extern SCENE_ENTRANCE GomaCaveBridgeEntrances[]
SCENE_ENTRANCE GomaCaveBridgeEntrances[]
Referenced by scGetEntrances().
Definition at lines 44 and 229 of file goma_cave_stream.c.
GomaCaveStreamAndBridgeExits
extern Uint32 GomaCaveStreamAndBridgeExits[]
Uint32 GomaCaveStreamAndBridgeExits[]
Referenced by scGetExits().
Definition at lines 45 and 247 of file goma_cave_stream.c.
GomaCaveStreamActorPlacements
extern ACTOR_PLACE GomaCaveStreamActorPlacements[]
ACTOR_PLACE GomaCaveStreamActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 46 and 274 of file goma_cave_stream.c.
GomaCaveBridgeActorPlacements
extern ACTOR_PLACE GomaCaveBridgeActorPlacements[]
ACTOR_PLACE GomaCaveBridgeActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 47 and 281 of file goma_cave_stream.c.
GomaCaveStreamCues
extern CUE GomaCaveStreamCues[]
CUE GomaCaveStreamCues[]
References scGomaCaveStreamMoveStump().
Referenced by scGetCues().
Definition at lines 48 and 285 of file goma_cave_stream.c.
GomaCaveBridgeCues
extern CUE GomaCaveBridgeCues[]
CUE GomaCaveBridgeCues[]
Referenced by scGetCues().
Definition at lines 49 and 304 of file goma_cave_stream.c.
FieldEffectDurationScripts
const Sint32 *FieldEffectDurationScripts[]
References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.
Definition at line 168 of file goma_cave_stream.c.