Skip to Content
The Alchemy Project

src/scene/log_rooms_c.c

Log rooms C (SceneIdLogRoomsC), a rooms map drawn in logs, holds only Kolima's rooms: the village's houses, shops and inn. More…

Enumerations

NameDescription
enumLOG_ROOMS_C_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LOG_ROOMS_C_JAR, METATILE_BEHAVIOR_LOG_ROO … }The metatiles the jar, the barrel and the three bookcases answer.
enumanonymous enum { KOLIMA_WEAPON_SHOP, KOLIMA_ARMOR_SHOP, KOLIMA_ITEM_SHOP, INN … }Kolima's shops and inn, as mnShopRun and mnInnCheckIn number them.
enumKOLIMA_ROOM_ACTOR_ID { ACTOR_OLD_MAN_HEARD_OF_WARRIORS, ACTOR_OLD_WOMAN_BEARDED_WAR … }The residents, numbering LogRoomsCActorPlacements' rows from ACTOR_FIRST_PLACED.

Functions

NameDescription
static voidscLogRoomsCTurnVillagersIntoTrees (ACTOR_PLACE *placement)Replaces the cursed residents' sprites and disables their movement and turning.
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)The exits between the rooms, back to the village and into Kolima Tunnel.
const ACTOR_PLACE *scGetActorPlacements (void)Kolima's residents, turned into trees first while the curse lasts.
static voidscLogRoomsCTalkToWeaponMerchant (void)Kolima's weapon seller, once the curse is lifted, opens the shop when spoken to across the counter (facing north).
static voidscLogRoomsCTalkToArmorMerchant (void)Kolima's armor seller, once the curse is lifted, opens the shop across the counter.
static voidscLogRoomsCTalkToItemMerchant (void)Kolima's item seller, once the curse is lifted, opens the shop across the counter.
static voidscLogRoomsCTalkToInnkeeper (void)Kolima's innkeeper, once the curse is lifted, opens the inn across the counter.
const CUE *scGetCues (void)The exits, the residents' words and thoughts, the shops, the bookcases, the jar and the barrel.
Sint32scInit (void)Sets up the houses for the curse and the way they're entered.

Variables

NameDescription
extern SCENE_ENTRANCELogRoomsCEntrances []
extern Uint32LogRoomsCExits []
extern ACTOR_PLACELogRoomsCActorPlacements []
extern CUELogRoomsCCues []

Description

Log rooms C (SceneIdLogRoomsC), a rooms map drawn in logs, holds only Kolima's rooms: the village's houses, shops and inn.

Some of its exits join its own rooms, by the stairs up the inn and the weapon and armor shop. Five lead back out to the village (SceneIdKolima) and one into Kolima Tunnel (SceneIdKolimaTunnel, LOG_ROOMS_C_TO_KOLIMA_TUNNEL).

Like the people outside, the fifteen residents (ACTOR_FIRST_VILLAGER to ACTOR_LAST_VILLAGER) were turned into trees when the curse fell. Until it is lifted in Kolima Forest (FLAG_KOLIMA_CURSE_LIFTED), scGetActorPlacements gives them tree sprites that stand still. They answer only Mind Read, each with the thoughts of someone stuck as a tree ("Who caused all this? Someone must have tried to cut down Tret!").

Once the curse is lifted they talk. They speak of the warriors said to have saved the village, of McCoy's halted palace and the lumberjacks' lost work, and of a father's secret treasure "hidden deep in the forest". The weapon, armor and item sellers and the innkeeper serve the party across their counters.

Three bookcases hold books on the holy tree ("Tret and Laurel are the spirits of the holy trees protecting Kolima forest"), on trees and flowers and on logging. A jar holds a Lucky Medal and a barrel 7 coins.

scInit opens with a window transition and draws one of two rooms into the same place on the map.

Entered by its door from the village (LOG_ROOMS_C_HOUSE_KOLIMA_SOUTH), it is the father's house, with its bookcase and rug and the father's family (ACTOR_FATHER_WITH_A_SECRET, ACTOR_WIFE_KEPT_FROM_THE_SECRET and ACTOR_CHILD_TOLD_THE_SECRET).

It can also be entered from behind: by the village doorway the leader steps south into (LOG_ROOMS_C_HOUSE_KOLIMA_NORTH), or up the ladder from Kolima Tunnel (LOG_ROOMS_C_FROM_KOLIMA_TUNNEL). Then other metatiles are copied in, and it is a storeroom of crates and sacks with the ladder down in its floor. The family is put out of sight.

Enumerations in detail

LOG_ROOMS_C_METATILE_BEHAVIOR

enum LOG_ROOMS_C_METATILE_BEHAVIOR

The metatiles the jar, the barrel and the three bookcases answer.

EnumeratorValueDescription
METATILE_BEHAVIOR_LOG_ROOMS_C_JAR100
METATILE_BEHAVIOR_LOG_ROOMS_C_BARREL101
METATILE_BEHAVIOR_LOG_ROOMS_C_HOLY_TREE_BOOKCASE200"The Holy Tree of Kolima Forest."
METATILE_BEHAVIOR_LOG_ROOMS_C_TREES_BOOKCASE201"Dictionary of Trees and Flowers."
METATILE_BEHAVIOR_LOG_ROOMS_C_LOGGING_BOOKCASE202"The Art of Logging."

Definition at line 53 of file log_rooms_c.c.

anonymous enum

enum { KOLIMA_WEAPON_SHOP, KOLIMA_ARMOR_SHOP, KOLIMA_ITEM_SHOP, INN_ID_KOLIMA }

Kolima's shops and inn, as mnShopRun and mnInnCheckIn number them.

