Skip to Content
The Alchemy Project

src/scene/tolbi_ship_mast.c

Tolbi-bound Ship (SceneIdTolbiShipMast) is the top of the ship's mast, where the ship's lookout (ACTOR_LOOKOUT) keeps watch. More…

Enumerations

NameDescription
enumTOLBI_SHIP_MAST_ACTOR_ID { ACTOR_LOOKOUT }The scene's one actor placement row.
enumTOLBI_SHIP_MAST_FIRST_ATTACK_ACTOR_ID { ACTOR_SPARKLE, ACTOR_FIRST_SIGHTED_MONSTER }The first attack's actors (TOLBI_SHIP_MAST_FROM_WORLD_MAP_FIRST_ATTACK).
enumTOLBI_SHIP_MAST_ENSEMBLE_ACTOR_ID { ACTOR_FIRST_BIRD, ACTOR_SEAN, ACTOR_LANDING_MONSTER, ACTOR_L … }The actors of the later scripts, from TOLBI_SHIP_MAST_FROM_WORLD_MAP_SECOND_ATTACK on.
enumTOLBI_SHIP_MAST_METATILE_BEHAVIOR { METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER, METATILE_BEHAVIOR_ … }The mast's step cue and examine cue metatiles.
enumTOLBI_SHIP_MAST_DRIFT { DRIFT_INCREASING, DRIFT_DECREASING, DRIFT_HELD }Which way scTolbiShipMastDriftBird moves a bird along each axis.

Functions

NameDescription
static voidscTolbiShipMastWatchCourseFirstTime (void)The first time the ship sails, the view is set on the lookout alone, with the leader taken off the mast, before he calls the course clear.
static voidscTolbiShipMastWatchCourseAgain (void)On later departures the leader stands by, unseen, while the lookout calls the course clear.
static voidscTolbiShipMastAnnounceClearCourse (void)On the mast at TOLBI_SHIP_MAST_FROM_TOLBI_SHIP_DECK_COURSE_CLEAR, the lookout scans both sides and announces a clear course.
static voidscTolbiShipMastPlayFirstAttack (void)On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_FIRST_ATTACK, the first attack, three monsters close in and the lookout cries out.
static voidscTolbiShipMastPlaySecondAttack (void)On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_SECOND_ATTACK, the second attack, a bird swoops at the lookout twice and Sean cries out.
static voidscTolbiShipMastStartBirdDrifting (Sint32 actorId)Sets a bird drifting from a random start: heading east or west, rising or sinking, 6 to 9 pixels up and a quarter larger than its sheet.
static voidscTolbiShipMastPlayThirdAttack (void)On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_THIRD_ATTACK, the third attack, the birds scatter, then ACTOR_LANDING_MONSTER drops in beside the lookout.
static voidscTolbiShipMastAnnounceLand (void)On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_LAND_HO, the seven birds fly off, then the lookout announces land, and the rowing balance chooses the exit.
static voidscTolbiShipMastRockView (void)Rocks the view with the ship: adds a random swing across and up and down to the camera's origin each tick.
static Sint32scTolbiShipMastGetRowingBalance (void)The rowing balance of the chosen passengers.
static Sint32scTolbiShipMastGetSeatRowValue (Uint32 seat)The rowing value of the passenger chosen for a seat, or 0 while it is empty.
BSS_DATAALIGNED (16)How far the rocking has moved the view in all (scTolbiShipMastRockView), which nothing reads back, and the angles of its swing up and down and across.
static Sint32scTolbiShipMastTurnSparkle (ACTOR *actor)Each tick of the sparkle on the sea: it keeps its place against the rocking view and turns.
static Sint32scTolbiShipMastTurnLookoutAtRandom (ACTOR *actor)The lookout's watch: now and then (two chances in 64 a tick) he turns to look a little east or a little west of north.
static voidscTolbiShipMastGrowActorScale (ACTOR *actor)A sighted monster grows as it closes in, until it is full size.
static Sint32scTolbiShipMastDriftBird (ACTOR *actor)Each tick of a bird about the mast: it drifts east and west, speeding up and slowing by random amounts, and bobs up and down.
static Sint32scTolbiShipMastFlyBirdAway (ACTOR *actor)A bird flies off into the distance, growing smaller each tick; once small enough it is put away at the origin, standing still.
const SCENE_ENTRANCE *scGetEntrances (void)Returns the entrances, which are the one from the deck's ladder and the voyage's scripts.
const SCENE_EXIT_REGION *scGetExitRegions (void)Returns the top of the ladder, where climbing down takes the party to the deck.
const Uint32 *scGetExits (void)Returns exits to the deck and the continuing ship scenes.
const ACTOR_PLACE *scGetActorPlacements (void)Returns the lookout, the only actor placed.
const CUE *scGetCues (void)Returns the ladder, lookout dialogue and Anchor Charm examine cues.
static voidscTolbiShipMastClimbDownMast (void)Walking south onto the ladder at the mast's top (METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER) has the leader climb down.
static voidscTolbiShipMastFindAnchorCharm (void)Searching the mast's top for the captain's anchor charm (METATILE_BEHAVIOR_TOLBI_SHIP_MAST_ANCHOR_CHARM) gives the Anchor Charm once the crewman has been confronted or the warriors have gone to the captain.
Sint32scInit (void)The mast's setup rocks the view while the ship is under way, puts the lookout to his spot once the charm is back, and plays what the entrance calls for.
static inline voidscTolbiShipMastStopBirdDrifting (ACTOR *actor)Stops a bird's drift before it swoops.
static inline voidscTolbiShipMastStartBirdsDrifting (void)Sets each of the seven birds drifting about the mast in its own way.
static inline voidscTolbiShipMastStartBirdsFlyingOff (void)Stops the birds drifting and gives them the speed to fly off.

