Skip to Content
The Alchemy Project

src/scene/cottage_rooms_c.c

Cottage rooms C (SceneIdCottageRoomsC) is a rooms map drawn as cottages, all of them inside Bilibin's buildings, whose area name is Bilibin. More…

Macros

NameDescription
#defineFLAG_BILIBIN_CHEF_CALLED_ORDERS FLAG_AREA_TEMP(0x00)The head chef has shouted his string of orders once, so from then on he sends the party to the waitress.

Enumerations

NameDescription
enumanonymous enum { SHOP_BILIBIN_WEAPONS, SHOP_BILIBIN_ARMOR, SHOP_BILIBIN_ITEMS }Bilibin's shops, as mnShopRun numbers the shops.
enumanonymous enum { INN_ID_BILIBIN }Bilibin's inn, as mnInnCheckIn numbers the inns.
enumCOTTAGE_ROOMS_C_ACTOR_ID { ACTOR_BILIBIN_YOUNG_MAN_ON_THE_CURSED_MAN, ACTOR_BILIBIN_WOM … }The placed actors, numbered in the order of CottageRoomsCActorPlacements from ACTOR_FIRST_PLACED.

Functions

NameDescription
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)Places Bilibin's townsfolk, leaving out those of the rooms not in view.
static voidscCottageRoomsCTalkToWeaponMerchant (void)Bilibin's weapon merchant opens the shop across the counter, or talks.
static voidscCottageRoomsCTalkToItemMerchant (void)Bilibin's item merchant opens the shop across the counter, or talks.
const CUE *scGetCues (void)Returns the cues, whose rows for while the curse holds come first.
static voidscCottageRoomsCTalkToArmorMerchant (void)Bilibin's armor merchant opens the shop across the counter, or talks.
static voidscCottageRoomsCTalkToWorriedChef (void)The head chef in Bilibin's restaurant, before the curse is lifted, is too worried to focus on his cooking.
static voidscCottageRoomsCTalkToHungryDiner (void)A diner in Bilibin's restaurant, before the curse is lifted, is still waiting for his dinner.
static voidscCottageRoomsCAskAboutTreeSpirit (void)A diner asks whether a tree spirit can curse a man.
static voidscCottageRoomsCAskAboutHolyTree (void)A young man asks whether Kolima Forest's holy tree survived.
static voidscCottageRoomsCAskAboutSilk (void)A little girl in Bilibin, once the curse is lifted, asks whether the party knows what silk is.
static voidscCottageRoomsCTalkToInnkeeper (void)Bilibin's innkeeper opens the inn across the counter, or talks.
static voidscCottageRoomsCTalkToBusyChef (void)The head chef in Bilibin's restaurant, once the curse is lifted, calls out orders once, then sends the party to the waitress.
static voidscCottageRoomsCTalkToKitchenWorker (void)The kitchen worker can't keep up with the head chef's energy.
static voidscCottageRoomsCTalkToWaitress (void)The waitress hurries through her work before the head chef yells.
static voidscCottageRoomsCTalkAboutMeal (void)A diner loves the meal and asks whether the party does too.
static voidscCottageRoomsCReadMiaAdmirersMind (void)Mind Read on the burly man in Bilibin who admires Mia, before the curse is lifted, hears his thoughts of her.
Sint32scInit (void)Sets up Bilibin's buildings.

Variables

NameDescription
extern SCENE_ENTRANCECottageRoomsCEntrances []
extern Uint32CottageRoomsCExits []
extern ACTOR_PLACECottageRoomsCActorPlacements []
extern CUECottageRoomsCTriggers []

Description

Cottage rooms C (SceneIdCottageRoomsC) is a rooms map drawn as cottages, all of them inside Bilibin's buildings, whose area name is Bilibin.

Six of Bilibin's doors (BILIBIN_INN to BILIBIN_WEAPON_AND_ARMOR_SHOP, in bilibin.c) lead into its rooms, and each room's door leads back out to the door it was entered by.

One room holds the weapon and armor shops, and another the item shop. A third holds the inn with the restaurant beside it, and its stairs (COTTAGE_ROOMS_C_INN_INN_UPSTAIRS and COTTAGE_ROOMS_C_INN_UPSTAIRS_INN) join it to its upstairs rooms. Three other buildings hold villagers. scGetActorPlacements leaves out the actors of the rooms not in view.

