Alchemy
Loading...
Searching...
No Matches

tolbi_ship_deck.c File Reference

The deck of the ship across the Karagol Sea, from Kalay to Tolbi: the wait at the Kalay dock while the replacement ship fails to come, setting sail with the passengers at the oars, the sea monsters and the Kraken, the arrival at Tolbi, and the stop at anchor off the island. More...

Go to the source code of this file.

Data Structures

struct  OarSprite
 An oar's animation object, seen for the tilt that follows its swing. More...

Macros

#define FLAG_TOLBI_SHIP_KRAKEN_ABOARD   0x302
 "There's a huge sea monster on the ship!": the deck shakes until the Kraken is defeated (set in tolbi_ship_interiors.c).
#define SPEAKER(actor, window)
 A speaker: the actor, and in the top four bits where the message window opens beside them (4, SPEAKER_WINDOW_ABOVE, is above).
#define TOLBI_SHIP_DECK_SEA_WRAP   PIXELS(32)

Enumerations

enum  TolbiShipDeckActor {
  KALAY_CREWMAN = 20 , KALAY_CAPTAIN = 22 , KALAY_KAJA = 23 , SEA_KAJA = 20 ,
  SEA_OURANOS = 21 , SEA_SEAN = 22
}
 Who is who on deck. More...

Functions

static void TolbiShipDeck_ConfrontCrewman (void)
 The start both of those share: the camera pans to the door, which opens, and the crewman steps out and denies everything.
static void TolbiShipDeck_ApplyEntryState (void)
 Applies the voyage's state: which cells and oars are drawn, whether the deck rocks and the sea scrolls, and which cutscene the entrance starts (entrances 10 to 19 are the voyage's cutscenes, chained by their exits).
static void TolbiShipDeck_PlaceWaitingPassengers (void)
 At Kalay while the ship waits: places the passengers by what has happened so far.
static void TolbiShipDeck_PlacePassengersAgreedToRow (void)
 At Kalay once the party has agreed to protect the ship: places the passengers who promised to row.
static void TolbiShipDeck_SetUpUnderSail (void)
 Under sail: the crew take their places, the two lookouts start their rounds and, when the party keeps its position, the leader stands on deck.
static void TolbiShipDeck_SetUpAfterKraken (void)
 After the Kraken: as under sail, with Sean at the helm.
static void TolbiShipDeck_SetUpAtAnchor (void)
 At anchor off the island: the crew stand where they were left, by whether the party has agreed to scout the island, and entering by entrance 6 means the party is back from it.
static void TolbiShipDeck_DepartFromKalay (void)
 Entrance 10, setting sail before the party is on deck: actor 23 brings word to actor 21 that all is ready.
static void TolbiShipDeck_DepartWithParty (void)
 Entrance 10 with the party aboard: Kaja brings word to actor 23.
static void TolbiShipDeck_AnnouncePreparationsReady (s32 a0, s32 a1)
 The messenger comes up through the first door to report, the officer calls the ship ready, and the scene moves on to the next stage of the voyage.
static void TolbiShipDeck_SightSeaMonsters (void)
 Entrance 11: sea monsters are sighted. "Aye, Captain! Sea monsters!".
static void TolbiShipDeck_MonstersBoard (void)
 Entrance 12: the monsters leap aboard and someone cries out.
static void TolbiShipDeck_MonstersAttackCrew (void)
 Entrance 13: the monsters harry the crew while more of them climb aboard.
static void TolbiShipDeck_MonsterLandsOnDeck (void)
 Entrance 14: a great shape rises from the sea and a monster drops onto the deck.
static void TolbiShipDeck_JumpIntoKrakenBattle (void)
 Entrance 15: the party jumps down to the deck, gathers and charges; the battle with the Kraken begins (battle 62), returning to entrance 16.
static void TolbiShipDeck_ThankForKraken (void)
 Entrance 16: Isaac is thanked for the Kraken.
static void TolbiShipDeck_SightLand (void)
 Entrance 17: land is sighted. "Hey, I can see land!".
static void TolbiShipDeck_RowersDisembark (void)
 Entrance 18, at Tolbi: the four passengers who rowed come up from below in turn and each says something, then the leader comes up and is thanked for the hard work.
static s32 TolbiShipDeck_GetRowerAtSeat (u32 seat)
 Returns the passenger (actor 23 to 31) who promised to row at a seat (0 to 3), or 0 if the seat is empty.
static void TolbiShipDeck_RockDeck (void)
 The callback that rocks the deck while under sail: sways the camera on two random-walking angles and offsets the BG3 sea pattern, wrapping at 32 pixels.
static void TolbiShipDeck_SetUpOars (void)
 Under sail: shows the rowers (8 to 11) and the oars (12 to 19, the right-hand ones mirrored), records each oar's resting depth and chooses their strokes.
static void TolbiShipDeck_ShowOar (s32 a)
 Shows an oar or rower drawn under the deck, with no collision.
static void TolbiShipDeck_ChooseOarStrokes (void)
 Gives each oar the stroke of its seat's rower; empty seats take stroke 3.
static s32 TolbiShipDeck_GetSeatStroke (u32 seat)
 Returns the stroke (1 to 4) of the rower at a seat, or 0 if the seat is empty.
static void TolbiShipDeck_RowOars (void)
 The task that rows: advances the four rowers' strokes and swings the eight oars, each following its rower's phase.
static void TolbiShipDeck_AdvanceStroke (s32 actor, s32 slot)
 Advances one rower's stroke phase: slowly through the catch and the finish of the stroke, quicker through the drive, quickest on the return; the animation follows.
static void TolbiShipDeck_SwingOar (s32 id, s32 slot, s32 flags)
 Swings one oar to its angle: unless flags bit 1 is set, the angle follows the rower whose stroke the oar takes; bit 0 marks a right-hand oar.
static void TolbiShipDeck_RestOars (void)
 When not under sail: the oars lie at rest, all following the first rower's placeholder, which stands where the leader is.
static void TolbiShipDeck_CopyUnderwayCells (void)
 Redraws a block of the deck's cells and attributes, as it is whenever the ship has left the Kalay dock.
static void TolbiShipDeck_CopyAnchoredCells (void)
 Redraws two more blocks of cells, as they are at anchor.
static void TolbiShipDeck_Say (s32 a)
 Shows the current message from a speaker and waits 10 frames.
static void TolbiShipDeck_Turn (s32 a, s32 b)
 Turns an actor to a facing over 10 frames.