Variables

NameDescription
extern Sint32TolbiShipMastSparkleActions []
extern Sint32TolbiShipMastLookoutActions []
extern Sint32TolbiShipMastDriftActions []
extern Sint32ActorTrembleScript []An actor trembles: squashed narrow and a little tall, then sprung back over three ticks, every four ticks for as long as the script runs.
extern Sint32TolbiShipMastBirdDepartureA []
extern Sint32TolbiShipMastBirdDepartureB []
extern Sint32TolbiShipMastBirdDepartureC []
extern Sint32TolbiShipMastBirdDepartureD []
extern Sint32TolbiShipMastBirdDepartureE []
extern Sint32TolbiShipMastBirdDepartureF []
extern Uint32TolbiShipMastBirdDepartureG []
extern SCENE_ENTRANCETolbiShipMastEntrances []
extern SCENE_EXIT_REGIONTolbiShipMastRegions []
extern Uint32TolbiShipMastExits []
extern ACTOR_PLACETolbiShipMastActorPlacements []
extern ACTOR_PLACETolbiShipMastFirstAttackActorPlacements []
extern ACTOR_PLACETolbiShipMastBirdActorPlacements []
extern ACTOR_PLACETolbiShipMastLandingActorPlacements []
extern CUETolbiShipMastCues []
Sint32TolbiShipMastRockOffsetYHow far the rocking has moved the view in all (scTolbiShipMastRockView), which nothing reads back, and the angles of its swing up and down and across.
Sint32TolbiShipMastRockOffsetX
Sint32TolbiShipMastRockAngleY
Sint32TolbiShipMastRockUnusedUnused: nothing reads or writes it.
Sint32TolbiShipMastCameraCenter [2]Where the sparkle appears, and where the camera was then: the sparkle moves with the rocking camera across, and half as far up and down (scTolbiShipMastTurnSparkle).
Sint32TolbiShipMastCameraOrigin [2]
Sint32TolbiShipMastRockAngleX

Description

Tolbi-bound Ship (SceneIdTolbiShipMast) is the top of the ship's mast, where the ship's lookout (ACTOR_LOOKOUT) keeps watch.

It is one of the ship's three scenes on its voyage from Kalay to Tolbi, which tolbi_ship_deck.c describes.

The party climbs up by the deck's ladder (TOLBI_SHIP_MAST_TOLBI_SHIP_DECK). It climbs down again by METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER and the region of TOLBI_SHIP_MAST_TOLBI_SHIP_DECK.

The entrances from TOLBI_SHIP_MAST_FROM_TOLBI_SHIP_DECK_COURSE_CLEAR on are the voyage's scripts here, each leading on into the next. During the attacks the restart point (MainRoutineStateWork.restartScene) is set to SHIP_ROOMS_PASSENGER_HOLD_AFTER_DEFEAT, which starts the voyage over.

While the ship is under way, the setup rocks the view. The ship is under way when it is rowing, or at sea after the first attack, and neither at the island nor at Tolbi.

In story order:

