37#include "text/msg_ids.h"
48#define FLAG_TOLBI_SHIP_KRAKEN_ABOARD 0x302
93#define SPEAKER(actor, window) ((window) << 12 | (actor))
135 obj->
speed = 0x40000;
176 obj->
speed = 0x20000;
189 if (obj->
timer != 0) {
198 if (obj->
x.
fixed > 0xf80000 && obj->
x.
fixed < 0x1240000)
208 if (obj->
y.
fixed > 0x80000)
224 obj->
speed = 0x40000;
265 obj->
speed = 0x20000;
278 if (obj->
timer != 0) {
287 if (obj->
x.
fixed > 0xe80000 && obj->
x.
fixed < 0x1100000)
297 if (obj->
y.
fixed > 0x80000)
370 switch (obj->
timer) {
381 obj->
speed = 0x40000;
413 obj->
speed = 0x20000;
440 switch (obj->
timer) {
451 obj->
speed = 0x40000;
483 obj->
speed = 0x20000;
520 if (actor->
scaleX > 0x10000) {
521 actor->
scaleX += 0xFFFFF800;
522 actor->
scaleY += 0xFFFFF800;
537 }
else if (roll > 100) {
558 s32 afterFirstAttack;
566 if (afterFirstAttack != 0)
613 wait = ((
u32)(90 * random) >> 16) + 60;
643 wait = ((
u32)(90 * random) >> 16) + 60;
703 if (throughDoor != 0) {
717static void TolbiShipDeck_GoBelowWhileFacingWest(
void) {
1214 record->
facing = (facing << 6);
1218 record->
facing = (facing << 6);
1225 record->
facing = (facing << 6);
1507 const s32 *sailorActions;
1554 monster->
scaleX = 0x1999;
1555 monster->
scaleY = 0x1999;
1558 for (frame = 0; (
u32)frame < 16; frame++) {
1559 monster->
scaleX += 0xf5c;
1560 monster->
scaleY += 0xf5c;
1564 monster->
scaleX = 0x11999;
1565 monster->
scaleY = 0x11999;
1569 monster->
facing = 0x5000;
1570 monster->
bounce = 0x6666;
1839 for (index = 0; index <= 3; index++) {
1841 category[index] = 0;
1845 for (index = 0; index <= 3; index++) {
1846 if (roster[index] == member) {
1847 matched[found] = member;
1848 category[found] = found;
1854 for (index = 0; index <= 3; index++) {
1855 if (roster[index] == member) {
1856 matched[found] = member;
1857 category[found] = found;
1863 for (index = 0; index <= 3; index++) {
1864 if (roster[index] == member) {
1865 matched[found] = member;
1866 category[found] = found;
1872 for (index = 0; index <= 3; index++) {
1873 if (roster[index] == member) {
1874 matched[found] = member;
1875 category[found] = found;
1882 for (index = 0; index <= 3; index++) {
1883 if (roster[index] == member) {
1884 matched[found] = member;
1885 category[found] = found;
1892 for (index = 0; index <= 3; index++) {
1893 if (roster[index] == member) {
1894 matched[found] = member;
1895 category[found] = found;
1902 for (index = 0; index <= 3; index++) {
1903 if (roster[index] == member) {
1904 matched[found] = member;
1905 category[found] = 10;
1912 for (index = 0; index <= 3; index++) {
1913 if (roster[index] == member) {
1914 matched[found] = member;
1915 category[found] = 11;
1922 for (index = 0; index <= 3; index++) {
1923 if (roster[index] == member) {
1924 matched[found] = member;
1925 category[found] = 20;
1951 for (index = 0; index <= 3; index++) {
1952 actor = matched[index];
1954 if (category[index] == 20) {
1963 switch (category[index]) {
2062 for (i = 0; i < 9; i++) {
2071#define TOLBI_SHIP_DECK_SEA_WRAP PIXELS(32)
2083 *camera++ += dx >> 1;
2169 for (i = 0; i <= 3; i++) {
2218 for (i = 0; i < 9; i++) {
2252 if (value >= 0x6801 && value <= 0x6fff) {
2255 }
else if (value >= 0xe801 && value <= 0xefff) {
2258 }
else if (value >= 0x7001 && value <= 0xefff) {
2275 if ((flags & 2) == 0) {
2312 for (i = 0; i <= 7; i++)
2840 {0,
CONDITION_ALWAYS, 179, 0, 653,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2841 {1,
CONDITION_ALWAYS, 216, 0, 600,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2842 {2,
CONDITION_ALWAYS, 232, 0, 664,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2843 {3,
CONDITION_ALWAYS, 216, 0, 808,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2844 {4,
CONDITION_ALWAYS, 216, 4, 648,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2845 {5,
CONDITION_ALWAYS, 312, -4, 656,
FACING_WEST, 0, -1, -1, -1, -1, 0},
2846 {6,
CONDITION_ALWAYS, 120, -4, 656,
FACING_EAST, 0, 65, -1, -1, -1, 0},
2847 {10,
CONDITION_ALWAYS, 232, 0, 664,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2848 {11,
CONDITION_ALWAYS, 212, 0, 521,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2849 {12,
CONDITION_ALWAYS, 192, 0, 650,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2850 {13,
CONDITION_ALWAYS, 232, 0, 654,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2851 {14,
CONDITION_ALWAYS, 216, 0, 657,
FACING_EAST, 0, -1, -1, -1, -1, 0},
2852 {15,
CONDITION_ALWAYS, 216, 0, 640,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
2853 {16,
CONDITION_ALWAYS, 216, 0, 540,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
2854 {17,
CONDITION_ALWAYS, 216, 0, 540,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
2855 {18,
CONDITION_ALWAYS, 196, 0, 652,
FACING_SOUTH, 0, 65, -1, -1, -1, 0},
2856 {19,
CONDITION_ALWAYS, 212, 0, 521,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
Ability numbers, named from the English release.
void ObjectVisual_CopyAttributes(u32 targetId, u32 sourceId)
Makes the target actor's sprite show the source actor's graphics (its VRAM block and tile).
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
Calls through a function pointer, by argument count.
The engine calls the debug menus import, and their palette swatch tiles.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
void ObjectSystem_ResumeProjectionAndHideLayers(void)
Resumes the object camera updates and hides BG1-3 and the sprites.
void ObjectSystem_SuspendProjectionAndShowSprites(void)
Suspends the object camera updates, starts the palette back to normal and, a frame later,...
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
u32 Math_RemainderUnsigned(u32 dividend, u32 divisor)
static s32 Event_OpenMessage(s32 speaker, s32 flags)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
s32 Engine_MathSin(s32 angle)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
void Engine_ActorDestroy(s32 actor)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_EventOpenScreen(void)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
void Engine_CameraWaitForMove(void)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_ActorWaitForMove(s32 actor)
void Engine_CameraFollowActor(s32 actor, s32 keep_position)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
static void Event_ShowMessage(s32 speaker, s32 flags)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
void Engine_ActorSetChildValue(s32 actor, s32 value)
static void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)
Sets shake amplitudes in fixed-point pixels and the per-frame decay factor.
#define STORE_CONST(place)
static void Actor_SetChildValue(s32 actor, s32 value)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
s32 Engine_MathCos(s32 angle)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ObjectMotionSetPositionAndCommit(s32 actor, s32 x, s32 z)
void Engine_MapRedraw(void)
static s32 Random_Next(void)
static void Camera_MoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
static struct FieldActor * Actor_Get(s32 actor)
@ TRANSITION_BACKDROP_FADE
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
#define SCENE_TRANSITION(style, variant)
@ ACTOR_FACES_MOTION
turns toward its velocity, 1/16 turn a frame
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static s32 Task_AddCallback(void(*callback)(void), s32 priority)
Calls the main-image scheduler through engine_call.h.
static void FieldObjectMotion_CenterOnColumn(s32 a0, s32 a1, s32 a2)
static void FieldObject_MotionSetPositionAndCommit(s32 actor, s32 x, s32 z)
static void FieldObjectMotion_ResetAndSetPosition(s32 a0, s32 a1, s32 a2)
static void FieldObject_SetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
Game flags, named where their meaning is shown.
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_TOLBI_SHIP_REACHED_TOLBI
The ship reached Tolbi. "The ship has arrived safely".
#define FLAG_TOLBI_SHIP_CREWMAN_CONFRONTED
#define FLAG_TOLBI_SHIP_ROWING
the oars are moving
#define FLAG_TOLBI_SHIP_FOURTH_SEAT_ROWERS
#define FLAG_TOLBI_SHIP_SECOND_SEAT_ROWERS
#define FLAG_TOLBI_SHIP_FIRST_SEAT_ROWERS
The passengers chosen to row: a group of nine flags for each empty seat, one flag for each passenger,...
#define FLAG_TOLBI_SHIP_FIRST_ATTACK_REPELLED
The monster attacks fought off.
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
#define FLAG_TOLBI_SHIP_AT_ISLAND
at anchor off the island
#define FLAG_TOLBI_SHIP_KRAKEN_DEFEATED
#define FLAG_SCENE_TEMP_71
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_TOLBI_SHIP_ANCHOR_CHARM_RETURNED
The party gave back the captain's Anchor Charm and agreed to protect the ship.
#define FLAG_TOLBI_SHIP_WARRIORS_SEEK_CAPTAIN
#define FLAG_TOLBI_SHIP_THIRD_SEAT_ROWERS
#define FLAG_KALAY_COLOSSO_TOUR_LEFT
the tour group has left town
#define FLAG_SCENE_TEMP_72
#define FLAG_NOT_ON_MAP
the current place is not on the world map
#define FLAG_TOLBI_SHIP_ISLAND_SCOUT_AGREED
the party will scout it
#define FLAG_TOLBI_SHIP_CREW_WONDERED_AT_DELAY
The crew have wondered what became of the replacement ship.
GameState, the game's state: play time, coins, the scene and the leader's position,...
#define Battle_SetStart(mode)
Sets the battle start type.
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
The screen blend's globals and the graphics routines.
The heap's work slots and HeapState.
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_LABEL(n)
Branch destination.
#define SC_SET(w, v)
Write a work value.
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_POS(x, y, z)
Set position.
#define SC_SYNC
Wait for arrival.
#define SC_SE(n)
Sound effect.
#define SC_MOVE(x, y, z)
Move toward the target.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
#define SC_END
Return to the main script.
void Battle_ResetEffectCounter(void)
Clears the field's busy flag and, while Reveal is active, ends it: Reveal used with ACT_PACKED runs i...
void Event_CallWithLastActiveObjectId(struct ScenePlacement *table)
Spawns the actors of a placement table after the last actor in use.
void Ui_SetMessageVoiceFromActor(s32 actor)
Sets the voice of the messages that follow to that of actor's sprite, at the rate the message speed o...
static s32 Scene_SquashAndStretch(struct ScriptInterpreter *interpreter)
An object script call, each frame: every 60 to 149 frames the actor squashes and stretches back to it...
void Field_RequestBattleFromEncounterTable(s32 zoneNo, s32 slotNo)
Sets up a battle with enemy group slot of encounter table zone.
void Event_SetNextDestination(s32 scene, s32 entrance)
Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
Scene numbers, named after their places.
char SceneId_TolbiShipInteriors
char SceneId_TolbiShipDeck
The field object script interpreter and the operands its commands read.
Song and sound effect ids, indices into gSound_SongTable.
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_ActorShowEmote()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s32 startTransition
SCENE_TRANSITION(style, variant).
s16 touchedTrigger
the step event a touch or exit event answers
u16 message
the next message, advanced as each window opens
A field actor: a person or thing on the field with a position, motion toward a target,...
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
s32 speed
speed limit, 16.16 fixed-point pixels per frame
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 steeringFlags
ActorSteeringFlag bits.
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
u8 riseCounter
not read by the engine; scene code's own counter
union FieldCoordinate x
16.16 fixed-point pixels
s32 targetZ
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 retainSpriteCache
Nonzero keeps its sprite's VRAM cache entry while sprites are suspended or it is off screen (ObjectSy...
s32 bounce
The share of its falling speed kept as it bounces on landing, 16.16 fixed point (0x4000 when created)...
union FieldCoordinate y
16.16 fixed-point pixels
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
s32 velocityY
16.16 fixed-point pixels per frame
s32 gravity
Taken off the vertical velocity each frame while it is above the ground, in 16.16 fixed-point pixels ...
union FieldCoordinate z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
s32 targetY
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 scaleY
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
s32 riseBaseY
Zeroed by FieldObject_Create and not read by the engine; scene code keeps a resting height,...
u16 wait
the object script's wait, in frames (ScriptMotionObject)
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
u8 riseEnabled
not read by the engine; scene code's own state
s16 savedScene
where a defeat returns to without a defeat point
s16 savedEntrance
where a defeat returns to without a defeat point
An oar's animation object, seen for the tilt that follows its swing.
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
u8 talkFacing
enum ActorTalkFacing; 3 follows the leader afterwards
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The prefix that command handlers read from a field object's 0x70-byte slot.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
static void TolbiShipDeck_RestOars(void)
When not under sail: the oars lie at rest, all following the first rower's placeholder,...
const s32 gTolbiShipDeck_LeadActionsB[]
static void TolbiShipDeck_SightSeaMonsters(void)
Entrance 11: sea monsters are sighted. "Aye, Captain! Sea monsters!".
static void TolbiShipDeck_TalkToWaitingPassenger24(void)
Another waiting passenger, with the same three moods as actor 21.
static void TolbiShipDeck_SetUpOars(void)
Under sail: shows the rowers (8 to 11) and the oars (12 to 19, the right-hand ones mirrored),...
const s32 gTolbiShipDeck_CrewActionsE[]
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 ...
static void TolbiShipDeck_AskHeadedForColosso(void)
A passenger asks whether the party is headed for Colosso too.
static void TolbiShipDeck_ShowOar(s32 a)
Shows an oar or rower drawn under the deck, with no collision.
const s32 gTolbiShipDeck_RosterActions[]
static void TolbiShipDeck_SetUpAtAnchor(void)
At anchor off the island: the crew stand where they were left, by whether the party has agreed to sco...
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 r...
static u16 sStrokePhase[4]
static void TolbiShipDeck_RowOars(void)
The task that rows: advances the four rowers' strokes and swings the eight oars, each following its r...
const s32 gTolbiShipDeck_LeadActionsA[]
const s32 gTolbiShipDeck_SailorActions[]
static void TolbiShipDeck_AdvanceStroke(s32 actor, s32 slot)
Advances one rower's stroke phase: slowly through the catch and the finish of the stroke,...
const s32 gTolbiShipDeck_PresentationActionsA[]
const struct SceneRegion * TolbiShipDeck_GetRegions(void)
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 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 em...
static void TolbiShipDeck_JumpIntoKrakenBattle(void)
Entrance 15: the party jumps down to the deck, gathers and charges; the battle with the Kraken begins...
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 ...
static void TolbiShipDeck_DepartWithParty(void)
Entrance 10 with the party aboard: Kaja brings word to actor 23.
static void TolbiShipDeck_Turn(s32 a, s32 b)
Turns an actor to a facing over 10 frames.
static s32 TolbiShipDeck_ShowSprite(struct ScriptInterpreter *interpreter)
An action-script call: shows the actor's sprite. Returns 0 to end the call.
const struct SceneEvent gTolbiShipDeckEventsArrived[]
static void TolbiShipDeck_MonsterLandsOnDeck(void)
Entrance 14: a great shape rises from the sea and a monster drops onto the deck.
static void TolbiShipDeck_SetUpAfterKraken(void)
After the Kraken: as under sail, with Sean at the helm.
static void TolbiShipDeck_CopyAnchoredCells(void)
Redraws two more blocks of cells, as they are at anchor.
static void TolbiShipDeck_OpenSecondDoor(void)
Opens the second door to below deck, once a visit.
const s32 gTolbiShipDeckRowerStrokes[]
How hard each passenger rows, for actors 23 to 31: 1 leaves the oar still, 2 to 4 row ever faster.
const s32 gTolbiShipDeck_PresentationActionsB[]
static void TolbiShipDeck_RowersDisembark(void)
Entrance 18, at Tolbi: the four passengers who rowed come up from below in turn and each says somethi...
static void TolbiShipDeck_TalkToWaitingPassenger21(void)
A passenger at Kalay.
static s32 TolbiShipDeck_LeapAtOuranos(struct ScriptInterpreter *interpreter)
The update of a monster on deck that, at random, leaps at Ouranos: it jumps to him,...
const struct SceneEvent gTolbiShipDeckEventsAtIsland[]
static s32 TolbiShipDeck_RandomlyStartActorHop(struct ScriptInterpreter *interpreter)
Makes the actor hop at random, one frame in 40 on average. Returns 1.
const s32 gTolbiShipDeck_CrewActionsB[]
const struct ScenePlacement gTolbiShipDeck_CrewScriptB[]
const struct ScenePlacement gTolbiShipDeckPlacementsArrived[]
const s32 gTolbiShipDeck_DeckActionsA[]
const struct ScenePlacement gTolbiShipDeck_CrewScriptE[]
static void TolbiShipDeck_MonstersBoard(void)
Entrance 12: the monsters leap aboard and someone cries out.
static s32 TolbiShipDeck_LookAround(struct ScriptInterpreter *interpreter)
Now and then (two chances in 32) turns the actor to look north-northeast or north-northwest.
const struct ScenePlacement gTolbiShipDeck_CrewScriptD[]
static void TolbiShipDeck_MonstersAttackCrew(void)
Entrance 13: the monsters harry the crew while more of them climb aboard.
static s32 TolbiShipDeck_HoverAndDiveAtSean(struct ScriptInterpreter *interpreter)
The same for the monster that dives at Sean.
static void TolbiShipDeck_OfferToScoutIsland(void)
At anchor: the party is asked to scout the island; Garet and Ivan may argue before the party agrees.
const struct SceneEntrance gTolbiShipDeckEntrances[]
const struct SceneEvent * TolbiShipDeck_GetEvents(void)
const s32 gTolbiShipDeck_DeckEventActions[]
static UNUSED s32 sUnused1
never used; keeps the statics' layout
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.
const s32 gTolbiShipDeck_CrewActionsA[]
static void TolbiShipDeck_ApplyEntryState(void)
Applies the voyage's state: which cells and oars are drawn, whether the deck rocks and the sea scroll...
static void TolbiShipDeck_ThankForKraken(void)
Entrance 16: Isaac is thanked for the Kraken.
static void TolbiShipDeck_ConfrontCrewman(void)
The start both of those share: the camera pans to the door, which opens, and the crewman steps out an...
static void TolbiShipDeck_CatchCrewmanFromEast(void)
Approaching from the east side of the door: the crewman comes out, protests and slips away round the ...
static void TolbiShipDeck_CatchCrewmanFromWest(void)
The same, approaching from the west side.
const s32 gTolbiShipDeck_LeadActionsC[]
const struct ScenePlacement * TolbiShipDeck_GetPlacements(void)
static void TolbiShipDeck_RockDeck(void)
The callback that rocks the deck while under sail: sways the camera on two random-walking angles and ...
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.
const s32 gTolbiShipDeck_CrewActionsD[]
static void TolbiShipDeck_PlacePassengersAgreedToRow(void)
At Kalay once the party has agreed to protect the ship: places the passengers who promised to row.
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 ...
static void TolbiShipDeck_PlaceWaitingPassengers(void)
At Kalay while the ship waits: places the passengers by what has happened so far.
static void TolbiShipDeck_WatchCrewDecideToSail(void)
At Kalay, once the party has heard of the delay (flag 0x911): the crew wonder what happened to the re...
static void TolbiShipDeck_OpenFirstDoor(void)
Opens the first door to below deck, once a visit.
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.
#define TOLBI_SHIP_DECK_SEA_WRAP
const struct ScenePlacement gTolbiShipDeck_CrewScript[]
const struct ScenePlacement gTolbiShipDeckPlacementsRowing[]
const struct ScenePlacement gTolbiShipDeck_ClosingCrewScript[]
static void TolbiShipDeck_SetUpUnderSail(void)
Under sail: the crew take their places, the two lookouts start their rounds and, when the party keeps...
const struct ScenePlacement gTolbiShipDeckPlacements[]
const struct ScenePlacement gTolbiShipDeckPlacementsWaiting[]
const struct ScenePlacement gTolbiShipDeckPlacementsAtSea[]
#define FLAG_TOLBI_SHIP_KRAKEN_ABOARD
"There's a huge sea monster on the ship!": the deck shakes until the Kraken is defeated (set in tolbi...
static void TolbiShipDeck_GoBelow(void)
Walking into one of the ways below deck (triggers 1 to 3).
static void TolbiShipDeck_Say(s32 a)
Shows the current message from a speaker and waits 10 frames.
const u32 * TolbiShipDeck_GetExits(void)
const struct SceneEvent gTolbiShipDeckEventsAtSea[]
const struct SceneRegion gTolbiShipDeckRegions[]
TolbiShipDeckActor
Who is who on deck.
@ KALAY_CREWMAN
denies everything. "I didn't do anything..."
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...
static void TolbiShipDeck_AnnouncePreparationsReady(s32 a0, s32 a1)
The messenger comes up through the first door to report, the officer calls the ship ready,...
const s32 gTolbiShipDeck_RandomActorActions[]
const s32 gTolbiShipDeck_CrewActionsC[]
const s32 gTolbiShipDeck_DeckActionsC[]
const struct SceneEntrance * TolbiShipDeck_GetEntrances(void)
const s32 gTolbiShipDeck_DeckActionsB[]
#define SPEAKER(actor, window)
A speaker: the actor, and in the top four bits where the message window opens beside them (4,...
static void TolbiShipDeck_ChooseOarStrokes(void)
Gives each oar the stroke of its seat's rower; empty seats take stroke 3.
static s32 TolbiShipDeck_LeapAtSean(struct ScriptInterpreter *interpreter)
The same for the monster that leaps at Sean.
static UNUSED s32 sUnused0
never used; keeps the statics' layout
static void TolbiShipDeck_ArriveAtTolbi(void)
Entrance 19: the ship reaches Tolbi and the crew talk it over before Kaja goes below.
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 doc...
const struct ScenePlacement gTolbiShipDeck_CrewScriptC[]
const struct SceneEvent gTolbiShipDeckEvents[]
const s32 gTolbiShipDeck_LeaveActions[]
const u32 gTolbiShipDeckExits[]
static void TolbiShipDeck_PlaceLeaderOnDeck(void)
Places the leader on the deck facing south, with the camera on them.
static void TolbiShipDeck_SightLand(void)
Entrance 17: land is sighted. "Hey, I can see land!".
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
The patch levels: our groups of the measured changes from the Japanese release.
void UiText_ShowCenteredMessage(s32 message, s32 mode, s32 yOffset)
Shows a message centred on the screen (yOffset tiles lower) and waits until it is typed out,...