Alchemy
Loading...
Searching...
No Matches

kalay_interiors.c File Reference

Kalay's homes, inn, dining rooms and sanctum. More...

Go to the source code of this file.

Enumerations

enum  KalayInteriorsActor { ACTOR_INNKEEPER = 8 , ACTOR_PRIEST = 8 , ACTOR_TOUR_GUIDE = 12 }
 The inn's rooms are entered through entrances 9 to 15 and 17. More...

Functions

static void KalayInteriors_ApplyRoomState (void)
 Once the Colosso tour has left, its guests are gone from the inn, and two residents from the houses.
const struct SceneEntrance * KalayInteriors_GetEntrances (void)
 Selects the entrance table for the rooms or sanctum in this scene.
const struct SceneRegion * KalayInteriors_GetRegions (void)
const u32 * KalayInteriors_GetExits (void)
const struct ScenePlacement * KalayInteriors_GetPlacements (void)
 The inn rooms share a placement table, clipped to the current view.
const struct SceneEvent * KalayInteriors_GetEvents (void)
 Selects room dialogue with the same entrance grouping as the placements.
static void KalayInteriors_TalkToTourGuide (void)
 The tour guide in the inn's dining room: now the party has heard of the tour.
static void KalayInteriors_AskAboutSouthernContinent (void)
 A resident asks whether the party knows the continent south of Tolbi, and answers either way.
static void KalayInteriors_TalkToInnkeeper (void)
 Spoken to across the counter, the leader facing west, the innkeeper offers a room.
static void KalayInteriors_TalkToPriest (void)
 Spoken to across the counter, the leader facing north, the priest offers the sanctum's services; from elsewhere he says Kalay is a peaceful place.
static void KalayInteriors_OpenDoorAndExit (void)
 Stops the room actors, opens the selected door and walks the leader out.
s32 KalayInteriors_Initialize (void)
 Sets the opening transition and restores room-specific actors and tiles.

Variables

struct SceneEntrance gKalayInteriors_NoEntrances []
struct SceneEntrance gKalayInteriors_HouseEntrances []
struct SceneEntrance gKalayInteriors_SanctumEntrances []
u32 gKalayInteriors_Exits []
struct ScenePlacement gKalayInteriors_NoPlacements []
struct ScenePlacement gKalayInteriors_HousePlacements []
struct ScenePlacement gKalayInteriors_InnPlacements []
struct ScenePlacement gKalayInteriors_SanctumPlacements []
struct SceneEvent gKalayInteriors_NoEvents []
struct SceneEvent gKalayInteriors_HouseEvents []
 A bare flag as a condition holds while that flag is clear: these lines are spoken before the Colosso tour leaves, the next ones after.
struct SceneEvent gKalayInteriors_InnEvents []
struct SceneEvent gKalayInteriors_SanctumEvents []
u16 gKalayInteriors_DoorCellSteps []
struct MapCellAnim gKalayInteriors_DoorCells []

Detailed Description

Kalay's homes, inn, dining rooms and sanctum.

The inn changes when the Colosso tour group leaves; room entrances select their shared actor tables.

Definition in file kalay_interiors.c.

Enumeration Type Documentation

◆ KalayInteriorsActor

The inn's rooms are entered through entrances 9 to 15 and 17.

Enumerator
ACTOR_INNKEEPER 

in the inn

ACTOR_PRIEST 

in the sanctum

ACTOR_TOUR_GUIDE 

in the inn's dining room

Definition at line 30 of file kalay_interiors.c.

Function Documentation

◆ KalayInteriors_ApplyRoomState()

void KalayInteriors_ApplyRoomState ( void )
static

Once the Colosso tour has left, its guests are gone from the inn, and two residents from the houses.

Entrance 3 instead redraws a rectangle of cells.

Definition at line 245 of file kalay_interiors.c.

Referenced by KalayInteriors_ApplyRoomState(), and KalayInteriors_Initialize().

◆ KalayInteriors_GetEntrances()

const struct SceneEntrance * KalayInteriors_GetEntrances ( void )