At sea the lookout says he is the lookout, not an oarsman. At the island he warns of monsters and wonders at its treasures.

Enumerations in detail

TOLBI_SHIP_MAST_ACTOR_ID

enum TOLBI_SHIP_MAST_ACTOR_ID

The scene's one actor placement row.

EnumeratorValueDescription
ACTOR_LOOKOUTACTOR_FIRST_PLACEDThe ship's lookout is a man in a blue bandana (SPRITE_MAN_IN_BLUE_BANDANA). He is the crewman who hid the captain's anchor charm (ACTOR_KALAY_CREWMAN on deck, ACTOR_QUARTERS_CREWMAN below), in the same sprite. Mind Read on him at Kalay hears "I was the one who hid the anchor" (MsgTolbiShipHiddenAnchorDiscovered).

Definition at line 118 of file tolbi_ship_mast.c.

TOLBI_SHIP_MAST_FIRST_ATTACK_ACTOR_ID

enum TOLBI_SHIP_MAST_FIRST_ATTACK_ACTOR_ID

The first attack's actors (TOLBI_SHIP_MAST_FROM_WORLD_MAP_FIRST_ATTACK). They are placed after the lookout from TolbiShipMastFirstAttackActorPlacements.

EnumeratorValueDescription
ACTOR_SPARKLEACTOR_LOOKOUT + 1A sparkle, placed nowhere else. Its picture is graphics/sprite/glint.png, a four-pointed sparkle in eight shrinking ticks. It turns, swells for 10 ticks and shrinks for 24 (TolbiShipMastSparkleActions) where the monsters then appear.
ACTOR_FIRST_SIGHTED_MONSTERThe first of three monsters, all with the sprite of the first attack's monsters below decks (ShipRoomsFirstAttackMonsters). They grow from half size as they close in.

Definition at line 132 of file tolbi_ship_mast.c.

TOLBI_SHIP_MAST_ENSEMBLE_ACTOR_ID

enum TOLBI_SHIP_MAST_ENSEMBLE_ACTOR_ID

The actors of the later scripts, from TOLBI_SHIP_MAST_FROM_WORLD_MAP_SECOND_ATTACK on.

They are placed after the lookout from TolbiShipMastBirdActorPlacements and, at TOLBI_SHIP_MAST_FROM_WORLD_MAP_THIRD_ATTACK, then from TolbiShipMastLandingActorPlacements.

EnumeratorValueDescription
ACTOR_FIRST_BIRDACTOR_LOOKOUT + 1The first of seven birds, all of one sprite (SPRITE_BIRD, a white bird in three wing poses). They flutter and bob about the mast (scTolbiShipMastDriftBird). One swoops at the lookout at the second attack. They scatter as the third attack's monster comes, and they fly off just before "Land ho!".
ACTOR_SEANACTOR_FIRST_BIRD + 7Sean, by the sprite he has in the hold (ACTOR_HOLD_SEAN, ship_rooms.c) and on deck (ACTOR_SEA_SEAN, tolbi_ship_deck.c). He cries "Monsters!" at the second attack.
ACTOR_LANDING_MONSTERThe sprite of the third attack's monster below decks (ShipRoomsThirdAttackMonsters). It drops in beside the lookout.
ACTOR_LANDING_MONSTER_SHADOWThe landing monster's shadow. A blank sprite (SPRITE_BLANK) draws only its shadow, which grows from a tenth of its size where ACTOR_LANDING_MONSTER drops, then follows the monster away. tolbi_ship_deck.c's ACTOR_SEA_FALLING_MONSTER_SHADOW does the same.

Definition at line 154 of file tolbi_ship_mast.c.

TOLBI_SHIP_MAST_METATILE_BEHAVIOR

enum TOLBI_SHIP_MAST_METATILE_BEHAVIOR

The mast's step cue and examine cue metatiles.

EnumeratorValueDescription
METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER10the top of the ladder down to the deck
METATILE_BEHAVIOR_TOLBI_SHIP_MAST_ANCHOR_CHARM11Where the crewman hid the captain's anchor charm.

Definition at line 188 of file tolbi_ship_mast.c.

TOLBI_SHIP_MAST_DRIFT

enum TOLBI_SHIP_MAST_DRIFT

Which way scTolbiShipMastDriftBird moves a bird along each axis. It is kept in the actor's timer (the drift) and its userValue (the bob).

