Alchemy
Loading...
Searching...
No Matches

imil.c File Reference

Imil, in two maps: the town and its interiors. More...

Go to the source code of this file.

Macros

#define IMIL_OPEN_SHOP   ((s32 (*)())Engine_ShopOpen)

Enumerations

enum  ImilActor {
  ACTOR_COLD_VILLAGER = 8 , ACTOR_GREETER = 9 , ACTOR_COUNTING_CHILD = 10 , ACTOR_SNOWMAN = 11 ,
  ACTOR_OLD_WOMAN = 8 , ACTOR_OLD_MAN = 9 , ACTOR_WEAPON_MERCHANT = 12 , ACTOR_ARMOR_MERCHANT = 13 ,
  ACTOR_ITEM_SHOP_CHILD = 14 , ACTOR_ITEM_MERCHANT = 15 , ACTOR_INNKEEPER = 16 , ACTOR_RESTAURANT_OWNER = 18 ,
  ACTOR_APPRENTICE = 19 , ACTOR_SECOND_APPRENTICE = 20
}
 Imil's two maps share actor numbers; each is named on the map it is proved. More...
enum  ImilTownFlag { FLAG_IMIL_MAP_LAYER_0 = FLAG_SCENE_TEMP_00 , FLAG_IMIL_MAP_LAYER_1 = FLAG_SCENE_TEMP_01 , FLAG_IMIL_SNOWMAN_ON_CHIMNEY = FLAG_SCENE_TEMP_03 }
 The town's own flags, kept while the party is there. More...

Functions

static void Imil_MeetMiaAtOldCouplesHouse (void)
 After hearing where Mia went, the party finds her at the old couple's house.
static void Imil_MiaCastsPlyOnOldMan (void)
static void Imil_SpawnAmbientEffects (void)
 Effects rise at five places in the town, staggered over each second.
static void Imil_UpdateMapLayerByLeaderPosition (void)
 The leader walks on map layer 0 near the middle of town and on layer 1 elsewhere.
static void Imil_MoveSnowmanToChimney (void)
 Moved onto the chimney, the snowman stays there and blocks its cell.
static void Imil_ShowFirstArrival (void)
 Arriving for the first time, the leader walks into town.
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.
static void Imil_RunIceSlide (void)
 The leader slides along the ice until something stops him.
static s32 Imil_UpdateShiver (struct ScriptInterpreter *interpreter)
 A sick person shivers: a quick squash, then a pause, longer for the old man.
const struct SceneEntrance * Imil_GetEntrances (void)
 Imil is two maps: the town and its interiors.
const struct SceneRegion * Imil_GetRegions (void)
const u32 * Imil_GetExits (void)
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.
static void Imil_StartIceSlide (void)
 Stepping onto the ice starts a slide.
const struct SceneEvent * Imil_GetEvents (void)
 The town's or the interiors' conversations and Psynergy targets.
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.
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.
static void Imil_GreetVisitor (void)
 A villager turns to the leader and asks whether he is new in Imil.
static void Imil_TalkToCountingChild (void)
 The counting child stops, turns to the leader and goes back to counting.
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.
static void Imil_AskAboutWeapons (void)
 Once the epidemic is cured, the weapon merchant asks whether the party wants weapons.
static void Imil_AskAboutRestaurantMenu (void)
 Once the epidemic is cured, the restaurant owner offers the menu.
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.
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.
static void Imil_TalkToOldWoman (void)
 Once the epidemic is cured, the old woman asks what happened at the lighthouse.
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.
static void Imil_TalkToOldManInBed (void)
 After Mia's visit, speaking across the bed reaches the old man.
static void Imil_ReadCountingChildMind (void)
 Mind Read on the counting child: admiration for Mia.
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.
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.
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.
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.
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.
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.
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.
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.
static UNUSED void Imil_UpdateCountdownArc (struct FieldActor *actor)
 Moves an unused effect around its stored origin until its timer expires.
static UNUSED void Imil_SwayAndSpark (struct FieldActor *actor)
 Sways an unused actor and occasionally emits a rising spark.
static void Imil_OldManBobsAndSpeaks (void)
 The old man bobs and speaks as the healing reaches him.
static void Imil_InitializeRisingEffect (struct FieldActor *work)
 Resets a rising effect's motion, sprite priority, and initial scale.