static void TolbiShipDeck_ArriveAtTolbi (void)
 Entrance 19: the ship reaches Tolbi and the crew talk it over before Kaja goes below.
static void TolbiShipDeck_ReturnFromIsland (void)
 Back on deck from the island: on yes, the crew make ready to sail and the scene moves on.
static void TolbiShipDeck_PlaceLeaderOnDeck (void)
 Places the leader on the deck facing south, with the camera on them.
static s32 TolbiShipDeck_ShowSprite (struct ScriptInterpreter *interpreter)
 An action-script call: shows the actor's sprite. Returns 0 to end the call.
static s32 TolbiShipDeck_HoverAndDiveAtOuranos (struct ScriptInterpreter *interpreter)
 The update of a sea monster hovering by Ouranos's side of the deck while the monsters attack.
static s32 TolbiShipDeck_HoverAndDiveAtSean (struct ScriptInterpreter *interpreter)
 The same for the monster that dives at Sean.
static s32 TolbiShipDeck_Bob (struct ScriptInterpreter *interpreter)
 Bobs the actor between 4 and 12 pixels high by a random amount each frame; the actor's work halfword says which way it is going.
static s32 TolbiShipDeck_LookAround (struct ScriptInterpreter *interpreter)
 Now and then (two chances in 32) turns the actor to look north-northeast or north-northwest.
static s32 TolbiShipDeck_LeapAtOuranos (struct ScriptInterpreter *interpreter)
 The update of a monster on deck that, at random, leaps at Ouranos: it jumps to him, he turns and jumps back (sometimes with an emote), and it lands on one of two spots chosen by riseEnabled.
static s32 TolbiShipDeck_LeapAtSean (struct ScriptInterpreter *interpreter)
 The same for the monster that leaps at Sean.
static s32 TolbiShipDeck_RandomlyStartActorHop (struct ScriptInterpreter *interpreter)
 Makes the actor hop at random, one frame in 40 on average. Returns 1.
static void TolbiShipDeck_ShrinkToNormalSize (union FieldObject *object)
 The update that shrinks an enlarged actor by 1/32 a frame until it is back to normal size.
static s32 TolbiShipDeck_IdleTurn (struct ScriptInterpreter *interpreter)
 Turns the actor east, northeast-by-north or southeast-by-south at random intervals of 80 to 160 frames.
const struct SceneEntrance * TolbiShipDeck_GetEntrances (void)
const struct SceneRegion * TolbiShipDeck_GetRegions (void)
const u32 * TolbiShipDeck_GetExits (void)
const struct ScenePlacement * TolbiShipDeck_GetPlacements (void)
const struct SceneEvent * TolbiShipDeck_GetEvents (void)
static void TolbiShipDeck_TalkToWaitingPassenger21 (void)
 A passenger at Kalay.
static void TolbiShipDeck_TalkToWaitingPassenger24 (void)
 Another waiting passenger, with the same three moods as actor 21.
static void TolbiShipDeck_AskHeadedForColosso (void)
 A passenger asks whether the party is headed for Colosso too.
static void TolbiShipDeck_OpenFirstDoor (void)
 Opens the first door to below deck, once a visit.
static void TolbiShipDeck_OpenSecondDoor (void)
 Opens the second door to below deck, once a visit.
static void TolbiShipDeck_GoBelow (void)
 Walking into one of the ways below deck (triggers 1 to 3).
static void TolbiShipDeck_WatchCrewDecideToSail (void)
 At Kalay, once the party has heard of the delay (flag 0x911): the crew wonder what happened to the replacement ship and decide to set sail anyway; the crewman runs off through the second door.
static void TolbiShipDeck_CatchCrewmanFromEast (void)
 Approaching from the east side of the door: the crewman comes out, protests and slips away round the party to the bow.
static void TolbiShipDeck_CatchCrewmanFromWest (void)
 The same, approaching from the west side.
s32 TolbiShipDeck_Initialize (void)
 Sets up the scene on entry: clears FLAG_NOT_ON_MAP, sets the transition, starts the deck's sway at a random angle and stops the sea's scroll, redraws the map and applies the voyage's state.
static void TolbiShipDeck_OfferToScoutIsland (void)
 At anchor: the party is asked to scout the island; Garet and Ivan may argue before the party agrees.

Variables

static u16 sStrokePhase [4]
static s32 sSwayAngleY
static UNUSED s32 sUnused0
 never used; keeps the statics' layout
static u16 sOarAngle [8]
static s32 sSeaScroll [2]
static s32 sSwayAngleX
static UNUSED s32 sUnused1
 never used; keeps the statics' layout
static s32 sSeaSpeed [2]
static u32 sOarStroke [8]
static s32 sOarDepth [8]
const s32 gTolbiShipDeck_PresentationActionsA []
const s32 gTolbiShipDeck_PresentationActionsB []
const s32 gTolbiShipDeck_RandomActorActions []
const s32 gTolbiShipDeck_DeckEventActions []
const s32 gTolbiShipDeck_LeadActionsA []
const s32 gTolbiShipDeck_LeadActionsB []
const s32 gTolbiShipDeck_CrewActionsA []
const s32 gTolbiShipDeck_CrewActionsB []
const s32 gTolbiShipDeck_CrewActionsC []
const s32 gTolbiShipDeck_CrewActionsD []
const s32 gTolbiShipDeck_CrewActionsE []
const s32 gTolbiShipDeck_SailorActions []
const s32 gTolbiShipDeck_DeckActionsB []
const s32 gTolbiShipDeck_DeckActionsA []
const s32 gTolbiShipDeck_DeckActionsC []
const s32 gTolbiShipDeck_RosterActions []
const s32 gTolbiShipDeck_LeaveActions []
const s32 gTolbiShipDeck_LeadActionsC []
const struct SceneEntrance gTolbiShipDeckEntrances []
const struct SceneRegion gTolbiShipDeckRegions []
const u32 gTolbiShipDeckExits []
const struct ScenePlacement gTolbiShipDeckPlacements []
const struct ScenePlacement gTolbiShipDeckPlacementsWaiting []
const struct ScenePlacement gTolbiShipDeckPlacementsRowing []
const struct ScenePlacement gTolbiShipDeckPlacementsAtSea []
const struct ScenePlacement gTolbiShipDeck_CrewScript []
const struct ScenePlacement gTolbiShipDeck_ClosingCrewScript []
const struct ScenePlacement gTolbiShipDeck_CrewScriptB []
const struct ScenePlacement gTolbiShipDeck_CrewScriptC []
const struct ScenePlacement gTolbiShipDeck_CrewScriptD []
const struct ScenePlacement gTolbiShipDeck_CrewScriptE []
const struct ScenePlacement gTolbiShipDeckPlacementsArrived []
const struct SceneEvent gTolbiShipDeckEvents []
const struct SceneEvent gTolbiShipDeckEventsAtSea []
const struct SceneEvent gTolbiShipDeckEventsArrived []
const struct SceneEvent gTolbiShipDeckEventsAtIsland []
const s32 gTolbiShipDeckRowerStrokes [] = {3, 2, 3, 1, 4, 4, 2, 1, 1}
 How hard each passenger rows, for actors 23 to 31: 1 leaves the oar still, 2 to 4 row ever faster.