EnumeratorValueDescription
DRIFT_INCREASING0the drift speeding up, or the bob rising
DRIFT_DECREASING1the drift slowing, or the bob sinking
DRIFT_HELD9held at zero; nothing here sets it

Definition at line 243 of file tolbi_ship_mast.c.

Functions in detail

scTolbiShipMastWatchCourseFirstTime

static void scTolbiShipMastWatchCourseFirstTime(void)

The first time the ship sails, the view is set on the lookout alone, with the leader taken off the mast, before he calls the course clear.

References fdCameraGetActor(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), scTolbiShipMastAnnounceClearCourse() and sySynch().

Referenced by scInit().

Definition at lines 91 and 461 of file tolbi_ship_mast.c.

scTolbiShipMastWatchCourseAgain

static void scTolbiShipMastWatchCourseAgain(void)

On later departures the leader stands by, unseen, while the lookout calls the course clear.

References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), scTolbiShipMastAnnounceClearCourse() and sySynch().

Referenced by scInit().

Definition at lines 92 and 477 of file tolbi_ship_mast.c.

scTolbiShipMastAnnounceClearCourse

static void scTolbiShipMastAnnounceClearCourse(void)

On the mast at TOLBI_SHIP_MAST_FROM_TOLBI_SHIP_DECK_COURSE_CLEAR, the lookout scans both sides and announces a clear course.