static void Imil_UpdateRisingEffect (union FieldObject *object)
 Moves and enlarges an ambient effect, then releases it when its timer expires.
static void Imil_StartRisingEffect (union FieldObject *object)
 Initializes a newly created ambient effect for its one-second rise.
static void Imil_LeaveNorth (void)
 Walking into the north path, the leader faces north and leaves the town.
static void Imil_TurnSlidingActor (union FieldObject *object)
 While sliding, the leader turns toward the held direction.

Variables

s32 gImil_ArcOrigin []
 The position (x, y, z) the unused arc and sway effects move around.
s16 gImil_KeyHeadings []
s16 gImil_SwayHeadings []
s32 gImil_ColdVillagerScript []
s32 gImil_ShiverScript []
s32 gImil_CaretakerHurryScript []
s32 gImil_LeaderStepAsideScript []
s32 gImil_BobScript []
s32 gImil_SparkScript []
s32 gImil_MiaCheckRoomScript []
s32 gImil_MiaRunOutScript []
s32 gImil_FaceTargetScript []
s32 gImil_FollowMiaOutScript []
struct SceneEntrance gImil_TownEntrances []
struct SceneEntrance gImil_InteriorEntrances []
u32 gImil_Exits []
struct ScenePlacement gImil_TownPlacements []
struct ScenePlacement gImil_TownPlacementsCured []
struct ScenePlacement gImil_InteriorPlacements []
struct SceneEvent gImil_TownEvents []
struct SceneEvent gImil_InteriorEvents []
u16 gImil_DoorCellSteps5 []
u16 gImil_DoorCellSteps4 []
u16 gImil_DoorCellSteps1 []
u16 gImil_DoorCellSteps0 []
u16 gImil_DoorCellSteps2 []
u16 gImil_DoorCellSteps3 []
u16 * gImil_DoorCellSteps []
s16 gImil_DoorCellPoints [][2]
 Cell position (x, y) for each exit.
u16 gImil_CellStepsA []
u16 gImil_CellStepsB []

Detailed Description

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.

Definition in file imil.c.

Macro Definition Documentation

◆ IMIL_OPEN_SHOP

#define IMIL_OPEN_SHOP   ((s32 (*)())Engine_ShopOpen)

Definition at line 81 of file imil.c.

Referenced by Imil_TalkToItemMerchant().

Enumeration Type Documentation

◆ ImilActor

enum ImilActor

Imil's two maps share actor numbers; each is named on the map it is proved.

Enumerator
ACTOR_COLD_VILLAGER 

shivering and sneezing in the snow

ACTOR_GREETER 
ACTOR_COUNTING_CHILD 
ACTOR_SNOWMAN 
ACTOR_OLD_WOMAN 

the old couple's house

ACTOR_OLD_MAN 
ACTOR_WEAPON_MERCHANT 
ACTOR_ARMOR_MERCHANT 
ACTOR_ITEM_SHOP_CHILD 

minds the shop while the mother is sick

ACTOR_ITEM_MERCHANT 
ACTOR_INNKEEPER 
ACTOR_RESTAURANT_OWNER 
ACTOR_APPRENTICE 

Mia's apprentices, the first in the sanctum.

ACTOR_SECOND_APPRENTICE 

Definition at line 50 of file imil.c.

◆ ImilTownFlag

The town's own flags, kept while the party is there.

Enumerator
FLAG_IMIL_MAP_LAYER_0 

Which map layer the leader walks on, from where he stands.

FLAG_IMIL_MAP_LAYER_1 
FLAG_IMIL_SNOWMAN_ON_CHIMNEY 

Definition at line 70 of file imil.c.

Function Documentation

◆ Imil_MeetMiaAtOldCouplesHouse()

void Imil_MeetMiaAtOldCouplesHouse ( void )
static

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.

Definition at line 736 of file imil.c.

Referenced by Imil_Initialize(), and Imil_MeetMiaAtOldCouplesHouse().

◆ Imil_MiaCastsPlyOnOldMan()

void Imil_MiaCastsPlyOnOldMan ( void )
static

Definition at line 967 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse(), and Imil_MiaCastsPlyOnOldMan().

◆ Imil_SpawnAmbientEffects()

