Alchemy
Loading...
Searching...
No Matches

suhalla_interiors.c

Go to the documentation of this file.
1/// @file
2/// Suhalla's houses, shop, inn and sanctum. After Babi's audience the inn holds
3/// two of Tolbi's soldiers, wounded in the sandstorms, and Iodem comes to
4/// question them about Sheba.
5
6#include "game_state.h"
7#include "field_event.h"
8#include "unit/import.h"
10#include "unit/object/object.h"
12#include "suhalla_interiors.h"
13#include "text/msg_ids.h"
14#include "types.h"
15#include "ability_ids.h"
16#include "field_scene.h"
17#include "item_ids.h"
18#include "flags.h"
19#include "songs.h"
20
21/// Arriving by this entrance also marks Babi's audience as held.
22enum { ENTRANCE_90 = 90 };
23
24/// The actors this scene's code names, by their place in the placement tables.
25enum {
28 PRIEST = 18, ///< keeps the sanctum
29 IODEM = 19,
30 SOLDIER_SOUTH = 20, ///< the wounded soldiers in the inn's beds
32};
33
34enum { SHOP_SUHALLA = 31, INN_SUHALLA = 10 };
35
36const struct SceneEntrance *Scene_GetEntrances(void) {
38}
39
40const struct SceneRegion *Scene_GetRegions(void) {
41 return (const struct SceneRegion *)gSuhallaInteriorsRegions;
42}
43
45
46/// The townsfolk, joined after Babi's audience by Iodem, the wounded soldiers
47/// and the travelers the sandstorms brought.
51 }
53}
54
55/// Spoken to facing north, across the counter, the shopkeeper opens the shop;
56/// otherwise the shopkeeper says Suhalla's is the only store, or, after Babi's
57/// audience, asks whether the party is surprised to find so few shops.
58static void Event_TalkToShopkeeper(s32 actorId) {
59 u16 facing = (Object_GetById(ACTOR_PARTY_LEADER)->facing + 0x2000) & ~0x3fff;
60 if (facing == FACING_NORTH) {
63 s32 question = MsgSuhallaArentSurprisedFind;
64 Engine_EventSetMessage(question);
65 Engine_EventOpenMessage(actorId, 0);
68 Engine_EventSetMessage(question + 1);
69 } else {
70 Engine_EventSetMessage(question + 2);
71 }
72 Engine_EventShowMessage(actorId, 0);
73 } else {
74 Engine_EventSetMessage(MsgSuhallaOursOnlyStore);
75 Engine_EventShowMessage(actorId, 0);
76 }
77}
78
79/// Spoken to facing north, across the counter, the innkeeper offers a room;
80/// otherwise the innkeeper has nothing to do until Tolbi's festival ends, or,
81/// after Babi's audience, has been busy since the sandstorms began.
82static void Event_TalkToInnkeeper(s32 actorId) {
83 u16 facing = (Object_GetById(ACTOR_PARTY_LEADER)->facing + 0x2000) & ~0x3fff;
84 if (facing == FACING_NORTH) {
87 Engine_EventSetMessage(MsgSuhallaBusyEverSince);
88 Engine_EventShowMessage(actorId, 0);
89 } else {
90 Engine_EventSetMessage(MsgSuhallaSighNothinMaybe);
91 Engine_EventShowMessage(actorId, 0);
92 }
93}
94
95/// Spoken to facing north, across the counter, the priest offers the
96/// sanctum's services; otherwise the priest talks of Lalivero under Tolbi's
97/// rule, or, after Babi's audience, wonders why there are so many sandstorms.
98static void Event_TalkToPriest(s32 actorId) {
99 u16 facing = (Object_GetById(ACTOR_PARTY_LEADER)->facing + 0x2000) & ~0x3fff;
100 if (facing == FACING_NORTH) {
101 Engine_ShopConfirmAct(actorId);
103 Engine_EventSetMessage(MsgSuhallaWonderWhySandstorms);
104 Engine_EventShowMessage(actorId, 0);
105 } else {
106 Engine_EventSetMessage(MsgSuhallaGetSickThinkingAboutLalivero);
107 Engine_EventShowMessage(actorId, 0);
108 }
109}
110
111/// A traveler asks whether the party was blown here on the way to Babi
112/// Lighthouse, and answers yes or no.
113static void Event_AskIfBlownHere(s32 actorId) {
114 s32 question = MsgSuhallaSupposeFolkBlown;
115 Engine_EventSetMessage(question);
116 Engine_EventOpenMessage(actorId, 0);
119 Engine_EventSetMessage(question + 1);
120 } else {
121 Engine_EventSetMessage(question + 2);
122 }
123 Engine_EventShowMessage(actorId, 0);
124}
125
126/// The party leaves by the touched exit.
127static void Event_LeaveByExit(void) {
128 struct EventWork *state = gEventWork;
129 s16 *touchedTrigger = (s16 *)&state->touchedTrigger;
130
133}
134
135/// After Babi's audience, on entering the inn: Iodem steps out of the party and
136/// questions the two wounded soldiers. They were escorting Sheba to Lalivero
137/// when a sandstorm hit them, and tell of others who stopped the cyclones with
138/// water and slew the monsters causing them. Iodem resolves to search the
139/// desert for Sheba, and rejoins the party. Once the party has been to Babi
140/// Lighthouse (FLAG_IODEM_AT_BABI_LIGHTHOUSE), Iodem does not come.
142 struct FieldActor *leader;
146 Event_Begin();
147 // Frame the speakers and bring the leader over before the dialogue.
148 Camera_MoveTo(PIXELS(368), -1, PIXELS(104), 1);
154 Event_SetMessage(MsgSuhallaIodem);
155 Event_Wait(10);
157 Event_Wait(20);
159 Event_Wait(10);
161 Event_Wait(20);
162 Actor_SetSpeed(IODEM, 78643, 39321);
163 Actor_WalkByAndWait(IODEM, 0, -16);
165 Event_Wait(30);
167 Event_Wait(30);
169 Event_Wait(30);
172 Event_Wait(10);
174 Event_Wait(20);
176 Event_Wait(10);
177 Actor_SetSpeed(IODEM, 78643, 39321);
178 Actor_WalkByAndWait(IODEM, 0, -24);
181 Event_Wait(30);
183 Event_Wait(20);
186 Event_Wait(20);
189 Event_Wait(10);
191 Event_Wait(20);
193 Event_Wait(10);
195 Event_Wait(20);
197 Event_Wait(20);
199 Event_Wait(10);
201 Event_Wait(30);
204 Event_Wait(10);
207 Event_Wait(20);
208 Actor_SetSpeed(ACTOR_PARTY_LEADER, 78643, 39321);
212 Event_Wait(20);
213 Event_Wait(10);
215 Event_Wait(20);
217 Event_Wait(20);
220 Event_Wait(10);
222 Event_Wait(20);
224 Event_Wait(10);
227 Event_Wait(20);
229 Event_Wait(10);
231 Event_Wait(20);
233 Event_Wait(10);
236 Event_Wait(40);
238 Event_Wait(30);
240 Event_Wait(10);
242 Event_Wait(20);
244 Event_Wait(20);
246 Event_Wait(10);
249 Event_Wait(10);
251 Event_Wait(20);
253 Event_Wait(10);
256 Event_Wait(40);
257 Event_Wait(10);
259 Event_Wait(20);
261 Event_Wait(10);
264 Event_Wait(40);
267 Event_Wait(30);
268 Event_Wait(10);
270 Event_Wait(20);
272 Event_Wait(10);
275 Event_Wait(10);
278 Event_Wait(40);
279 Event_Wait(10);
281 Event_Wait(20);
283 Event_Wait(10);
286 Event_Wait(30);
288 Event_Wait(30);
289 Event_Wait(10);
291 Event_Wait(30);
293 Event_Wait(10);
295 Event_Wait(20);
297 Event_Wait(30);
298 Event_Wait(10);
301 Event_Wait(10);
303 Event_Wait(20);
305 Event_Wait(10);
307 Event_Wait(10);
310 Event_Wait(20);
311 Event_Wait(10);
313 Event_Wait(20);
315 Event_Wait(10);
318 Event_Wait(10);
320 Event_Wait(20);
323 Event_Wait(20);
324 Event_Wait(10);
326 Event_Wait(30);
328 Event_Wait(10);
330 Event_Wait(20);
332 Event_Wait(10);
337 Event_Wait(10);
339 Event_Wait(20);
342 Event_Wait(20);
343 Event_Wait(10);
345 Event_Wait(30);
347 Event_Wait(10);
349 Event_Wait(10);
351 Event_Wait(20);
353 Event_Wait(10);
356 Event_Wait(30);
358 Event_Wait(30);
360 Event_Wait(10);
363 Event_Wait(30);
364 Event_Wait(10);
366 Actor_WalkByAndWait(IODEM, -12, 0);
367 Event_Wait(20);
368 // Both answers converge on the following line after different waits.
371 Event_Wait(20);
374 } else {
375 Event_Wait(10);
378 }
379 Event_Wait(10);
381 Event_Wait(20);
383 Event_Wait(10);
386 Event_Wait(10);
388 Event_Wait(20);
390 Event_Wait(30);
392 Actor_SetSpeed(IODEM, 78643, 39321);
394 // Iodem walks into the leader and is hidden: he travels in the party.
396 if (leader != 0) {
397 Actor_SetDestination(IODEM, leader->x.part.pixel, leader->z.part.pixel);
398 }
401 Event_Wait(10);
402 // Back to the place's own music.
404 Event_End();
405 }
406}
407
408/// The doors, the townsfolk and the ovens, before or after Babi's audience.
409const struct SceneEvent *Scene_GetEvents(void) {
412 }
414}
415
416/// Sets the houses up as the party enters: the shopkeeper and innkeeper behind
417/// their counters, and the two wounded soldiers lying in their beds.
419 union SceneActor *work;
424 ((union SceneActor *)Object_GetById(SHOPKEEPER))->bytes[89] |= 4;
425 ((union SceneActor *)Object_GetById(INNKEEPER))->bytes[89] |= 4;
426 work = (union SceneActor *)Object_GetById(SOLDIER_SOUTH);
427 work->fields.record->field26 = 0;
428 work->fields.record->angle = 0x4000;
429 {
430 struct SceneRecord *record = work->fields.record;
431 s32 flags = ~12;
432
433 flags &= record->flags;
434 record->flags = flags | 4;
435 }
436 work = (union SceneActor *)Object_GetById(SOLDIER_NORTH);
437 work->fields.record->field26 = 0;
438 work->fields.record->angle = 0x4000;
439 work->bytes[85] = 2;
440 work->fields.y = 0;
441 return 0;
442}
443
445 {0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
446 {1, CONDITION_ALWAYS, 256, 0, 456, FACING_NORTH, 0, 0, 280, 336, 480, 0},
447 {2, CONDITION_ALWAYS, 432, 0, 728, FACING_NORTH, 0, 312, 528, 552, 752, 0},
448 {3, CONDITION_ALWAYS, 640, 0, 168, FACING_NORTH, 0, 496, 16, 736, 192, 0},
449 {4, CONDITION_ALWAYS, 112, 0, 168, FACING_NORTH, 0, 0, 16, 240, 208, 0},
450 {5, CONDITION_ALWAYS, 352, 0, 216, FACING_NORTH, 0, 256, 16, 496, 232, 0},
451 {6, CONDITION_ALWAYS, 432, 0, 630, FACING_NORTH, 0, 312, 528, 552, 752, 0},
452 {7, CONDITION_ALWAYS, 680, 0, 120, FACING_WEST, 0, 496, 16, 736, 192, 0},
453 {10, CONDITION_ALWAYS, 104, 0, 360, FACING_NORTH, 0, 0, 280, 336, 480, 0},
454 {11, CONDITION_ALWAYS, 152, 0, 360, FACING_NORTH, 0, 0, 280, 336, 480, 0},
455 {12, CONDITION_ALWAYS, 472, 0, 344, FACING_SOUTH, 0, 344, 280, 584, 440, 0},
456 {13, CONDITION_ALWAYS, 712, 0, 344, FACING_SOUTH, 0, 600, 280, 840, 440, 0},
457 {14, CONDITION_ALWAYS, 88, 0, 352, FACING_SOUTH, 0, 0, 280, 336, 480, 0},
458 {15, CONDITION_ALWAYS, 88, 0, 584, FACING_NORTH, 0, 16, 528, 256, 688, 0},
460};
461
462// clang-format off
464 83, 28, 356, 91, 36, 364, -1, 14,
465 83, -20, 596, 91, -12, 604, -1, 15,
466 -1, 0, 0, 0, 0, 0, 0, 0,
467};
468
470 SCENE_EXITS(168),
471 SCENE_EXIT(1, 167, 1),
472 SCENE_EXIT(2, 167, 2),
473 SCENE_EXIT(3, 167, 3),
474 SCENE_EXIT(4, 167, 4),
475 SCENE_EXIT(5, 167, 5),
476 SCENE_EXIT(10, 168, 12),
477 SCENE_EXIT(11, 168, 13),
478 SCENE_EXIT(12, 168, 10),
479 SCENE_EXIT(13, 168, 11),
480 SCENE_EXIT(14, 168, 15),
481 SCENE_EXIT(15, 168, 14),
483};
484
487 PIXELS(368), 0, PIXELS(192), FACING_SOUTH, TALK_FACE_PARTY, 0 },
491 PIXELS(56), 0, PIXELS(120), FACING_EAST, TALK_FACE_PARTY, 0 },
493 PIXELS(160), 0, PIXELS(104), FACING_SOUTH, TALK_FACE_PARTY, 0 },
495 PIXELS(568), 0, PIXELS(96), FACING_SOUTH, TALK_FACE_PARTY, 0 },
497 PIXELS(272), 0, PIXELS(392), FACING_SOUTH, TALK_FACE_PARTY, 0 },
507 PIXELS(432), 0, PIXELS(600), FACING_SOUTH, TALK_FACE_PARTY, 0 },
508 { SCENE_TABLE_END },
509};
510
517 PIXELS(56), 0, PIXELS(120), FACING_EAST, TALK_FACE_PARTY, 0 },
519 PIXELS(160), 0, PIXELS(104), FACING_SOUTH, TALK_FACE_PARTY, 0 },
521 PIXELS(568), 0, PIXELS(96), FACING_SOUTH, TALK_FACE_PARTY, 0 },
523 PIXELS(272), 0, PIXELS(392), FACING_SOUTH, TALK_FACE_PARTY, 0 },
531 PIXELS(136), 0, PIXELS(616), FACING_SOUTH, TALK_FACE_PARTY, 0 },
533 PIXELS(432), 0, PIXELS(600), FACING_SOUTH, TALK_FACE_PARTY, 0 },
535 PIXELS(-64), 0, PIXELS(-64), FACING_EAST, TALK_KEEP_FACING, 0 },
537 PIXELS(416), 0, PIXELS(136), FACING_SOUTH, TALK_KEEP_FACING, 0 },
539 PIXELS(416), 0, PIXELS(80), FACING_SOUTH, TALK_KEEP_FACING, 0 },
540 { SCENE_TABLE_END },
541};
542
553 { EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsMyFatherLovesPeopleSoMuch) },
554 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsLetMeKnowIfYouHave) },
555 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWhenISeePeopleInTrouble) },
556 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsIWantToHelpPeopleSo) },
557 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTolbiProbablyIgnoresSmallVillagesLike) },
558 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsIfYouHeadEastAcrossSuhalla) },
559 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsSuhallaIsADesertVillageI) },
560 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsGoodThingItsNotEasyTo) },
562 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsAVillageThisSmallCantSupport) },
564 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsIWonderIfAnyCustomersCan) },
565 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsOnceTheFestivalEndsTheTravelers) },
566 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsForSomeReasonAnyoneWhoGets) },
568 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTheHolyChildActorWillSave) },
569 { SEARCH(SEARCH_OVEN), 100, 0xfb0, FIND_ITEM(ITEM_SMOKE_BOMB) },
570 { SEARCH(SEARCH_OVEN), 100, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgSuhallaInteriorsItsACactusSteakIWonder)) },
571 { SEARCH(SEARCH_OVEN), 101, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgSuhallaInteriorsHesMakingMulukhiyaSoupItTastes)) },
573};
574
586 { EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTheWoundedAreSleepingSoDont) },
587 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsIAmAmazedTheseSoldiersSurvived) },
588 { EVENT_TALK, 20, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWhyWereTheyHeadedTowardEastern) },
589 { EVENT_TALK, 21, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWhereIsActorWhatHasHappened) },
590 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTheseOldSoldiersMustRestUntil) },
591 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWhoCouldHaveDoneThisTo) },
592 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 20, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsAColumnOfWaterShotUp) },
593 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsActorWasNotFarBehindUs) },
594 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsDoNotApproachTheLargeCyclones) },
595 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsDeathStormsHuhThereWasA) },
596 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsOnceYouGetSweptUpIn) },
597 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsYeWhoSeekSomethingAboutEyes) },
599 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWeveHadMoreCustomersLatelyBecause) },
601 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsItWillTakeTimeForThe) },
602 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTheSandstormsAreSendingCustomersOur) },
603 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsPleaseGreatSandstormsSendUsMore) },
604 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWeWentIntoTheSuhallaTo) },
605 { EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsTheSandstormsAreSoBadWeve) },
607 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsEvenIfWeCantGoIt) },
608 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsSoShallWeGiveUpOn) },
609 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsWhenThatCycloneThrewUsInto) },
611 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgSuhallaInteriorsIShudderToThinkSandstormsWill) },
612 { SEARCH(SEARCH_OVEN), 100, 0xfb0, FIND_ITEM(ITEM_SMOKE_BOMB) },
613 { SEARCH(SEARCH_OVEN), 100, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgSuhallaInteriorsItsACactusSteakIWonder)) },
614 { SEARCH(SEARCH_OVEN), 101, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgSuhallaInteriorsHesMakingMulukhiyaSoupItTastes)) },
616};
617// clang-format on
Ability numbers, named from the English release.
@ ABILITY_MIND_READ
Definition ability_ids.h:16
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
const struct ScenePlacement * Scene_GetPlacements(void)
const struct SceneEntrance * Scene_GetEntrances(void)
const struct SceneEvent * Scene_GetEvents(void)
const u32 * Scene_GetExits(void)
Both scenes share one exit table.
const struct SceneRegion * Scene_GetRegions(void)
s32 Scene_Initialize(void)
Sets up whichever scene is being entered and runs its arrival events.
static void Event_TalkToInnkeeper(void)
Opens the inn across the counter, or discusses the curse in Kolima.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
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)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
#define GameFlag_IsSet
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
#define EMOTE_IN_FRONT
Definition field_event.h:49
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
#define GameFlag_Set
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
static void Actor_WalkByAndWait(s32 actor, s32 dx, s32 dz)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
static void Event_ShowMessage(s32 speaker, s32 flags)
static void Event_PlayCue(s32 cue)
s32 Engine_GameFlagIsSet(s32 flag)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ShopOpen(s32 shop, s32 keeper)
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 struct FieldActor * Actor_Get(s32 actor)
@ TRANSITION_WINDOW
Definition field_obj.h:17
#define SCENE_TRANSITION(style, variant)
Definition field_obj.h:20
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EVENTS_END
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_TALK
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define FIND_MESSAGE(message)
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
@ ACTOR_PARTY_LEADER
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
@ ACTOR_WANDER
@ ACTOR_STAND
#define SEARCH(target)
#define SCENE_EXITS_END
Definition field_scene.h:77
@ FACING_NORTHEAST
Definition field_scene.h:33
@ FACING_EAST
Definition field_scene.h:26
@ FACING_SOUTHEAST
Definition field_scene.h:27
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_NORTHWEST
Definition field_scene.h:31
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)
@ SEARCH_OVEN
static void Event_End(void)
static void Actor_RunRepeatedMotion(s32 actor, s32 repeats)
static void Camera_WaitForMove(void)
static void Event_Begin(void)
static void Actor_StartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_WaitForMove(s32 actor)
static void FieldMotion_LaunchFromFocusedObject(s32 actor, s32 dx, s32 dz, s32 facing)
static void Actor_SetAnimation(s32 actor, s32 animation)
static void Actor_SetAnimationAndWait(s32 actor, s32 animation)
static void Event_Wait(s32 frames)
static s32 Event_ChooseYesNo(s32 actor, s32 flags)
static void Actor_FaceEachOther(s32 actor, s32 other, s32 frames)
static void Event_SetMessage(s32 message)
Game flags, named where their meaning is shown.
#define FLAG_IODEM_MET_WOUNDED_SOLDIERS
Set at Babi's palace as his audience after Colosso begins; afterwards Suhalla's people talk of the To...
Definition flags.h:370
#define FLAG_BABI_SPOKE_AFTER_COLOSSO
Babi and Iodem have spoken with the party after Colosso.
Definition flags.h:209
#define FLAG_IODEM_AT_BABI_LIGHTHOUSE
Set with it: Iodem has come to Babi Lighthouse, and from then on he no longer leaves the party in Suh...
Definition flags.h:185
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
#define IODEM
The main-image routines scene overlays import.
s32 Engine_InnCheckIn(s32 mode, s32 objectId)
s32 Engine_ShopConfirmAct(s32 unitId)
Item numbers, named from the English release.
@ ITEM_SMOKE_BOMB
Definition item_ids.h:67
@ INNKEEPER
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Definition scene.c:355
Song and sound effect ids, indices into gSound_SongTable.
#define MUS_030
Definition songs.h:40
#define SE_MAP_EXIT
Definition songs.h:116
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_AudioPlayCue()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
Definition event_work.h:20
s32 startTransition
SCENE_TRANSITION(style, variant).
Definition event_work.h:43
s16 touchedTrigger
the step event a touch or exit event answers
Definition event_work.h:26
s32 transitionFrames
frames
Definition event_work.h:45
u16 message
the next message, advanced as each window opens
Definition event_work.h:47
A field actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
union FieldCoordinate x
16.16 fixed-point pixels
Definition field_obj.h:35
union FieldCoordinate z
16.16 fixed-point pixels
Definition field_obj.h:37
u16 facing
1/65536 turns
Definition field_obj.h:34
s16 entrance
Definition game_state.h:37
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
Definition field_scene.h:54
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,...
Definition field_scene.h:81
u16 facing
1/65536 turns (enum Facing)
Definition field_scene.h:94
An actor's animation object, seen for the flags and rotation that lay a wounded soldier in his bed.
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
@ ENTRANCE_90
Definition suhalla.c:31
u32 gSuhallaInteriorsExits[]
struct ScenePlacement gSuhallaInteriorsPlacements[]
@ SHOP_SUHALLA
@ INN_SUHALLA
struct SceneEvent gSuhallaInteriorsEventsAfterAudience[]
static void Event_TalkToShopkeeper(s32 actorId)
Spoken to facing north, across the counter, the shopkeeper opens the shop; otherwise the shopkeeper s...
s16 gSuhallaInteriorsRegions[]
struct SceneEntrance gSuhallaInteriorsEntrances[]
static void Event_AskIfBlownHere(s32 actorId)
A traveler asks whether the party was blown here on the way to Babi Lighthouse, and answers yes or no...
struct SceneEvent gSuhallaInteriorsEvents[]
static void Event_LeaveByExit(void)
The party leaves by the touched exit.
struct ScenePlacement gSuhallaInteriorsPlacementsAfterAudience[]
static void Event_IodemQuestionsWoundedSoldiers(void)
After Babi's audience, on entering the inn: Iodem steps out of the party and questions the two wounde...
static void Event_TalkToPriest(s32 actorId)
Spoken to facing north, across the counter, the priest offers the sanctum's services; otherwise the p...
@ SHOPKEEPER
@ SOLDIER_SOUTH
the wounded soldiers in the inn's beds
@ SOLDIER_NORTH
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
A field actor, as its fields or as its bytes, set up as the houses load.
struct SceneActor::@276370343056364044073127153151310304323146113203 fields