tolbi_ship_interiors.c
Below the decks of the ship across the Karagol Sea: the captain's cabin, the passengers' hold and the rowing deck.
games/tbs/src/scene/tolbi_ship_interiors.c on GitHub
Below the decks of the ship across the Karagol Sea: the captain's cabin, the passengers' hold and the rowing deck. After each monster attack the party chooses which passenger rows at the empty seat; the attacks fought off number the seat being filled, and each seat has a group of flags, one for each passenger.
Functions
TolbiShipInteriors_ResetActor
static s32 TolbiShipInteriors_ResetActor(struct ScriptInterpreter *interpreter)
An action-script call: stands the actor still at the origin, with no velocity and no target. Returns 0.
Used by gTolbiShipInteriors_FollowersRejoinBySeats, gTolbiShipInteriors_FollowersRejoinByStairs, gTolbiShipInteriors_FollowersRejoinMidDeck, gTolbiShipInteriors_LeaveCabin, gTolbiShipInteriors_LeaveHold.
TolbiShipInteriors_Bob
static s32 TolbiShipInteriors_Bob(struct ScriptInterpreter *interpreter)
Bobs the actor between the floor and 8 pixels up by a random amount each frame. Returns 1.
Used by gTolbiShipInteriors_MonsterBob.
TolbiShipInteriors_LookAround
static s32 TolbiShipInteriors_LookAround(struct ScriptInterpreter *interpreter)
Now and then (two chances in 64) turns the actor to face south-southeast or south-southwest. Returns 1.
Used by gTolbiShipInteriors_LookAroundScript.
TolbiShipInteriors_WaitThenAdvance
static void TolbiShipInteriors_WaitThenAdvance(struct FieldActor *actor)
Counts the frames of a pause in riseCounter and moves the pacing actor to its next step after 80 frames.
Used by TolbiShipInteriors_PaceCabin.
TolbiShipInteriors_HasArrived
static s32 TolbiShipInteriors_HasArrived(struct FieldActor *actor)
Counts down the actor's walking time in riseBaseY. Returns 1 once the time is up or the actor has reached its target, else 0.
Used by TolbiShipInteriors_PaceCabin.
TolbiShipInteriors_PaceCabin
static void TolbiShipInteriors_PaceCabin(union FieldObject *fieldObject)
The update of a crewman who paces between two spots in the cabin, looking about at each, and signals actor 9 through riseEnabled at three points of the round. While actor 8 is paused he sends no signals. work holds the step.
Used by TolbiShipInteriors_SetUpCabin.
TolbiShipInteriors_WatchPacer
static void TolbiShipInteriors_WatchPacer(union FieldObject *fieldObject)
The update of the actor who watches the pacing crewman: turns north-northeast at the first signal, shrugs at the second if still turned, and faces east at the third. Does nothing while paused.
Used by TolbiShipInteriors_SetUpCabin.
TolbiShipInteriors_LayFlat
static s32 TolbiShipInteriors_LayFlat(struct ScriptInterpreter *interpreter)
An action-script call: lays the actor flat on the floor, drawn underfoot at priority 1 with its parts hidden. Returns 1.
Used by gTolbiShipInteriors_LieFlatScript.
TolbiShipInteriors_SelectPlacements
const struct ScenePlacement *TolbiShipInteriors_SelectPlacements(void)
Picks the placements for the room entered and the voyage's stage. Some stages change who turns to face the party when talked to (talkFacing) in the shared tables.
TolbiShipInteriors_SelectEvents
const struct SceneEvent *TolbiShipInteriors_SelectEvents(void)
Chooses the room's interactions for the current stage of the voyage.
TolbiShipInteriors_TalkToCaptainsCabinActor10
static void TolbiShipInteriors_TalkToCaptainsCabinActor10(void)
Once the warriors want to see the captain, actor 10 asks whether the party wants to join them in forcing the launch.
Used by gTolbiShipInteriors_CabinEvents.
TolbiShipInteriors_TalkToCaptainsCabinActor12
static void TolbiShipInteriors_TalkToCaptainsCabinActor12(void)
Actor 12 in the captain's cabin asks whether the party came to ask the captain to set sail.
Used by gTolbiShipInteriors_CabinEvents.
TolbiShipInteriors_TalkToCaptain
static void TolbiShipInteriors_TalkToCaptain(void)
The captain, by the voyage's stage: too late to hire mercenaries, then his bad luck at losing his lucky anchor, then uncertain what might happen, and under sail the news of an injured oarsman. After finding the Anchor Charm, talking to him also sets the event work's unk172 request.
Used by gTolbiShipInteriors_CabinEvents.
TolbiShipInteriors_TalkToWaitingPassenger8
static void TolbiShipInteriors_TalkToWaitingPassenger8(void)
A passenger in the hold while the ship waits. Once the party has agreed to protect the ship, she worries the proud warriors won't like being told to row, and asks the party.
Used by gTolbiShipInteriors_HoldEvents.
TolbiShipInteriors_TalkToWaitingPassenger10
static void TolbiShipInteriors_TalkToWaitingPassenger10(void)
Another waiting passenger, once the party has agreed to protect the ship, asks whether it will row. "Are you going to row?"
Used by gTolbiShipInteriors_HoldEvents.
TolbiShipInteriors_RejoinParty
static inline void TolbiShipInteriors_RejoinParty(s32 rowerId)
Walks the rower back to the leader and hides its separate scene actor.
Used by TolbiShipInteriors_AskPassenger10ToRow, TolbiShipInteriors_AskPassenger11ToRow, TolbiShipInteriors_AskPassenger12ToRow, TolbiShipInteriors_AskPassenger13ToRow, TolbiShipInteriors_AskPassenger14ToRow, TolbiShipInteriors_AskPassenger15ToRow, TolbiShipInteriors_AskPassenger16ToRow, TolbiShipInteriors_AskPassenger8ToRow, TolbiShipInteriors_AskPassenger9ToRow.
TolbiShipInteriors_AskPassenger8ToRow
static void TolbiShipInteriors_AskPassenger8ToRow(void)
Passenger 8 under sail, when an oar needs a rower. If someone has already been chosen this round, the chosen passenger steps beside the leader and follows them out; otherwise the party may ask passenger 8 to row at the open seat.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger10ToRow
static void TolbiShipInteriors_AskPassenger10ToRow(void)
The same for passenger 10.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger11ToRow
static void TolbiShipInteriors_AskPassenger11ToRow(void)
The same for passenger 11, who is too seasick to talk once the ship is at anchor.
Used by gTolbiShipInteriors_HoldEventsAtIsland, gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger12ToRow
static void TolbiShipInteriors_AskPassenger12ToRow(void)
The same for passenger 12, written out in full rather than through TolbiShipInteriors_AskToRow.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger9ToRow
static void TolbiShipInteriors_AskPassenger9ToRow(void)
The same for passenger 9, written out in full.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger13ToRow
static void TolbiShipInteriors_AskPassenger13ToRow(void)
The same for passenger 13.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger14ToRow
static void TolbiShipInteriors_AskPassenger14ToRow(void)
The same for passenger 14.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger15ToRow
static void TolbiShipInteriors_AskPassenger15ToRow(void)
The same for passenger 15.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_AskPassenger16ToRow
static void TolbiShipInteriors_AskPassenger16ToRow(void)
The same for passenger 16.
Used by gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_FindActorNear
static struct FieldActor *TolbiShipInteriors_FindActorNear(s32 x, s32 z)
Finds a placed actor within twelve pixels of the requested floor position.
Used by TolbiShipInteriors_IsSpotFree.
TolbiShipInteriors_StepBesideLeader
static void TolbiShipInteriors_StepBesideLeader(s32 passengerId)
The chosen oarsman steps out beside the leader, on the leader's right if that spot is free, else on the left, else behind, and turns the way the leader faces.
Used by TolbiShipInteriors_AskPassenger10ToRow, TolbiShipInteriors_AskPassenger11ToRow, TolbiShipInteriors_AskPassenger12ToRow, TolbiShipInteriors_AskPassenger13ToRow, TolbiShipInteriors_AskPassenger14ToRow, TolbiShipInteriors_AskPassenger15ToRow, TolbiShipInteriors_AskPassenger16ToRow, TolbiShipInteriors_AskPassenger8ToRow, TolbiShipInteriors_AskPassenger9ToRow.
TolbiShipInteriors_IsSpotFree
static s32 TolbiShipInteriors_IsSpotFree(s32 bucket)
Returns 1 when the spot next to the leader in the given sixteenth of a turn holds no actor and no wall, else 0.
Used by TolbiShipInteriors_StepBesideLeader.
TolbiShipInteriors_GetChosenOarsman
static s32 TolbiShipInteriors_GetChosenOarsman(void)
Returns the passenger chosen to row at the open seat, which the attacks fought off number.
Used by TolbiShipInteriors_AskPassenger10ToRow, TolbiShipInteriors_AskPassenger11ToRow, TolbiShipInteriors_AskPassenger12ToRow, TolbiShipInteriors_AskPassenger13ToRow, TolbiShipInteriors_AskPassenger14ToRow, TolbiShipInteriors_AskPassenger15ToRow, TolbiShipInteriors_AskPassenger16ToRow, TolbiShipInteriors_AskPassenger8ToRow, TolbiShipInteriors_AskPassenger9ToRow.
TolbiShipInteriors_TalkToRower18
static void TolbiShipInteriors_TalkToRower18(void)
A passenger at the oars, by the round they were chosen in: Kaja's men are worried, monsters are everywhere, or the ship is starting to list.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower19
static void TolbiShipInteriors_TalkToRower19(void)
The same for rower 19.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower20
static void TolbiShipInteriors_TalkToRower20(void)
The same for rower 20.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower21
static void TolbiShipInteriors_TalkToRower21(void)
Rower 21 asks how many monsters are out there.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower22
static void TolbiShipInteriors_TalkToRower22(void)
The same as rower 18, for rower 22.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower23
static void TolbiShipInteriors_TalkToRower23(void)
The same for rower 23.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower24
static void TolbiShipInteriors_TalkToRower24(void)
The same for rower 24.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_TalkToRower25
static void TolbiShipInteriors_TalkToRower25(void)
As rower 21, for rower 25.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower18Mind
static void TolbiShipInteriors_ReadRower18Mind(void)
Mind Read on a rower, by the round they were chosen in. "Just hurry up and slay that beast!"
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower19Mind
static void TolbiShipInteriors_ReadRower19Mind(void)
The same for rower 19.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower20Mind
static void TolbiShipInteriors_ReadRower20Mind(void)
The same for rower 20.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower21Mind
static void TolbiShipInteriors_ReadRower21Mind(void)
Mind Read on rower 21: there are so many monsters at sea.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower22Mind
static void TolbiShipInteriors_ReadRower22Mind(void)
As rower 18, for rower 22.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower23Mind
static void TolbiShipInteriors_ReadRower23Mind(void)
The same for rower 23.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower24Mind
static void TolbiShipInteriors_ReadRower24Mind(void)
The same for rower 24.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_ReadRower25Mind
static void TolbiShipInteriors_ReadRower25Mind(void)
As rower 21, for rower 25.
Used by gTolbiShipInteriors_RowingDeckEventsKrakenAboard.
TolbiShipInteriors_AskToRow
static void TolbiShipInteriors_AskToRow(s32 speaker, s32 question, s32 seatFlag)
Asks a passenger to row. On yes they walk to the leader and leave with them, and the seat's flag for this passenger (seatFlag) and FLAG_TOLBI_SHIP_ROWER_CHOSEN are set; on no the next message refuses.
Used by TolbiShipInteriors_AskPassenger10ToRow, TolbiShipInteriors_AskPassenger11ToRow, TolbiShipInteriors_AskPassenger13ToRow, TolbiShipInteriors_AskPassenger14ToRow, TolbiShipInteriors_AskPassenger15ToRow, TolbiShipInteriors_AskPassenger16ToRow, TolbiShipInteriors_AskPassenger8ToRow.
TolbiShipInteriors_TalkToPriest
static void TolbiShipInteriors_TalkToPriest(void)
The travelling priest. From in front of him (the leader facing roughly east) he opens his sanctum; otherwise he talks by the voyage's stage. Under sail, until the ship is docked, he is actor 17, else actor 15.
Used by gTolbiShipInteriors_HoldEvents, gTolbiShipInteriors_HoldEventsAtIsland, gTolbiShipInteriors_HoldEventsChoosingRowers.
TolbiShipInteriors_FightMonstersInHold
static void TolbiShipInteriors_FightMonstersInHold(void)
Talking to one of the monsters in the hold (actors 36 to 38) starts the battle with them: group 62, its variant and the entrance the party comes back to chosen by how far the voyage has gone.
Used by gTolbiShipInteriors_RowingDeckEventsMonstersAboard.
TolbiShipInteriors_TurnBackFromStairs
static void TolbiShipInteriors_TurnBackFromStairs(void)
While the monsters are aboard, the leader is walked back from the stairs. "Where are you going, Isaac? Slay the beasts and save my mates!"
Used by gTolbiShipInteriors_RowingDeckEventsMonstersAboard.
TolbiShipInteriors_WatchCrewWonderAtDelay
static void TolbiShipInteriors_WatchCrewWonderAtDelay(void)
Once the warriors have gone to the captain, the three crewmen wonder what could have happened to the replacement ship.
Used by gTolbiShipInteriors_CabinEvents.
TolbiShipInteriors_WatchWarriorsStormOff
static void TolbiShipInteriors_WatchWarriorsStormOff(void)
Once the party has heard of the delay at Kalay: Ouranos threatens to go ashore if the ship doesn't sail. Actor 12 can't say when it will, so Sean and Ouranos set off to make the captain set sail, and actor 12 ("I don't want any violence!") hurries after them past the party.
Used by gTolbiShipInteriors_HoldEvents.
TolbiShipInteriors_DiscussLaunchingWithoutAnchor
static void TolbiShipInteriors_DiscussLaunchingWithoutAnchor(void)
The passengers pressure the captain to launch despite the missing anchor.
Used by TolbiShipInteriors_TalkToCaptainsCabinActor10.
TolbiShipInteriors_ReturnLuckyAnchor
static void TolbiShipInteriors_ReturnLuckyAnchor(void)
Returns the captain's lucky anchor and agrees to protect the ship.
Used by gTolbiShipInteriors_CabinEvents.
TolbiShipInteriors_ApplyEntryState
s32 TolbiShipInteriors_ApplyEntryState(void)
Restores the room or plays the event selected by this entrance.
TolbiShipInteriors_SetUpCabin
static void TolbiShipInteriors_SetUpCabin(void)
Restores the cabin's actors after the anchor and departure conversations.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_SetUpHold
static void TolbiShipInteriors_SetUpHold(void)
Restores the passenger hold after recruitment and departure events.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_SetUpRowingDeck
static void TolbiShipInteriors_SetUpRowingDeck(void)
Restores the rowing deck and introduces a newly recruited replacement.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_SetSeatActorCollision
static void TolbiShipInteriors_SetSeatActorCollision(void)
Sets collision bit 3 on the eight actors surrounding the rowing seats.
Used by TolbiShipInteriors_ReachIsland, TolbiShipInteriors_SetUpRowingDeck, TolbiShipInteriors_StartFirstAttack, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
TolbiShipInteriors_PlaceFoundActors
static void TolbiShipInteriors_PlaceFoundActors(s32 gated)
Puts each recruited rower at its seat and hides the original occupant.
Used by TolbiShipInteriors_EndSecondAttack, TolbiShipInteriors_EndThirdAttack, TolbiShipInteriors_IntroduceReplacementOarsman, TolbiShipInteriors_RunSceneCommand.
TolbiShipInteriors_AskForReplacementOarsmen
static void TolbiShipInteriors_AskForReplacementOarsmen(void)
The crew explains the missing replacements and asks the party to find rowers.
Used by TolbiShipInteriors_SetUpRowingDeck.
TolbiShipInteriors_CastOff
static void TolbiShipInteriors_CastOff(void)
Raises the anchor charm and announces the ship's first departure.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_AnnounceDeparture
static void TolbiShipInteriors_AnnounceDeparture(void)
Announces departure after a replacement rower has joined the crew.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_CallActorSixteenToRow
static void TolbiShipInteriors_CallActorSixteenToRow(void)
Calls the first passenger to the rowing deck.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_CallActorEighteenToRow
static void TolbiShipInteriors_CallActorEighteenToRow(void)
Calls a replacement rower back to the rowing deck.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_ShowRowing
static void TolbiShipInteriors_ShowRowing(void)
Restores the rowing deck for the current set of selected passengers.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_AskAboutMonsters
static void TolbiShipInteriors_AskAboutMonsters(void)
Asks the crew about the monsters before returning belowdecks.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_AnnounceTurn
static void TolbiShipInteriors_AnnounceTurn(void)
Announces the ship's next turn and returns control to the rowing deck.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_StartFirstAttack
static void TolbiShipInteriors_StartFirstAttack(void)
Stages the first monster encounter with the original rowers.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_EndFirstAttack
static void TolbiShipInteriors_EndFirstAttack(void)
Restores the original rowers after the first monster attack.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_IntroduceReplacementOarsman
static void TolbiShipInteriors_IntroduceReplacementOarsman(s32 seat)
Introduces the selected passenger and leads them to the open rowing seat.
Used by TolbiShipInteriors_SetUpRowingDeck.
TolbiShipInteriors_PlaceAnchorCharm
static struct FieldActor *TolbiShipInteriors_PlaceAnchorCharm(void)
Creates the visible anchor charm once a visit (FLAG_SCENE_TEMP_00 records it) and retains it for departure events.
Used by TolbiShipInteriors_CastOff, TolbiShipInteriors_RunSceneCommand, TolbiShipInteriors_SetUpCabin.
TolbiShipInteriors_InstallRowingDeckActors
static void TolbiShipInteriors_InstallRowingDeckActors(u32 action)
Restores each replacement rower or the original occupant of that seat.
Used by TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ShowRowing.
TolbiShipInteriors_PoseSceneActor
static void TolbiShipInteriors_PoseSceneActor(s32 id)
Applies the seated pose and rowing action assigned to this rower.
Used by TolbiShipInteriors_RunSceneCommand.
TolbiShipInteriors_Turn
static void TolbiShipInteriors_Turn(s32 actorId, u16 facing)
Turns an actor to a facing over 10 frames.
Used by TolbiShipInteriors_AskForReplacementOarsmen, TolbiShipInteriors_CastOff, TolbiShipInteriors_DiscussLaunchingWithoutAnchor, TolbiShipInteriors_DismissReplacementRowers, TolbiShipInteriors_IntroduceReplacementOarsman, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ReactToMonsterAttack, TolbiShipInteriors_ReportMonstersBelowdecks, TolbiShipInteriors_ReturnLuckyAnchor, TolbiShipInteriors_RunSceneCommand, TolbiShipInteriors_StepBesideLeader, TolbiShipInteriors_TalkToWaitingPassenger8, TolbiShipInteriors_TurnBackFromStairs, TolbiShipInteriors_WatchCrewWonderAtDelay, TolbiShipInteriors_WatchWarriorsStormOff.
TolbiShipInteriors_PlaceActor
static void TolbiShipInteriors_PlaceActor(s32 actorId, s32 x, s32 z, s32 facing)
Places an actor at pixel coordinates and sets its initial heading.
Used by TolbiShipInteriors_AskForReplacementOarsmen, TolbiShipInteriors_DismissReplacementRowers, TolbiShipInteriors_IntroduceReplacementOarsman, TolbiShipInteriors_PlaceFoundActors, TolbiShipInteriors_ReactToMonsterAttack, TolbiShipInteriors_RunSceneCommand, TolbiShipInteriors_SetUpCabin, TolbiShipInteriors_SetUpHold, TolbiShipInteriors_SetUpRowingDeck, TolbiShipInteriors_ShowCabinBeforeKraken.
TolbiShipInteriors_MoveCameraAndWait
static void TolbiShipInteriors_MoveCameraAndWait(s32 x, s32 y, s32 z, u32 flags)
Moves the camera, optionally waits or redraws, then honors the packed delay.
Used by TolbiShipInteriors_AskForReplacementOarsmen, TolbiShipInteriors_CallActorEighteenToRow, TolbiShipInteriors_CallActorSixteenToRow, TolbiShipInteriors_DiscussLaunchingWithoutAnchor, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ReactToMonsterAttack, TolbiShipInteriors_ReportMonstersBelowdecks, TolbiShipInteriors_RunSceneCommand, TolbiShipInteriors_WatchCrewWonderAtDelay, TolbiShipInteriors_WatchWarriorsStormOff.
TolbiShipInteriors_RunSceneCommand
static void TolbiShipInteriors_RunSceneCommand(s32 step, u32 arg, u32 opt)
Reuses the voyage's actor, camera, transition and selection operations. Each command names how it interprets the two arguments below.
Used by TolbiShipInteriors_AnnounceDeparture, TolbiShipInteriors_AnnounceTurn, TolbiShipInteriors_ApplyEntryState, TolbiShipInteriors_AskAboutMonsters, TolbiShipInteriors_AskForReplacementOarsmen, TolbiShipInteriors_CallActorEighteenToRow, TolbiShipInteriors_CallActorSixteenToRow, TolbiShipInteriors_CastOff, TolbiShipInteriors_DismissReplacementRowers, TolbiShipInteriors_EndFirstAttack, TolbiShipInteriors_EndSecondAttack, TolbiShipInteriors_EndThirdAttack, TolbiShipInteriors_InstallRowingDeckActors, TolbiShipInteriors_IntroduceReplacementOarsman, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ReactToMonsterAttack, TolbiShipInteriors_ReportMonstersBelowdecks, TolbiShipInteriors_ReturnLuckyAnchor, TolbiShipInteriors_SetUpCabin, TolbiShipInteriors_SetUpHold, TolbiShipInteriors_SetUpRowingDeck, TolbiShipInteriors_ShowCabinBeforeKraken, TolbiShipInteriors_ShowRowing, TolbiShipInteriors_StartFirstAttack, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
TolbiShipInteriors_FindFirstSetFlag
static s32 TolbiShipInteriors_FindFirstSetFlag(u32 group, s32 alternate)
Finds the selected passenger or rowing-deck actor for a seat's flag group.
Used by TolbiShipInteriors_DismissReplacementRowers, TolbiShipInteriors_EndSecondAttack, TolbiShipInteriors_EndThirdAttack, TolbiShipInteriors_GetChosenOarsman, TolbiShipInteriors_InstallRowingDeckActors, TolbiShipInteriors_IntroduceReplacementOarsman, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_PlaceFoundActors, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
TolbiShipInteriors_HideSelectedPassengers
static void TolbiShipInteriors_HideSelectedPassengers(void)
Hides the four passengers who are already filling rowing seats.
Used by TolbiShipInteriors_CallActorEighteenToRow, TolbiShipInteriors_SetUpHold.
TolbiShipInteriors_HideSelectedPassenger
static void TolbiShipInteriors_HideSelectedPassenger(s32 actorId, s32 firstFlag)
Hides the passenger whose selection flag is set in this seat's flag group.
Used by TolbiShipInteriors_HideSelectedPassengers.
TolbiShipInteriors_StartSecondAttack
static void TolbiShipInteriors_StartSecondAttack(void)
Stages the next monster encounter with one replacement rower.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_ReportMonstersBelowdecks
static void TolbiShipInteriors_ReportMonstersBelowdecks(void)
Gathers the party after the crew reports monsters belowdecks.
Used by TolbiShipInteriors_StartFirstAttack, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
TolbiShipInteriors_ReactToMonsterAttack
static void TolbiShipInteriors_ReactToMonsterAttack(void)
The crew checks on the party after the monster fight, then resumes rowing.
Used by TolbiShipInteriors_EndFirstAttack, TolbiShipInteriors_EndSecondAttack, TolbiShipInteriors_EndThirdAttack.
TolbiShipInteriors_EndSecondAttack
static void TolbiShipInteriors_EndSecondAttack(void)
Restores one replacement rower after the next monster attack.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_StartThirdAttack
static void TolbiShipInteriors_StartThirdAttack(void)
Stages the next monster encounter with two replacement rowers.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_EndThirdAttack
static void TolbiShipInteriors_EndThirdAttack(void)
Restores two replacement rowers after the next monster attack.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_NoticeShipRocking
static void TolbiShipInteriors_NoticeShipRocking(void)
The party notices the ship rocking and discusses the rowers' progress.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_ShakeWhileKrakenAboard
static void TolbiShipInteriors_ShakeWhileKrakenAboard(void)
Plays the intermittent voyage cue and restores its effect after ten frames.
Used by TolbiShipInteriors_ApplyEntryState, TolbiShipInteriors_NoticeShipRocking.
TolbiShipInteriors_ShowCabinBeforeKraken
static void TolbiShipInteriors_ShowCabinBeforeKraken(void)
Plays the short cabin exchange before returning to the voyage.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_ReachIsland
static void TolbiShipInteriors_ReachIsland(void)
Rests the rowers at the island and plays the selected passengers' responses.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_DismissReplacementRowers
static void TolbiShipInteriors_DismissReplacementRowers(void)
Returns the replacement rowers to their seats and exchanges their selections.
Used by TolbiShipInteriors_ApplyEntryState.
TolbiShipInteriors_SwapRowerSelections
static void TolbiShipInteriors_SwapRowerSelections(s32 firstSeatFlags, s32 secondSeatFlags)
Exchanges the chosen passengers between two rowing seats.
Used by TolbiShipInteriors_DismissReplacementRowers.
Also, functions without a comment: TolbiShipInteriors_SelectEntrances, TolbiShipInteriors_GetRegions, TolbiShipInteriors_GetExits, TolbiShipInteriors_Say.
Enumerations
ShipSceneCommand
enum ShipSceneCommand
Operations shared by the cabin, passenger hold and rowing-deck events.
| Value | = | |
|---|---|---|
SHIP_FACE_PARTY_EAST_AND_WEST | ||
SHIP_FACE_PARTY | ||
SHIP_PLAY_PARTY_ANIMATION | ||
SHIP_SHOW_PARTY_EMOTE | ||
SHIP_HIDE_PASSENGERS | ||
SHIP_START_ROWING_ANIMATION | ||
SHIP_START_MIRRORED_ROWING_ANIMATION | ||
SHIP_SET_SELECTED_ROWER_POSE | ||
SHIP_OPEN_SCENE | ||
SHIP_CLOSE_SCENE | ||
SHIP_SETUP_ROWING_PARTY | ||
SHIP_RESTORE_ROWING_DECK_POSES | ||
SHIP_RESTORE_ROWER_POSE | ||
SHIP_HIDE_CABIN_CREW | ||
SHIP_HIDE_ACTORS_13_AND_14 | ||
SHIP_SETUP_CAPTAINS_CABIN | ||
SHIP_SETUP_RECRUITMENT_DECK | ||
SHIP_HIDE_ACTORS_28_TO_35 | ||
SHIP_SETUP_PASSENGER_HOLD | ||
SHIP_SETUP_MONSTER_ENCOUNTER | ||
SHIP_CLEAR_FLAG_RANGE | ||
SHIP_CLEAR_ROWING_SELECTIONS | ||
SHIP_RESTORE_ACTOR_12_SCRIPT | ||
SHIP_HIDE_PARTY_FOLLOWERS | ||
SHIP_RESET_CAMERA | ||
SHIP_PLACE_FOLLOWERS_AND_MONSTERS |
TolbiShipInteriorsActor
enum TolbiShipInteriorsActor
The warriors bound for Colosso in the hold while the ship waits at Kalay (gTolbiShipInteriors_HoldPlacements): Ouranos and his friend Sean. Ouranos "can't stand water".
| Value | = | |
|---|---|---|
HOLD_OURANOS | 13 | |
HOLD_SEAN | 14 |
Macros
FLAG_TOLBI_SHIP_KRAKEN_ABOARD
#define FLAG_TOLBI_SHIP_KRAKEN_ABOARD 0x302
The Kraken is aboard: the deck shakes until it is defeated (tolbi_ship_deck.c reads it too). "There's a huge sea monster on the ship!"
Used by TolbiShipDeck_ThankForKraken, TolbiShipInteriors_ApplyEntryState, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_RunSceneCommand.
SPEAKER
#define SPEAKER(actor, window) ((window) << 12 | (actor))
A speaker: the actor, and in the top four bits where the message window opens beside them.
Used by Event_FightTret, TolbiShipDeck_ArriveAtTolbi, TolbiShipDeck_MonstersBoard, TolbiShipDeck_ReturnFromIsland, TolbiShipDeck_SightSeaMonsters, TolbiShipDeck_WatchCrewDecideToSail, TolbiShipInteriors_WatchWarriorsStormOff, TretTreeInteriors_PlayPostBattleConversation.
TOLBI_SHIP_TALK_FACING
#define TOLBI_SHIP_TALK_FACING(bytes, row)
A byte view keeps the native address arithmetic; direct row-field writes choose different bases and registers. The layout still belongs to the row.
Used by TolbiShipInteriors_SelectPlacements.
TURN_STEP
#define TURN_STEP(dx, dz) (((dx) << 16) | ((dz) & 0xffff))
The step beside the leader for each of the 16 facings: the high 16 bits are x, the low 16 bits z.
Used by gTolbiShipInteriors_TurnSteps.
Also, macros without a comment: FLAG_TOLBI_SHIP_ROWER_CHOSEN, FLAG_TOLBI_SHIP_MONSTERS_ABOARD.
Globals
gTolbiShipInteriors_LeaveHold
s32 gTolbiShipInteriors_LeaveHold[]
The warriors walk out of the hold.
Used by TolbiShipInteriors_WatchWarriorsStormOff.
gTolbiShipInteriors_LeaveCabin
s32 gTolbiShipInteriors_LeaveCabin[]
Those gathered in the cabin walk out.
Used by TolbiShipInteriors_ReturnLuckyAnchor.
gTolbiShipInteriors_AnchorCharmPulse
s32 gTolbiShipInteriors_AnchorCharmPulse[]
The Anchor Charm swells and shrinks twice as the captain raises it.
Used by TolbiShipInteriors_CastOff.
gTolbiShipInteriors_FollowersRejoinByStairs
s32 gTolbiShipInteriors_FollowersRejoinByStairs[]
The party's followers walk into the leader by the rowing deck's stairs.
Used by TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ReportMonstersBelowdecks.
gTolbiShipInteriors_FollowersRejoinMidDeck
s32 gTolbiShipInteriors_FollowersRejoinMidDeck[]
The same, in the middle of the rowing deck.
Used by TolbiShipInteriors_ReactToMonsterAttack.
gTolbiShipInteriors_FollowersRejoinBySeats
s32 gTolbiShipInteriors_FollowersRejoinBySeats[]
The same, by the first row of seats.
Used by TolbiShipInteriors_NoticeShipRocking.
gTolbiShipInteriors_Shiver
s32 gTolbiShipInteriors_Shiver[]
Squashes and stretches the actor over and over: a shiver.
Used by TolbiShipInteriors_RunSceneCommand, TolbiShipInteriors_SetUpHold, TolbiShipInteriors_StartFirstAttack, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
gTolbiShipInteriors_MonsterBob
s32 gTolbiShipInteriors_MonsterBob[]
A monster in the hold bobs in place.
Used by TolbiShipInteriors_ApplyEntryState, TolbiShipInteriors_StartFirstAttack, TolbiShipInteriors_StartSecondAttack, TolbiShipInteriors_StartThirdAttack.
gTolbiShipInteriors_LeaveByStairs
s32 gTolbiShipInteriors_LeaveByStairs[]
A rower walks up the stairs and is freed.
Used by TolbiShipInteriors_ReachIsland.
gTolbiShipInteriors_StepIntoAisle
s32 gTolbiShipInteriors_StepIntoAisle[]
A rower steps into the aisle.
Used by TolbiShipInteriors_ReachIsland.
gTolbiShipInteriors_LookAroundScript
s32 gTolbiShipInteriors_LookAroundScript[]
A passenger glances about at random.
Used by TolbiShipInteriors_SetUpHold.
gTolbiShipInteriors_LieFlatScript
s32 gTolbiShipInteriors_LieFlatScript[]
Lies flat on the floor of the hold.
Used by gTolbiShipInteriors_HoldPlacements, gTolbiShipInteriors_HoldPlacementsAtSea, gTolbiShipInteriors_HoldPlacementsEmpty.
gTolbiShipInteriors_AnchorObject
struct FieldActor *gTolbiShipInteriors_AnchorObject
The Anchor Charm's object, once placed this visit.
Used by TolbiShipInteriors_PlaceAnchorCharm.
gTolbiShipInteriors_EntrancesOther
struct SceneEntrance gTolbiShipInteriors_EntrancesOther[]
The other scenes have no entrances.
Used by TolbiShipInteriors_SelectEntrances.
gTolbiShipInteriors_Entrances
struct SceneEntrance gTolbiShipInteriors_Entrances[]
The hold (entrances 1, 2, 11 and 30), a side room (3), the rowing deck (4, 12 and 15 to 24 but 22) and the cabin (5, 10, 13, 14 and 22).
Used by TolbiShipInteriors_SelectEntrances.
gTolbiShipInteriors_CabinPlacementsWarriors
struct ScenePlacement gTolbiShipInteriors_CabinPlacementsWarriors[]
The cabin once the warriors have come to see the captain, with the party's followers.
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_CabinPlacementsArrived
struct ScenePlacement gTolbiShipInteriors_CabinPlacementsArrived[]
The cabin once the ship has reached Tolbi.
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_HoldPlacementsEmpty
struct ScenePlacement gTolbiShipInteriors_HoldPlacementsEmpty[]
The hold before the party hears of the delay at Kalay.
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_HoldPlacements
struct ScenePlacement gTolbiShipInteriors_HoldPlacements[]
The hold while the ship waits at Kalay, and after it reaches Tolbi.
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_HoldPlacementsAtSea
struct ScenePlacement gTolbiShipInteriors_HoldPlacementsAtSea[]
The hold at sea, once the passengers row.
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_RowingDeckPlacements
struct ScenePlacement gTolbiShipInteriors_RowingDeckPlacements[]
The rowing deck: the crew (actors 8 and 9), the oarsmen at the seats (10 to 17), the passengers who may take a seat (18 to 26) and eight actors beside the seats (28 to 35).
Used by TolbiShipInteriors_SelectPlacements.
gTolbiShipInteriors_PartyFollowerPlacements
struct ScenePlacement gTolbiShipInteriors_PartyFollowerPlacements[]
The party's followers, placed for a scene.
Used by TolbiShipInteriors_RunSceneCommand.
gTolbiShipInteriors_FirstAttackMonsters
struct ScenePlacement gTolbiShipInteriors_FirstAttackMonsters[]
The monsters of each attack, beside the seats.
Used by TolbiShipInteriors_RunSceneCommand.
gTolbiShipInteriors_EventsOther
struct SceneEvent gTolbiShipInteriors_EventsOther[]
The side room, and the cutscenes.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_HoldEvents
struct SceneEvent gTolbiShipInteriors_HoldEvents[]
The hold while the ship waits at Kalay, and after it reaches Tolbi.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_HoldEventsChoosingRowers
struct SceneEvent gTolbiShipInteriors_HoldEventsChoosingRowers[]
The hold at sea: talking to a passenger asks them to row.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_HoldEventsAtIsland
struct SceneEvent gTolbiShipInteriors_HoldEventsAtIsland[]
The hold while the ship waits off the island.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_CabinEvents
struct SceneEvent gTolbiShipInteriors_CabinEvents[]
The cabin, from the wait at Kalay until the ship reaches Tolbi. The Anchor Charm is given back to the captain here.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_CabinEventsAtIsland
struct SceneEvent gTolbiShipInteriors_CabinEventsAtIsland[]
The cabin while the ship waits off the island.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_CabinEventsArrived
struct SceneEvent gTolbiShipInteriors_CabinEventsArrived[]
The cabin once the ship has reached Tolbi.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_RowingDeckEventsMonstersAboard
struct SceneEvent gTolbiShipInteriors_RowingDeckEventsMonstersAboard[]
The rowing deck while monsters are aboard: talking to one (actors 36 to 38) fights it.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_RowingDeckEventsKrakenAboard
struct SceneEvent gTolbiShipInteriors_RowingDeckEventsKrakenAboard[]
The rowing deck while the Kraken rocks the ship.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_RowingDeckEventsArrived
struct SceneEvent gTolbiShipInteriors_RowingDeckEventsArrived[]
The rowing deck once the ship has reached Tolbi.
Used by TolbiShipInteriors_SelectEvents.
gTolbiShipInteriors_ShakeTimer
s32 gTolbiShipInteriors_ShakeTimer
Frames left of the Kraken's current jolt; at 0 another may start.
Used by TolbiShipInteriors_ApplyEntryState, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ShakeWhileKrakenAboard.
Also, globals without a comment: gTolbiShipInteriors_TurnSteps, gTolbiShipInteriors_Exits, gTolbiShipInteriors_PlacementsNone, gTolbiShipInteriors_CabinPlacements, gTolbiShipInteriors_SecondAttackMonsters, gTolbiShipInteriors_ThirdAttackMonsters, gTolbiShipInteriors_RowingDeckEvents.