void Imil_SpawnAmbientEffects ( void )
static

Effects rise at five places in the town, staggered over each second.

Definition at line 1022 of file imil.c.

Referenced by Imil_Initialize(), and Imil_SpawnAmbientEffects().

◆ Imil_UpdateMapLayerByLeaderPosition()

void Imil_UpdateMapLayerByLeaderPosition ( void )
static

The leader walks on map layer 0 near the middle of town and on layer 1 elsewhere.

Definition at line 1058 of file imil.c.

Referenced by Imil_Initialize(), and Imil_UpdateMapLayerByLeaderPosition().

◆ Imil_MoveSnowmanToChimney()

void Imil_MoveSnowmanToChimney ( void )
static

Moved onto the chimney, the snowman stays there and blocks its cell.

Definition at line 1100 of file imil.c.

Referenced by Imil_Initialize(), and Imil_MoveSnowmanToChimney().

◆ Imil_ShowFirstArrival()

void Imil_ShowFirstArrival ( void )
static

Arriving for the first time, the leader walks into town.

Definition at line 1138 of file imil.c.

Referenced by Imil_Initialize(), and Imil_ShowFirstArrival().

◆ Imil_MiaSaysFarewellToApprentices()

void Imil_MiaSaysFarewellToApprentices ( void )
static

Once the town is cured, Mia says farewell to her two apprentices in the sanctum before leaving with the party.

Definition at line 1148 of file imil.c.

Referenced by Imil_Initialize(), and Imil_MiaSaysFarewellToApprentices().

◆ Imil_RunIceSlide()

void Imil_RunIceSlide ( void )
static

The leader slides along the ice until something stops him.

Definition at line 1340 of file imil.c.

Referenced by Imil_RunIceSlide(), and Imil_StartIceSlide().

◆ Imil_UpdateShiver()

s32 Imil_UpdateShiver ( struct ScriptInterpreter * interpreter)
static

A sick person shivers: a quick squash, then a pause, longer for the old man.

Definition at line 97 of file imil.c.

Referenced by Imil_UpdateShiver().

◆ Imil_GetEntrances()

const struct SceneEntrance * Imil_GetEntrances ( void )

Imil is two maps: the town and its interiors.

Definition at line 129 of file imil.c.

Referenced by Imil_GetEntrances().

◆ Imil_GetRegions()

const struct SceneRegion * Imil_GetRegions ( void )

Definition at line 136 of file imil.c.

Referenced by Imil_GetRegions().

◆ Imil_GetExits()

const u32 * Imil_GetExits ( void )

Definition at line 138 of file imil.c.

Referenced by Imil_GetExits().

◆ 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.

Definition at line 142 of file imil.c.

Referenced by Imil_GetPlacements().

◆ Imil_StartIceSlide()

void Imil_StartIceSlide ( void )
static

Stepping onto the ice starts a slide.

Definition at line 166 of file imil.c.

Referenced by Imil_StartIceSlide().

◆ Imil_GetEvents()

const struct SceneEvent * Imil_GetEvents ( void )

The town's or the interiors' conversations and Psynergy targets.

Definition at line 169 of file imil.c.

Referenced by Imil_GetEvents().

◆ Imil_TalkToColdVillager()

void Imil_TalkToColdVillager ( void )
static

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.

Definition at line 178 of file imil.c.

Referenced by Imil_TalkToColdVillager().

◆ Imil_ReadColdVillagerMind()

void Imil_ReadColdVillagerMind ( void )
static

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.

Definition at line 195 of file imil.c.

Referenced by Imil_ReadColdVillagerMind().

◆ Imil_GreetVisitor()

void Imil_GreetVisitor ( void )
static

A villager turns to the leader and asks whether he is new in Imil.

Definition at line 207 of file imil.c.

Referenced by Imil_GreetVisitor().

◆ Imil_TalkToCountingChild()

void Imil_TalkToCountingChild ( void )
static

The counting child stops, turns to the leader and goes back to counting.

Definition at line 217 of file imil.c.

Referenced by Imil_TalkToCountingChild().

◆ Imil_TalkToOldMan()

void Imil_TalkToOldMan ( void )
static

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.

Definition at line 252 of file imil.c.

Referenced by Imil_TalkToOldMan(), and Imil_TalkToOldManInBed().

