12#include "text/msg_ids.h"
23#define FLAG_TOLBI_INTERIORS_SAILORS_SEEN 0x300
26#define TOLBI_INTERIORS_INN_CAMERA_MAX_Z 736
27#define TOLBI_INTERIORS_EAST_ROOM_CAMERA_MAX_X 944
28#define TOLBI_INTERIORS_SOUTH_ROOM_CAMERA_MAX_Z 928
30#define TOLBI_INTERIORS_INN_CAMERA_MAX_Z 744
31#define TOLBI_INTERIORS_EAST_ROOM_CAMERA_MAX_X 952
32#define TOLBI_INTERIORS_SOUTH_ROOM_CAMERA_MAX_Z 936
77static void TolbiInteriors_AskWhetherBabiWasMissing(
s32 speaker) {
239 s32 clearedPriorityFlags;
462 {0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
463 {1,
CONDITION_ALWAYS, 160, 0, 216,
FACING_NORTH, 0, 0, 0, 256, 256, 0},
464 {2,
CONDITION_ALWAYS, 336, 0, 200,
FACING_NORTH, 0, 248, 64, 488, 216, 0},
465 {3,
CONDITION_ALWAYS, 544, 0, 200,
FACING_NORTH, 0, 520, 48, 696, 216, 0},
466 {4,
CONDITION_ALWAYS, 792, 0, 216,
FACING_NORTH, 0, 688, 0, 960, 240, 0},
467 {5,
CONDITION_ALWAYS, 544, 0, 424,
FACING_NORTH, 0, 488, 264, 696, 448, 0},
468 {6,
CONDITION_ALWAYS, 312, 0, 472,
FACING_NORTH, 0, 208, 272, 456, 488, 0},
469 {8,
CONDITION_ALWAYS, 824, 0, 528,
FACING_NORTH, 0, 688, 248, 944, 568, 0},
470 {9,
CONDITION_ALWAYS, 128, 0, 768,
FACING_NORTH, 0, 0, 536, 304, 800, 0},
471 {10,
CONDITION_ALWAYS, 56, 0, 608,
FACING_NORTH, 0, 0, 536, 304, 800, 0},
472 {11,
CONDITION_ALWAYS, 464, 0, 624,
FACING_SOUTH, 0, 320, 568, 616,
474 {12,
CONDITION_ALWAYS, 392, 0, 728,
FACING_NORTH, 0, 320, 568, 616,
476 {13,
CONDITION_ALWAYS, 536, 0, 728,
FACING_NORTH, 0, 320, 568, 616,
478 {14,
CONDITION_ALWAYS, 392, 0, 680,
FACING_SOUTH, 0, 320, 568, 616,
480 {15,
CONDITION_ALWAYS, 536, 0, 680,
FACING_SOUTH, 0, 320, 568, 616,
486 {18,
CONDITION_ALWAYS, 440, 0, 920,
FACING_NORTH, 0, 288, 768, 528,
488 {19,
CONDITION_ALWAYS, 584, 0, 920,
FACING_NORTH, 0, 496, 768, 736,
491 {30,
CONDITION_ALWAYS, 824, 0, 352,
FACING_NORTH, 0, 688, 248, 944, 568, 0},
Ability numbers, named from the English release.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Engine_SanctumOpen(s32 priest)
void Object_SetMode(struct FieldActor *object, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ObjectDispatchRelease(struct FieldActor *object)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
static void Actor_WalkByAndWait(s32 actor, s32 dx, s32 dz)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
static void Event_ShowMessage(s32 speaker, s32 flags)
#define MAP_CELL_STEPS_END
s32 Engine_GameFlagIsSet(s32 flag)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ShopOpen(s32 shop, s32 keeper)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_EventWait(s32 frames)
#define SCENE_TRANSITION(style, variant)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define FIND_MESSAGE(message)
#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 FLAG_COLOSSO_OVER
the Colosso finals have been fought
#define FLAG_BABI_SAVED
The party has saved Babi in Altmiller Cave with his Mystic Draught; Tolbi then holds the Colosso fina...
#define FLAG_TOLBI_INTERIORS_MEDAL_MISSED
she has greeted them since
#define FLAG_TOLBI_DOCKS_CONFRONTATION_SEEN
The passengers confronted the tour guides and their bodyguard.
#define FLAG_TOLBI_INTERIORS_MEDAL_TAKEN
the party took it
#define FLAG_TOLBI_INTERIORS_MEDAL_HIDDEN
she hid it in the barrel
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
Item numbers, named from the English release.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_SET(w, v)
Write a work value.
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
Song and sound effect ids, indices into gSound_SongTable.
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()
#define FACING_NEAREST_CARDINAL(facing)
A facing rounded to the nearest of east, south, west and north.
@ TOLBI_INTERIORS_MEDAL_BARREL
@ TOLBI_INTERIORS_VIAL_BARREL
@ TOLBI_INTERIORS_INN_SIGN
the inn's sign. "Inn Full / No Vacancies"
@ TOLBI_INTERIORS_PIZZA_OVEN
@ TOLBI_INTERIORS_SEAFOOD_PASTA_OVEN
@ TOLBI_INTERIORS_PASTA_OVEN
@ TOLBI_INTERIORS_HIDDEN_MEDAL_BARREL
where the woman hid her find
@ TOLBI_INTERIORS_WEAPON_SHOPKEEPER
@ TOLBI_INTERIORS_ANGRY_SAILOR
@ TOLBI_INTERIORS_MEDAL_WOMAN
@ TOLBI_INTERIORS_SAILOR_C
@ TOLBI_INTERIORS_ARMOR_SHOPKEEPER
@ TOLBI_INTERIORS_SAILOR_B
@ TOLBI_INTERIORS_ITEM_SHOPKEEPER
@ TOLBI_INTERIORS_HOST
offers a stay. "Do you want to stay with us?"
@ TOLBI_INTERIORS_WOULD_BE_WARRIOR
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
s32 transitionFrames
frames
A field actor: a person or thing on the field with a position, motion toward a target,...
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
Cell replacement: procedure and destination cells.
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,...
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
const struct ScenePlacement * TolbiInteriors_SelectPlacements(void)
After Colosso the rooms hold a different crowd.
#define TOLBI_INTERIORS_INN_CAMERA_MAX_Z
static void TolbiInteriors_ReadMedalWomanMind(void)
Mind Read on the medal woman gives the hiding place away.
static void TolbiInteriors_TalkToItemShopkeeper(s32 speaker)
The item shopkeeper: from across the counter (the leader facing west) opens shop 28; from elsewhere t...
static void TolbiInteriors_WatchWomanHideMedal(void)
After Colosso, entering by entrance 19: a woman finds something on the floor, is startled to see the ...
const u32 * TolbiInteriors_GetExits(void)
struct MapCellAnim gTolbiInteriorsDoors[]
struct ScenePlacement gTolbiInteriorsPlacements[]
struct SceneEntrance gTolbiInteriorsEntrances[]
s32 gTolbiInteriorsSquashStretch[]
An actor that squashes and stretches twice, then rests 40 frames.
static void TolbiInteriors_TalkToChef(s32 speaker)
The chef asks whether the party watched Colosso, which he missed.
static void TolbiInteriors_TalkToHost(s32 speaker)
During the festival, a resident offers the party a bed.
static void TolbiInteriors_TalkToAngrySailor(s32 speaker)
The angry sailor complains the ships won't sail after Colosso.
static void TolbiInteriors_TalkToWeaponShopkeeper(s32 speaker)
The weapon shopkeeper: across the counter (the leader facing north) opens the shop; otherwise talks a...
u16 gTolbiInteriorsDoorOpening[]
u32 gTolbiInteriorsExits[]
struct SceneEvent gTolbiInteriorsEventsFinalsDay[]
static UNUSED void TolbiInteriors_ExitThroughWindow(void)
Leaves through a window transition of 24 frames. No event uses it.
static void TolbiInteriors_TalkToMedalWoman(s32 speaker)
The woman who hid the Lucky Medal.
static void TolbiInteriors_TalkToWouldBeWarrior(s32 speaker)
After Colosso, the would-be warrior asks whether the party remembers him.
s32 TolbiInteriors_ApplyEntryState(void)
Sets up the rooms on entry.
static void TolbiInteriors_EnterDoor(void)
Walking into one of the four doors at triggers 14 to 17: every placed actor stops,...
static void TolbiInteriors_TalkToPriest(s32 speaker)
The priest: across the counter (the leader facing north) opens the sanctum; otherwise talks about the...
static void TolbiInteriors_TalkToWaiter(s32 speaker)
After Colosso, a waiter grumbles about the chef's bad mood.
static void TolbiInteriors_TalkToArmorShopkeeper(s32 speaker)
The armor shopkeeper: across the counter (the leader facing north) opens the shop; otherwise talks ab...
const struct SceneRegion * TolbiInteriors_GetRegions(void)
@ TOLBI_INTERIORS_ITEM_SHOP
@ TOLBI_INTERIORS_FIRST_DOOR_TRIGGER
@ TOLBI_INTERIORS_ACTOR_SLOT_END
@ TOLBI_INTERIORS_WEAPON_SHOP
@ TOLBI_INTERIORS_ARMOR_SHOP
struct SceneEvent gTolbiInteriorsEventsFestival[]
static void TolbiInteriors_WatchSailorsArgue(void)
After Colosso, entering by entrance 16: three sailors argue about their captain, who won't sail the s...
static void TolbiInteriors_AskYesNo(s32 question, s32 speaker)
Asks a yes/no question, then answers with the message after the question for yes or the one after tha...
struct SceneEvent gTolbiInteriorsEventsAfterColosso[]
const struct SceneEvent * TolbiInteriors_SelectEvents(void)
Picks the event table for the current point in the Colosso story.
struct ScenePlacement gTolbiInteriorsPlacementsAfterColosso[]
const struct SceneEntrance * TolbiInteriors_GetEntrances(void)
#define TOLBI_INTERIORS_SOUTH_ROOM_CAMERA_MAX_Z
#define FLAG_TOLBI_INTERIORS_SAILORS_SEEN
their argument has played
#define TOLBI_INTERIORS_EAST_ROOM_CAMERA_MAX_X
The integer types, TRUE, UNUSED and the fixed-address macros.