src/scene/aqua_rock.c
Aqua Rock's outside, the island south of the Apojii Islands, in two rooms of this overlay. More…
#include "shared/actor_set_sprite_priority.c"#include "field/field_engine.h"#include "field/actor_script.h"#include "scene/dust.h"#include "shared/actor_create_silhouette.c"#include "graphics/palette_buffers.h"#include "game/game.h"#include "scene/scene.h"#include "scene/ground_effects.h"#include "field/script_inline.h"#include "field/call.h"#include "macros.h"#include "../field/field_effect_move.c"#include "shared/field_effect_spawn.c"#include "shared/actor_flash_white.c"#include "shared/actor_spawn_wading_splash.c"#include "shared/actor_emit_ripples.c"#include "shared/leader_flow_with_stream.c"#include "shared/actor_emit_mist.c"#include "shared/ground_particles_draw.c"#include "shared/ground_particles_start.c"#include "shared/ground_particles_set_anchor.c"#include "shared/field_effect_duration_scripts.c"#include "shared/ripple_script.c"#include "shared/ground_particle_frames.c"#include "shared/scene_entrances_default.c"
Structures
| Name | Description | |
|---|---|---|
struct | BUBBLE | A bubble a stream carries: its place, its age in ticks and its sprite's attributes. |
struct | AQUA_ROCK_BUBBLES | The bubbles' state: the actor they come from, their VRAM entry, the next free bubble, which way they go (up the stream when positive) and the bubbles. |
struct | AQUA_ROCK_STREAM | One of the streams the moai pour, which stops and starts with its flag: each change runs down it as a wave, copying three metatiles a row from the flowing or stopped pictures beside it, a row every four ticks. |
Macros
| Name | Description | |
|---|---|---|
#define | STREAM_BUBBLE_COUNT 64 | The bubbles a stream carries along at once. |
#define | FLAG_AQUA_ROCK_PILLAR_IN_HOLE 0x950 | Aqua Rock's lasting flags outside: the slopes' second pillar Moved into the hole in its ledge, the two rocks Moved into the summit's stream, the guardian moai stepped aside, the streams the slopes' Water Stone has turned back (each Douse turns them again), the summit's Water Stone Doused, and the dry moai filled. |
#define | FLAG_AQUA_ROCK_FIRST_ROCK_DROPPED 0x951 | |
#define | FLAG_AQUA_ROCK_SECOND_ROCK_DROPPED 0x952 | |
#define | FLAG_AQUA_ROCK_MOAI_STEPPED_ASIDE 0x955 | |
#define | FLAG_AQUA_ROCK_STREAMS_TURNED_BACK 0xa68 | |
#define | FLAG_AQUA_ROCK_SUMMIT_WATER_STONE_DOUSED 0xa69 | |
#define | FLAG_AQUA_ROCK_DRY_MOAI_FILLED 0xa6b | |
#define | FLAG_PILLAR_COLUMN FLAG_AREA_TEMP(0x10) | While the party is on the island: the metatile of the pillar Move sets before the top's red moai, kept as two bytes, and whether it stands before the west or the east one, which stops that moai's stream. |
#define | FLAG_PILLAR_ROW FLAG_AREA_TEMP(0x18) | |
#define | FLAG_PILLAR_BEFORE_WEST_MOAI FLAG_AREA_TEMP(0x20) | |
#define | FLAG_PILLAR_BEFORE_EAST_MOAI FLAG_AREA_TEMP(0x21) | |
#define | FLAG_WEST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x00) | This visit's flags. |
#define | FLAG_EAST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x01) | |
#define | FLAG_LOWER_WEST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x02) | |
#define | FLAG_LOWER_EAST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x03) | |
#define | FLAG_PUDDLE_A_FROZEN FLAG_SCENE_TEMP(0x21) | Frost on each of the summit's three puddles. |
#define | FLAG_PUDDLE_B_FROZEN FLAG_SCENE_TEMP(0x22) | |
#define | FLAG_PUDDLE_C_FROZEN FLAG_SCENE_TEMP(0x23) | |
#define | WEST_MOAI_COLUMN 7 | The metatiles before the top's west and east red moai, where the pillar stops a stream; the column of the hole in the ledge; and the column of the summit's stream, where a rock Moved drops in. |
#define | EAST_MOAI_COLUMN 15 | |
#define | MOAI_FRONT_ROW 35 | |
#define | PILLAR_HOLE_COLUMN 32 | |
#define | ROCK_STREAM_COLUMN 53 | |
#define | CUE_DROP_DOWN_FALLS 44 | The cue scAquaRockStepIntoCurrent raises for a leader the current carries over the edge of the falls (scAquaRockDropDownFalls). |
#define | EFFECT_SET_MODE fdActorSelectAnimation | |
#define | EFFECT_SET_SCRIPT fdActorStartScript | |
#define | EFFECT_SPRITE_PRIORITY | |
#define | STREAM_NO_WAVE 9999 | AQUA_ROCK_STREAM.waveRow for no wave. |
#define | STREAM_CYCLE_TICKS 240 | The ticks of a red moai's stream's cycle, and the last of them it stops for. |
#define | STREAM_STOP_TICKS 90 | |
#define | STREAM_SET (stream, | Sets up a stream (AQUA_ROCK_STREAM) to show its flag's opposite, so that its first update runs a wave to the flag's state. |
#define | DEFINE_AQUA_ROCK_FREEZE_PUDDLE (name, sourceX, row, column, flag) | Defines Frost on a puddle: it freezes into a step, its metatile taking the attributes of the frozen metatile at (sourceX, row), and its flag is set. |
#define | DEFINE_AQUA_ROCK_DROP_AT_COLUMN (name, flag, row) | Defines Move on a rock: pushed to the stream's column it drops in, its flag is set and its metatile in row takes the attributes of the stream's rock-filled metatile. |
#define | MOAI_SHAKE (TRIG_TURN / 128) | The farthest a guardian moai rocks either way as it shakes. |
#define | MOAI_ROCK_DIVISOR 64 | The last guardian moai rocks up to a sixty-fourth of a turn either way: the sine of its phase, which as a rotation reaches a whole turn, divided by this. |
#define | MOAI_LEAN (TRIG_TURN * 3 / 128) | The last guardian moai's lean, about which it rocks. |
#define | GROUND_PARTICLE_FRAMES_SECTION LATE_DATA | |
#define | SCENE_ENTRANCES_SECTION LATE_DATA |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { STREAMS_DOWNHILL_ANIMATION, STREAMS_UPHILL_ANIMATION } | The slopes' map animations of the streams their Water Stone turns, two each: running downhill, and turned back to run uphill. |
enum | anonymous enum { METATILE_BEHAVIOR_WEST_MOAI_STREAM, METATILE_BEHAVIOR_EAST_M … } | The metatile behaviours the rooms' cue tables answer: the streams the top's west and east red moai pour, the heads of the two lower red moai's streams, the streams that only ever run downhill, the streams the slopes' Water Stone turns back, and the mouth of the sparkling passage. |
enum | AQUA_ROCK_SLOPES_ACTOR_ID { ACTOR_FIRST_MOAI, ACTOR_DRY_MOAI, ACTOR_FIRST_BOTTOM_MOAI, A … } | The slopes (AquaRockSlopesPlacements). |
enum | AQUA_ROCK_SUMMIT_ACTOR_ID { ACTOR_SUMMIT_WATER_STONE, ACTOR_PUDDLE_A, ACTOR_PUDDLE_B, AC … } | The summit (AquaRockSummitPlacements). |
enum | AQUA_ROCK_SUMMIT_WAY { WAY_SUMMIT_WEST_TO_EAST, WAY_SUMMIT_EAST_TO_WEST } | The summit's ways between its west and east halves, which its one map holds, each named by the half it leaves; a way's exit and the entrance at its foot share its number. |
Functions
| Name | Description | |
|---|---|---|
Sint32 | scActorEmitMist (ACTOR *actor) | Mist about an actor, as the leader walks into Aqua Rock's waterfall: every other tick a dust cloud at 0.8 of its size, white and pale blue by turns, sinks from 26 pixels above it at up to 1.4 pixels a tick, the clouds sweeping from 8 pixels right of it to 7 left every 16 ticks. |
void | scAquaRockTurnFish (ACTOR *actor) | A fish's update: its sprite turns with its facing. |
void | scAquaRockFlowSparkleUpStream (ACTOR *actor) | Unused: a sparkle's update. |
void | scAquaRockDrawRisingBubbles (void) | Each tick, for bubbles going up: now and then one starts from the actor they come from, and each rises up the stream, north, until it reaches the top; those in view are drawn. |
void | scAquaRockDrawFallingBubbles (void) | Each tick, for bubbles going down: now and then one starts from the actor they come from, and each falls down the stream, south, until it reaches the bottom; those in view are drawn. |
void | scAquaRockDrawBubbles (void) | Each tick: the bubbles go up or down the stream, as their direction says. |
ACTOR * | scAquaRockCreateActor (Sint32 x, Sint32 y, Sint32 z, Sint32 kind) | Unused: creates an unseen, still actor of kind at a point, untargeted and drawn underfoot. |
void | scGroundParticlesSetAnchor (Sint32 id) | Lets the rain fall about actor id, or, for 0, nowhere on screen. |
void | scAquaRockSetBubbleAnchor (Sint32 id) | Sets the actor the bubbles come from, or with 0 none: they fall from the summit's Water Stone and rise from any other. |
void | scLeaderFlowWithStream (void) | Felix, walking into one of Aqua Rock's streams, is carried down it two pixels a tick, splashing, until something blocks the way; where it pours off a ledge he drops with the water and lands sitting down. |
void | scActorSpawnWadingSplash (ACTOR *actor) | A splash at the actor's feet as it wades, on its sprite's priority. |
void | scAquaRockAddMoaiWater (Sint32 id) | Gives a moai its water: the pool in the top of its head, pouring from its mouth. |
void | scActorEmitRipples (ACTOR *actor) | Ripples on the water over an actor, as over Aqua Rock's way inside once its Water Stone is doused: every sixteenth tick a blue ring (SPRITE_SPLASH_RING's animation 2) widens from 7.5 pixels under it, rising a quarter of a pixel a tick for 31 ticks (RippleScript). |
void | scAquaRockKeepLeaderPriority (void) | On the slopes Felix is drawn behind the falls while a current carries him, and in front of them otherwise. |
Sint32 | scAquaRockStartBubbles (void) | Clears the bubbles, loads their tiles into VRAM and starts their drawing; returns the drawing event (sySetEvent). |
void | scAquaRockMoaiStepAside (void) | Arriving by the north way, as Douse wakes the Apojii Islands' Aqua Stone: the five guardian moai shake and move aside into a row clear of the way in, the last left rocking, and the party goes back to the Apojii Islands where it stood. |
void | scAquaRockSetUpStreams (void) | Sets the five streams with their pictures, metatiles and flags, stops at once the top two the pillar stands before, and starts the streams' events. |
void | scAquaRockArriveFromPassage (void) | Arriving from the sparkling passage, unless the party's place is kept: the leader walks out of the mist. |
void | scAquaRockArriveFromInside (void) | Arriving from the inside entrance below: the leader spins up out of the pool and lands, going on north or south by the key held. |
void | scAquaRockArriveUpStream (void) | Arriving by the slopes' stream turned back: it throws the leader spinning up out of the water, and he walks out onto the bank. |
Sint32 | scAquaRockStartFish (ACTOR *actor) | A fish's script call: takes away its shadow and gives it its speed and its turning update. |
void | scAquaRockRideStreamUp (void) | Felix, walking into one of the streams the slopes' Water Stone turns back, is carried up it, splashing, once the stone has been Doused; at the head of the slopes' stream he spins up out of the water and away to the summit. |
void | scAquaRockStepIntoCurrent (void) | Felix, stepping into the stream one of the red moai pours, is swept away down the slopes, tumbling over the ledges, and where it carries him over the edge of the falls he drops down them, flailing, to the pool below (scAquaRockDropDownFalls). |
void | scAquaRockDouseDryMoai (void) | Douse on the dry moai: it fills, turns blue and pours, and its stream down the slopes starts to flow. |
void | scAquaRockDropDownFalls (void) | The leader drops down the falls, flailing, and lands, for at most three seconds. |
BSS_DATA | ALIGNED (16) | The five moai streams scAquaRockUpdateStreams stops and starts: the four red moai's and the dry moai's. |
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. |
Sint32 | scAquaRockPickRandomSpot (ACTOR *actor) | A fish's script call: picks a random spot ahead within 16 pixels of its home and swims there; after three misses it turns around. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
void | scAquaRockSpawnSparkleAtRandom (ACTOR *actor) | Unused: now and then a sparkle starts up the stream from somewhere along the actor's 48-pixel width. |
void | scAquaRockUpdateStreams (void) | A moai's stream stops or starts as a wave running down it from the moai's mouth, a row every four ticks. |
void | scAquaRockTimeStreams (void) | The four red moai's streams flow for two and a half seconds and stop for one and a half, over and over, and the top two stay stopped while the pillar stands before them. |
void | scAquaRockFlashMoai (ACTOR *actor) | Unused: a moai's update while it flashes, grey every other two ticks. |
void | scAquaRockStopFlashing (ACTOR *actor) | A flashing actor's last update: its sprite's colour back to normal. |
void | scAquaRockDouseWaterStone (Sint32 unused, Sint32 id) | Douse on the slopes' Water Stone: it flickers, the screen flashes four colours and turns white, and the streams turn back to run uphill, bubbles rising from the stone; Doused again, they run downhill once more. |
void | syGameFlagSetByte (Sint32 flag, Sint32 value) | Sets the whole byte flags is in. |
void | scAquaRockMovePillar (Sint32 unused, Sint32 id) | Move on a pillar. |
void | scActorWaitBelowHeight (ACTOR *actor, FIXED height) | Unused: waits until the actor has come down to height, a second at most. |
static inline Uint8 | scAquaRockGetMetatileAttribute (MAP_METATILE *metatiles, Sint32 row, Sint32 column) | The attribute byte of a metatile of a layer. |
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( | scAquaRockFreezeFirstPuddle , 42, 32, 44, FLAG_PUDDLE_A_FROZEN) | Frost on the summit's first puddle: it freezes into a step. |
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( | scAquaRockFreezeSecondPuddle , 48, 32, 46, FLAG_PUDDLE_B_FROZEN) | Frost on the second puddle: it freezes into a step. |
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( | scAquaRockFreezeThirdPuddle , 44, 44, 46, FLAG_PUDDLE_C_FROZEN) | Frost on the third puddle: it freezes into a step. |
DEFINE_AQUA_ROCK_DROP_AT_COLUMN( | scAquaRockDropFirstRock , FLAG_AQUA_ROCK_FIRST_ROCK_DROPPED, 52) | Move on the first rock to the stream: it drops in. |
DEFINE_AQUA_ROCK_DROP_AT_COLUMN( | scAquaRockDropSecondRock , FLAG_AQUA_ROCK_SECOND_ROCK_DROPPED, 58) | Move on the second rock to the stream: it drops in. |
void | scAquaRockDouseSummitWaterStone (Sint32 unused, Sint32 id) | Douse on the summit's Water Stone: the screen flashes four colours and turns white, the stone's bubbles start, the pool's metatiles change and the camera pans down to the pool, where rings of water start to rise over the way inside. |
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 | scAquaRockShakeMoai (ACTOR *actor) | A guardian moai's update as it moves aside: it shakes, the swing growing over 16 ticks to MOAI_SHAKE. |
void | scAquaRockStopShakingMoai (ACTOR *actor) | A guardian moai's update once it has moved: the swing dies away over 32 ticks. |
void | scAquaRockRockMoai (ACTOR *actor) | The last guardian moai's update: it keeps rocking gently, leaning a little. |
Sint32 | scInit (void) | Sets up the room the party comes into, Retreat leading back to the slopes' south shore. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
void | scAquaRockSinkInside (Sint32 exit) | Once the Water Stone is Doused, stepping on the way inside: the leader tumbles and spins down into the pool and leaves by exit, to the inside entrance. |
void | scAquaRockEnterSparklingPassage (Sint32 entrance) | The leader walks into the sparkling passage in a mist and leaves by entrance. |
Variables
| Name | Description | |
|---|---|---|
extern Uint32 | WadingSplashScript [] | A splash's script: it shows for 20 ticks, then is released. |
extern Uint32 | RippleScript [] | A ripple rises a quarter of a pixel a tick for 31 ticks, then is released. |
extern const Uint8 | AquaRockBubbleTiles [] | The bubbles' four pictures, compressed (graphics/aqua_rock/tiles.list.tsv). |
extern SCENE_REGION | AquaRockSlopesRegions [] | The slopes' exit regions: the two ways up to the summit. |
extern SCENE_REGION | AquaRockSummitRegions [] | The summit's exit regions: the ways back down to the slopes. |
extern ACTOR_PLACE | AquaRockPlacements [] | The scene's other rooms' actors. |
extern ACTOR_PLACE | AquaRockSlopesPlacements [] | The slopes' actors, in AQUA_ROCK_SLOPES_ACTOR_ID's order. |
extern ACTOR_PLACE | AquaRockSummitPlacements [] | The summit's actors, in AQUA_ROCK_SUMMIT_ACTOR_ID's order. |
extern CUE | AquaRockCues [] | The scene's other rooms' cues. |
extern CUE | AquaRockSlopesCues [] | The slopes' exits, currents and streams, Move on the pillars and Douse on the dry moai and the Water Stone. |
extern CUE | AquaRockSummitCues [] | The summit's way inside, exits, streams, puddles to Frost, rocks to drop and Water Stone to Douse. |
extern Sint16 | GroundParticleFrames [] | A drop's frames, five halfwords each, played from the last to the first: its offset from where it lands, x and y in pixels, its first tile, its OAM shape and its size. |
AQUA_ROCK_STREAM | AquaRockStreams [5] | The five moai streams scAquaRockUpdateStreams stops and starts: the four red moai's and the dry moai's. |
AQUA_ROCK_BUBBLES | AquaRockBubbles | |
extern Sint32 | AquaRockFirstStreamTimer | |
extern Sint32 | AquaRockSecondStreamTimer | |
extern Sint32 | AquaRockThirdStreamTimer | |
extern Sint32 | AquaRockFourthStreamTimer | |
Sint32 | AquaRockFishScript [] | A fish's script: it swims to random spots, resting between. |
Sint32 | AquaRockSlowFishScript [] | A fish's script: it swims to random spots, resting longer between. |
LATE_DATA const Sint32 * | FieldEffectDurationScripts [] | The field effects' three scripts by how long an effect lasts: short, medium and long. |
LATE_DATA Uint32 | SceneExits [] | The room has no exits of its own. |
LATE_DATA | Sint32 | The tick counts of the four red moai's streams' cycles (scAquaRockTimeStreams). |
Description
Aqua Rock's outside, the island south of the Apojii Islands, in two rooms of
this overlay. On the slopes, red moai pour streams that stop now and then, a
pillar Moved before one stops it for good, Douse fills a dry moai and turns a
Water Stone's streams back uphill, and the guardian moai step aside once the
Apojii's Aqua Stone is Doused. On the summit, Frost freezes puddles into
steps, Move drops two rocks into the stream, and Douse on its Water Stone
opens the way inside (aqua_rock_inside.c).
Macros in detail
STREAM_BUBBLE_COUNT
#define STREAM_BUBBLE_COUNT 64
The bubbles a stream carries along at once.
Referenced by scAquaRockDrawFallingBubbles() and scAquaRockDrawRisingBubbles().
Definition at line 18 of file aqua_rock.c.
FLAG_AQUA_ROCK_PILLAR_IN_HOLE
#define FLAG_AQUA_ROCK_PILLAR_IN_HOLE 0x950
Aqua Rock's lasting flags outside: the slopes' second pillar Moved into the hole in its ledge, the two rocks Moved into the summit's stream, the guardian moai stepped aside, the streams the slopes' Water Stone has turned back (each Douse turns them again), the summit's Water Stone Doused, and the dry moai filled.
Referenced by AquaRockSlopesCues, scAquaRockMovePillar() and scInit().
Definition at line 66 of file aqua_rock.c.
FLAG_AQUA_ROCK_FIRST_ROCK_DROPPED
#define FLAG_AQUA_ROCK_FIRST_ROCK_DROPPED 0x951
Referenced by AquaRockSummitCues and scInit().
Definition at line 67 of file aqua_rock.c.
FLAG_AQUA_ROCK_SECOND_ROCK_DROPPED
#define FLAG_AQUA_ROCK_SECOND_ROCK_DROPPED 0x952
Referenced by AquaRockSummitCues and scInit().
Definition at line 68 of file aqua_rock.c.
FLAG_AQUA_ROCK_MOAI_STEPPED_ASIDE
#define FLAG_AQUA_ROCK_MOAI_STEPPED_ASIDE 0x955
Referenced by scAquaRockMoaiStepAside() and scInit().
Definition at line 69 of file aqua_rock.c.
FLAG_AQUA_ROCK_STREAMS_TURNED_BACK
#define FLAG_AQUA_ROCK_STREAMS_TURNED_BACK 0xa68
Referenced by AquaRockSlopesCues, scAquaRockDouseWaterStone(), scAquaRockRideStreamUp() and scInit().
Definition at line 70 of file aqua_rock.c.
FLAG_AQUA_ROCK_SUMMIT_WATER_STONE_DOUSED
#define FLAG_AQUA_ROCK_SUMMIT_WATER_STONE_DOUSED 0xa69
Referenced by AquaRockSummitCues, scAquaRockDouseSummitWaterStone() and scInit().
Definition at line 71 of file aqua_rock.c.
FLAG_AQUA_ROCK_DRY_MOAI_FILLED
#define FLAG_AQUA_ROCK_DRY_MOAI_FILLED 0xa6b
Referenced by AquaRockSlopesCues, scAquaRockDouseDryMoai(), scAquaRockSetUpStreams() and scInit().
Definition at line 72 of file aqua_rock.c.
FLAG_PILLAR_COLUMN
#define FLAG_PILLAR_COLUMN FLAG_AREA_TEMP(0x10)
While the party is on the island: the metatile of the pillar Move sets before the top's red moai, kept as two bytes, and whether it stands before the west or the east one, which stops that moai's stream.
Referenced by scAquaRockMovePillar() and scInit().
Definition at line 76 of file aqua_rock.c.
FLAG_PILLAR_ROW
#define FLAG_PILLAR_ROW FLAG_AREA_TEMP(0x18)
Referenced by scAquaRockMovePillar() and scInit().
Definition at line 77 of file aqua_rock.c.
FLAG_PILLAR_BEFORE_WEST_MOAI
#define FLAG_PILLAR_BEFORE_WEST_MOAI FLAG_AREA_TEMP(0x20)
Referenced by AquaRockSlopesCues, scAquaRockMovePillar(), scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 78 of file aqua_rock.c.
FLAG_PILLAR_BEFORE_EAST_MOAI
#define FLAG_PILLAR_BEFORE_EAST_MOAI FLAG_AREA_TEMP(0x21)
Referenced by AquaRockSlopesCues, scAquaRockMovePillar(), scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 79 of file aqua_rock.c.
FLAG_WEST_MOAI_STREAM_STOPPED
#define FLAG_WEST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x00)
This visit's flags. Each of the four red moai's streams, stopped
(scAquaRockTimeStreams).
Referenced by scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 82 of file aqua_rock.c.
FLAG_EAST_MOAI_STREAM_STOPPED
#define FLAG_EAST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x01)
Referenced by scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 83 of file aqua_rock.c.
FLAG_LOWER_WEST_MOAI_STREAM_STOPPED
#define FLAG_LOWER_WEST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x02)
Referenced by scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 84 of file aqua_rock.c.
FLAG_LOWER_EAST_MOAI_STREAM_STOPPED
#define FLAG_LOWER_EAST_MOAI_STREAM_STOPPED FLAG_SCENE_TEMP(0x03)
Referenced by scAquaRockSetUpStreams() and scAquaRockTimeStreams().
Definition at line 85 of file aqua_rock.c.
FLAG_PUDDLE_A_FROZEN
#define FLAG_PUDDLE_A_FROZEN FLAG_SCENE_TEMP(0x21)
Frost on each of the summit's three puddles.
Referenced by AlhafraCues, AlhafraPuddles, AquaRockSummitCues and scInit().
Definition at line 87 of file aqua_rock.c.
FLAG_PUDDLE_B_FROZEN
#define FLAG_PUDDLE_B_FROZEN FLAG_SCENE_TEMP(0x22)
Referenced by AlhafraCues, AlhafraPuddles, AquaRockSummitCues and scInit().
Definition at line 88 of file aqua_rock.c.
FLAG_PUDDLE_C_FROZEN
#define FLAG_PUDDLE_C_FROZEN FLAG_SCENE_TEMP(0x23)
Referenced by AlhafraCues, AlhafraPuddles, AquaRockSummitCues and scInit().
Definition at line 89 of file aqua_rock.c.
WEST_MOAI_COLUMN
#define WEST_MOAI_COLUMN 7
The metatiles before the top's west and east red moai, where the pillar stops a stream; the column of the hole in the ledge; and the column of the summit's stream, where a rock Moved drops in.
Referenced by scAquaRockMovePillar().
Definition at line 94 of file aqua_rock.c.
EAST_MOAI_COLUMN
#define EAST_MOAI_COLUMN 15
Referenced by scAquaRockMovePillar().
Definition at line 95 of file aqua_rock.c.
MOAI_FRONT_ROW
#define MOAI_FRONT_ROW 35
Referenced by scAquaRockMovePillar().
Definition at line 96 of file aqua_rock.c.
PILLAR_HOLE_COLUMN
#define PILLAR_HOLE_COLUMN 32
Referenced by scAquaRockMovePillar().
Definition at line 97 of file aqua_rock.c.
ROCK_STREAM_COLUMN
#define ROCK_STREAM_COLUMN 53
Definition at line 98 of file aqua_rock.c.
CUE_DROP_DOWN_FALLS
#define CUE_DROP_DOWN_FALLS 44
The cue scAquaRockStepIntoCurrent raises for a leader the current carries
over the edge of the falls (scAquaRockDropDownFalls).
Referenced by AquaRockSlopesCues and scAquaRockStepIntoCurrent().
Definition at line 102 of file aqua_rock.c.
EFFECT_SET_MODE
#define EFFECT_SET_MODE fdActorSelectAnimation
Referenced by EFFECT_SPAWN.
Definition at line 221 of file aqua_rock.c.
EFFECT_SET_SCRIPT
#define EFFECT_SET_SCRIPT fdActorStartScript
Referenced by EFFECT_SPAWN.
Definition at line 222 of file aqua_rock.c.
EFFECT_SPRITE_PRIORITY
#define EFFECT_SPRITE_PRIORITY
Definition at line 223 of file aqua_rock.c.
STREAM_NO_WAVE
#define STREAM_NO_WAVE 9999
AQUA_ROCK_STREAM.waveRow for no wave.
Referenced by scAquaRockSetUpStreams().
Definition at line 274 of file aqua_rock.c.
STREAM_CYCLE_TICKS
#define STREAM_CYCLE_TICKS 240
The ticks of a red moai's stream's cycle, and the last of them it stops for.
Referenced by scAquaRockTimeStreams().
Definition at line 506 of file aqua_rock.c.
STREAM_STOP_TICKS
#define STREAM_STOP_TICKS 90
Referenced by scAquaRockTimeStreams().
Definition at line 507 of file aqua_rock.c.
STREAM_SET
#define STREAM_SET(stream,
Sets up a stream (AQUA_ROCK_STREAM) to show its flag's opposite, so that its
first update runs a wave to the flag's state.
Referenced by scAquaRockSetUpStreams().
Definition at line 560 of file aqua_rock.c.
DEFINE_AQUA_ROCK_FREEZE_PUDDLE
#define DEFINE_AQUA_ROCK_FREEZE_PUDDLE(name, sourceX, row, column, flag)
Defines Frost on a puddle: it freezes into a step, its metatile taking the attributes of the frozen metatile at (sourceX, row), and its flag is set.
Definition at line 1013 of file aqua_rock.c.
DEFINE_AQUA_ROCK_DROP_AT_COLUMN
#define DEFINE_AQUA_ROCK_DROP_AT_COLUMN(name, flag, row)
Defines Move on a rock: pushed to the stream's column it drops in, its flag
is set and its metatile in row takes the attributes of the stream's
rock-filled metatile.
Definition at line 1038 of file aqua_rock.c.
MOAI_SHAKE
#define MOAI_SHAKE (TRIG_TURN / 128)
The farthest a guardian moai rocks either way as it shakes.
Referenced by scAquaRockShakeMoai() and scAquaRockStopShakingMoai().
Definition at line 1226 of file aqua_rock.c.
MOAI_ROCK_DIVISOR
#define MOAI_ROCK_DIVISOR 64
The last guardian moai rocks up to a sixty-fourth of a turn either way: the sine of its phase, which as a rotation reaches a whole turn, divided by this.
Referenced by scAquaRockRockMoai().
Definition at line 1260 of file aqua_rock.c.
MOAI_LEAN
#define MOAI_LEAN (TRIG_TURN * 3 / 128)
The last guardian moai's lean, about which it rocks.
Referenced by scAquaRockRockMoai().
Definition at line 1262 of file aqua_rock.c.
GROUND_PARTICLE_FRAMES_SECTION
#define GROUND_PARTICLE_FRAMES_SECTION LATE_DATA
Referenced by GroundParticleFrames.
Definition at line 1893 of file aqua_rock.c.
SCENE_ENTRANCES_SECTION
#define SCENE_ENTRANCES_SECTION LATE_DATA
Referenced by LATE_DATA and SceneEntrances.
Definition at line 1902 of file aqua_rock.c.
Enumerations in detail
anonymous enum
enum { STREAMS_DOWNHILL_ANIMATION, STREAMS_UPHILL_ANIMATION }
The slopes' map animations of the streams their Water Stone turns, two each: running downhill, and turned back to run uphill.
| Enumerator | Value | Description |
|---|---|---|
STREAMS_DOWNHILL_ANIMATION | 5 | |
STREAMS_UPHILL_ANIMATION | 7 |
Definition at line 106 of file aqua_rock.c.
anonymous enum
enum { METATILE_BEHAVIOR_WEST_MOAI_STREAM, METATILE_BEHAVIOR_EAST_MOAI_STREAM, METATILE_BEHAVIOR_LOWER_WEST_MOAI_STREAM, METATILE_BEHAVIOR_LOWER_EAST_MOAI_STREAM, … }
The metatile behaviours the rooms' cue tables answer: the streams the top's west and east red moai pour, the heads of the two lower red moai's streams, the streams that only ever run downhill, the streams the slopes' Water Stone turns back, and the mouth of the sparkling passage.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_WEST_MOAI_STREAM | 30 | |
METATILE_BEHAVIOR_EAST_MOAI_STREAM | 31 | |
METATILE_BEHAVIOR_LOWER_WEST_MOAI_STREAM | 32 | |
METATILE_BEHAVIOR_LOWER_EAST_MOAI_STREAM | 33 | |
METATILE_BEHAVIOR_DOWNHILL_STREAM | 40 | |
METATILE_BEHAVIOR_TURNING_STREAM | 41 | |
METATILE_BEHAVIOR_SPARKLING_PASSAGE | 4 |
Definition at line 116 of file aqua_rock.c.
AQUA_ROCK_SLOPES_ACTOR_ID
enum AQUA_ROCK_SLOPES_ACTOR_ID
The slopes (AquaRockSlopesPlacements).
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_MOAI | ACTOR_FIRST_PLACED | The slopes' sixteen moai: four red ones, the first two at the top, then the dry one, two green ones and nine green ones lower down that share one sprite. |
ACTOR_DRY_MOAI | ACTOR_FIRST_MOAI + 4 | The grey moai Douse |
ACTOR_FIRST_BOTTOM_MOAI | ACTOR_FIRST_MOAI + 7 | fills, so that it pours a stream (scAquaRockDouseDryMoai). |
ACTOR_FIRST_GUARDIAN_MOAI | ACTOR_FIRST_MOAI + 9 | The five guardian moai that stand in the way in, until they step aside together |
ACTOR_LAST_MOAI | ACTOR_FIRST_MOAI + 15 | (scAquaRockMoaiStepAside). |
ACTOR_MOAI_PILLAR | The pillar Move sets | |
ACTOR_LEDGE_PILLAR | before the top's red moai, and the pillar on the ledge Move pushes into its hole. | |
ACTOR_WATER_STONE | The Water Stone whose Douse turns the streams back uphill. | |
ACTOR_FIRST_FISH | The three fish of the pools (AquaRockFishScript and AquaRockSlowFishScript). |
Definition at line 128 of file aqua_rock.c.
AQUA_ROCK_SUMMIT_ACTOR_ID
enum AQUA_ROCK_SUMMIT_ACTOR_ID
The summit (AquaRockSummitPlacements).
| Enumerator | Value | Description |
|---|---|---|
ACTOR_SUMMIT_WATER_STONE | ACTOR_FIRST_PLACED | The Water Stone whose Douse opens the way inside. |
ACTOR_PUDDLE_A | The three puddles Frost freezes into steps. | |
ACTOR_PUDDLE_B | ||
ACTOR_PUDDLE_C | ||
ACTOR_FIRST_ROCK | The two rocks Move pushes into the stream. | |
ACTOR_SECOND_ROCK | ||
ACTOR_BUBBLE_MARKER | An unseen marker the bubbles and sparkles rise from once the streams are turned back. | |
ACTOR_WAY_INSIDE | An unseen marker in the pool where, once its Water Stone is Doused, rings of water rise and the leader sinks inside (scAquaRockSinkInside). |
Definition at line 161 of file aqua_rock.c.
AQUA_ROCK_SUMMIT_WAY
enum AQUA_ROCK_SUMMIT_WAY
The summit's ways between its west and east halves, which its one map holds, each named by the half it leaves; a way's exit and the entrance at its foot share its number.
| Enumerator | Value | Description |
|---|---|---|
WAY_SUMMIT_WEST_TO_EAST | 4 | |
WAY_SUMMIT_EAST_TO_WEST |
Definition at line 182 of file aqua_rock.c.
Functions in detail
scAquaRockTurnFish
void scAquaRockTurnFish(ACTOR *actor)
A fish's update: its sprite turns with its facing.
References Sint32.
Referenced by scAquaRockStartFish().
Definition at lines 45 and 362 of file aqua_rock.c.
scAquaRockFlowSparkleUpStream
void scAquaRockFlowSparkleUpStream(ACTOR *actor)
Unused: a sparkle's update. It rises to the water's surface and then flows north up the stream, until it reaches the top or the stream's end.
References fdActorRelease() and fdMapGetTerrainHeight().
Referenced by scAquaRockSpawnSparkleAtRandom().
Definition at lines 46 and 397 of file aqua_rock.c.
scAquaRockDrawRisingBubbles
void scAquaRockDrawRisingBubbles(void)
Each tick, for bubbles going up: now and then one starts from the actor they come from, and each rises up the stream, north, until it reaches the top; those in view are drawn.
References AquaRockBubbles, fdMapGetTerrainHeight(), fdMapStateView(), Sint32, syOAMAddSpriteAtDepth(), syRandom() and VramCacheEntries.
Referenced by scAquaRockDrawBubbles().
Definition at lines 47 and 1645 of file aqua_rock.c.
scAquaRockDrawFallingBubbles
void scAquaRockDrawFallingBubbles(void)
Each tick, for bubbles going down: now and then one starts from the actor they come from, and each falls down the stream, south, until it reaches the bottom; those in view are drawn.
References AquaRockBubbles, fdMapGetTerrainHeight(), fdMapStateView(), Sint32, syOAMAddSpriteAtDepth(), syRandom() and VramCacheEntries.
Referenced by scAquaRockDrawBubbles().
Definition at lines 48 and 1716 of file aqua_rock.c.
scAquaRockDrawBubbles
void scAquaRockDrawBubbles(void)
Each tick: the bubbles go up or down the stream, as their direction says.
References AquaRockBubbles, scAquaRockDrawFallingBubbles() and scAquaRockDrawRisingBubbles().
Referenced by scAquaRockStartBubbles().
Definition at lines 49 and 1780 of file aqua_rock.c.
scAquaRockCreateActor
ACTOR *scAquaRockCreateActor(Sint32 x, Sint32 y, Sint32 z, Sint32 kind)
Unused: creates an unseen, still actor of kind at a point, untargeted and
drawn underfoot.
References fdActorSetSpriteColor(), fdActorSetSpriteFlags(), scSetActorSpritePriority(), Sint32 and syImportActorCreate().
Definition at line 201 of file aqua_rock.c.
scAquaRockSetBubbleAnchor
void scAquaRockSetBubbleAnchor(Sint32 id)
Sets the actor the bubbles come from, or with 0 none: they fall from the summit's Water Stone and rise from any other.
References AquaRockBubbles, fdActorGetById() and Sint32.
Referenced by scAquaRockDouseSummitWaterStone(), scAquaRockDouseWaterStone() and scInit().
Definition at lines 229 and 1806 of file aqua_rock.c.
scAquaRockAddMoaiWater
void scAquaRockAddMoaiWater(Sint32 id)
Gives a moai its water: the pool in the top of its head, pouring from its mouth.
References fdActorGetById(), fdActorSelectAnimation(), fdSpriteAddAnimation() and Sint32.
Referenced by scAquaRockDouseDryMoai() and scInit().
Definition at lines 232 and 1529 of file aqua_rock.c.
scAquaRockKeepLeaderPriority
void scAquaRockKeepLeaderPriority(void)
On the slopes Felix is drawn behind the falls while a current carries him, and in front of them otherwise. It runs every tick, giving his sprite priority 2 while he is carried and 1 otherwise.
References fdActorGetById(), fdPartyGetLeaderActor(), MainRoutineStateWork and Sint32.
Referenced by scInit().
Definition at lines 235 and 1133 of file aqua_rock.c.
scAquaRockStartBubbles
Sint32 scAquaRockStartBubbles(void)
Clears the bubbles, loads their tiles into VRAM and starts their drawing;
returns the drawing event (sySetEvent).
References AquaRockBubbles, AquaRockBubbleTiles, scAquaRockDrawBubbles(), Sint32, syDecompressTaggedLZ(), syHeapAllocate(), syHeapCallAlternatePool(), syHeapRelease(), sySetEvent(), syVRAMCacheFindFreeEntry() and syVRAMCacheLoad().
Referenced by scInit().
Definition at lines 236 and 1790 of file aqua_rock.c.
scAquaRockMoaiStepAside
void scAquaRockMoaiStepAside(void)
Arriving by the north way, as Douse wakes the Apojii Islands' Aqua Stone: the five guardian moai shake and move aside into a row clear of the way in, the last left rocking, and the party goes back to the Apojii Islands where it stood.
References fdActorGetById(), fdActorSetDestination(), fdActorSetDestinationById(), fdMapCopyMetatilesRect(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scAquaRockRockMoai(), scAquaRockShakeMoai(), scAquaRockStopShakingMoai(), Sint32, syGameFlagClear(), syGameFlagSet(), syImportScriptSetExitRequest(), syRandom() and sySoundPlay().
Referenced by scInit().
Definition at lines 237 and 1277 of file aqua_rock.c.
scAquaRockSetUpStreams
void scAquaRockSetUpStreams(void)
Sets the five streams with their pictures, metatiles and flags, stops at once the top two the pillar stands before, and starts the streams' events.
References AquaRockStreams, fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), scAquaRockTimeStreams(), scAquaRockUpdateStreams(), syGameFlagClear(), syGameFlagGet(), syGameFlagSet(), sySetEvent() and sySetTickEvent().
Referenced by scInit().
Definition at lines 238 and 588 of file aqua_rock.c.
scAquaRockArriveFromPassage
void scAquaRockArriveFromPassage(void)
Arriving from the sparkling passage, unless the party's place is kept: the leader walks out of the mist.
References fdActorGetById(), fdActorSetHorizontalPosWithTerrain(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorWalkByAndWaitById(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptNoOperation(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scActorEmitMist(), Sint32, syGameFlagGet() and sySoundPlay().
Referenced by scInit().
Definition at lines 239 and 1607 of file aqua_rock.c.
scAquaRockArriveFromInside
void scAquaRockArriveFromInside(void)
Arriving from the inside entrance below: the leader spins up out of the pool and lands, going on north or south by the key held.
References fdActorGetById(), fdActorMoveToAndWaitById(), fdActorSetSpriteFlags(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), fdScriptStartScreenTransition(), MainRoutineStateWork, PerWork, scActorSpawnWadingSplash(), Sint32, sySoundPlay() and sySynch().
Referenced by scInit().
Definition at lines 240 and 1155 of file aqua_rock.c.
scAquaRockArriveUpStream
void scAquaRockArriveUpStream(void)
Arriving by the slopes' stream turned back: it throws the leader spinning up out of the water, and he walks out onto the bank.
References fdActorGetById(), fdActorMoveToAndWaitById(), fdActorSetSpriteFlags(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), fdScriptStartScreenTransition(), MainRoutineStateWork, scActorSpawnWadingSplash(), Sint32 and sySynch().
Referenced by scInit().
Definition at lines 241 and 1195 of file aqua_rock.c.
scAquaRockStartFish
Sint32 scAquaRockStartFish(ACTOR *actor)
A fish's script call: takes away its shadow and gives it its speed and its turning update.
References fdActorSetSpriteFlags(), scAquaRockTurnFish() and Sint32.
Referenced by AquaRockFishScript and AquaRockSlowFishScript.
Definition at lines 245 and 374 of file aqua_rock.c.
scAquaRockRideStreamUp
void scAquaRockRideStreamUp(void)
Felix, walking into one of the streams the slopes' Water Stone turns back, is
carried up it, splashing, once the stone has been Doused; at the head of the
slopes' stream he spins up out of the water and away to the summit. Until
then, or once Doused again, the stream carries him down instead
(scLeaderFlowWithStream). It runs every tick he stands on the stream's
metatiles, moving him and the camera two pixels north, and leaping him up
each ledge the stream climbs.
References fdActorGetById(), fdActorSelectAnimation(), fdActorSetAttachedEffect(), fdActorSetMoveTarget(), fdActorSetSpriteFlags(), fdActorWaitForMove(), fdMapGridCheckCollision(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, result, scActorSpawnWadingSplash(), scLeaderFlowWithStream(), Sint32, syGameFlagGet(), syImportScriptSetExitRequest(), syRandom(), sySynch() and TickCount.
Referenced by AquaRockSlopesCues and AquaRockSummitCues.
Definition at lines 246 and 837 of file aqua_rock.c.
scAquaRockStepIntoCurrent
void scAquaRockStepIntoCurrent(void)
Felix, stepping into the stream one of the red moai pours, is swept away down
the slopes, tumbling over the ledges, and where it carries him over the edge
of the falls he drops down them, flailing, to the pool below
(scAquaRockDropDownFalls). It runs every tick he stands on the stream's
metatiles while it flows; the top two moai's streams take him only while the
pillar does not stop them.
References fdActorGetById(), MainRoutineStateWork, scAquaRockGetMetatileAttribute(), scLeaderFlowWithStream() and Sint32.
Referenced by AquaRockSlopesCues.
Definition at lines 247 and 941 of file aqua_rock.c.
scAquaRockDouseDryMoai
void scAquaRockDouseDryMoai(void)
Douse on the dry moai: it fills, turns blue and pours, and its stream down the slopes starts to flow.
References fdActorGetById(), fdActorSetSpriteColor(), fdMapGridCopyDrawnPicturesRect(), fdMapGridCopyMetatileAttributes(), scAquaRockAddMoaiWater() and syGameFlagSet().
Referenced by AquaRockSlopesCues.
Definition at lines 249 and 971 of file aqua_rock.c.
scAquaRockDropDownFalls
void scAquaRockDropDownFalls(void)
The leader drops down the falls, flailing, and lands, for at most three seconds.
References fdActorGetById(), fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdEffectSetAttached(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), MainRoutineStateWork, Sint32 and sySynch().
Referenced by AquaRockSlopesCues.
Definition at lines 251 and 983 of file aqua_rock.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 281 of file aqua_rock.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
References AquaRockSlopesRegions, AquaRockSummitRegions and MainRoutineStateWork.
Definition at line 286 of file aqua_rock.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 297 of file aqua_rock.c.
scAquaRockPickRandomSpot
Sint32 scAquaRockPickRandomSpot(ACTOR *actor)
A fish's script call: picks a random spot ahead within 16 pixels of its home and swims there; after three misses it turns around.
References fdActorSetMoveTarget(), Sint32, syRandom() and syVectorAddPolarOffset().
Referenced by AquaRockFishScript and AquaRockSlowFishScript.
Definition at line 304 of file aqua_rock.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References AquaRockPlacements, AquaRockSlopesPlacements, AquaRockSummitPlacements and MainRoutineStateWork.
Definition at line 384 of file aqua_rock.c.
scAquaRockSpawnSparkleAtRandom
void scAquaRockSpawnSparkleAtRandom(ACTOR *actor)
Unused: now and then a sparkle starts up the stream from somewhere along the actor's 48-pixel width.
References fdActorSetSpriteFlags(), scAquaRockFlowSparkleUpStream(), Sint32, syImportActorCreate() and syRandom().
Definition at line 412 of file aqua_rock.c.
scAquaRockUpdateStreams
void scAquaRockUpdateStreams(void)
A moai's stream stops or starts as a wave running down it from the moai's mouth, a row every four ticks. It runs every tick, sending a wave down each stream whose flag has changed.
References AquaRockStreams, fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), Sint32 and syGameFlagGet().
Referenced by scAquaRockSetUpStreams().
Definition at line 435 of file aqua_rock.c.
scAquaRockTimeStreams
void scAquaRockTimeStreams(void)
The four red moai's streams flow for two and a half seconds and stop for one
and a half, over and over, and the top two stay stopped while the pillar
stands before them. It runs every tick while no script runs, setting each
stream's stopped flag, which scAquaRockUpdateStreams turns into the wave down
the stream.
References AquaRockFirstStreamTimer, AquaRockFourthStreamTimer, AquaRockSecondStreamTimer, AquaRockThirdStreamTimer, syGameFlagClear(), syGameFlagGet() and syGameFlagSet().
Referenced by scAquaRockSetUpStreams().
Definition at line 514 of file aqua_rock.c.
scAquaRockFlashMoai
void scAquaRockFlashMoai(ACTOR *actor)
Unused: a moai's update while it flashes, grey every other two ticks.
References fdActorSetSpriteColorMode() and TickCount.
Definition at line 704 of file aqua_rock.c.
scAquaRockStopFlashing
void scAquaRockStopFlashing(ACTOR *actor)
A flashing actor's last update: its sprite's colour back to normal.
References fdActorSetSpriteColorMode().
Referenced by scAquaRockDouseSummitWaterStone(), scAquaRockDouseWaterStone() and scInit().
Definition at line 713 of file aqua_rock.c.
scAquaRockDouseWaterStone
void scAquaRockDouseWaterStone(Sint32 unused, Sint32 id)
Douse on the slopes' Water Stone: it flickers, the screen flashes four colours and turns white, and the streams turn back to run uphill, bubbles rising from the stone; Doused again, they run downhill once more.
References fdActorGetById(), fdMapGridCopyMetatiles(), fdPaletteFadeSetTarget(), fdPaletteFadeStartInterpolation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptStart(), fdScriptWait(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), scActorFlashWhite(), scAquaRockSetBubbleAnchor(), scAquaRockStopFlashing(), scGroundParticlesSetAnchor(), Sint32, syGameFlagClear(), syGameFlagGet(), syGameFlagSet(), syRandom() and sySynch().
Referenced by AquaRockSlopesCues.
Definition at line 722 of file aqua_rock.c.
scAquaRockMovePillar
void scAquaRockMovePillar(Sint32 unused, Sint32 id)
Move on a pillar. The pillar by the top's red moai keeps its metatile in the area's flags, and stopped before one of them stops that moai's stream; the ledge's pillar, pushed onto its hole, drops into it.
References fdActorGetById(), fdScriptClearFlag(), Sint32, syGameFlagClear(), syGameFlagSet(), syGameFlagSetByte() and sySynch().
Referenced by AquaRockSlopesCues.
Definition at line 783 of file aqua_rock.c.
scActorWaitBelowHeight
void scActorWaitBelowHeight(ACTOR *actor, FIXED height)
Unused: waits until the actor has come down to height, a second at most.
References Sint32 and sySynch().
Definition at line 817 of file aqua_rock.c.
scAquaRockGetMetatileAttribute
static inline Uint8 scAquaRockGetMetatileAttribute(MAP_METATILE *metatiles, Sint32 row, Sint32 column)
The attribute byte of a metatile of a layer.
References Sint32.
Referenced by scAquaRockStepIntoCurrent().
Definition at line 927 of file aqua_rock.c.
scAquaRockFreezeFirstPuddle
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( scAquaRockFreezeFirstPuddle, 42, 32, 44, FLAG_PUDDLE_A_FROZEN)
Frost on the summit's first puddle: it freezes into a step.
Referenced by AquaRockSummitCues.
Definition at line 1024 of file aqua_rock.c.
scAquaRockFreezeSecondPuddle
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( scAquaRockFreezeSecondPuddle, 48, 32, 46, FLAG_PUDDLE_B_FROZEN)
Frost on the second puddle: it freezes into a step.
Referenced by AquaRockSummitCues.
Definition at line 1028 of file aqua_rock.c.
scAquaRockFreezeThirdPuddle
DEFINE_AQUA_ROCK_FREEZE_PUDDLE( scAquaRockFreezeThirdPuddle, 44, 44, 46, FLAG_PUDDLE_C_FROZEN)
Frost on the third puddle: it freezes into a step.
Referenced by AquaRockSummitCues.
Definition at line 1032 of file aqua_rock.c.
scAquaRockDropFirstRock
DEFINE_AQUA_ROCK_DROP_AT_COLUMN(scAquaRockDropFirstRock, FLAG_AQUA_ROCK_FIRST_ROCK_DROPPED, 52)
Move on the first rock to the stream: it drops in.
Referenced by AquaRockSummitCues.
Definition at line 1053 of file aqua_rock.c.
scAquaRockDropSecondRock
DEFINE_AQUA_ROCK_DROP_AT_COLUMN(scAquaRockDropSecondRock, FLAG_AQUA_ROCK_SECOND_ROCK_DROPPED, 58)
Move on the second rock to the stream: it drops in.
Referenced by AquaRockSummitCues.
Definition at line 1058 of file aqua_rock.c.
scAquaRockDouseSummitWaterStone
void scAquaRockDouseSummitWaterStone(Sint32 unused, Sint32 id)
Douse on the summit's Water Stone: the screen flashes four colours and turns white, the stone's bubbles start, the pool's metatiles change and the camera pans down to the pool, where rings of water start to rise over the way inside.
References fdActorGetById(), fdActorSetSpriteFlags(), fdCameraWaitForArrival(), fdMapCopyMetatileAttributeRect(), fdMapGridCopyDrawnPicturesRect(), fdPaletteFadeApplyTarget(), fdPaletteFadeSetTarget(), fdPaletteFadeStartInterpolation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptStart(), fdScriptWait(), scActorEmitRipples(), scActorFlashWhite(), scAquaRockSetBubbleAnchor(), scAquaRockStopFlashing(), scGroundParticlesSetAnchor(), Sint32, syGameFlagSet(), syRandom(), sySoundPlay() and sySynch().
Referenced by AquaRockSummitCues.
Definition at line 1066 of file aqua_rock.c.
scGetCues
const CUE *scGetCues(void)
References AquaRockCues, AquaRockSlopesCues, AquaRockSummitCues and MainRoutineStateWork.
Definition at line 1119 of file aqua_rock.c.
scAquaRockShakeMoai
void scAquaRockShakeMoai(ACTOR *actor)
A guardian moai's update as it moves aside: it shakes, the swing growing over
16 ticks to MOAI_SHAKE.
References sySin().
Referenced by scAquaRockMoaiStepAside().
Definition at line 1230 of file aqua_rock.c.
scAquaRockStopShakingMoai
void scAquaRockStopShakingMoai(ACTOR *actor)
A guardian moai's update once it has moved: the swing dies away over 32 ticks.
References sySin().
Referenced by scAquaRockMoaiStepAside().
Definition at line 1244 of file aqua_rock.c.
scAquaRockRockMoai
void scAquaRockRockMoai(ACTOR *actor)
The last guardian moai's update: it keeps rocking gently, leaning a little.
References sySin().
Referenced by scAquaRockMoaiStepAside() and scInit().
Definition at line 1265 of file aqua_rock.c.
scInit
Sint32 scInit(void)
Sets up the room the party comes into, Retreat leading back to the slopes' south shore. On the slopes: the moai's colours and water, the pillars where they were left, the guardian moai aside once they have moved, the streams, and the bubbles and sparkles of a Doused Water Stone. On the summit: its frozen puddles and dropped rocks, its Water Stone's bubbles and the way inside it opens, and the party's arrival up the stream or from inside.
References fdActorGetById(), fdActorSetAnimationById(), fdActorSetHorizontalPosWithTerrain(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdGroundParticlesStart(), fdMapCopyMetatileAttributeRect(), fdMapGridCopyDrawnPicturesRect(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdMapGridCopyMetatilesLayered(), fdPartyGetLeaderActor(), fdQueueMusic(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), MainRoutineStateWork, scActorEmitRipples(), scAquaRockAddMoaiWater(), scAquaRockArriveFromInside(), scAquaRockArriveFromPassage(), scAquaRockArriveUpStream(), scAquaRockKeepLeaderPriority(), scAquaRockMoaiStepAside(), scAquaRockRockMoai(), scAquaRockSetBubbleAnchor(), scAquaRockSetUpStreams(), scAquaRockStartBubbles(), scAquaRockStopFlashing(), scGroundParticlesSetAnchor(), Sint32, syGameFlagGet(), syGameFlagGetByte() and sySetEvent().
Definition at line 1336 of file aqua_rock.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 1518 of file aqua_rock.c.
scAquaRockSinkInside
void scAquaRockSinkInside(Sint32 exit)
Once the Water Stone is Doused, stepping on the way inside: the leader
tumbles and spins down into the pool and leaves by exit, to the inside
entrance.
References fdActorGetById(), fdActorSelectAnimation(), fdActorSetSpritePriority(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptStart(), MainRoutineStateWork, scActorSpawnWadingSplash(), Sint32, syImportScriptSetExitRequest(), sySoundPlay() and sySynch().
Referenced by AquaRockSummitCues.
Definition at line 1548 of file aqua_rock.c.
scAquaRockEnterSparklingPassage
void scAquaRockEnterSparklingPassage(Sint32 entrance)
The leader walks into the sparkling passage in a mist and leaves by
entrance.
References fdActorGetById(), fdActorSetAnimationById(), fdActorSetDestinationOffsetById(), fdActorSetSpriteColor(), fdActorSetSpriteFlags(), fdActorWaitForMoveById(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scActorEmitMist(), Sint32, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by AquaRockSlopesCues.
Definition at line 1582 of file aqua_rock.c.
Variables in detail
WadingSplashScript
extern Uint32 WadingSplashScript[]
Uint32 WadingSplashScript[]
A splash's script: it shows for 20 ticks, then is released.
Referenced by scActorSpawnWadingSplash().
Definition at lines 51 and 1878 of file aqua_rock.c.
AquaRockBubbleTiles
extern const Uint8 AquaRockBubbleTiles[]
The bubbles' four pictures, compressed (graphics/aqua_rock/tiles.list.tsv).
Referenced by scAquaRockStartBubbles().
Definition at line 54 of file aqua_rock.c.
AquaRockSlopesRegions
extern SCENE_REGION AquaRockSlopesRegions[]
LATE_DATA SCENE_REGION AquaRockSlopesRegions[]
The slopes' exit regions: the two ways up to the summit.
Referenced by scGetExitRegions().
Definition at lines 55 and 1906 of file aqua_rock.c.
AquaRockSummitRegions
extern SCENE_REGION AquaRockSummitRegions[]
LATE_DATA SCENE_REGION AquaRockSummitRegions[]
The summit's exit regions: the ways back down to the slopes.
Referenced by scGetExitRegions().
Definition at lines 56 and 1915 of file aqua_rock.c.
AquaRockPlacements
extern ACTOR_PLACE AquaRockPlacements[]
LATE_DATA ACTOR_PLACE AquaRockPlacements[]
The scene's other rooms' actors.
Referenced by scGetActorPlacements().
Definition at lines 57 and 1966 of file aqua_rock.c.
AquaRockSlopesPlacements
extern ACTOR_PLACE AquaRockSlopesPlacements[]
LATE_DATA ACTOR_PLACE AquaRockSlopesPlacements[]
The slopes' actors, in AQUA_ROCK_SLOPES_ACTOR_ID's order.
References AquaRockFishScript, AquaRockSlowFishScript and Sint32.
Referenced by scGetActorPlacements().
Definition at lines 58 and 1971 of file aqua_rock.c.
AquaRockSummitPlacements
extern ACTOR_PLACE AquaRockSummitPlacements[]
LATE_DATA ACTOR_PLACE AquaRockSummitPlacements[]
The summit's actors, in AQUA_ROCK_SUMMIT_ACTOR_ID's order.
Referenced by scGetActorPlacements().
Definition at lines 59 and 2020 of file aqua_rock.c.
AquaRockCues
extern CUE AquaRockCues[]
LATE_DATA CUE AquaRockCues[]
The scene's other rooms' cues.
Referenced by scGetCues().
Definition at lines 188 and 2047 of file aqua_rock.c.
AquaRockSlopesCues
extern CUE AquaRockSlopesCues[]
LATE_DATA CUE AquaRockSlopesCues[]
The slopes' exits, currents and streams, Move on the pillars and Douse on the dry moai and the Water Stone.
References scAquaRockDouseDryMoai(), scAquaRockDouseWaterStone(), scAquaRockDropDownFalls(), scAquaRockEnterSparklingPassage(), scAquaRockMovePillar(), scAquaRockRideStreamUp(), scAquaRockStepIntoCurrent() and scLeaderFlowWithStream().
Referenced by scGetCues().
Definition at lines 189 and 2053 of file aqua_rock.c.
AquaRockSummitCues
extern CUE AquaRockSummitCues[]
LATE_DATA CUE AquaRockSummitCues[]
The summit's way inside, exits, streams, puddles to Frost, rocks to drop and Water Stone to Douse.
References scAquaRockDouseSummitWaterStone(), scAquaRockDropFirstRock(), scAquaRockDropSecondRock(), scAquaRockFreezeFirstPuddle(), scAquaRockFreezeSecondPuddle(), scAquaRockFreezeThirdPuddle(), scAquaRockRideStreamUp(), scAquaRockSinkInside() and scLeaderFlowWithStream().
Referenced by scGetCues().
Definition at lines 190 and 2084 of file aqua_rock.c.
AquaRockStreams
AQUA_ROCK_STREAM AquaRockStreams[5]
The five moai streams scAquaRockUpdateStreams stops and starts: the four red
moai's and the dry moai's.
Referenced by scAquaRockSetUpStreams() and scAquaRockUpdateStreams().
Definition at line 278 of file aqua_rock.c.
AquaRockBubbles
AQUA_ROCK_BUBBLES AquaRockBubbles
Referenced by scAquaRockDrawBubbles(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scAquaRockSetBubbleAnchor() and scAquaRockStartBubbles().
Definition at line 279 of file aqua_rock.c.
AquaRockFirstStreamTimer
extern Sint32 AquaRockFirstStreamTimer
Referenced by scAquaRockTimeStreams().
Definition at line 500 of file aqua_rock.c.
AquaRockSecondStreamTimer
extern Sint32 AquaRockSecondStreamTimer
Referenced by scAquaRockTimeStreams().
Definition at line 501 of file aqua_rock.c.
AquaRockThirdStreamTimer
extern Sint32 AquaRockThirdStreamTimer
Referenced by scAquaRockTimeStreams().
Definition at line 502 of file aqua_rock.c.
AquaRockFourthStreamTimer
extern Sint32 AquaRockFourthStreamTimer
Referenced by scAquaRockTimeStreams().
Definition at line 503 of file aqua_rock.c.
AquaRockFishScript
Sint32 AquaRockFishScript[]
A fish's script: it swims to random spots, resting between.
References scAquaRockPickRandomSpot(), scAquaRockStartFish() and Sint32.
Referenced by AquaRockSlopesPlacements.
Definition at line 1831 of file aqua_rock.c.
AquaRockSlowFishScript
Sint32 AquaRockSlowFishScript[]
A fish's script: it swims to random spots, resting longer between.
References scAquaRockPickRandomSpot(), scAquaRockStartFish() and Sint32.
Referenced by AquaRockSlopesPlacements.
Definition at line 1854 of file aqua_rock.c.
FieldEffectDurationScripts
LATE_DATA const Sint32 *FieldEffectDurationScripts[]
References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.
Referenced by fdEffectSpawnResident(), scFieldEffectSpawn() and scFieldEffectSpawnLocal().
Definition at line 1896 of file aqua_rock.c.
SceneExits
LATE_DATA Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 1927 of file aqua_rock.c.
Sint32
LATE_DATA Sint32
The tick counts of the four red moai's streams' cycles (scAquaRockTimeStreams).
Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorFootprintScript, ActorHoverScript, ActorIdleScript, ActorKeyCheckScript, ActorKeysScript, ActorLaunchScript, ActorOffsetScript, ActorPlacements, ActorPlayerScript, ActorRippleScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandPuffScript, ActorSandScript, ActorScriptCycleTable, ActorScriptEndScript, ActorScriptIdleScript, ActorSplashScript, ActorStepAngleScript, ActorTightropeScript, ActorWaitScript, ActorWalkingScript, ActorWorldMapScript, AirsRockEntrancePlacements, AirsRockInsideFaceVentsPlacements, AirsRockInsideLeaderLevel, AirsRockInsideOrbitingSparkScript, AirsRockInsidePairedStakesPlacements, AirsRockInsideStampedHeight, AirsRockInsideStampedMetatile, AirsRockInsideStampedWidth, AirsRockInsideStampedX, AirsRockInsideStampedZ, AirsRockInsideTightropesPlacements, AirsRockInsideTurningBridgePlacements, AirsRockInsideWindStonePlacements, AirsRockLeaderLevel, AirsRockRubbleScript, AirsRockWindStoneScript, AlhafraActorPlacementsOnceTheMastIsCleared, AlhafraAlhafranLeadsBehindFelixScript, AlhafraElderStepsBackScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveIdleEventTick and 4596 more.
Definition at lines 2041, 2042, 2043 and 2044 of file aqua_rock.c.