imil.c
Imil, in two maps: the town and its interiors.
games/tbs/src/scene/imil.c on GitHub
Imil, in two maps: the town and its interiors. The townspeople are sick until the epidemic is cured (flag 0x881); Mia heals the old man, and the cold villager waits for her.
Functions
Imil_UpdateShiver
static s32 Imil_UpdateShiver(struct ScriptInterpreter *interpreter)
A sick person shivers: a quick squash, then a pause, longer for the old man.
Used by gImil_ShiverScript.
Imil_GetEntrances
const struct SceneEntrance *Imil_GetEntrances(void)
Imil is two maps: the town and its interiors.
Imil_GetPlacements
const struct ScenePlacement *Imil_GetPlacements(void)
Once the epidemic is cured (flag 0x881), the townspeople are well again and the old man is up and about.
Imil_StartIceSlide
static void Imil_StartIceSlide(void)
Stepping onto the ice starts a slide.
Used by gImil_TownEvents.
Imil_GetEvents
const struct SceneEvent *Imil_GetEvents(void)
The town's or the interiors' conversations and Psynergy targets.
Imil_TalkToColdVillager
static void Imil_TalkToColdVillager(void)
The cold villager sneezes and shivers, waiting for Mia; once she travels with the party (flag 3), he says that even her healing can't help them all.
Used by gImil_TownEvents.
Imil_ReadColdVillagerMind
static void Imil_ReadColdVillagerMind(void)
Mind Read on the cold villager: Mia should be here by now, or, once she has joined the party, he can't understand why she left.
Used by gImil_TownEvents.
Imil_GreetVisitor
static void Imil_GreetVisitor(void)
A villager turns to the leader and asks whether he is new in Imil.
Used by gImil_TownEvents.
Imil_TalkToCountingChild
static void Imil_TalkToCountingChild(void)
The counting child stops, turns to the leader and goes back to counting.
Used by gImil_TownEvents.
Imil_TalkToOldMan
static void Imil_TalkToOldMan(void)
The old man moans for help until the old woman hurries to fetch Mia; after Mia's healing he feels much better, and once the town is cured he asks whether the party really thought he would die.
Used by Imil_TalkToOldManInBed, gImil_InteriorEvents.
Imil_AskAboutWeapons
static void Imil_AskAboutWeapons(void)
Once the epidemic is cured, the weapon merchant asks whether the party wants weapons.
Used by gImil_InteriorEvents.
Imil_AskAboutRestaurantMenu
static void Imil_AskAboutRestaurantMenu(void)
Once the epidemic is cured, the restaurant owner offers the menu.
Used by gImil_InteriorEvents.
Imil_TalkToSecondApprentice
static void Imil_TalkToSecondApprentice(void)
Mia's second apprentice asks whether the party has visited the old couple, where Mia went; once Mia has joined, she says everyone counts on her.
Used by gImil_InteriorEvents.
Imil_ReadSecondApprenticeMind
static void Imil_ReadSecondApprenticeMind(void)
Mind Read on the second apprentice: Mia had a bad feeling, or, once she has joined, they must help her.
Used by gImil_InteriorEvents.
Imil_TalkToOldWoman
static void Imil_TalkToOldWoman(void)
Once the epidemic is cured, the old woman asks what happened at the lighthouse.
Used by gImil_InteriorEvents.
Imil_ReadOldWomanMind
static void Imil_ReadOldWomanMind(void)
Mind Read on the old woman: about Mia's clan, her husband's exaggerating, or Mia running all over town.
Used by gImil_InteriorEvents.
Imil_TalkToOldManInBed
static void Imil_TalkToOldManInBed(void)
After Mia's visit, speaking across the bed reaches the old man.
Used by gImil_InteriorEvents.
Imil_ReadCountingChildMind
static void Imil_ReadCountingChildMind(void)
Mind Read on the counting child: admiration for Mia.
Used by gImil_InteriorEvents.
Imil_ReadApprenticeMind
static void Imil_ReadApprenticeMind(void)
Mind Read on Mia's apprentice: she will do her best, or, once Mia has joined, she feels grown up.
Used by gImil_InteriorEvents.
Imil_OpenDoorAndExit
static void Imil_OpenDoorAndExit(void)
Walking north into a door, everyone stops, the door opens and the leader walks in; door 6 has its own sound and a slower walk.
Used by gImil_TownEvents.
Imil_TalkToWeaponMerchant
static void Imil_TalkToWeaponMerchant(void)
Across the counter, the leader facing north, the weapon shop opens once the town is cured; before, the sick merchant says the shop is closed.
Used by gImil_InteriorEvents.
Imil_TalkToArmorMerchant
static void Imil_TalkToArmorMerchant(void)
Across the counter, the leader facing north, the armor shop opens once the town is cured; before, the merchant is too sick for business.
Used by gImil_InteriorEvents.
Imil_TalkToItemMerchant
static void Imil_TalkToItemMerchant(void)
The item shop: once the town is cured the mother sells again; before, her child minds the counter while she is sick, or talks of the lumberjack father.
Used by gImil_InteriorEvents.
Imil_TalkToInnkeeper
static void Imil_TalkToInnkeeper(void)
Across the counter, the leader facing north, the inn opens; otherwise the innkeeper talks of the two groups of travellers, or of the party's leaving.
Used by gImil_InteriorEvents.
Imil_TalkToApprentice
static void Imil_TalkToApprentice(void)
Across the counter, the leader facing north, Mia's apprentice offers the sanctum, the first time saying she can act as healer; otherwise she talks of Mia.
Used by gImil_InteriorEvents.
Imil_Initialize
s32 Imil_Initialize(void)
The town gets its rising effects, map layers and snowman, and the first arrival walks in; each interior restores its people for the town's state.
Imil_MeetMiaAtOldCouplesHouse
static void Imil_MeetMiaAtOldCouplesHouse(void)
After hearing where Mia went, the party finds her at the old couple's house. She heals the old man with Ply when the Mercury Lighthouse flashes; Mia runs out and the party follows her.
Used by Imil_Initialize.
Imil_UpdateCountdownArc
UNUSED static void Imil_UpdateCountdownArc(struct FieldActor *actor)
Moves an unused effect around its stored origin until its timer expires.
Imil_SwayAndSpark
UNUSED static void Imil_SwayAndSpark(struct FieldActor *actor)
Sways an unused actor and occasionally emits a rising spark.
Imil_OldManBobsAndSpeaks
static void Imil_OldManBobsAndSpeaks(void)
The old man bobs and speaks as the healing reaches him.
Used by Imil_MiaCastsPlyOnOldMan.
Imil_InitializeRisingEffect
static void Imil_InitializeRisingEffect(struct FieldActor *work)
Resets a rising effect's motion, sprite priority, and initial scale.
Used by Imil_StartRisingEffect.
Imil_UpdateRisingEffect
static void Imil_UpdateRisingEffect(union FieldObject *object)
Moves and enlarges an ambient effect, then releases it when its timer expires.
Used by Imil_StartRisingEffect.
Imil_StartRisingEffect
static inline void Imil_StartRisingEffect(union FieldObject *object)
Initializes a newly created ambient effect for its one-second rise.
Used by Imil_SpawnAmbientEffects.
Imil_SpawnAmbientEffects
static void Imil_SpawnAmbientEffects(void)
Effects rise at five places in the town, staggered over each second.
Used by Imil_Initialize.
Imil_UpdateMapLayerByLeaderPosition
static void Imil_UpdateMapLayerByLeaderPosition(void)
The leader walks on map layer 0 near the middle of town and on layer 1 elsewhere.
Used by Imil_Initialize.
Imil_MoveSnowmanToChimney
static void Imil_MoveSnowmanToChimney(void)
Moved onto the chimney, the snowman stays there and blocks its cell.
Used by Imil_Initialize, gImil_TownEvents.
Imil_LeaveNorth
static void Imil_LeaveNorth(void)
Walking into the north path, the leader faces north and leaves the town.
Used by gImil_TownEvents.
Imil_ShowFirstArrival
static void Imil_ShowFirstArrival(void)
Arriving for the first time, the leader walks into town.
Used by Imil_Initialize.
Imil_MiaSaysFarewellToApprentices
static void Imil_MiaSaysFarewellToApprentices(void)
Once the town is cured, Mia says farewell to her two apprentices in the sanctum before leaving with the party.
Used by Imil_Initialize.
Imil_TurnSlidingActor
static void Imil_TurnSlidingActor(union FieldObject *object)
While sliding, the leader turns toward the held direction.
Used by Imil_RunIceSlide.
Imil_RunIceSlide
static void Imil_RunIceSlide(void)
The leader slides along the ice until something stops him.
Used by Imil_StartIceSlide.
Also, functions without a comment: Imil_GetRegions, Imil_GetExits, Imil_MiaCastsPlyOnOldMan.
Enumerations
ImilActor
enum ImilActor
Imil's two maps share actor numbers; each is named on the map it is proved.
| Value | = | |
|---|---|---|
ACTOR_COLD_VILLAGER | 8 | shivering and sneezing in the snow |
ACTOR_GREETER | 9 | |
ACTOR_COUNTING_CHILD | 10 | |
ACTOR_SNOWMAN | 11 | |
ACTOR_OLD_WOMAN | 8 | the old couple's house |
ACTOR_OLD_MAN | 9 | |
ACTOR_WEAPON_MERCHANT | 12 | |
ACTOR_ARMOR_MERCHANT | 13 | |
ACTOR_ITEM_SHOP_CHILD | 14 | minds the shop while the mother is sick |
ACTOR_ITEM_MERCHANT | 15 | |
ACTOR_INNKEEPER | 16 | |
ACTOR_RESTAURANT_OWNER | 18 | |
ACTOR_APPRENTICE | 19 | Mia's apprentices, the first in the sanctum |
ACTOR_SECOND_APPRENTICE | 20 |
ImilTownFlag
enum ImilTownFlag
The town's own flags, kept while the party is there.
| Value | = | |
|---|---|---|
FLAG_IMIL_MAP_LAYER_0 | FLAG_SCENE_TEMP_00 | Which map layer the leader walks on, from where he stands. |
FLAG_IMIL_MAP_LAYER_1 | FLAG_SCENE_TEMP_01 | |
FLAG_IMIL_SNOWMAN_ON_CHIMNEY | FLAG_SCENE_TEMP_03 |
Macros, without a comment: IMIL_OPEN_SHOP, IMIL_OPEN_SHOP.
Globals
gImil_ArcOrigin
extern s32 gImil_ArcOrigin[]
The position (x, y, z) the unused arc and sway effects move around.
Used by Imil_SwayAndSpark, Imil_UpdateCountdownArc.
gImil_DoorCellPoints
s16 gImil_DoorCellPoints[][2]
Cell position (x, y) for each exit.
Used by Imil_OpenDoorAndExit.
Also, globals without a comment: gImil_KeyHeadings, gImil_SwayHeadings, gImil_ColdVillagerScript, gImil_ShiverScript, gImil_CaretakerHurryScript, gImil_LeaderStepAsideScript, gImil_BobScript, gImil_SparkScript, gImil_MiaCheckRoomScript, gImil_MiaRunOutScript, gImil_FaceTargetScript, gImil_FollowMiaOutScript, gImil_TownEntrances, gImil_InteriorEntrances, gImil_Exits, gImil_TownPlacements, gImil_TownPlacementsCured, gImil_InteriorPlacements, gImil_TownEvents, gImil_InteriorEvents, gImil_DoorCellSteps5, gImil_DoorCellSteps4, gImil_DoorCellSteps1, gImil_DoorCellSteps0, gImil_DoorCellSteps2, gImil_DoorCellSteps3, gImil_DoorCellSteps, gImil_CellStepsA, gImil_CellStepsB, gImil_ArcOrigin.