Alchemy
Loading...
Searching...
No Matches

colosseum_entrance.c

Go to the documentation of this file.
1/// @file
2/// The colosseum where Colosso is held, in three scenes: the crowd outside the
3/// gates, the halls where the party watches the warriors' trials, and the
4/// finals' waiting room, where Isaac meets the seven warriors who cleared the
5/// trials and marches out with them to the finals.
6
7#include "game_state.h"
8#include "scene_ids.h"
9#include "unit/import.h"
11#include "unit/object/object.h"
13#include "unit/game/game.h"
14#include "battle.h"
15#include "debug.h"
16#include "field.h"
17#include "game.h"
18#include "graphics.h"
19#include "menu.h"
20#include "minigame.h"
21#include "sound.h"
22#include "system.h"
23#include "types.h"
24#include "field_event.h"
25#include "field_scene.h"
26#include "text/msg_ids.h"
27#include "field_obj.h"
28#include "ability_ids.h"
29#include "objcmd.h"
30#include "fixed_math.h"
31#include "macros.h"
32#include "flags.h"
33#include "songs.h"
34
37static void ColosseumEntrance_FaceDirection(s32 actor, s32 facing);
41static void ColosseumEntrance_AnnounceFinals(void);
42static void ColosseumEntrance_WalkToEastExit(void);
45static void ColosseumEntrance_WalkToWestExit(void);
48
49static inline void ColosseumEntrance_Turn(s32 actor, s32 facing) {
50 /* FAKEMATCH: forwarded inline for Event_CrowdRecognizesIsaac's one call;
51 * called directly, r2 and r3 swap and 7 instructions differ in tbs-en. */
53}
54
55/// The attendant by the trials (ColosseumEntrance1, entrances 5 and 69).
56enum { TRIAL_ATTENDANT = 17 };
57
58/// The finals' waiting room (ColosseumEntrance1, entrance 12): an official and
59/// the seven warriors who cleared the trials, as they introduce themselves.
60enum {
62 MORGAN = 12, ///< the highest-ranked
63 AZART = 13, ///< the second-best
64 GALAHAD = 14,
65 SATRAGE = 15,
66 DEKKA = 16,
67 NAVAMPA = 17,
68 BUFORD = 18
69};
70
72 s16 scene = gGameState.scene;
73
74 if (scene == (s32)&SceneId_ColosseumEntrance1) {
76 }
77 if (scene == (s32)&SceneId_ColosseumEntrance3) {
79 }
81}
82
83const struct SceneRegion *ColosseumEntrance_GetRegions(void) { return 0; }
84
85/// Returns the shared colosseum exits.
87
88/// Selects actors for the current area and stage of Colosso.
90 const struct ScenePlacement *table;
91
93 switch (gGameState.entrance) {
94 case 5:
95 case 69:
97 break;
98 case 7:
99 case 70:
101 break;
102 case 8:
103 case 21:
104 case 31:
105 case 64:
106 case 65:
107 case 67:
109 break;
110 case 12:
112 break;
113 case 66:
114 case 68:
116 break;
117 default:
119 break;
120 }
124 } else if (Engine_GameFlagIsSet(FLAG_BABI_SAVED) != 0) {
126 } else {
128 }
129 } else {
131 }
132 return table;
133}
134
136 s16 scene = gGameState.scene;
137
138 if (scene == (s32)&SceneId_ColosseumEntrance2) {
140 }
141 if (scene == (s32)&SceneId_ColosseumEntrance1) {
142 if (gGameState.entrance == 12) {
144 }
146 }
147 if (scene == (s32)&SceneId_ColosseumEntrance3) {
149 }
151}
152
153/// Outside the gates: during the trials, a man asks whether the party hopes to
154/// get in to see Colosso; on the finals day the colosseum is already full.
155static void Event_DiscussSeating(void) {
158 Engine_EventSetMessage(MsgColosseumColosseumAlreadyFullIfReally);
160 } else {
161 Engine_EventSetMessage(MsgColosseumHopingGetInSeeColosso);
163 }
165}
166
167/// Outside the gates: the Lucky Guess makes the battles better; on the finals
168/// day, a good spot costs too much.
172 Engine_ActorShowEmote(13, 258, 40);
173 Engine_EventSetMessage(MsgColosseumWantWatchFinalsFromGood);
175 } else {
176 Engine_EventSetMessage(MsgColosseumColossosLuckyGuessMakesBattles);
178 }
180}
181
182/// Outside the gates: a bettor put it all on a warrior no one picked; on the
183/// finals day a scalper, busy with a customer, asks if the party wants seats.
188 Engine_EventSetMessage(MsgColosseumHoldOnSecond);
194 } else {
195 Engine_EventSetMessage(MsgColosseumWantWinBigPutOn);
197 }
199}
200
201/// The Lucky Guess man explains the game; on the finals day he recognizes Isaac
202/// and refuses him, as finalists may not play (0x3c0: said once).
203static void Event_OfferLuckyGuess(void) {
206 if (GameFlag_IsSet(0x3c0) != 0) {
207 Engine_EventSetMessage(MsgColosseumLookImSorryButWe);
208 Event_ShowMessage(16, 0);
209 } else {
210 Engine_EventSetMessage(MsgColosseumWantTryOutLuckyGuess);
211 Event_OpenMessage(16, 0);
212 if (Engine_EventChooseYesNo(0, 0) == 0) {
214 Actor_ShowEmote(16, 0x100, 40);
215 Event_OpenMessage(16, 0);
216 if (Engine_EventChooseYesNo(0, 0) == 0) {
218 }
220 Event_ShowMessage(16, 0);
221 GameFlag_Set(0x3c0);
222 } else {
223 Event_ShowMessage(16, 0);
224 }
225 }
226 } else {
227 Engine_EventSetMessage(MsgColosseumDoKnowLuckyGuess);
228 Event_AskYesNo(16, 0);
229 }
231}
232
233/// Azart, the second-best, will not lose to someone who skipped the trials;
234/// then he goes back to pacing.
235static void Event_TalkToAzart(void) {
236 struct FieldActor *contestant;
237
238 contestant = Object_GetById(AZART);
242 Engine_EventSetMessage(MsgColosseumImRatedAsSecondBest);
246 {
247 u16 *timer = (u16 *)&contestant->timer;
248 u16 duration = 720;
249
250 *timer = duration;
251 }
252 {
253 u16 *work = &contestant->work;
254 u16 value = 112;
255
256 *work = value;
257 }
260}
261
262/// Galahad, the third seed, jumps. "Waah! Don't frighten me!"
263static void Event_TalkToGalahad(void) {
267 Engine_EventSetMessage(MsgColosseumWaahDontFrightenMe);
269 Actor_ShowEmote(GALAHAD, 0x102, 40);
272}
273
274/// Satrage, the fourth-ranked, opens his eyes and names himself.
275static void Event_TalkToSatrage(void) {
277 Engine_EventSetMessage(MsgColosseumWhoHaveComeQuestionMe);
286}
287
288/// Dekka psyches himself up; the first time, Navampa explains he will not
289/// answer (0x3c1).
290static void Event_TalkToDekka(void) {
293 Engine_EventSetMessage(MsgColosseumDekkaMustWinFinalsDekka);
295 if (GameFlag_IsSet(0x3c1) != 0) {
297 } else {
304 Actor_ShowEmote(NAVAMPA, 0x105, 40);
307 GameFlag_Set(0x3c1);
308 }
310}
311
312/// Navampa of Gondowan, the sixth-ranked, introduces himself.
313static void Event_TalkToNavampa(void) {
316 Engine_EventSetMessage(MsgColosseumAmNavampaGondowanSixthRanked);
325}
326
327/// Buford, the seventh seed: anyone could win today.
328static void Event_TalkToBuford(void) {
331 Engine_EventSetMessage(MsgColosseumImBufordSeventhSeed);
342}
343
344/// The official asks whether Isaac is ready for the finals.
345static void Event_AskIfReadyForFinals(void) {
348 Engine_EventSetMessage(MsgColosseumYouReadyForFinals);
350 if (Engine_EventChooseYesNo(0, 0) != 0)
354}
355
356/// Outside the gates on the finals day, the crowd recognizes Isaac as Babi's
357/// pick, and a guide takes the party in; if Isaac will not fight, his
358/// companions talk him round.
359static void Event_CrowdRecognizesIsaac(void) {
360 // The native sequence reuses this word for actor handles and the reply.
361 s32 actorOrAnswer;
362
364 return;
365 }
366
371 Actor_ShowEmote(17, 0x100, 40);
373 Engine_EventSetMessage(MsgColosseumHeyYouRe);
380 Engine_CameraSetSpeed(PIXELS(8) / 5, PIXELS(1) / 5);
381 Camera_MoveTo(PIXELS(256), -1, PIXELS(172), 1);
384 Actor_ShowEmote(18, 0x102, 40);
388 Actor_SetAttachedEffect(19, 0x102);
392 Actor_ShowEmote(20, 0x103, 40);
403 // Gather Isaac and his companions for the invitation.
422 Actor_SetSpeed(17, PIXELS(3) / 5, PIXELS(3) / 10);
423 Actor_WalkToAndWait(17, 258, 172);
427 actorOrAnswer = (s32)Object_GetById(ACTOR_PARTY_LEADER);
428 if (actorOrAnswer != 0) {
430 ((struct FieldActor *)actorOrAnswer)->x.fixed,
431 ((struct FieldActor *)actorOrAnswer)->z.fixed);
432 }
433 actorOrAnswer = (s32)Object_GetById(ACTOR_PARTY_LEADER);
434 if (actorOrAnswer != 0) {
435 Engine_ActorSetPosition(IVAN, ((struct FieldActor *)actorOrAnswer)->x.fixed,
436 ((struct FieldActor *)actorOrAnswer)->z.fixed);
437 }
438 actorOrAnswer = (s32)Object_GetById(ACTOR_PARTY_LEADER);
439 if (actorOrAnswer != 0) {
440 Engine_ActorSetPosition(MIA, ((struct FieldActor *)actorOrAnswer)->x.fixed,
441 ((struct FieldActor *)actorOrAnswer)->z.fixed);
442 }
443 Actor_SetSpeed(GARET, PIXELS(4) / 5, PIXELS(2) / 5);
444 Actor_SetSpeed(IVAN, PIXELS(4) / 5, PIXELS(2) / 5);
445 Actor_SetSpeed(MIA, PIXELS(4) / 5, PIXELS(2) / 5);
446 Engine_ActorWalkTo(GARET, 246, 200);
447 Actor_WalkTo(IVAN, 262, 200);
448 Actor_WalkToAndWait(MIA, 278, 200);
461 Event_OpenMessage(17, 0);
464
465 // Either leave with the guide or let the companions persuade Isaac.
466 if (Engine_EventChooseYesNo(0, 0) == 0) {
475 Engine_CameraSetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
476 Engine_CameraMoveTo(PIXELS(256), -1, PIXELS(100), 1);
477 Actor_SetSpeed(17, PIXELS(1), PIXELS(1) / 2);
487 } else {
489 Actor_ShowEmote(17, 0x102, 40);
491 Actor_ShowEmote(18, 0x102, 40);
493 Actor_ShowEmote(19, 0x102, 40);
495 Actor_ShowEmote(20, 0x102, 40);
502 Actor_ShowEmote(MIA, 0x102, 40);
514 Actor_ShowEmote(MIA, 0x100, 60);
520
521 actorOrAnswer = Engine_EventChooseYesNo(0, 0);
522 if (actorOrAnswer == 0) {
531 Engine_CameraSetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
532 Engine_CameraMoveTo(PIXELS(256), -1, PIXELS(100), 1);
533 Actor_SetSpeed(17, PIXELS(1), PIXELS(1) / 2);
543 } else {
548 Engine_ActorShowEmote(IVAN, 0x102, 60);
560 Actor_WalkToAndWait(GARET, 262, 188);
564 Engine_CameraSetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
565 Engine_CameraMoveTo(PIXELS(256), -1, PIXELS(100), 1);
566 Actor_SetSpeed(17, PIXELS(1), PIXELS(1) / 2);
569 Actor_SetSpeed(GARET, PIXELS(1), PIXELS(1) / 2);
575 }
576 }
577
579 Engine_GameFlagSet(0x93f);
581}
582
583/// Stepping forward in the waiting room: asked whether he is ready, Isaac can
584/// still wait; if he is, the warriors grumble, line up by rank and march out to
585/// the finals.
586static void Event_FinalsBegin(void) {
587 struct FieldActor *actor;
588 const s32 *script;
589
597 Camera_MoveTo(PIXELS(816), -1, PIXELS(112), 1);
601 Engine_EventSetMessage(MsgColosseumYouReadyForFinals);
603 if (Engine_EventChooseYesNo(0, 0) == 0) {
607 Engine_EventSetMessage(MsgColosseumDayTiredWaiting);
662 Engine_CameraMoveTo(PIXELS(808), -1, PIXELS(86), 1);
672 // Azart stops pacing before the procession.
674 actor = Object_GetById(AZART);
675 actor->update = NULL;
676 actor->timer = 0;
677 actor->work = 0;
678 SET_VELOCITY(actor, 0, 0, 0);
679 actor->targetX = ACTOR_NO_TARGET;
680 actor->targetY = ACTOR_NO_TARGET;
681 actor->targetZ = ACTOR_NO_TARGET;
683 // Send contestants through the gate at staggered intervals.
702 } else {
705 }
707 }
708}
709
710/// Stepping back from the line arms the question again (scene flags 0x234 and
711/// 0x235).
712static void Event_RearmFinalsStart(void) {
715}
716
717/// The trial attendant: before both trials have been watched, the screen goes
718/// to the next warrior's trial; afterwards he talks about the techniques.
719static void Event_TalkToTrialAttendant(void) {
720 s32 clearedTrialSeen;
721
724 if (clearedTrialSeen != 0) {
726 Engine_EventSetMessage(MsgColosseumHavePerfectTechniquesLikeThose);
729 } else {
731 Engine_EventSetMessage(MsgColosseumSilence);
733 Engine_EventGetViewCenter()->motionFlags = clearedTrialSeen;
735 Camera_SetSpeed(PIXELS(32) / 5, PIXELS(4) / 5);
736 Camera_MoveTo(PIXELS(540), -1, PIXELS(208), 1);
744 } else {
746 }
747 }
749}
750
751/// Arriving at entrance 7: a warrior strains at the trial, gives up and runs.
753 struct FieldActor *actor;
754 s32 facing;
755
757 Camera_MoveTo(-1, -1, -1, 0);
770 actor = Object_GetById(21);
772 actor = Object_GetById(19);
773 actor->scaleX = -Q16_ONE;
774 actor = Object_GetById(20);
775 actor->scaleX = -Q16_ONE;
786 Actor_SetSpeed(16, PIXELS(4) / 5, PIXELS(2) / 5);
787 Actor_WalkToAndWait(16, 164, 904);
795 Actor_WalkToAndWait(16, 164, 920);
796 Actor_WalkToAndWait(16, 185, 920);
798 Actor_WalkToAndWait(16, 185, 916);
807 Actor_SetAttachedEffect(16, 0x102);
813 Actor_SetAttachedEffect(14, 0x102);
814 Actor_SetAttachedEffect(15, 0x102);
815 Actor_SetAttachedEffect(17, 0x102);
816 Actor_SetAttachedEffect(18, 0x102);
824 actor = Object_GetById(16);
826 actor->scaleX = Q16_ONE;
827 actor->scaleY = Q16_ONE;
844 Actor_SetSpeed(16, PIXELS(2), PIXELS(1));
845 Actor_WalkToAndWait(16, 162, 916);
846 Actor_WalkToAndWait(16, 162, 890);
849 Actor_WalkToAndWait(16, 184, 863);
850 Actor_WalkToAndWait(16, 184, 796);
851 Actor_SetPosition(16, 0, 0);
859}
860
861/// Back from a trial: the attendant says the warrior failed, or after the
862/// second trial that he cleared it.
866
869
872 Engine_EventSetMessage(MsgColosseumHaveMakeThroughCountlessMatches);
873
876 }
877
882
884}
885
886/// Arriving at entrance 70: a warrior heaves the trial object up in jolts and
887/// drops it, shaking the ground: he clears the trial.
889 u32 counter;
890 struct FieldActor *trialEffect;
891 struct FieldActor *actor;
892
894 Camera_MoveTo(-1, -1, -1, 0);
904 Actor_SetPosition(16, 0, 0);
907 actor = Object_GetById(21);
909 actor = Object_GetById(19);
910 actor->scaleX = -Q16_ONE;
911 actor = Object_GetById(20);
912 actor->scaleX = -Q16_ONE;
923 Actor_SetSpeed(17, PIXELS(4) / 5, PIXELS(2) / 5);
924 Actor_WalkToAndWait(17, 164, 904);
932 Actor_WalkToAndWait(17, 164, 920);
933 Actor_WalkToAndWait(17, 185, 920);
935 Actor_WalkToAndWait(17, 185, 916);
944 Actor_SetAttachedEffect(17, 0x102);
949 Actor_SetAttachedEffect(14, 0x102);
950 Actor_SetAttachedEffect(15, 0x102);
951 Actor_SetAttachedEffect(17, 0x102);
952 Actor_SetAttachedEffect(18, 0x102);
957 Actor_SetAttachedEffect(17, 0x101);
958 // The object rises a little with every heave.
959 trialEffect = Object_GetById(21);
960 trialEffect->motionFlags = 0;
961 for (counter = 0; counter < 20; counter++) {
962 trialEffect->y.fixed += PIXELS(3) / 5;
964 trialEffect->y.fixed += -PIXELS(3) / 10;
966 }
970 Actor_SetAttachedEffect(17, 0x100);
973 actor = Object_GetById(17);
975 trialEffect->motionFlags = 3;
976 trialEffect->scaleX = Q16_ONE;
977 trialEffect->scaleY = Q16_ONE;
983 Map_SetShake(-1, -1, 9 * Q16_ONE / 10);
985 Actor_SetSpeed(17, PIXELS(8) / 5, PIXELS(4) / 5);
986 Actor_WalkToAndWait(17, 208, 928);
1004}
1005
1006/// Sets up the halls by the arrival, or the gates outside by Colosso's stage.
1008 s32 scene = gGameState.scene;
1009
1010 if (scene == (s32)&SceneId_ColosseumEntrance1) {
1012 } else if (scene == (s32)&SceneId_ColosseumEntrance3) {
1014 }
1015 return 0;
1016}
1017
1018/// Each arrival in the halls has its own scene: the trials, the briefing before
1019/// the finals, the passages to the stages and the congratulations after them.
1021 s32 entrance;
1022
1023 Engine_TaskWait(1);
1024 entrance = gGameState.entrance;
1025 switch (entrance) {
1026 case 5:
1029 break;
1030 case 69:
1034 break;
1036 break;
1037 case 7:
1039 break;
1040 case 70:
1042 break;
1043 case 64:
1046 break;
1047 case 65:
1049 break;
1050 case 66:
1052 break;
1053 case 12:
1057 break;
1059 break;
1060 case 21:
1066 break;
1067 case 67:
1069 break;
1070 case 68:
1072 break;
1073 case 31:
1079 break;
1080 default:
1081 break;
1082 }
1083}
1084
1086 Engine_EventShowMessage(speaker, 0);
1087 Engine_EventWait(10);
1088}
1089
1090/// Turns an actor to the given facing over ten frames.
1093}
1094
1095/// Outside: once Colosso is over, the tiles by the gates change; before that,
1096/// actor 16 takes child value 2, and on the finals day a cell pair changes.
1098 s32 column, row;
1099
1101 Map_CopyCellsTo(64, 0, 48, 5, 2, 2);
1102 column = 16;
1103 row = 8;
1104 Map_CopyCellAttributes(14, 8, 2, 1, column, row);
1105 } else {
1108 column = 14;
1109 row = 11;
1110 Map_CopyCellAttributes(30, 22, 1, 2, column, row);
1111 }
1112 }
1113}
1114
1115/// Places the three companions behind Isaac for the officials' briefing.
1117 Actor_SetPosition(GARET, PIXELS(792), PIXELS(136));
1118 Actor_SetPosition(IVAN, PIXELS(824), PIXELS(136));
1119 Actor_SetPosition(MIA, PIXELS(808), PIXELS(152));
1120}
1121
1122/// Before the first match: only Isaac may enter the finals, so the officials
1123/// seat his companions by the stage, where they can cheer him on.
1125 s32 flag;
1126
1129 Engine_TaskWait(1);
1130 Camera_MoveTo(-1, -1, -1, 0);
1134 Engine_TaskWait(1);
1140 ColorBuffer_ApplyTarget(0x10002, 0);
1142 Engine_EventWait(80);
1144 Engine_EventWait(20);
1146 Engine_EventWait(40);
1149 Engine_EventWait(20);
1150 ColorBuffer_ApplyTarget(0x10000, 0);
1152 Engine_EventWait(80);
1153 Actor_ShowEmote(IVAN, 0x100, 0);
1155 Engine_EventWait(20);
1156 // The officials explain Isaac's selection and the companions' role.
1157 Engine_EventSetMessage(MsgColosseumIsaacOnlyOneEnteringFinals);
1161 Actor_ShowEmote(MIA, 0x102, 40);
1167 Actor_ShowEmote(9, 0x105, 20);
1169 Actor_ShowEmote(GARET, 0x103, 20);
1172 Actor_ShowEmote(10, 0x102, 40);
1181 Actor_ShowEmote(GARET, 0x103, 20);
1191 Engine_EventWait(20);
1196 Actor_ShowEmote(IVAN, 0x105, 60);
1201 Actor_ShowEmote(GARET, 0x102, 0);
1202 Actor_ShowEmote(MIA, 0x102, 80);
1203 Actor_ShowEmote(IVAN, 0x106, 0);
1214 Actor_ShowEmote(GARET, 0x100, 0);
1215 Actor_ShowEmote(MIA, 0x100, 40);
1234 Actor_ShowEmote(GARET, 0x105, 0);
1235 Actor_ShowEmote(IVAN, 0x105, 0);
1236 Actor_ShowEmote(MIA, 0x105, 80);
1237 Actor_ShowEmote(IVAN, 0x106, 0);
1243 Actor_ShowEmote(11, 0x101, 60);
1249 flag = 0;
1250 if (Engine_EventChooseYesNo(0, 0) == 1) {
1252 flag = 1;
1253 } else {
1258 }
1259 if (flag != 0) {
1261 }
1266 Actor_ShowEmote(8, 0x105, 0);
1267 Actor_ShowEmote(9, 0x105, 0);
1268 Actor_ShowEmote(10, 0x105, 0);
1269 Actor_ShowEmote(11, 0x105, 60);
1291 // Rejoin the companions before the official leads Isaac onward.
1292 Actor_SetSpeed(GARET, PIXELS(1), PIXELS(1) / 2);
1293 Actor_SetSpeed(IVAN, PIXELS(1), PIXELS(1) / 2);
1294 Actor_SetSpeed(MIA, PIXELS(1), PIXELS(1) / 2);
1298 Engine_EventWait(20);
1302 Actor_SetSpeed(11, PIXELS(1), PIXELS(1) / 2);
1305 Actor_MoveToAndWait(11, 830, 152);
1306 Actor_MoveToAndWait(11, 808, 164);
1307 Actor_SetDestination(11, 808, 312);
1308 Engine_EventWait(20);
1309 Camera_SetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
1310 Camera_MoveTo(PIXELS(808), -1, PIXELS(312), 1);
1313 Engine_EventWait(60);
1319}
1320
1321/// An official leads Isaac east to the next stage.
1323 struct FieldActor *escort;
1324
1325 if (GameFlag_IsSet(JENNA) != 0) {
1326 GameFlag_Set(0x16d);
1329 }
1331 Actor_SetPosition(11, PIXELS(712), PIXELS(588));
1332 Engine_TaskWait(1);
1334 Actor_SetSpeed(11, PIXELS(8) / 5, PIXELS(4) / 5);
1336 escort = Object_GetById(11);
1337 escort->facing = FACING_EAST;
1342 Actor_MoveToAndWait(11, 812, 588);
1344 Actor_MoveToAndWait(11, 912, 588);
1346 Actor_SetDestination(11, 1012, 588);
1351 } else {
1353 }
1354}
1355
1356/// Arriving in the waiting room: the official tells the warriors to prepare.
1358 struct FieldActor *contestant;
1359
1360 contestant = Object_GetById(AZART);
1364 Engine_EventWait(40);
1367 Engine_TaskWait(1);
1377 Engine_EventSetMessage(MsgColosseumPrepareYourselvesContestantsFinalsWill);
1380 {
1381 u16 *timer = (u16 *)&contestant->timer;
1382 u16 duration = 720;
1383
1384 *timer = duration;
1385 }
1386 {
1387 u16 *work = &contestant->work;
1388 u16 value = 112;
1389
1390 *work = value;
1391 }
1400}
1401
1402/// Isaac walks east alone to the next stage.
1415 } else {
1417 }
1418}
1419
1420/// After the first match: the officials congratulate Isaac and lead him on.
1422 const s32 *actions;
1423
1428 Engine_EventWait(40);
1431 Engine_EventSetMessage(MsgColosseumSeeYouveMadeThroughYour);
1442 Actor_SetSpeed(GARET, PIXELS(1), PIXELS(1) / 2);
1443 Actor_SetSpeed(IVAN, PIXELS(1), PIXELS(1) / 2);
1444 Actor_SetSpeed(MIA, PIXELS(1), PIXELS(1) / 2);
1446 Actor_SetActionScript(GARET, actions);
1447 Actor_SetActionScript(IVAN, actions);
1449 Engine_EventWait(20);
1453 Actor_SetSpeed(11, PIXELS(1), PIXELS(1) / 2);
1456 Actor_MoveToAndWait(11, 830, 152);
1457 Actor_MoveToAndWait(11, 808, 164);
1458 Actor_SetDestination(11, 808, 312);
1459 Engine_EventWait(20);
1460 Camera_SetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
1461 Camera_MoveTo(PIXELS(808), -1, PIXELS(312), 1);
1464 Engine_EventWait(60);
1468}
1469
1470/// An official leads Isaac west to the next stage.
1472 struct FieldActor *escort;
1473
1474 if (GameFlag_IsSet(JENNA) != 0) {
1475 GameFlag_Set(0x16d);
1478 }
1480 Actor_SetPosition(11, PIXELS(868), PIXELS(588));
1481 Engine_TaskWait(1);
1483 Actor_SetSpeed(11, PIXELS(8) / 5, PIXELS(4) / 5);
1485 escort = Object_GetById(11);
1486 escort->facing = FACING_WEST;
1491 Actor_MoveToAndWait(11, 768, 588);
1493 Actor_MoveToAndWait(11, 668, 588);
1495 Actor_SetDestination(11, 568, 588);
1499}
1500
1501/// Isaac walks west alone to the next stage.
1513}
1514
1515/// After the second match: one more win and Isaac is the champion.
1517 const s32 *actions;
1518
1523 Engine_EventWait(40);
1526 Engine_EventSetMessage(MsgColosseumWonBothMatches);
1537 Actor_SetSpeed(GARET, PIXELS(1), PIXELS(1) / 2);
1538 Actor_SetSpeed(IVAN, PIXELS(1), PIXELS(1) / 2);
1539 Actor_SetSpeed(MIA, PIXELS(1), PIXELS(1) / 2);
1541 Actor_SetActionScript(GARET, actions);
1542 Actor_SetActionScript(IVAN, actions);
1544 Engine_EventWait(20);
1548 Actor_SetSpeed(11, PIXELS(1), PIXELS(1) / 2);
1551 Actor_MoveToAndWait(11, 830, 152);
1552 Actor_MoveToAndWait(11, 808, 164);
1553 Actor_SetDestination(11, 808, 312);
1554 Engine_EventWait(20);
1555 Camera_SetSpeed(PIXELS(2) / 5, PIXELS(1) / 20);
1556 Camera_MoveTo(PIXELS(808), -1, PIXELS(312), 1);
1559 Engine_EventWait(60);
1563}
1564
1565/// The warriors' child values and their waiting actions in the waiting room.
1580}
1581
1583 SC_ARG(2), SC_MOVE(PIXELS(262), 0, PIXELS(188)),
1584 SC_SYNC, SC_ARG(1),
1585 SC_POS(0, 0, 0), SC_END,
1586};
1587
1589 SC_ARG(2), SC_MOVE(PIXELS(246), 0, PIXELS(200)),
1590 SC_SYNC, SC_ARG(1),
1591 SC_POS(0, 0, 0), SC_END,
1592};
1593
1595 SC_ARG(2), SC_MOVE(PIXELS(808), 0, PIXELS(120)),
1596 SC_SYNC, SC_ARG(1),
1597 SC_POS(0, 0, 0), SC_END,
1598};
1599
1601 SC_ARG(2), SC_MOVE(PIXELS(268), 0, PIXELS(146)),
1602 SC_SYNC, SC_MOVE(PIXELS(262), 0, PIXELS(24)),
1603 SC_SYNC, SC_ARG(1),
1604 SC_END,
1605};
1606
1608 SC_ARG(2), SC_MOVE(PIXELS(776), 0, PIXELS(120)), SC_SYNC,
1610 SC_END,
1611};
1612
1614 SC_ARG(2),
1615 SC_MOVE(PIXELS(894), 0, PIXELS(106)),
1616 SC_SYNC,
1617 SC_MOVE(PIXELS(882), 0, PIXELS(136)),
1618 SC_SYNC,
1619 SC_MOVE(PIXELS(808), 0, PIXELS(136)),
1620 SC_SYNC,
1621 SC_MOVE(PIXELS(792), 0, PIXELS(152)),
1622 SC_SYNC,
1623 SC_ARG(1),
1625 SC_WAIT(20),
1626 SC_END,
1627};
1628
1630 SC_ARG(2),
1631 SC_MOVE(PIXELS(840), 0, PIXELS(136)),
1632 SC_SYNC,
1633 SC_MOVE(PIXELS(824), 0, PIXELS(152)),
1634 SC_SYNC,
1635 SC_ARG(1),
1637 SC_WAIT(20),
1638 SC_END,
1639};
1640
1642 SC_SET(SW_SPEED, PIXELS(4) / 5),
1643 SC_SET(SW_ACCEL, PIXELS(2) / 5),
1644 SC_ARG(2),
1645 SC_MOVE(PIXELS(808), 0, PIXELS(88)),
1646 SC_SYNC,
1647 SC_MOVE(PIXELS(808), 0, PIXELS(58)),
1648 SC_SYNC,
1649 SC_ARG(1),
1650 SC_POS(0, 0, 0),
1651 SC_END,
1652};
1653
1657 SC_WAIT(2),
1658 SC_ADD(SW_SCALE_X, -Q16_ONE / 8),
1660 SC_WAIT(1),
1661 SC_ADD(SW_SCALE_X, Q16_ONE / 16),
1662 SC_ADD(SW_SCALE_Y, -Q16_ONE / 16),
1663 SC_WAIT(1),
1664 SC_ADD(SW_SCALE_X, Q16_ONE / 32),
1665 SC_ADD(SW_SCALE_Y, -Q16_ONE / 32),
1666 SC_WAIT(1),
1667 SC_ADD(SW_SCALE_X, Q16_ONE / 32),
1668 SC_ADD(SW_SCALE_Y, -Q16_ONE / 32),
1669 SC_WAIT(1),
1671};
1672
1674 {0, CONDITION_ALWAYS, 72, 0, 72, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1675 {1, CONDITION_ALWAYS, 72, 0, 72, FACING_SOUTH, 0, 16, 16, 528, 256, 0},
1676 {2, CONDITION_ALWAYS, 488, 0, 88, FACING_SOUTH, 0, 16, 16, 528, 256, 0},
1678};
1679
1681 {0, CONDITION_ALWAYS, 56, 0, 296, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1682 {1, CONDITION_ALWAYS, 184, 0, 72, FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1683 {2, CONDITION_ALWAYS, 56, 0, 120, FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1684 {3, CONDITION_ALWAYS, 120, 0, 176, FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1685 {4, CONDITION_ALWAYS, 56, 0, 296, FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1686 {5, CONDITION_ALWAYS, 392, 0, 120, FACING_SOUTH, 0, 272, 0, 656, 304, 0},
1687 {6, CONDITION_ALWAYS, 520, 0, 72, FACING_SOUTH, 0, 272, 0, 656, 304, 0},
1688 {7, CONDITION_ALWAYS, 184, 0, 912, FACING_SOUTH, 0, 0, 736, 368, 1024, 0},
1689 {8, CONDITION_ALWAYS, 808, 0, 296, FACING_NORTH, 0, 656, 0, 960, 320, 0},
1690 {12, CONDITION_ALWAYS, 784, 0, 108, FACING_SOUTHWEST, 0, 656, 0, 960, 320,
1691 0},
1692 {21, CONDITION_ALWAYS, 808, 0, 120, FACING_NORTH, 0, 656, 0, 960, 320, 0},
1693 {31, CONDITION_ALWAYS, 808, 0, 120, FACING_NORTH, 0, 656, 0, 960, 320, 0},
1694 {64, CONDITION_ALWAYS, 808, 0, 120, FACING_NORTH, 0, 656, 0, 960, 320, 0},
1695 {65, CONDITION_ALWAYS, 680, 0, 588, FACING_EAST, 0, 520, 490, 1020, 640, 0},
1696 {66, CONDITION_ALWAYS, 680, 0, 428, FACING_EAST, 0, 520, 330, 1020, 480, 0},
1697 {67, CONDITION_ALWAYS, 900, 0, 588, FACING_WEST, 0, 520, 490, 1020, 640, 0},
1698 {68, CONDITION_ALWAYS, 900, 0, 428, FACING_WEST, 0, 520, 330, 1020, 480, 0},
1699 {69, CONDITION_ALWAYS, 440, 0, 120, FACING_SOUTHEAST, 0, 272, 0, 656, 304,
1700 0},
1701 {70, CONDITION_ALWAYS, 184, 0, 912, FACING_SOUTH, 0, 0, 736, 368, 1024, 0},
1703};
1704
1706 {1, CONDITION_ALWAYS, 96, 0, 288, FACING_NORTH, 0, 0, 0, 512, 320, 0},
1707 {2, CONDITION_ALWAYS, 272, 0, 88, FACING_SOUTH, 0, 0, 0, 512, 320, 0},
1709};
1710
1712 SCENE_EXITS(141), SCENE_EXIT(1, 138, 13), SCENE_EXIT(2, 140, 4),
1713 SCENE_EXIT(0, 140, 0), SCENE_EXIT(1, 140, 6), SCENE_EXIT(2, 140, 5),
1714 SCENE_EXIT(3, 140, 1), SCENE_EXIT(4, 141, 2), SCENE_EXIT(5, 140, 2),
1715 SCENE_EXIT(6, 140, 1), SCENE_EXIT(7, 140, 7), SCENE_EXIT(69, 140, 69),
1716 SCENE_EXIT(70, 140, 70), SCENE_EXIT(64, 140, 65), SCENE_EXIT(65, 143, 3),
1717 SCENE_EXIT(66, 140, 66), SCENE_EXIT(67, 140, 67), SCENE_EXIT(12, 143, 2),
1718 SCENE_EXIT(21, 144, 3), SCENE_EXIT(22, 144, 2), SCENE_EXIT(31, 145, 3),
1719 SCENE_EXIT(32, 145, 2), SCENE_EXIT(0, 142, 0), SCENE_EXIT(1, 135, 12),
1720 SCENE_EXIT(2, 140, 64), SCENE_EXITS_END,
1721};
1722
1723// clang-format off
1726 PIXELS(168), 0, PIXELS(184), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1728 PIXELS(248), 0, PIXELS(184), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1730 PIXELS(328), 0, PIXELS(184), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1732 PIXELS(408), 0, PIXELS(184), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1733 { SCENE_TABLE_END },
1734};
1735
1738 PIXELS(496), 0, PIXELS(120), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1742 PIXELS(408), 0, PIXELS(88), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1744 PIXELS(360), 0, PIXELS(152), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1748 PIXELS(376), 0, PIXELS(184), FACING_SOUTHEAST, TALK_KEEP_FACING, 0 },
1756 PIXELS(454), 0, PIXELS(104), FACING_SOUTHEAST, TALK_KEEP_FACING, 0 },
1758 PIXELS(360), 0, PIXELS(208), FACING_SOUTHEAST, TALK_FACE_PARTY, 0 },
1774 PIXELS(428), 0, PIXELS(72), FACING_SOUTHEAST, TALK_FACE_PARTY, 0 },
1785 { SCENE_TABLE_END },
1786};
1787
1790 PIXELS(250), 0, PIXELS(846), FACING_SOUTH, TALK_KEEP_FACING, 0 },
1816 PIXELS(184), 0, PIXELS(902), FACING_SOUTH, TALK_KEEP_FACING, 0 },
1817 { SCENE_TABLE_END },
1818};
1819
1822 PIXELS(200), 0, PIXELS(72), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1824 PIXELS(168), 0, PIXELS(72), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1826 PIXELS(128), 0, PIXELS(96), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1827 { SCENE_TABLE_END },
1828};
1829
1832 0, 0, 0, FACING_NORTH, TALK_KEEP_FACING, 0 },
1834 0, 0, 0, FACING_NORTH, TALK_KEEP_FACING, 0 },
1836 0, 0, 0, FACING_NORTH, TALK_KEEP_FACING, 0 },
1844 PIXELS(856), 0, PIXELS(120), FACING_WEST, TALK_KEEP_FACING, 0 },
1845 { SCENE_TABLE_END },
1846};
1847
1862 PIXELS(872), 0, PIXELS(88), FACING_NORTHWEST + FACING_STEP, 3, 0 },
1864 PIXELS(808), 0, PIXELS(120), FACING_SOUTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1866 PIXELS(920), 0, PIXELS(134), FACING_EAST, TALK_KEEP_FACING, 0 },
1868 PIXELS(840), 0, PIXELS(120), FACING_SOUTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1870 PIXELS(856), 0, PIXELS(152), FACING_SOUTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1871 { SCENE_TABLE_END },
1872};
1873
1876 PIXELS(536), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1878 PIXELS(632), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1880 PIXELS(728), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1882 PIXELS(824), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1884 PIXELS(920), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1886 PIXELS(1016), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
1887 { SCENE_TABLE_END },
1888};
1889
1904 PIXELS(104), 0, PIXELS(198), FACING_NORTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1906 PIXELS(104), 0, PIXELS(180), FACING_SOUTH + FACING_STEP, TALK_FACE_PARTY, 0 },
1918 PIXELS(280), 0, PIXELS(140), FACING_NORTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1923 { SCENE_TABLE_END },
1924};
1925
1928 0, 0, 0, FACING_EAST, TALK_KEEP_FACING, 0 },
1930 0, 0, 0, FACING_EAST, TALK_KEEP_FACING, 0 },
1932 0, 0, 0, FACING_EAST, TALK_KEEP_FACING, 0 },
1946 PIXELS(424), 0, PIXELS(186), FACING_EAST, TALK_KEEP_FACING, 0 },
1948 PIXELS(104), 0, PIXELS(180), FACING_SOUTH + FACING_STEP, TALK_FACE_PARTY, 0 },
1952 PIXELS(258), 0, PIXELS(161), FACING_EAST, TALK_KEEP_FACING, 0 },
1954 PIXELS(244), 0, PIXELS(150), FACING_EAST, TALK_KEEP_FACING, 0 },
1956 PIXELS(232), 0, PIXELS(161), FACING_EAST, TALK_KEEP_FACING, 0 },
1958 PIXELS(216), 0, PIXELS(168), FACING_EAST, TALK_KEEP_FACING, 0 },
1968 PIXELS(278), 0, PIXELS(124), FACING_NORTH + FACING_STEP, TALK_KEEP_FACING, 0 },
1973 { SCENE_TABLE_END },
1974};
1975
1981 { SCENE_TABLE_END },
1982};
1983
1985 { SCENE_EVENTS_END },
1986};
1987
1989 { 0x21, 1, CONDITION_ALWAYS, 1 },
1990 { 0x21, 2, CONDITION_ALWAYS, 2 },
1991 { SCENE_EVENTS_END },
1992};
1993
1995 { 0x21, 1, CONDITION_ALWAYS, 1 },
1996 { 0x21, 2, CONDITION_ALWAYS, 2 },
1997 { 0x31, 4, CONDITION_ALWAYS, 4 },
1998 { 0x31, 5, CONDITION_ALWAYS, 5 },
1999 { 0x31, 6, CONDITION_ALWAYS, 6 },
2000 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceGoForItThatsItIm) },
2001 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceWatchingTheTrialsMakesMeReally) },
2002 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceWatchingSuchProudSkilledWarriorsIn) },
2003 { EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceIveWaitedAWholeYearTo) },
2005 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceEvenTheSmallerWarriorsCanWin) },
2006 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceTheseTrialsAreBasedOnPersonal) },
2007 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceWhatFantasticPhysiquesWhyIfI) },
2008 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgColossoDidntThinkBattles) },
2009 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 17, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceNoMatterHowGoodAWarrior) },
2010 { SEARCH(SEARCH_UNNAMED), 50, CONDITION_ALWAYS, FIND_MESSAGE(MSGNO(MsgXianItIsLocked)) },
2011 { SCENE_EVENTS_END },
2012};
2013
2015 { EVENT_EXIT, 1, CONDITION_ALWAYS, 1 },
2016 { EVENT_EXIT, 2, CONDITION_ALWAYS, 2 },
2017 { EVENT_TALK, 8, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceTheyreHoldingThePreliminaryColossoHeats) },
2018 { EVENT_TALK, 8, FLAG_COLOSSO_OVER, MSGNO(MsgColosseumEntranceTheFinalsAreFinallyHereI) },
2019 { EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceColossoIsOverAndTheColosseum) },
2020 { EVENT_TALK, 9, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceSighTheColosseumIsPackedWith) },
2021 { EVENT_TALK, 9, FLAG_COLOSSO_OVER, MSGNO(MsgColosseumEntranceIHeardBabiHasPickedSome) },
2022 { EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceTheColosseumIsClosedUntilNext) },
2024 { EVENT_TALK, 11, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceIfYouHitItBigIn) },
2025 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceAWarriorNamedIsaacWasSelected) },
2026 { EVENT_TALK, 12, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceIveBeenBettingOnTheLucky) },
2027 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceHavingAWarriorWhoWasntIn) },
2031 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceIWonderWhichWarriorWillBe) },
2032 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, FLAG_COLOSSO_OVER, MSGNO(MsgColosseumEntranceTheRealBattlesAreAboutTo) },
2033 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceWhenTheColosseumGatesFinallyShut) },
2034 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceHavingToArriveSoEarlyJust) },
2035 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, FLAG_COLOSSO_OVER, MSGNO(MsgColosseumEntranceTheWarriorNamedIsaacIsSure) },
2036 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceTheFightingAtThisYearsColosso) },
2037 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceThereAreSoManyPeopleWho) },
2038 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceOfCourseItsTheRichWho) },
2039 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceImGoingToPickTheBiggest) },
2040 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceThereCanBeUpsetsInThe) },
2041 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceImFeelingConfidentThisTimeIm) },
2042 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceWhatKindOfWarriorIsThat) },
2043 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceEveryoneKeepsRiskingMoreAndMore) },
2044 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceMaybeIWillBuyASeat) },
2045 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceEveryYearIGoAfterA) },
2046 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceImGoingToBeInTrouble) },
2047 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, FLAG_BABI_SAVED, MSGNO(MsgColosseumEntranceOnceTheTrialsAreOverIts) },
2048 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgColosseumEntranceAllOfTheProfitsFromThe) },
2050 { SCENE_EVENTS_END },
2051};
2052// clang-format on
2053
2056 MSGNO(MsgColosseumEntranceIAmMorganIAmThe)},
2066 MSGNO(MsgColosseumEntranceYouCannotLeaveUntilTheFinals)},
2068 MSGNO(MsgColosseumEntranceIFeelWeveBeenWaitingForever)},
2070 MSGNO(MsgColosseumEntranceWhenTheGongSoundsTheFinals)},
2074};
Ability numbers, named from the English release.
@ ABILITY_MIND_READ
Definition ability_ids.h:16
void Object_SetActionById(u32 objectId, s32 steps)
Sets the animation timer steps of each of an actor's sprites (AnimationObjects_SetActiveTimerSteps).
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
#define GARET
Jerald.
#define MIA
Mary.
#define JENNA
Jasmine.
#define IVAN
Ivan.
@ TRIAL_ATTENDANT
const struct SceneEntrance * ColosseumEntrance_GetEntrances(void)
static void ColosseumEntrance_PositionPartyForBriefing(void)
Places the three companions behind Isaac for the officials' briefing.
static void Event_TalkToAzart(void)
Azart, the second-best, will not lose to someone who skipped the trials; then he goes back to pacing.
s32 gColosseumEntrance_ApproachFinalsGroupScript[]
@ NAVAMPA
@ FINALS_OFFICIAL
@ GALAHAD
@ SATRAGE
@ MORGAN
the highest-ranked
@ AZART
the second-best
u32 gColosseumEntranceExits[]
static void Event_DiscussLuckyGuessSeats(void)
Outside the gates: the Lucky Guess makes the battles better; on the finals day, a good spot costs too...
static void Event_AskIfReadyForFinals(void)
The official asks whether Isaac is ready for the finals.
struct SceneEvent gColosseumEntranceEvents2[]
static void Event_TalkToDekka(void)
Dekka psyches himself up; the first time, Navampa explains he will not answer (0x3c1).
s32 gColosseumEntrance_PulseScaleScript[]
static void Event_DiscussSeating(void)
Outside the gates: during the trials, a man asks whether the party hopes to get in to see Colosso; on...
struct SceneEntrance gColosseumEntranceEntrances3[]
static void ColosseumEntrance_InitializeContestants(void)
The warriors' child values and their waiting actions in the waiting room.
struct ScenePlacement gColosseumEntrancePlacementsOther[]
static void Event_TalkToGalahad(void)
Galahad, the third seed, jumps. "Waah! Don't frighten me!".
const struct ScenePlacement * ColosseumEntrance_GetPlacements(void)
Selects actors for the current area and stage of Colosso.
static void Event_DiscussLuckyGuessWinnings(void)
Outside the gates: a bettor put it all on a warrior no one picked; on the finals day a scalper,...
static void Event_FinalsBegin(void)
Stepping forward in the waiting room: asked whether he is ready, Isaac can still wait; if he is,...
static void Event_CrowdRecognizesIsaac(void)
Outside the gates on the finals day, the crowd recognizes Isaac as Babi's pick, and a guide takes the...
struct ScenePlacement gColosseumEntrancePlacements3[]
struct SceneEvent gColosseumEntranceEvents1[]
static void ColosseumEntrance_WalkToEastExit(void)
Isaac walks east alone to the next stage.
s32 gColosseumEntrance_RejoinPartyScript[]
static void ColosseumEntrance_ApplyArrivalState(void)
Each arrival in the halls has its own scene: the trials, the briefing before the finals,...
struct SceneEntrance gColosseumEntranceEntrances1[]
s32 ColosseumEntrance_Initialize(void)
Sets up the halls by the arrival, or the gates outside by Colosso's stage.
static void ColosseumEntrance_ShowMessageAndPause(s32 speaker)
s32 gColosseumEntrance_JoinFinalsFromSouthScript[]
static void Event_OfferLuckyGuess(void)
The Lucky Guess man explains the game; on the finals day he recognizes Isaac and refuses him,...
struct SceneEvent gColosseumEntranceEvents3[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance12[]
struct ScenePlacement gColosseumEntrancePlacements1[]
static void ColosseumEntrance_ExplainPartySupport(void)
Before the first match: only Isaac may enter the finals, so the officials seat his companions by the ...
static void ColosseumEntrance_ShowFailedTrial(void)
Arriving at entrance 7: a warrior strains at the trial, gives up and runs.
s32 gColosseumEntrance_GatherAtSpectatorPartyScript[]
struct SceneEvent gColosseumEntranceEvents1Entrance12[]
struct SceneEvent gColosseumEntranceEventsOther[]
s32 gColosseumEntrance_LeaveSpectatorAreaScript[]
struct SceneEntrance gColosseumEntranceEntrancesOther[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance66[]
const struct SceneEvent * ColosseumEntrance_GetEvents(void)
static void ColosseumEntrance_EscortToEastExit(void)
An official leads Isaac east to the next stage.
static void ColosseumEntrance_Turn(s32 actor, s32 facing)
static void Event_TalkToTrialAttendant(void)
The trial attendant: before both trials have been watched, the screen goes to the next warrior's tria...
static void Event_RearmFinalsStart(void)
Stepping back from the line arms the question again (scene flags 0x234 and 0x235).
static void Event_TalkToNavampa(void)
Navampa of Gondowan, the sixth-ranked, introduces himself.
static void ColosseumEntrance_CelebrateAdvancement(void)
After the first match: the officials congratulate Isaac and lead him on.
static void ColosseumEntrance_CelebrateBothWins(void)
After the second match: one more win and Isaac is the champion.
struct ScenePlacement gColosseumEntrancePlacements1Entrance7[]
struct ScenePlacement gColosseumEntrancePlacements3FinalsDay[]
static void ColosseumEntrance_FaceDirection(s32 actor, s32 facing)
Turns an actor to the given facing over ten frames.
struct ScenePlacement gColosseumEntrancePlacements1Entrance8[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance5[]
static void ColosseumEntrance_AnnounceFinals(void)
Arriving in the waiting room: the official tells the warriors to prepare.
static void ColosseumEntrance_WalkToWestExit(void)
Isaac walks west alone to the next stage.
static void Event_TalkToBuford(void)
Buford, the seventh seed: anyone could win today.
static void Event_TalkToSatrage(void)
Satrage, the fourth-ranked, opens his eyes and names himself.
static void ColosseumEntrance_UpdateEntranceCells(void)
Outside: once Colosso is over, the tiles by the gates change; before that, actor 16 takes child value...
s32 gColosseumEntrance_EnterFinalsScript[]
const struct SceneRegion * ColosseumEntrance_GetRegions(void)
s32 gColosseumEntrance_GatherAtSpectatorLeaderScript[]
static void ColosseumEntrance_EscortToWestExit(void)
An official leads Isaac west to the next stage.
s32 gColosseumEntrance_JoinFinalsFromEastScript[]
static void ColosseumEntrance_ExplainTrial(void)
Back from a trial: the attendant says the warrior failed, or after the second trial that he cleared i...
static void ColosseumEntrance_ShowClearedTrial(void)
Arriving at entrance 70: a warrior heaves the trial object up in jolts and drops it,...
struct ScenePlacement gColosseumEntrancePlacements3AfterColosso[]
const u32 * ColosseumEntrance_GetExits(void)
Returns the shared colosseum exits.
void Engine_ActorSetSpriteFlags(struct FieldActor *, s32)
The engine calls the debug menus import, and their palette swatch tiles.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static s32 Event_OpenMessage(s32 speaker, s32 flags)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
#define SPEAKER_WINDOW_ABOVE
Definition field_event.h:56
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_SetBuiltinAction(s32 actor, s32 action)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
#define GameFlag_IsSet
void Engine_CameraSetSpeed(s32 speed, s32 acceleration)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_CameraMoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
static void Actor_MoveToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Event_SkipMessages(s32 count)
#define SPEAKER_WINDOW_BELOW
Definition field_event.h:57
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
#define GameFlag_Set
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_MapRenderWaitForValues(void)
void Engine_GameFlagClear(s32 flag)
void Engine_CameraWaitForMove(void)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_CameraFollowActor(s32 actor, s32 keep_position)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
static void Event_ShowMessage(s32 speaker, s32 flags)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
void Engine_ActorSetChildValue(s32 actor, s32 value)
static void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)
Sets shake amplitudes in fixed-point pixels and the per-frame decay factor.
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
struct FieldActor * Engine_EventGetViewCenter(void)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ColorBufferInterpolate(s32 frames)
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_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
void Engine_ColorBufferApplySource(s32 value, s32 mode)
Field objects and actors, and the scene transition styles.
@ TRANSITION_WINDOW
Definition field_obj.h:17
@ TRANSITION_BACKDROP_FADE
Definition field_obj.h:16
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
Definition field_obj.h:145
#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
@ EVENT_TOUCH
@ 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_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 PLACEMENT_SHARE_PREVIOUS_SPRITE
@ 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_UNNAMED
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Definition fixed_math.h:10
Game flags, named where their meaning is shown.
#define FLAG_SCENE_TEMP_35
Definition flags.h:766
#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_SCENE_TEMP_34
Definition flags.h:765
#define FLAG_COLOSSO_FIRST_MATCH_WON
Definition flags.h:221
#define FLAG_COLOSSO_FAILED_TRIAL_SEEN
a warrior failed his trial
Definition flags.h:219
#define FLAG_COLOSSO_CLEARED_TRIAL_SEEN
a warrior cleared his trial
Definition flags.h:220
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
Definition flags.h:55
#define FLAG_KEEP_PARTY_POSITION
Definition flags.h:93
#define FLAG_COLOSSO_SECOND_MATCH_WON
Definition flags.h:222
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.
The main-image routines scene overlays import.
void InventorySnapshot_Take(void)
Small statement macros both games use for positions, velocities and bounds.
#define SET_VELOCITY(p, vx, vy, vz)
Definition macros.h:18
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_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
#define SC_END
Return to the main script.
Definition objcmd.h:32
@ SW_ACCEL
Definition objcmd.h:68
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SPEED
Definition objcmd.h:67
@ SW_FACING
Definition objcmd.h:57
@ SW_SCALE_X
Definition objcmd.h:62
s32 Party_RemoveActiveOwner(s32 owner)
Takes character owner out of the party: clears its game flag and closes the gap it leaves in gGameSta...
Definition party.c:154
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
Scene numbers, named after their places.
char SceneId_ColosseumEntrance3
char SceneId_ColosseumEntrance1
char SceneId_ColosseumEntrance2
Song and sound effect ids, indices into gSound_SongTable.
#define MUS_092
Definition songs.h:90
#define SE_107
Definition songs.h:100
#define SE_247
Definition songs.h:242
#define SE_289
Definition songs.h:282
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_EventBegin(void)
void Engine_ActorShowEmote()
void Engine_TaskWait()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
#define NULL
Definition bilibin.h:6
s32 startTransition
SCENE_TRANSITION(style, variant).
Definition event_work.h:43
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
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
Definition field_obj.h:109
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
Definition field_obj.h:59
u8 steeringFlags
ActorSteeringFlag bits.
Definition field_obj.h:92
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
union FieldCoordinate y
16.16 fixed-point pixels
Definition field_obj.h:36
u16 facing
1/65536 turns
Definition field_obj.h:34
s32 targetY
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
Definition field_obj.h:60
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
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
Definition field_obj.h:116
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
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
s32 fixed
16.16 fixed-point pixels