src/scene/lemurian_ship_deck.c
The Lemurian Ship, in two scenes: the East Indra Shore, where the ship lies moored below the cliffs (SceneIdLemurianShipMainDeck), and its deck at the tiller once it sails (SceneIdLemurianShipTiller). More…
#include "graphics/palette_buffers.h"#include "item_ids.h"#include "field/field_engine.h"#include "game/game.h"#include "graphics/glyph.h"#include "field/script_inline.h"#include "field/field_engine_script.h"#include "scene/scene.h"#include "edition.h"#include "macros.h"#include "field/field_sprite.h"#include "field/call.h"#include "field/actor_script.h"#include "text/msg_ids.h"#include "shared/scene_entrances_default.c"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00) | Frost froze the path's puddle. |
#define | FLAG_CABIN_DOOR_OPEN FLAG_SCENE_TEMP(0x01) | Piers opened the cabin door on this visit. |
#define | FLAG_FIRST_STEP_EAST_OF_DOOR FLAG_SCENE_TEMP(0x10) | Felix's first and second steps east of the cabin door, while Kraden waits. |
#define | FLAG_SECOND_STEP_EAST_OF_DOOR FLAG_SCENE_TEMP(0x11) | |
#define | FLAG_STANDING_EAST_OF_DOOR FLAG_SCENE_TEMP(0x12) | Felix stands east of the cabin door; stepping beside it clears this. |
#define | scLemurianShipDeckDrawCabinDoorOpen () | Draws the cabin door open, from spare metatiles of the map at (51, 38). |
#define | scLemurianShipDeckHideWing () | Draws plain hull over the metatiles at (67, 16) of the ship's middle layer: the copy that Lemuria's dock makes there among those that hide the ship's wings until it can fly (lemuria_dock.c), one metatile wider. |
#define | DEFINE_ROTATE_PALETTE_COLORS (name, last, first) | Defines an event that moves colours last-1 .. first of LEMURIAN_SHIP_PALETTE one place up and the last round to first, every eighth tick. |
#define | MAIN_DECK_ARRIVAL_ENTRANCE 99 | The entrance whose arrival lights the band along the hull. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { ACTOR_PUDDLE, ACTOR_KRADEN } | The deck's actors, by the rows of both of its actor placement tables; Jenna's, Sheba's and Piers's rows go to their party slots. |
enum | LEMURIAN_SHIP_DECK_METATILE_BEHAVIOR { METATILE_BEHAVIOR_HEAD_OF_PATH, METATILE_BEHAVIOR_TOP_OF_SHO … } | The shore's metatile behaviors that run its scripts; the cabin door's step metatiles take the number of the exit to the cabins and leave by it. |
enum | anonymous enum { HULL_BAND_FIRST_ANIMATION, HULL_BAND_SECOND_ANIMATION } |
Functions
| Name | Description | |
|---|---|---|
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 | scLemurianShipDeckEnterCabin (void) | Felix walks north into the cabin door on the ship's deck, metatile (22, 25), once Piers has opened it: he steps into the doorway and the screen closes on the cabins below. |
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 | scLemurianShipDeckTryHeldDoor (void) | Felix checks the cabin door on the ship's deck, metatile (22, 25), before Piers has come aboard: "The door is held closed by a powerful force." |
DEFINE_ROTATE_PALETTE_COLORS( | scLemurianShipDeckRotateSurfColors , SURF_LAST_COLOR, SURF_FIRST_COLOR) | An event: turns the surf's colours round by one. |
DEFINE_ROTATE_PALETTE_COLORS( | scLemurianShipDeckRotateHullBandColors , HULL_BAND_LAST_COLOR, HULL_BAND_FIRST_COLOR) | An event: turns the blues of the band along the hull round by one. |
void | scLemurianShipDeckShowArrival (void) | The party arrives on the shore by MAIN_DECK_ARRIVAL_ENTRANCE: the screen opens and the blue band along the ship's hull lights up in two steps. |
void | scLemurianShipDeckScrollWaves (void) | An event: scrolls the waves' layer half a pixel a tick. |
void | scLemurianShipDeckBobDeck (void) | An event: bobs the camera's actor and the first map layer together on a sine wave, a full wave every 128 ticks. |
static inline void | scLemurianShipDeckPlaceFacing (Sint32 id, Sint32 x, Sint32 z, Uint16 facing) | Places an actor facing an angle, the angle taken as the Uint16 an actor's facing is, as Madra's and Loho's scenes also place them. |
void | scLemurianShipDeckTakeTheTiller (void) | The first time the ship sails, on the deck by the tiller: Piers tells Felix, "Take the tiller, Felix!", the party talks over where to go (Felix's answer to Piers's wish to see Vale changes Kraden's reply), and Kraden ends, "To the open sea, Felix!" The player then steers the ship on the world map. |
static inline void | scLemurianShipDeckRunToFelix (Sint32 id) | Sends actor id at a run to where Felix stands, and off the deck. |
void | scLemurianShipDeckHoldOnToTiller (void) | The first time a whirlpool of the Sea of Time throws the ship back, the party stands round Felix at the tiller as the deck rocks: Sheba cries "Hold on to that tiller!", Piers admits he has never had to find his way back into Lemuria, and Kraden says they will need a way past the currents. |
void | scLemurianShipDeckSetUpTillerDeck (void) | The deck by the tiller (SCENE_LEMURIAN_SHIP_TILLER): the surf and the band along the hull shimmer, and entrances 10 and 20 play their scenes. |
Sint32 | scInit (void) | Opens the room through the window transition, and in the debug room draws the cat 1.7 times its size. |
Sint32 | scPrepareMap (void) | At sea, by the tiller, the ship lies at no pier: open water is drawn over the pier and the gangplank the map shares with Lemuria's dock, on its ground and overhead layers. |
void | scLemurianShipDeckSightMenardisShip (void) | The first time Felix comes down the sandy path to the East Indra Shore, metatiles (14, 5) to (19, 5), before the ceremony at the Gabomba Statue: the party gathers, Kraden cries "Look... |
void | scLemurianShipDeckFreezePuddle (void) | Felix casts Frost on the puddle on the path west of the ship: it freezes into a pillar of ice to jump across to the wooden box on the ledge, with its Cookie. |
void | scLemurianShipDeckKradenGoesToFindShip (void) | Felix steps onto the deck two metatiles east of the cabin door, by the rail, metatiles (24, 26) and (24, 27), before Piers has come aboard. |
void | scLemurianShipDeckStepBesideEastOfDoor (void) | Nothing visible happens as Felix steps beside the metatiles east of the cabin door, before Piers has come aboard; his next step back onto them counts toward Kraden's going to find a ship. |
void | scLemurianShipDeckEmitSparkle (void) | An event: as Piers opens the cabin door, sparkles drift in from around the Black Crystal toward it. |
ACTOR * | scLemurianShipDeckCreateBlackCrystal (void) | The Black Crystal, drawn from its item icon, as an actor on the deck. |
void | scLemurianShipDeckReturnToShip (void) | The first time Felix comes to the cabin door on the ship's deck, metatile (22, 25), with Piers in the party: Piers jumps for joy, "At last, I'm back on my ship.", holds up the Black Crystal before the door, and as light gathers the screen glows red and flashes white and the door opens. |
void | scLemurianShipDeckReachPiersShip (void) | Felix comes down the sandy path to the shore, metatiles (12, 6) to (21, 6), with Piers after the ceremony at the Gabomba Statue: "My ship! |
void | scLemurianShipDeckEmitSplash (ACTOR *actor) | A wading splash rises at an actor's feet every eighth tick while it walks. |
void | scLemurianShipDeckSetOutForMadra (void) | Felix wades to the foot of the rope ladder on the ship's side, metatile (27, 28), with Piers in the party before the farewells in Madra: Piers splashes out beside him, "Then let's waste no time! |
Variables
| Name | Description | |
|---|---|---|
Sint32 | LemurianShipDeckBobPhase | How far the deck's bob has come round, an angle that turns TRIG_TURN / 128 a tick. |
Sint32 | LemurianShipDeckWaveScroll | How far the waves have scrolled, in 16.16 pixels, back to 0 at 32. |
extern ACTOR_PLACE | LemurianShipDeckPlacements [] | The East Indra Shore's actors. |
extern ACTOR_PLACE | LemurianShipDeckTillerPlacements [] | The tiller deck's actors. |
extern CUE | LemurianShipDeckCues [] | The tiller deck's cues: none. |
extern CUE | LemurianShipDeckMainDeckCues [] | The East Indra Shore's cues. |
extern Sint32 | LemurianShipDeckJennaLooksAround [] | Jenna looking about the deck as the ship first sails. |
extern Sint32 | LemurianShipDeckShebaLooksAround [] | Sheba looking about the deck as the ship first sails. |
extern Sint32 | LemurianShipDeckKradenLooksAround [] | Kraden looking about the deck as the ship first sails. |
extern Sint16 | LemurianShipDeckPuddles [] | The puddle on the path west of the ship, by actor id and flag. |
extern Uint32 | LemurianShipDeckSparkleFades [] | A sparkle drifting in to the Black Crystal, gone as it arrives. |
extern Sint32 | LemurianShipDeckReturnToShipScript [] | Felix stepping back from the cabin door and turning to watch Piers open it. |
extern Sint32 | LemurianShipDeckReachPiersShipScript [] | The party walking off across the shore, into Felix's party, once Piers has agreed to sail for Lemuria. |
extern Uint32 | LemurianShipDeckSplashFades [] | A wading splash, gone after a quarter of a second. |
Uint32 | SceneExits [] | The room has no exits of its own. |
Description
The Lemurian Ship, in two scenes: the East Indra Shore, where the ship lies
moored below the cliffs (SceneIdLemurianShipMainDeck), and its deck at the
tiller once it sails (SceneIdLemurianShipTiller).
The party first comes down the sandy path to the shore before the ceremony at
the Gabomba Statue, and Kraden takes the ship for Menardi's, drifted there
with no orb to sail it. A puddle on the path west of the ship freezes with
Frost into a pillar of ice to the wooden box on the ledge. Back with Piers
after the ceremony, he agrees on the shore to take the party to Lemuria once
he has seen the mayor of Madra; boarding by the rope ladder on the ship's
side, he holds the Black Crystal up to the cabin door, which opens, and leads
the way down to the engine (lemurian_ship.c). At sea the deck by the tiller
plays Piers teaching Felix to sail, and later the party's talk after a
whirlpool of the Sea of Time throws the ship back.
Macros in detail
FLAG_PUDDLE_FROZEN
#define FLAG_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00)
Frost froze the path's puddle.
Referenced by AirsRockCliffCues, AirsRockFrozenPuddle, LemurianShipDeckMainDeckCues, LemurianShipDeckPuddles, LemurianShipPipeRoomCues, LemurianShipPipeRoomPuddles, LemurianShipSixJellyRoomCues, LemurianShipSixJellyRoomPuddles, LemurianShipTwoJellyRoomCues, LemurianShipTwoJellyRoomPuddles, scLemurianShipExamineLiftSwitch(), scLemurianShipFreezeLiftPuddle() and scLemurianShipSetUpSixJellyRoom().
Definition at line 87 of file lemurian_ship_deck.c.
FLAG_CABIN_DOOR_OPEN
#define FLAG_CABIN_DOOR_OPEN FLAG_SCENE_TEMP(0x01)
Piers opened the cabin door on this visit.
Referenced by scLemurianShipDeckEnterCabin() and scLemurianShipDeckReturnToShip().
Definition at line 89 of file lemurian_ship_deck.c.
FLAG_FIRST_STEP_EAST_OF_DOOR
#define FLAG_FIRST_STEP_EAST_OF_DOOR FLAG_SCENE_TEMP(0x10)
Felix's first and second steps east of the cabin door, while Kraden waits.
Referenced by scLemurianShipDeckKradenGoesToFindShip().
Definition at line 91 of file lemurian_ship_deck.c.
FLAG_SECOND_STEP_EAST_OF_DOOR
#define FLAG_SECOND_STEP_EAST_OF_DOOR FLAG_SCENE_TEMP(0x11)
Referenced by scLemurianShipDeckKradenGoesToFindShip().
Definition at line 92 of file lemurian_ship_deck.c.
FLAG_STANDING_EAST_OF_DOOR
#define FLAG_STANDING_EAST_OF_DOOR FLAG_SCENE_TEMP(0x12)
Felix stands east of the cabin door; stepping beside it clears this.
Referenced by scLemurianShipDeckKradenGoesToFindShip() and scLemurianShipDeckStepBesideEastOfDoor().
Definition at line 94 of file lemurian_ship_deck.c.
scLemurianShipDeckDrawCabinDoorOpen
#define scLemurianShipDeckDrawCabinDoorOpen()
Draws the cabin door open, from spare metatiles of the map at (51, 38).
Referenced by scLemurianShipDeckEnterCabin() and scLemurianShipDeckReturnToShip().
Definition at line 97 of file lemurian_ship_deck.c.
scLemurianShipDeckHideWing
#define scLemurianShipDeckHideWing()
Draws plain hull over the metatiles at (67, 16) of the ship's middle layer:
the copy that Lemuria's dock makes there among those that hide the ship's
wings until it can fly (lemuria_dock.c), one metatile wider.
Referenced by scLemurianShipDeckHoldOnToTiller() and scLemurianShipDeckTakeTheTiller().
Definition at line 103 of file lemurian_ship_deck.c.
DEFINE_ROTATE_PALETTE_COLORS
#define DEFINE_ROTATE_PALETTE_COLORS(name, last, first)
Defines an event that moves colours last-1 .. first of LEMURIAN_SHIP_PALETTE
one place up and the last round to first, every eighth tick.
Definition at line 184 of file lemurian_ship_deck.c.
MAIN_DECK_ARRIVAL_ENTRANCE
#define MAIN_DECK_ARRIVAL_ENTRANCE 99
The entrance whose arrival lights the band along the hull.
Referenced by scInit().
Definition at line 209 of file lemurian_ship_deck.c.
Enumerations in detail
anonymous enum
enum { ACTOR_PUDDLE, ACTOR_KRADEN }
The deck's actors, by the rows of both of its actor placement tables; Jenna's, Sheba's and Piers's rows go to their party slots.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_PUDDLE | ACTOR_FIRST_PLACED | The puddle on the path west of the |
ACTOR_KRADEN | ship. |
Definition at line 54 of file lemurian_ship_deck.c.
LEMURIAN_SHIP_DECK_METATILE_BEHAVIOR
enum LEMURIAN_SHIP_DECK_METATILE_BEHAVIOR
The shore's metatile behaviors that run its scripts; the cabin door's step metatiles take the number of the exit to the cabins and leave by it.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_HEAD_OF_PATH | 10 | The head of the sandy path down to the shore, metatiles (14, 5) to (19, 5). |
METATILE_BEHAVIOR_TOP_OF_SHORE | The row below it, metatiles (12, 6) to (21, 6). | |
METATILE_BEHAVIOR_FOOT_OF_LADDER | The shallows at the foot of the rope ladder on the ship's side, metatile (27, 28). | |
METATILE_BEHAVIOR_CABIN_DOOR | 14 | The cabin door's face, metatile (22, 25), which Felix checks. |
METATILE_BEHAVIOR_EAST_OF_DOOR | The deck two metatiles east of the cabin door, by the rail: metatiles (24, 26) and (24, 27) of the deck's map layer, the door's step metatiles being (22, 26) and (22, 27). | |
METATILE_BEHAVIOR_BESIDE_EAST_OF_DOOR | The metatiles either side of those, (23, 26), (25, 26), (23, 27) and (25, 27). |
Definition at line 63 of file lemurian_ship_deck.c.
anonymous enum
enum { HULL_BAND_FIRST_ANIMATION, HULL_BAND_SECOND_ANIMATION }
| Enumerator | Value | Description |
|---|---|---|
HULL_BAND_FIRST_ANIMATION | 13 | The map's two tile animations, held until |
HULL_BAND_SECOND_ANIMATION | that arrival, that light the band one after the other. |
Definition at line 211 of file lemurian_ship_deck.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 37 of file lemurian_ship_deck.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 42 of file lemurian_ship_deck.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 47 of file lemurian_ship_deck.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References LemurianShipDeckPlacements, LemurianShipDeckTillerPlacements and MainRoutineStateWork.
Definition at line 109 of file lemurian_ship_deck.c.
scLemurianShipDeckEnterCabin
void scLemurianShipDeckEnterCabin(void)
Felix walks north into the cabin door on the ship's deck, metatile (22, 25), once Piers has opened it: he steps into the doorway and the screen closes on the cabins below. Before then nothing happens.
If the door is not yet open on this visit (FLAG_CABIN_DOOR_OPEN), it swings
open first. Every placed actor stops where it is.
References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptStart(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest() and scFieldScriptWait().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 124 of file lemurian_ship_deck.c.
scGetCues
const CUE *scGetCues(void)
References LemurianShipDeckCues, LemurianShipDeckMainDeckCues and MainRoutineStateWork.
Definition at line 163 of file lemurian_ship_deck.c.
scLemurianShipDeckTryHeldDoor
void scLemurianShipDeckTryHeldDoor(void)
Felix checks the cabin door on the ship's deck, metatile (22, 25), before Piers has come aboard: "The door is held closed by a powerful force."
References fdScriptEnd(), fdScriptStart(), mnMessageShowCentered() and scFieldScriptEndLastingPsynergy().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 174 of file lemurian_ship_deck.c.
scLemurianShipDeckRotateSurfColors
DEFINE_ROTATE_PALETTE_COLORS(scLemurianShipDeckRotateSurfColors, SURF_LAST_COLOR, SURF_FIRST_COLOR)
An event: turns the surf's colours round by one.
Referenced by scInit() and scLemurianShipDeckSetUpTillerDeck().
Definition at line 199 of file lemurian_ship_deck.c.
scLemurianShipDeckRotateHullBandColors
DEFINE_ROTATE_PALETTE_COLORS(scLemurianShipDeckRotateHullBandColors, HULL_BAND_LAST_COLOR, HULL_BAND_FIRST_COLOR)
An event: turns the blues of the band along the hull round by one.
Referenced by scInit(), scLemurianShipDeckSetUpTillerDeck() and scLemurianShipDeckShowArrival().
Definition at line 204 of file lemurian_ship_deck.c.
scLemurianShipDeckShowArrival
void scLemurianShipDeckShowArrival(void)
The party arrives on the shore by MAIN_DECK_ARRIVAL_ENTRANCE: the screen
opens and the blue band along the ship's hull lights up in two steps.
No exit table or script in the game names entrance 99 of the main deck: the cabins' and the world map's exits lead in by entrances 1 and 2, so this arrival is reached by none of them.
References fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), fdTilesetAnimationResume(), scFieldScriptEndLastingPsynergy(), scFieldScriptWait(), scFieldSetTickEvent() and scLemurianShipDeckRotateHullBandColors().
Referenced by scInit().
Definition at line 225 of file lemurian_ship_deck.c.
scLemurianShipDeckScrollWaves
void scLemurianShipDeckScrollWaves(void)
An event: scrolls the waves' layer half a pixel a tick.
References fdMapGridGetLayer() and LemurianShipDeckWaveScroll.
Referenced by scLemurianShipDeckHoldOnToTiller() and scLemurianShipDeckTakeTheTiller().
Definition at line 242 of file lemurian_ship_deck.c.
scLemurianShipDeckBobDeck
void scLemurianShipDeckBobDeck(void)
An event: bobs the camera's actor and the first map layer together on a sine wave, a full wave every 128 ticks.
References fdMapGridGetLayer(), LemurianShipDeckBobPhase, scScriptCameraGetActor(), Sint32 and sySin().
Referenced by scLemurianShipDeckHoldOnToTiller() and scLemurianShipDeckTakeTheTiller().
Definition at line 256 of file lemurian_ship_deck.c.
scLemurianShipDeckPlaceFacing
static inline void scLemurianShipDeckPlaceFacing(Sint32 id, Sint32 x, Sint32 z, Uint16 facing)
Places an actor facing an angle, the angle taken as the Uint16 an actor's facing is, as Madra's and Loho's scenes also place them.
References fdActorSetPosAndFacing() and Sint32.
Referenced by scLemurianShipDeckTakeTheTiller().
Definition at line 278 of file lemurian_ship_deck.c.
scLemurianShipDeckTakeTheTiller
void scLemurianShipDeckTakeTheTiller(void)
The first time the ship sails, on the deck by the tiller: Piers tells Felix, "Take the tiller, Felix!", the party talks over where to go (Felix's answer to Piers's wish to see Vale changes Kraden's reply), and Kraden ends, "To the open sea, Felix!" The player then steers the ship on the world map.
It runs from entrance 10 and sets FLAG_SHIP_CAN_SAIL.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorShowEmote(), fdCameraGetActor(), fdCameraWaitForArrival(), fdMapGridCenterOnFollowedPoint(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), LemurianShipDeckBobPhase, LemurianShipDeckJennaLooksAround, LemurianShipDeckKradenLooksAround, LemurianShipDeckShebaLooksAround, LemurianShipDeckWaveScroll, MainRoutineStateWork, scFieldActorJump(), scFieldActorStop(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptWait(), scLemurianShipDeckBobDeck(), scLemurianShipDeckPlaceFacing(), scLemurianShipDeckScrollWaves(), Sint32, sySetTickEvent() and sySynch().
Referenced by scLemurianShipDeckSetUpTillerDeck().
Definition at line 290 of file lemurian_ship_deck.c.
scLemurianShipDeckRunToFelix
static inline void scLemurianShipDeckRunToFelix(Sint32 id)
Sends actor id at a run to where Felix stands, and off the deck.
References fdActorGetById(), fdActorSetAnimation(), fdActorSetDestination(), fdActorWaitForMoveById() and Sint32.
Referenced by scLemurianShipDeckHoldOnToTiller().
Definition at line 438 of file lemurian_ship_deck.c.
scLemurianShipDeckHoldOnToTiller
void scLemurianShipDeckHoldOnToTiller(void)
The first time a whirlpool of the Sea of Time throws the ship back, the party stands round Felix at the tiller as the deck rocks: Sheba cries "Hold on to that tiller!", Piers admits he has never had to find his way back into Lemuria, and Kraden says they will need a way past the currents. The others then run to Felix and the ship is back on the world map.
It runs from entrance 20; the waves scroll and the deck bobs throughout.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorFaceEachOther(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetPosAndFacing(), fdActorShowEmote(), fdCameraGetActor(), fdMapGridCenterOnFollowedPoint(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWaitTransitionTicks(), LemurianShipDeckBobPhase, LemurianShipDeckWaveScroll, scFieldActorLaunchFromLeader(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetExitRequest(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait(), scFieldScriptWait(), scLemurianShipDeckBobDeck(), scLemurianShipDeckRunToFelix(), scLemurianShipDeckScrollWaves(), sySetTickEvent() and sySynch().
Referenced by scLemurianShipDeckSetUpTillerDeck().
Definition at line 459 of file lemurian_ship_deck.c.
scLemurianShipDeckSetUpTillerDeck
void scLemurianShipDeckSetUpTillerDeck(void)
The deck by the tiller (SCENE_LEMURIAN_SHIP_TILLER): the surf and the band
along the hull shimmer, and entrances 10 and 20 play their scenes.
References fdActorGet(), MainRoutineStateWork, scFieldSetTickEvent(), scLemurianShipDeckHoldOnToTiller(), scLemurianShipDeckRotateHullBandColors(), scLemurianShipDeckRotateSurfColors() and scLemurianShipDeckTakeTheTiller().
Referenced by scInit().
Definition at line 589 of file lemurian_ship_deck.c.
scInit
Sint32 scInit(void)
References fdActorGet(), fdActorSetAnimation(), fdFlagBlockPlaceAll(), LemurianShipDeckPuddles, MainRoutineStateWork, scFieldSetTickEvent(), scLemurianShipDeckRotateHullBandColors(), scLemurianShipDeckRotateSurfColors(), scLemurianShipDeckSetUpTillerDeck(), scLemurianShipDeckShowArrival() and Sint32.
Definition at line 603 of file lemurian_ship_deck.c.
scPrepareMap
Sint32 scPrepareMap(void)
At sea, by the tiller, the ship lies at no pier: open water is drawn over the pier and the gangplank the map shares with Lemuria's dock, on its ground and overhead layers.
References fdMapGridCopyMetatilesTo(), MainRoutineStateWork and Sint32.
Definition at line 634 of file lemurian_ship_deck.c.
scLemurianShipDeckSightMenardisShip
void scLemurianShipDeckSightMenardisShip(void)
The first time Felix comes down the sandy path to the East Indra Shore, metatiles (14, 5) to (19, 5), before the ceremony at the Gabomba Statue: the party gathers, Kraden cries "Look... It's Menardi's ship!", and the view pans over the moored ship to its dragon prow and back. Felix answers whether it could have drifted here; either way they agree they cannot sail it without the orb Saturos had.
Coming later, after the ceremony, only marks the ship seen
(FLAG_MENARDIS_SHIP_SEEN).
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorShowEmote(), fdActorWaitForAnimationChange(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldActorLaunchFromLeader(), scFieldActorWaitForMoveById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptWait() and Sint32.
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 654 of file lemurian_ship_deck.c.
scLemurianShipDeckFreezePuddle
void scLemurianShipDeckFreezePuddle(void)
Felix casts Frost on the puddle on the path west of the ship: it freezes into a pillar of ice to jump across to the wooden box on the ledge, with its Cookie.
References fdFlagBlockApplyFlags() and LemurianShipDeckPuddles.
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 782 of file lemurian_ship_deck.c.
scLemurianShipDeckKradenGoesToFindShip
void scLemurianShipDeckKradenGoesToFindShip(void)
Felix steps onto the deck two metatiles east of the cabin door, by the rail, metatiles (24, 26) and (24, 27), before Piers has come aboard. The first two times nothing visible happens; the third time Kraden comes out, walks east and says, "Well, there's no point in hanging around here all day. Let's go see about finding ourselves a ship we can use.", and goes back into the party.
A step counts only after Felix has stepped beside those metatiles
(scLemurianShipDeckStepBesideEastOfDoor). The scene's temporary flags count
the steps, and FLAG_KRADEN_WENT_TO_FIND_A_SHIP ends it for good.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGet(), fdActorPlaceOnActor(), fdActorSetAnimation(), fdActorSetDestination(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId() and sySynch().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 797 of file lemurian_ship_deck.c.
scLemurianShipDeckStepBesideEastOfDoor
void scLemurianShipDeckStepBesideEastOfDoor(void)
Nothing visible happens as Felix steps beside the metatiles east of the cabin door, before Piers has come aboard; his next step back onto them counts toward Kraden's going to find a ship.
References syGameFlagClear().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 845 of file lemurian_ship_deck.c.
scLemurianShipDeckEmitSparkle
void scLemurianShipDeckEmitSparkle(void)
An event: as Piers opens the cabin door, sparkles drift in from around the Black Crystal toward it.
References fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), LemurianShipDeckSparkleFades, scFieldActorCreate(), Sint32 and syRandom().
Referenced by scLemurianShipDeckReturnToShip().
Definition at line 852 of file lemurian_ship_deck.c.
scLemurianShipDeckCreateBlackCrystal
ACTOR *scLemurianShipDeckCreateBlackCrystal(void)
The Black Crystal, drawn from its item icon, as an actor on the deck.
References mnIconDrawItem(), syHeapSlotAllocate(), syHeapSlotRelease(), syImportActorCreate() and syVRAMCacheLoad().
Referenced by scLemurianShipDeckReturnToShip().
Definition at line 873 of file lemurian_ship_deck.c.
scLemurianShipDeckReturnToShip
void scLemurianShipDeckReturnToShip(void)
The first time Felix comes to the cabin door on the ship's deck, metatile (22, 25), with Piers in the party: Piers jumps for joy, "At last, I'm back on my ship.", holds up the Black Crystal before the door, and as light gathers the screen glows red and flashes white and the door opens. "To set sail, we must go down to the power chamber belowdecks."
It sets FLAG_PIERS_BACK_ON_HIS_SHIP.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorGetById(), fdActorPlaceOnActor(), fdActorRelease(), fdActorSetAnimation(), fdActorSetDestination(), fdActorSetScript(), fdActorWalkToAndWait(), fdPaletteFadeApplyTarget(), fdPaletteFadeInterpolate(), fdScriptEnd(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), LemurianShipDeckReturnToShipScript, MainRoutineStateWork, scFieldActorJump(), scFieldActorWaitForMoveById(), scFieldCloseEvent(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptWait(), scLemurianShipDeckCreateBlackCrystal(), scLemurianShipDeckEmitSparkle(), Sint32, sySetEvent() and sySynch().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 904 of file lemurian_ship_deck.c.
scLemurianShipDeckReachPiersShip
void scLemurianShipDeckReachPiersShip(void)
Felix comes down the sandy path to the shore, metatiles (12, 6) to (21, 6), with Piers after the ceremony at the Gabomba Statue: "My ship! At long last... I have returned to my ship." Kraden asks him to take the party to Lemuria, and after Felix's two answers Piers agrees: "I will take you to Lemuria." He then asks to stop in Madra first to tell the mayor he has his orb back.
It runs until the farewells in Madra and sets FLAG_PIERS_SETTING_SAIL.
References fdActorFaceDirection(), fdActorFaceDirectionAndWait(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorShowEmote(), fdActorWalkByAndWait(), fdActorWalkTo(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetFlag(), fdScriptShowMessage(), fdScriptStart(), LemurianShipDeckReachPiersShipScript, MainRoutineStateWork, scFieldActorJump(), scFieldActorLaunchFromLeader(), scFieldActorStartRepeatedMotion(), scFieldActorWaitForMoveById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId(), scFieldScriptShowMessageThenWait() and scFieldScriptWait().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 989 of file lemurian_ship_deck.c.
scLemurianShipDeckEmitSplash
void scLemurianShipDeckEmitSplash(ACTOR *actor)
A wading splash rises at an actor's feet every eighth tick while it walks.
References fdActorSelectAnimation(), fdActorSetSpriteFlags(), fdActorStartScript(), LemurianShipDeckSplashFades, scFieldActorCreate() and TickCount.
Referenced by scLemurianShipDeckSetOutForMadra().
Definition at line 1272 of file lemurian_ship_deck.c.
scLemurianShipDeckSetOutForMadra
void scLemurianShipDeckSetOutForMadra(void)
Felix wades to the foot of the rope ladder on the ship's side, metatile (27, 28), with Piers in the party before the farewells in Madra: Piers splashes out beside him, "Then let's waste no time! We should set out for Madra at once!", and rejoins the party.
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetSpriteFlags(), fdActorWalkByAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptShowMessage(), fdScriptStart(), MainRoutineStateWork, scFieldActorLaunchFromLeader(), scFieldActorWaitForMoveById(), scFieldScriptEndLastingPsynergy(), scFieldScriptSetMessageId() and scLemurianShipDeckEmitSplash().
Referenced by LemurianShipDeckMainDeckCues.
Definition at line 1295 of file lemurian_ship_deck.c.
Variables in detail
LemurianShipDeckBobPhase
Sint32 LemurianShipDeckBobPhase
How far the deck's bob has come round, an angle that turns TRIG_TURN / 128 a
tick.
References Sint32.
Referenced by scLemurianShipDeckBobDeck(), scLemurianShipDeckHoldOnToTiller() and scLemurianShipDeckTakeTheTiller().
Definition at line 33 of file lemurian_ship_deck.c.
LemurianShipDeckWaveScroll
Sint32 LemurianShipDeckWaveScroll
How far the waves have scrolled, in 16.16 pixels, back to 0 at 32.
References Sint32.
Referenced by scLemurianShipDeckHoldOnToTiller(), scLemurianShipDeckScrollWaves() and scLemurianShipDeckTakeTheTiller().
Definition at line 35 of file lemurian_ship_deck.c.
LemurianShipDeckPlacements
extern ACTOR_PLACE LemurianShipDeckPlacements[]
ACTOR_PLACE LemurianShipDeckPlacements[]
The East Indra Shore's actors.
Referenced by scGetActorPlacements().
Definition at lines 106 and 1425 of file lemurian_ship_deck.c.
LemurianShipDeckTillerPlacements
extern ACTOR_PLACE LemurianShipDeckTillerPlacements[]
ACTOR_PLACE LemurianShipDeckTillerPlacements[]
The tiller deck's actors.
Referenced by scGetActorPlacements().
Definition at lines 107 and 1440 of file lemurian_ship_deck.c.
LemurianShipDeckCues
extern CUE LemurianShipDeckCues[]
CUE LemurianShipDeckCues[]
The tiller deck's cues: none.
Referenced by scGetCues().
Definition at lines 160 and 1455 of file lemurian_ship_deck.c.
LemurianShipDeckMainDeckCues
extern CUE LemurianShipDeckMainDeckCues[]
CUE LemurianShipDeckMainDeckCues[]
The East Indra Shore's cues.
References scLemurianShipDeckEnterCabin(), scLemurianShipDeckFreezePuddle(), scLemurianShipDeckKradenGoesToFindShip(), scLemurianShipDeckReachPiersShip(), scLemurianShipDeckReturnToShip(), scLemurianShipDeckSetOutForMadra(), scLemurianShipDeckSightMenardisShip(), scLemurianShipDeckStepBesideEastOfDoor() and scLemurianShipDeckTryHeldDoor().
Referenced by scGetCues().
Definition at lines 161 and 1460 of file lemurian_ship_deck.c.
LemurianShipDeckJennaLooksAround
extern Sint32 LemurianShipDeckJennaLooksAround[]
Sint32 LemurianShipDeckJennaLooksAround[]
Jenna looking about the deck as the ship first sails.
References Sint32.
Referenced by scLemurianShipDeckTakeTheTiller().
Definition at lines 267 and 1372 of file lemurian_ship_deck.c.
LemurianShipDeckShebaLooksAround
extern Sint32 LemurianShipDeckShebaLooksAround[]
Sint32 LemurianShipDeckShebaLooksAround[]
Sheba looking about the deck as the ship first sails.
References Sint32.
Referenced by scLemurianShipDeckTakeTheTiller().
Definition at lines 268 and 1385 of file lemurian_ship_deck.c.
LemurianShipDeckKradenLooksAround
extern Sint32 LemurianShipDeckKradenLooksAround[]
Sint32 LemurianShipDeckKradenLooksAround[]
Kraden looking about the deck as the ship first sails.
References Sint32.
Referenced by scLemurianShipDeckTakeTheTiller().
Definition at lines 269 and 1394 of file lemurian_ship_deck.c.
LemurianShipDeckPuddles
extern Sint16 LemurianShipDeckPuddles[]
Sint16 LemurianShipDeckPuddles[]
The puddle on the path west of the ship, by actor id and flag.
Referenced by scInit() and scLemurianShipDeckFreezePuddle().
Definition at lines 270 and 1338 of file lemurian_ship_deck.c.
LemurianShipDeckSparkleFades
extern Uint32 LemurianShipDeckSparkleFades[]
Uint32 LemurianShipDeckSparkleFades[]
A sparkle drifting in to the Black Crystal, gone as it arrives.
Referenced by scLemurianShipDeckEmitSparkle().
Definition at lines 271 and 1485 of file lemurian_ship_deck.c.
LemurianShipDeckReturnToShipScript
extern Sint32 LemurianShipDeckReturnToShipScript[]
Sint32 LemurianShipDeckReturnToShipScript[]
Felix stepping back from the cabin door and turning to watch Piers open it.
References Sint32.
Referenced by scLemurianShipDeckReturnToShip().
Definition at lines 272 and 1356 of file lemurian_ship_deck.c.
LemurianShipDeckReachPiersShipScript
extern Sint32 LemurianShipDeckReachPiersShipScript[]
Sint32 LemurianShipDeckReachPiersShipScript[]
The party walking off across the shore, into Felix's party, once Piers has agreed to sail for Lemuria.
References Sint32.
Referenced by scLemurianShipDeckReachPiersShip().
Definition at lines 273 and 1344 of file lemurian_ship_deck.c.
LemurianShipDeckSplashFades
extern Uint32 LemurianShipDeckSplashFades[]
Uint32 LemurianShipDeckSplashFades[]
A wading splash, gone after a quarter of a second.
Referenced by scLemurianShipDeckEmitSplash().
Definition at lines 274 and 1494 of file lemurian_ship_deck.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 1408 of file lemurian_ship_deck.c.