◆ Imil_AskAboutWeapons()

void Imil_AskAboutWeapons ( void )
static

Once the epidemic is cured, the weapon merchant asks whether the party wants weapons.

Definition at line 308 of file imil.c.

Referenced by Imil_AskAboutWeapons().

◆ Imil_AskAboutRestaurantMenu()

void Imil_AskAboutRestaurantMenu ( void )
static

Once the epidemic is cured, the restaurant owner offers the menu.

Definition at line 316 of file imil.c.

Referenced by Imil_AskAboutRestaurantMenu().

◆ Imil_TalkToSecondApprentice()

void Imil_TalkToSecondApprentice ( void )
static

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.

Definition at line 325 of file imil.c.

Referenced by Imil_TalkToSecondApprentice().

◆ Imil_ReadSecondApprenticeMind()

void Imil_ReadSecondApprenticeMind ( void )
static

Mind Read on the second apprentice: Mia had a bad feeling, or, once she has joined, they must help her.

Definition at line 341 of file imil.c.

Referenced by Imil_ReadSecondApprenticeMind().

◆ Imil_TalkToOldWoman()

void Imil_TalkToOldWoman ( void )
static

Once the epidemic is cured, the old woman asks what happened at the lighthouse.

Definition at line 354 of file imil.c.

Referenced by Imil_TalkToOldWoman().

◆ Imil_ReadOldWomanMind()

void Imil_ReadOldWomanMind ( void )
static

Mind Read on the old woman: about Mia's clan, her husband's exaggerating, or Mia running all over town.

Definition at line 364 of file imil.c.

Referenced by Imil_ReadOldWomanMind().

◆ Imil_TalkToOldManInBed()

void Imil_TalkToOldManInBed ( void )
static

After Mia's visit, speaking across the bed reaches the old man.

Definition at line 378 of file imil.c.

Referenced by Imil_TalkToOldManInBed().

◆ Imil_ReadCountingChildMind()

void Imil_ReadCountingChildMind ( void )
static

Mind Read on the counting child: admiration for Mia.

Definition at line 381 of file imil.c.

Referenced by Imil_ReadCountingChildMind().

◆ Imil_ReadApprenticeMind()

void Imil_ReadApprenticeMind ( void )
static

Mind Read on Mia's apprentice: she will do her best, or, once Mia has joined, she feels grown up.

Definition at line 390 of file imil.c.

Referenced by Imil_ReadApprenticeMind().

◆ Imil_OpenDoorAndExit()

void Imil_OpenDoorAndExit ( void )
static

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.

Definition at line 403 of file imil.c.

Referenced by Imil_OpenDoorAndExit().

◆ Imil_TalkToWeaponMerchant()

void Imil_TalkToWeaponMerchant ( void )
static

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.

Definition at line 447 of file imil.c.

Referenced by Imil_TalkToWeaponMerchant().

◆ Imil_TalkToArmorMerchant()

void Imil_TalkToArmorMerchant ( void )
static

Across the counter, the leader facing north, the armor shop opens once the town is cured; before, the merchant is too sick for business.

Definition at line 482 of file imil.c.

Referenced by Imil_TalkToArmorMerchant().

◆ Imil_TalkToItemMerchant()

void Imil_TalkToItemMerchant ( void )
static

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.

Definition at line 518 of file imil.c.

Referenced by Imil_TalkToItemMerchant().

◆ Imil_TalkToInnkeeper()

void Imil_TalkToInnkeeper ( void )
static

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.

Definition at line 555 of file imil.c.

Referenced by Imil_TalkToInnkeeper().

◆ Imil_TalkToApprentice()

void Imil_TalkToApprentice ( void )
static

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.

Definition at line 579 of file imil.c.

Referenced by Imil_TalkToApprentice().

◆ 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.

Definition at line 611 of file imil.c.

Referenced by Imil_Initialize().

◆ Imil_UpdateCountdownArc()

UNUSED void Imil_UpdateCountdownArc ( struct FieldActor * actor)
static

Moves an unused effect around its stored origin until its timer expires.

Definition at line 907 of file imil.c.

Referenced by Imil_UpdateCountdownArc().

◆ Imil_SwayAndSpark()

UNUSED void Imil_SwayAndSpark ( struct FieldActor * actor)
static