Selects the entrance table for the rooms or sanctum in this scene.

Definition at line 39 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEntrances().

◆ KalayInteriors_GetRegions()

const struct SceneRegion * KalayInteriors_GetRegions ( void )

Definition at line 51 of file kalay_interiors.c.

Referenced by KalayInteriors_GetRegions().

◆ KalayInteriors_GetExits()

const u32 * KalayInteriors_GetExits ( void )

Definition at line 53 of file kalay_interiors.c.

Referenced by KalayInteriors_GetExits().

◆ KalayInteriors_GetPlacements()

const struct ScenePlacement * KalayInteriors_GetPlacements ( void )

The inn rooms share a placement table, clipped to the current view.

Definition at line 56 of file kalay_interiors.c.

Referenced by KalayInteriors_GetPlacements().

◆ KalayInteriors_GetEvents()

const struct SceneEvent * KalayInteriors_GetEvents ( void )

Selects room dialogue with the same entrance grouping as the placements.

Definition at line 88 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEvents().

◆ KalayInteriors_TalkToTourGuide()

void KalayInteriors_TalkToTourGuide ( void )
static

The tour guide in the inn's dining room: now the party has heard of the tour.

"Please finish eating if you are taking the tour! We'll be leaving soon!"

Definition at line 117 of file kalay_interiors.c.

Referenced by KalayInteriors_TalkToTourGuide().

◆ KalayInteriors_AskAboutSouthernContinent()

void KalayInteriors_AskAboutSouthernContinent ( void )
static

A resident asks whether the party knows the continent south of Tolbi, and answers either way.

Definition at line 127 of file kalay_interiors.c.

Referenced by KalayInteriors_AskAboutSouthernContinent().

◆ KalayInteriors_TalkToInnkeeper()

void KalayInteriors_TalkToInnkeeper ( void )
static

Spoken to across the counter, the leader facing west, the innkeeper offers a room.

From any other side he asks whether the party is going to Tolbi too, or, once the tour has left, says how empty the inn feels.

Definition at line 137 of file kalay_interiors.c.

Referenced by KalayInteriors_TalkToInnkeeper().

◆ KalayInteriors_TalkToPriest()

void KalayInteriors_TalkToPriest ( void )
static

Spoken to across the counter, the leader facing north, the priest offers the sanctum's services; from elsewhere he says Kalay is a peaceful place.

Definition at line 160 of file kalay_interiors.c.

Referenced by KalayInteriors_TalkToPriest().

◆ KalayInteriors_OpenDoorAndExit()

void KalayInteriors_OpenDoorAndExit ( void )
static

Stops the room actors, opens the selected door and walks the leader out.

Definition at line 176 of file kalay_interiors.c.

Referenced by KalayInteriors_OpenDoorAndExit().

◆ KalayInteriors_Initialize()

s32 KalayInteriors_Initialize ( void )

Sets the opening transition and restores room-specific actors and tiles.

Definition at line 235 of file kalay_interiors.c.

Referenced by KalayInteriors_Initialize().

Variable Documentation

◆ gKalayInteriors_NoEntrances

struct SceneEntrance gKalayInteriors_NoEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 284 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEntrances().

◆ gKalayInteriors_HouseEntrances

