src/scene/eastern_alhafra_ship.c
Briggs's ship at Alhafra's eastern harbour: the cabin the party enters from the deck, the rooms down its stairs, and a back room behind a tall crate. More…
#include "field/field_engine.h"#include "game/game.h"#include "item_ids.h"#include "field/field_engine_script.h"#include "scene/scene.h"#include "field/script_inline.h"#include "text/msg_ids.h"#include "field/actor_script.h"#include "shared/question_mark_pop.c"#include "shared/actor_pop_question_marks.c"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_CRATE_MOVED 0x900 | The tall crate pushed or Moved off the back room's door, east onto metatile (24, 40). |
#define | FLAG_BREAD_KNOCKED_DOWN 0x901 | Tremor has shaken the stacked crates down off the crate under them and knocked the Large Bread to the floor. |
#define | FLAG_BREAD_TAKEN 0x902 | The Large Bread has been picked up. |
#define | FLAG_EOLEO_LIFTED 0x8ae | Set the first time the baby Eoleo lifts the vase with Psynergy; his mother tells of his power only then. |
#define | FACING_NORTH_BY_WEST (FACING_NORTH - 1) | Headings nudged by the least angle (a 65536th of a turn) toward the west or the east. |
#define | FACING_NORTH_BY_EAST (FACING_NORTH + 1) | |
#define | FACING_SOUTH_BY_WEST (FACING_SOUTH + 1) | |
#define | FACING_SOUTH_BY_EAST (FACING_SOUTH - 1) | |
#define | FACING_NORTH_NORTHWEST_BY_WEST (FACING_NORTH_NORTHWEST - 1) |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { EXIT_DOWN_THE_STAIRS, EXIT_UP_THE_STAIRS, EXIT_INTO_THE_BACK … } | The ship's own ways between its rooms, each exit leading to an entrance of the ship itself: the stairs down from the cabin to the hold, and the doorway behind the tall crate into the back room. |
enum | anonymous enum { ENTRANCE_AFTER_BRIGGS_BATTLE } | Where the party comes back after the battle with Briggs and a Sea Fighter of his crew; it then counts as having come down the stairs. |
enum | anonymous enum { METATILE_BELOW_THE_STAIRS } | The metatiles just below the foot of the stairs down from the cabin, (28, 24) and (29, 24), where the party first overhears Briggs (scEasternAlhafraShipMayorArrives). |
enum | EASTERN_ALHAFRA_SHIP_ACTOR_ID { ACTOR_BRIGGS, ACTOR_BRIGGS_MATE, ACTOR_CHAUCHA, ACTOR_EOLEO, … } | The people and things aboard, numbering the rows of EasternAlhafraShipActorPlacements whose sprites are not the party's. |
Functions
| Name | Description | |
|---|---|---|
void | scEasternAlhafraShipBriggsIsCaught (void) | After the battle Briggs gives himself up. |
void | scEasternAlhafraShipCountAnswer () | Counts one more weird answer Felix gives (fdScriptCountAnswer, through the overlay's stub). |
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 | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
void | scEasternAlhafraShipStartMovingCrate (void) | Nothing visible happens as Felix begins to push or Move the tall crate in front of the back room's door; the push or Move goes on as anywhere else. |
void | scEasternAlhafraShipFinishMovingCrate (Sint32 unused, Sint32 id) | Felix pushes or Moves the tall crate standing against the north wall below the stairs. |
void | scEasternAlhafraShipKnockDownTheBread (void) | Felix casts Tremor on the stacked crates in the back room: he hops back as they shift down beside the crate under them, and the Large Bread on top falls to the floor, where he can pick it up. |
void | scEasternAlhafraShipTakeTheBread (Sint32 id) | Felix picks up the Large Bread that Tremor knocked to the floor of the back room. |
void | scEasternAlhafraShipEoleoLifts (Sint32 id) | Felix talks to the baby Eoleo, who stays aboard with his mother Chaucha once Briggs is caught: "Goo goo ga ga!" He lifts the vase of flowers beside him with Psynergy and drops it with a splash. |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
Sint32 | scInit (void) | Sets up the ship as the story stands: back from the battle, Briggs gives himself up; once he is caught his crew are gone, and Chaucha and Eoleo stay aboard after their visit to him, until the mast is cleared; and the tall crate, the stacked crates and the Large Bread are where the party left them. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
void | scEasternAlhafraShipMayorArrives (void) | Walking down from the foot of the stairs (metatiles (28, 24) and (29, 24)) on the first visit, the party overhears Briggs and his mate: Madra's mayor has come to Alhafra after them. |
Variables
| Name | Description | |
|---|---|---|
extern ACTOR_PLACE | EasternAlhafraShipActorPlacements [] | |
extern Uint32 | EasternAlhafraShipBriggsRunsScript [] | Briggs and his mate running out to the party once Jenna gives it away (scEasternAlhafraShipMayorArrives). |
extern Sint32 | EasternAlhafraShipMateRunsScript [] | |
extern Uint32 | EasternAlhafraShipLeaveUpTheStairsScript [] | The way up the stairs and off the ship that Briggs, his crew and their guard take once he is caught. |
extern Uint32 | QuestionMarkScript [] | The "?" bubbles scActorPopQuestionMarks pops: each frees itself once its wait is over. |
SCENE_ENTRANCE | SceneEntrances [] | Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole. |
Uint32 | SceneExits [] | The room has no exits of its own. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
Briggs's ship at Alhafra's eastern harbour: the cabin the party enters from
the deck, the rooms down its stairs, and a back room behind a tall crate.
Below, the party overhears Briggs and his mate learn that Madra's mayor has
come (scEasternAlhafraShipMayorArrives) and fights Briggs and a Sea Fighter;
after the battle Briggs gives himself up and the mayors of Madra and Alhafra
settle his fate and his ship's (scEasternAlhafraShipBriggsIsCaught). His wife
Chaucha and their baby Eoleo then stay aboard, where Eoleo lifts a vase of
flowers with Psynergy (scEasternAlhafraShipEoleoLifts). Move or a push shifts
the tall crate from the doorway to the back room, and Tremor knocks the Large
Bread down from the crates stacked inside
(scEasternAlhafraShipKnockDownTheBread): given to the crying boy in Alhafra,
it has his father let the party into the Alhafran Cave.
Macros in detail
FLAG_CRATE_MOVED
#define FLAG_CRATE_MOVED 0x900
The tall crate pushed or Moved off the back room's door, east onto metatile (24, 40).
Referenced by scEasternAlhafraShipFinishMovingCrate() and scInit().
Definition at line 25 of file eastern_alhafra_ship.c.
FLAG_BREAD_KNOCKED_DOWN
#define FLAG_BREAD_KNOCKED_DOWN 0x901
Tremor has shaken the stacked crates down off the crate under them and knocked the Large Bread to the floor.
Referenced by scEasternAlhafraShipKnockDownTheBread(), SceneCues and scInit().
Definition at line 28 of file eastern_alhafra_ship.c.
FLAG_BREAD_TAKEN
#define FLAG_BREAD_TAKEN 0x902
The Large Bread has been picked up.
Referenced by scEasternAlhafraShipTakeTheBread() and scInit().
Definition at line 30 of file eastern_alhafra_ship.c.
FLAG_EOLEO_LIFTED
#define FLAG_EOLEO_LIFTED 0x8ae
Set the first time the baby Eoleo lifts the vase with Psynergy; his mother tells of his power only then.
Referenced by scEasternAlhafraShipEoleoLifts().
Definition at line 33 of file eastern_alhafra_ship.c.
FACING_NORTH_BY_WEST
#define FACING_NORTH_BY_WEST (FACING_NORTH - 1)
Headings nudged by the least angle (a 65536th of a turn) toward the west or the east.
Referenced by scEasternAlhafraShipBriggsIsCaught().
Definition at line 37 of file eastern_alhafra_ship.c.
FACING_NORTH_BY_EAST
#define FACING_NORTH_BY_EAST (FACING_NORTH + 1)
Referenced by scEasternAlhafraShipBriggsIsCaught().
Definition at line 38 of file eastern_alhafra_ship.c.
FACING_SOUTH_BY_WEST
#define FACING_SOUTH_BY_WEST (FACING_SOUTH + 1)
Referenced by scEasternAlhafraShipBriggsIsCaught().
Definition at line 39 of file eastern_alhafra_ship.c.
FACING_SOUTH_BY_EAST
#define FACING_SOUTH_BY_EAST (FACING_SOUTH - 1)
Referenced by scEasternAlhafraShipBriggsIsCaught().
Definition at line 40 of file eastern_alhafra_ship.c.
FACING_NORTH_NORTHWEST_BY_WEST
#define FACING_NORTH_NORTHWEST_BY_WEST (FACING_NORTH_NORTHWEST - 1)
Referenced by scEasternAlhafraShipEoleoLifts().
Definition at line 41 of file eastern_alhafra_ship.c.
Enumerations in detail
anonymous enum
enum { EXIT_DOWN_THE_STAIRS, EXIT_UP_THE_STAIRS, EXIT_INTO_THE_BACK_ROOM, EXIT_OUT_OF_THE_BACK_ROOM, … }
The ship's own ways between its rooms, each exit leading to an entrance of the ship itself: the stairs down from the cabin to the hold, and the doorway behind the tall crate into the back room.
| Enumerator | Value | Description |
|---|---|---|
EXIT_DOWN_THE_STAIRS | 2 | |
EXIT_UP_THE_STAIRS | 3 | |
EXIT_INTO_THE_BACK_ROOM | 4 | |
EXIT_OUT_OF_THE_BACK_ROOM | 5 | |
ENTRANCE_TOP_OF_STAIRS | 2 | |
ENTRANCE_FOOT_OF_STAIRS | 3 | |
ENTRANCE_BY_THE_TALL_CRATE | 4 | |
ENTRANCE_INTO_THE_BACK_ROOM | 5 |
Definition at line 46 of file eastern_alhafra_ship.c.
anonymous enum
enum { ENTRANCE_AFTER_BRIGGS_BATTLE }
Where the party comes back after the battle with Briggs and a Sea Fighter of his crew; it then counts as having come down the stairs.
| Enumerator | Value | Description |
|---|---|---|
ENTRANCE_AFTER_BRIGGS_BATTLE | 99 |
Definition at line 60 of file eastern_alhafra_ship.c.
anonymous enum
enum { METATILE_BELOW_THE_STAIRS }
The metatiles just below the foot of the stairs down from the cabin, (28, 24)
and (29, 24), where the party first overhears Briggs
(scEasternAlhafraShipMayorArrives).
| Enumerator | Value | Description |
|---|---|---|
METATILE_BELOW_THE_STAIRS | 20 |
Definition at line 68 of file eastern_alhafra_ship.c.
EASTERN_ALHAFRA_SHIP_ACTOR_ID
enum EASTERN_ALHAFRA_SHIP_ACTOR_ID
The people and things aboard, numbering the rows of
EasternAlhafraShipActorPlacements whose sprites are not the party's.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_BRIGGS | ACTOR_FIRST_PLACED | |
ACTOR_BRIGGS_MATE | Briggs's mate in the cabin: "He knew we needed a ship, and he knew we went east." | |
ACTOR_CHAUCHA | ||
ACTOR_EOLEO | ||
ACTOR_VASE | The vase of flowers Eoleo lifts with Psynergy. | |
ACTOR_TALL_CRATE | The tall crate before the back room's door, which Move or a push shifts aside (FLAG_CRATE_MOVED). | |
ACTOR_STACKED_CRATES | The stacked crates standing on another in the back room, which Tremor shakes down beside it. | |
ACTOR_LARGE_BREAD | The Large Bread on top of them, an item icon on an unseen marker. | |
ACTOR_ALHAFRAS_MAYOR | Those who come aboard after the battle, waiting off the map until then. | |
ACTOR_MADRAS_MAYOR | ||
ACTOR_MADRAS_ELDER | ||
ACTOR_MADRAN_SOLDIER | ||
ACTOR_ALHAFRAN_SOLDIER | Alhafra's soldiers. | |
ACTOR_SECOND_ALHAFRAN_SOLDIER | ||
ACTOR_FIRST_PIRATE | The rest of Briggs's crew, who come aboard with him after the battle. | |
ACTOR_SECOND_PIRATE | ||
ACTOR_THIRD_PIRATE | ||
ACTOR_KRADEN |
Definition at line 75 of file eastern_alhafra_ship.c.
Functions in detail
scEasternAlhafraShipBriggsIsCaught
void scEasternAlhafraShipBriggsIsCaught(void)
After the battle Briggs gives himself up. Chaucha pleads for him, and the mayors of Madra and Alhafra settle what becomes of him and his crew and take his ship for Madra.
References EasternAlhafraShipLeaveUpTheStairsScript, fdActorFaceDirection(), fdActorFaceDirectionById(), fdActorGetById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAnimationById(), fdActorSetAttachedEffect(), fdActorSetDestinationById(), fdActorSetMovementTypeById(), fdActorSetPosAndResetMotion(), fdActorSetSpriteFlags(), fdActorSetSpriteRotationById(), fdActorShowEmote(), fdActorShowEmoteById(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkBy(), fdActorWalkByAndWait(), fdActorWalkByAndWaitById(), fdActorWalkByById(), fdActorWalkToAndWait(), fdActorWalkToAndWaitById(), fdCameraFollowActor(), fdCameraMoveWithinMapBounds(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scActorPopQuestionMarks(), scEasternAlhafraShipCountAnswer(), scFieldActorSetSpriteRotationById(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptShowMessageThenWait(), scFieldScriptShowTwoMessagesAndWait() and Sint32.
Referenced by scInit().
Definition at lines 105 and 594 of file eastern_alhafra_ship.c.
scEasternAlhafraShipCountAnswer
void scEasternAlhafraShipCountAnswer()
Counts one more weird answer Felix gives (fdScriptCountAnswer, through the
overlay's stub).
Referenced by scEasternAlhafraShipBriggsIsCaught() and scEasternAlhafraShipMayorArrives().
Definition at line 112 of file eastern_alhafra_ship.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 114 of file eastern_alhafra_ship.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 119 of file eastern_alhafra_ship.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 124 of file eastern_alhafra_ship.c.
scGetActorPlacements
Sint32 scGetActorPlacements(void)
References EasternAlhafraShipActorPlacements and Sint32.
Definition at line 129 of file eastern_alhafra_ship.c.
scEasternAlhafraShipStartMovingCrate
void scEasternAlhafraShipStartMovingCrate(void)
Nothing visible happens as Felix begins to push or Move the tall crate in front of the back room's door; the push or Move goes on as anywhere else.
Referenced by SceneCues.
Definition at line 136 of file eastern_alhafra_ship.c.
scEasternAlhafraShipFinishMovingCrate
void scEasternAlhafraShipFinishMovingCrate(Sint32 unused, Sint32 id)
Felix pushes or Moves the tall crate standing against the north wall below the stairs. Shifted east to metatile (24, 40), it uncovers a dark doorway in the wall to the back room, and stays aside when the party comes back; shifted back west to (23, 40), it covers the doorway again.
References fdActorGetById(), Sint32, syGameFlagClear() and syGameFlagSet().
Referenced by SceneCues.
Definition at line 144 of file eastern_alhafra_ship.c.
scEasternAlhafraShipKnockDownTheBread
void scEasternAlhafraShipKnockDownTheBread(void)
Felix casts Tremor on the stacked crates in the back room: he hops back as they shift down beside the crate under them, and the Large Bread on top falls to the floor, where he can pick it up.
References fdActorFaceDirectionById(), fdActorGetById(), fdActorMoveToAndWaitById(), fdActorSetAnimationById(), fdActorSetDestination(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptWait(), MainRoutineStateWork, syGameFlagSet() and sySoundPlay().
Referenced by SceneCues.
Definition at line 159 of file eastern_alhafra_ship.c.
scEasternAlhafraShipTakeTheBread
void scEasternAlhafraShipTakeTheBread(Sint32 id)
Felix picks up the Large Bread that Tremor knocked to the floor of the back room.
References fdScriptPickUpItem() and Sint32.
Referenced by SceneCues.
Definition at line 182 of file eastern_alhafra_ship.c.
scEasternAlhafraShipEoleoLifts
void scEasternAlhafraShipEoleoLifts(Sint32 id)
Felix talks to the baby Eoleo, who stays aboard with his mother Chaucha once
Briggs is caught: "Goo goo ga ga!" He lifts the vase of flowers beside him
with Psynergy and drops it with a splash. The first time, Chaucha says he
only lately started doing that. The screen is tinted toward yellow
(fdStartColorTransition) while he holds the vase up.
References fdActorFaceDirection(), fdActorFaceDirectionById(), fdActorGetById(), fdActorRunRepeatedMotion(), fdBattleEffectEndArcEffect(), fdBattleEffectSetObjectUpdateMode(), fdBattleEffectStartArcEffect(), fdBattleEffectWaitForArcGroups(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessageAndWait(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), fdStartColorTransition(), fdStartPaletteTransition(), Sint32, syGameFlagSet() and sySoundPlay().
Referenced by SceneCues.
Definition at line 193 of file eastern_alhafra_ship.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 243 of file eastern_alhafra_ship.c.
scInit
Sint32 scInit(void)
Sets up the ship as the story stands: back from the battle, Briggs gives himself up; once he is caught his crew are gone, and Chaucha and Eoleo stay aboard after their visit to him, until the mast is cleared; and the tall crate, the stacked crates and the Large Bread are where the party left them.
References fdActorGetById(), fdActorShowItemIconById(), MainRoutineStateWork, scEasternAlhafraShipBriggsIsCaught(), Sint32, syGameFlagGet() and syGameFlagSet().
Definition at line 252 of file eastern_alhafra_ship.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 316 of file eastern_alhafra_ship.c.
scEasternAlhafraShipMayorArrives
void scEasternAlhafraShipMayorArrives(void)
Walking down from the foot of the stairs (metatiles (28, 24) and (29, 24)) on the first visit, the party overhears Briggs and his mate: Madra's mayor has come to Alhafra after them. Jenna's outburst gives the party away, and Briggs and a Sea Fighter of his crew fight it.
References EasternAlhafraShipBriggsRunsScript, EasternAlhafraShipMateRunsScript, fdActorFaceDirection(), fdActorFaceDirectionById(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetMovementTypeById(), fdActorShowEmote(), fdActorShowEmoteById(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkBy(), fdActorWalkByById(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork, result, scActorPopQuestionMarks(), scEasternAlhafraShipCountAnswer(), scFieldActorLaunchFromLeader(), scFieldScriptAskYesNoWithActorAnimation(), scFieldScriptShowMessageThenWait(), Sint32 and sySoundPlay().
Referenced by SceneCues.
Definition at line 330 of file eastern_alhafra_ship.c.
Variables in detail
EasternAlhafraShipActorPlacements
extern ACTOR_PLACE EasternAlhafraShipActorPlacements[]
ACTOR_PLACE EasternAlhafraShipActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 104 and 1905 of file eastern_alhafra_ship.c.
EasternAlhafraShipBriggsRunsScript
extern Uint32 EasternAlhafraShipBriggsRunsScript[]
Uint32 EasternAlhafraShipBriggsRunsScript[]
Briggs and his mate running out to the party once Jenna gives it away
(scEasternAlhafraShipMayorArrives).
Referenced by scEasternAlhafraShipMayorArrives().
Definition at lines 106 and 1828 of file eastern_alhafra_ship.c.
EasternAlhafraShipMateRunsScript
extern Sint32 EasternAlhafraShipMateRunsScript[]
Sint32 EasternAlhafraShipMateRunsScript[]
References Sint32.
Referenced by scEasternAlhafraShipMayorArrives().
Definition at lines 107 and 1846 of file eastern_alhafra_ship.c.
EasternAlhafraShipLeaveUpTheStairsScript
extern Uint32 EasternAlhafraShipLeaveUpTheStairsScript[]
Uint32 EasternAlhafraShipLeaveUpTheStairsScript[]
The way up the stairs and off the ship that Briggs, his crew and their guard take once he is caught.
Referenced by scEasternAlhafraShipBriggsIsCaught().
Definition at lines 108 and 1866 of file eastern_alhafra_ship.c.
QuestionMarkScript
extern Uint32 QuestionMarkScript[]
Uint32 QuestionMarkScript[]
The "?" bubbles scActorPopQuestionMarks pops: each frees itself once its wait
is over.
Referenced by scQuestionMarkPop().
Definition at lines 321 and 2001 of file eastern_alhafra_ship.c.
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
Referenced by scGetEntrances().
Definition at line 1875 of file eastern_alhafra_ship.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 1880 of file eastern_alhafra_ship.c.
SceneCues
CUE SceneCues[]
References scEasternAlhafraShipEoleoLifts(), scEasternAlhafraShipFinishMovingCrate(), scEasternAlhafraShipKnockDownTheBread(), scEasternAlhafraShipMayorArrives(), scEasternAlhafraShipStartMovingCrate() and scEasternAlhafraShipTakeTheBread().
Referenced by scGetCues().
Definition at line 1950 of file eastern_alhafra_ship.c.