Alchemy
Loading...
Searching...
No Matches

babi_palace.c

Go to the documentation of this file.
1/// @file
2/// Babi Palace in Tolbi. Two scenes share this overlay: the palace, where the
3/// party stays as Colosso's guests and where Sheba is held, and its
4/// courtyard with the well. Both change three times: while Babi is missing,
5/// once he has been rescued and the finals are on, and after Colosso.
6
7#include "game_state.h"
8#include "version.h"
9#include "keystate.h"
10#include "scene_ids.h"
11#include "unit/import.h"
13#include "unit/object/object.h"
15#include "unit/field/field.h"
16#include "unit/game/game.h"
17#include "unit/shop/shop.h"
18#include "battle.h"
19#include "battle_unit.h"
20#include "debug.h"
21#include "field.h"
22#include "game.h"
23#include "graphics.h"
24#include "menu.h"
25#include "minigame.h"
26#include "sound.h"
27#include "system.h"
28#include "types.h"
29#include "io_reg.h"
30#include "field_service.h"
31#include "field_scene.h"
32#include "text/msg_ids.h"
33#include "ability_ids.h"
34#include "field_event.h"
35#include "item_ids.h"
36#include "objcmd.h"
37#include "global_cells.h"
38#include "display_transition.h"
39#include "flags.h"
40#include "songs.h"
41
42/// The palace's actors are placed by one of three tables, as the story goes
43/// on: before Babi is rescued, during the finals and after Colosso.
44///
45/// Before the rescue: the attendant who shows the party its beds, Iodem and
46/// the two soldiers he sent to Altmiller Cave; Sheba is held here throughout.
47enum {
52};
53
54/// During the finals: the same attendant, placed later.
56
57/// After Colosso: Babi, and the Cloak Ball he keeps on show; Iodem keeps his
58/// number.
59enum { ACTOR_BABI = 14, ACTOR_CLOAK_BALL = 16 };
60
61/// The courtyard's two guards.
63
64/// The attendant has led the party to the beds; talking again sends the
65/// attendant back.
67
68/// After a night in the palace's beds: the party's HP and PP are full,
69/// Garet, Ivan and Mia rejoin, and the inventory Colosso held is returned.
70static __inline__ void BabiPalace_RestorePartyAndInventory(void) {
71 s16 owners[8];
72 struct BattleUnit *state;
73 s32 ownerCount;
74 s32 i;
75
76 ownerCount = FieldParty_ListActiveOwners(owners);
77 for (i = 0; i < ownerCount; i++) {
78 state = UnitGet(owners[i]);
79 state->hp = state->maxHp;
80 state->pp = state->maxPp;
82 }
87}
88
89const struct SceneEntrance *Scene_GetEntrances(void) {
92 }
94}
95
96/// The palace has no regions; the table is empty.
99}
100
101/// Both scenes share one exit table.
103
104/// Returns the actor placements for the scene and the story: before Babi's
105/// rescue, during the finals or after Colosso.
109 }
112 }
115 }
117}
118
119/// Asks a yes or no question; the answers are the two messages after it.
120static inline void BabiPalace_ShowQuestionAnswer(s32 actorId, s32 question) {
121 Engine_EventSetMessage(question);
122 Engine_EventOpenMessage(actorId, 0);
123 if (Engine_EventChooseYesNo(0, 0) == 0)
124 Engine_EventSetMessage(question + 1);
125 else
126 Engine_EventSetMessage(question + 2);
127 Engine_EventShowMessage(actorId, 0);
128}
129
130/// Asks about Babi's soldiers.
131/// "Did you run into any of Babi's soldiers in town?"
132static void BabiPalace_AskAboutSoldiers(s32 actorId) {
133 BabiPalace_ShowQuestionAnswer(actorId, MsgTolbiRunBabisSoldiers);
134}
135
136/// Talking to the attendant before Babi's rescue: the attendant leads the party
137/// to the beds. "We have just enough extra beds in this room for everybody.
138/// Please follow me." Talking again, the attendant asks whether the party will
139/// sleep right away and goes back.
140static void BabiPalace_ShowBeds(s32 actorId) {
141
142 struct FieldActor *leader;
143 s16 roundedFacing;
144 s32 facingOrMessage;
145 s32 facingBits;
146
148 roundedFacing = (leader->facing + 0x2000) & 0xc000;
149 Event_Begin();
154 Event_SetMessage(MsgTolbiWeHaveJustEnoughExtra);
155 Event_ShowMessage(actorId, 0);
156 Event_Wait(10);
157 facingBits = roundedFacing << 16;
158 facingOrMessage = 0x4000;
159 if (facingBits == (0x4000 << 16)) {
162 }
163 Actor_SetSpeed(actorId, 0x10000, 0x8000);
164 Actor_WalkByAndWait(actorId, 0, -48);
165 Actor_WalkByAndWait(actorId, 64, 0);
166 Actor_FaceDirection(actorId, facingOrMessage, 0);
167 } else {
173 Event_Wait(20);
174 facingOrMessage = MsgTolbiUseFourBeds;
175 Event_SetMessage(facingOrMessage);
176 Event_OpenMessage(actorId, 0);
177 if (Event_ChooseYesNo(0, 0) == 0) {
178 Event_SetMessage(facingOrMessage + 1);
179 Event_ShowMessage(actorId, 0);
180 } else {
181 Event_SetMessage(facingOrMessage + 2);
182 Event_ShowMessage(actorId, 0);
183 }
184 Event_Wait(10);
186 Event_Wait(20);
187 Actor_WalkByAndWait(actorId, -64, 0);
188 Actor_WalkByAndWait(actorId, 0, 48);
189#if TBS_PATCH_3
190 Actor_SetPosition(actorId, 56 << 16, 120 << 16);
191#endif
192 }
193 Event_End();
194}
195
196/// Talking to the attendant during the finals: the first time, the attendant
197/// asks whether the party came to rest before the match and steps aside;
198/// afterwards, the attendant offers rest. "if you're tired, please feel free to
199/// get some rest."
200static void BabiPalace_OfferRest(s32 actorId) {
201 s32 question;
202
203 Event_Begin();
211 Event_Wait(20);
212 question = MsgTolbiCameRestBefore;
213 Event_SetMessage(question);
214 Event_OpenMessage(actorId, 0);
215 if (Event_ChooseYesNo(0, 0) == 0) {
216 Event_Wait(10);
217 Event_SetMessage(question + 1);
218 } else {
219 Event_SetMessage(question + 2);
220 }
221 Event_ShowMessage(actorId, 0);
222 Event_Wait(10);
224 Event_Wait(20);
225 Actor_SetSpeed(actorId, 0x10000, 0x8000);
226 Actor_WalkByAndWait(actorId, -64, 0);
227 Actor_WalkByAndWait(actorId, 0, 48);
228 } else {
229 Event_SetMessage(MsgTolbiTiredFeelFreeRest);
230 Event_OpenMessage(actorId, 0);
231 }
232 Event_End();
233}
234
235/// A warrior asks whether the party is entering Colosso, and either hurries
236/// it to the trials or asks whether it got hurt too.
237static void BabiPalace_AskAboutColosso(s32 actorId) {
238 s32 question = MsgTolbiPlanningEnterColosso;
239
240 Engine_EventSetMessage(question);
241 Engine_EventOpenMessage(actorId, 0);
242 if (Engine_EventChooseYesNo(0, 0) == 0) {
244 Engine_ActorShowEmote(actorId, EMOTE_IN_FRONT | 2, 0x28);
245 Engine_EventSetMessage(question + 1);
246 } else {
248 Engine_ActorShowEmote(actorId, EMOTE_IN_FRONT | 5, 0x28);
249 Engine_EventSetMessage(question + 2);
250 }
251 Engine_EventShowMessage(actorId, 0);
252}
253
254/// The warrior with indigestion tries to shrug it off, doubles up, and gives
255/// up on entering Colosso.
257 struct FieldActor *actor;
258 const s32 *indigestionScript;
259
260 actor = Actor_Get(actorId);
261 Event_Begin();
262 indigestionScript = gBabiPalace_IndigestionScript;
263 Actor_SetActionScript(actorId, indigestionScript);
264 Event_SetMessage(MsgTolbiCantFightBecauseLittleIndigestion);
265 Event_ShowMessage(actorId, 0);
266 Actor_Stop(actorId);
267 actor->scaleY = 0x10000;
268 actor->scaleX = 0x10000;
269 Event_Wait(30);
270 Actor_RunRepeatedMotion(actorId, 2);
271 Event_Wait(30);
272 Actor_RunRepeatedMotion(actorId, 2);
273 Event_Wait(60);
274 Event_ShowMessage(actorId, 0);
275 Event_Wait(20);
276 Actor_ShowEmote(actorId, EMOTE_IN_FRONT | 2, 60);
277 Actor_RunRepeatedMotion(actorId, 2);
278 Event_Wait(30);
279 Actor_RunRepeatedMotion(actorId, 2);
280 Event_Wait(30);
281 Actor_RunRepeatedMotion(actorId, 2);
282 Event_Wait(30);
283 Actor_SetActionScript(actorId, indigestionScript);
284 Event_ShowMessage(actorId, 0);
286 Event_Wait(10);
287 actor->scaleY = 0x10000;
288 actor->scaleX = 0x10000;
289 Actor_SetActionScript(actorId, indigestionScript);
290 Event_End();
291}
292
293/// Mind Read on Sheba: she cannot escape to Lalivero alone; the first time,
294/// she feels it, ends the Psynergy and asks about it. "Did you just..."
295static void BabiPalace_ReadShebasMind(s32 unused0, s32 actorId) {
296 Event_Begin();
297 Event_SetMessage(MsgTolbiEvenIfEscapedBabiPalace);
298 Event_ShowMessage(actorId, 0);
302 Event_Wait(50);
303 Actor_ShowEmote(actorId, EMOTE_IN_FRONT, 70);
305 Event_ShowMessage(actorId, 0);
306 Event_Wait(30);
308 Event_Wait(20);
309 Event_ShowMessage(actorId, 0);
310 Actor_FaceDirection(actorId, FACING_WEST, 0);
311 }
312 Event_End();
313}
314
315/// Asks about meeting Babi. "Did you meet with Babi?"
317 BabiPalace_ShowQuestionAnswer(actorId, MsgTolbiMeetBabi);
318}
319
320/// Asks whether the party wants to go back to the eastern shores. "So, you're
321/// all from the eastern shores of the Karagol Sea, huh? Do you want to go back
322/// already?"
324 BabiPalace_ShowQuestionAnswer(actorId, MsgTolbiEasternShoresKaragol);
325}
326
327/// Taking the Cloak Ball on show after Colosso: Babi asks whether the party
328/// wants it, and lends it for the quest if it does.
329static void BabiPalace_OfferCloakBall(void) {
330 s32 msg;
331
334 msg = MsgTolbiFoundCloakBall;
342 if (Engine_EventChooseYesNo(0, 0) != 0) {
343 Engine_EventSetMessage(msg + 2);
345 } else {
347 Engine_EventSetMessage(msg + 3);
359 }
360}
361
362/// Waking after resting before the finals: the leader dreamt of fighting in
363/// them, the others tease, and the party sets off for the colosseum.
365 struct FieldActor *leader;
366
367 Event_Begin();
368 Event_SetMessage(MsgTolbiGetUp);
369 Actor_Get(ACTOR_PARTY_LEADER)->spriteStorageKind = 0;
370 Actor_Get(ACTOR_FINALS_ATTENDANT)->spriteStorageKind = 0;
371 Task_Wait(1);
372 REG_DISPCNT = 0x1140;
373 Event_ShowMessage(-1, 0);
374 REG_DISPCNT = 0x140;
375 Actor_Get(ACTOR_PARTY_LEADER)->spriteStorageKind = 1;
376 Actor_Get(ACTOR_FINALS_ATTENDANT)->spriteStorageKind = 1;
379 Actor_SetSpriteFlags(leader, 0);
382 Actor_SetPosition(IVAN, PIXELS(120), PIXELS(120));
389 Event_Wait(20);
391 Actor_SetSpeed(MIA, 0x10000, 0x8000);
392 Actor_WalkByAndWait(MIA, 16, 0);
394 Event_Wait(20);
396 Event_Wait(30);
398 Event_Wait(10);
400 leader->z.fixed += -0x30000;
402 leader->targetZ += -0x30000;
404 Event_Wait(40);
406 Event_Wait(30);
408 Event_Wait(50);
410 Event_Wait(30);
412 Event_Wait(10);
414 Event_Wait(20);
417 Event_Wait(10);
419 Event_Wait(20);
421 Event_Wait(10);
425 Event_Wait(30);
427 Event_Wait(20);
429 Event_Wait(10);
431 Event_Wait(30);
433 Event_Wait(45);
436 Event_Wait(30);
438 if (Event_ChooseYesNo(-1, 0) != 0) {
439 Event_Wait(10);
441 Event_Wait(20);
443 Event_Wait(20);
445 Event_Wait(10);
447 Event_Wait(30);
449 Event_Wait(20);
451 gEventWork->message += 1;
452 } else {
453 Event_Wait(10);
455 gEventWork->message += 2;
456 Event_Wait(30);
458 Event_Wait(20);
460 }
461 Event_Wait(10);
462 Actor_SetSpeed(GARET, 0x10000, 0x8000);
463 Actor_WalkByAndWait(GARET, -16, 0);
465 Event_Wait(35);
467 Actor_SetSpeed(ACTOR_PARTY_LEADER, 0x1e666, 0xf333);
470 Actor_SetSpriteFlags(leader, 1);
473 Event_Wait(40);
475 Event_Wait(30);
479 Event_Wait(30);
480 Actor_SetSpeed(GARET, 0x13333, 0x9999);
481 Actor_SetSpeed(MIA, 0x13333, 0x9999);
482 Actor_SetSpeed(IVAN, 0x13333, 0x9999);
485 if (leader != 0) {
486 Engine_ActorSetDestination(GARET, leader->x.part.pixel,
487 leader->z.part.pixel);
488 }
493 if (leader != 0) {
494 Engine_ActorSetDestination(MIA, leader->x.part.pixel, leader->z.part.pixel);
495 }
497 Actor_SetPosition(MIA, 0, 0);
500 if (leader != 0) {
501 Engine_ActorSetDestination(IVAN, leader->x.part.pixel,
502 leader->z.part.pixel);
503 }
505 Actor_SetPosition(IVAN, 0, 0);
506 Event_Wait(10);
507 Event_End();
508}
509
510/// Searching the beds: the party goes to bed, talking it over the first night.
511/// "Would you like to sleep now?"
513 struct FieldActor *leader;
514 s16 roundedFacing;
515 u16 facing;
516
518 roundedFacing = (leader->facing + 0x2000) & -0x4000;
519 Event_Begin();
521 Event_SetMessage(MsgTolbiLikeSleep);
522 Event_OpenMessage(-1, 0);
523 if (Event_ChooseYesNo(0, 0) != 0) {
524 } else {
526 Event_Wait(20);
527 Inn_PlaySleep(0);
528 return;
529 }
530 Event_Wait(20);
531 facing = roundedFacing;
532 if (facing == 0) {
534 }
535 if (facing == 0x8000) {
537 }
540 Event_Wait(10);
543 Event_Wait(10);
545 Event_Wait(10);
547 Event_Wait(20);
548 Actor_SetSpeed(GARET, 0x10000, 0x8000);
550 Actor_WalkByAndWait(GARET, 0, -32);
552 Event_Wait(20);
554 Event_Wait(20);
557 Event_Wait(10);
559 Event_Wait(10);
561 Event_Wait(20);
562 Actor_SetSpeed(IVAN, 0x10000, 0x8000);
563 Actor_WalkByAndWait(IVAN, -40, 0);
566 Event_Wait(20);
568 Event_Wait(20);
571 Event_Wait(10);
573 Event_Wait(10);
575 Event_Wait(20);
576 Actor_SetSpeed(MIA, 0x10000, 0x8000);
577 Actor_WalkByAndWait(MIA, 40, 0);
578 Actor_WalkByAndWait(MIA, 0, 40);
580 Event_Wait(20);
581 Camera_MoveTo(-1, -1, -1, 0);
585 Event_Wait(30);
587 Event_Wait(10);
590 Event_Wait(10);
593 } else {
595 }
597 Event_Wait(10);
600 } else {
602 }
603 Event_Wait(20);
608 Inn_PlaySleep(0);
613 Event_Wait(20);
615 Event_Wait(10);
618 Event_Wait(10);
621 } else {
623 }
625 Event_Wait(10);
628 } else {
630 }
632 Actor_WalkBy(GARET, -112, 0);
633 Actor_WalkByAndWait(MIA, 0, -40);
634 Actor_WalkBy(MIA, -112, 0);
635 Event_Wait(50);
636 Actor_WalkByAndWait(IVAN, 0, -24);
639 Actor_WalkByAndWait(GARET, 0, -16);
642 Event_Wait(20);
644 Event_Wait(10);
646 Event_Wait(20);
647 Actor_SetSpeed(GARET, 0x13333, 0x9999);
648 Actor_SetSpeed(IVAN, 0x13333, 0x9999);
649 Actor_SetSpeed(MIA, 0x13333, 0x9999);
652 if (leader != 0) {
653 Engine_ActorSetDestination(GARET, leader->x.part.pixel,
654 leader->z.part.pixel);
655 }
660 if (leader != 0) {
661 Engine_ActorSetDestination(MIA, leader->x.part.pixel,
662 leader->z.part.pixel);
663 }
665 Actor_SetPosition(MIA, 0, 0);
668 if (leader != 0) {
669 Engine_ActorSetDestination(IVAN, leader->x.part.pixel,
670 leader->z.part.pixel);
671 }
673 Actor_SetPosition(IVAN, 0, 0);
675 }
676 Event_End();
677}
678
679/// Walking past Iodem while Babi is missing: his two soldiers report back
680/// from Altmiller Cave without Babi, and Iodem tells how Babi has vanished
681/// into the cave before; then they leave.
684 Event_Begin();
686 Event_SetMessage(MsgTolbiIodemIodem);
689 Camera_MoveTo(PIXELS(560), -1, PIXELS(368), 1);
691 Actor_SetSpeed(ACTOR_IODEM, 65536, 32768);
695 Event_Wait(10);
698 Actor_SetSpeed(ACTOR_FIRST_SOLDIER, 131072, 65536);
699 Actor_SetSpeed(ACTOR_SECOND_SOLDIER, 131072, 65536);
702 Task_Wait(3);
704 Event_Wait(30);
705 Event_Wait(10);
707 Event_Wait(30);
709 Event_Wait(10);
711 Event_Wait(20);
713 Event_Wait(10);
715 Event_Wait(10);
718 Event_Wait(20);
719 Event_Wait(10);
722 Event_Wait(10);
724 Actor_SetSpeed(ACTOR_FIRST_SOLDIER, 65536, 32768);
726 Event_Wait(20);
728 Event_Wait(10);
730 Event_Wait(10);
734 Event_Wait(20);
736 Event_Wait(10);
738 Event_Wait(20);
740 Event_Wait(10);
743 Event_Wait(30);
744 Event_Wait(10);
746 Event_Wait(20);
748 Event_Wait(10);
750 Event_Wait(20);
752 Event_Wait(10);
755 Event_Wait(10);
758 Event_Wait(10);
761 Event_Wait(10);
763 Event_Wait(20);
765 Event_Wait(10);
767 Event_Wait(30);
768 Event_Wait(10);
770 Event_Wait(20);
772 Event_Wait(10);
775 Event_Wait(20);
779 Event_Wait(20);
780 Event_Wait(10);
782 Event_Wait(20);
784 Event_Wait(10);
787 Event_Wait(10);
789 Event_Wait(30);
791 Event_Wait(10);
794 Event_Wait(30);
796 Event_Wait(10);
799 Event_Wait(10);
801 Event_Wait(30);
802 Event_Wait(10);
805 Event_Wait(10);
807 Event_Wait(20);
809 Event_Wait(20);
813 Event_Wait(20);
814 Event_Wait(10);
817 Event_Wait(10);
819 Event_Wait(20);
821 Event_Wait(10);
823 Event_Wait(30);
825 Event_Wait(10);
827 Event_Wait(30);
828 Event_Wait(10);
830 Event_Wait(20);
832 Event_Wait(10);
835 Event_Wait(10);
837 Event_Wait(20);
839 Event_Wait(10);
841 Event_Wait(20);
843 Event_Wait(10);
846 Event_Wait(10);
849 Event_Wait(10);
852 Event_Wait(10);
854 Event_Wait(20);
856 Event_Wait(20);
860 Event_Wait(20);
861 Event_Wait(10);
863 Event_Wait(20);
865 Event_Wait(10);
870 Event_Wait(30);
871 Event_Wait(10);
873 Event_Wait(20);
875 Event_Wait(10);
877 Event_Wait(20);
879 Event_Wait(10);
881 Event_Wait(20);
883 Event_Wait(10);
885 Event_Wait(20);
887 Event_Wait(20);
889 Event_Wait(10);
891 Event_Wait(30);
893 Event_Wait(20);
896 Event_Wait(10);
898 Event_Wait(30);
900 Event_Wait(10);
902 Event_Wait(40);
905 Event_Wait(20);
907 Event_Wait(20);
909 Event_Wait(40);
910 Actor_SetSpeed(ACTOR_FIRST_SOLDIER, 85196, 42598);
916 Event_Wait(10);
918 Event_Wait(40);
919 Actor_SetSpeed(ACTOR_IODEM, 52428, 26214);
921 Event_Wait(30);
923 Event_Wait(10);
925 Event_Wait(30);
927 Event_Wait(30);
928 Actor_SetSpeed(ACTOR_IODEM, 65536, 32768);
932 Event_End();
933}
934
935/// Waking in the palace after the finals: the leader slept long after
936/// fighting to the end; Babi wants to see the party.
937static void BabiPalace_WakeAfterFinals(void) {
938 struct FieldActor *actor;
939 s32 step;
940 s32 pick;
941 struct EventWork *event;
942 struct DisplayTransitionState *work;
943
944 Event_Begin();
945 Event_SetMessage(MsgTolbiCallsName);
948 Actor_SetSpriteFlags(actor, 0);
951 Actor_SetPosition(IVAN, PIXELS(120), PIXELS(120));
955 event = gEventWork;
957 event->transitionFrames = 12;
958 Task_Wait(1);
960 // UB: slot 31 lies past scalar gEventWork. Its named load adds four
961 // bytes in the native English trial (0x82c to 0x830).
962#ifdef UBFIX
963 work = gDisplayTransition;
964#else
965 work = (struct DisplayTransitionState *)((u8 **)&gEventWork)[4];
966#endif
967 work->value = 0;
968 work->mask = 0x1f1f;
969 work->active = 1;
972 for (step = 1; step <= 5; step++) {
973 Task_Wait(3);
974 work->value = step;
975 }
976 Event_Wait(40);
978 Event_Wait(30);
979 for (step = 5; step <= 31; step++) {
980 Task_Wait(3);
981 work->value = step;
982 }
983 work->active = 31;
984 event = gEventWork;
986 event->transitionFrames = 24;
987 Event_Wait(20);
991 Event_Wait(30);
992 Event_Wait(10);
995 Event_Wait(30);
997 Event_Wait(10);
1000 Event_Wait(30);
1002 Event_Wait(30);
1003 Actor_SetSpeed(MIA, 0x10000, 0x8000);
1004 Actor_WalkByAndWait(MIA, 0, -40);
1005 Actor_WalkByAndWait(MIA, 32, 0);
1007 Event_Wait(10);
1010 actor->z.fixed -= 0x30000;
1012 actor->targetZ -= 0x30000;
1014 Event_Wait(40);
1016 Event_Wait(30);
1018 Event_Wait(40);
1020 Event_Wait(20);
1022 Event_Wait(10);
1026 if (Event_ChooseYesNo(-1, 0) == 0) {
1027 Event_Wait(10);
1029 Event_Wait(20);
1031 Actor_Jump(GARET, 4, 13);
1032 Actor_Jump(GARET, 4, 30);
1035 } else {
1036 Event_Wait(10);
1038 Event_Wait(20);
1040 Actor_Jump(GARET, 4, 13);
1041 Actor_Jump(GARET, 4, 30);
1044 }
1045 Event_Wait(10);
1047 Event_Wait(30);
1049 Event_Wait(20);
1051 Event_Wait(30);
1053 Event_Wait(40);
1056 Event_Wait(30);
1058 Event_Wait(30);
1060 Event_Wait(10);
1062 Event_Wait(50);
1064 Event_Wait(35);
1066 Event_Wait(10);
1068 Event_Wait(30);
1070 Event_Wait(10);
1072 Event_Wait(20);
1074 if (Event_ChooseYesNo(-1, 0) == 0) {
1075 Event_Wait(10);
1077 Event_Wait(20);
1080 pick = 0;
1082 } else {
1083 Event_Wait(10);
1085 Event_Wait(20);
1088 pick = 1;
1090 }
1091 Event_Wait(10);
1093 Event_Wait(30);
1095 Event_Wait(20);
1097 Event_Wait(30);
1099 Event_Wait(40);
1102 Event_Wait(30);
1104 Event_Wait(30);
1106 Event_Wait(10);
1108 Event_Wait(50);
1110 Event_Wait(35);
1112 Event_Wait(10);
1114 Event_Wait(30);
1116 if (pick == 0) {
1117 Event_Wait(10);
1119 Event_Wait(30);
1121 Event_Wait(10);
1123 Event_Wait(30);
1125 gEventWork->message += 2;
1126 } else {
1127 gEventWork->message += 2;
1128 Event_Wait(10);
1130 Event_Wait(20);
1132 Event_Wait(10);
1134 Event_Wait(20);
1136 }
1137 Event_Wait(10);
1139 Event_Wait(10);
1141 Event_Wait(30);
1143 Event_Wait(20);
1147 Event_Wait(30);
1148 // Wait for the player to leave the bed before the companions rejoin.
1149 while ((gKeysHeld & KEYS_DPAD) == 0) {
1150 Task_Wait(1);
1151 }
1153 Actor_SetSpeed(ACTOR_PARTY_LEADER, 0x1e666, 0xf333);
1156 Actor_SetSpriteFlags(actor, 1);
1157 Event_Wait(20);
1161 Event_Wait(20);
1162 Event_Wait(10);
1164 Event_Wait(20);
1166 Event_Wait(10);
1168 Event_Wait(20);
1170 Event_Wait(20);
1172 Event_Wait(30);
1175 Event_Wait(30);
1177 Event_Wait(20);
1181 Event_Wait(30);
1182 Actor_SetSpeed(GARET, 0x13333, 0x9999);
1183 Actor_SetSpeed(MIA, 0x13333, 0x9999);
1184 Actor_SetSpeed(IVAN, 0x13333, 0x9999);
1187 if (actor != NULL) {
1188 Engine_ActorSetDestination(GARET, actor->x.part.pixel, actor->z.part.pixel);
1189 }
1191 Actor_SetPosition(GARET, 0, 0);
1194 if (actor != NULL) {
1195 Engine_ActorSetDestination(MIA, actor->x.part.pixel, actor->z.part.pixel);
1196 }
1198 Actor_SetPosition(MIA, 0, 0);
1201 if (actor != NULL) {
1202 Engine_ActorSetDestination(IVAN, actor->x.part.pixel, actor->z.part.pixel);
1203 }
1205 Actor_SetPosition(IVAN, 0, 0);
1206 Event_Wait(10);
1207 Event_End();
1208}
1209
1210/// Arriving after Colosso: Iodem and Babi have been waiting for the party.
1211/// Babi praises its fighting, saw its Psynergy through his Cloak Ball, and
1212/// tells of Lemuria and the draught that has kept him alive; it is running
1213/// out, and he asks the party to sail his Lemurian ship to find Lemuria.
1214/// Learning that the party is bound for Venus Lighthouse, he sends Iodem
1215/// with it, to meet at Gondowan Passage.
1217 struct FieldActor *position;
1218
1220 Event_Begin();
1221 Event_SetMessage(MsgTolbiWaitingCompanions);
1224 Camera_MoveTo(PIXELS(216), -1, PIXELS(736), 1);
1226 Event_Wait(20);
1227 Event_Wait(10);
1229 Event_Wait(10);
1230 Actor_SetSpeed(ACTOR_BABI, 0xcccc, 0x6666);
1232 Event_Wait(10);
1234 Event_Wait(30);
1236 Event_Wait(20);
1240 Event_Wait(40);
1241 Actor_SetSpeed(ACTOR_PARTY_LEADER, 0x10000, 0x8000);
1243 Event_Wait(10);
1244 Camera_MoveTo(PIXELS(216), -1, PIXELS(736), 1);
1249 Event_Wait(30);
1250 Event_Wait(10);
1252 Event_Wait(30);
1254
1255 // If the leader won the finals, Iodem brings the victor's prize, the Lure
1256 // Cap; otherwise Babi only praises how far the party came.
1257 if (GameFlag_IsSet(FLAG_WON_COLOSSO) != 0) {
1258 Event_Wait(10);
1260 Event_Wait(20);
1262 Event_Wait(10);
1264 Event_Wait(30);
1266 Event_Wait(20);
1268 Event_Wait(10);
1270 Event_Wait(20);
1273 Event_Wait(20);
1274 Actor_SetSpeed(ACTOR_IODEM, 0x10000, 0x8000);
1276 Event_Wait(40);
1278 Event_Wait(40);
1280 Event_Wait(20);
1283 Event_Wait(10);
1285 Event_Wait(30);
1287 Event_Wait(30);
1289 Event_Wait(20);
1290 Actor_SetSpeed(ACTOR_IODEM, 0xcccc, 0x6666);
1291 Actor_Get(ACTOR_IODEM)->steeringFlags &= ~ACTOR_FACES_MOTION;
1293 Actor_Get(ACTOR_IODEM)->steeringFlags |= ACTOR_FACES_MOTION;
1295 Event_Wait(40);
1296 Actor_SetSpeed(ACTOR_BABI, 0xcccc, 0x6666);
1298 Event_Wait(40);
1300 Event_ShowMessage(-1, 0);
1304 Event_Wait(30);
1307 Event_Wait(30);
1309 Event_Wait(20);
1311 gEventWork->message += 2;
1312 } else {
1313 gEventWork->message += 5;
1314 Event_Wait(10);
1316 Event_Wait(20);
1319 Event_Wait(40);
1321 Event_Wait(20);
1323 Event_Wait(30);
1325 Event_Wait(30);
1327 Event_Wait(20);
1329 }
1330
1331 if (Event_ChooseYesNo(0, 0) == 0) {
1332 Event_Wait(20);
1334 Event_Wait(20);
1337 } else {
1338 Event_Wait(10);
1340 Event_Wait(20);
1343 }
1344
1345 Event_Wait(10);
1347 Event_Wait(20);
1349 Event_Wait(30);
1351 Event_Wait(10);
1353 Event_Wait(30);
1354 Event_Wait(10);
1355 Actor_Jump(GARET, 4, 13);
1356 Actor_Jump(GARET, 4, 30);
1358 Event_Wait(10);
1361 Event_Wait(20);
1362 Actor_SetSpeed(ACTOR_BABI, 0x19999, 0xcccc);
1364 Task_Wait(2);
1366 Event_Wait(10);
1368 Event_Wait(10);
1370 Event_Wait(30);
1373 Event_Wait(10);
1375 Event_Wait(20);
1377 Event_Wait(40);
1379 Event_Wait(10);
1381 Event_Wait(30);
1383 Event_Wait(10);
1385 Event_Wait(20);
1388 Event_Wait(10);
1390 Event_Wait(10);
1392 Event_Wait(30);
1394 Event_Wait(10);
1397 Event_Wait(30);
1398 Event_Wait(10);
1400 Event_Wait(20);
1402 Event_Wait(10);
1409 Event_Wait(30);
1410 Event_Wait(10);
1412 Event_Wait(20);
1414 Event_Wait(10);
1416 Event_Wait(20);
1418 Event_Wait(10);
1421 Event_Wait(10);
1423 Event_Wait(20);
1425 if (Event_ChooseYesNo(0, 0) == 0) {
1426 Event_Wait(20);
1428 Event_Wait(30);
1431 } else {
1432 Event_Wait(10);
1434 Event_Wait(20);
1437 }
1438
1439 Event_Wait(10);
1442 Event_Wait(20);
1447 Event_Wait(50);
1450 Event_Wait(20);
1452 Event_Wait(10);
1455 Event_Wait(10);
1457 Event_Wait(20);
1459 Event_Wait(10);
1461 Event_Wait(10);
1463 Event_Wait(20);
1465 Event_Wait(10);
1469 Event_Wait(30);
1470 Event_Wait(10);
1473 Event_Wait(30);
1474 Event_Wait(10);
1476 Event_Wait(30);
1478 Event_Wait(10);
1481 Event_Wait(10);
1484 Event_Wait(10);
1486 Event_Wait(20);
1488 Event_Wait(20);
1495 Event_Wait(50);
1497 Event_Wait(20);
1499 Event_Wait(10);
1501 Event_Wait(20);
1503 Event_Wait(20);
1505 Event_Wait(40);
1508 Event_Wait(10);
1511 Event_Wait(10);
1514 Event_Wait(30);
1516 Event_Wait(10);
1523 Event_Wait(50);
1525 Event_Wait(20);
1527 Event_Wait(10);
1530 Event_Wait(20);
1532 if (Event_ChooseYesNo(0, 0) == 0) {
1533 Event_Wait(20);
1535 gEventWork->message += 3;
1536 } else {
1537 Event_Wait(10);
1540 if (Event_ChooseYesNo(0, 0) == 0) {
1541 Event_Wait(20);
1544 } else {
1547 }
1548 }
1549
1550 Event_Wait(10);
1552 Event_Wait(20);
1554 Event_Wait(10);
1557 Event_Wait(40);
1559 Event_Wait(20);
1560 Event_Wait(10);
1562 Event_Wait(30);
1564 Event_Wait(10);
1567 Event_Wait(10);
1569 Event_Wait(20);
1571 Event_Wait(10);
1573 Event_Wait(20);
1575 Event_Wait(10);
1578 Event_Wait(20);
1580 Event_Wait(20);
1583 Event_Wait(10);
1588 Event_Wait(10);
1590 Event_Wait(20);
1592 Event_Wait(10);
1594 Event_Wait(30);
1596 Event_Wait(20);
1598 Event_Wait(30);
1600 Event_Wait(20);
1602 Event_Wait(30);
1603 Event_Wait(10);
1606 Event_Wait(10);
1608 Event_Wait(40);
1613 Event_Wait(50);
1614 Event_Wait(10);
1616 Event_Wait(20);
1618 Event_Wait(10);
1621 Event_Wait(10);
1625 Event_Wait(30);
1626 Event_Wait(10);
1628 Event_Wait(20);
1630 Event_Wait(20);
1632 Event_Wait(30);
1637 Event_Wait(20);
1639 Event_Wait(10);
1641 Event_Wait(30);
1643 Event_Wait(10);
1648 Event_Wait(30);
1649 Event_Wait(10);
1651 Event_Wait(20);
1653 Event_Wait(10);
1655 Event_Wait(20);
1657 Event_Wait(20);
1659 Event_Wait(10);
1666 Event_Wait(40);
1668 Event_Wait(30);
1671 Event_Wait(10);
1674 Event_Wait(20);
1677 Event_Wait(20);
1679 Event_Wait(10);
1682 Event_Wait(20);
1684 Actor_SetSpeed(ACTOR_IODEM, 0x19999, 0xcccc);
1692 Event_Wait(10);
1699 Event_Wait(10);
1701 Event_Wait(20);
1703 Event_Wait(30);
1706 Event_Wait(10);
1708 Actor_SetSpeed(ACTOR_IODEM, 0x13333, 0x9999);
1711 Event_Wait(20);
1713 Event_Wait(10);
1715 Event_Wait(20);
1717 Event_Wait(30);
1718 Event_Wait(10);
1720 Event_Wait(20);
1722 Event_Wait(10);
1724 Event_Wait(20);
1726 Event_Wait(10);
1729 Event_Wait(10);
1731 Event_Wait(30);
1733 Event_Wait(10);
1735 Event_Wait(20);
1737 Event_Wait(10);
1739 Event_Wait(30);
1741 Event_Wait(30);
1743 Event_Wait(10);
1746 Event_Wait(10);
1748 Event_Wait(30);
1750 Event_Wait(10);
1752 Event_Wait(30);
1754 Event_Wait(10);
1756 Event_Wait(30);
1758 Event_Wait(10);
1765 Event_Wait(30);
1766 Event_Wait(10);
1768 Event_Wait(20);
1770 Event_Wait(20);
1775 Event_Wait(10);
1777 Event_Wait(30);
1779 Event_Wait(10);
1782 Event_Wait(10);
1785 Event_Wait(10);
1787 Event_Wait(20);
1789 Event_Wait(10);
1791 Event_Wait(20);
1793 Event_Wait(10);
1795 Event_Wait(20);
1797 Event_Wait(20);
1799 Event_Wait(10);
1802 Event_Wait(10);
1804 Event_Wait(30);
1806 Event_Wait(20);
1808 Event_Wait(10);
1811 Event_Wait(10);
1814 Event_Wait(30);
1816 Event_Wait(30);
1817 Event_Wait(10);
1819 Event_Wait(20);
1821 Event_Wait(10);
1824 Event_Wait(20);
1829 Event_Wait(30);
1830 Event_Wait(20);
1833 Event_Wait(10);
1836 Event_Wait(10);
1839 Event_Wait(10);
1843 Event_Wait(30);
1844 Event_Wait(10);
1846 Event_Wait(30);
1848 Event_Wait(10);
1851 Event_Wait(10);
1853 Event_Wait(20);
1855 Event_Wait(10);
1860 Event_Wait(10);
1862 Event_Wait(20);
1864 Event_Wait(10);
1867 if (Event_ChooseYesNo(14, 0) == 0) {
1868 Event_Wait(10);
1871 } else {
1872 Event_Wait(10);
1875 }
1876
1877 Event_Wait(10);
1879 Event_Wait(20);
1881 Event_Wait(10);
1883 Event_Wait(20);
1885 Event_Wait(10);
1887 Event_Wait(20);
1889 Event_Wait(20);
1891 Event_Wait(10);
1894 Event_Wait(30);
1896 Event_Wait(10);
1901 Event_Wait(30);
1903 Event_Wait(10);
1906 Event_Wait(30);
1910 Event_Wait(30);
1912 Event_Wait(10);
1914 Event_Wait(20);
1916 Event_Wait(10);
1920 Event_Wait(30);
1922 Event_Wait(10);
1924 Event_Wait(30);
1926 Event_Wait(10);
1928 Event_Wait(20);
1930 if (Event_ChooseYesNo(0, 0) == 0) {
1931 Event_Wait(20);
1935 } else {
1936 Event_Wait(10);
1939 }
1940
1941 Event_Wait(10);
1943 Event_Wait(20);
1945 Event_Wait(10);
1948 Event_Wait(20);
1953 Event_Wait(30);
1954 Event_Wait(10);
1957 Event_Wait(10);
1959 Event_Wait(10);
1962 Event_Wait(10);
1965 Event_Wait(30);
1967 Event_Wait(10);
1969 Event_Wait(20);
1972 Event_Wait(20);
1974 Event_Wait(20);
1976 Event_Wait(10);
1980 Event_Wait(20);
1982 Event_Wait(10);
1989 Event_Wait(30);
1990 Event_Wait(10);
1993 Event_Wait(10);
1995 Event_Wait(30);
1998 Event_Wait(10);
2001 if (Event_ChooseYesNo(0, 0) == 0) {
2002 Event_Wait(20);
2006 } else {
2007 Event_Wait(10);
2011 }
2012
2013 Event_Wait(10);
2015 Event_Wait(20);
2017 Event_Wait(10);
2020 Event_Wait(30);
2022 Event_Wait(10);
2025 Event_Wait(10);
2028 Event_Wait(20);
2030 Event_Wait(10);
2033 Event_Wait(10);
2035 Event_Wait(20);
2037 Event_Wait(10);
2039 Event_Wait(20);
2041 Event_Wait(10);
2043 Event_Wait(30);
2045 Event_Wait(30);
2047 Event_Wait(20);
2048 // The party tracks each departing speaker before gathering back together.
2053 Actor_SetSpeed(ACTOR_IODEM, 0x10000, 0x8000);
2057 Event_Wait(20);
2059 Event_Wait(10);
2061 Event_Wait(30);
2062 Actor_WalkByAndWait(GARET, 16, 0);
2063 Actor_WalkBy(ACTOR_IODEM, 0, 80);
2064 Event_Wait(40);
2065 Actor_WalkByAndWait(GARET, -16, 0);
2069 Event_Wait(80);
2075 Event_Wait(30);
2080 Event_Wait(30);
2082 Event_Wait(30);
2083 Actor_SetSpeed(ACTOR_BABI, 0xcccc, 0x6666);
2086 Event_Wait(10);
2088 Event_Wait(20);
2090 Event_Wait(20);
2092 Event_Wait(20);
2097 Actor_Stop(MIA);
2100 Event_Wait(20);
2103 Event_Wait(30);
2108 Event_Wait(30);
2110 Actor_SetSpeed(GARET, 0x13333, 0x9999);
2111 Actor_SetSpeed(IVAN, 0x13333, 0x9999);
2112 Actor_SetSpeed(MIA, 0x13333, 0x9999);
2114 position = Actor_Get(ACTOR_PARTY_LEADER);
2115 if (position != 0)
2116 Engine_ActorSetDestination(GARET, position->x.part.pixel,
2117 position->z.part.pixel);
2119 Actor_SetPosition(GARET, 0, 0);
2121 position = Actor_Get(ACTOR_PARTY_LEADER);
2122 if (position != 0)
2123 Engine_ActorSetDestination(IVAN, position->x.part.pixel,
2124 position->z.part.pixel);
2126 Actor_SetPosition(IVAN, 0, 0);
2128 position = Actor_Get(ACTOR_PARTY_LEADER);
2129 if (position != 0)
2130 Engine_ActorSetDestination(MIA, position->x.part.pixel,
2131 position->z.part.pixel);
2133 Actor_SetPosition(MIA, 0, 0);
2134 Event_Wait(10);
2136 Event_End();
2137}
2138
2139/// Walking north into one of the palace's doors: it opens (SE_DOOR_OPEN) and
2140/// the leader walks through.
2142 struct EventWork *work;
2143
2144 work = gEventWork;
2145 Event_Begin();
2147 Actor_SetSpeed(ACTOR_PARTY_LEADER, 0x8000, 0x4000);
2149 if (work->touchedTrigger == 32) {
2151 Event_Wait(10);
2153 } else {
2154 if (work->touchedTrigger == 30) {
2156 Event_Wait(10);
2158 } else {
2160 Event_Wait(10);
2162 }
2163 }
2164 Event_Wait(16);
2169 Event_End();
2170}
2171
2172/// Walking north into the courtyard's door: it opens and the leader goes in.
2174 Event_Begin();
2175 Actor_SetSpeed(ACTOR_PARTY_LEADER, 32768, 16384);
2179 Event_Wait(16);
2181 Event_End();
2182}
2183
2184/// A courtyard guard during the finals passes on Babi's word. "You're Isaac,
2185/// aren't you? Babi left word that he would be waiting for you at the
2186/// colosseum."
2188 s32 question;
2190 Event_Begin();
2196 Event_Wait(20);
2197 question = MsgTolbiArent;
2198 Event_SetMessage(question);
2200 if (Event_ChooseYesNo(0, 0) == 0) {
2201 Event_Wait(20);
2202 Event_SetMessage(question + 1);
2204 } else {
2205 Event_Wait(20);
2206 Event_SetMessage(question + 2);
2208 Event_Wait(20);
2211 Event_Wait(40);
2213 Event_Wait(30);
2216 Event_Wait(30);
2220 Event_Wait(20);
2222 Event_Wait(20);
2224 Event_Wait(10);
2226 Event_Wait(20);
2228 }
2229 Event_End();
2230}
2231
2232/// The other guard thanks the party for saving Babi once, then sends it to
2233/// the colosseum.
2237 Event_SetMessage(MsgTolbiIsaacIdReallyLikeThank);
2238 Event_ShowMessage(9, 0);
2239 } else {
2240 Event_SetMessage(MsgTolbiBabiWaitingForAtColosseum);
2241 Event_ShowMessage(9, 0);
2242 }
2243}
2244
2245/// Asks whether the party is leaving, like the other warriors. "All the
2246/// warriors who stayed in the palace left when Colosso ended. Are you folks
2247/// leaving too?"
2249 s32 question = MsgTolbiWarriorsWhoStayed;
2250
2251 Engine_EventSetMessage(question);
2252 Engine_EventOpenMessage(actorId, 0);
2253 if (Engine_EventChooseYesNo(0, 0) == 0) {
2254 Engine_EventSetMessage(question + 1);
2255 Engine_EventShowMessage(actorId, 0);
2256 } else {
2257 Engine_EventSetMessage(question + 2);
2258 Engine_EventShowMessage(actorId, 0);
2259 }
2260}
2261
2262/// Searching the courtyard's well. "It's filled with fresh, clean water."
2263static void BabiPalace_ExamineWell(void) {
2265 Engine_MessageShowCentered(MsgFieldPeeredWell, 1);
2266 Engine_MessageShowCentered(MsgTolbiItsFilledWithFreshClean, 1);
2268}
2269
2270/// Returns the event table for the scene and the story, as the placements.
2271const struct SceneEvent *Scene_GetEvents(void) {
2275 }
2278 }
2279 return gBabiPalace_Events2;
2280 }
2283 }
2286 }
2288}
2289
2290/// Sets up the scene being entered: the doors, the Cloak Ball on show, and
2291/// the scenes that play on arrival (Babi after Colosso, the attendant during
2292/// the finals, waking after a night's rest). Returns 0.
2294 struct FieldActor *actor;
2295 struct AnimationObject *sprite;
2296 u8 *buf;
2297 s32 set;
2298
2302 if (gGameState.entrance == 90) {
2304 }
2305 if (gGameState.entrance == 91) {
2308 }
2310 if (gGameState.entrance == 11) {
2312 }
2315 if (set) {
2317 } else {
2318 actor = Actor_Get(ACTOR_CLOAK_BALL);
2319 actor->retainSpriteCache = 1;
2320 actor->motionFlags = set;
2321 sprite = actor->sprite;
2322 actor->y.fixed = 0x40000;
2323 sprite->count = set;
2324 sprite->image.fullColor = 0;
2325 sprite->image.palette = 0;
2326 buf = Heap_Allocate(17, 0x608);
2328 Vram_Load(sprite->slot, 128, buf + 0x400);
2329 Heap_Release(17);
2330 }
2331 if (gGameState.entrance == 33 &&
2336 }
2339 } else if (GameFlag_IsSet(FLAG_BABI_SAVED) &&
2342 }
2344 Actor_Get(9)->collisionFlags |= 4;
2345 if (gGameState.entrance == 99) {
2348 gGameState.entrance = 8;
2349 }
2350 if (gGameState.entrance == 98) {
2357 gGameState.entrance = 8;
2358 }
2359 }
2360 return 0;
2361}
2362
2363// clang-format off
2365 MAP_CELL_STEP(25, 28, 1, 3, 5), MAP_CELL_STEP(26, 28, 1, 3, 5), MAP_CELL_STEP(27, 28, 1, 3, 5), MAP_CELL_STEPS_END,
2366};
2367
2369 SC_SET(SW_SCALE_X, 0x10000),
2370 SC_SET(SW_SCALE_Y, 0x10000),
2371 SC_ADD(SW_SCALE_X, -0x4000),
2372 SC_ADD(SW_SCALE_Y, 0x2000),
2373 SC_WAIT(2),
2374 SC_ADD(SW_SCALE_X, 0x2000),
2375 SC_ADD(SW_SCALE_Y, -0x1000),
2376 SC_WAIT(2),
2377 SC_ADD(SW_SCALE_X, 0x1000),
2378 SC_ADD(SW_SCALE_Y, -2048),
2379 SC_WAIT(2),
2380 SC_ADD(SW_SCALE_X, 0x1000),
2381 SC_ADD(SW_SCALE_Y, -2048),
2382 SC_WAIT(4),
2384};
2385
2387 { 0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2388 { 1, CONDITION_ALWAYS, 768, 0, 200, FACING_NORTH, 0, 512, 0, 1024, 224, 0 },
2389 { 2, CONDITION_ALWAYS, 728, 0, 88, FACING_EAST, 0, 512, 0, 1024, 224, 0 },
2390 { 3, CONDITION_ALWAYS, 808, 0, 88, FACING_WEST, 0, 512, 0, 1024, 224, 0 },
2391 { 4, CONDITION_ALWAYS, 600, 0, 152, FACING_EAST, 0, 512, 0, 1024, 224, 0 },
2392 { 5, CONDITION_ALWAYS, 936, 0, 152, FACING_WEST, 0, 512, 0, 1024, 224, 0 },
2393 { 6, CONDITION_ALWAYS, 584, 0, 56, FACING_SOUTH, 0, 512, 0, 1024, 224, 0 },
2394 { 7, CONDITION_ALWAYS, 952, 0, 56, FACING_SOUTH, 0, 512, 0, 1024, 224, 0 },
2395 { 8, CONDITION_ALWAYS, 72, 0, 216, FACING_NORTH, 0, 0, 0, 512, 240, 0 },
2396 { 9, CONDITION_ALWAYS, 440, 0, 216, FACING_NORTH, 0, 0, 0, 512, 240, 0 },
2397 { 10, CONDITION_ALWAYS, 72, 0, 968, FACING_EAST, 0, 0, 864, 240, 1024, 0 },
2398 { 11, CONDITION_ALWAYS, 168, 0, 936, FACING_SOUTH, 0, 0, 864, 240, 1024, 0 },
2399 { 12, CONDITION_ALWAYS, 424, 0, 680, FACING_WEST, 0, 328, 600, 568, 760, 0 },
2400 { 13, CONDITION_ALWAYS, 472, 0, 696, FACING_SOUTH, 0, 328, 600, 568, 760, 0 },
2401 { 16, CONDITION_ALWAYS, 408, 0, 824, FACING_EAST, 0, 320, 728, 560, 888, 0 },
2402 { 17, CONDITION_ALWAYS, 456, 0, 808, FACING_SOUTH, 0, 320, 728, 560, 888, 0 },
2403 { 18, CONDITION_ALWAYS, 824, 0, 648, FACING_NORTH, 0, 768, 480, 1024, 672, 0 },
2404 { 20, CONDITION_ALWAYS, 872, 0, 936, FACING_WEST, 0, 784, 864, 1024, 1024, 0 },
2405 { 21, CONDITION_ALWAYS, 888, 0, 968, FACING_WEST, 0, 784, 864, 1024, 1024, 0 },
2406 { 22, CONDITION_ALWAYS, 760, 0, 936, FACING_EAST, 0, 608, 864, 848, 1024, 0 },
2407 { 23, CONDITION_ALWAYS, 744, 0, 968, FACING_EAST, 0, 608, 864, 848, 1024, 0 },
2408 { 24, CONDITION_ALWAYS, 440, 0, 584, FACING_WEST, 0, 272, 240, 784, 608, 0 },
2409 { 25, CONDITION_ALWAYS, 616, 0, 584, FACING_EAST, 0, 272, 240, 784, 608, 0 },
2410 { 26, CONDITION_ALWAYS, 328, 0, 312, FACING_WEST, 0, 272, 240, 784, 608, 0 },
2411 { 27, CONDITION_ALWAYS, 728, 0, 312, FACING_EAST, 0, 272, 240, 784, 608, 0 },
2412 { 28, CONDITION_ALWAYS, 312, 0, 296, FACING_WEST, 0, 272, 240, 784, 608, 0 },
2413 { 29, CONDITION_ALWAYS, 744, 0, 296, FACING_EAST, 0, 272, 240, 784, 608, 0 },
2414 { 30, CONDITION_ALWAYS, 472, 0, 504, FACING_SOUTH, 0, 272, 240, 784, 608, 0 },
2415 { 31, CONDITION_ALWAYS, 584, 0, 504, FACING_SOUTH, 0, 272, 240, 784, 608, 0 },
2416 { 32, CONDITION_ALWAYS, 528, 0, 296, FACING_SOUTH, 0, 272, 240, 784, 608, 0 },
2417 { 33, CONDITION_ALWAYS, 208, 0, 840, FACING_NORTH, 0, 0, 624, 336, 864, 0 },
2418 { 34, CONDITION_ALWAYS, 40, 0, 760, FACING_WEST, 0, 0, 624, 336, 864, 0 },
2419 { 35, CONDITION_ALWAYS, 200, 0, 360, FACING_NORTH, 0, 0, 240, 256, 480, 0 },
2420 { 36, CONDITION_ALWAYS, 824, 0, 360, FACING_NORTH, 0, 768, 240, 1024, 480, 0 },
2421 { 40, CONDITION_ALWAYS, 376, 0, 936, FACING_EAST, 0, 232, 864, 472, 1024, 0 },
2422 { 41, CONDITION_ALWAYS, 520, 0, 936, FACING_WEST, 0, 424, 864, 664, 1024, 0 },
2423 { 42, CONDITION_ALWAYS, 904, 0, 776, FACING_EAST, 0, 776, 704, 1016, 864, 0 },
2424 { 43, CONDITION_ALWAYS, 216, 0, 552, FACING_WEST, 0, 0, 472, 304, 632, 0 },
2425 { 44, CONDITION_ALWAYS, 88, 0, 552, FACING_SOUTH, 0, 0, 472, 304, 632, 0 },
2426 { 45, CONDITION_ALWAYS, 728, 0, 824, FACING_NORTH, 0, 552, 656, 792, 848, 0 },
2427 { 98, CONDITION_ALWAYS, 152, 0, 104, FACING_SOUTH, 0, 0, 0, 512, 240, 0 },
2428 { 99, CONDITION_ALWAYS, 152, 0, 104, FACING_SOUTH, 0, 0, 0, 512, 240, 0 },
2429 { SCENE_TABLE_END },
2430};
2431
2433 { 0, CONDITION_ALWAYS, 264, 0, 440, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2434 { 1, CONDITION_ALWAYS, 264, 0, 424, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
2435 { 2, CONDITION_ALWAYS, 200, 0, 248, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2436 { SCENE_TABLE_END },
2437};
2438
2440 { SCENE_TABLE_END },
2441};
2442
2444 SCENE_EXITS(138),
2445 SCENE_EXIT(1, 139, 2),
2446 SCENE_EXIT(2, 138, 24),
2447 SCENE_EXIT(3, 138, 25),
2448 SCENE_EXIT(4, 138, 20),
2449 SCENE_EXIT(5, 138, 22),
2450 SCENE_EXIT(6, 138, 8),
2451 SCENE_EXIT(7, 138, 9),
2452 SCENE_EXIT(8, 138, 6),
2453 SCENE_EXIT(9, 138, 7),
2454 SCENE_EXIT(10, 138, 26),
2455 SCENE_EXIT(11, 8, 19),
2456 SCENE_EXIT(12, 138, 27),
2457 SCENE_EXIT(13, 141, 1),
2458 SCENE_EXIT(16, 138, 34),
2459 SCENE_EXIT(17, 138, 18),
2460 SCENE_EXIT(18, 138, 17),
2461 SCENE_EXIT(20, 138, 4),
2462 SCENE_EXIT(21, 138, 40),
2463 SCENE_EXIT(22, 138, 5),
2464 SCENE_EXIT(23, 138, 41),
2465 SCENE_EXIT(24, 138, 2),
2466 SCENE_EXIT(25, 138, 3),
2467 SCENE_EXIT(26, 138, 10),
2468 SCENE_EXIT(27, 138, 12),
2469 SCENE_EXIT(28, 138, 42),
2470 SCENE_EXIT(29, 138, 43),
2471 SCENE_EXIT(30, 138, 35),
2472 SCENE_EXIT(31, 138, 36),
2473 SCENE_EXIT(32, 138, 33),
2474 SCENE_EXIT(33, 138, 32),
2475 SCENE_EXIT(34, 138, 16),
2476 SCENE_EXIT(35, 138, 30),
2477 SCENE_EXIT(36, 138, 31),
2478 SCENE_EXIT(40, 138, 21),
2479 SCENE_EXIT(41, 138, 23),
2480 SCENE_EXIT(42, 138, 28),
2481 SCENE_EXIT(43, 138, 29),
2482 SCENE_EXIT(44, 138, 45),
2483 SCENE_EXIT(45, 138, 44),
2484 SCENE_EXIT(0, 139, 0),
2485 SCENE_EXIT(1, 135, 11),
2486 SCENE_EXIT(2, 138, 1),
2488};
2489
2495 { SCENE_TABLE_END },
2496};
2497
2500 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2502 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2504 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2506 PIXELS(752), 0, PIXELS(136), FACING_SOUTHEAST, TALK_FACE_PARTY, 0 },
2508 PIXELS(56), 0, PIXELS(120), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2510 PIXELS(392), 0, PIXELS(96), FACING_EAST, TALK_FACE_PARTY, 0 },
2512 PIXELS(472), 0, PIXELS(136), FACING_NORTHEAST, TALK_FACE_PARTY, 0 },
2514 PIXELS(88), 0, PIXELS(296), FACING_SOUTHEAST, TALK_FACE_PARTY, 0 },
2516 PIXELS(888), 0, PIXELS(344), FACING_EAST, TALK_FACE_PARTY, 0 },
2520 PIXELS(984), 0, PIXELS(312), FACING_SOUTH + FACING_STEP, TALK_FACE_PARTY, 0 },
2522 PIXELS(944), 0, PIXELS(384), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2526 PIXELS(112), 0, PIXELS(552), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2532 PIXELS(392), 0, PIXELS(360), FACING_EAST, TALK_KEEP_FACING, 0 },
2534 PIXELS(392), 0, PIXELS(352), FACING_EAST, TALK_KEEP_FACING, 0 },
2536 PIXELS(392), 0, PIXELS(368), FACING_EAST, TALK_KEEP_FACING, 0 },
2537 { SCENE_TABLE_END },
2538};
2539
2542 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2544 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2546 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2548 PIXELS(712), 0, PIXELS(136), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2550 PIXELS(472), 0, PIXELS(696), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2552 PIXELS(56), 0, PIXELS(120), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2556 PIXELS(112), 0, PIXELS(552), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2560 PIXELS(600), 0, PIXELS(744), FACING_SOUTHWEST, TALK_FACE_PARTY, 0 },
2561 { SCENE_TABLE_END },
2562};
2563
2566 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2568 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2570 0, 0, 0, FACING_EAST, TALK_FACE_PARTY, 0 },
2572 PIXELS(712), 0, PIXELS(136), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2574 PIXELS(392), 0, PIXELS(112), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2576 PIXELS(472), 0, PIXELS(696), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2578 PIXELS(88), 0, PIXELS(296), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2580 PIXELS(984), 0, PIXELS(440), FACING_NORTHEAST, TALK_FACE_PARTY, 0 },
2582 PIXELS(944), 0, PIXELS(384), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2590 PIXELS(112), 0, PIXELS(552), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2592 PIXELS(712), 0, PIXELS(744), FACING_SOUTH, TALK_FACE_PARTY, 0 },
2594 PIXELS(8), 0, PIXELS(8), FACING_SOUTH, TALK_KEEP_FACING, 0 },
2596 PIXELS(184), 0, PIXELS(704), FACING_SOUTHEAST, TALK_KEEP_FACING, 0 },
2597 { SCENE_TABLE_END },
2598};
2599
2601 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2602 { EVENT_EXIT, 2, CONDITION_ALWAYS, 2 },
2603 { EVENT_EXIT, 3, CONDITION_ALWAYS, 3 },
2604 { EVENT_EXIT, 4, CONDITION_ALWAYS, 4 },
2605 { EVENT_EXIT, 5, CONDITION_ALWAYS, 5 },
2608 { EVENT_EXIT, 8, CONDITION_ALWAYS, 8 },
2609 { EVENT_EXIT, 9, CONDITION_ALWAYS, 9 },
2610 { EVENT_EXIT, 10, CONDITION_ALWAYS, 10 },
2611 { 0x31, 11, CONDITION_ALWAYS, 11 },
2612 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
2613 { 0x31, 13, CONDITION_ALWAYS, 13 },
2614 { EVENT_EXIT, 16, CONDITION_ALWAYS, 16 },
2616 { EVENT_EXIT, 18, CONDITION_ALWAYS, 18 },
2617 { EVENT_EXIT, 20, CONDITION_ALWAYS, 20 },
2618 { EVENT_EXIT, 21, CONDITION_ALWAYS, 21 },
2619 { EVENT_EXIT, 22, CONDITION_ALWAYS, 22 },
2620 { EVENT_EXIT, 23, CONDITION_ALWAYS, 23 },
2621 { EVENT_EXIT, 24, CONDITION_ALWAYS, 24 },
2622 { EVENT_EXIT, 25, CONDITION_ALWAYS, 25 },
2623 { EVENT_EXIT, 26, CONDITION_ALWAYS, 26 },
2624 { EVENT_EXIT, 27, CONDITION_ALWAYS, 27 },
2625 { EVENT_EXIT, 28, CONDITION_ALWAYS, 28 },
2626 { EVENT_EXIT, 29, CONDITION_ALWAYS, 29 },
2630 { EVENT_EXIT, 33, CONDITION_ALWAYS, 33 },
2631 { EVENT_EXIT, 34, CONDITION_ALWAYS, 34 },
2632 { EVENT_EXIT, 35, CONDITION_ALWAYS, 35 },
2633 { EVENT_EXIT, 36, CONDITION_ALWAYS, 36 },
2634 { EVENT_EXIT, 40, CONDITION_ALWAYS, 40 },
2635 { EVENT_EXIT, 41, CONDITION_ALWAYS, 41 },
2636 { EVENT_EXIT, 42, CONDITION_ALWAYS, 42 },
2637 { EVENT_EXIT, 43, CONDITION_ALWAYS, 43 },
2639 { EVENT_EXIT, 45, CONDITION_ALWAYS, 45 },
2642 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIfYoureEnteringColossoHurryAlong) },
2643 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWonderHowDiligentlyBabisSoldiers) },
2644 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWarriorsAreNotAllowedToStay) },
2648 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_BED_ATTENDANT, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWantToWatchTheColosso) },
2649 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIGetSoAngrySeeingAll) },
2650 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceMaybeIShouldntHaveEatenQuite) },
2651 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceOnlyWarriorsWhoFightWellIn) },
2652 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceLordBabiIsBuildingTheLighthouse) },
2653 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabisNameIsRidingOnThe) },
2654 { EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceEvenIfLordBabiDoesntReturn) },
2655 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceMyFirstColossoWasSoExciting) },
2656 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceOnceTheLighthouseIsCompleteBabis) },
2657 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWedNeverGetNearTheLighthouse) },
2658 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIHearThatGirlIsGoing) },
2659 { EVENT_TALK, 17, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceItLooksLikeLordBabiDidnt) },
2660 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIGuessLordBabiDidNot) },
2661 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceActorHasBeenStayingAsLord) },
2662 { EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceActorWasReveredAsAChild) },
2663 { EVENT_TALK, SHEBA, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabiIsHoldingMeHostageIn) },
2664 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceActorWasTakenHostageToForce) },
2665 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceActorIsNotPermittedToLeave) },
2668 { SEARCH(SEARCH_SHELF), 200, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheArmorLooksHeavyItLooks)) },
2669 { SEARCH(SEARCH_SHELF), 201, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresNothingInThereItsCompletely)) },
2670 { SEARCH(SEARCH_SHELF), 202, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresAHeadbandItSaysNever)) },
2671 { SEARCH(SEARCH_BOOKCASE), 203, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledTheHeart)) },
2672 { SEARCH(SEARCH_BOOKCASE), 204, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresANotebookThatShowsThe)) },
2673 { SEARCH(SEARCH_BOOKCASE), 205, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledBecomeA)) },
2674 { SEARCH(SEARCH_BOOKCASE), 206, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceHeyItsBabisDiaryItReads)) },
2676 { SCENE_EVENTS_END },
2677};
2678
2680 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2681 { EVENT_EXIT, 2, CONDITION_ALWAYS, 2 },
2682 { EVENT_EXIT, 3, CONDITION_ALWAYS, 3 },
2683 { EVENT_EXIT, 4, CONDITION_ALWAYS, 4 },
2684 { EVENT_EXIT, 5, CONDITION_ALWAYS, 5 },
2687 { EVENT_EXIT, 8, CONDITION_ALWAYS, 8 },
2688 { EVENT_EXIT, 9, CONDITION_ALWAYS, 9 },
2689 { EVENT_EXIT, 10, CONDITION_ALWAYS, 10 },
2690 { 0x31, 11, CONDITION_ALWAYS, 11 },
2691 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
2692 { 0x31, 13, CONDITION_ALWAYS, 13 },
2693 { EVENT_EXIT, 16, CONDITION_ALWAYS, 16 },
2695 { EVENT_EXIT, 18, CONDITION_ALWAYS, 18 },
2696 { EVENT_EXIT, 20, CONDITION_ALWAYS, 20 },
2697 { EVENT_EXIT, 21, CONDITION_ALWAYS, 21 },
2698 { EVENT_EXIT, 22, CONDITION_ALWAYS, 22 },
2699 { EVENT_EXIT, 23, CONDITION_ALWAYS, 23 },
2700 { EVENT_EXIT, 24, CONDITION_ALWAYS, 24 },
2701 { EVENT_EXIT, 25, CONDITION_ALWAYS, 25 },
2702 { EVENT_EXIT, 26, CONDITION_ALWAYS, 26 },
2703 { EVENT_EXIT, 27, CONDITION_ALWAYS, 27 },
2704 { EVENT_EXIT, 28, CONDITION_ALWAYS, 28 },
2705 { EVENT_EXIT, 29, CONDITION_ALWAYS, 29 },
2709 { EVENT_EXIT, 33, CONDITION_ALWAYS, 33 },
2710 { EVENT_EXIT, 34, CONDITION_ALWAYS, 34 },
2711 { EVENT_EXIT, 35, CONDITION_ALWAYS, 35 },
2712 { EVENT_EXIT, 36, CONDITION_ALWAYS, 36 },
2713 { EVENT_EXIT, 40, CONDITION_ALWAYS, 40 },
2714 { EVENT_EXIT, 41, CONDITION_ALWAYS, 41 },
2715 { EVENT_EXIT, 42, CONDITION_ALWAYS, 42 },
2716 { EVENT_EXIT, 43, CONDITION_ALWAYS, 43 },
2718 { EVENT_EXIT, 45, CONDITION_ALWAYS, 45 },
2719 { EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabisSoldiersHaveGoneToSee) },
2720 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWhatAreYouDoingHurryOver) },
2721 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceThoseGuysLookReallyConfidentAbout) },
2722 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceTheFinalsAreAllThatsLeft) },
2724 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FINALS_ATTENDANT, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIHopeYoullAllDoWell) },
2725 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabiHasReturnedAndTheFinals) },
2726 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWhenBabiReturnedHeHeadedOff) },
2727 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWhatsGoingOnActorIsLooking) },
2728 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceTheSoldiersCameToSeeActor) },
2729 { EVENT_TALK, SHEBA, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceHmphIWishColossoWouldHurry) },
2730 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceASmileOnAPrettyGirl) },
2731 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceActorIsAGoodGirlBut) },
2732 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), SHEBA, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIDontHaveTheLeastInterest) },
2734 { SEARCH(SEARCH_SHELF), 200, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheArmorLooksHeavyItLooks)) },
2735 { SEARCH(SEARCH_SHELF), 201, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresNothingInThereItsCompletely)) },
2736 { SEARCH(SEARCH_SHELF), 202, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresAHeadbandItSaysNever)) },
2737 { SEARCH(SEARCH_BOOKCASE), 203, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledTheHeart)) },
2738 { SEARCH(SEARCH_BOOKCASE), 204, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresANotebookThatShowsThe)) },
2739 { SEARCH(SEARCH_BOOKCASE), 205, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledBecomeA)) },
2740 { SEARCH(SEARCH_BOOKCASE), 206, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceHeyItsBabisDiaryItReads)) },
2742 { SCENE_EVENTS_END },
2743};
2744
2746 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2747 { EVENT_EXIT, 2, CONDITION_ALWAYS, 2 },
2748 { EVENT_EXIT, 3, CONDITION_ALWAYS, 3 },
2749 { EVENT_EXIT, 4, CONDITION_ALWAYS, 4 },
2750 { EVENT_EXIT, 5, CONDITION_ALWAYS, 5 },
2753 { EVENT_EXIT, 8, CONDITION_ALWAYS, 8 },
2754 { EVENT_EXIT, 9, CONDITION_ALWAYS, 9 },
2755 { EVENT_EXIT, 10, CONDITION_ALWAYS, 10 },
2756 { 0x31, 11, CONDITION_ALWAYS, 11 },
2757 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
2758 { 0x31, 13, CONDITION_ALWAYS, 13 },
2759 { EVENT_EXIT, 16, CONDITION_ALWAYS, 16 },
2761 { EVENT_EXIT, 18, CONDITION_ALWAYS, 18 },
2762 { EVENT_EXIT, 20, CONDITION_ALWAYS, 20 },
2763 { EVENT_EXIT, 21, CONDITION_ALWAYS, 21 },
2764 { EVENT_EXIT, 22, CONDITION_ALWAYS, 22 },
2765 { EVENT_EXIT, 23, CONDITION_ALWAYS, 23 },
2766 { EVENT_EXIT, 24, CONDITION_ALWAYS, 24 },
2767 { EVENT_EXIT, 25, CONDITION_ALWAYS, 25 },
2768 { EVENT_EXIT, 26, CONDITION_ALWAYS, 26 },
2769 { EVENT_EXIT, 27, CONDITION_ALWAYS, 27 },
2770 { EVENT_EXIT, 28, CONDITION_ALWAYS, 28 },
2771 { EVENT_EXIT, 29, CONDITION_ALWAYS, 29 },
2775 { EVENT_EXIT, 33, CONDITION_ALWAYS, 33 },
2776 { EVENT_EXIT, 34, CONDITION_ALWAYS, 34 },
2777 { EVENT_EXIT, 35, CONDITION_ALWAYS, 35 },
2778 { EVENT_EXIT, 36, CONDITION_ALWAYS, 36 },
2779 { EVENT_EXIT, 40, CONDITION_ALWAYS, 40 },
2780 { EVENT_EXIT, 41, CONDITION_ALWAYS, 41 },
2781 { EVENT_EXIT, 42, CONDITION_ALWAYS, 42 },
2782 { EVENT_EXIT, 43, CONDITION_ALWAYS, 43 },
2784 { EVENT_EXIT, 45, CONDITION_ALWAYS, 45 },
2787 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIHaventSeenMuchOfBabi) },
2788 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceItWouldBeAWasteTo) },
2789 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceNoOnesGoingToSleepIn) },
2790 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceWouldThisRoomGetVeryDusty) },
2791 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabiWasFoundSafeAndSound) },
2792 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceNowThatColossoIsOverIm) },
2793 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceTheSouthernContinentIsADangerous) },
2794 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWasHopingIdBeThe) },
2795 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceColossoHasEndedSoWeHave) },
2796 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWantThatLighthouseFinishedQuickly) },
2797 { EVENT_TALK, ACTOR_BABI, IF_FLAG_SET(FLAG_BABI_PALACE_CLOAK_BALL), MSGNO(MsgBabiPalaceIfYouUseTheCloakBall) },
2798 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_BABI, IF_FLAG_SET(FLAG_BABI_PALACE_CLOAK_BALL), MSGNO(MsgBabiPalaceWhyWouldAnAdeptLikeYou) },
2799 { EVENT_TALK, ACTOR_BABI, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceSleepingALotHelpsToDelay) },
2800 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabisFaceIsVeryPaleLike) },
2801 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_BABI, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWishIHadMetYou) },
2802 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIfSomethingHappensToBabiWhat) },
2804 { EVENT_TALK, 17, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceTheGirlFromLaliveroIsNo) },
2805 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIAmSurprisedActorWasAllowed) },
2806 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceItSeemedOnlyNaturalThatActor) },
2807 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIAmSoRelievedActorHas) },
2809 { SEARCH(SEARCH_SHELF), 200, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheArmorLooksHeavyItLooks)) },
2810 { SEARCH(SEARCH_SHELF), 201, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresNothingInThereItsCompletely)) },
2811 { SEARCH(SEARCH_SHELF), 202, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresAHeadbandItSaysNever)) },
2812 { SEARCH(SEARCH_BOOKCASE), 203, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledTheHeart)) },
2813 { SEARCH(SEARCH_BOOKCASE), 204, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresANotebookThatShowsThe)) },
2814 { SEARCH(SEARCH_BOOKCASE), 205, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceTheresABookEntitledBecomeA)) },
2815 { SEARCH(SEARCH_BOOKCASE), 206, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgBabiPalaceHeyItsBabisDiaryItReads)) },
2817 { SCENE_EVENTS_END },
2818};
2819
2821 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2823 { EVENT_TALK, ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceNormallyNoOnesAllowedIntoBabis) },
2824 { EVENT_TALK, ACTOR_SECOND_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceSomeOfTheRoomsInThe) },
2825 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceShouldThePalaceReallyBeOpen) },
2826 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_SECOND_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIWonderHowManyPeopleWill) },
2828 { SCENE_EVENTS_END },
2829};
2830
2832 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2838 { EVENT_TALK, ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabiWantsYouToGoStraight) },
2840 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceSureTheySavedBabiButIm) },
2841 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_SECOND_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceBabiIsADeliberateManHe) },
2843 { SCENE_EVENTS_END },
2844};
2845
2847 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2849 { EVENT_TALK, ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceIveLostAllMyEnthusiasmSince) },
2851 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_FIRST_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceTheEndOfAFestivalIs) },
2852 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), ACTOR_SECOND_GUARD, CONDITION_ALWAYS, MSGNO(MsgBabiPalaceAllTheHeroicWarriorsWhoTook) },
2854 { SCENE_EVENTS_END },
2855};
2856// clang-format on
Ability numbers, named from the English release.
@ ABILITY_MIND_READ
Definition ability_ids.h:16
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
void Object_LinkObjectAndSetCallback(u32 objectId, u32 linkedObjectId)
Makes an actor follow another (the linked action script): writes its linkedObject.
const struct ScenePlacement * Scene_GetPlacements(void)
const struct SceneEntrance * Scene_GetEntrances(void)
const struct SceneEvent * Scene_GetEvents(void)
@ ACTOR_FIRST_GUARD
@ ACTOR_SECOND_GUARD
@ ACTOR_BABI
@ ACTOR_IODEM
s32 BabiPalace_ApplyEntryState(void)
Sets up the scene being entered: the doors, the Cloak Ball on show, and the scenes that play on arriv...
struct SceneRegion gBabiPalace_Regions[]
static void BabiPalace_ShowQuestionAnswer(s32 actorId, s32 question)
Asks a yes or no question; the answers are the two messages after it.
static void BabiPalace_TalkToIndigestedWarrior(s32 actorId)
The warrior with indigestion tries to shrug it off, doubles up, and gives up on entering Colosso.
static void BabiPalace_WakeFromFinalsDream(void)
Waking after resting before the finals: the leader dreamt of fighting in them, the others tease,...
u32 gBabiPalace_Exits[]
static void BabiPalace_AskAboutColosso(s32 actorId)
A warrior asks whether the party is entering Colosso, and either hurries it to the trials or asks whe...
static void BabiPalace_OfferCloakBall(void)
Taking the Cloak Ball on show after Colosso: Babi asks whether the party wants it,...
static void BabiPalace_HearSoldiersReport(void)
Walking past Iodem while Babi is missing: his two soldiers report back from Altmiller Cave without Ba...
u16 gBabiPalace_DoorCells[]
@ ACTOR_CLOAK_BALL
Definition babi_palace.c:59
static void BabiPalace_AskAboutRemainingWarriors(s32 actorId)
Asks whether the party is leaving, like the other warriors.
static void BabiPalace_ThankForSavingBabi(void)
The other guard thanks the party for saving Babi once, then sends it to the colosseum.
struct SceneEvent gBabiPalace_EventsColosso[]
static void BabiPalace_AskAboutMeetingBabi(s32 actorId)
Asks about meeting Babi. "Did you meet with Babi?".
struct SceneEvent gBabiPalace_EventsOther[]
struct SceneEvent gBabiPalace_Events2[]
static void BabiPalace_AskAboutEasternShores(s32 actorId)
Asks whether the party wants to go back to the eastern shores.
struct ScenePlacement gBabiPalace_PlacementsAfterColosso[]
static void BabiPalace_RestInPalaceBeds(void)
Searching the beds: the party goes to bed, talking it over the first night.
struct SceneEntrance gBabiPalace_EntrancesOther[]
@ FLAG_ATTENDANT_SHOWED_BEDS
Definition babi_palace.c:66
s32 gBabiPalace_IndigestionScript[]
static void BabiPalace_AskAboutSoldiers(s32 actorId)
Asks about Babi's soldiers.
struct SceneEntrance gBabiPalace_Entrances2[]
struct SceneEvent gBabiPalace_Events2Colosso[]
struct ScenePlacement gBabiPalace_PlacementsOther[]
const u32 * BabiPalace_GetExits(void)
Both scenes share one exit table.
@ ACTOR_FINALS_ATTENDANT
Definition babi_palace.c:55
static void BabiPalace_PassOnBabisWord(void)
A courtyard guard during the finals passes on Babi's word.
static void BabiPalace_WakeAfterFinals(void)
Waking in the palace after the finals: the leader slept long after fighting to the end; Babi wants to...
struct ScenePlacement gBabiPalace_Placements2[]
static void BabiPalace_ReadShebasMind(s32 unused0, s32 actorId)
Mind Read on Sheba: she cannot escape to Lalivero alone; the first time, she feels it,...
struct ScenePlacement gBabiPalace_PlacementsColosso[]
struct SceneEvent gBabiPalace_Events2AfterColosso[]
static void BabiPalace_OfferRest(s32 actorId)
Talking to the attendant during the finals: the first time, the attendant asks whether the party came...
static void BabiPalace_ExamineWell(void)
Searching the courtyard's well. "It's filled with fresh, clean water.".
static void BabiPalace_ShowBeds(s32 actorId)
Talking to the attendant before Babi's rescue: the attendant leads the party to the beds.
struct SceneEvent gBabiPalace_EventsAfterColosso[]
const struct SceneRegion * BabiPalace_GetRegions(void)
The palace has no regions; the table is empty.
Definition babi_palace.c:97
static void BabiPalace_MeetBabiAfterColosso(void)
Arriving after Colosso: Iodem and Babi have been waiting for the party.
static void BabiPalace_LeaveThroughDoor(void)
Walking north into one of the palace's doors: it opens (SE_DOOR_OPEN) and the leader walks through.
static __inline__ void BabiPalace_RestorePartyAndInventory(void)
After a night in the palace's beds: the party's HP and PP are full, Garet, Ivan and Mia rejoin,...
Definition babi_palace.c:70
@ ACTOR_BED_ATTENDANT
Definition babi_palace.c:48
@ ACTOR_SECOND_SOLDIER
Definition babi_palace.c:51
@ ACTOR_FIRST_SOLDIER
Definition babi_palace.c:50
static void BabiPalace_LeaveThroughAnimatedDoor(void)
Walking north into the courtyard's door: it opens and the leader goes in.
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
#define GARET
Jerald.
#define MIA
Mary.
#define SHEBA
Sheba.
#define IVAN
Ivan.
The engine calls the debug menus import, and their palette swatch tiles.
The display transition's frames, windows and state.
static s32 FieldParty_ListActiveOwners(s16 *owners)
Definition engine_call.h:79
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
@ ANIM_WALK
Definition field_event.h:44
@ ANIM_STAND
Definition field_event.h:43
@ ANIM_NOD
Definition field_event.h:45
@ ANIM_SHAKE_HEAD
Definition field_event.h:46
static s32 Event_OpenMessage(s32 speaker, s32 flags)
void Engine_ActorFaceActor(s32 actor, s32 target, s32 frames)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
#define GameFlag_IsSet
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
#define EMOTE_IN_FRONT
Definition field_event.h:49
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
void Engine_ItemShowFound(s32 item, s32 height)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetDestination(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)
#define GameFlag_Clear
void Engine_EventWaitForScreen(void)
#define GameFlag_Set
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 Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_CameraFollowActor(s32 actor, s32 keep_position)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
static void Event_ShowMessage(s32 speaker, s32 flags)
static void Event_PlayCue(s32 cue)
#define MAP_CELL_STEPS_END
Definition field_event.h:61
s32 Engine_GameFlagIsSet(s32 flag)
static void Actor_WalkBy(s32 actor, s32 dx, s32 dz)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
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_WINDOW
Definition field_obj.h:17
@ TRANSITION_BACKDROP_FADE
Definition field_obj.h:16
#define SCENE_TRANSITION(style, variant)
Definition field_obj.h:20
@ ACTOR_FACES_MOTION
turns toward its velocity, 1/16 turn a frame
Definition field_obj.h:166
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_EXIT
@ EVENT_TALK
@ FACING_STEP
Definition field_scene.h:36
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define IF_FLAG_SET(flag)
Definition field_scene.h:48
#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
#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_BOOKCASE
@ SEARCH_SHELF
@ SEARCH_UNNAMED
@ SEARCH_BARREL
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void Event_End(void)
static void Psynergy_Cancel(void)
static void Actor_RunRepeatedMotion(s32 actor, s32 repeats)
static s32 Vram_Load(s32 block, s32 size, const void *data)
static void Camera_WaitForMove(void)
static void Task_Wait(s32 frames)
static void Event_RequestExit(s32 exit)
static void Actor_Stop(s32 actor)
static void Event_Begin(void)
static void Item_ShowFound(s32 item, s32 height)
static void Actor_StartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_SetSpriteFlags(struct FieldActor *actor, s32 flags)
static void Actor_WaitForMove(s32 actor)
static s32 Party_GiveItem(s32 item, s32 flags)
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 void Item_LoadIcon(s32 item)
static void Heap_Release(s32 slot)
static void Actor_Jump(s32 actor, s32 height, 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)
static void * Heap_Allocate(s32 slot, s32 size)
Game flags, named where their meaning is shown.
#define FLAG_BABI_PALACE_FIRST_NIGHT
the party has slept there once
Definition flags.h:201
#define FLAG_SHOW_LOCATION_NAME
Definition flags.h:94
#define FLAG_COLOSSO_OVER
the Colosso finals have been fought
Definition flags.h:191
#define FLAG_BABI_SAVED
The party has saved Babi in Altmiller Cave with his Mystic Draught; Tolbi then holds the Colosso fina...
Definition flags.h:170
#define FLAG_BABI_PALACE_FINALS_BEDS_OPEN
While set, the beds can be used during the finals.
Definition flags.h:196
#define FLAG_BABI_SPOKE_AFTER_COLOSSO
Babi and Iodem have spoken with the party after Colosso.
Definition flags.h:209
#define FLAG_BABI_PALACE_CLOAK_BALL
lent by Babi after Colosso
Definition flags.h:210
#define FLAG_SCENE_TEMP_00
Definition flags.h:713
#define FLAG_BABI_PALACE_FINALS_REST_OFFERED
The attendant has offered the beds for the night before the finals.
Definition flags.h:194
#define FLAG_BABI_PALACE_LUCKY_MEDAL
in a barrel
Definition flags.h:211
#define FLAG_SHEBA_NOTICED_MIND_READ
Sheba has felt the party read her mind.
Definition flags.h:198
#define FLAG_BABI_PALACE_GUARD_GAVE_WORD
A courtyard guard has passed on Babi's word to go to the colosseum.
Definition flags.h:205
#define FLAG_BABI_PALACE_GUARD_THANKED_PARTY
The other courtyard guard has thanked the party for saving Babi.
Definition flags.h:207
#define FLAG_BABI_PALACE_BEDS_OPEN
While set, the beds can be used before the finals.
Definition flags.h:200
#define FLAG_IODEM_HEARD_SOLDIERS
The soldiers have come back from Altmiller Cave to Iodem without Babi.
Definition flags.h:203
#define FLAG_WON_COLOSSO
the party won the finals
Definition flags.h:192
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
struct DisplayTransitionState * gDisplayTransition
Slot 31.
The screen blend's globals and the graphics routines.
The main-image routines scene overlays import.
void Engine_OwnerRecalculateRatios(s32 owner_id)
void Engine_UiTextDrawQuantity(u32 value, u32 kind)
void Engine_InventorySnapshotRestore(void)
void Inn_PlaySleep(s32 roomPrice)
Charges roomPrice, restores the HP and PP of each member still standing, and plays the night: a fade ...
Definition inn.c:103
The hardware's I/O registers and their bits, as pret names them.
@ KEYS_DPAD
Definition io_reg.h:255
#define REG_DISPCNT
Definition io_reg.h:9
Item numbers, named from the English release.
@ ITEM_CLOAK_BALL
Definition item_ids.h:60
@ ITEM_LURE_CAP
Definition item_ids.h:38
@ ITEM_LUCKY_MEDAL
Definition item_ids.h:70
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysHeld
Keys down now.
void Map_SetLayerEntryFlag(u32 channelIndex)
Pauses tile animation channel channelIndex by setting its paused byte.
void Map_ClearLayerEntryFlag(u32 channelIndex)
Resumes tile animation channel channelIndex by clearing its paused byte.
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62
void Battle_ResetEffectCounter(void)
Clears the field's busy flag and, while Reveal is active, ends it: Reveal used with ACT_PACKED runs i...
Definition targets.c:261
void DisplayTransition_InitializeBattleEffectState(s32 mode)
Starts window transition mode at value 0, with no duration: the caller moves it.
Definition transition.c:559
s32 Party_AddActiveOwner(s32 owner)
Adds character owner to the end of the party: sets its game flag and appends it to gGameState....
Definition party.c:135
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Definition scene.c:355
Scene numbers, named after their places.
char SceneId_BabiPalace2
Song and sound effect ids, indices into gSound_SongTable.
#define MUS_030
Definition songs.h:40
#define SE_DOOR_OPEN
Definition songs.h:153
#define MUS_017
Definition songs.h:27
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_EventBegin(void)
void Engine_ActorShowEmote()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
#define NULL
Definition bilibin.h:6
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
struct AnimationSpritePart image
Definition animspr.h:109
u8 slot
VRAM cache entry holding its tiles.
Definition animspr.h:112
u8 count
layers in use, up to the last one present
Definition animspr.h:129
u16 fullColor
256 colours; set for both parts when created
Definition animspr.h:94
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
s16 maxPp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
s16 hp
current HP, 0 when downed
s16 pp
current PP
s16 maxHp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
The display transition state (heap block 31): two pages of window edges for every line,...
u16 value
The progress, moved from start to end over duration frames: bit 5 says whether the transition opens o...
s16 active
WININ, or WINOUT by mode: 1 when a transition starts.
s16 mask
WINOUT, or WININ by mode: 0x3f3f or 63 when a transition starts.
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
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
s32 targetZ
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
Definition field_obj.h:61
u8 retainSpriteCache
Nonzero keeps its sprite's VRAM cache entry while sprites are suspended or it is off screen (ObjectSy...
Definition field_obj.h:96
union FieldCoordinate y
16.16 fixed-point pixels
Definition field_obj.h:36
union FieldCoordinate z
16.16 fixed-point pixels
Definition field_obj.h:37
u16 facing
1/65536 turns
Definition field_obj.h:34
s32 scaleX
16.16 fixed point, 0x10000 full size
Definition field_obj.h:39
s32 scaleY
16.16 fixed point, 0x10000 full size
Definition field_obj.h:40
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
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
unsigned char u8
Definition types.h:11
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...
Definition units.c:73
The patch levels: our groups of the measured changes from the Japanese release.