struct SceneEntrance gKalayInteriors_HouseEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 144, 0, 192, FACING_NORTH, 0, 5, 45, 245, 230, 0},
{2, CONDITION_ALWAYS, 400, 0, 192, FACING_NORTH, 0, 255, 45, 485, 230, 0},
{3, CONDITION_ALWAYS, 624, 0, 240, FACING_NORTH, 0, 500, 45, 735, 275, 0},
{4, CONDITION_ALWAYS, 128, 0, 432, FACING_NORTH, 0, 35, 290, 275, 468, 0},
{5, CONDITION_ALWAYS, 384, 0, 384, FACING_NORTH, 0, 305, 255, 545, 485, 0},
{6, CONDITION_ALWAYS, 464, 0, 448, FACING_NORTH, 0, 305, 255, 545, 485, 0},
{7, CONDITION_ALWAYS, 720, 0, 496, FACING_NORTH, 0, 630, 305, 875, 535, 0},
{8, CONDITION_ALWAYS, 800, 0, 440, FACING_NORTH, 0, 630, 305, 875, 535, 0},
{9, CONDITION_ALWAYS, 48, 0, 640, FACING_NORTH, 0, 0, 495, 305, 775, 0},
{10, CONDITION_ALWAYS, 224, 0, 736, FACING_NORTH, 0, 0, 495, 305, 775, 0},
{11, CONDITION_ALWAYS, 408, 0, 616, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
{12, CONDITION_ALWAYS, 552, 0, 648, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
{13, CONDITION_ALWAYS, 632, 0, 648, FACING_SOUTH, 0, 355, 525, 690, 710, 0},
{14, CONDITION_ALWAYS, 552, 0, 680, FACING_NORTH, 0, 355, 525, 690, 710, 0},
{15, CONDITION_ALWAYS, 632, 0, 680, FACING_NORTH, 0, 355, 525, 690, 710, 0},
{16, CONDITION_ALWAYS, 808, 0, 616, FACING_SOUTH, 0, 745, 570, 935, 720, 0},
{17, CONDITION_ALWAYS, 440, 0, 872, FACING_NORTH, 0, 340, 740, 520, 900, 0},
{18, CONDITION_ALWAYS, 584, 0, 872, FACING_NORTH, 0, 540, 740, 730, 900, 0},
{19, CONDITION_ALWAYS, 840, 0, 792, FACING_SOUTH, 0, 710, 740, 940, 900, 0},
}
@ FACING_NORTH
Definition field_scene.h:32

Definition at line 289 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEntrances().

◆ gKalayInteriors_SanctumEntrances

struct SceneEntrance gKalayInteriors_SanctumEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 168, 0, 168, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 248, 0, 304, FACING_NORTH, 0, 110, 35, 390, 345, 0},
{2, CONDITION_ALWAYS, 248, 0, 128, FACING_SOUTH, 0, 110, 35, 390, 345, 0},
}

Definition at line 313 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEntrances().

◆ gKalayInteriors_Exits

u32 gKalayInteriors_Exits[]
Initial value:
= {
SCENE_EXITS(100), SCENE_EXIT(1, 99, 1), SCENE_EXIT(2, 99, 2),
SCENE_EXIT(3, 99, 3), SCENE_EXIT(4, 99, 4), SCENE_EXIT(5, 99, 12),
SCENE_EXIT(6, 99, 5), SCENE_EXIT(7, 99, 6), SCENE_EXIT(8, 99, 13),
SCENE_EXIT(9, 100, 11), SCENE_EXIT(10, 99, 7), SCENE_EXIT(11, 100, 9),
SCENE_EXIT(12, 100, 17), SCENE_EXIT(13, 100, 18), SCENE_EXIT(14, 100, 19),
SCENE_EXIT(15, 100, 16), SCENE_EXIT(16, 100, 15), SCENE_EXIT(17, 100, 12),
SCENE_EXIT(18, 100, 13), SCENE_EXIT(19, 100, 14), SCENE_EXIT(0, 101, 0),
}
#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 320 of file kalay_interiors.c.

Referenced by KalayInteriors_GetExits().

◆ gKalayInteriors_NoPlacements

struct ScenePlacement gKalayInteriors_NoPlacements[]
Initial value:
= {
}

Definition at line 331 of file kalay_interiors.c.

Referenced by KalayInteriors_GetPlacements().

◆ gKalayInteriors_HousePlacements