Detailed Description

The deck of the ship across the Karagol Sea, from Kalay to Tolbi: the wait at the Kalay dock while the replacement ship fails to come, setting sail with the passengers at the oars, the sea monsters and the Kraken, the arrival at Tolbi, and the stop at anchor off the island.

Entrances 10 to 19 chain the voyage's cutscenes, each leaving by an exit that comes back to the next.

Definition in file tolbi_ship_deck.c.

Macro Definition Documentation

◆ FLAG_TOLBI_SHIP_KRAKEN_ABOARD

#define FLAG_TOLBI_SHIP_KRAKEN_ABOARD   0x302

"There's a huge sea monster on the ship!": the deck shakes until the Kraken is defeated (set in tolbi_ship_interiors.c).

Definition at line 48 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ThankForKraken(), TolbiShipInteriors_ApplyEntryState(), TolbiShipInteriors_NoticeShipRocking(), and TolbiShipInteriors_RunSceneCommand().

◆ SPEAKER

#define SPEAKER ( actor,
window )
Value:
((window) << 12 | (actor))

A speaker: the actor, and in the top four bits where the message window opens beside them (4, SPEAKER_WINDOW_ABOVE, is above).

Definition at line 93 of file tolbi_ship_deck.c.

Referenced by Event_FightTret(), TolbiShipDeck_ArriveAtTolbi(), TolbiShipDeck_MonstersBoard(), TolbiShipDeck_ReturnFromIsland(), TolbiShipDeck_SightSeaMonsters(), TolbiShipDeck_WatchCrewDecideToSail(), TolbiShipInteriors_WatchWarriorsStormOff(), and TretTreeInteriors_PlayPostBattleConversation().

◆ TOLBI_SHIP_DECK_SEA_WRAP

#define TOLBI_SHIP_DECK_SEA_WRAP   PIXELS(32)

Definition at line 2071 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_RockDeck().

Enumeration Type Documentation

◆ TolbiShipDeckActor

Who is who on deck.

At Kalay (gTolbiShipDeckPlacementsWaiting) the captain asks Kaja, the deck's fighter, how the oarsmen are ("Say, Kaja, how are the oarsmen doing?"). At sea gTolbiShipDeck_CrewScript places Kaja and the warriors Ouranos and Sean, who help him guard the deck ("That'll be me, Ouranos, and Sean on deck").

Enumerator
KALAY_CREWMAN 

denies everything. "I didn't do anything..."

KALAY_CAPTAIN 
KALAY_KAJA 
SEA_KAJA 
SEA_OURANOS 
SEA_SEAN 

Definition at line 100 of file tolbi_ship_deck.c.

Function Documentation

◆ TolbiShipDeck_ConfrontCrewman()

void TolbiShipDeck_ConfrontCrewman ( void )
static

The start both of those share: the camera pans to the door, which opens, and the crewman steps out and denies everything.

Records the confrontation.

Definition at line 937 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_CatchCrewmanFromEast(), TolbiShipDeck_CatchCrewmanFromWest(), and TolbiShipDeck_ConfrontCrewman().

◆ TolbiShipDeck_ApplyEntryState()

void TolbiShipDeck_ApplyEntryState ( void )
static

Applies the voyage's state: which cells and oars are drawn, whether the deck rocks and the sea scrolls, and which cutscene the entrance starts (entrances 10 to 19 are the voyage's cutscenes, chained by their exits).

Definition at line 985 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_Initialize().

◆ TolbiShipDeck_PlaceWaitingPassengers()

void TolbiShipDeck_PlaceWaitingPassengers ( void )
static

At Kalay while the ship waits: places the passengers by what has happened so far.

Definition at line 1078 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_PlaceWaitingPassengers().

◆ TolbiShipDeck_PlacePassengersAgreedToRow()

void TolbiShipDeck_PlacePassengersAgreedToRow ( void )
static

At Kalay once the party has agreed to protect the ship: places the passengers who promised to row.

Definition at line 1115 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_PlacePassengersAgreedToRow().

◆ TolbiShipDeck_SetUpUnderSail()

void TolbiShipDeck_SetUpUnderSail ( void )
static

Under sail: the crew take their places, the two lookouts start their rounds and, when the party keeps its position, the leader stands on deck.

Definition at line 1136 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SetUpUnderSail().

◆ TolbiShipDeck_SetUpAfterKraken()

void TolbiShipDeck_SetUpAfterKraken ( void )
static

After the Kraken: as under sail, with Sean at the helm.

Definition at line 1173 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SetUpAfterKraken().

◆ TolbiShipDeck_SetUpAtAnchor()

void TolbiShipDeck_SetUpAtAnchor ( void )
static

At anchor off the island: the crew stand where they were left, by whether the party has agreed to scout the island, and entering by entrance 6 means the party is back from it.

Definition at line 1201 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SetUpAtAnchor().

◆ TolbiShipDeck_DepartFromKalay()

void TolbiShipDeck_DepartFromKalay ( void )
static

Entrance 10, setting sail before the party is on deck: actor 23 brings word to actor 21 that all is ready.

Definition at line 1238 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_DepartFromKalay().

◆ TolbiShipDeck_DepartWithParty()

void TolbiShipDeck_DepartWithParty ( void )
static

Entrance 10 with the party aboard: Kaja brings word to actor 23.

Definition at line 1264 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_DepartWithParty().

◆ TolbiShipDeck_AnnouncePreparationsReady()

void TolbiShipDeck_AnnouncePreparationsReady ( s32 a0,
s32 a1 )
static

The messenger comes up through the first door to report, the officer calls the ship ready, and the scene moves on to the next stage of the voyage.