Sways an unused actor and occasionally emits a rising spark.

Definition at line 933 of file imil.c.

Referenced by Imil_SwayAndSpark().

◆ Imil_OldManBobsAndSpeaks()

void Imil_OldManBobsAndSpeaks ( void )
static

The old man bobs and speaks as the healing reaches him.

Definition at line 962 of file imil.c.

Referenced by Imil_MiaCastsPlyOnOldMan(), and Imil_OldManBobsAndSpeaks().

◆ Imil_InitializeRisingEffect()

void Imil_InitializeRisingEffect ( struct FieldActor * work)
static

Resets a rising effect's motion, sprite priority, and initial scale.

Definition at line 981 of file imil.c.

Referenced by Imil_InitializeRisingEffect(), and Imil_StartRisingEffect().

◆ Imil_UpdateRisingEffect()

void Imil_UpdateRisingEffect ( union FieldObject * object)
static

Moves and enlarges an ambient effect, then releases it when its timer expires.

Definition at line 1000 of file imil.c.

Referenced by Imil_StartRisingEffect(), and Imil_UpdateRisingEffect().

◆ Imil_StartRisingEffect()

void Imil_StartRisingEffect ( union FieldObject * object)
inlinestatic

Initializes a newly created ambient effect for its one-second rise.

Definition at line 1012 of file imil.c.

Referenced by Imil_SpawnAmbientEffects(), and Imil_StartRisingEffect().

◆ Imil_LeaveNorth()

void Imil_LeaveNorth ( void )
static

Walking into the north path, the leader faces north and leaves the town.

Definition at line 1125 of file imil.c.

Referenced by Imil_LeaveNorth().

◆ Imil_TurnSlidingActor()

void Imil_TurnSlidingActor ( union FieldObject * object)
static

While sliding, the leader turns toward the held direction.

Definition at line 1304 of file imil.c.

Referenced by Imil_RunIceSlide(), and Imil_TurnSlidingActor().

Variable Documentation

◆ gImil_ArcOrigin

s32 gImil_ArcOrigin

The position (x, y, z) the unused arc and sway effects move around.

Definition at line 1824 of file imil.c.

Referenced by Imil_SwayAndSpark(), and Imil_UpdateCountdownArc().

◆ gImil_KeyHeadings

s16 gImil_KeyHeadings[]
Initial value:

Definition at line 1430 of file imil.c.

Referenced by Imil_TurnSlidingActor().

◆ gImil_SwayHeadings

s16 gImil_SwayHeadings[]

◆ gImil_ColdVillagerScript

s32 gImil_ColdVillagerScript[]
Initial value:
= {
SC_ADD(SW_SCALE_X, -5 * Q16_ONE / 16),
SC_WAIT(1),
SC_ADD(SW_SCALE_Y, -2048),
SC_WAIT(1),
SC_ADD(SW_SCALE_Y, -1024),
SC_WAIT(1),
SC_ADD(SW_SCALE_Y, -1024),
SC_WAIT(1),
}
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Definition fixed_math.h:10
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ADD(w, v)
Definition objcmd.h:38
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 1442 of file imil.c.

◆ gImil_ShiverScript

s32 gImil_ShiverScript[]
Initial value:
= {
}
static s32 Imil_UpdateShiver(struct ScriptInterpreter *interpreter)
A sick person shivers: a quick squash, then a pause, longer for the old man.
Definition imil.c:97
#define SC_CALL(fn)
Definition objcmd.h:50

Definition at line 1460 of file imil.c.

Referenced by Imil_Initialize(), and Imil_TalkToOldMan().

◆ gImil_CaretakerHurryScript

s32 gImil_CaretakerHurryScript[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(136), 0, PIXELS(192)),
SC_MOVE(PIXELS(136), 0, PIXELS(136)),
SC_MOVE(PIXELS(149), 0, PIXELS(116)),
SC_ARG(1),
}
#define PIXELS(value)
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#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_FACING
Definition objcmd.h:57

Definition at line 1465 of file imil.c.

Referenced by Imil_TalkToOldMan().

◆ gImil_LeaderStepAsideScript