struct ScenePlacement gKalayInteriors_HousePlacements[]
Initial value:
= {
{ 0x6c, 0x0, ACTOR_STAND,
{ 0x6a, 0x0, ACTOR_STAND,
{ 0x65, 0x0, ACTOR_STAND,
{ 0x73, 0x0, ACTOR_STAND,
{ 0x7e, 0x0, ACTOR_WANDER,
{ 0x67, 0x0, ACTOR_STAND,
{ 0x7f, 0x0, ACTOR_STAND,
{ 0x6f, 0x0, ACTOR_STAND,
{ 0x6c, 0x0, ACTOR_STAND,
{ 0x6a, 0x0, ACTOR_STAND,
{ 0x8f, 0x0, ACTOR_STAND,
{ 0x8f, 0x0, ACTOR_STAND,
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_FACE_PARTY
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_WANDER
@ ACTOR_STAND
@ FACING_NORTHEAST
Definition field_scene.h:33
@ FACING_SOUTHEAST
Definition field_scene.h:27
@ FACING_SOUTHWEST
Definition field_scene.h:29
@ FACING_NORTHWEST
Definition field_scene.h:31
#define PIXELS(value)

Definition at line 336 of file kalay_interiors.c.

Referenced by KalayInteriors_GetPlacements().

◆ gKalayInteriors_InnPlacements

struct ScenePlacement gKalayInteriors_InnPlacements[]
Initial value:
= {
{ 0x77, 0x0, ACTOR_STAND,
{ 0x80, 0x0, ACTOR_WANDER,
PIXELS(505), 0, PIXELS(665), FACING_EAST, TALK_FACE_PARTY, 0 },
{ 0x84, 0x0, ACTOR_STAND,
{ 0x94, 0x0, ACTOR_STAND,
{ 0xab, 0x0, ACTOR_STAND,
{ 0xab, 0x0, ACTOR_STAND,
{ 0x72, 0x0, ACTOR_STAND,
PIXELS(207), 0, PIXELS(672), FACING_WEST, TALK_FACE_PARTY, 0 },
{ 0x67, 0x0, ACTOR_STAND,
{ 0x6f, 0x0, ACTOR_STAND,
{ 0x9d, 0x0, ACTOR_STAND,
{ 0x43, 0x0, ACTOR_STAND,
{ 0x42, 0x0, ACTOR_STAND,
}
@ TALK_KEEP_FACING
@ FACING_EAST
Definition field_scene.h:26
@ FACING_WEST
Definition field_scene.h:30

Definition at line 364 of file kalay_interiors.c.

Referenced by KalayInteriors_GetPlacements().

◆ gKalayInteriors_SanctumPlacements

struct ScenePlacement gKalayInteriors_SanctumPlacements[]
Initial value:

Definition at line 392 of file kalay_interiors.c.

Referenced by KalayInteriors_GetPlacements().

◆ gKalayInteriors_NoEvents

struct SceneEvent gKalayInteriors_NoEvents[]
Initial value:
= {
}
#define SCENE_EVENTS_END

Definition at line 398 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEvents().

◆ gKalayInteriors_HouseEvents

struct SceneEvent gKalayInteriors_HouseEvents[]

A bare flag as a condition holds while that flag is clear: these lines are spoken before the Colosso tour leaves, the next ones after.

Definition at line 404 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEvents().

◆ gKalayInteriors_InnEvents

struct SceneEvent gKalayInteriors_InnEvents[]

Definition at line 455 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEvents().

◆ gKalayInteriors_SanctumEvents

struct SceneEvent gKalayInteriors_SanctumEvents[]
Initial value:
= {
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgKalayInteriorsICameHereToSpreadGood) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
static void KalayInteriors_TalkToPriest(void)
Spoken to across the counter, the leader facing north, the priest offers the sanctum's services; from...
@ ACTOR_PRIEST
in the sanctum

Definition at line 504 of file kalay_interiors.c.

Referenced by KalayInteriors_GetEvents().

◆ gKalayInteriors_DoorCellSteps

u16 gKalayInteriors_DoorCellSteps[]
Initial value:
= {
MAP_CELL_STEP(7, 125, 1, 2, 5),
MAP_CELL_STEP(8, 125, 1, 2, 5),
}
#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 512 of file kalay_interiors.c.

◆ gKalayInteriors_DoorCells

struct MapCellAnim gKalayInteriors_DoorCells[]
Initial value:

Definition at line 518 of file kalay_interiors.c.

Referenced by KalayInteriors_OpenDoorAndExit().