"Preparations... Ready!"

Definition at line 1297 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_AnnouncePreparationsReady(), TolbiShipDeck_DepartFromKalay(), and TolbiShipDeck_DepartWithParty().

◆ TolbiShipDeck_SightSeaMonsters()

void TolbiShipDeck_SightSeaMonsters ( void )
static

Entrance 11: sea monsters are sighted. "Aye, Captain! Sea monsters!".

Definition at line 1324 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SightSeaMonsters().

◆ TolbiShipDeck_MonstersBoard()

void TolbiShipDeck_MonstersBoard ( void )
static

Entrance 12: the monsters leap aboard and someone cries out.

"It's no use. It's too late!"

Definition at line 1349 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_MonstersBoard().

◆ TolbiShipDeck_MonstersAttackCrew()

void TolbiShipDeck_MonstersAttackCrew ( void )
static

Entrance 13: the monsters harry the crew while more of them climb aboard.

Definition at line 1414 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_MonstersAttackCrew().

◆ TolbiShipDeck_MonsterLandsOnDeck()

void TolbiShipDeck_MonsterLandsOnDeck ( void )
static

Entrance 14: a great shape rises from the sea and a monster drops onto the deck.

Definition at line 1503 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_MonsterLandsOnDeck().

◆ TolbiShipDeck_JumpIntoKrakenBattle()

void TolbiShipDeck_JumpIntoKrakenBattle ( void )
static

Entrance 15: the party jumps down to the deck, gathers and charges; the battle with the Kraken begins (battle 62), returning to entrance 16.

Definition at line 1616 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_JumpIntoKrakenBattle().

◆ TolbiShipDeck_ThankForKraken()

void TolbiShipDeck_ThankForKraken ( void )
static

Entrance 16: Isaac is thanked for the Kraken.

"Thank you, Isaac. You did good against that Kraken."

Definition at line 1725 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_ThankForKraken().

◆ TolbiShipDeck_SightLand()

void TolbiShipDeck_SightLand ( void )
static

Entrance 17: land is sighted. "Hey, I can see land!".

Definition at line 1778 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SightLand().

◆ TolbiShipDeck_RowersDisembark()

void TolbiShipDeck_RowersDisembark ( void )
static

Entrance 18, at Tolbi: the four passengers who rowed come up from below in turn and each says something, then the leader comes up and is thanked for the hard work.

Who rowed is read from the four seats' flag groups, the passengers (actors 23 to 31) in a fixed order of preference.

Definition at line 1828 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_RowersDisembark().

◆ TolbiShipDeck_GetRowerAtSeat()

s32 TolbiShipDeck_GetRowerAtSeat ( u32 seat)
static

Returns the passenger (actor 23 to 31) who promised to row at a seat (0 to 3), or 0 if the seat is empty.

Each seat has a group of nine flags, one for each passenger.

Definition at line 2043 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ChooseOarStrokes(), TolbiShipDeck_GetRowerAtSeat(), and TolbiShipDeck_RowersDisembark().

◆ TolbiShipDeck_RockDeck()

void TolbiShipDeck_RockDeck ( void )
static

The callback that rocks the deck while under sail: sways the camera on two random-walking angles and offsets the BG3 sea pattern, wrapping at 32 pixels.

Definition at line 2076 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_RockDeck().

◆ TolbiShipDeck_SetUpOars()

void TolbiShipDeck_SetUpOars ( void )
static

Under sail: shows the rowers (8 to 11) and the oars (12 to 19, the right-hand ones mirrored), records each oar's resting depth and chooses their strokes.

Definition at line 2108 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_SetUpOars().

◆ TolbiShipDeck_ShowOar()

void TolbiShipDeck_ShowOar ( s32 a)
static

Shows an oar or rower drawn under the deck, with no collision.

Definition at line 2141 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_RestOars(), TolbiShipDeck_SetUpOars(), and TolbiShipDeck_ShowOar().

◆ TolbiShipDeck_ChooseOarStrokes()

void TolbiShipDeck_ChooseOarStrokes ( void )
static

Gives each oar the stroke of its seat's rower; empty seats take stroke 3.

The first loop's stores are all overwritten below.

Definition at line 2165 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ChooseOarStrokes(), and TolbiShipDeck_SetUpOars().

◆ TolbiShipDeck_GetSeatStroke()

s32 TolbiShipDeck_GetSeatStroke ( u32 seat)
static

Returns the stroke (1 to 4) of the rower at a seat, or 0 if the seat is empty.

Definition at line 2200 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ChooseOarStrokes(), and TolbiShipDeck_GetSeatStroke().

◆ TolbiShipDeck_RowOars()

void TolbiShipDeck_RowOars ( void )
static

The task that rows: advances the four rowers' strokes and swings the eight oars, each following its rower's phase.

Definition at line 2227 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_RowOars().

◆ TolbiShipDeck_AdvanceStroke()

void TolbiShipDeck_AdvanceStroke ( s32 actor,
s32 slot )
static

Advances one rower's stroke phase: slowly through the catch and the finish of the stroke, quicker through the drive, quickest on the return; the animation follows.

Definition at line 2249 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_AdvanceStroke(), and TolbiShipDeck_RowOars().

◆ TolbiShipDeck_SwingOar()

void TolbiShipDeck_SwingOar ( s32 id,
s32 slot,
s32 flags )
static

Swings one oar to its angle: unless flags bit 1 is set, the angle follows the rower whose stroke the oar takes; bit 0 marks a right-hand oar.

The oar's tilt and depth follow the angle.

Definition at line 2270 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_RestOars(), TolbiShipDeck_RowOars(), and TolbiShipDeck_SwingOar().

◆ TolbiShipDeck_RestOars()

void TolbiShipDeck_RestOars ( void )
static

When not under sail: the oars lie at rest, all following the first rower's placeholder, which stands where the leader is.

Definition at line 2308 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_RestOars().

◆ TolbiShipDeck_CopyUnderwayCells()

void TolbiShipDeck_CopyUnderwayCells ( void )
static

Redraws a block of the deck's cells and attributes, as it is whenever the ship has left the Kalay dock.

Definition at line 2380 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_CopyUnderwayCells().

◆ TolbiShipDeck_CopyAnchoredCells()

void TolbiShipDeck_CopyAnchoredCells ( void )
static

Redraws two more blocks of cells, as they are at anchor.

Definition at line 2392 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_CopyAnchoredCells().

◆ TolbiShipDeck_Say()

