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…
#include "ability_ids.h"#include "item_ids.h"#include "macros.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "field/map_grid.h"#include "graphics/graphics.h"#include "scene/tolbi_ship.h"#include "text/msg_ids.h"#include "shared/tremble_script.c"#include "shared/tolbi_ship_rowing.c"
Enumerations
| Name | Description | |
|---|---|---|
enum | TOLBI_SHIP_MAST_ACTOR_ID { ACTOR_LOOKOUT } | The scene's one actor placement row. |
enum | TOLBI_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). |
enum | TOLBI_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. |
enum | TOLBI_SHIP_MAST_METATILE_BEHAVIOR { METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER, METATILE_BEHAVIOR_ … } | The mast's step cue and examine cue metatiles. |
enum | TOLBI_SHIP_MAST_DRIFT { DRIFT_INCREASING, DRIFT_DECREASING, DRIFT_HELD } | Which way scTolbiShipMastDriftBird moves a bird along each axis. |
Functions
| Name | Description | |
|---|---|---|
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. |
static void | scTolbiShipMastWatchCourseAgain (void) | On later departures the leader stands by, unseen, while the lookout calls the course clear. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
static Sint32 | scTolbiShipMastGetRowingBalance (void) | The rowing balance of the chosen passengers. |
static Sint32 | scTolbiShipMastGetSeatRowValue (Uint32 seat) | The rowing value of the passenger chosen for a seat, or 0 while it is empty. |
BSS_DATA | ALIGNED (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 Sint32 | scTolbiShipMastTurnSparkle (ACTOR *actor) | Each tick of the sparkle on the sea: it keeps its place against the rocking view and turns. |
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. |
static void | scTolbiShipMastGrowActorScale (ACTOR *actor) | A sighted monster grows as it closes in, until it is full size. |
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. |
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. |
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 void | scTolbiShipMastClimbDownMast (void) | Walking south onto the ladder at the mast's top (METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER) has the leader climb down. |
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. |
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. |
static inline void | scTolbiShipMastStopBirdDrifting (ACTOR *actor) | Stops a bird's drift before it swoops. |
static inline void | scTolbiShipMastStartBirdsDrifting (void) | Sets each of the seven birds drifting about the mast in its own way. |
static inline void | scTolbiShipMastStartBirdsFlyingOff (void) | Stops the birds drifting and gives them the speed to fly off. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | TolbiShipMastSparkleActions [] | |
extern Sint32 | TolbiShipMastLookoutActions [] | |
extern Sint32 | TolbiShipMastDriftActions [] | |
extern Sint32 | ActorTrembleScript [] | 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 Sint32 | TolbiShipMastBirdDepartureA [] | |
extern Sint32 | TolbiShipMastBirdDepartureB [] | |
extern Sint32 | TolbiShipMastBirdDepartureC [] | |
extern Sint32 | TolbiShipMastBirdDepartureD [] | |
extern Sint32 | TolbiShipMastBirdDepartureE [] | |
extern Sint32 | TolbiShipMastBirdDepartureF [] | |
extern Uint32 | TolbiShipMastBirdDepartureG [] | |
extern SCENE_ENTRANCE | TolbiShipMastEntrances [] | |
extern SCENE_EXIT_REGION | TolbiShipMastRegions [] | |
extern Uint32 | TolbiShipMastExits [] | |
extern ACTOR_PLACE | TolbiShipMastActorPlacements [] | |
extern ACTOR_PLACE | TolbiShipMastFirstAttackActorPlacements [] | |
extern ACTOR_PLACE | TolbiShipMastBirdActorPlacements [] | |
extern ACTOR_PLACE | TolbiShipMastLandingActorPlacements [] | |
extern CUE | TolbiShipMastCues [] | |
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. |
Sint32 | TolbiShipMastRockOffsetX | |
Sint32 | TolbiShipMastRockAngleY | |
Sint32 | TolbiShipMastRockUnused | Unused: nothing reads or writes it. |
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). |
Sint32 | TolbiShipMastCameraOrigin [2] | |
Sint32 | TolbiShipMastRockAngleX |
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 Kalay, while the ship waits for its replacement, the captain's anchor
charm, gone from his quarters, lies up here. Searching for it
(
METATILE_BEHAVIOR_TOLBI_SHIP_MAST_ANCHOR_CHARM) finds the Anchor Charm (FLAG_TOLBI_SHIP_ANCHOR_CHARM_FOUND). It does so only once the party has confronted the crewman on deck or the warriors have gone to the captain (FLAG_TOLBI_SHIP_CREWMAN_CAUGHTorFLAG_TOLBI_SHIP_WARRIORS_SEEK_CAPTAIN). The lookout is the crewman who hid it. Until the first attack, Mind Read on him has him wonder whether the party has worked out that he was the one. Once the charm is back the setup moves him to his lookout spot. - Under sail, at
TOLBI_SHIP_MAST_FROM_TOLBI_SHIP_DECK_COURSE_CLEAR, he scans both sides and calls the course clear, which leads below to the cast-off. The first time, the leader is moved out of view. On later departures he stands by. - The attacks.
TOLBI_SHIP_MAST_FROM_WORLD_MAP_FIRST_ATTACKis "Avast! Monsters sighted!", as three monsters appear where a sparkle twinkles and close in (FLAG_TOLBI_SHIP_MONSTERS_SIGHTED, which playsMUS_THE_SLEEPING_TREASURE_OF_ALTMILLER_CAVE). Then comes Sean's "Monsters!" after a bird swoops at the lookout (TOLBI_SHIP_MAST_FROM_WORLD_MAP_SECOND_ATTACK). Last is a monster dropping in beside the lookout (TOLBI_SHIP_MAST_FROM_WORLD_MAP_THIRD_ATTACK). Each leads below or to the deck. - Land. At
TOLBI_SHIP_MAST_FROM_WORLD_MAP_LAND_HOthe seven birds (ACTOR_FIRST_BIRD) fly away before "Land ho!". The rowing values of the passengers chosen to row (TolbiShipPassengerRowValues) decide where the ship comes in. The balance is those at the first and third seats less those at the second and fourth. A balance ofROWING_BALANCE_OFF_COURSEtakesTOLBI_SHIP_MAST_TO_TOLBI_SHIP_DECK_OFF_COURSE, off course to the island. Any other takesTOLBI_SHIP_MAST_TO_TOLBI_SHIP_DECK_LAND_SIGHTEDand Tolbi. Once the rowers have switched sides at the island the balance is the opposite, so the ship comes in to Tolbi.
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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_LOOKOUT | ACTOR_FIRST_PLACED | The 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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_SPARKLE | ACTOR_LOOKOUT + 1 | A 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_MONSTER | The 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.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_BIRD | ACTOR_LOOKOUT + 1 | The 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_SEAN | ACTOR_FIRST_BIRD + 7 | Sean, 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_MONSTER | The sprite of the third attack's monster below decks (ShipRoomsThirdAttackMonsters). It drops in beside the lookout. | |
ACTOR_LANDING_MONSTER_SHADOW | The 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.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_TOLBI_SHIP_MAST_LADDER | 10 | the top of the ladder down to the deck |
METATILE_BEHAVIOR_TOLBI_SHIP_MAST_ANCHOR_CHARM | 11 | Where 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).
| Enumerator | Value | Description |
|---|---|---|
DRIFT_INCREASING | 0 | the drift speeding up, or the bob rising |
DRIFT_DECREASING | 1 | the drift slowing, or the bob sinking |
DRIFT_HELD | 9 | held 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.