Everyone has a line for while Kolima's curse holds (FLAG_KOLIMA_CURSE_LIFTED clear) and one for after.

Before, the townsfolk explain the tree at the village entrance, McCoy's palace and the Water of Hermes. In the restaurant the head chef, born in Kolima, is too worried to cook.

After, the head chef cooks so hard his kitchen cannot keep up. The first time the party talks to him he shouts a string of orders and the kitchen worker answers (FLAG_BILIBIN_CHEF_CALLED_ORDERS, kept until the party leaves Bilibin). From then on he sends the party to the waitress (scCottageRoomsCTalkToBusyChef).

Every row that needs FLAG_KOLIMA_CURSE_LIFTED clear comes before the rows for afterwards, so the first row that matches picks the time.

The merchants and the innkeeper open the shop or the inn only when the leader faces them across the counter (facing north), and otherwise talk of the time. Mind Read on the villager who admires Mia depends on whether she is in the party.

Searching finds an Antidote, a Sleep Bomb and a Hard Nut, egg soup and omelettes in the ovens, and a book called "All About Items".

scInit opens the rooms with a window around the leader and draws one diner, ACTOR_BILIBIN_DINER_WITH_PICKAXE, at a fixed sprite priority.

He stands at the north edge of the restaurant's table, on metatile (7, 49). That metatile alone of the diners' metatiles gives an actor standing on it priority 3 (cottage_rooms_c's map.txt). Taken from that metatile, his priority would put him behind the middle layer (BG2, priority 2 in this map). The fixed priority 2 draws him in front of it, as the other diners are.

Macros in detail

FLAG_BILIBIN_CHEF_CALLED_ORDERS

#define FLAG_BILIBIN_CHEF_CALLED_ORDERS FLAG_AREA_TEMP(0x00)

The head chef has shouted his string of orders once, so from then on he sends the party to the waitress.

Referenced by scCottageRoomsCTalkToBusyChef().

Definition at line 62 of file cottage_rooms_c.c.

Enumerations in detail

anonymous enum

enum { SHOP_BILIBIN_WEAPONS, SHOP_BILIBIN_ARMOR, SHOP_BILIBIN_ITEMS }

Bilibin's shops, as mnShopRun numbers the shops.

EnumeratorValueDescription
SHOP_BILIBIN_WEAPONS7
SHOP_BILIBIN_ARMOR8
SHOP_BILIBIN_ITEMS9

Definition at line 65 of file cottage_rooms_c.c.

anonymous enum

enum { INN_ID_BILIBIN }

Bilibin's inn, as mnInnCheckIn numbers the inns.

EnumeratorValueDescription
INN_ID_BILIBIN2

Definition at line 73 of file cottage_rooms_c.c.

COTTAGE_ROOMS_C_ACTOR_ID

enum COTTAGE_ROOMS_C_ACTOR_ID

The placed actors, numbered in the order of CottageRoomsCActorPlacements from ACTOR_FIRST_PLACED.

Each room's actors are together: two in each house, then the shops' customers and keepers, the inn and its restaurant, and the inn's upstairs.

EnumeratorValueDescription
ACTOR_BILIBIN_YOUNG_MAN_ON_THE_CURSED_MANACTOR_FIRST_PLACEDA young man with brown hair, in the house east.
ACTOR_BILIBIN_WOMAN_ON_MCCOYS_PALACEA woman with fair hair. "McCoy had the trees cut down so he could build" his wife a palace.
ACTOR_BILIBIN_MIA_ADMIRERA burly grey-haired man in the house west, who wants to see Mia again.
ACTOR_BILIBIN_BOY_SNOWA small boy with fair hair. "We rarely see any snow around Bilibin."
ACTOR_BILIBIN_VILLAGER_WORRIED_FOR_KOLIMAA woman in a green dress, in the house north.
ACTOR_BILIBIN_GIRL_SILKA little girl with pigtails, who later asks whether the party knows what silk is.
ACTOR_BILIBIN_OLD_MAN_WATER_OF_HERMESAn old man with a cane, in the item shop.
ACTOR_BILIBIN_OLD_WOMAN_LOST_YOUTHAn old woman. "But even the legendary Water of Hermes cannot turn back time."
ACTOR_BILIBIN_WEAPON_MERCHANT
ACTOR_BILIBIN_ARMOR_MERCHANT
ACTOR_BILIBIN_ITEM_MERCHANT
ACTOR_BILIBIN_INNKEEPER
ACTOR_BILIBIN_INN_WORKERBeside the innkeeper.
ACTOR_BILIBIN_CHEFThe restaurant's head chef, born in Kolima.
ACTOR_BILIBIN_KITCHEN_WORKERA second cook in a tall chef's hat.
ACTOR_BILIBIN_WAITRESSA young woman with long brown hair.
ACTOR_BILIBIN_HUNGRY_DINERA man with a pack, waiting for his dinner.
ACTOR_BILIBIN_FURNITURE_SELLERA diner with a pack, who "came to Bilibin hoping to sell furniture".
ACTOR_BILIBIN_DINER_BIG_TREEA strongman at the table. "I think that big tree deep in the forest looks suspicious!"
ACTOR_BILIBIN_DINER_WITH_PICKAXEA diner with a pickaxe, drawn at a fixed sprite priority.
ACTOR_BILIBIN_DINER_TODAYS_SPECIALAn old man at the table.
ACTOR_BILIBIN_JOB_SEEKERA man in a red bandana, upstairs at the inn. "I went to Lord McCoy looking for work..."
ACTOR_BILIBIN_VILLAGER_ANCIENT_TREESA man with a lute, upstairs at the inn. "I've heard songs that tell of ancient trees developing strange powers."

Definition at line 83 of file cottage_rooms_c.c.

Functions in detail

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References CottageRoomsCEntrances.

Definition at line 136 of file cottage_rooms_c.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 141 of file cottage_rooms_c.c.

scGetExits

const Uint32 *scGetExits(void)

References CottageRoomsCExits.

Definition at line 146 of file cottage_rooms_c.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Places Bilibin's townsfolk, leaving out those of the rooms not in view.

References CottageRoomsCActorPlacements and fdAssignViewFlags().

Definition at line 152 of file cottage_rooms_c.c.

scCottageRoomsCTalkToWeaponMerchant

static void scCottageRoomsCTalkToWeaponMerchant(void)

Bilibin's weapon merchant opens the shop across the counter, or talks.

References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet() and mnShopRun().

Referenced by CottageRoomsCTriggers.

Definition at line 159 of file cottage_rooms_c.c.

scCottageRoomsCTalkToItemMerchant

static void scCottageRoomsCTalkToItemMerchant(void)

Bilibin's item merchant opens the shop across the counter, or talks.

References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet() and mnShopRun().

Referenced by CottageRoomsCTriggers.

Definition at line 187 of file cottage_rooms_c.c.

scGetCues

const CUE *scGetCues(void)

Returns the cues, whose rows for while the curse holds come first.

References CottageRoomsCTriggers.

Definition at line 215 of file cottage_rooms_c.c.

scCottageRoomsCTalkToArmorMerchant

static void scCottageRoomsCTalkToArmorMerchant(void)

Bilibin's armor merchant opens the shop across the counter, or talks.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorGet(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet() and mnShopRun().

Referenced by CottageRoomsCTriggers.

Definition at line 221 of file cottage_rooms_c.c.

scCottageRoomsCTalkToWorriedChef

static void scCottageRoomsCTalkToWorriedChef(void)

The head chef in Bilibin's restaurant, before the curse is lifted, is too worried to focus on his cooking.

References fdActorFaceActor(), fdActorFaceDirection(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 258 of file cottage_rooms_c.c.

scCottageRoomsCTalkToHungryDiner

static void scCottageRoomsCTalkToHungryDiner(void)

A diner in Bilibin's restaurant, before the curse is lifted, is still waiting for his dinner.

References fdActorFaceActor(), fdActorFaceDirection(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart() and fdScriptWait().

Referenced by CottageRoomsCTriggers.

Definition at line 271 of file cottage_rooms_c.c.

scCottageRoomsCAskAboutTreeSpirit

static void scCottageRoomsCAskAboutTreeSpirit(void)

A diner asks whether a tree spirit can curse a man.

References fdActorFaceActor(), fdActorFaceDirection(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and fdScriptWait().

Referenced by CottageRoomsCTriggers.

Definition at line 291 of file cottage_rooms_c.c.

scCottageRoomsCAskAboutHolyTree

static void scCottageRoomsCAskAboutHolyTree(void)

A young man asks whether Kolima Forest's holy tree survived.

References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 309 of file cottage_rooms_c.c.

scCottageRoomsCAskAboutSilk

static void scCottageRoomsCAskAboutSilk(void)

A little girl in Bilibin, once the curse is lifted, asks whether the party knows what silk is.

References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 322 of file cottage_rooms_c.c.

scCottageRoomsCTalkToInnkeeper

static void scCottageRoomsCTalkToInnkeeper(void)

Bilibin's innkeeper opens the inn across the counter, or talks.

References fdActorGet(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), gmFlagGet() and mnInnCheckIn().

Referenced by CottageRoomsCTriggers.

Definition at line 334 of file cottage_rooms_c.c.

scCottageRoomsCTalkToBusyChef

static void scCottageRoomsCTalkToBusyChef(void)

The head chef in Bilibin's restaurant, once the curse is lifted, calls out orders once, then sends the party to the waitress.

References fdActorFaceActor(), fdActorFaceDirection(), fdActorSetAttachedEffect(), fdActorStartRepeatedMotion(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and gmFlagSet().

Referenced by CottageRoomsCTriggers.

Definition at line 365 of file cottage_rooms_c.c.

scCottageRoomsCTalkToKitchenWorker

static void scCottageRoomsCTalkToKitchenWorker(void)

The kitchen worker can't keep up with the head chef's energy.

References fdActorFaceActor(), fdActorFaceDirection(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 399 of file cottage_rooms_c.c.

scCottageRoomsCTalkToWaitress

static void scCottageRoomsCTalkToWaitress(void)

The waitress hurries through her work before the head chef yells.

References fdActorFaceActor(), fdActorFaceDirection(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 413 of file cottage_rooms_c.c.

scCottageRoomsCTalkAboutMeal

static void scCottageRoomsCTalkAboutMeal(void)

A diner loves the meal and asks whether the party does too.

References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().

Referenced by CottageRoomsCTriggers.

Definition at line 427 of file cottage_rooms_c.c.

scCottageRoomsCReadMiaAdmirersMind

static void scCottageRoomsCReadMiaAdmirersMind(void)

Mind Read on the burly man in Bilibin who admires Mia, before the curse is lifted, hears his thoughts of her.

References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagGet().

Referenced by CottageRoomsCTriggers.

Definition at line 440 of file cottage_rooms_c.c.

scInit

Sint32 scInit(void)

Sets up Bilibin's buildings.

References fdActorGet() and Sint32.

Definition at line 456 of file cottage_rooms_c.c.

Variables in detail

CottageRoomsCEntrances

extern SCENE_ENTRANCE CottageRoomsCEntrances[]

SCENE_ENTRANCE CottageRoomsCEntrances[]

Referenced by scGetEntrances().

Definition at lines 55 and 468 of file cottage_rooms_c.c.

CottageRoomsCExits

extern Uint32 CottageRoomsCExits[]

Uint32 CottageRoomsCExits[]

Referenced by scGetExits().

Definition at lines 56 and 537 of file cottage_rooms_c.c.

CottageRoomsCActorPlacements

extern ACTOR_PLACE CottageRoomsCActorPlacements[]

ACTOR_PLACE CottageRoomsCActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 57 and 561 of file cottage_rooms_c.c.

CottageRoomsCTriggers

extern CUE CottageRoomsCTriggers[]

CUE CottageRoomsCTriggers[]

References scCottageRoomsCAskAboutHolyTree(), scCottageRoomsCAskAboutSilk(), scCottageRoomsCAskAboutTreeSpirit(), scCottageRoomsCReadMiaAdmirersMind(), scCottageRoomsCTalkAboutMeal(), scCottageRoomsCTalkToArmorMerchant(), scCottageRoomsCTalkToBusyChef(), scCottageRoomsCTalkToHungryDiner(), scCottageRoomsCTalkToInnkeeper(), scCottageRoomsCTalkToItemMerchant(), scCottageRoomsCTalkToKitchenWorker(), scCottageRoomsCTalkToWaitress(), scCottageRoomsCTalkToWeaponMerchant() and scCottageRoomsCTalkToWorriedChef().

Referenced by scGetCues().

Definition at lines 58 and 611 of file cottage_rooms_c.c.