◆ TolbiShipDeck_Turn()

◆ TolbiShipDeck_ArriveAtTolbi()

void TolbiShipDeck_ArriveAtTolbi ( void )
static

Entrance 19: the ship reaches Tolbi and the crew talk it over before Kaja goes below.

Definition at line 2410 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ApplyEntryState(), and TolbiShipDeck_ArriveAtTolbi().

◆ TolbiShipDeck_ReturnFromIsland()

void TolbiShipDeck_ReturnFromIsland ( void )
static

Back on deck from the island: on yes, the crew make ready to sail and the scene moves on.

"How was it, Isaac? Did you explore the island thoroughly?"

Definition at line 2577 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ReturnFromIsland(), and TolbiShipDeck_SetUpAtAnchor().

◆ TolbiShipDeck_PlaceLeaderOnDeck()

void TolbiShipDeck_PlaceLeaderOnDeck ( void )
static

Places the leader on the deck facing south, with the camera on them.

Definition at line 2658 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_PlaceLeaderOnDeck(), TolbiShipDeck_SetUpAfterKraken(), and TolbiShipDeck_SetUpUnderSail().

◆ TolbiShipDeck_ShowSprite()

s32 TolbiShipDeck_ShowSprite ( struct ScriptInterpreter * interpreter)
static

An action-script call: shows the actor's sprite. Returns 0 to end the call.

Definition at line 113 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ShowSprite().

◆ TolbiShipDeck_HoverAndDiveAtOuranos()

s32 TolbiShipDeck_HoverAndDiveAtOuranos ( struct ScriptInterpreter * interpreter)
static

The update of a sea monster hovering by Ouranos's side of the deck while the monsters attack.

It drifts and bobs at random; one frame in a hundred it dives at Ouranos, who turns and jumps (sometimes with an emote), then it returns to its side. riseEnabled picks which side it returns to. Returns 1 to keep running.

Definition at line 130 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_HoverAndDiveAtOuranos().

◆ TolbiShipDeck_HoverAndDiveAtSean()

s32 TolbiShipDeck_HoverAndDiveAtSean ( struct ScriptInterpreter * interpreter)
static

The same for the monster that dives at Sean.

Definition at line 219 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_HoverAndDiveAtSean().

◆ TolbiShipDeck_Bob()

s32 TolbiShipDeck_Bob ( struct ScriptInterpreter * interpreter)
static

Bobs the actor between 4 and 12 pixels high by a random amount each frame; the actor's work halfword says which way it is going.

Returns 1.

Definition at line 327 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_Bob().

◆ TolbiShipDeck_LookAround()

s32 TolbiShipDeck_LookAround ( struct ScriptInterpreter * interpreter)
static

Now and then (two chances in 32) turns the actor to look north-northeast or north-northwest.

Returns 1.

Definition at line 353 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_LookAround().

◆ TolbiShipDeck_LeapAtOuranos()

s32 TolbiShipDeck_LeapAtOuranos ( struct ScriptInterpreter * interpreter)
static

The update of a monster on deck that, at random, leaps at Ouranos: it jumps to him, he turns and jumps back (sometimes with an emote), and it lands on one of two spots chosen by riseEnabled.

The actor's timer holds the step. Returns 1.

Definition at line 368 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_LeapAtOuranos().

◆ TolbiShipDeck_LeapAtSean()

s32 TolbiShipDeck_LeapAtSean ( struct ScriptInterpreter * interpreter)
static

The same for the monster that leaps at Sean.

Definition at line 438 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_LeapAtSean().

◆ TolbiShipDeck_RandomlyStartActorHop()

s32 TolbiShipDeck_RandomlyStartActorHop ( struct ScriptInterpreter * interpreter)
static

Makes the actor hop at random, one frame in 40 on average. Returns 1.

Definition at line 509 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_RandomlyStartActorHop().

◆ TolbiShipDeck_ShrinkToNormalSize()

void TolbiShipDeck_ShrinkToNormalSize ( union FieldObject * object)
static

The update that shrinks an enlarged actor by 1/32 a frame until it is back to normal size.

Definition at line 518 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_JumpIntoKrakenBattle(), and TolbiShipDeck_ShrinkToNormalSize().

◆ TolbiShipDeck_IdleTurn()

s32 TolbiShipDeck_IdleTurn ( struct ScriptInterpreter * interpreter)
static

Turns the actor east, northeast-by-north or southeast-by-south at random intervals of 80 to 160 frames.

riseCounter counts down the wait. Returns 1.

Definition at line 528 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_IdleTurn().

◆ TolbiShipDeck_GetEntrances()

const struct SceneEntrance * TolbiShipDeck_GetEntrances ( void )

Definition at line 547 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEntrances().

◆ TolbiShipDeck_GetRegions()

const struct SceneRegion * TolbiShipDeck_GetRegions ( void )

Definition at line 551 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetRegions().

◆ TolbiShipDeck_GetExits()

const u32 * TolbiShipDeck_GetExits ( void )

Definition at line 555 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetExits().

◆ TolbiShipDeck_GetPlacements()

const struct ScenePlacement * TolbiShipDeck_GetPlacements ( void )

Definition at line 557 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ TolbiShipDeck_GetEvents()

const struct SceneEvent * TolbiShipDeck_GetEvents ( void )

Definition at line 583 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEvents().

◆ TolbiShipDeck_TalkToWaitingPassenger21()

void TolbiShipDeck_TalkToWaitingPassenger21 ( void )
static

A passenger at Kalay.

What he says follows the delay: impatient at first, alarmed once the warriors storm off to the captain, relieved once the party has agreed to protect the ship. While alarmed he paces at random intervals.

Definition at line 597 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_TalkToWaitingPassenger21().

◆ TolbiShipDeck_TalkToWaitingPassenger24()

void TolbiShipDeck_TalkToWaitingPassenger24 ( void )
static

Another waiting passenger, with the same three moods as actor 21.

Definition at line 627 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_TalkToWaitingPassenger24().

◆ TolbiShipDeck_AskHeadedForColosso()

void TolbiShipDeck_AskHeadedForColosso ( void )
static

A passenger asks whether the party is headed for Colosso too.

Definition at line 657 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_AskHeadedForColosso().

◆ TolbiShipDeck_OpenFirstDoor()

◆ TolbiShipDeck_OpenSecondDoor()

void TolbiShipDeck_OpenSecondDoor ( void )
static

Opens the second door to below deck, once a visit.