s32 gImil_LeaderStepAsideScript[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(155), 0, PIXELS(135)),
SC_ARG(1),
SC_SET(SW_FACING, 0xd000),
SC_WAIT(2),
SC_ADD(SW_SCALE_Y, -3 * Q16_ONE / 16),
SC_WAIT(2),
SC_ADD(SW_SCALE_Y, -3 * Q16_ONE / 32),
SC_WAIT(2),
SC_ADD(SW_SCALE_Y, -3 * Q16_ONE / 32),
SC_WAIT(4),
}

Definition at line 1478 of file imil.c.

Referenced by Imil_TalkToOldMan().

◆ gImil_BobScript

s32 gImil_BobScript[]

◆ gImil_SparkScript

s32 gImil_SparkScript[]
Initial value:
= {
SC_ADD(SW_Y, -PIXELS(2) / 5),
SC_WAIT(1),
}
#define SC_FREE
Release.
Definition objcmd.h:43
@ SW_Y
Definition objcmd.h:59

Definition at line 1509 of file imil.c.

Referenced by Imil_SwayAndSpark().

◆ gImil_MiaCheckRoomScript

s32 gImil_MiaCheckRoomScript[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(177), 0, PIXELS(136)),
SC_MOVE(PIXELS(161), 0, PIXELS(124)),
SC_SET(0x23, 1),
SC_MOVE(PIXELS(134), 0, PIXELS(139)),
SC_MOVE(PIXELS(135), 0, PIXELS(189)),
SC_ARG(1),
}

Definition at line 1516 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse().

◆ gImil_MiaRunOutScript

s32 gImil_MiaRunOutScript[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(165), 0, PIXELS(207)),
SC_SET(0x23, 1),
SC_MOVE(PIXELS(147), 0, PIXELS(252)),
SC_MOVE(PIXELS(150), 0, PIXELS(268)),
SC_POS(0, 0, 0),
SC_WAIT(1),
}
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18

Definition at line 1531 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse().

◆ gImil_FaceTargetScript

s32 gImil_FaceTargetScript[]
Initial value:
= {
SC_CALL(Scene_TurnTowardTarget),
}

Definition at line 1545 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse().

◆ gImil_FollowMiaOutScript

s32 gImil_FollowMiaOutScript[]
Initial value:
= {
SC_ARG(2),
SC_MOVE(PIXELS(132), 0, PIXELS(206)),
SC_POS(0, 0, 0),
SC_WAIT(1),
}

Definition at line 1550 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse().

◆ gImil_TownEntrances

struct SceneEntrance gImil_TownEntrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 380, 0, 433, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 288, 0, 488, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 2, CONDITION_ALWAYS, 480, 0, 280, FACING_WEST, 0, -1, -1, -1, -1, 0 },
{ 3, CONDITION_ALWAYS, 312, 0, 424, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 4, CONDITION_ALWAYS, 424, 0, 392, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 5, CONDITION_ALWAYS, 456, 0, 248, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 6, CONDITION_ALWAYS, 376, 0, 200, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 7, CONDITION_ALWAYS, 120, 0, 208, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 8, CONDITION_ALWAYS, 64, 0, 360, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 9, CONDITION_ALWAYS, 229, 0, 88, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44

Definition at line 1559 of file imil.c.

Referenced by Imil_GetEntrances().

◆ gImil_InteriorEntrances

struct SceneEntrance gImil_InteriorEntrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 136, 0, 248, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 144, 0, 242, FACING_NORTH, 0, 32, 52, 256, 280, 0 },
{ 2, CONDITION_ALWAYS, 143, 0, 596, FACING_NORTH, 0, 42, 424, 256, 631, 0 },
{ 3, CONDITION_ALWAYS, 399, 0, 322, FACING_NORTH, 0, 320, 58, 536, 360, 0 },
{ 4, CONDITION_ALWAYS, 400, 0, 659, FACING_NORTH, 0, 307, 382, 545, 697, 0 },
{ 5, CONDITION_ALWAYS, 129, 0, 915, FACING_NORTH, 0, 50, 706, 350, 949, 0 },
{ 6, CONDITION_ALWAYS, 446, 0, 825, FACING_SOUTH, 0, 402, 740, 670, 921, 0 },
{ 7, CONDITION_ALWAYS, 687, 0, 264, FACING_NORTH, 0, 594, 49, 806, 295, 0 },
{ 8, CONDITION_ALWAYS, 182, 0, 772, FACING_SOUTH, 0, 50, 706, 350, 949, 0 },
}

