Alchemy
Loading...
Searching...
No Matches

kalay_interiors.c

Go to the documentation of this file.
1/// @file
2/// Kalay's homes, inn, dining rooms and sanctum. The inn changes when the
3/// Colosso tour group leaves; room entrances select their shared actor tables.
4
5#include "game_state.h"
6#include "scene_ids.h"
10#include "battle.h"
11#include "debug.h"
12#include "field.h"
13#include "game.h"
14#include "graphics.h"
15#include "menu.h"
16#include "minigame.h"
17#include "sound.h"
18#include "system.h"
19#include "types.h"
20#include "field_event.h"
21#include "field_scene.h"
22#include "resource_3a9.h"
23#include "text/msg_ids.h"
24#include "ability_ids.h"
25#include "item_ids.h"
26#include "flags.h"
27#include "songs.h"
28
29/// The inn's rooms are entered through entrances 9 to 15 and 17.
31 ACTOR_INNKEEPER = 8, ///< in the inn
32 ACTOR_PRIEST = 8, ///< in the sanctum
33 ACTOR_TOUR_GUIDE = 12 ///< in the inn's dining room
34};
35
36static void KalayInteriors_ApplyRoomState(void);
37
38/// Selects the entrance table for the rooms or sanctum in this scene.
40 s16 scene = gGameState.scene;
41
42 if (scene == (s32)&SceneId_KalayInteriors1) {
44 }
45 if (scene == (s32)&SceneId_KalayInteriors2) {
47 }
49}
50
51const struct SceneRegion *KalayInteriors_GetRegions(void) { return NULL; }
52
54
55/// The inn rooms share a placement table, clipped to the current view.
57 s32 scene = gGameState.scene;
58
59 if (scene == (s32)&SceneId_KalayInteriors1) {
60 s32 entrance = gGameState.entrance;
61 struct ScenePlacement *table;
62
63 switch (entrance) {
64 case 9:
65 case 10:
66 case 11:
67 case 12:
68 case 13:
69 case 14:
70 case 15:
71 case 17:
73 break;
74 default:
76 break;
77 }
79 return table;
80 }
81 if (scene == (s32)&SceneId_KalayInteriors2) {
83 }
85}
86
87/// Selects room dialogue with the same entrance grouping as the placements.
89 s32 scene = gGameState.scene;
90
91 if (scene == (s32)&SceneId_KalayInteriors1) {
92 s32 entrance = gGameState.entrance;
93
94 switch (entrance) {
95 case 9:
96 case 10:
97 case 11:
98 case 12:
99 case 13:
100 case 14:
101 case 15:
102 case 17:
104 default:
106 }
107 }
108 if (scene == (s32)&SceneId_KalayInteriors2) {
110 }
112}
113
114/// The tour guide in the inn's dining room: now the party has heard of the
115/// tour. "Please finish eating if you are taking the tour! We'll be leaving
116/// soon!"
119 Engine_EventSetMessage(MsgKalayPleaseFinishEatingIfTaking);
123}
124
125/// A resident asks whether the party knows the continent south of Tolbi, and
126/// answers either way.
129 Engine_EventSetMessage(MsgKalayDoKnowAboutContinentSouth);
132}
133
134/// Spoken to across the counter, the leader facing west, the innkeeper offers a
135/// room. From any other side he asks whether the party is going to Tolbi too,
136/// or, once the tour has left, says how empty the inn feels.
139
140 if ((u16)(leader->facing - 0x6001) <= 0x3FFE) {
142 } else {
144
146 Engine_EventSetMessage(MsgKalayOurInnFeelsEmptyNow);
148 } else {
149 Engine_EventSetMessage(MsgKalayGoingTolbiAlso);
152 }
153
155 }
156}
157
158/// Spoken to across the counter, the leader facing north, the priest offers the
159/// sanctum's services; from elsewhere he says Kalay is a peaceful place.
162
163 // FACING_IS_NORTH removes the native EN halfword shift and changes its
164 // comparison constant. Keep the original unsigned-halfword arithmetic.
165 if ((u16)(leader->facing + 0x5fff) <= 0x3ffe) {
167 } else {
169 Engine_EventSetMessage(MsgKalayCanLiveInPeaceIn);
172 }
173}
174
175/// Stops the room actors, opens the selected door and walks the leader out.
177 struct EventWork *work = gEventWork;
178 u32 slot;
179 s32 doorIndex;
180 struct FieldActor *leader;
181
183
184 // Prevent idle movement while the doorway cells are animated.
185 for (slot = ACTOR_FIRST_PLACED; slot <= 65; slot++) {
186 struct FieldActor *actor = Object_GetById(slot);
187
188 if (actor != 0) {
189 actor->motionFlags = 0;
190 }
191 }
192
193 switch (work->touchedTrigger) {
194 case 12:
195 doorIndex = 0;
196 break;
197 case 13:
198 doorIndex = 1;
199 break;
200 case 16:
201 doorIndex = 2;
202 break;
203 case 19:
204 doorIndex = 3;
205 break;
206 default:
207 return;
208 }
209
211
212 {
213 u32 x = gKalayInteriors_DoorCells[doorIndex].x;
214 u32 y = gKalayInteriors_DoorCells[doorIndex].y;
215
217 }
218
219 Engine_ActorSetSpeed(ACTOR_PARTY_LEADER, 0x00008000, 0x00004000);
220
222 leader->motionFlags = 0;
223
227
228 Engine_EventRequestExit(work->touchedTrigger);
232}
233
234/// Sets the opening transition and restores room-specific actors and tiles.
239 }
240 return 0;
241}
242
243/// Once the Colosso tour has left, its guests are gone from the inn, and two
244/// residents from the houses. Entrance 3 instead redraws a rectangle of cells.
246 s16 entrance = gGameState.entrance;
247
248 switch (entrance) {
249 case 3: {
250 Map_CopyCellsTo(30, 14, 30, 16, 4, 2);
251 return;
252 }
253 case 9:
254 case 10:
255 case 11:
256 case 12:
257 case 13:
258 case 14:
259 case 15:
260 case 17:
271 } else {
273 }
274 return;
275 default:
279 }
280 break;
281 }
282}
283
285 {0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
287};
288
290 {0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
291 {1, CONDITION_ALWAYS, 144, 0, 192, FACING_NORTH, 0, 5, 45, 245, 230, 0},
292 {2, CONDITION_ALWAYS, 400, 0, 192, FACING_NORTH, 0, 255, 45, 485, 230, 0},
293 {3, CONDITION_ALWAYS, 624, 0, 240, FACING_NORTH, 0, 500, 45, 735, 275, 0},
294 {4, CONDITION_ALWAYS, 128, 0, 432, FACING_NORTH, 0, 35, 290, 275, 468, 0},
295 {5, CONDITION_ALWAYS, 384, 0, 384, FACING_NORTH, 0, 305, 255, 545, 485, 0},
296 {6, CONDITION_ALWAYS, 464, 0, 448, FACING_NORTH, 0, 305, 255, 545, 485, 0},
297 {7, CONDITION_ALWAYS, 720, 0, 496, FACING_NORTH, 0, 630, 305, 875, 535, 0},
298 {8, CONDITION_ALWAYS, 800, 0, 440, FACING_NORTH, 0, 630, 305, 875, 535, 0},
299 {9, CONDITION_ALWAYS, 48, 0, 640, FACING_NORTH, 0, 0, 495, 305, 775, 0},
300 {10, CONDITION_ALWAYS, 224, 0, 736, FACING_NORTH, 0, 0, 495, 305, 775, 0},
301 {11, CONDITION_ALWAYS, 408, 0, 616, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
302 {12, CONDITION_ALWAYS, 552, 0, 648, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
303 {13, CONDITION_ALWAYS, 632, 0, 648, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
304 {14, CONDITION_ALWAYS, 552, 0, 680, FACING_NORTH, 0, 355, 525, 690, 710, 0},
305 {15, CONDITION_ALWAYS, 632, 0, 680, FACING_NORTH, 0, 355, 525, 690, 710, 0},
306 {16, CONDITION_ALWAYS, 808, 0, 616, FACING_SOUTH, 0, 745, 570, 935, 720, 0},
307 {17, CONDITION_ALWAYS, 440, 0, 872, FACING_NORTH, 0, 340, 740, 520, 900, 0},
308 {18, CONDITION_ALWAYS, 584, 0, 872, FACING_NORTH, 0, 540, 740, 730, 900, 0},
309 {19, CONDITION_ALWAYS, 840, 0, 792, FACING_SOUTH, 0, 710, 740, 940, 900, 0},
311};
312
314 {0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
315 {1, CONDITION_ALWAYS, 248, 0, 304, FACING_NORTH, 0, 110, 35, 390, 345, 0},
316 {2, CONDITION_ALWAYS, 248, 0, 128, FACING_SOUTH, 0, 110, 35, 390, 345, 0},
318};
319
321 SCENE_EXITS(100), SCENE_EXIT(1, 99, 1), SCENE_EXIT(2, 99, 2),
322 SCENE_EXIT(3, 99, 3), SCENE_EXIT(4, 99, 4), SCENE_EXIT(5, 99, 12),
323 SCENE_EXIT(6, 99, 5), SCENE_EXIT(7, 99, 6), SCENE_EXIT(8, 99, 13),
324 SCENE_EXIT(9, 100, 11), SCENE_EXIT(10, 99, 7), SCENE_EXIT(11, 100, 9),
325 SCENE_EXIT(12, 100, 17), SCENE_EXIT(13, 100, 18), SCENE_EXIT(14, 100, 19),
326 SCENE_EXIT(15, 100, 16), SCENE_EXIT(16, 100, 15), SCENE_EXIT(17, 100, 12),
327 SCENE_EXIT(18, 100, 13), SCENE_EXIT(19, 100, 14), SCENE_EXIT(0, 101, 0),
328 SCENE_EXIT(1, 99, 8), SCENE_EXITS_END,
329};
330
333};
334
335// clang-format off
337 { 0x6c, 0x0, ACTOR_STAND,
339 { 0x6a, 0x0, ACTOR_STAND,
341 { 0x65, 0x0, ACTOR_STAND,
343 { 0x73, 0x0, ACTOR_STAND,
345 { 0x7e, 0x0, ACTOR_WANDER,
347 { 0x67, 0x0, ACTOR_STAND,
349 { 0x7f, 0x0, ACTOR_STAND,
351 { 0x6f, 0x0, ACTOR_STAND,
353 { 0x6c, 0x0, ACTOR_STAND,
355 { 0x6a, 0x0, ACTOR_STAND,
357 { 0x8f, 0x0, ACTOR_STAND,
359 { 0x8f, 0x0, ACTOR_STAND,
361 { SCENE_TABLE_END },
362};
363
365 { 0x77, 0x0, ACTOR_STAND,
367 { 0x80, 0x0, ACTOR_WANDER,
368 PIXELS(505), 0, PIXELS(665), FACING_EAST, TALK_FACE_PARTY, 0 },
369 { 0x84, 0x0, ACTOR_STAND,
371 { 0x94, 0x0, ACTOR_STAND,
373 { 0xab, 0x0, ACTOR_STAND,
375 { 0xab, 0x0, ACTOR_STAND,
377 { 0x72, 0x0, ACTOR_STAND,
378 PIXELS(207), 0, PIXELS(672), FACING_WEST, TALK_FACE_PARTY, 0 },
379 { 0x67, 0x0, ACTOR_STAND,
381 { 0x6f, 0x0, ACTOR_STAND,
383 { 0x9d, 0x0, ACTOR_STAND,
385 { 0x43, 0x0, ACTOR_STAND,
386 PIXELS(417), 0, PIXELS(810), FACING_EAST + FACING_STEP, TALK_FACE_PARTY, 0 },
387 { 0x42, 0x0, ACTOR_STAND,
388 PIXELS(459), 0, PIXELS(820), FACING_WEST + FACING_STEP, TALK_FACE_PARTY, 0 },
389 { SCENE_TABLE_END },
390};
391
395 { SCENE_TABLE_END },
396};
397
400};
401
402/// A bare flag as a condition holds while that flag is clear: these lines are
403/// spoken before the Colosso tour leaves, the next ones after.
405 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
406 { EVENT_EXIT, 2, CONDITION_ALWAYS, 2 },
407 { EVENT_EXIT, 3, CONDITION_ALWAYS, 3 },
408 { EVENT_EXIT, 4, CONDITION_ALWAYS, 4 },
409 { EVENT_EXIT, 5, CONDITION_ALWAYS, 5 },
410 { EVENT_EXIT, 6, CONDITION_ALWAYS, 6 },
411 { EVENT_EXIT, 7, CONDITION_ALWAYS, 7 },
412 { EVENT_EXIT, 8, CONDITION_ALWAYS, 8 },
414 { EVENT_EXIT, 18, CONDITION_ALWAYS, 18 },
416 { EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsImShockedToHearTheRighteous) },
417 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsLunpaWasAKindThiefHis) },
418 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsSomehowTheNorthHasBecomeThe) },
419 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsAMerchantFromVaultHadBeen) },
420 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsNoOneIsAllowedToGo) },
421 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIDoNotWantMySon) },
422 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsTheMostImportantSkillForA) },
423 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsMySonReceivedHisKnackFor) },
425 { EVENT_TALK, 17, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIBetterGetReadyTheColosso) },
426 { EVENT_TALK, 18, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsWeFledFromGondowanToThe) },
427 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsWeCameHereToEscapeThe) },
428 { EVENT_TALK, 19, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsLaliveroWhereImFromIsThe) },
429 { EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsWeEscapedFromTheNortheasternRegion) },
430 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsTheRegionNorthOfVaultWas) },
431 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsLunpasReputationIsVeryBadNowadays) },
432 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsThreeYearsAgoThievesRaidedMt) },
433 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsTheySayOtherNorthernPartsAre) },
434 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsImAnAdultNowIDont) },
435 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIDontCareHowMySon) },
436 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsTheMostImportantThingIsNot) },
437 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsMySonIsVeryTightWith) },
438 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsPeopleFromTheContinentSouthOf) },
439 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsImPrettyExcitedBecauseThisIs) },
440 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsIFledAllThisWayNow) },
441 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIWonderWhatColossoIsLike) },
442 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsItLooksLikeColossoWillSoon) },
443 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIWasSoScaredComingTo) },
444 { SEARCH(SEARCH_BARREL), 100, 0xf83, FIND_COINS(11) },
445 { SEARCH(SEARCH_OVEN), 101, 0xf84, FIND_ITEM(ITEM_SMOKE_BOMB) },
446 { SEARCH(SEARCH_BARREL), 102, 0xf85, FIND_ITEM(ITEM_ELIXIR) },
447 { SEARCH(SEARCH_OVEN), 200, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsShesToastingSomeBreadItSmells)) },
448 { SEARCH(SEARCH_OVEN), 201, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsHesMakingCurryItsSpicyScent)) },
449 { SEARCH(SEARCH_OVEN), 101, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsHesMakingRoastedEggplantWithCheese)) },
450 { SEARCH(SEARCH_OVEN), 203, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsItsAKalaySaladWithCucumber)) },
451 { SEARCH(SEARCH_OVEN), 204, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsItsPicklesWithGarlicThePickle)) },
453};
454
456 { EVENT_EXIT, 9, CONDITION_ALWAYS, 9 },
457 { EVENT_EXIT, 10, CONDITION_ALWAYS, 10 },
458 { EVENT_EXIT, 11, CONDITION_ALWAYS, 11 },
461 { EVENT_EXIT, 14, CONDITION_ALWAYS, 14 },
462 { EVENT_EXIT, 15, CONDITION_ALWAYS, 15 },
463 { EVENT_EXIT, 17, CONDITION_ALWAYS, 17 },
465 { EVENT_TALK, 9, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsEveryoneIsGoingToTolbiTo) },
466 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsEvenOurChefLeftSoWe) },
467 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIveSignedOnForATour) },
468 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsTheColossoGladiatorsAreAllStrong) },
470 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsEveryoneLooksForwardToGoingTo) },
471 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsSurelyLordHammetWillPopUp) },
472 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIWouldHaveEnteredColossoIf) },
473 { EVENT_TALK, 16, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsManyOfTheGuestsHereSeem) },
474 { EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsUhOhHesStillHereEven) },
475 { EVENT_TALK, 17, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsArentYouGoingToColossoYou) },
476 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIfYouAreEnteringColossoYou) },
477 { EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsWereSoStrongMakingTheFinals) },
478 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsHesAShrewdMerchantIfHe) },
479 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIdHaveGoneOnTheColosso) },
480 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsEveryYearEveryoneGoesToTolbi) },
481 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsEvenIfMyHusbandWantedTo) },
482 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsJoiningATourGroupIsThe) },
483 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIWonderWhichWarriorWillWin) },
484 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsItsBusinessSoYouCantHelp) },
485 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsImExhaustedFromPreparingThisTour) },
486 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIWasSoExcitedICouldnt) },
487 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsMyAnimalInstinctsStartWakingUp) },
488 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, FLAG_KALAY_COLOSSO_TOUR_LEFT, MSGNO(MsgKalayInteriorsColossoIsSoCommonWhatsSo) },
489 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsICantSeemToRelaxNow) },
490 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsImGoingToSignUpFor) },
491 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsIHavePowerAndSeanHas) },
492 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsWeAreTheToughestOfAll) },
493 { SEARCH(SEARCH_BARREL), 100, 0xf83, FIND_COINS(11) },
494 { SEARCH(SEARCH_OVEN), 101, 0xf84, FIND_ITEM(ITEM_SMOKE_BOMB) },
495 { SEARCH(SEARCH_BARREL), 102, 0xf85, FIND_ITEM(ITEM_ELIXIR) },
496 { SEARCH(SEARCH_OVEN), 200, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsShesToastingSomeBreadItSmells)) },
497 { SEARCH(SEARCH_OVEN), 201, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsHesMakingCurryItsSpicyScent)) },
498 { SEARCH(SEARCH_OVEN), 101, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsHesMakingRoastedEggplantWithCheese)) },
499 { SEARCH(SEARCH_OVEN), 203, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsItsAKalaySaladWithCucumber)) },
500 { SEARCH(SEARCH_OVEN), 204, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgKalayInteriorsItsPicklesWithGarlicThePickle)) },
502};
503
505 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
507 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsICameHereToSpreadGood) },
509};
510// clang-format on
511
513 MAP_CELL_STEP(7, 125, 1, 2, 5),
514 MAP_CELL_STEP(8, 125, 1, 2, 5),
516};
517
523};
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.
@ ACTOR_INNKEEPER
Definition altin.c:82
The engine calls the debug menus import, and their palette swatch tiles.
void FieldScene_PrepareActors(struct ScenePlacement *entry)
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
@ ANIM_WALK
Definition field_event.h:44
void Engine_SanctumOpen(s32 priest)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_InnOpen(s32 inn, s32 keeper)
void Engine_EventCloseScreen(void)
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_EventWaitForScreen(void)
void Engine_ActorDestroy(s32 actor)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_ActorSetChildValue(s32 actor, s32 value)
#define MAP_CELL_STEPS_END
Definition field_event.h:61
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_MapAnimateCells(const u16 *steps, s32 destX, s32 destY)
void Engine_EventWait(s32 frames)
void Engine_ActorCenterAndWalk(s32 actor, s32 priority, s32 dz)
@ 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_EXIT
@ EVENT_TALK
@ FACING_STEP
Definition field_scene.h:36
#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_FIRST_PLACED
@ 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
#define TOUCH_WALKING_INTO(facing)
@ 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_SOUTHWEST
Definition field_scene.h:29
@ 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
@ SEARCH_BARREL
#define FIND_COINS(coins)
Game flags, named where their meaning is shown.
#define FLAG_KALAY_HEARD_OF_COLOSSO_TOUR
The inn's guests told the party about the Colosso tour to Tolbi.
Definition flags.h:228
#define FLAG_KALAY_COLOSSO_TOUR_LEFT
the tour group has left town
Definition flags.h:229
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The screen blend's globals and the graphics routines.
Item numbers, named from the English release.
@ ITEM_ELIXIR
Definition item_ids.h:48
@ ITEM_SMOKE_BOMB
Definition item_ids.h:67
static void KalayInteriors_TalkToInnkeeper(void)
Spoken to across the counter, the leader facing west, the innkeeper offers a room.
struct ScenePlacement gKalayInteriors_HousePlacements[]
struct SceneEvent gKalayInteriors_InnEvents[]
const struct SceneEvent * KalayInteriors_GetEvents(void)
Selects room dialogue with the same entrance grouping as the placements.
struct ScenePlacement gKalayInteriors_NoPlacements[]
u32 gKalayInteriors_Exits[]
static void KalayInteriors_TalkToTourGuide(void)
The tour guide in the inn's dining room: now the party has heard of the tour.
static void KalayInteriors_TalkToPriest(void)
Spoken to across the counter, the leader facing north, the priest offers the sanctum's services; from...
struct SceneEvent gKalayInteriors_NoEvents[]
struct SceneEntrance gKalayInteriors_NoEntrances[]
struct ScenePlacement gKalayInteriors_InnPlacements[]
const struct ScenePlacement * KalayInteriors_GetPlacements(void)
The inn rooms share a placement table, clipped to the current view.
struct SceneEntrance gKalayInteriors_HouseEntrances[]
struct MapCellAnim gKalayInteriors_DoorCells[]
const struct SceneEntrance * KalayInteriors_GetEntrances(void)
Selects the entrance table for the rooms or sanctum in this scene.
struct SceneEntrance gKalayInteriors_SanctumEntrances[]
const u32 * KalayInteriors_GetExits(void)
struct SceneEvent gKalayInteriors_HouseEvents[]
A bare flag as a condition holds while that flag is clear: these lines are spoken before the Colosso ...
KalayInteriorsActor
The inn's rooms are entered through entrances 9 to 15 and 17.
@ ACTOR_PRIEST
in the sanctum
@ ACTOR_TOUR_GUIDE
in the inn's dining room
struct ScenePlacement gKalayInteriors_SanctumPlacements[]
static void KalayInteriors_ApplyRoomState(void)
Once the Colosso tour has left, its guests are gone from the inn, and two residents from the houses.
const struct SceneRegion * KalayInteriors_GetRegions(void)
s32 KalayInteriors_Initialize(void)
Sets the opening transition and restores room-specific actors and tiles.
static void KalayInteriors_AskAboutSouthernContinent(void)
A resident asks whether the party knows the continent south of Tolbi, and answers either way.
u16 gKalayInteriors_DoorCellSteps[]
struct SceneEvent gKalayInteriors_SanctumEvents[]
static void KalayInteriors_OpenDoorAndExit(void)
Stops the room actors, opens the selected door and walks the leader out.
The reel game's title lettering.
Declares nothing: an empty header kept for the files that include it.
Scene numbers, named after their places.
char SceneId_KalayInteriors2
char SceneId_KalayInteriors1
Song and sound effect ids, indices into gSound_SongTable.
#define SE_DOOR_OPEN
Definition songs.h:153
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
#define NULL
Definition bilibin.h:6
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
A field actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
Definition field_obj.h:83
union FieldCoordinate x
16.16 fixed-point pixels
Definition field_obj.h:35
union FieldCoordinate y
16.16 fixed-point pixels
Definition field_obj.h:36
u16 facing
1/65536 turns
Definition field_obj.h:34
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
Definition field_obj.h:112
s16 entrance
Definition game_state.h:37
Cell replacement: procedure and destination cells.
Definition field_event.h:64
u16 y
destination cell row
Definition field_event.h:69
u16 x
destination cell column
Definition field_event.h:68
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
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
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