Definition at line 674 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ConfrontCrewman(), TolbiShipDeck_GoBelow(), TolbiShipDeck_OpenSecondDoor(), and TolbiShipDeck_WatchCrewDecideToSail().

◆ TolbiShipDeck_GoBelow()

void TolbiShipDeck_GoBelow ( void )
static

Walking into one of the ways below deck (triggers 1 to 3).

The doors at 1 and 3 open and the leader steps through; the hatch at 2 just plays its sound. Leaves by the exit numbered as the trigger.

Definition at line 685 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GoBelow().

◆ TolbiShipDeck_WatchCrewDecideToSail()

void TolbiShipDeck_WatchCrewDecideToSail ( void )
static

At Kalay, once the party has heard of the delay (flag 0x911): the crew wonder what happened to the replacement ship and decide to set sail anyway; the crewman runs off through the second door.

Plays once.

Definition at line 730 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_WatchCrewDecideToSail().

◆ TolbiShipDeck_CatchCrewmanFromEast()

void TolbiShipDeck_CatchCrewmanFromEast ( void )
static

Approaching from the east side of the door: the crewman comes out, protests and slips away round the party to the bow.

"I didn't do anything..." Runs until the party has confronted the crewman.

Definition at line 846 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_CatchCrewmanFromEast().

◆ TolbiShipDeck_CatchCrewmanFromWest()

void TolbiShipDeck_CatchCrewmanFromWest ( void )
static

The same, approaching from the west side.

Definition at line 891 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_CatchCrewmanFromWest().

◆ TolbiShipDeck_Initialize()

s32 TolbiShipDeck_Initialize ( void )

Sets up the scene on entry: clears FLAG_NOT_ON_MAP, sets the transition, starts the deck's sway at a random angle and stops the sea's scroll, redraws the map and applies the voyage's state.

Definition at line 963 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_Initialize().

◆ TolbiShipDeck_OfferToScoutIsland()

void TolbiShipDeck_OfferToScoutIsland ( void )
static

At anchor: the party is asked to scout the island; Garet and Ivan may argue before the party agrees.

Definition at line 2478 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_OfferToScoutIsland().

Variable Documentation

◆ sStrokePhase

u16 sStrokePhase[4]
static

◆ sSwayAngleY

s32 sSwayAngleY
static

Definition at line 308 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_Initialize(), and TolbiShipDeck_RockDeck().

◆ sUnused0

UNUSED s32 sUnused0
static

never used; keeps the statics' layout

Definition at line 309 of file tolbi_ship_deck.c.

◆ sOarAngle

u16 sOarAngle[8]
static

◆ sSeaScroll

◆ sSwayAngleX

s32 sSwayAngleX
static

Definition at line 315 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_Initialize(), and TolbiShipDeck_RockDeck().

◆ sUnused1

UNUSED s32 sUnused1
static

never used; keeps the statics' layout

Definition at line 316 of file tolbi_ship_deck.c.

◆ sSeaSpeed

◆ sOarStroke

u32 sOarStroke[8]
static

◆ sOarDepth

s32 sOarDepth[8]
static

◆ gTolbiShipDeck_PresentationActionsA

const s32 gTolbiShipDeck_PresentationActionsA[]
Initial value:
= {
SC_ARG(2), SC_MOVE(PIXELS(202), 0, PIXELS(600)),
SC_POS(0, 0, 0), SC_END,
}
#define PIXELS(value)
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
#define SC_END
Return to the main script.
Definition objcmd.h:32

Definition at line 2669 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_WatchCrewDecideToSail().

◆ gTolbiShipDeck_PresentationActionsB

const s32 gTolbiShipDeck_PresentationActionsB[]
Initial value:
= {
SC_WAIT(20), SC_ARG(2), SC_MOVE(PIXELS(162), 0, PIXELS(666)),
}
@ FACING_WEST
Definition field_scene.h:30
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
@ SW_FACING
Definition objcmd.h:57

Definition at line 2675 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_WatchCrewDecideToSail().

◆ gTolbiShipDeck_RandomActorActions

const s32 gTolbiShipDeck_RandomActorActions[]
Initial value:
= {
SC_CALL(Scene_SquashAndStretch),
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_TOP
Script start.
Definition objcmd.h:13
#define SC_CALL(fn)
Definition objcmd.h:50

Definition at line 2681 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_PlaceWaitingPassengers(), TolbiShipDeck_TalkToWaitingPassenger21(), and TolbiShipDeck_TalkToWaitingPassenger24().

◆ gTolbiShipDeck_DeckEventActions

const s32 gTolbiShipDeck_DeckEventActions[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(140), 0, PIXELS(586)),
SC_SE(153),
SC_SET(SW_VELOCITY_Y, 0x80000),
SC_MOVE(PIXELS(184), 0, PIXELS(598)),
SC_SET(0x23, 1),
SC_SET(SW_VELOCITY_Y, 0x40000),
SC_MOVE(PIXELS(216), 0, PIXELS(596)),
SC_MOVE(PIXELS(216), 0, PIXELS(586)),
SC_POS(0, 0, 0),
}
#define SC_SE(n)
Sound effect.
Definition objcmd.h:46
@ SW_VELOCITY_Y
Definition objcmd.h:65
static s32 TolbiShipDeck_ShowSprite(struct ScriptInterpreter *interpreter)
An action-script call: shows the actor's sprite. Returns 0 to end the call.

Definition at line 2686 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersBoard().

◆ gTolbiShipDeck_LeadActionsA

const s32 gTolbiShipDeck_LeadActionsA[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(228), 0, PIXELS(521)),
SC_ARG(1),
SC_SET(SW_FACING, 0xd000),
SC_WAIT(40),
SC_ARG(4),
SC_WAIT(40),
SC_ARG(2),
SC_MOVE(PIXELS(204), 0, PIXELS(521)),
SC_ARG(1),
SC_SET(SW_FACING, 0xb000),
SC_WAIT(40),
SC_ARG(4),
SC_WAIT(40),
}

Definition at line 2705 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_SetUpUnderSail().

◆ gTolbiShipDeck_LeadActionsB

const s32 gTolbiShipDeck_LeadActionsB[]

◆ gTolbiShipDeck_CrewActionsA