EnumeratorValueDescription
KOLIMA_WEAPON_SHOP13
KOLIMA_ARMOR_SHOP14
KOLIMA_ITEM_SHOP15
INN_ID_KOLIMA3

Definition at line 66 of file log_rooms_c.c.

KOLIMA_ROOM_ACTOR_ID

enum KOLIMA_ROOM_ACTOR_ID

The residents, numbering LogRoomsCActorPlacements' rows from ACTOR_FIRST_PLACED. Their notes quote what they say once the curse is lifted.

EnumeratorValueDescription
ACTOR_OLD_MAN_HEARD_OF_WARRIORSACTOR_FIRST_PLACEDAn old man with a cane.
ACTOR_OLD_WOMAN_BEARDED_WARRIORSAn old woman.
ACTOR_FATHER_WITH_A_SECRETThe father with a secret, a burly grey-haired man: "You saved Kolima? Wow! That makes me want to tell you a secret!" His thoughts: "It's hidden deep in the forest, but I can't tell him that!"
ACTOR_WIFE_KEPT_FROM_THE_SECRETHis wife, a woman in a green dress.
ACTOR_CHILD_TOLD_THE_SECRETTheir son, a small boy with fair hair.
ACTOR_LUMBERJACK_FATHERA strongman, stocky and muscular.
ACTOR_LUMBERJACKS_DAUGHTERHis daughter, a woman with long fair hair.
ACTOR_LUMBERJACKS_HUNGRY_SONHis son, a small boy with fair hair.
ACTOR_WEAPON_MERCHANT
ACTOR_ARMOR_MERCHANT
ACTOR_ITEM_MERCHANT
ACTOR_INNKEEPER
ACTOR_VILLAGER_QUIET_VILLAGEA woman in a pink dress and an apron.
ACTOR_LUMBERJACK_FROM_IMILA strongman, stocky and muscular.
ACTOR_MERCHANT_GUESTA man carrying a pack.
ACTOR_FIRST_VILLAGERACTOR_OLD_MAN_HEARD_OF_WARRIORS
ACTOR_LAST_VILLAGERACTOR_MERCHANT_GUEST

Definition at line 76 of file log_rooms_c.c.

Functions in detail

scLogRoomsCTurnVillagersIntoTrees

static void scLogRoomsCTurnVillagersIntoTrees(ACTOR_PLACE *placement)

Replaces the cursed residents' sprites and disables their movement and turning.

References Sint32.

Referenced by scGetActorPlacements().

Definition at line 108 of file log_rooms_c.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References LogRoomsCEntrances.

Definition at line 138 of file log_rooms_c.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 143 of file log_rooms_c.c.

scGetExits

const Uint32 *scGetExits(void)

The exits between the rooms, back to the village and into Kolima Tunnel.

References LogRoomsCExits.

Definition at line 149 of file log_rooms_c.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Kolima's residents, turned into trees first while the curse lasts.

References fdAssignViewFlags(), gmFlagGet(), LogRoomsCActorPlacements and scLogRoomsCTurnVillagersIntoTrees().

Definition at line 155 of file log_rooms_c.c.

scLogRoomsCTalkToWeaponMerchant

static void scLogRoomsCTalkToWeaponMerchant(void)

Kolima's weapon seller, once the curse is lifted, opens the shop when spoken to across the counter (facing north).

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

Referenced by LogRoomsCCues.

Definition at line 170 of file log_rooms_c.c.

scLogRoomsCTalkToArmorMerchant

static void scLogRoomsCTalkToArmorMerchant(void)

Kolima's armor seller, once the curse is lifted, opens the shop across the counter.

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

Referenced by LogRoomsCCues.

Definition at line 190 of file log_rooms_c.c.

scLogRoomsCTalkToItemMerchant

static void scLogRoomsCTalkToItemMerchant(void)

Kolima's item seller, once the curse is lifted, opens the shop across the counter.

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

Referenced by LogRoomsCCues.

Definition at line 210 of file log_rooms_c.c.

scLogRoomsCTalkToInnkeeper

static void scLogRoomsCTalkToInnkeeper(void)

Kolima's innkeeper, once the curse is lifted, opens the inn across the counter.

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

Referenced by LogRoomsCCues.

Definition at line 230 of file log_rooms_c.c.

scGetCues

const CUE *scGetCues(void)

The exits, the residents' words and thoughts, the shops, the bookcases, the jar and the barrel.

References LogRoomsCCues.

Definition at line 252 of file log_rooms_c.c.

scInit

Sint32 scInit(void)

Sets up the houses for the curse and the way they're entered.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatilesTo(), gmFlagGet(), MainRoutineStateWork, Sint32, state and width.

Definition at line 258 of file log_rooms_c.c.

Variables in detail

LogRoomsCEntrances

extern SCENE_ENTRANCE LogRoomsCEntrances[]

SCENE_ENTRANCE LogRoomsCEntrances[]

Referenced by scGetEntrances().

Definition at lines 47 and 308 of file log_rooms_c.c.

LogRoomsCExits

extern Uint32 LogRoomsCExits[]

Uint32 LogRoomsCExits[]

Referenced by scGetExits().

Definition at lines 48 and 419 of file log_rooms_c.c.

LogRoomsCActorPlacements

extern ACTOR_PLACE LogRoomsCActorPlacements[]

ACTOR_PLACE LogRoomsCActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 49 and 462 of file log_rooms_c.c.

LogRoomsCCues

extern CUE LogRoomsCCues[]

CUE LogRoomsCCues[]

References scLogRoomsCTalkToArmorMerchant(), scLogRoomsCTalkToInnkeeper(), scLogRoomsCTalkToItemMerchant() and scLogRoomsCTalkToWeaponMerchant().

Referenced by scGetCues().

Definition at lines 50 and 496 of file log_rooms_c.c.