src/scene/gaia_rock.c
The outside of Gaia Rock, the great rock near Izumo where the Serpent lives, in three areas of this overlay. More…
#include "scene/gaia_rock.h"#include "field/field_engine.h"#include "game/game.h"#include "edition.h"#include "field/script_inline.h"#include "field/call.h"#include "field/field_engine_script.h"#include "field/hanging_vine.h"#include "field/map_grid.h"#include "field/actor_script.h"#include "text/msg_ids.h"#include "shared/actor_wait_to_land.c"#include "shared/actor_wait_to_land_with_snd.c"#include "shared/gaia_rock_cue_wall_metatile.c"#include "shared/stone_head_place.c"#include "shared/stone_head_burst_out.c"#include "shared/debris_script.c"#include "shared/stone_head_rise_script.c"
Structures
| Name | Description | |
|---|---|---|
struct | ORBIT_EFFECT | A circling leaf as its update reads it: ACTOR's fields under a type of its own, the timer unsigned and the update taking the leaf. |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_SUSA_RESTED 0xa61 | Set once Susa has said he only needs rest ("I'm not dying... |
#define | FLAG_LOWEST_STONE_HEAD_OUT FLAG_AREA_TEMP(0x00) | Set once each stone head has burst out of the great wall, so that it stays out until the party enters another area. |
#define | FLAG_MIDDLE_STONE_HEAD_OUT FLAG_AREA_TEMP(0x01) | |
#define | FLAG_HIGHEST_STONE_HEAD_OUT FLAG_AREA_TEMP(0x02) | |
#define | FLAG_FIRST_PILLAR_DROPPED 0x920 | The two pillars Moved into the gaps: each stands sunk into its gap, its top level with the ledge it was Moved along, for good. |
#define | FLAG_SECOND_PILLAR_DROPPED 0x921 | |
#define | ARRIVES_AT_GREAT_WALL () | Whether the party arrives on the next cliffs' great wall side: by its passage, or down from the mesa (the entrance after it). |
#define | ANIM_SUSA_LYING_DOWN 5 | Susa's sheet's animation lying on his back, worn out. |
#define | DROP_PILLAR (id) scActorWaitToLand(id) | |
#define | SCREEN_EFFECT |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { ACTOR_FIRST_VINE, ACTOR_FIRST_PILLAR, ACTOR_WIND_STATUE, ACT … } | The first cliffs, from the world map's path to the cave mouth (SceneIdGaiaRockEntrance): the eight hanging vines, the two pillars Moved into the gaps, the statue that blows whirlwinds, a whirlwind that never leaves the map's corner (the statue spawns the ones it blows), and Susa, who lies by the cave mouth after the Serpent ("Kushinada's safe... |
enum | anonymous enum { ACTOR_LOWEST_STONE_HEAD, ACTOR_MIDDLE_STONE_HEAD, ACTOR_HIGH … } | The next cliffs, with the great wall of handholds (SceneIdGaiaRockCliffs): seven hanging vines, two statues that blow wind, and the three stone heads that burst out of the wall under Felix. |
enum | anonymous enum { ACTOR_PUSHED_PILLAR, ACTOR_ALTAR, ACTOR_DANCING_IDOL } | The top, with the altar's mesa (SceneIdGaiaRockDancingIdol): the pillar that slides in its slot, the altar and the Dancing Idol on it. |
enum | GAIA_ROCK_METATILE_BEHAVIOR { METATILE_BEHAVIOR_CAVE_MOUTH_WEEDS, METATILE_BEHAVIOR_LOWEST … } | The metatile behaviors of the cue tables. |
enum | GAIA_ROCK_PASSAGE { GAIA_ROCK_ENTRANCE_CLIFFS_TO_CAVE_MOUTH, GAIA_ROCK_ENTRANCE_ … } | The passages within the first two areas. |
enum | anonymous enum { ANIM_WHIRLWIND_SPIN_AWAY, ANIM_WHIRLWIND_SPIN } | The whirlwind sheet's animations: spinning, and spinning a while longer before it breaks up and vanishes. |
enum | anonymous enum { WHIRLWIND_LEAVES } | The whirlwind's circling leaves. |
Functions
| Name | Description | |
|---|---|---|
void | scStoneHeadBurstOut (Sint32 id, Sint32 flag) | Stone head id bursts out of the wall of handholds under Felix in a shower of rocks as the screen shakes. |
void | scGaiaRockStartWallCues (void) | Starts scGaiaRockCueWallMetatile each tick. |
void | scStoneHeadPlace (Sint32 id, Sint32 x, Sint32 y, Sint32 z) | Sets stone head id out of the wall at the hold under (x, y, z), in 16.16 pixels, and makes that hold solid rock. |
const SCENE_ENTRANCE * | scGetEntrances (void) | Where the party can enter: the cave under the spring has its own entrances. |
const SCENE_REGION * | scGetExitRegions (void) | The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room. |
const Uint32 * | scGetExits (void) | The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
void | scGaiaRockClimbOntoLowestStoneHead (void) | Climbing the great wall of handholds, Felix reaches the lowest of its three trap holds, near the middle of the wall: a stone head bursts out of the rock under him in a shower of stones, and he flails and loses his hold on the wall: he is left standing on the head, and when the player climbs on he drops off it, facing out, down the wall to its foot. |
void | scGaiaRockClimbOntoMiddleStoneHead (void) | As scGaiaRockClimbOntoLowestStoneHead, for the middle trap hold, a little higher and to the east: metatile (113, 42) of the overhead layer, drawn at (49, 42). |
void | scGaiaRockClimbOntoHighestStoneHead (void) | As scGaiaRockClimbOntoLowestStoneHead, for the highest trap hold, a little west of the middle one: metatile (112, 33) of the overhead layer, drawn at (48, 33). |
void | scGaiaRockStartMovingPillar (void) | As Felix's Move takes hold of the stone pillar on the west ledge of the first cliffs, standing at metatile (7, 27), the map's metatile beside it, in the map's lower half, is freed so that the pillar can slide; scGaiaRockFinishMovingPillar sets it back. |
void | scGaiaRockFinishMovingPillar (Sint32 unused, Sint32 id) | A pillar of the first cliffs stops after a push or a Move. |
void | scGaiaRockStartPushingPillar (void) | Felix starts to push or Move the stone pillar at the east edge of the top, where he arrives, which slides north and south in its slot (metatiles (13, 14) to (13, 18)): the slot's metatile under it is freed so that it can slide. |
void | scGaiaRockFinishPushingPillar (void) | The pillar in its slot at the east edge of the top stops, and its metatile becomes a square Felix hops across, so that he can jump over the pillar's top. |
void | scGaiaRockCycloneBlowsAwayWeeds (void) | Felix casts Cyclone among the tufts of weeds below the cliff east of the cave mouth (metatiles (49, 48), (51, 48), (50, 49), (58, 48), (59, 47) and a few more), and its whirl of leaves blows away the tufts within its reach: cast from metatile (50, 50), the two either side of the sapling below the cave mouth; from metatile (57, 49), the one just east of Felix. |
void | scGaiaRockRevealIdol (void) | Casting Reveal at the top of the cliffs shows the Dancing Idol standing on the altar, on the mesa ringed by six pillars, until the party has taken it. |
void | scGaiaRockHideIdol (void) | As Reveal wears off, the Dancing Idol vanishes from the altar again. |
void | scGaiaRockCheckAltar (void) | Felix examines the altar on the mesa ringed by six pillars: "Felix checked the altar." With the Dancing Idol revealed on it, he takes it. |
void | scGaiaRockSusaAsksAboutTheSerpent (void) | Once the Serpent is slain, Felix walks past Susa, who lies by the cave mouth (on the metatiles just south of him, (45, 52) to (50, 52)), and Susa asks: "You're going to tell Kushinada that you defeated the serpent, aren't you?" Yes: "Ha ha ha! |
void | scGaiaRockTalkToSusa (void) | Talking to Susa where he lies by the cave mouth: before he has asked about the serpent, "If you're going to Izumo, tell my sister that I'm still alive."; after, he asks again. |
void | scGaiaRockMindReadSusa (void) | Mind Read on Susa where he lies by the cave mouth: "I really got worked over, but as long as Kushinada's safe, it was worth it." before he has asked about the serpent, "Kushinada's safe... |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
void | scGaiaRockCircleLeaf (ORBIT_EFFECT *effect) | Each tick, carries a leaf round a wobbling circle, now and then turning faster for a moment, and releases it at its 71st tick. |
Sint32 | scGaiaRockSpawnCirclingLeaves (ORBIT_EFFECT *src) | The whirlwind's 16 leaves, spawned in a column around it, each circling from its own start. |
static inline HANGING_VINE_SLOT * | scGaiaRockFindVineSlot (Sint32 id) | The hanging vine of actor id, or NULL: this overlay's copy of fdHangingVineFindSlot. |
void | scGaiaRockWhirlwindBlowsVine (void) | The statue's whirlwind reaches the vine beside it and starts it swinging. |
void | scGaiaRockWhirlwindBlowsVineHarder (void) | The statue's whirlwind swings the vine beside it wider. |
void | fdActorPlaySoundInView (ACTOR *actor, Sint32 sound) | Plays sound when the actor is in view: within 152 pixels across and 112 up or down the screen of the actor the camera follows. |
void | scGaiaRockStatueBlowsWind (void) | Every 256 ticks the stone statue on the upper ledge of the first cliffs blows a whirlwind west at the hanging vine beside it, setting it swinging. |
Sint32 | scInit (void) | Sets up whichever of the three areas is being entered: on the first cliffs the vines, the statue's whirlwinds, the pillars where they were left and Susa after the Serpent; on the next cliffs the vines and the stone heads already out; at the top, the Dancing Idol kept hidden for Reveal and the pillar in its slot. |
Sint32 | scPrepareMap (void) | Arriving on the great wall's side of the next cliffs, sets back the far layer of sky and hills, which scrolls a quarter as fast as the view, so that it shows behind the wall as it does behind the vines. |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_REGION | GaiaRockEntranceExitRegions [] | |
extern SCENE_REGION | GaiaRockCliffsExitRegions [] | |
extern ACTOR_PLACE | GaiaRockPlacements [] | |
extern ACTOR_PLACE | GaiaRockEntranceActorPlacements [] | |
extern ACTOR_PLACE | GaiaRockCliffsActorPlacements [] | |
extern ACTOR_PLACE | GaiaRockDancingIdolActorPlacements [] | |
extern CUE | GaiaRockEntranceCues [] | |
extern CUE | GaiaRockCliffsCues [] | |
extern CUE | GaiaRockCues [] | |
extern Uint32 | GaiaRockLeafScript [] | |
extern Sint32 | GaiaRockWindScript [] | |
extern Sint32 | StoneHeadRiseScript [] | The head swells by half and settles back in three steps, three times over, then rests 20 ticks: three rounds in all. |
extern Uint32 | DebrisScript [] | A piece of debris flies for 40 ticks, then blinks ten times and is gone. |
extern Uint32 | GaiaRockPillarScript [] | |
SCENE_ENTRANCE | SceneEntrances [] | Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole. |
Uint32 | SceneExits [] | The room has no exits of its own. |
CUE | GaiaRockUnusedCues [] | Unused: an empty cue table nothing returns. |
Description
The outside of Gaia Rock, the great rock near Izumo where the Serpent lives, in three areas of this overlay.
The path from the world map runs north under stone arches to the cliffs,
where a dark cave mouth leads into the rock (gaia_rock_inside.c); the way up
is outside. On the first cliffs (SceneIdGaiaRockEntrance) Felix pushes a
stone pillar west along a ledge until it drops into a gap and bridges it
(scGaiaRockFinishMovingPillar), climbs walls of handholds and rides slides,
and sees a stone statue blow whirlwinds at a hanging vine to set it swinging.
Whirlwind on another vine, over a gap, swings him across, and a second pillar
Moved east off the ledge beyond drops into a notch below. On the next cliffs
(SceneIdGaiaRockCliffs) more statues blow at vines, and on a great wall of
handholds three stone heads lie in wait: when Felix climbs onto one it bursts
out under him and knocks him off the holds
(scGaiaRockClimbOntoLowestStoneHead). Beyond, a pillar slides in a slot, and
on the mesa past it Reveal shows the Dancing Idol on an altar ringed by
pillars (scGaiaRockRevealIdol), for Uzume in Izumo. Once the party has fought
the Serpent inside, they come out to find Susa lying worn out by the cave
mouth, and he asks whether they will tell Kushinada they slew it
(scGaiaRockSusaAsksAboutTheSerpent).
Macros in detail
FLAG_SUSA_RESTED
#define FLAG_SUSA_RESTED 0xa61
Set once Susa has said he only needs rest ("I'm not dying... I'm just so tired...").
Referenced by scInit().
Definition at line 36 of file gaia_rock.c.
FLAG_LOWEST_STONE_HEAD_OUT
#define FLAG_LOWEST_STONE_HEAD_OUT FLAG_AREA_TEMP(0x00)
Set once each stone head has burst out of the great wall, so that it stays out until the party enters another area.
Referenced by GaiaRockCliffsCues, scGaiaRockClimbOntoLowestStoneHead() and scInit().
Definition at line 75 of file gaia_rock.c.
FLAG_MIDDLE_STONE_HEAD_OUT
#define FLAG_MIDDLE_STONE_HEAD_OUT FLAG_AREA_TEMP(0x01)
Referenced by GaiaRockCliffsCues, scGaiaRockClimbOntoMiddleStoneHead() and scInit().
Definition at line 76 of file gaia_rock.c.
FLAG_HIGHEST_STONE_HEAD_OUT
#define FLAG_HIGHEST_STONE_HEAD_OUT FLAG_AREA_TEMP(0x02)
Referenced by GaiaRockCliffsCues, scGaiaRockClimbOntoHighestStoneHead() and scInit().
Definition at line 77 of file gaia_rock.c.
FLAG_FIRST_PILLAR_DROPPED
#define FLAG_FIRST_PILLAR_DROPPED 0x920
The two pillars Moved into the gaps: each stands sunk into its gap, its top level with the ledge it was Moved along, for good.
Referenced by GaiaRockEntranceCues, scGaiaRockFinishMovingPillar() and scInit().
Definition at line 81 of file gaia_rock.c.
FLAG_SECOND_PILLAR_DROPPED
#define FLAG_SECOND_PILLAR_DROPPED 0x921
Referenced by GaiaRockEntranceCues, scGaiaRockFinishMovingPillar() and scInit().
Definition at line 82 of file gaia_rock.c.
ARRIVES_AT_GREAT_WALL
#define ARRIVES_AT_GREAT_WALL()
Whether the party arrives on the next cliffs' great wall side: by its passage, or down from the mesa (the entrance after it).
Referenced by scInit() and scPrepareMap().
Definition at line 120 of file gaia_rock.c.
ANIM_SUSA_LYING_DOWN
#define ANIM_SUSA_LYING_DOWN 5
Susa's sheet's animation lying on his back, worn out.
Referenced by scInit().
Definition at line 125 of file gaia_rock.c.
DROP_PILLAR
#define DROP_PILLAR(id) scActorWaitToLand(id)
#define DROP_PILLAR(id) scActorWaitToLandWithSound(id, SE_BOOM)
Referenced by scGaiaRockFinishMovingPillar().
Definition at lines 246 and 248 of file gaia_rock.c.
SCREEN_EFFECT
#define SCREEN_EFFECT
Referenced by scInit().
Definition at lines 621 and 624 of file gaia_rock.c.
Enumerations in detail
anonymous enum
enum { ACTOR_FIRST_VINE, ACTOR_FIRST_PILLAR, ACTOR_WIND_STATUE, ACTOR_WHIRLWIND, … }
The first cliffs, from the world map's path to the cave mouth
(SceneIdGaiaRockEntrance): the eight hanging vines, the two pillars Moved
into the gaps, the statue that blows whirlwinds, a whirlwind that never
leaves the map's corner (the statue spawns the ones it blows), and Susa, who
lies by the cave mouth after the Serpent ("Kushinada's safe... She's safe!
Nothing else matters.").
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_VINE | ACTOR_FIRST_PLACED | |
ACTOR_FIRST_PILLAR | ACTOR_FIRST_VINE + 8 | |
ACTOR_WIND_STATUE | ||
ACTOR_WHIRLWIND | ||
ACTOR_SECOND_PILLAR | ||
ACTOR_SUSA |
Definition at line 44 of file gaia_rock.c.
anonymous enum
enum { ACTOR_LOWEST_STONE_HEAD, ACTOR_MIDDLE_STONE_HEAD, ACTOR_HIGHEST_STONE_HEAD }
The next cliffs, with the great wall of handholds (SceneIdGaiaRockCliffs):
seven hanging vines, two statues that blow wind, and the three stone heads
that burst out of the wall under Felix.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_LOWEST_STONE_HEAD | ACTOR_FIRST_VINE + 9 | |
ACTOR_MIDDLE_STONE_HEAD | ||
ACTOR_HIGHEST_STONE_HEAD |
Definition at line 57 of file gaia_rock.c.
anonymous enum
enum { ACTOR_PUSHED_PILLAR, ACTOR_ALTAR, ACTOR_DANCING_IDOL }
The top, with the altar's mesa (SceneIdGaiaRockDancingIdol): the pillar that
slides in its slot, the altar and the Dancing Idol on it.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_PUSHED_PILLAR | ACTOR_FIRST_PLACED | |
ACTOR_ALTAR | ACTOR_FIRST_PLACED + 7 | |
ACTOR_DANCING_IDOL |
Definition at line 66 of file gaia_rock.c.
GAIA_ROCK_METATILE_BEHAVIOR
enum GAIA_ROCK_METATILE_BEHAVIOR
The metatile behaviors of the cue tables.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_CAVE_MOUTH_WEEDS | 20 | On the first cliffs, the tufts of weeds below the cliff east of the cave mouth, which Cyclone blows away. |
METATILE_BEHAVIOR_LOWEST_STONE_HEAD | 20 | On the next cliffs, the great wall's three trap holds, lowest first, in its overhead layer (scGaiaRockCueWallMetatile reads them as Felix climbs). |
METATILE_BEHAVIOR_MIDDLE_STONE_HEAD | ||
METATILE_BEHAVIOR_HIGHEST_STONE_HEAD | ||
METATILE_BEHAVIOR_PAST_SUSA | 42 | The path just south of where Susa lies by the cave mouth. |
Definition at line 85 of file gaia_rock.c.
GAIA_ROCK_PASSAGE
enum GAIA_ROCK_PASSAGE
The passages within the first two areas. Each of their maps holds two parts, each with a camera of its own: on the first cliffs, the path to the cave mouth in the south and the cliffs above it in the north; on the next cliffs, the cliffs of vines in the west and the great wall under the two wind statues in the east. A passage's exit and the entrance it leads to.
| Enumerator | Value | Description |
|---|---|---|
GAIA_ROCK_ENTRANCE_CLIFFS_TO_CAVE_MOUTH | 2 | |
GAIA_ROCK_ENTRANCE_CAVE_MOUTH_TO_CLIFFS | ||
GAIA_ROCK_ENTRANCE_CLIFFS_FROM_CAVE_MOUTH | 2 | |
GAIA_ROCK_ENTRANCE_CAVE_MOUTH_FROM_CLIFFS | ||
GAIA_ROCK_CLIFFS_VINES_TO_WALL | 2 | |
GAIA_ROCK_CLIFFS_WALL_TO_VINES | ||
GAIA_ROCK_CLIFFS_VINES_FROM_WALL | 2 | |
GAIA_ROCK_CLIFFS_WALL_FROM_VINES |
Definition at line 106 of file gaia_rock.c.
anonymous enum
enum { ANIM_WHIRLWIND_SPIN_AWAY, ANIM_WHIRLWIND_SPIN }
The whirlwind sheet's animations: spinning, and spinning a while longer before it breaks up and vanishes.
| Enumerator | Value | Description |
|---|---|---|
ANIM_WHIRLWIND_SPIN_AWAY | 1 | |
ANIM_WHIRLWIND_SPIN |
Definition at line 129 of file gaia_rock.c.
anonymous enum
enum { WHIRLWIND_LEAVES }
The whirlwind's circling leaves.
| Enumerator | Value | Description |
|---|---|---|
WHIRLWIND_LEAVES | 16 |
Definition at line 136 of file gaia_rock.c.
Functions in detail
scGaiaRockStartWallCues
void scGaiaRockStartWallCues(void)
Starts scGaiaRockCueWallMetatile each tick.
References scGaiaRockCueWallMetatile() and sySetTickEvent().
Referenced by scInit().
Definition at lines 161 and 794 of file gaia_rock.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 169 of file gaia_rock.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
References GaiaRockCliffsExitRegions, GaiaRockEntranceExitRegions and MainRoutineStateWork.
Definition at line 174 of file gaia_rock.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 183 of file gaia_rock.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References GaiaRockCliffsActorPlacements, GaiaRockDancingIdolActorPlacements, GaiaRockEntranceActorPlacements, GaiaRockPlacements and MainRoutineStateWork.
Definition at line 188 of file gaia_rock.c.
scGaiaRockClimbOntoLowestStoneHead
void scGaiaRockClimbOntoLowestStoneHead(void)
Climbing the great wall of handholds, Felix reaches the lowest of its three trap holds, near the middle of the wall: a stone head bursts out of the rock under him in a shower of stones, and he flails and loses his hold on the wall: he is left standing on the head, and when the player climbs on he drops off it, facing out, down the wall to its foot. The hold is metatile (111, 50) of the wall's overhead layer, drawn at (47, 50); the head stays out, and the hold is solid rock, until the party enters another area.
References scStoneHeadBurstOut().
Referenced by GaiaRockCliffsCues.
Definition at line 206 of file gaia_rock.c.
scGaiaRockClimbOntoMiddleStoneHead
void scGaiaRockClimbOntoMiddleStoneHead(void)
As scGaiaRockClimbOntoLowestStoneHead, for the middle trap hold, a little
higher and to the east: metatile (113, 42) of the overhead layer, drawn at
(49, 42).
References scStoneHeadBurstOut().
Referenced by GaiaRockCliffsCues.
Definition at line 214 of file gaia_rock.c.
scGaiaRockClimbOntoHighestStoneHead
void scGaiaRockClimbOntoHighestStoneHead(void)
As scGaiaRockClimbOntoLowestStoneHead, for the highest trap hold, a little
west of the middle one: metatile (112, 33) of the overhead layer, drawn at
(48, 33).
References scStoneHeadBurstOut().
Referenced by GaiaRockCliffsCues.
Definition at line 222 of file gaia_rock.c.
scGaiaRockStartMovingPillar
void scGaiaRockStartMovingPillar(void)
As Felix's Move takes hold of the stone pillar on the west ledge of the first
cliffs, standing at metatile (7, 27), the map's metatile beside it, in the
map's lower half, is freed so that the pillar can slide;
scGaiaRockFinishMovingPillar sets it back.
References fdMapGridCopyMetatileAttributes().
Referenced by GaiaRockEntranceCues.
Definition at line 240 of file gaia_rock.c.
scGaiaRockFinishMovingPillar
void scGaiaRockFinishMovingPillar(Sint32 unused, Sint32 id)
A pillar of the first cliffs stops after a push or a Move. The pillar on the west ledge, once pushed or Moved west over the gap at metatile (5, 27), drops in, its top level with the ledge, so that Felix can walk across. The pillar on the ledge past the swinging vine, at metatile (37, 46), once Moved east off the ledge's end drops onto the ledge below, and one Move more sets it for good in the notch where a grey block shows, metatile (40, 46), its top a square Felix hops across.
References fdActorGet(), fdMapGridCopyMetatileAttributes(), fdScriptGetFlag(), fdScriptSetFlag() and Sint32.
Referenced by GaiaRockEntranceCues.
Definition at line 258 of file gaia_rock.c.
scGaiaRockStartPushingPillar
void scGaiaRockStartPushingPillar(void)
Felix starts to push or Move the stone pillar at the east edge of the top, where he arrives, which slides north and south in its slot (metatiles (13, 14) to (13, 18)): the slot's metatile under it is freed so that it can slide.
References fdActorGet() and fdMapGridCopyMetatileAttributes().
Referenced by GaiaRockCues.
Definition at line 294 of file gaia_rock.c.
scGaiaRockFinishPushingPillar
void scGaiaRockFinishPushingPillar(void)
The pillar in its slot at the east edge of the top stops, and its metatile becomes a square Felix hops across, so that he can jump over the pillar's top. Moved to the slot's south end, metatile (13, 18), it opens the way on to the altar.
References fdActorGet() and fdMapGridCopyMetatileAttributes().
Referenced by GaiaRockCues.
Definition at line 309 of file gaia_rock.c.
scGaiaRockCycloneBlowsAwayWeeds
void scGaiaRockCycloneBlowsAwayWeeds(void)
Felix casts Cyclone among the tufts of weeds below the cliff east of the cave mouth (metatiles (49, 48), (51, 48), (50, 49), (58, 48), (59, 47) and a few more), and its whirl of leaves blows away the tufts within its reach: cast from metatile (50, 50), the two either side of the sapling below the cave mouth; from metatile (57, 49), the one just east of Felix. The thick bushes south of them stay as they were. The game takes each tuft's picture from the overhead layer's block at metatiles (110, 64) to (123, 75) of map.txt into its place, in the block from (110, 47) that the overhead layer shows here.
References scFieldTileCopiesCopyTouchedMetatiles().
Referenced by GaiaRockEntranceCues.
Definition at line 328 of file gaia_rock.c.
scGaiaRockRevealIdol
void scGaiaRockRevealIdol(void)
Casting Reveal at the top of the cliffs shows the Dancing Idol standing on the altar, on the mesa ringed by six pillars, until the party has taken it.
References fdActorGet(), fdScriptGetFlag() and Sint32.
Referenced by GaiaRockCues.
Definition at line 335 of file gaia_rock.c.
scGaiaRockHideIdol
void scGaiaRockHideIdol(void)
As Reveal wears off, the Dancing Idol vanishes from the altar again.
References fdActorGet().
Referenced by GaiaRockCues.
Definition at line 352 of file gaia_rock.c.
scGaiaRockCheckAltar
void scGaiaRockCheckAltar(void)
Felix examines the altar on the mesa ringed by six pillars: "Felix checked the altar." With the Dancing Idol revealed on it, he takes it. Before that he says "I'm...sensing something..." and the field menu opens, a hint to cast Reveal; once it is taken, "I can't feel anything...".
References fdActorGet(), fdScriptGetFlag(), fdTalkToActor() and mnMessageShowCentered().
Referenced by GaiaRockCues.
Definition at line 362 of file gaia_rock.c.
scGaiaRockSusaAsksAboutTheSerpent
void scGaiaRockSusaAsksAboutTheSerpent(void)
Once the Serpent is slain, Felix walks past Susa, who lies by the cave mouth (on the metatiles just south of him, (45, 52) to (50, 52)), and Susa asks: "You're going to tell Kushinada that you defeated the serpent, aren't you?" Yes: "Ha ha ha! Of course!" No: he says they should accept the credit. It plays once.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptStart(), scFieldActorStartRepeatedMotion(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId() and scFieldScriptWait().
Referenced by GaiaRockEntranceCues.
Definition at line 389 of file gaia_rock.c.
scGaiaRockTalkToSusa
void scGaiaRockTalkToSusa(void)
Talking to Susa where he lies by the cave mouth: before he has asked about the serpent, "If you're going to Izumo, tell my sister that I'm still alive."; after, he asks again.
References fdScriptAskYesNo(), fdScriptGetFlag(), fdScriptShowMessage() and scFieldScriptSetMessageId().
Referenced by GaiaRockEntranceCues.
Definition at line 408 of file gaia_rock.c.
scGaiaRockMindReadSusa
void scGaiaRockMindReadSusa(void)
Mind Read on Susa where he lies by the cave mouth: "I really got worked over, but as long as Kushinada's safe, it was worth it." before he has asked about the serpent, "Kushinada's safe... She's safe!" after.
References fdScriptGetFlag(), fdScriptShowMessage() and scFieldScriptSetMessageId().
Referenced by GaiaRockEntranceCues.
Definition at line 426 of file gaia_rock.c.
scGetCues
const CUE *scGetCues(void)
References GaiaRockCliffsCues, GaiaRockCues, GaiaRockEntranceCues and MainRoutineStateWork.
Definition at line 443 of file gaia_rock.c.
scGaiaRockCircleLeaf
void scGaiaRockCircleLeaf(ORBIT_EFFECT *effect)
Each tick, carries a leaf round a wobbling circle, now and then turning faster for a moment, and releases it at its 71st tick.
References fdActorStartScript(), GaiaRockLeafScript, Sint32, syCos(), syRandom() and sySin().
Referenced by scGaiaRockSpawnCirclingLeaves().
Definition at line 478 of file gaia_rock.c.
scGaiaRockSpawnCirclingLeaves
Sint32 scGaiaRockSpawnCirclingLeaves(ORBIT_EFFECT *src)
The whirlwind's 16 leaves, spawned in a column around it, each circling from its own start.
References fdActorSetSpritePriorityDirect(), fdActorSpawn(), scFieldVectorAddPolarOffsetFX(), scGaiaRockCircleLeaf(), Sint32, syRandom() and Value4().
Referenced by GaiaRockWindScript.
Definition at line 507 of file gaia_rock.c.
scGaiaRockFindVineSlot
static inline HANGING_VINE_SLOT *scGaiaRockFindVineSlot(Sint32 id)
The hanging vine of actor id, or NULL: this overlay's copy of
fdHangingVineFindSlot.
References Sint32.
Referenced by scGaiaRockWhirlwindBlowsVine() and scGaiaRockWhirlwindBlowsVineHarder().
Definition at line 551 of file gaia_rock.c.
scGaiaRockWhirlwindBlowsVine
void scGaiaRockWhirlwindBlowsVine(void)
The statue's whirlwind reaches the vine beside it and starts it swinging.
References scGaiaRockFindVineSlot().
Referenced by GaiaRockWindScript.
Definition at line 569 of file gaia_rock.c.
scGaiaRockWhirlwindBlowsVineHarder
void scGaiaRockWhirlwindBlowsVineHarder(void)
The statue's whirlwind swings the vine beside it wider.
References scGaiaRockFindVineSlot().
Referenced by GaiaRockWindScript.
Definition at line 578 of file gaia_rock.c.
scGaiaRockStatueBlowsWind
void scGaiaRockStatueBlowsWind(void)
Every 256 ticks the stone statue on the upper ledge of the first cliffs blows a whirlwind west at the hanging vine beside it, setting it swinging.
References fdActorGet(), fdActorPlaySoundInView(), fdActorSelectAnimation(), fdActorSetSpritePriorityDirect(), fdActorSpawn(), fdActorStartScript(), GaiaRockWindScript, scFieldActorSetMoveTargetFX() and TickCount.
Referenced by scInit().
Definition at line 590 of file gaia_rock.c.
scInit
Sint32 scInit(void)
Sets up whichever of the three areas is being entered: on the first cliffs the vines, the statue's whirlwinds, the pillars where they were left and Susa after the Serpent; on the next cliffs the vines and the stone heads already out; at the top, the Dancing Idol kept hidden for Reveal and the pillar in its slot.
References Call2(), fdActorGetById(), fdActorSetAnimationById(), fdActorSetSpriteFlags(), fdCameraMoveToActorById(), fdHangingVinePlace(), fdMapCopyMetatileAttributeRect(), fdMapGridCopyMetatileAttributes(), fdPartyGetLeaderActor(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldActorStartRepeatedMotion(), scFieldScriptSetMessageId(), scFieldScriptWait(), scGaiaRockStartWallCues(), scGaiaRockStatueBlowsWind(), scStoneHeadPlace(), Sint32, syGameFlagGet() and sySetEvent().
Definition at line 633 of file gaia_rock.c.
scPrepareMap
Sint32 scPrepareMap(void)
Arriving on the great wall's side of the next cliffs, sets back the far layer of sky and hills, which scrolls a quarter as fast as the view, so that it shows behind the wall as it does behind the vines. That side's views lie 512 pixels east of the vines' side's in the map's picture, and lower down: the layer is set a quarter of 512 west, and 216 pixels (a quarter of 864) above the 1312 its map gives it.
References fdMapGridGetLayer(), MainRoutineStateWork and Sint32.
Definition at line 775 of file gaia_rock.c.
Variables in detail
GaiaRockEntranceExitRegions
extern SCENE_REGION GaiaRockEntranceExitRegions[]
SCENE_REGION GaiaRockEntranceExitRegions[]
Referenced by scGetExitRegions().
Definition at lines 143 and 805 of file gaia_rock.c.
GaiaRockCliffsExitRegions
extern SCENE_REGION GaiaRockCliffsExitRegions[]
SCENE_REGION GaiaRockCliffsExitRegions[]
Referenced by scGetExitRegions().
Definition at lines 144 and 811 of file gaia_rock.c.
GaiaRockPlacements
extern ACTOR_PLACE GaiaRockPlacements[]
ACTOR_PLACE GaiaRockPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 148 and 849 of file gaia_rock.c.
GaiaRockEntranceActorPlacements
extern ACTOR_PLACE GaiaRockEntranceActorPlacements[]
ACTOR_PLACE GaiaRockEntranceActorPlacements[]
References GaiaRockPillarScript and Sint32.
Referenced by scGetActorPlacements().
Definition at lines 149 and 853 of file gaia_rock.c.
GaiaRockCliffsActorPlacements
extern ACTOR_PLACE GaiaRockCliffsActorPlacements[]
ACTOR_PLACE GaiaRockCliffsActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 151 and 883 of file gaia_rock.c.
GaiaRockDancingIdolActorPlacements
extern ACTOR_PLACE GaiaRockDancingIdolActorPlacements[]
ACTOR_PLACE GaiaRockDancingIdolActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 152 and 911 of file gaia_rock.c.
GaiaRockEntranceCues
extern CUE GaiaRockEntranceCues[]
CUE GaiaRockEntranceCues[]
References scGaiaRockCycloneBlowsAwayWeeds(), scGaiaRockFinishMovingPillar(), scGaiaRockMindReadSusa(), scGaiaRockStartMovingPillar(), scGaiaRockSusaAsksAboutTheSerpent() and scGaiaRockTalkToSusa().
Referenced by scGetCues().
Definition at lines 154 and 944 of file gaia_rock.c.
GaiaRockCliffsCues
extern CUE GaiaRockCliffsCues[]
CUE GaiaRockCliffsCues[]
References scGaiaRockClimbOntoHighestStoneHead(), scGaiaRockClimbOntoLowestStoneHead() and scGaiaRockClimbOntoMiddleStoneHead().
Referenced by scGetCues().
Definition at lines 155 and 976 of file gaia_rock.c.
GaiaRockCues
extern CUE GaiaRockCues[]
CUE GaiaRockCues[]
References scGaiaRockCheckAltar(), scGaiaRockFinishPushingPillar(), scGaiaRockHideIdol(), scGaiaRockRevealIdol() and scGaiaRockStartPushingPillar().
Referenced by scGetCues().
Definition at lines 156 and 997 of file gaia_rock.c.
GaiaRockLeafScript
extern Uint32 GaiaRockLeafScript[]
Uint32 GaiaRockLeafScript[]
Referenced by scGaiaRockCircleLeaf().
Definition at lines 157 and 1014 of file gaia_rock.c.
GaiaRockWindScript
extern Sint32 GaiaRockWindScript[]
Sint32 GaiaRockWindScript[]
References scGaiaRockSpawnCirclingLeaves(), scGaiaRockWhirlwindBlowsVine(), scGaiaRockWhirlwindBlowsVineHarder() and Sint32.
Referenced by scGaiaRockStatueBlowsWind().
Definition at lines 159 and 1018 of file gaia_rock.c.
GaiaRockPillarScript
extern Uint32 GaiaRockPillarScript[]
Uint32 GaiaRockPillarScript[]
Referenced by GaiaRockEntranceActorPlacements.
Definition at lines 167 and 844 of file gaia_rock.c.
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
Referenced by scGetEntrances().
Definition at line 799 of file gaia_rock.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 817 of file gaia_rock.c.
GaiaRockUnusedCues
CUE GaiaRockUnusedCues[]
Unused: an empty cue table nothing returns.
Definition at line 940 of file gaia_rock.c.