const s32 gTolbiShipDeck_CrewActionsA[]
Initial value:
= {
SC_SET(SW_MOTION, 0), SC_SET(0x23, 0),
SC_SET(0x24, 0), SC_SET(0x27, 0),
}
@ SW_MOTION
Definition objcmd.h:75
static s32 TolbiShipDeck_HoverAndDiveAtOuranos(struct ScriptInterpreter *interpreter)
The update of a sea monster hovering by Ouranos's side of the deck while the monsters attack.

Definition at line 2761 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_CrewActionsB

const s32 gTolbiShipDeck_CrewActionsB[]
Initial value:
= {
SC_SET(SW_MOTION, 0), SC_SET(0x23, 0),
SC_SET(0x24, 0), SC_SET(0x27, 0),
}
static s32 TolbiShipDeck_HoverAndDiveAtSean(struct ScriptInterpreter *interpreter)
The same for the monster that dives at Sean.

Definition at line 2767 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_CrewActionsC

const s32 gTolbiShipDeck_CrewActionsC[]
Initial value:
= {
SC_SET(0x24, 0),
}
static s32 TolbiShipDeck_Bob(struct ScriptInterpreter *interpreter)
Bobs the actor between 4 and 12 pixels high by a random amount each frame; the actor's work halfword ...

Definition at line 2773 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_CrewActionsD

const s32 gTolbiShipDeck_CrewActionsD[]
Initial value:
= {
}
static s32 TolbiShipDeck_LookAround(struct ScriptInterpreter *interpreter)
Now and then (two chances in 32) turns the actor to look north-northeast or north-northwest.

Definition at line 2779 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_CrewActionsE

const s32 gTolbiShipDeck_CrewActionsE[]
Initial value:
= {
SC_ARG(1),
SC_SET(SW_SCALE_X, 0xb333),
SC_SET(SW_SCALE_Y, 0xb333),
SC_WAIT(1),
SC_ADD(SW_SCALE_Y, 0x147a),
SC_WAIT(1),
SC_LOOP(24, SC_TO(1)),
SC_POS(0, 0, 0),
SC_WAIT(1),
}
#define SC_LABEL(n)
Branch destination.
Definition objcmd.h:11
#define SC_TO(n)
Definition objcmd.h:12
#define SC_ADD(w, v)
Definition objcmd.h:38
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 2783 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_SailorActions

const s32 gTolbiShipDeck_SailorActions[]
Initial value:
= {
SC_MOVE(PIXELS(216), 0, PIXELS(586)),
SC_POS(0, 0, 0),
}

Definition at line 2798 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonsterLandsOnDeck(), and TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_DeckActionsB

const s32 gTolbiShipDeck_DeckActionsB[]
Initial value:
= {
SC_SET(0x23, 0),
}
static s32 TolbiShipDeck_LeapAtOuranos(struct ScriptInterpreter *interpreter)
The update of a monster on deck that, at random, leaps at Ouranos: it jumps to him,...

Definition at line 2805 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonsterLandsOnDeck().

◆ gTolbiShipDeck_DeckActionsA

const s32 gTolbiShipDeck_DeckActionsA[]
Initial value:
= {
SC_SET(0x23, 0),
}
static s32 TolbiShipDeck_LeapAtSean(struct ScriptInterpreter *interpreter)
The same for the monster that leaps at Sean.

Definition at line 2810 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonsterLandsOnDeck().

◆ gTolbiShipDeck_DeckActionsC

const s32 gTolbiShipDeck_DeckActionsC[]
Initial value:
= {
}
static s32 TolbiShipDeck_RandomlyStartActorHop(struct ScriptInterpreter *interpreter)
Makes the actor hop at random, one frame in 40 on average. Returns 1.

Definition at line 2815 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonsterLandsOnDeck().

◆ gTolbiShipDeck_RosterActions

const s32 gTolbiShipDeck_RosterActions[]
Initial value:
= {
SC_ARG(2), SC_MOVE(PIXELS(82), 0, PIXELS(656)),
SC_POS(0, 0, 0), SC_END,
}

Definition at line 2819 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_RowersDisembark().

◆ gTolbiShipDeck_LeaveActions

const s32 gTolbiShipDeck_LeaveActions[]
Initial value:
= {
SC_ARG(2), SC_MOVE(PIXELS(186), 0, PIXELS(604)),
SC_SYNC, SC_MOVE(PIXELS(216), 0, PIXELS(604)),
SC_SYNC, SC_MOVE(PIXELS(216), 0, PIXELS(586)),
SC_POS(0, 0, 0), SC_WAIT(1),
}

Definition at line 2825 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ReturnFromIsland().

◆ gTolbiShipDeck_LeadActionsC

const s32 gTolbiShipDeck_LeadActionsC[]
Initial value:
= {
SC_SET(0x27, 0),
}
static s32 TolbiShipDeck_IdleTurn(struct ScriptInterpreter *interpreter)
Turns the actor east, northeast-by-north or southeast-by-south at random intervals of 80 to 160 frame...

Definition at line 2834 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_SetUpAfterKraken(), and TolbiShipDeck_ThankForKraken().

◆ gTolbiShipDeckEntrances