References fdActorFaceDirection(), fdActorJump(), fdActorStartRepeatedMotion(), fdActorWalkToAndWait(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks() and syImportScriptSetExitRequest().

Referenced by scTolbiShipMastWatchCourseAgain() and scTolbiShipMastWatchCourseFirstTime().

Definition at lines 93 and 492 of file tolbi_ship_mast.c.

scTolbiShipMastPlayFirstAttack

static void scTolbiShipMastPlayFirstAttack(void)

On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_FIRST_ATTACK, the first attack, three monsters close in and the lookout cries out. "Avast!"

References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetDestination(), fdActorSetPosFX(), fdActorSetScript(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWalkToAndWait(), fdScriptAppendActorPlacements(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), scTolbiShipMastGrowActorScale(), Sint32, syImportScriptSetExitRequest(), sySoundPlay(), sySynch(), TolbiShipMastCameraCenter, TolbiShipMastCameraOrigin, TolbiShipMastFirstAttackActorPlacements, TolbiShipMastLookoutActions and TolbiShipMastSparkleActions.

Referenced by scInit().

Definition at lines 94 and 518 of file tolbi_ship_mast.c.

scTolbiShipMastPlaySecondAttack

static void scTolbiShipMastPlaySecondAttack(void)

On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_SECOND_ATTACK, the second attack, a bird swoops at the lookout twice and Sean cries out. "Monsters!"

References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetScript(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorStop(), fdActorWaitForMove(), fdActorWalkToAndWait(), fdScriptAppendActorPlacements(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), scTolbiShipMastStartBirdDrifting(), scTolbiShipMastStartBirdsDrifting(), scTolbiShipMastStopBirdDrifting(), syImportScriptSetExitRequest(), sySoundPlay(), sySynch(), TolbiShipMastBirdActorPlacements and TolbiShipMastLookoutActions.

Referenced by scInit().

Definition at lines 95 and 644 of file tolbi_ship_mast.c.

scTolbiShipMastStartBirdDrifting

static void scTolbiShipMastStartBirdDrifting(Sint32 actorId)

Sets a bird drifting from a random start: heading east or west, rising or sinking, 6 to 9 pixels up and a quarter larger than its sheet.

References fdActorGet(), fdActorSetScript(), fdActorSetSpritePriority(), Sint32 and TolbiShipMastDriftActions.

Referenced by scTolbiShipMastPlaySecondAttack() and scTolbiShipMastStartBirdsDrifting().

Definition at lines 96 and 726 of file tolbi_ship_mast.c.

scTolbiShipMastPlayThirdAttack

static void scTolbiShipMastPlayThirdAttack(void)

On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_THIRD_ATTACK, the third attack, the birds scatter, then ACTOR_LANDING_MONSTER drops in beside the lookout.

References ActorTrembleScript, fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorRunRepeatedMotion(), fdActorSetDestination(), fdActorSetScript(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStop(), fdActorWalkToAndWait(), fdScriptAppendActorPlacements(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), scTolbiShipMastStartBirdsDrifting(), scTolbiShipMastStartBirdsFlyingOff(), syImportScriptSetExitRequest(), sySoundPlay(), sySynch(), TolbiShipMastBirdActorPlacements, TolbiShipMastLandingActorPlacements and TolbiShipMastLookoutActions.

Referenced by scInit().

Definition at lines 97 and 744 of file tolbi_ship_mast.c.

scTolbiShipMastAnnounceLand

static void scTolbiShipMastAnnounceLand(void)

On the mast at TOLBI_SHIP_MAST_FROM_WORLD_MAP_LAND_HO, the seven birds fly off, then the lookout announces land, and the rowing balance chooses the exit.

References fdActorGet(), fdActorJump(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWalkToAndWait(), fdScriptAppendActorPlacements(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), MainRoutineStateWork, scTolbiShipMastGetRowingBalance(), scTolbiShipMastStartBirdsDrifting(), scTolbiShipMastStartBirdsFlyingOff(), syImportScriptSetExitRequest(), sySynch(), TolbiShipMastBirdActorPlacements, TolbiShipMastBirdDepartureA, TolbiShipMastBirdDepartureB, TolbiShipMastBirdDepartureC, TolbiShipMastBirdDepartureD, TolbiShipMastBirdDepartureE, TolbiShipMastBirdDepartureF, TolbiShipMastBirdDepartureG and TolbiShipMastLookoutActions.

Referenced by scInit().

Definition at lines 98 and 853 of file tolbi_ship_mast.c.

scTolbiShipMastRockView

static void scTolbiShipMastRockView(void)

Rocks the view with the ship: adds a random swing across and up and down to the camera's origin each tick.

References Sint32, syCos(), sySin(), TolbiShipMastRockAngleX, TolbiShipMastRockAngleY, TolbiShipMastRockOffsetX and TolbiShipMastRockOffsetY.

Referenced by scInit().

Definition at lines 99 and 915 of file tolbi_ship_mast.c.

scTolbiShipMastGetRowingBalance

static Sint32 scTolbiShipMastGetRowingBalance(void)

The rowing balance of the chosen passengers. It is the values of those at the west seats (the first and third filled) less those at the east seats.

References scTolbiShipMastGetSeatRowValue() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 100 and 934 of file tolbi_ship_mast.c.

scTolbiShipMastGetSeatRowValue

static Sint32 scTolbiShipMastGetSeatRowValue(Uint32 seat)

The rowing value of the passenger chosen for a seat, or 0 while it is empty.

References gmFlagGet(), Sint32 and TolbiShipPassengerRowValues.

Referenced by scTolbiShipMastGetRowingBalance().

Definition at lines 101 and 947 of file tolbi_ship_mast.c.

scTolbiShipMastTurnSparkle

static Sint32 scTolbiShipMastTurnSparkle(ACTOR *actor)

Each tick of the sparkle on the sea: it keeps its place against the rocking view and turns.

References Sint32, TolbiShipMastCameraCenter and TolbiShipMastCameraOrigin.

Referenced by TolbiShipMastSparkleActions.

Definition at line 199 of file tolbi_ship_mast.c.

scTolbiShipMastTurnLookoutAtRandom

static Sint32 scTolbiShipMastTurnLookoutAtRandom(ACTOR *actor)

The lookout's watch: now and then (two chances in 64 a tick) he turns to look a little east or a little west of north.

References Sint32.

Referenced by TolbiShipMastLookoutActions.

Definition at line 215 of file tolbi_ship_mast.c.

scTolbiShipMastGrowActorScale

static void scTolbiShipMastGrowActorScale(ACTOR *actor)

A sighted monster grows as it closes in, until it is full size.

Referenced by scTolbiShipMastPlayFirstAttack().

Definition at line 232 of file tolbi_ship_mast.c.

scTolbiShipMastDriftBird

static Sint32 scTolbiShipMastDriftBird(ACTOR *actor)

Each tick of a bird about the mast: it drifts east and west, speeding up and slowing by random amounts, and bobs up and down.

References Sint32.

Referenced by TolbiShipMastDriftActions.

Definition at line 252 of file tolbi_ship_mast.c.

scTolbiShipMastFlyBirdAway

static Sint32 scTolbiShipMastFlyBirdAway(ACTOR *actor)

A bird flies off into the distance, growing smaller each tick; once small enough it is put away at the origin, standing still.

References Sint32.

Referenced by TolbiShipMastBirdDepartureA, TolbiShipMastBirdDepartureB, TolbiShipMastBirdDepartureC, TolbiShipMastBirdDepartureD, TolbiShipMastBirdDepartureE, TolbiShipMastBirdDepartureF and TolbiShipMastBirdDepartureG.

Definition at line 306 of file tolbi_ship_mast.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

Returns the entrances, which are the one from the deck's ladder and the voyage's scripts.

References TolbiShipMastEntrances.

Definition at line 330 of file tolbi_ship_mast.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Returns the top of the ladder, where climbing down takes the party to the deck.

References TolbiShipMastRegions.

Definition at line 337 of file tolbi_ship_mast.c.

scGetExits

const Uint32 *scGetExits(void)

Returns exits to the deck and the continuing ship scenes.

References TolbiShipMastExits.

Definition at line 343 of file tolbi_ship_mast.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Returns the lookout, the only actor placed.

References TolbiShipMastActorPlacements.

Definition at line 349 of file tolbi_ship_mast.c.

scGetCues

const CUE *scGetCues(void)

Returns the ladder, lookout dialogue and Anchor Charm examine cues.

References TolbiShipMastCues.

Definition at line 355 of file tolbi_ship_mast.c.

scTolbiShipMastClimbDownMast

static void scTolbiShipMastClimbDownMast(void)

Walking south onto the ladder at the mast's top (METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER) has the leader climb down.

References fdClimbDown().

Referenced by TolbiShipMastCues.

Definition at line 362 of file tolbi_ship_mast.c.

scTolbiShipMastFindAnchorCharm

static void scTolbiShipMastFindAnchorCharm(void)

Searching the mast's top for the captain's anchor charm (METATILE_BEHAVIOR_TOLBI_SHIP_MAST_ANCHOR_CHARM) gives the Anchor Charm once the crewman has been confronted or the warriors have gone to the captain.

References fdScriptEnd(), fdScriptStart(), gmFlagGet(), gmFlagSet(), gmItemShowFound() and gmPartyGiveItem().

Referenced by TolbiShipMastCues.

Definition at line 370 of file tolbi_ship_mast.c.

scInit

Sint32 scInit(void)

The mast's setup rocks the view while the ship is under way, puts the lookout to his spot once the charm is back, and plays what the entrance calls for.

References fdActorGet(), fdCameraFollowActor(), fdClimbUp(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptStart(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scTolbiShipMastAnnounceLand(), scTolbiShipMastPlayFirstAttack(), scTolbiShipMastPlaySecondAttack(), scTolbiShipMastPlayThirdAttack(), scTolbiShipMastRockView(), scTolbiShipMastWatchCourseAgain(), scTolbiShipMastWatchCourseFirstTime(), Sint32, syRandomNext(), sySetTickEvent(), sySynch(), TolbiShipMastRockAngleX and TolbiShipMastRockAngleY.

Definition at line 385 of file tolbi_ship_mast.c.

scTolbiShipMastStopBirdDrifting

static inline void scTolbiShipMastStopBirdDrifting(ACTOR *actor)

Stops a bird's drift before it swoops.

Referenced by scTolbiShipMastPlaySecondAttack().

Definition at line 602 of file tolbi_ship_mast.c.

scTolbiShipMastStartBirdsDrifting

static inline void scTolbiShipMastStartBirdsDrifting(void)

Sets each of the seven birds drifting about the mast in its own way.

References scTolbiShipMastStartBirdDrifting().

Referenced by scTolbiShipMastAnnounceLand(), scTolbiShipMastPlaySecondAttack() and scTolbiShipMastPlayThirdAttack().

Definition at line 612 of file tolbi_ship_mast.c.

scTolbiShipMastStartBirdsFlyingOff

static inline void scTolbiShipMastStartBirdsFlyingOff(void)

Stops the birds drifting and gives them the speed to fly off.

References fdActorStop().

Referenced by scTolbiShipMastAnnounceLand() and scTolbiShipMastPlayThirdAttack().

Definition at line 624 of file tolbi_ship_mast.c.

Variables in detail

TolbiShipMastSparkleActions

extern Sint32 TolbiShipMastSparkleActions[]

Sint32 TolbiShipMastSparkleActions[]

References scTolbiShipMastTurnSparkle() and Sint32.

Referenced by scTolbiShipMastPlayFirstAttack().

Definition at lines 71 and 967 of file tolbi_ship_mast.c.

TolbiShipMastLookoutActions

extern Sint32 TolbiShipMastLookoutActions[]

Sint32 TolbiShipMastLookoutActions[]

References scTolbiShipMastTurnLookoutAtRandom() and Sint32.

Referenced by scTolbiShipMastAnnounceLand(), scTolbiShipMastPlayFirstAttack(), scTolbiShipMastPlaySecondAttack() and scTolbiShipMastPlayThirdAttack().

Definition at lines 72 and 984 of file tolbi_ship_mast.c.

TolbiShipMastDriftActions

extern Sint32 TolbiShipMastDriftActions[]

Sint32 TolbiShipMastDriftActions[]

References scTolbiShipMastDriftBird() and Sint32.

Referenced by scTolbiShipMastStartBirdDrifting().

Definition at lines 73 and 988 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureA

extern Sint32 TolbiShipMastBirdDepartureA[]

Sint32 TolbiShipMastBirdDepartureA[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 75 and 994 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureB

extern Sint32 TolbiShipMastBirdDepartureB[]

Sint32 TolbiShipMastBirdDepartureB[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 76 and 1002 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureC

extern Sint32 TolbiShipMastBirdDepartureC[]

Sint32 TolbiShipMastBirdDepartureC[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 77 and 1010 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureD

extern Sint32 TolbiShipMastBirdDepartureD[]

Sint32 TolbiShipMastBirdDepartureD[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 78 and 1018 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureE

extern Sint32 TolbiShipMastBirdDepartureE[]

Sint32 TolbiShipMastBirdDepartureE[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 79 and 1026 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureF

extern Sint32 TolbiShipMastBirdDepartureF[]

Sint32 TolbiShipMastBirdDepartureF[]

References scTolbiShipMastFlyBirdAway() and Sint32.

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 80 and 1034 of file tolbi_ship_mast.c.

TolbiShipMastBirdDepartureG

extern Uint32 TolbiShipMastBirdDepartureG[]

Uint32 TolbiShipMastBirdDepartureG[]

References scTolbiShipMastFlyBirdAway().

Referenced by scTolbiShipMastAnnounceLand().

Definition at lines 81 and 1043 of file tolbi_ship_mast.c.

TolbiShipMastEntrances

extern SCENE_ENTRANCE TolbiShipMastEntrances[]

SCENE_ENTRANCE TolbiShipMastEntrances[]

Referenced by scGetEntrances().

Definition at lines 82 and 1055 of file tolbi_ship_mast.c.

TolbiShipMastRegions

extern SCENE_EXIT_REGION TolbiShipMastRegions[]

SCENE_EXIT_REGION TolbiShipMastRegions[]

Referenced by scGetExitRegions().

Definition at lines 83 and 1072 of file tolbi_ship_mast.c.

TolbiShipMastExits

extern Uint32 TolbiShipMastExits[]

Uint32 TolbiShipMastExits[]

Referenced by scGetExits().

Definition at lines 84 and 1077 of file tolbi_ship_mast.c.

TolbiShipMastActorPlacements

extern ACTOR_PLACE TolbiShipMastActorPlacements[]

ACTOR_PLACE TolbiShipMastActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 85 and 1096 of file tolbi_ship_mast.c.

TolbiShipMastFirstAttackActorPlacements

extern ACTOR_PLACE TolbiShipMastFirstAttackActorPlacements[]

ACTOR_PLACE TolbiShipMastFirstAttackActorPlacements[]

Referenced by scTolbiShipMastPlayFirstAttack().

Definition at lines 86 and 1102 of file tolbi_ship_mast.c.

TolbiShipMastBirdActorPlacements

extern ACTOR_PLACE TolbiShipMastBirdActorPlacements[]

ACTOR_PLACE TolbiShipMastBirdActorPlacements[]

Referenced by scTolbiShipMastAnnounceLand(), scTolbiShipMastPlaySecondAttack() and scTolbiShipMastPlayThirdAttack().

Definition at lines 87 and 1114 of file tolbi_ship_mast.c.

TolbiShipMastLandingActorPlacements

extern ACTOR_PLACE TolbiShipMastLandingActorPlacements[]

ACTOR_PLACE TolbiShipMastLandingActorPlacements[]

Referenced by scTolbiShipMastPlayThirdAttack().

Definition at lines 88 and 1134 of file tolbi_ship_mast.c.

TolbiShipMastCues

extern CUE TolbiShipMastCues[]

CUE TolbiShipMastCues[]

References scTolbiShipMastClimbDownMast() and scTolbiShipMastFindAnchorCharm().

Referenced by scGetCues().

Definition at lines 89 and 1142 of file tolbi_ship_mast.c.

TolbiShipMastRockOffsetY

Sint32 TolbiShipMastRockOffsetY

How far the rocking has moved the view in all (scTolbiShipMastRockView), which nothing reads back, and the angles of its swing up and down and across.

References Sint32.

Referenced by scTolbiShipMastRockView().

Definition at line 105 of file tolbi_ship_mast.c.

TolbiShipMastRockOffsetX

Sint32 TolbiShipMastRockOffsetX

References Sint32.

Referenced by scTolbiShipMastRockView().

Definition at line 106 of file tolbi_ship_mast.c.

TolbiShipMastRockAngleY

Sint32 TolbiShipMastRockAngleY

References Sint32.

Referenced by scInit() and scTolbiShipMastRockView().

Definition at line 107 of file tolbi_ship_mast.c.

TolbiShipMastRockUnused

Sint32 TolbiShipMastRockUnused

Unused: nothing reads or writes it.

References Sint32.

Definition at line 109 of file tolbi_ship_mast.c.

TolbiShipMastCameraCenter

Sint32 TolbiShipMastCameraCenter[2]

Where the sparkle appears, and where the camera was then: the sparkle moves with the rocking camera across, and half as far up and down (scTolbiShipMastTurnSparkle).

References Sint32.

Referenced by scTolbiShipMastPlayFirstAttack() and scTolbiShipMastTurnSparkle().

Definition at line 113 of file tolbi_ship_mast.c.

TolbiShipMastCameraOrigin

Sint32 TolbiShipMastCameraOrigin[2]

References Sint32.

Referenced by scTolbiShipMastPlayFirstAttack() and scTolbiShipMastTurnSparkle().

Definition at line 114 of file tolbi_ship_mast.c.

TolbiShipMastRockAngleX

Sint32 TolbiShipMastRockAngleX

References Sint32.

Referenced by scInit() and scTolbiShipMastRockView().

Definition at line 115 of file tolbi_ship_mast.c.

On this page

EnumerationsFunctionsVariablesDescriptionEnumerations in detailTOLBI_SHIP_MAST_ACTOR_IDTOLBI_SHIP_MAST_FIRST_ATTACK_ACTOR_IDTOLBI_SHIP_MAST_ENSEMBLE_ACTOR_IDTOLBI_SHIP_MAST_METATILE_BEHAVIORTOLBI_SHIP_MAST_DRIFTFunctions in detailscTolbiShipMastWatchCourseFirstTimescTolbiShipMastWatchCourseAgainscTolbiShipMastAnnounceClearCoursescTolbiShipMastPlayFirstAttackscTolbiShipMastPlaySecondAttackscTolbiShipMastStartBirdDriftingscTolbiShipMastPlayThirdAttackscTolbiShipMastAnnounceLandscTolbiShipMastRockViewscTolbiShipMastGetRowingBalancescTolbiShipMastGetSeatRowValuescTolbiShipMastTurnSparklescTolbiShipMastTurnLookoutAtRandomscTolbiShipMastGrowActorScalescTolbiShipMastDriftBirdscTolbiShipMastFlyBirdAwayscGetEntrancesscGetExitRegionsscGetExitsscGetActorPlacementsscGetCuesscTolbiShipMastClimbDownMastscTolbiShipMastFindAnchorCharmscInitscTolbiShipMastStopBirdDriftingscTolbiShipMastStartBirdsDriftingscTolbiShipMastStartBirdsFlyingOffVariables in detailTolbiShipMastSparkleActionsTolbiShipMastLookoutActionsTolbiShipMastDriftActionsTolbiShipMastBirdDepartureATolbiShipMastBirdDepartureBTolbiShipMastBirdDepartureCTolbiShipMastBirdDepartureDTolbiShipMastBirdDepartureETolbiShipMastBirdDepartureFTolbiShipMastBirdDepartureGTolbiShipMastEntrancesTolbiShipMastRegionsTolbiShipMastExitsTolbiShipMastActorPlacementsTolbiShipMastFirstAttackActorPlacementsTolbiShipMastBirdActorPlacementsTolbiShipMastLandingActorPlacementsTolbiShipMastCuesTolbiShipMastRockOffsetYTolbiShipMastRockOffsetXTolbiShipMastRockAngleYTolbiShipMastRockUnusedTolbiShipMastCameraCenterTolbiShipMastCameraOriginTolbiShipMastRockAngleX