src/scene/tolbi.c
Tolbi, the town Babi rules, where Colosso, a festival of warriors, is held each year in the colosseum. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "sounds.h"#include "field/script_inline.h"#include "field/field_effect.h"#include "field/map_grid.h"#include "scene/vault_range.h"#include "text/msg_ids.h"#include "shared/position_distance.c"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_TOLBI_SPROUT_GROWN FLAG_SCENE_TEMP(0x00) | Growth has raised the sprout on the town's east side into a vine the leader can climb. |
#define | FLAG_TOLBI_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x01) | Frost has frozen the puddle north of the sprout into an ice pillar. |
#define | TOLBI_JAR_SEARCH_KIND |
Enumerations
| Name | Description | |
|---|---|---|
enum | TOLBI_ACTOR_ID { ACTOR_TOLBI_SPROUT, ACTOR_TOLBI_PUDDLE, ACTOR_TOLBI_EXCITED_ … } | The placed actors, numbered in the order of TolbiActorPlacements from ACTOR_FIRST_PLACED. |
enum | TOLBI_METATILE_BEHAVIOR { METATILE_BEHAVIOR_TOLBI_SOLDIERS, METATILE_BEHAVIOR_TOLBI_SP … } | The metatile behaviors Tolbi's coord and examine cues answer besides the doors, whose own metatiles carry the numbers of their exits (scTolbiEnterDoor, scTolbiRequestTouchedExit). |
enum | anonymous enum { KID_CHASES_YOUNGER, KID_TALKING } | The running children keep these flags in ACTOR.runningChildFlags. |
Functions
| Name | Description | |
|---|---|---|
static void | scTolbiFreezePuddle (void) | Frost on the puddle on Tolbi's east side, just north of the sprout (metatile (34, 16)), freezes it into an ice pillar to hop across. |
static void | scTolbiJoinEmber (void) | Talking to Ember, the Mars Djinni on the high ground east of Tolbi's inn (metatile (36, 8)), makes it join the party. |
static Sint32 | scTolbiKidStopForTarget (ACTOR *kid, ACTOR *target, Sint32 range, Sint32 force) | Stops a running child when the target is close by and ahead of it, or always when force is set. |
static UNREAD_RESULT | scTolbiUpdateKid (ACTOR *updated) | The update of the two children running their loop. |
const SCENE_ENTRANCE * | scGetEntrances (void) | The six rooms share one entrance table. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Both scenes share one exit table. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Some villagers only turn back after talking once the flood is over or their family has gone home. |
static void | scTolbiGrowSprout (void) | Growth on the sprout on Tolbi's east side (metatile (34, 18)) grows a vine the party can climb, the way up toward the puddle and Ember. |
static void | scTolbiRevealHiddenChest (void) | Reveal among the gravestones in the south-west of Tolbi uncovers a chest (metatile (3, 26)) holding Power Bread. |
static void | scTolbiHideRevealedChest (void) | When Reveal wears off, the chest among the gravestones in the south-west of Tolbi (metatile (3, 26)) disappears again. |
static void | scTolbiReadSpringSign (void) | The sign west of the gate in the fountain's railing says to face away from Tolbi Spring and toss a coin into it. |
static void | scTolbiReadLuckyMedalSign (void) | The sign east of the gate in the fountain's railing says a Lucky Medal tossed in can win better prizes. |
static void | scTolbiTalkToOlderBrother (void) | Talking to the boy running round the loop south-east of the fountain stops him to say what he will buy with the money Mama gave him; Mind Read finds him thinking the oldest should not have to share the allowance. |
static void | scTolbiTalkToYoungerSister (void) | Talking to the girl running round the loop south-east of the fountain stops her to wail that the money was for both of them; Mind Read finds her thinking Mama told them to share. |
const CUE * | scGetCues (void) | Tolbi's scripts for the stage of the Colosso story: the festival, finals day or after Colosso. |
static void | scTolbiAskAboutLivingPastHundred (void) | The old woman in the south-west corner of Tolbi asks whether anyone can live past 100 years old, suspecting Babi is a lot older than that. |
static void | scTolbiTalkToFather (void) | During the festival, the father of the family on the road north of the fountain asks whether children really do love souvenirs, and owns up to loving them himself. |
static void | scTolbiTalkToMother (void) | During the festival, the mother of the family on the road north of the fountain turns to her crying boy, then back to promise better sweets later on. |
static void | scTolbiTalkToCryingBoy (void) | During the festival, the family's small boy turns, stamps twice and wails for sweets. |
static void | scTolbiTalkToSleepingScalper (void) | During the festival, the strongman sleeping under the archway on the road to the Colosseum says the inns are all full, and the archway keeps the rain off. |
static void | scTolbiAskWhetherPartyWasInFinals (void) | After Colosso, the burly grey-haired man by the market stalls north-east of the fountain asks whether the party was in the finals: he was moved by how determined they were, or says they look just like that warrior. |
static void | scTolbiTalkToSnackVendor (void) | After Colosso, the stout snack vendor at the stalls north-east of the fountain gives the party his leftover corn, once, and afterwards says the festival ran long this year. |
static void | scTolbiEnterDoor (void) | Walking north into one of Tolbi's doors opens it and takes the party inside a house, the inn, the shop, the Sanctum or a Lucky Dice or Lucky Wheels hall. |
static void | scTolbiCopyLeaderPriority (ACTOR *updated) | The old man with a cane, who wanders west of the fountain, is drawn in front of or behind things as the leader is, each tick. |
Sint32 | scInit (Sint32 unused) | Sets Tolbi up as the party enters: the children start running, the visitor stays aside once he has let the party go first, the vine and the ice pillar stand again after a battle, and the crowd and the scalper move for finals day or leave after Colosso. |
static void | scTolbiTalkToSpringVisitor (void) | Talking to the visitor at the gate in the fountain's railing: he asks whether the party wants to test its luck at Tolbi Spring. |
static void | scTolbiEnterSpring (void) | Walking north through the gate in the fountain's railing (metatiles (18, 18) and (19, 18)), once the visitor there has stepped aside, takes the party up to Tolbi Spring. |
static void | scTolbiRequestTouchedExit (void) | Walking north up the stairs to Babi's Palace, up the road to the Colosseum or into the Lucky Dice hall, or south off the town onto the World Map, leaves by the exit the metatile carries. |
static void | scTolbiMeetSearchingSoldiers (void) | During the festival, the first time the party heads up the path toward Babi's Palace (metatiles (5, 15) and (5, 16)), two of Babi's soldiers come down the stairs, show a "Missing Person" picture of Babi and ask whether the party has seen him. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | TolbiOlderBrotherRun [] | The older brother runs a loop of eight points, 32 pixels across, south-east of the fountain (around metatile (22, 21)). |
extern Sint32 | TolbiYoungerSisterRun [] | The younger sister runs the same loop half a lap ahead. |
extern SCENE_ENTRANCE | TolbiEntrances [] | |
extern Uint32 | TolbiExits [] | |
extern ACTOR_PLACE | TolbiActorPlacements [] | |
extern CUE | TolbiCuesFestival [] | During the festival, before the finals. |
extern CUE | TolbiCuesFinalsDay [] | |
extern CUE | TolbiCuesAfterColosso [] | After Colosso has ended. |
extern MAP_EDIT | TolbiDoors [] | The doors, in the order of their metatile behaviors 1 to 9, by map metatile. |
Sint32 | TolbiSleepingScalper [] | The scalper asleep under the archway during the festival: propped up on one hand, mirrored. |
Uint16 | TolbiDoorOpening [] | How a door opens, as two ticks of metatiles copied over the closed door. |
Description
Tolbi, the town Babi rules, where Colosso, a festival of warriors, is held each year in the colosseum.
The party comes to Tolbi across the Karagol Sea from Kalay while the festival is on, and walks in from the south. Stairs lead up to the square, where Tolbi Spring plays in the middle; the road north passes under an archway to the Colosseum, stairs in the north-west climb to Babi's Palace, and the inn stands in the north-east. The town's talk follows the Colosso story in three stages.
Each stage has its own cue table; one actor placement table serves all three,
and scInit moves the actors whose places change.
- The festival (neither story flag set). The trials have begun at the
colosseum, but Babi is not there, and his soldiers are searching the town.
The first time the party heads up the path toward Babi's Palace, two of
them stop it to show his picture, "Have you seen anyone who looks like
this?", and go their way whatever it answers (
scTolbiMeetSearchingSoldiers,FLAG_TOLBI_SOLDIERS_ASKED_ABOUT_BABI). - Finals day (
FLAG_BABI_SAVED), once the party has saved Babi in Altmiller Cave. He has shown himself at the finals, and the town hurries to the colosseum. The scalper who slept under the archway has moved, sending people to his buddy for seats. - After Colosso (
FLAG_COLOSSO_OVER). The visitors have left, so the family seen at the festival and four others are moved off the map. Those who stay talk of the quiet and of the ships that no longer sail the Karagol. The snack vendor gives away his leftover corn, once (FLAG_TOLBI_CORN_GIVEN).
In every stage two children run a small loop south-east of the fountain
(TolbiOlderBrotherRun, TolbiYoungerSisterRun) and quarrel over their
allowance. Each stops when it runs up behind the other or finds the leader in
its way (scTolbiUpdateKid).
A visitor testing his luck stands at the gate in the fountain's railing,
between its two signs. Once the party agrees to go first he steps aside for
good (scTolbiTalkToSpringVisitor, FLAG_TOLBI_SPRING_OPENED), and the gate
leads up to Tolbi Spring, where a coin or Lucky Medal is tossed in for a
prize (TOLBI_TO_TOLBI_SPRING).
Ember, a Mars Djinni, waits on the high ground east of the inn and joins the party when spoken to. The way there: Growth on the sprout on the town's east side grows a vine to climb, Frost on the puddle above it makes an ice pillar to hop across. Each is a scene flag, kept only through a return that keeps the party's position. Reveal on the gravestones in the south-west uncovers a chest with Power Bread.
A barrel near the stairs to Babi's Palace holds 9 coins, and a jar behind the easternmost house a Lucky Medal. During the festival, every edition but the Japanese finds the jar only when the party faces north.
The doors, whose metatiles carry their exits' numbers, lead into Tolbi's
houses, the inn, the weapon and armor shop and Tolbi Sanctum (all
SceneIdStuccoRoomsB), and into the Lucky Dice and Lucky Wheels halls
(SceneIdStuccoRoomsC, whose area name is also Tolbi). The stairs in the
north-west lead to Babi's Palace, the road north to the Colosseum, and the
town's south and east edges out onto the World Map.
Macros in detail
FLAG_TOLBI_SPROUT_GROWN
#define FLAG_TOLBI_SPROUT_GROWN FLAG_SCENE_TEMP(0x00)
Growth has raised the sprout on the town's east side into a vine the leader can climb.
Referenced by scInit(), scTolbiGrowSprout(), TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 80 of file tolbi.c.
FLAG_TOLBI_PUDDLE_FROZEN
#define FLAG_TOLBI_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x01)
Frost has frozen the puddle north of the sprout into an ice pillar.
Referenced by scInit(), scTolbiFreezePuddle(), TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 82 of file tolbi.c.
TOLBI_JAR_SEARCH_KIND
#define TOLBI_JAR_SEARCH_KIND
#define TOLBI_JAR_SEARCH_KIND EXAMINE_CUE(EXAMINE_JAR)
Referenced by TolbiCuesFestival.
Definition at lines 215 and 218 of file tolbi.c.
Enumerations in detail
TOLBI_ACTOR_ID
enum TOLBI_ACTOR_ID
The placed actors, numbered in the order of TolbiActorPlacements from
ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_TOLBI_SPROUT | ACTOR_FIRST_PLACED | The sprout on the town's east side, which Growth grows into a vine (scTolbiGrowSprout). |
ACTOR_TOLBI_PUDDLE | The puddle just north of the sprout, which Frost freezes into an ice pillar (scTolbiFreezePuddle). | |
ACTOR_TOLBI_EXCITED_YOUNG_MAN | A young man with brown hair | |
ACTOR_TOLBI_HURRYING_WOMAN | (SPRITE_YOUNG_MAN_WITH_BROWN_HAIR). A woman with fair hair (SPRITE_WOMAN_WITH_FAIR_HAIR). | |
ACTOR_TOLBI_FINALS_FAN | A burly grey-haired man (SPRITE_BURLY_MAN_WITH_GREY_HAIR) by the market stalls north-east of the fountain; after Colosso he asks whether the party was in the finals (scTolbiAskWhetherPartyWasInFinals). | |
ACTOR_TOLBI_WORRIED_WOMAN | A woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS). | |
ACTOR_TOLBI_OLD_MAN | An old man with a cane (SPRITE_OLD_MAN_WITH_CANE), who says he is 65 and later talks of the Lucky Guess. He copies the leader's sprite priority every tick (scTolbiCopyLeaderPriority). | |
ACTOR_TOLBI_SUSPICIOUS_OLD_WOMAN | An old woman (SPRITE_OLD_WOMAN) who asks whether someone can live past a hundred (scTolbiAskAboutLivingPastHundred). | |
ACTOR_TOLBI_OLDER_BROTHER | A small boy with fair hair (SPRITE_BOY_WITH_FAIR_HAIR), who runs after his sister. | |
ACTOR_TOLBI_YOUNGER_SISTER | A little girl with pigtails (SPRITE_GIRL_WITH_PIGTAILS). | |
ACTOR_TOLBI_SOUVENIR_SELLER | A strongman (SPRITE_STRONGMAN). | |
ACTOR_TOLBI_SNACK_VENDOR | A stout man (SPRITE_STOUT_MAN). | |
ACTOR_TOLBI_WOULD_BE_FIGHTER | A young man with a headband (SPRITE_YOUTH_WITH_HEADBAND). | |
ACTOR_TOLBI_XIAN_VISITOR | A young man with a headband (SPRITE_YOUTH_WITH_HEADBAND), whom Mind Read finds thinking of his home. | |
ACTOR_TOLBI_OVERSLEEPER | Two people with swords | |
ACTOR_TOLBI_SECOND_OVERSLEEPER | (SPRITE_PERSON_WITH_SWORD), the first of whom says "We overslept"; the second has no cue row. | |
ACTOR_TOLBI_FATHER | A family at the festival: the father, a burly grey-haired man (SPRITE_BURLY_MAN_WITH_GREY_HAIR), the mother, a woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS), and their small boy (SPRITE_BOY_WITH_FAIR_HAIR), who cries for sweets. | |
ACTOR_TOLBI_MOTHER | ||
ACTOR_TOLBI_CRYING_BOY | ||
ACTOR_TOLBI_SCALPER | A strongman (SPRITE_STRONGMAN) who sleeps under the archway on the road to the Colosseum during the festival; on finals day he stands by it and sends people to his buddy for seats. | |
ACTOR_TOLBI_SPRING_VISITOR | A man carrying a pack (SPRITE_MAN_CARRYING_A_PACK) at the gate in the fountain's railing, who lets the party go first at Tolbi Spring. | |
ACTOR_TOLBI_SEARCHING_SOLDIER | Two of Babi's soldiers (SPRITE_SOLDIER), | |
ACTOR_TOLBI_SECOND_SEARCHING_SOLDIER | searching the town for him and showing his picture (scTolbiMeetSearchingSoldiers). The first does the talking. | |
ACTOR_TOLBI_EMBER | Ember, a Mars Djinni, on the high ground east of the inn until it joins the party (scTolbiJoinEmber). | |
ACTOR_TOLBI_MISSING_PERSON | The "Missing Person" the soldiers ask about, placed with Babi's sprite (SPRITE_BABI) and kept hidden: the speaker of their portrait window. |
Definition at line 86 of file tolbi.c.
TOLBI_METATILE_BEHAVIOR
enum TOLBI_METATILE_BEHAVIOR
The metatile behaviors Tolbi's coord and examine cues answer besides the
doors, whose own metatiles carry the numbers of their exits
(scTolbiEnterDoor, scTolbiRequestTouchedExit).
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_TOLBI_SOLDIERS | 20 | On the path up to Babi's Palace, metatiles (5, 15) and (5, 16), where Babi's soldiers stop the party during the festival. |
METATILE_BEHAVIOR_TOLBI_SPRING_SIGN | 30 | The signs either side of |
METATILE_BEHAVIOR_TOLBI_LUCKY_MEDAL_SIGN | 31 | the gate in the fountain's railing: the west one (17, 17) on tossing a coin, the east one (20, 17) on Lucky Medals. |
METATILE_BEHAVIOR_TOLBI_BARREL | 100 | The barrel near the stairs to Babi's Palace (8, 9). |
METATILE_BEHAVIOR_TOLBI_JAR | 101 | The jar behind the easternmost house (30, 18). |
METATILE_BEHAVIOR_TOLBI_HIDDEN_CHEST | 102 | The chest among the gravestones in the south-west, kept off the drawn map at (3, 32) until Reveal copies it to (3, 26). |
METATILE_BEHAVIOR_TOLBI_GATE_TO_SPRING | 239 | The gate in the fountain's railing (18, 18) to (19, 18), open once the visitor there has stepped aside. |
METATILE_BEHAVIOR_TOLBI_EDGE | 12 | The town's south and east edges, out onto the World Map. |
Definition at line 167 of file tolbi.c.
anonymous enum
enum { KID_CHASES_YOUNGER, KID_TALKING }
The running children keep these flags in ACTOR.runningChildFlags. Bits: 1
talking | 0 chases the younger sister.
| Enumerator | Value | Description |
|---|---|---|
KID_CHASES_YOUNGER | 1 | Set on the older brother, who runs after ACTOR_TOLBI_YOUNGER_SISTER |
KID_TALKING | 2 | set while the party talks to this child |
Definition at line 205 of file tolbi.c.
Functions in detail
scTolbiFreezePuddle
static void scTolbiFreezePuddle(void)
Frost on the puddle on Tolbi's east side, just north of the sprout (metatile (34, 16)), freezes it into an ice pillar to hop across.
Frost on the puddle on Tolbi's east side, just north of the sprout (metatile (34, 16)), freezes it into an ice pillar to hop across.
The puddle's metatile takes the attributes of the metatile two to its east.
References fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes() and gmFlagSet().
Referenced by scInit(), TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at lines 223 and 932 of file tolbi.c.
scTolbiJoinEmber
static void scTolbiJoinEmber(void)
Talking to Ember, the Mars Djinni on the high ground east of Tolbi's inn (metatile (36, 8)), makes it join the party.
References fdDjinnJoinParty().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 227 of file tolbi.c.
scTolbiKidStopForTarget
static Sint32 scTolbiKidStopForTarget(ACTOR *kid, ACTOR *target, Sint32 range, Sint32 force)
Stops a running child when the target is close by and ahead of it, or always when force is set.
The child stops when the target is within one facing step of where it looks. For the party leader, that is within two steps either side.
Returns 1 when the child stopped.
References fdActorGet(), fdActorSelectAnimation(), Sint32 and syAtan().
Referenced by scTolbiUpdateKid().
Definition at line 242 of file tolbi.c.
scTolbiUpdateKid
static UNREAD_RESULT scTolbiUpdateKid(ACTOR *updated)
The update of the two children running their loop. Each stops when it runs up
behind the other, and otherwise when the party leader is in its way. While
the party talks to someone or Mind Read shows thoughts (the range widens to
TALK_STOP_RANGE), the child being talked to stops whatever the direction.
References fdActorGet(), scTolbiKidStopForTarget(), Sint32 and state.
Referenced by scInit().
Definition at line 285 of file tolbi.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References TolbiEntrances.
Definition at line 322 of file tolbi.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 327 of file tolbi.c.
scGetExits
const Uint32 *scGetExits(void)
References TolbiExits.
Definition at line 332 of file tolbi.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References TolbiActorPlacements.
Definition at line 337 of file tolbi.c.
scTolbiGrowSprout
static void scTolbiGrowSprout(void)
Growth on the sprout on Tolbi's east side (metatile (34, 18)) grows a vine the party can climb, the way up toward the puddle and Ember.
References fdActorGet(), fdActorSetSpriteFlags(), fdSetMetatileBehaviorAt() and gmFlagSet().
Referenced by scInit(), TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 344 of file tolbi.c.
scTolbiRevealHiddenChest
static void scTolbiRevealHiddenChest(void)
Reveal among the gravestones in the south-west of Tolbi uncovers a chest (metatile (3, 26)) holding Power Bread.
References fdMapGridCopyMetatileAttributes() and fdTreasureSpotSetPos().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 360 of file tolbi.c.
scTolbiHideRevealedChest
static void scTolbiHideRevealedChest(void)
When Reveal wears off, the chest among the gravestones in the south-west of Tolbi (metatile (3, 26)) disappears again.
References fdMapGridCopyMetatileAttributes() and fdTreasureSpotSetPos().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 369 of file tolbi.c.
scTolbiReadSpringSign
static void scTolbiReadSpringSign(void)
The sign west of the gate in the fountain's railing says to face away from Tolbi Spring and toss a coin into it.
References fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 377 of file tolbi.c.
scTolbiReadLuckyMedalSign
static void scTolbiReadLuckyMedalSign(void)
The sign east of the gate in the fountain's railing says a Lucky Medal tossed in can win better prizes.
References fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 386 of file tolbi.c.
scTolbiTalkToOlderBrother
static void scTolbiTalkToOlderBrother(void)
Talking to the boy running round the loop south-east of the fountain stops him to say what he will buy with the money Mama gave him; Mind Read finds him thinking the oldest should not have to share the allowance.
On finals day and after Colosso he says and thinks other things.
References fdActorFaceEachOther(), fdActorGet(), fdActorSetAnimation(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), gmFlagGet(), Sint32, state and sySynch().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 398 of file tolbi.c.
scTolbiTalkToYoungerSister
static void scTolbiTalkToYoungerSister(void)
Talking to the girl running round the loop south-east of the fountain stops her to wail that the money was for both of them; Mind Read finds her thinking Mama told them to share.
After Colosso she laughs that her big brother is being nice again.
References fdActorFaceEachOther(), fdActorGet(), fdActorSetAnimation(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), gmFlagGet(), Sint32, state and sySynch().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 454 of file tolbi.c.
scGetCues
const CUE *scGetCues(void)
Tolbi's scripts for the stage of the Colosso story: the festival, finals day or after Colosso.
References gmFlagGet(), TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 507 of file tolbi.c.
scTolbiAskAboutLivingPastHundred
static void scTolbiAskAboutLivingPastHundred(void)
The old woman in the south-west corner of Tolbi asks whether anyone can live past 100 years old, suspecting Babi is a lot older than that.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by TolbiCuesFestival.
Definition at line 522 of file tolbi.c.
scTolbiTalkToFather
static void scTolbiTalkToFather(void)
During the festival, the father of the family on the road north of the fountain asks whether children really do love souvenirs, and owns up to loving them himself.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 536 of file tolbi.c.
scTolbiTalkToMother
static void scTolbiTalkToMother(void)
During the festival, the mother of the family on the road north of the fountain turns to her crying boy, then back to promise better sweets later on.
References fdActorFaceDirection(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 550 of file tolbi.c.
scTolbiTalkToCryingBoy
static void scTolbiTalkToCryingBoy(void)
During the festival, the family's small boy turns, stamps twice and wails for sweets.
References fdActorFaceDirection(), fdActorStartRepeatedMotion(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 565 of file tolbi.c.
scTolbiTalkToSleepingScalper
static void scTolbiTalkToSleepingScalper(void)
During the festival, the strongman sleeping under the archway on the road to the Colosseum says the inns are all full, and the archway keeps the rain off.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by TolbiCuesFestival.
Definition at line 578 of file tolbi.c.
scTolbiAskWhetherPartyWasInFinals
static void scTolbiAskWhetherPartyWasInFinals(void)
After Colosso, the burly grey-haired man by the market stalls north-east of the fountain asks whether the party was in the finals: he was moved by how determined they were, or says they look just like that warrior.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by TolbiCuesAfterColosso.
Definition at line 590 of file tolbi.c.
scTolbiTalkToSnackVendor
static void scTolbiTalkToSnackVendor(void)
After Colosso, the stout snack vendor at the stalls north-east of the fountain gives the party his leftover corn, once, and afterwards says the festival ran long this year.
References fdActorSetAnimation(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagSet(), gmItemShowFound() and gmPartyGiveItem().
Referenced by TolbiCuesAfterColosso.
Definition at line 606 of file tolbi.c.
scTolbiEnterDoor
static void scTolbiEnterDoor(void)
Walking north into one of Tolbi's doors opens it and takes the party inside a house, the inn, the shop, the Sanctum or a Lucky Dice or Lucky Wheels hall.
Everyone in town stops while the door opens, and the leader walks a step in (except at the weapon and armor shop) before the screen closes.
References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdMapGridAnimateMetatiles(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWait(), fdScriptWaitTransitionTicks(), Sint32, state, syImportScriptSetExitRequest(), sySoundPlay() and TolbiDoors.
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 635 of file tolbi.c.
scTolbiCopyLeaderPriority
static void scTolbiCopyLeaderPriority(ACTOR *updated)
The old man with a cane, who wanders west of the fountain, is drawn in front of or behind things as the leader is, each tick.
During the festival he says he is 65 and that Babi was already old when he was born.
References fdActorGet() and Sint32.
Referenced by scInit().
Definition at line 673 of file tolbi.c.
scInit
Sint32 scInit(Sint32 unused)
Sets Tolbi up as the party enters: the children start running, the visitor stays aside once he has let the party go first, the vine and the ice pillar stand again after a battle, and the crowd and the scalper move for finals day or leave after Colosso.
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetScript(), gmFlagGet(), scTolbiCopyLeaderPriority(), scTolbiFreezePuddle(), scTolbiGrowSprout(), scTolbiUpdateKid(), Sint32, TolbiOlderBrotherRun and TolbiYoungerSisterRun.
Definition at line 690 of file tolbi.c.
scTolbiTalkToSpringVisitor
static void scTolbiTalkToSpringVisitor(void)
Talking to the visitor at the gate in the fountain's railing: he asks whether the party wants to test its luck at Tolbi Spring. Yes, and he steps aside for good to let the party go first; no, and he keeps trying.
References fdActorFaceDirection(), fdActorWalkToAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and gmFlagSet().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 753 of file tolbi.c.
scTolbiEnterSpring
static void scTolbiEnterSpring(void)
Walking north through the gate in the fountain's railing (metatiles (18, 18) and (19, 18)), once the visitor there has stepped aside, takes the party up to Tolbi Spring.
References fdScriptEnd() and syImportScriptSetExitRequest().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 786 of file tolbi.c.
scTolbiRequestTouchedExit
static void scTolbiRequestTouchedExit(void)
Walking north up the stairs to Babi's Palace, up the road to the Colosseum or into the Lucky Dice hall, or south off the town onto the World Map, leaves by the exit the metatile carries.
References syImportScriptSetExitRequest().
Referenced by TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.
Definition at line 795 of file tolbi.c.
scTolbiMeetSearchingSoldiers
static void scTolbiMeetSearchingSoldiers(void)
During the festival, the first time the party heads up the path toward Babi's Palace (metatiles (5, 15) and (5, 16)), two of Babi's soldiers come down the stairs, show a "Missing Person" picture of Babi and ask whether the party has seen him.
Yes, and they cry that Babi must be nearby and run east; no, and they go back north to look elsewhere.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), mnMessageOpenWindow(), mnPortraitOpenWindow() and Sint32.
Referenced by TolbiCuesFestival.
Definition at line 807 of file tolbi.c.
Variables in detail
TolbiOlderBrotherRun
extern Sint32 TolbiOlderBrotherRun[]
Sint32 TolbiOlderBrotherRun[]
The older brother runs a loop of eight points, 32 pixels across, south-east of the fountain (around metatile (22, 21)).
References Sint32.
Referenced by scInit() and TolbiActorPlacements.
Definition at lines 68 and 956 of file tolbi.c.
TolbiYoungerSisterRun
extern Sint32 TolbiYoungerSisterRun[]
Sint32 TolbiYoungerSisterRun[]
The younger sister runs the same loop half a lap ahead.
References Sint32.
Referenced by scInit() and TolbiActorPlacements.
Definition at lines 69 and 971 of file tolbi.c.
TolbiEntrances
extern SCENE_ENTRANCE TolbiEntrances[]
SCENE_ENTRANCE TolbiEntrances[]
Referenced by scGetEntrances().
Definition at lines 70 and 985 of file tolbi.c.
TolbiExits
extern Uint32 TolbiExits[]
Uint32 TolbiExits[]
Referenced by scGetExits().
Definition at lines 71 and 1133 of file tolbi.c.
TolbiActorPlacements
extern ACTOR_PLACE TolbiActorPlacements[]
ACTOR_PLACE TolbiActorPlacements[]
References Sint32, TolbiOlderBrotherRun, TolbiSleepingScalper and TolbiYoungerSisterRun.
Referenced by scGetActorPlacements().
Definition at lines 72 and 1165 of file tolbi.c.
TolbiCuesFestival
extern CUE TolbiCuesFestival[]
CUE TolbiCuesFestival[]
During the festival, before the finals.
References scTolbiAskAboutLivingPastHundred(), scTolbiEnterDoor(), scTolbiEnterSpring(), scTolbiFreezePuddle(), scTolbiGrowSprout(), scTolbiHideRevealedChest(), scTolbiJoinEmber(), scTolbiMeetSearchingSoldiers(), scTolbiReadLuckyMedalSign(), scTolbiReadSpringSign(), scTolbiRequestTouchedExit(), scTolbiRevealHiddenChest(), scTolbiTalkToCryingBoy(), scTolbiTalkToFather(), scTolbiTalkToMother(), scTolbiTalkToOlderBrother(), scTolbiTalkToSleepingScalper(), scTolbiTalkToSpringVisitor() and scTolbiTalkToYoungerSister().
Referenced by scGetCues().
Definition at lines 73 and 1221 of file tolbi.c.
TolbiCuesFinalsDay
extern CUE TolbiCuesFinalsDay[]
CUE TolbiCuesFinalsDay[]
References scTolbiEnterDoor(), scTolbiEnterSpring(), scTolbiFreezePuddle(), scTolbiGrowSprout(), scTolbiHideRevealedChest(), scTolbiJoinEmber(), scTolbiReadLuckyMedalSign(), scTolbiReadSpringSign(), scTolbiRequestTouchedExit(), scTolbiRevealHiddenChest(), scTolbiTalkToCryingBoy(), scTolbiTalkToFather(), scTolbiTalkToMother(), scTolbiTalkToOlderBrother(), scTolbiTalkToSpringVisitor() and scTolbiTalkToYoungerSister().
Referenced by scGetCues().
Definition at lines 74 and 1344 of file tolbi.c.
TolbiCuesAfterColosso
extern CUE TolbiCuesAfterColosso[]
CUE TolbiCuesAfterColosso[]
After Colosso has ended.
References scTolbiAskWhetherPartyWasInFinals(), scTolbiEnterDoor(), scTolbiEnterSpring(), scTolbiFreezePuddle(), scTolbiGrowSprout(), scTolbiHideRevealedChest(), scTolbiJoinEmber(), scTolbiReadLuckyMedalSign(), scTolbiReadSpringSign(), scTolbiRequestTouchedExit(), scTolbiRevealHiddenChest(), scTolbiTalkToOlderBrother(), scTolbiTalkToSnackVendor(), scTolbiTalkToSpringVisitor() and scTolbiTalkToYoungerSister().
Referenced by scGetCues().
Definition at lines 75 and 1464 of file tolbi.c.
TolbiDoors
extern MAP_EDIT TolbiDoors[]
MAP_EDIT TolbiDoors[]
The doors, in the order of their metatile behaviors 1 to 9, by map metatile.
References TolbiDoorOpening.
Referenced by scTolbiEnterDoor().
Definition at lines 76 and 1568 of file tolbi.c.
TolbiSleepingScalper
Sint32 TolbiSleepingScalper[]
The scalper asleep under the archway during the festival: propped up on one hand, mirrored.
References Sint32.
Referenced by TolbiActorPlacements.
Definition at line 948 of file tolbi.c.
TolbiDoorOpening
Uint16 TolbiDoorOpening[]
How a door opens, as two ticks of metatiles copied over the closed door.
Referenced by TolbiDoors.
Definition at line 1561 of file tolbi.c.