const struct SceneEntrance gTolbiShipDeckEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 179, 0, 653, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 216, 0, 600, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{2, CONDITION_ALWAYS, 232, 0, 664, FACING_EAST, 0, -1, -1, -1, -1, 0},
{3, CONDITION_ALWAYS, 216, 0, 808, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{4, CONDITION_ALWAYS, 216, 4, 648, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{5, CONDITION_ALWAYS, 312, -4, 656, FACING_WEST, 0, -1, -1, -1, -1, 0},
{6, CONDITION_ALWAYS, 120, -4, 656, FACING_EAST, 0, 65, -1, -1, -1, 0},
{10, CONDITION_ALWAYS, 232, 0, 664, FACING_EAST, 0, -1, -1, -1, -1, 0},
{11, CONDITION_ALWAYS, 212, 0, 521, FACING_EAST, 0, -1, -1, -1, -1, 0},
{12, CONDITION_ALWAYS, 192, 0, 650, FACING_EAST, 0, -1, -1, -1, -1, 0},
{13, CONDITION_ALWAYS, 232, 0, 654, FACING_EAST, 0, -1, -1, -1, -1, 0},
{14, CONDITION_ALWAYS, 216, 0, 657, FACING_EAST, 0, -1, -1, -1, -1, 0},
{15, CONDITION_ALWAYS, 216, 0, 640, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{16, CONDITION_ALWAYS, 216, 0, 540, FACING_NORTH, 0, -1, -1, -1, -1, 0},
{17, CONDITION_ALWAYS, 216, 0, 540, FACING_NORTH, 0, -1, -1, -1, -1, 0},
{18, CONDITION_ALWAYS, 196, 0, 652, FACING_SOUTH, 0, 65, -1, -1, -1, 0},
{19, CONDITION_ALWAYS, 212, 0, 521, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 2839 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEntrances().

◆ gTolbiShipDeckRegions

const struct SceneRegion gTolbiShipDeckRegions[]
Initial value:
= {
{208, 24, 634, 224, 40, 650, CONDITION_ALWAYS, 5},
}

Definition at line 2861 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetRegions().

◆ gTolbiShipDeckExits

const u32 gTolbiShipDeckExits[]
Initial value:
= {
SCENE_EXIT(1, 111, 1),
SCENE_EXIT(2, 111, 3),
SCENE_EXIT(3, 111, 5),
SCENE_EXIT(4, 107, 2),
SCENE_EXIT(5, 110, 1),
SCENE_EXIT(6, 112, 1),
SCENE_EXIT(7, 2, 74),
SCENE_EXIT(10, 110, 10),
SCENE_EXIT(11, 111, 14),
SCENE_EXIT(12, 111, 15),
SCENE_EXIT(13, 111, 17),
SCENE_EXIT(14, 111, 19),
SCENE_EXIT(15, 2, 70),
SCENE_EXIT(16, 111, 22),
SCENE_EXIT(17, 111, 24),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 2866 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetExits().

◆ gTolbiShipDeckPlacements

const struct ScenePlacement gTolbiShipDeckPlacements[]
Initial value:
= {
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_STAND
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
@ FACING_SOUTHEAST
Definition field_scene.h:27

Definition at line 2886 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ gTolbiShipDeckPlacementsWaiting

const struct ScenePlacement gTolbiShipDeckPlacementsWaiting[]

Definition at line 2921 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ gTolbiShipDeckPlacementsRowing

const struct ScenePlacement gTolbiShipDeckPlacementsRowing[]
Initial value:
= {
}

Definition at line 2966 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ gTolbiShipDeckPlacementsAtSea

const struct ScenePlacement gTolbiShipDeckPlacementsAtSea[]
Initial value:
= {
}

Definition at line 2994 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ gTolbiShipDeck_CrewScript

◆ gTolbiShipDeck_ClosingCrewScript

const struct ScenePlacement gTolbiShipDeck_ClosingCrewScript[]
Initial value:

Definition at line 3034 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_ReturnFromIsland().

◆ gTolbiShipDeck_CrewScriptB

const struct ScenePlacement gTolbiShipDeck_CrewScriptB[]

◆ gTolbiShipDeck_CrewScriptC

const struct ScenePlacement gTolbiShipDeck_CrewScriptC[]
Initial value:
= {
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc4, CONDITION_ALWAYS, 7,
{ 0xc6, CONDITION_ALWAYS, 7,
{ 0xd6, CONDITION_ALWAYS, 7,
}

Definition at line 3050 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_MonstersAttackCrew().

◆ gTolbiShipDeck_CrewScriptD

◆ gTolbiShipDeck_CrewScriptE

const struct ScenePlacement gTolbiShipDeck_CrewScriptE[]

◆ gTolbiShipDeckPlacementsArrived

const struct ScenePlacement gTolbiShipDeckPlacementsArrived[]

Definition at line 3112 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetPlacements().

◆ gTolbiShipDeckEvents

const struct SceneEvent gTolbiShipDeckEvents[]

Definition at line 3166 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEvents().

◆ gTolbiShipDeckEventsAtSea

const struct SceneEvent gTolbiShipDeckEventsAtSea[]
Initial value:
= {
{ EVENT_TALK, 23, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckYouMustFeelAwfullyImportantOrdering) },
{ EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckItLooksLikeAnotherOarsmanWas) },
{ EVENT_TALK, 21, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckIFeelSorryForTheOarsmen) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 23, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckAnOarsmanWasInjuredByA) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckWeHaveNoIdeaWhenThose) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckUhnnnWhenILookAtThe) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define SCENE_EVENTS_END
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
static void TolbiShipDeck_GoBelow(void)
Walking into one of the ways below deck (triggers 1 to 3).

Definition at line 3213 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEvents().

◆ gTolbiShipDeckEventsArrived

const struct SceneEvent gTolbiShipDeckEventsArrived[]
Initial value:
= {
{ EVENT_TALK, 20, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckYouLookinForSeanAndOuranos) },
{ EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckThisGroupThatCameOnOur) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 20, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckIWantSeanAndOuranosTo) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckImJustGoingToHangOut) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckIWonderWhatHappenedToThat) },
}
@ EVENT_EXIT
static void TolbiShipDeck_AskHeadedForColosso(void)
A passenger asks whether the party is headed for Colosso too.

Definition at line 3230 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEvents().

◆ gTolbiShipDeckEventsAtIsland

const struct SceneEvent gTolbiShipDeckEventsAtIsland[]
Initial value:
= {
{ EVENT_TALK, 23, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckKajaAndTheCaptainAreProfessionals) },
{ EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckTheresNoTellingWhatKindOf) },
{ EVENT_TALK, 21, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckWeveDoneAGoodJobOf) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 23, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckIWantToBeASailor) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, FLAG_TOLBI_SHIP_ISLAND_SCOUT_AGREED, MSGNO(MsgTolbiShipDeckIGiveUpWhatAreWe) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckThisIslandGivesMeTheCreeps) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, FLAG_TOLBI_SHIP_ISLAND_SCOUT_AGREED, MSGNO(MsgTolbiShipDeckThatsEnoughBickering) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgTolbiShipDeckWhatWeCanDoNowIs) },
}
#define FLAG_TOLBI_SHIP_ISLAND_SCOUT_AGREED
the party will scout it
Definition flags.h:399
static void TolbiShipDeck_OfferToScoutIsland(void)
At anchor: the party is asked to scout the island; Garet and Ivan may argue before the party agrees.

Definition at line 3248 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetEvents().

◆ gTolbiShipDeckRowerStrokes

const s32 gTolbiShipDeckRowerStrokes[] = {3, 2, 3, 1, 4, 4, 2, 1, 1}

How hard each passenger rows, for actors 23 to 31: 1 leaves the oar still, 2 to 4 row ever faster.

Definition at line 3273 of file tolbi_ship_deck.c.

Referenced by TolbiShipDeck_GetSeatStroke().