Alchemy
Loading...
Searching...
No Matches

tolbi.c

Go to the documentation of this file.
1/// @file
2/// Tolbi, the town of the Colosso festival. The town has three moods, chosen
3/// by story flags: the festival during the trials, finals day, and the quiet
4/// after Colosso has ended. Each mood has its own event table; the actors and
5/// their scripts are shared.
6
7#include "unit/scene/tolbi.h"
10#include "unit/window/window.h"
13#include "tolbi.h"
14#include "iwram_call.h"
15#include "call.h"
16#include "field_event.h"
17#include "field_service.h"
18#include "text/msg_ids.h"
19#include "types.h"
20#include "ability_ids.h"
21#include "edition.h"
22#include "field_scene.h"
23#include "item_ids.h"
24#include "objcmd.h"
25#include "songs.h"
26
27#if TBS_PATCH_1
28#define TOLBI_JAR_SEARCH_KIND \
29 (SEARCH(SEARCH_JAR) | EVENT_TOUCH_FACING | FACING_NORTH)
30#else
31#define TOLBI_JAR_SEARCH_KIND SEARCH(SEARCH_JAR)
32#endif
33
34static void Tolbi_FreezePuddle(void);
35
36/// Talking to Ember, the Mars Djinni hiding in town, makes it join the party.
37/// Its index among the Mars Djinn is 4, the fifth Mars name in the game text.
38static void Tolbi_JoinEmber(void) {
40}
41
43
44/// Stops a running child when the target is close by and ahead of it, or
45/// always when force is set; otherwise starts the child running again.
46/// The child stops when the target is within one facing step of where it
47/// looks; for the party leader, within two steps either side.
48/// Returns 1 when the child stopped.
50 struct FieldActor *target, s32 range,
51 s32 force) {
52 s32 stopped = 0;
53 const u8 *targetPos = (const u8 *)target + offsetof(struct FieldActor, x);
54 const u8 *kidPos = (const u8 *)kid + offsetof(struct FieldActor, x);
55
56 if (FixedPoint_Distance(targetPos, kidPos) < range || force != 0) {
57 // The heading to the target, and the eight-way directions around it.
58 u32 heading = (u16)ArcTan2(target->z.fixed - kid->z.fixed,
59 *(const s32 *)targetPos - *(const s32 *)kidPos);
60 u32 farLeft = (heading - 2 * FACING_STEP) & 0xf000;
61 u32 farRight = (heading + 2 * FACING_STEP) & 0xf000;
62 u32 left = (heading - FACING_STEP) & 0xf000;
63 u32 right = (heading + FACING_STEP) & 0xf000;
64 u32 ahead = heading & 0xf000;
65 u32 facing = kid->facing & 0xf000;
66
67 if (ahead == facing || right == facing || left == facing || force != 0) {
68 kid->paused = 1;
70 stopped = 1;
71 }
72 if (target == Object_GetById(ACTOR_PARTY_LEADER) &&
73 (farRight == facing || farLeft == facing)) {
74 kid->paused = 1;
76 stopped = 1;
77 }
78 } else {
79 kid->paused = 0;
81 }
82 return stopped;
83}
84
85// The update of the two children running around the plaza. Each stops when
86// it runs up behind the other, and otherwise when the party leader is in its
87// way. While a window is up (the range widens to 26 pixels) the child the
88// party is talking to stops whatever the direction.
89// UB: calling this s32 function through a void update hook is incompatible.
90// Plain void removes its zero result; its aligned extent stays 152 bytes.
91#ifdef UBFIX
92static void Tolbi_UpdateKid(union FieldObject *fieldObject) {
93#else
94static s32 Tolbi_UpdateKid(union FieldObject *fieldObject) {
95#endif
96 struct FieldActor *self = &fieldObject->actor;
97 u8 **workAreas = (u8 **)gWindowWork;
98 struct TolbiUiWork *ui = (struct TolbiUiWork *)workAreas[0];
99 u8 *work12 = workAreas[12];
100 u16 *kidFlags = (u16 *)&self->timer;
101 s32 force = 0;
102 s32 range = 18;
103 struct FieldActor *other;
104 struct FieldActor *leader;
105
106 if ((*kidFlags & KID_CHASES_YOUNGER) != 0) {
108 } else {
110 }
111 if (Tolbi_KidStopForTarget(self, other, 32, 0) != 0) {
112#ifdef UBFIX
113 return;
114#else
115 return 0;
116#endif
117 }
118
120
121 // The halfword at 376 in work area 12 is another window state.
122 if (*(s16 *)(work12 + 376) != 0 || ui->renderMode != 0) {
123 range = 26;
124 if ((*kidFlags & KID_TALKING) != 0) {
125 force = 1;
126 }
127 }
128
129 Tolbi_KidStopForTarget(self, leader, range, force);
130#ifdef UBFIX
131 return;
132#else
133 return 0;
134#endif
135}
136
137const struct SceneEntrance *Tolbi_GetEntrances(void) { return gTolbiEntrances; }
138
139const struct SceneRegion *Tolbi_GetRegions(void) { return 0; }
140
141const u32 *Tolbi_GetExits(void) { return gTolbiExits; }
142
144 return gTolbiPlacements;
145}
146
147/// Growth on the sprout: the grown plant no longer blocks the party, and its
148/// map cell becomes climbable.
149static void Tolbi_GrowSprout(void) {
150 struct FieldActor *sprout;
151
153 if ((s32)sprout != 0) {
154 sprout->collisionFlags = 0;
155 }
158 Field_SetMapCellCollision(0, PIXELS(544), PIXELS(288), 253);
160}
161
162/// Reveal uncovers the hidden chest: its map cell is drawn in and the chest
163/// moves into place.
164static void Tolbi_RevealHiddenChest(void) {
165 Map_CopyCellAttributes(3, 32, 1, 1, 3, 26);
167}
168
169/// When Reveal wears off, the chest's cell is covered again and the chest
170/// moves out of sight.
171static void Tolbi_HideRevealedChest(void) {
172 Map_CopyCellAttributes(2, 25, 1, 1, 3, 26);
174}
175
176/// The first sign at Tolbi Spring: face away and toss a coin in.
177static void Tolbi_ReadSpringSign(void) {
178 Engine_EventSetMessage(MsgTolbiFaceAwayTolbi);
180}
181
182/// The second sign at Tolbi Spring: a Lucky Medal wins better prizes.
183static void Tolbi_ReadLuckyMedalSign(void) {
184 Engine_EventSetMessage(MsgTolbiTossLuckyMedal);
186}
187
188/// Talking to the older brother, or reading his mind. He stops running while
189/// he speaks, then turns back the way he was going.
190static void Tolbi_TalkToOlderBrother(void) {
191 struct EventWork *work = gEventWork;
192 struct FieldActor *kid;
193 s16 facing;
194 s32 msg;
195
197 facing = kid->facing;
199 kid->timer |= KID_TALKING;
200 if (work->psynergyRequest == 0) {
202 msg = MsgTolbiYayEasyRun;
203 } else if (Engine_GameFlagIsSet(FLAG_BABI_SAVED) != 0) {
204 msg = MsgTolbiHoorayFinalsSeven;
205 } else {
206 msg = MsgTolbiWheeFestivalColosso;
207 }
208 } else {
210 msg = MsgTolbiMainStreetTolbi;
211 } else if (Engine_GameFlagIsSet(FLAG_BABI_SAVED) != 0) {
212 msg = MsgTolbiWinBigUsed;
213 } else {
214 msg = MsgTolbiOldestShouldntShare;
215 }
216 }
221 kid->facing = facing;
225}
226
227/// Talking to the younger sibling, or reading the child's mind, as above.
228static void Tolbi_TalkToYoungerSibling(void) {
229 struct EventWork *work = gEventWork;
230 struct FieldActor *kid;
231 s16 facing;
232 s32 msg;
233
235 facing = kid->facing;
237 kid->timer |= KID_TALKING;
238 if (work->psynergyRequest == 0) {
240 msg = MsgTolbiHaHaHa;
241 } else if (Engine_GameFlagIsSet(FLAG_BABI_SAVED) != 0) {
242 msg = MsgTolbiWaahBigBrother;
243 } else {
244 msg = MsgTolbiWaahSaidMoney;
245 }
246 } else {
248 msg = MsgTolbiBrotherMeanDuring;
249 } else if (Engine_GameFlagIsSet(FLAG_BABI_SAVED) != 0) {
250 msg = MsgTolbiMamaWhyListen;
251 } else {
252 msg = MsgTolbiMamaToldShare;
253 }
254 }
259 kid->facing = facing;
263}
264
265/// Picks the event table for Tolbi's current mood.
266const struct SceneEvent *Tolbi_SelectEvents(void) {
269 }
272 }
274}
275
276/// A townsperson asks whether someone can live to be more than 100 years old;
277/// either way the talk turns to Babi, who is older still.
280 Engine_EventSetMessage(MsgTolbiSomeoneLiveMore);
283}
284
285/// The father asks whether children really do love souvenirs, and owns up to
286/// loving them himself.
287static void Tolbi_TalkToFather(void) {
289 Engine_EventSetMessage(MsgTolbiChildrenLoveSouvenirs);
292}
293
294/// The mother turns to her crying child, then back to promise better sweets
295/// later on. "Be patient, little guy."
296static void Tolbi_TalkToMother(void) {
298 Engine_EventSetMessage(MsgTolbiPatientLittleGuy);
304}
305
306/// The crying child turns, stamps twice and wails for sweets.
307static void Tolbi_TalkToCryingChild(void) {
311 Engine_EventSetMessage(MsgTolbiWaahBuySweets);
314}
315
316/// During the festival the scalper sleeps under the archway: the inns are
317/// full.
320 Engine_EventSetMessage(MsgTolbiInnsFullStaying);
323}
324
325/// After Colosso, actor 12 asks whether the party was in the finals. The
326/// question is anchored to the father, who has left town by then.
329 Engine_EventSetMessage(MsgTolbiFinalsWerent);
332}
333
334/// After Colosso, the snack vendor gives the party her leftover corn, once.
335static void Tolbi_TalkToSnackVendor(void) {
339 Engine_EventSetMessage(MsgTolbiLeftovers);
345 } else {
346 Engine_EventSetMessage(MsgTolbiFestivalLongerUsual);
348 }
350}
351
352/// Walking into one of the town's doors: the door opens, the leader steps in
353/// (except at the seventh door) and the scene changes to the door's exit.
354static void Tolbi_EnterDoor(void) {
355 struct EventWork *work = gEventWork;
356 u32 actorId;
357 s32 door;
358
360 for (actorId = ACTOR_FIRST_PLACED; actorId <= 65; actorId++) {
361 struct FieldActor *actor = Object_GetById(actorId);
362 if (actor != NULL) {
363 actor->motionFlags = 0;
364 }
365 }
366 door = work->touchedTrigger - 1;
368 Map_AnimateCells(gTolbiDoors[door].steps, gTolbiDoors[door].x,
369 gTolbiDoors[door].y);
370 Actor_SetSpeed(ACTOR_PARTY_LEADER, 0x8000, 0x4000);
373 if (door != 6) {
376 }
377 Engine_EventRequestExit(work->touchedTrigger);
381}
382
383/// The update of actor 14: gives it the leader's sprite priority every frame,
384/// for both of its sprite parts.
385static void Tolbi_CopyLeaderPriority(union FieldObject *object) {
386 s32 priority;
387
388 if (object != NULL) {
389 priority = Object_GetById(ACTOR_PARTY_LEADER)->sprite->image.priority;
390 object->actor.priorityFlags = 0;
391 object->actor.sprite->image.priority = priority;
392 object->actor.sprite->shadow.priority = priority;
393 }
394}
395
396/// Sets up the scene on entry: the running children, actor 14's update, and
397/// everything the flags have already changed.
399 struct FieldActor *actor;
400 void (*kidUpdate)(union FieldObject *);
401 s32 clearFlags;
402
404
405 // The two children run their loops around the plaza.
409#ifdef UBFIX
410 kidUpdate = Tolbi_UpdateKid;
411#else
412 kidUpdate = (void (*)(union FieldObject *))Tolbi_UpdateKid;
413#endif
415 actor->update = kidUpdate;
416 clearFlags = 0;
420 actor->timer = clearFlags;
421 actor->update = kidUpdate;
424
425 // What the party has already done here.
428 }
429 // The puddle is frozen.
432 }
433 // The sprout has grown.
437 }
438
439 // After Colosso the crowd has gone home: actors 20 to 27 (but 23) are
440 // moved off the map. On finals day the scalper waits by the gate.
442 Actor_SetPosition(20, PIXELS(520), PIXELS(560));
443 Actor_SetPosition(21, PIXELS(520), PIXELS(560));
444 Actor_SetPosition(22, PIXELS(520), PIXELS(560));
449 } else {
454 }
455 }
456 return 0;
457}
458
459/// The gambler at the spring's gate asks whether the party wants to test its
460/// luck. On yes he steps aside for good and the way to Tolbi Spring opens.
461static void Tolbi_TalkToGambler(void) {
467 Engine_EventSetMessage(MsgTolbiWantTestLuck);
469 if (Engine_EventChooseYesNo(0, 0) == 0) {
470 // Yes: "I'll give you the chance to go first."
473 Actor_SetSpeed(TOLBI_GAMBLER, 0x10000, 0x8000);
478 } else {
480 }
482}
483
484/// The gate to Tolbi Spring, once the gambler has stepped aside.
485static void Tolbi_EnterSpring(void) {
488}
489
490/// Leaves by the exit numbered as the trigger the party walked into.
491static void Tolbi_RequestTouchedExit(void) {
492 s16 *trigger = &gEventWork->touchedTrigger;
493
494 Engine_EventRequestExit(*trigger);
495}
496
497/// During the festival, two soldiers searching for the missing Babi stop the
498/// party and show his picture. They leave either way the party answers.
500 s32 firstMsg;
501
503 Camera_MoveTo(-1, -1, -1, 0);
504 Actor_SetSpeed(TOLBI_SOLDIER_A, 0x10000, 0x8000);
505 Engine_ActorSetSpeed(TOLBI_SOLDIER_B, 0x10000, 0x8000);
506 firstMsg = MsgTolbiSeenAnyoneWho;
507 Engine_EventSetMessage(firstMsg);
508
509 // The soldiers come up to the party; the poster waits off to the side.
531
532 // "Have you seen anyone who looks like this?", under a "Missing Person"
533 // window showing the poster.
536 UiWindow_CreateWithSideObject(52, 0, 12, 7);
537 UiText_OpenMessageWindow((firstMsg + 3), 11, 12, 2);
539 if (Engine_EventChooseYesNo(0, 0) == 0) {
540 // Yes: "Babi must be nearby!!!" They nod and run east.
559 Actor_SetSpeed(TOLBI_SOLDIER_A, 0x1cccc, 0xe666);
560 Actor_SetSpeed(TOLBI_SOLDIER_B, 0x1cccc, 0xe666);
561 Actor_WalkTo(TOLBI_SOLDIER_A, 232, 248);
563 Actor_WalkTo(TOLBI_SOLDIER_B, 232, 248);
567 } else {
568 // No: "He doesn't seem to be here. Let's look over there." They shake
569 // their heads and go back north.
580 gEventWork->message += 1;
589 Actor_SetSpeed(TOLBI_SOLDIER_A, 0x19999, 0xcccc);
590 Actor_SetSpeed(TOLBI_SOLDIER_B, 0x19999, 0xcccc);
593 }
599}
600
601/// Frost on the puddle: the frozen pillar is drawn underfoot and stops
602/// following the terrain, and its map cell becomes solid.
603static void Tolbi_FreezePuddle(void) {
604 struct FieldActor *puddle = Object_GetById(TOLBI_PUDDLE);
605 if (puddle != 0) {
608 puddle->motionFlags = 0;
609 }
611 {
612 Map_CopyCellAttributes(36, 16, 1, 1, 34, 16);
613 }
615}
616
617/// The action script of a mirrored actor: flips its sprite and passes 7 on.
619 SC_SET(SW_SCALE_X, -0x10000),
620 SC_ARG(7),
621 SC_END,
622};
623
624/// The older brother runs a loop of eight points around the plaza.
626 SC_ARG(2),
627 SC_SET(SW_SPEED, 0xcccc),
628 SC_SET(SW_ACCEL, 0x3333),
629 SC_LABEL(1),
630 SC_MOVE(PIXELS(352), 0, PIXELS(352)),
631 SC_SYNC,
632 SC_MOVE(PIXELS(368), 0, PIXELS(352)),
633 SC_SYNC,
634 SC_MOVE(PIXELS(376), 0, PIXELS(344)),
635 SC_SYNC,
636 SC_MOVE(PIXELS(376), 0, PIXELS(328)),
637 SC_SYNC,
638 SC_MOVE(PIXELS(368), 0, PIXELS(320)),
639 SC_SYNC,
640 SC_MOVE(PIXELS(352), 0, PIXELS(320)),
641 SC_SYNC,
642 SC_MOVE(PIXELS(344), 0, PIXELS(328)),
643 SC_SYNC,
644 SC_MOVE(PIXELS(344), 0, PIXELS(344)),
645 SC_SYNC,
647};
648
649/// The younger sibling runs the same loop half a lap ahead.
651 SC_ARG(2),
652 SC_SET(SW_SPEED, 0xcccc),
653 SC_SET(SW_ACCEL, 0x3333),
654 SC_LABEL(1),
655 SC_MOVE(PIXELS(368), 0, PIXELS(320)),
656 SC_SYNC,
657 SC_MOVE(PIXELS(352), 0, PIXELS(320)),
658 SC_SYNC,
659 SC_MOVE(PIXELS(344), 0, PIXELS(328)),
660 SC_SYNC,
661 SC_MOVE(PIXELS(344), 0, PIXELS(344)),
662 SC_SYNC,
663 SC_MOVE(PIXELS(352), 0, PIXELS(352)),
664 SC_SYNC,
665 SC_MOVE(PIXELS(368), 0, PIXELS(352)),
666 SC_SYNC,
667 SC_MOVE(PIXELS(376), 0, PIXELS(344)),
668 SC_SYNC,
669 SC_MOVE(PIXELS(376), 0, PIXELS(328)),
670 SC_SYNC,
672};
673
675 {0, CONDITION_ALWAYS, 296, 0, 232, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
676 {1, CONDITION_ALWAYS, 304, 0, 448, FACING_NORTH, 0, -1, -1, -1, -1, 0},
677 {2, CONDITION_ALWAYS, 168, 0, 200, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
678 {3, CONDITION_ALWAYS, 408, 0, 160, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
679 {4, CONDITION_ALWAYS, 536, 0, 232, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
680 {5, CONDITION_ALWAYS, 536, 0, 200, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
681 {6, CONDITION_ALWAYS, 456, 0, 376, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
682 {7, CONDITION_ALWAYS, 368, 0, 416, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
683 {8, CONDITION_ALWAYS, 200, 0, 456, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
684 {9, CONDITION_ALWAYS, 200, 0, 424, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
685 {10, CONDITION_ALWAYS, 88, 0, 392, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
686 {11, CONDITION_ALWAYS, 64, 0, 112, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
687 {12, CONDITION_ALWAYS, 304, 0, 64, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
688 {13, CONDITION_ALWAYS, 424, 0, 224, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
689 {20, CONDITION_ALWAYS, 304, 0, 304, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
690 {30, CONDITION_ALWAYS, 568, 0, 296, FACING_NORTH, 0, -1, -1, -1, -1, 0},
692};
693
695 SCENE_EXITS(135), SCENE_EXIT(1, 136, 4), SCENE_EXIT(2, 136, 2),
696 SCENE_EXIT(3, 136, 9), SCENE_EXIT(4, 137, 11), SCENE_EXIT(5, 136, 1),
697 SCENE_EXIT(6, 136, 3), SCENE_EXIT(7, 136, 6), SCENE_EXIT(8, 136, 5),
698 SCENE_EXIT(9, 136, 8), SCENE_EXIT(10, 139, 1), SCENE_EXIT(11, 142, 1),
699 SCENE_EXIT(12, 2, 23), SCENE_EXIT(13, 137, 10), SCENE_EXIT(30, 189, 1),
701};
702
703// clang-format off
722 PIXELS(344), 0, PIXELS(328), FACING_EAST, TALK_KEEP_FACING, 0 },
724 PIXELS(376), 0, PIXELS(328), FACING_WEST, TALK_KEEP_FACING, 0 },
751 // Ember, until its Djinni flag is set: twenty flags to an element.
752 { 0x5c, FLAG_DJINNI_0 + ELEMENT_MARS * 20 + 4, ACTOR_STAND,
753 PIXELS(584), 0, PIXELS(136), FACING_SOUTH, TALK_FACE_PARTY, 0 },
756 { SCENE_TABLE_END },
757};
758
759/// During the festival, before the finals.
773 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
778 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgTolbiTolbisAlwaysReallyBustlingDuringColosso) },
779 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgTolbiColossoIsHeldInTheColosseum) },
780 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgTolbiTryoutsStartedAtTheColosseumToday) },
781 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgTolbiColossoShouldHaveStartedTodayWhat) },
782 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgTolbiBabiWasAlreadyPrettyOldBack) },
786 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgTolbiGetYourColossoSouvenirsTheyMake) },
787 { EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgTolbiGetYourSnacksAndDrinksBefore) },
788 { EVENT_TALK, 20, CONDITION_ALWAYS, MSGNO(MsgTolbiIveDecidedNotToFightAt) },
789 { EVENT_TALK, 21, CONDITION_ALWAYS, MSGNO(MsgTolbiWowTolbisFestivalIsHumongousJust) },
790 { EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiRatsWeOversleptAndNowThe) },
796 { EVENT_TALK, TOLBI_GAMBLER, CONDITION_ALWAYS, MSGNO(MsgTolbiAhIGuessIJustDont) },
797 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgTolbiTouristsArentTheOnlyOnesWho) },
798 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgTolbiTheTrialsAreStartingAtThe) },
799 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgTolbiTheTrialsAreOkayButThe) },
800 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgTolbiItsNotLikeThereHaveBeen) },
801 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgTolbiEveryYearIGetOlderAnd) },
802 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgTolbiWhatIfBabiIsActuallyA) },
805 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgTolbiWeHaveToSellAllOf) },
806 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgTolbiTheyreSellingTheseAtTheColosseum) },
807 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 20, CONDITION_ALWAYS, MSGNO(MsgTolbiISawThePeopleWhoAre) },
808 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgTolbiTolbiIsNotLikeXianIt) },
809 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, CONDITION_ALWAYS, MSGNO(MsgTolbiICantSayAnythingCauseIt) },
810 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_FATHER, CONDITION_ALWAYS, MSGNO(MsgTolbiTheStuffTheyreSellingAtThe) },
811 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_MOTHER, CONDITION_ALWAYS, MSGNO(MsgTolbiWhyDoKidsWantSuchAwful) },
812 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_CRYING_CHILD, CONDITION_ALWAYS, MSGNO(MsgTolbiThoseSweetsSmellGreatImNot) },
813 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SCALPER, CONDITION_ALWAYS, MSGNO(MsgTolbiIveBeenGuardingOurSpotBut) },
814 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 28, CONDITION_ALWAYS, MSGNO(MsgTolbiIKeepLosingCoinsButI) },
819// The international editions find the jar only when the party faces north.
826};
827
828/// On finals day.
842 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
846 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgTolbiColossoWillReachItsApexAny) },
847 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgTolbiAreYouPlanningToWatchThe) },
848 { EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgTolbiMyFamilySavedMeASeat) },
849 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgTolbiIThoughtSomethingHappenedToBabi) },
850 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgTolbiTheColosseumWasSoFullThat) },
851 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgTolbiNobodyElseHasNoticedButThis) },
854 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgTolbiHowAboutSomeColossoSouvenirsThis) },
855 { EVENT_TALK, 19, CONDITION_ALWAYS, MSGNO(MsgTolbiTheFinalsAreSoLongIts) },
856 { EVENT_TALK, 20, CONDITION_ALWAYS, MSGNO(MsgTolbiTheTrialsWereSoRivetingThe) },
857 { EVENT_TALK, 21, CONDITION_ALWAYS, MSGNO(MsgTolbiIHaveSeatsToTheFinals) },
858 { EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiIOversleptAgainSoICant) },
862 { EVENT_TALK, TOLBI_SCALPER, CONDITION_ALWAYS, MSGNO(MsgTolbiTheFinalsStartTodayIWonder) },
864 { EVENT_TALK, TOLBI_GAMBLER, CONDITION_ALWAYS, MSGNO(MsgTolbiAhIGuessIJustDont) },
865 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgTolbiIveGotToGetToThe) },
866 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgTolbiABattleToTheDeathWith) },
867 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgTolbiTheFinalsStartOnBabisSignal) },
868 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgTolbiSoWhyWereTheSoldiersAll) },
869 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgTolbiICouldStillBuySeatsFrom) },
870 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgTolbiNoMatterHowIAddIt) },
873 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgTolbiWeCantSellAnythingOnceThe) },
874 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgTolbiThisIsTheFinalPushAnything) },
875 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 20, CONDITION_ALWAYS, MSGNO(MsgTolbiFightingInColossoRequiresALot) },
876 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 21, CONDITION_ALWAYS, MSGNO(MsgTolbiTheyreSellingFinalsSeatsRightAt) },
877 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 22, CONDITION_ALWAYS, MSGNO(MsgTolbiItsSupposedToBeFreeHaving) },
878 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_FATHER, CONDITION_ALWAYS, MSGNO(MsgTolbiOnceColossoEndsOurLivesCan) },
879 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_MOTHER, CONDITION_ALWAYS, MSGNO(MsgTolbiFestivalsAreSoExpensiveMyWallets) },
880 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_CRYING_CHILD, CONDITION_ALWAYS, MSGNO(MsgTolbiMomYouSaidYouWereAll) },
881 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SCALPER, CONDITION_ALWAYS, MSGNO(MsgTolbiTodayIsABigDayFor) },
882 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 28, CONDITION_ALWAYS, MSGNO(MsgTolbiIKeepLosingCoinsButI) },
893};
894
895/// After Colosso has ended.
909 { EVENT_EXIT, 12, CONDITION_ALWAYS, 12 },
913 { EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgTolbiWellThisYearsColossoHasEnded) },
914 { EVENT_TALK, 11, CONDITION_ALWAYS, MSGNO(MsgTolbiItsBackToOurNormalQuiet) },
916 { EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgTolbiWithAllThoseRevelersGoneThe) },
917 { EVENT_TALK, 14, CONDITION_ALWAYS, MSGNO(MsgTolbiIHadNoLuckInThe) },
918 { EVENT_TALK, 15, CONDITION_ALWAYS, MSGNO(MsgTolbiItsSoQuietTheHustleAnd) },
921 { EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgTolbiIllBeBackToDoBusiness) },
924 { EVENT_TALK, TOLBI_GAMBLER, CONDITION_ALWAYS, MSGNO(MsgTolbiAhIGuessIJustDont) },
925 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgTolbiTheSpectatorsHaveAllLeftSo) },
926 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgTolbiThinkHowFunItWouldBe) },
927 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgTolbiAllTheWarriorsWhoGainFame) },
928 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgTolbiComeToThinkOfItNo) },
929 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 14, CONDITION_ALWAYS, MSGNO(MsgTolbiHmmSinceColossoEndedSoDramatically) },
930 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 15, CONDITION_ALWAYS, MSGNO(MsgTolbiTheCalmAfterTheStormIs) },
933 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 18, CONDITION_ALWAYS, MSGNO(MsgTolbiEveryYearITryToSell) },
934 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 19, CONDITION_ALWAYS, MSGNO(MsgTolbiHowCanWeGetHomeIf) },
935 { PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 28, CONDITION_ALWAYS, MSGNO(MsgTolbiIKeepLosingCoinsButI) },
946};
947// clang-format on
948
949/// How a door opens: two frames of cells copied over the closed door.
951 MAP_CELL_STEP(39, 32, 1, 2, 6),
952 MAP_CELL_STEP(40, 32, 1, 2, 6),
954};
955
956/// The doors, in the order of their triggers 1 to 9, by map cell.
958 {gTolbiDoorOpening, 48, 6}, {gTolbiDoorOpening, 63, 4},
959 {gTolbiDoorOpening, 71, 8}, {gTolbiDoorOpening, 71, 4},
960 {gTolbiDoorOpening, 66, 21}, {gTolbiDoorOpening, 61, 24},
961 {gTolbiDoorOpening, 50, 26}, {gTolbiDoorOpening, 50, 22},
962 {gTolbiDoorOpening, 43, 20},
963};
Ability numbers, named from the English release.
@ ABILITY_MIND_READ
Definition ability_ids.h:16
@ ABILITY_REVEAL
Definition ability_ids.h:19
@ ABILITY_FROST
Definition ability_ids.h:11
@ ABILITY_GROWTH
Definition ability_ids.h:10
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
@ ELEMENT_MARS
Definition battle_unit.h:38
Calls through a function pointer, by argument count.
void Engine_ActorSetSpriteFlags(struct FieldActor *, s32)
void Djinn_JoinParty(s32 slot, s32 element, s32 djinn)
A Djinni joins the party: djinn (0 to 19) of element goes to the member with the fewest Djinn,...
Definition djinni.c:124
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
@ 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)
void Object_SetMode(struct FieldActor *object, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
#define GameFlag_IsSet
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
void Engine_ItemShowFound(s32 item, s32 height)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
s32 Engine_EventAskYesNo(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_ActorWaitForMove(s32 actor)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
void Engine_ActorSetChildValue(s32 actor, s32 value)
#define MAP_CELL_STEPS_END
Definition field_event.h:61
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
static void MapObject_SetPosition(s32 object, s32 fixed_x, s32 fixed_z)
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_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
@ TRANSITION_BACKDROP_FADE
Definition field_obj.h:16
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
Definition field_obj.h:155
#define SCENE_TRANSITION(style, variant)
Definition field_obj.h:20
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EVENTS_END
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
@ FACING_STEP
Definition field_scene.h:36
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define PSYNERGY_IN_AREA(ability, phase)
#define IF_FLAG_SET(flag)
Definition field_scene.h:48
#define EVENT_TOUCH_FACING
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
@ ACTOR_FIRST_PLACED
@ ACTOR_PARTY_LEADER
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
@ ACTOR_WANDER
@ ACTOR_STAND
#define SEARCH(target)
#define SCENE_EXITS_END
Definition field_scene.h:77
#define TOUCH_WALKING_INTO(facing)
@ FACING_EAST
Definition field_scene.h:26
@ FACING_SOUTHEAST
Definition field_scene.h:27
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_NORTHWEST
Definition field_scene.h:31
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)
@ SEARCH_JAR
@ SEARCH_UNNAMED
@ SEARCH_CHEST
@ SEARCH_BARREL
#define FIND_COINS(coins)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void Field_SetMapCellCollision(s32 a0, s32 a1, s32 a2, s32 a3)
#define FLAG_TOLBI_SEARCHERS_MET
the soldiers asked about Babi
Definition flags.h:387
#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_DJINNI_0
the flag of Djinni 0, set once it is caught
Definition flags.h:15
#define FLAG_TOLBI_CORN_GIVEN
the snack vendor gave away her corn
Definition flags.h:386
#define FLAG_TOLBI_SPRING_OPENED
the gambler let the party go first
Definition flags.h:388
#define FLAG_SCENE_TEMP_00
Definition flags.h:713
#define FLAG_SCENE_TEMP_01
Definition flags.h:714
struct UiWindow * UiText_OpenMessageWindow(s32 message, s32 x, s32 y, u32 packed)
Opens a window sized to a message near tile (x, y) and starts typing the message into it.
Definition frames.c:396
Item numbers, named from the English release.
@ ITEM_POWER_BREAD
Definition item_ids.h:50
@ ITEM_CORN
Definition item_ids.h:74
@ ITEM_LUCKY_MEDAL
Definition item_ids.h:70
The IWRAM call layer: the routines the game keeps resident in IWRAM, each at its fixed address,...
s32 ArcTan2(s32 x, s32 y)
Returns the angle of the vector (x, y), in 1/65536 turns, measured from the y axis: 0 along +y,...
Definition math.c:36
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_LABEL(n)
Branch destination.
Definition objcmd.h:11
#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_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_FOREVER
Definition objcmd.h:14
#define SC_TO(n)
Definition objcmd.h:12
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
#define SC_END
Return to the main script.
Definition objcmd.h:32
@ SW_ACCEL
Definition objcmd.h:68
@ SW_SPEED
Definition objcmd.h:67
@ SW_SCALE_X
Definition objcmd.h:62
Song and sound effect ids, indices into gSound_SongTable.
#define SE_DOOR_OPEN
Definition songs.h:153
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_TaskWait()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
#define NULL
Definition bilibin.h:6
@ TOLBI_EMBER
Definition tolbi.h:41
@ TOLBI_MISSING_PERSON_POSTER
Definition tolbi.h:42
@ TOLBI_SPROUT
Definition tolbi.h:23
@ TOLBI_PLAYER_COPY
copies the leader's sprite priority every frame
Definition tolbi.h:25
@ TOLBI_SOLDIER_A
Definition tolbi.h:39
@ TOLBI_MOTHER
Definition tolbi.h:33
@ TOLBI_SCALPER
Sleeps under the archway during the festival; on finals day he sells seats.
Definition tolbi.h:37
@ TOLBI_YOUNGER_SIBLING
Definition tolbi.h:27
@ TOLBI_SNACK_VENDOR
Definition tolbi.h:28
@ TOLBI_CRYING_CHILD
Definition tolbi.h:34
@ TOLBI_SOLDIER_B
Definition tolbi.h:40
@ TOLBI_GAMBLER
Definition tolbi.h:38
@ TOLBI_OLDER_BROTHER
Definition tolbi.h:26
@ TOLBI_PUDDLE
Definition tolbi.h:24
@ TOLBI_FATHER
A family at the festival: the father, the mother and their child, who cries for sweets.
Definition tolbi.h:32
@ TOLBI_HIDDEN_CHEST
Definition tolbi.h:49
@ TOLBI_JAR
Definition tolbi.h:48
@ TOLBI_BARREL
Definition tolbi.h:47
u8 gWindowWork[]
@ KID_TALKING
set while the party talks to this child
Definition tolbi.h:69
@ KID_CHASES_YOUNGER
set on the older brother, who runs after actor 17
Definition tolbi.h:68
#define EVENT_WORK_1F4
A word of the event work, at offset 0x1f4, that is set to the poster before the yes/no choice under t...
Definition tolbi.h:55
#define offsetof(type, member)
Definition stddef.h:19
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
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
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
u8 paused
nonzero skips its script and motion, not its update
Definition field_obj.h:93
union FieldCoordinate y
16.16 fixed-point pixels
Definition field_obj.h:36
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
Definition field_obj.h:51
union FieldCoordinate z
16.16 fixed-point pixels
Definition field_obj.h:37
u16 facing
1/65536 turns
Definition field_obj.h:34
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
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
Definition field_obj.h:91
Cell replacement: procedure and destination cells.
Definition field_event.h:64
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 window state the running children consult before they widen their stopping range.
Definition tolbi.h:60
u8 renderMode
Definition tolbi.h:62
struct SceneEvent gTolbiEventsAfterColosso[]
After Colosso has ended.
Definition tolbi.c:896
struct SceneEvent gTolbiEventsFinalsDay[]
On finals day.
Definition tolbi.c:829
struct SceneEntrance gTolbiEntrances[]
Definition tolbi.c:674
static void Tolbi_TalkToMother(void)
The mother turns to her crying child, then back to promise better sweets later on.
Definition tolbi.c:296
static s32 Tolbi_KidStopForTarget(struct FieldActor *kid, struct FieldActor *target, s32 range, s32 force)
Stops a running child when the target is close by and ahead of it, or always when force is set; other...
Definition tolbi.c:49
static void Tolbi_TalkToSleepingScalper(void)
During the festival the scalper sleeps under the archway: the inns are full.
Definition tolbi.c:318
s32 gTolbiYoungerSiblingRun[]
The younger sibling runs the same loop half a lap ahead.
Definition tolbi.c:650
s32 gTolbiOlderBrotherRun[]
The older brother runs a loop of eight points around the plaza.
Definition tolbi.c:625
static void Tolbi_CopyLeaderPriority(union FieldObject *object)
The update of actor 14: gives it the leader's sprite priority every frame, for both of its sprite par...
Definition tolbi.c:385
static void Tolbi_JoinEmber(void)
Talking to Ember, the Mars Djinni hiding in town, makes it join the party.
Definition tolbi.c:38
u32 gTolbiExits[]
Definition tolbi.c:694
static void Tolbi_AskAboutLivingPastHundred(void)
A townsperson asks whether someone can live to be more than 100 years old; either way the talk turns ...
Definition tolbi.c:278
static void Tolbi_TalkToYoungerSibling(void)
Talking to the younger sibling, or reading the child's mind, as above.
Definition tolbi.c:228
static void Tolbi_TalkToCryingChild(void)
The crying child turns, stamps twice and wails for sweets.
Definition tolbi.c:307
static void Tolbi_AskWhetherPartyWasInFinals(void)
After Colosso, actor 12 asks whether the party was in the finals.
Definition tolbi.c:327
static void Tolbi_MeetSearchingSoldiers(void)
During the festival, two soldiers searching for the missing Babi stop the party and show his picture.
Definition tolbi.c:499
s32 Tolbi_ApplyEntryState(s32 unused)
Sets up the scene on entry: the running children, actor 14's update, and everything the flags have al...
Definition tolbi.c:398
const struct SceneEntrance * Tolbi_GetEntrances(void)
Definition tolbi.c:137
static void Tolbi_EnterDoor(void)
Walking into one of the town's doors: the door opens, the leader steps in (except at the seventh door...
Definition tolbi.c:354
static void Tolbi_TalkToFather(void)
The father asks whether children really do love souvenirs, and owns up to loving them himself.
Definition tolbi.c:287
static void Tolbi_RevealHiddenChest(void)
Reveal uncovers the hidden chest: its map cell is drawn in and the chest moves into place.
Definition tolbi.c:164
struct MapCellAnim gTolbiDoors[]
The doors, in the order of their triggers 1 to 9, by map cell.
Definition tolbi.c:957
const struct SceneRegion * Tolbi_GetRegions(void)
Definition tolbi.c:139
static void Tolbi_GrowSprout(void)
Growth on the sprout: the grown plant no longer blocks the party, and its map cell becomes climbable.
Definition tolbi.c:149
static void Tolbi_RequestTouchedExit(void)
Leaves by the exit numbered as the trigger the party walked into.
Definition tolbi.c:491
static void Tolbi_ReadLuckyMedalSign(void)
The second sign at Tolbi Spring: a Lucky Medal wins better prizes.
Definition tolbi.c:183
s32 gTolbiMirroredActor[]
The action script of a mirrored actor: flips its sprite and passes 7 on.
Definition tolbi.c:618
static void Tolbi_TalkToOlderBrother(void)
Talking to the older brother, or reading his mind.
Definition tolbi.c:190
u16 gTolbiDoorOpening[]
How a door opens: two frames of cells copied over the closed door.
Definition tolbi.c:950
static void Tolbi_HideRevealedChest(void)
When Reveal wears off, the chest's cell is covered again and the chest moves out of sight.
Definition tolbi.c:171
static s32 Tolbi_UpdateKid(union FieldObject *fieldObject)
Definition tolbi.c:94
static void Tolbi_FreezePuddle(void)
Frost on the puddle: the frozen pillar is drawn underfoot and stops following the terrain,...
Definition tolbi.c:603
static void Tolbi_TalkToGambler(void)
The gambler at the spring's gate asks whether the party wants to test its luck.
Definition tolbi.c:461
struct SceneEvent gTolbiEventsFestival[]
During the festival, before the finals.
Definition tolbi.c:760
#define TOLBI_JAR_SEARCH_KIND
Definition tolbi.c:28
const struct SceneEvent * Tolbi_SelectEvents(void)
Picks the event table for Tolbi's current mood.
Definition tolbi.c:266
const u32 * Tolbi_GetExits(void)
Definition tolbi.c:141
struct ScenePlacement gTolbiPlacements[]
Definition tolbi.c:704
static void Tolbi_ReadSpringSign(void)
The first sign at Tolbi Spring: face away and toss a coin in.
Definition tolbi.c:177
static void Tolbi_TalkToSnackVendor(void)
After Colosso, the snack vendor gives the party her leftover corn, once.
Definition tolbi.c:335
const struct ScenePlacement * Tolbi_GetPlacements(void)
Definition tolbi.c:143
static void Tolbi_EnterSpring(void)
The gate to Tolbi Spring, once the gambler has stepped aside.
Definition tolbi.c:485
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
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
struct FieldActor actor
struct UiWindow * UiWindow_CreateWithSideObject(s32 speaker, s32 portraitOption, s32 x, s32 y)
Opens a portrait window at tile (x, y) showing the speaker's portrait.
Definition messages.c:525