Definition at line 1573 of file imil.c.

Referenced by Imil_GetEntrances().

◆ gImil_Exits

u32 gImil_Exits[]
Initial value:
= {
SCENE_EXIT(1, 51, 1),
SCENE_EXIT(2, 51, 5),
SCENE_EXIT(3, 51, 3),
SCENE_EXIT(4, 51, 4),
SCENE_EXIT(5, 51, 2),
SCENE_EXIT(6, 51, 7),
SCENE_EXIT(8, 52, 1),
SCENE_EXIT(11, 2, 9),
SCENE_EXIT(12, 2, 39),
SCENE_EXIT(0, 51, 0),
SCENE_EXIT(1, 50, 3),
SCENE_EXIT(2, 50, 7),
SCENE_EXIT(3, 50, 5),
SCENE_EXIT(4, 50, 6),
SCENE_EXIT(5, 50, 4),
SCENE_EXIT(6, 51, 8),
SCENE_EXIT(7, 50, 8),
SCENE_EXIT(8, 51, 6),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 1586 of file imil.c.

Referenced by Imil_GetExits().

◆ gImil_TownPlacements

struct ScenePlacement gImil_TownPlacements[]
Initial value:
= {
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ ACTOR_WANDER
@ ACTOR_STAND
s32 gImil_ColdVillagerScript[]
Definition imil.c:1442
signed int s32
Definition types.h:14

Definition at line 1609 of file imil.c.

Referenced by Imil_GetPlacements().

◆ gImil_TownPlacementsCured

struct ScenePlacement gImil_TownPlacementsCured[]

◆ gImil_InteriorPlacements

struct ScenePlacement gImil_InteriorPlacements[]

Definition at line 1633 of file imil.c.

Referenced by Imil_GetPlacements().

◆ gImil_TownEvents

struct SceneEvent gImil_TownEvents[]
Initial value:
= {
{ EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgImilTheMercuryLighthouseIsShiningMia) },
{ EVENT_TALK, 9, CONDITION_ALWAYS, MSGNO(MsgImilImilWillBeFineDiseaseIs) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgImilMiaWasOnlyInImilTo) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, 0x881, MSGNO(MsgImilWeveHadALotOfStrangers) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgImilDontWorryAboutUsMiaWell) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, 0x881, MSGNO(MsgImilPeopleGetSickBecauseTheyStay) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgImilNowThatIveLetMyGuard) },
{ SEARCH(SEARCH_JAR), 100, 0xf5f, FIND_COINS(9) },
{ SEARCH(SEARCH_CHEST), 101, 0xf60, FIND_ITEM(ITEM_VIAL) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
@ ABILITY_MOVE
Definition ability_ids.h:15
#define SCENE_EVENTS_END
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
@ SEARCH_JAR
@ SEARCH_CHEST
@ SEARCH_GRAVE
#define FIND_COINS(coins)
static void Imil_TalkToColdVillager(void)
The cold villager sneezes and shivers, waiting for Mia; once she travels with the party (flag 3),...
Definition imil.c:178
static void Imil_TalkToCountingChild(void)
The counting child stops, turns to the leader and goes back to counting.
Definition imil.c:217
static void Imil_LeaveNorth(void)
Walking into the north path, the leader faces north and leaves the town.
Definition imil.c:1125
static void Imil_ReadColdVillagerMind(void)
Mind Read on the cold villager: Mia should be here by now, or, once she has joined the party,...
Definition imil.c:195
@ FLAG_IMIL_MAP_LAYER_0
Which map layer the leader walks on, from where he stands.
Definition imil.c:72
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...
Definition imil.c:403
static void Imil_GreetVisitor(void)
A villager turns to the leader and asks whether he is new in Imil.
Definition imil.c:207
static void Imil_MoveSnowmanToChimney(void)
Moved onto the chimney, the snowman stays there and blocks its cell.
Definition imil.c:1100
static void Imil_StartIceSlide(void)
Stepping onto the ice starts a slide.
Definition imil.c:166
@ ITEM_VIAL
Definition item_ids.h:42
@ ITEM_LUCKY_MEDAL
Definition item_ids.h:70

Definition at line 1671 of file imil.c.

Referenced by Imil_GetEvents().

◆ gImil_InteriorEvents

struct SceneEvent gImil_InteriorEvents[]

Definition at line 1700 of file imil.c.

Referenced by Imil_GetEvents().

◆ gImil_DoorCellSteps5

u16 gImil_DoorCellSteps5[]
Initial value:
= {
MAP_CELL_STEP(40, 37, 4, 2, 5), MAP_CELL_STEP(40, 39, 4, 2, 5), MAP_CELL_STEPS_END,
MAP_CELL_STEP(35, 35, 2, 2, 5), MAP_CELL_STEP(33, 35, 2, 2, 5), MAP_CELL_STEPS_END,
}
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
#define MAP_CELL_STEPS_END
Definition field_event.h:61

Definition at line 1772 of file imil.c.

◆ gImil_DoorCellSteps4

u16 gImil_DoorCellSteps4[]
Initial value:
= {
MAP_CELL_STEP(35, 37, 2, 2, 5), MAP_CELL_STEP(33, 37, 2, 2, 5), MAP_CELL_STEPS_END,
}

Definition at line 1777 of file imil.c.

◆ gImil_DoorCellSteps1

u16 gImil_DoorCellSteps1[]
Initial value:
= {
MAP_CELL_STEP(35, 43, 2, 2, 5), MAP_CELL_STEP(33, 43, 2, 2, 5), MAP_CELL_STEPS_END,
}

Definition at line 1781 of file imil.c.

◆ gImil_DoorCellSteps0

u16 gImil_DoorCellSteps0[]
Initial value:
= {
MAP_CELL_STEP(35, 39, 2, 2, 5), MAP_CELL_STEP(33, 39, 2, 2, 5), MAP_CELL_STEPS_END,
}

Definition at line 1785 of file imil.c.

◆ gImil_DoorCellSteps2

u16 gImil_DoorCellSteps2[]
Initial value:
= {
MAP_CELL_STEP(42, 48, 2, 2, 5), MAP_CELL_STEP(40, 48, 2, 2, 5), MAP_CELL_STEPS_END,
}

Definition at line 1789 of file imil.c.

◆ gImil_DoorCellSteps3

u16 gImil_DoorCellSteps3[]
Initial value:
= {
MAP_CELL_STEP(42, 46, 2, 2, 5), MAP_CELL_STEP(40, 46, 2, 2, 5), MAP_CELL_STEPS_END,
}

Definition at line 1793 of file imil.c.

◆ gImil_DoorCellSteps

u16* gImil_DoorCellSteps[]
Initial value:
= {
}
u16 gImil_DoorCellSteps3[]
Definition imil.c:1793
u16 gImil_DoorCellSteps0[]
Definition imil.c:1785
u16 gImil_DoorCellSteps4[]
Definition imil.c:1777
u16 gImil_DoorCellSteps2[]
Definition imil.c:1789
u16 gImil_DoorCellSteps5[]
Definition imil.c:1772
u16 gImil_DoorCellSteps1[]
Definition imil.c:1781

Definition at line 1797 of file imil.c.

Referenced by Imil_OpenDoorAndExit().

◆ gImil_DoorCellPoints

s16 gImil_DoorCellPoints[][2]
Initial value:
= {
{ 50, 24 }, { 57, 22 }, { 59, 13 }, { 54, 10 }, { 38, 8 }, { 34, 19 },
}

Cell position (x, y) for each exit.

Definition at line 1807 of file imil.c.

Referenced by Imil_OpenDoorAndExit().

◆ gImil_CellStepsA

u16 gImil_CellStepsA[]
Initial value:
= {
MAP_CELL_STEP(1, 125, 1, 2, 10),
MAP_CELL_STEP(0, 125, 1, 2, 10),
}

Definition at line 1812 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse(), and Imil_TalkToOldMan().

◆ gImil_CellStepsB

u16 gImil_CellStepsB[]
Initial value:
= {
MAP_CELL_STEP(1, 125, 1, 2, 10),
MAP_CELL_STEP(2, 125, 1, 2, 10),
}

Definition at line 1818 of file imil.c.

Referenced by Imil_MeetMiaAtOldCouplesHouse(), and Imil_TalkToOldMan().