Skip to Content
The Alchemy Project

src/scene/hammet_palace.c

Hammet Palace (SceneIdHammetPalace), the rooms of Lord Hammet's palace in Kalay. More…

Enumerations

NameDescription
enumHAMMET_PALACE_DOOR_ANIMATION { HAMMET_PALACE_WIDE_DOORS_ANIMATION, HAMMET_PALACE_NARROW_DOO … }The tileset animations that swing the palace's doors open as the leader walks through one (scHammetPalaceLeaveThroughDoor runs both, whichever door it is): the doors two metatiles across, as Layana's room's, and the arched doors one metatile across, as the west wing's.
enumHAMMET_PALACE_ACTOR_ID { ACTOR_LAYANA, ACTOR_HAMMET, ACTOR_FIRST_SOLDIER, ACTOR_SECON … }The palace's actors, numbered in the order of HammetPalaceActorPlacements from ACTOR_FIRST_PLACED.

Functions

NameDescription
static voidscHammetPalaceSetUpEntrance (void)Sets up the room the party enters by: every door drawn shut, Layana and Hammet where the story has them, and the door to the underground passage open once Layana has had it opened.
static voidscHammetPalaceIvanReportsToLayana (void)Ivan's report in Hammet Palace, when the guards at the door bring the party to Layana: she had hoped Hammet came back with him.
static voidscHammetPalaceFacePartyOutward (Sint32 waitTicks)Turns the party outward from the group, then optionally waits.
static voidscHammetPalaceFacePartyNorth (Sint32 waitTicks)Turns all four party members north toward Layana, then optionally waits.
static voidscHammetPalaceHammetsHomecoming (void)Hammet's homecoming in Hammet Palace, the first time the party walks into Layana's room once he is free.
static inline voidscHammetPalaceAdvanceMessage (Sint32 amount)Skips messages of the conversation, past an answer not taken.
const SCENE_ENTRANCE *scGetEntrances (void)Selects Hammet Palace's entrances, or the fallback table for any other scene.
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)Hammet Palace's actors, the people only of the room the party enters (CONDITION_IN_VIEW).
const CUE *scGetCues (void)Hammet Palace's cues, or none for any other scene.
static voidscHammetPalaceAskWhetherHammetWillBeReleased (void)Talking to one of the people of Hammet Palace before Hammet is free: she hopes for his release.
static voidscHammetPalaceAskWhetherSilkTradeHasEnded (void)Talking to one of the people of Hammet Palace before Hammet is free: he worries for Hammet's silk trade.
static voidscHammetPalaceLayanaScoldsLunpaVisit (void)Layana scolds Isaac for sneaking into Lunpa.
static voidscHammetPalaceLeaveThroughDoor (void)Walking north into a door of the entrance room or the landing: it opens, and the leader walks through it to the next room.
Sint32scInit (void)Sets up Hammet Palace as the party enters.

Variables

NameDescription
extern Sint32HammetPalacePartyActions []Garet, Ivan and Mia walk into Isaac and fall in behind him.
extern SCENE_ENTRANCEHammetPalaceEntrancesOther []
extern SCENE_ENTRANCEHammetPalaceEntrances []
extern Uint32HammetPalaceExits []
extern ACTOR_PLACEHammetPalaceActorPlacementsOther []
extern ACTOR_PLACEHammetPalaceActorPlacements []
extern CUEHammetPalaceCuesOther []
extern CUEHammetPalaceCues []

Description

Hammet Palace (SceneIdHammetPalace), the rooms of Lord Hammet's palace in Kalay.

The scene before its door, also Hammet Palace in the game's area names, is kalay.c's HammetPalaceGrounds.

Two scripts in the room where Lady Layana stands mark the party's part in Hammet's rescue from Lunpa. Between them three flags pick where she stands and what she says:

The people of the palace (ACTOR_WORRIED_ABOUT_THE_TOWNSFOLK to ACTOR_ASKING_ABOUT_THE_SILK_TRADE) have one line before Hammet is free and another after.

Walking north into the doors of the entrance room and of the landing opens them. The other exits join the rooms plainly.

HAMMET_PALACE_HAMMET_PALACE_GROUNDS leads out to the front of the palace (HAMMET_PALACE_GROUNDS_HAMMET_PALACE), and HAMMET_PALACE_KALAY_TUNNEL_TREASURE_ROOM down into the Kalay Tunnel (KALAY_TUNNEL_TREASURE_ROOM_HAMMET_PALACE).

Searching finds a turban, the symbol of Kalay's soldiers, and two books, "Business and You" and "The Good Host". A chest holds a Water Jacket and a barrel a Nut.

Enumerations in detail

HAMMET_PALACE_DOOR_ANIMATION

enum HAMMET_PALACE_DOOR_ANIMATION

The tileset animations that swing the palace's doors open as the leader walks through one (scHammetPalaceLeaveThroughDoor runs both, whichever door it is): the doors two metatiles across, as Layana's room's, and the arched doors one metatile across, as the west wing's.

EnumeratorValueDescription
HAMMET_PALACE_WIDE_DOORS_ANIMATION1
HAMMET_PALACE_NARROW_DOORS_ANIMATION2

Definition at line 76 of file hammet_palace.c.

HAMMET_PALACE_ACTOR_ID

enum HAMMET_PALACE_ACTOR_ID

The palace's actors, numbered in the order of HammetPalaceActorPlacements from ACTOR_FIRST_PLACED.

Its rows for Garet, Ivan and Mia keep the party's own slots.

EnumeratorValueDescription
ACTOR_LAYANAACTOR_FIRST_PLACED
ACTOR_HAMMETBeside Layana, and kept out of sight until he is free.
ACTOR_FIRST_SOLDIERThe soldiers of Kalay in Ivan's report
ACTOR_SECOND_SOLDIER(SPRITE_SOLDIER_IN_TURBAN, as the guards at the palace door in kalay.c), out of sight at other times.
ACTOR_WORRIED_ABOUT_THE_TOWNSFOLKThe people of the palace, each with one line before Hammet is free and another after. A young man with brown hair in a purple shirt who worries that the townsfolk will learn Hammet is a hostage. "The townsfolk don't know about Lord Hammet yet, do they?" After: "I hear Hammet was saved by you people..."
ACTOR_ASKING_IF_HAMMET_WILL_BE_RELEASEDA woman with fair hair who asks whether Hammet will be freed. "Lord Hammet will be released soon. Right?" After: "They say Hammet's return is supposed to be a secret for now."
ACTOR_LEFT_THE_PASSAGE_DOOR_OPENA grey-haired man in a black suit who tells of Layana's grief, and later of the door Layana had opened for the party. "Layana is putting up a strong front whenever people are around." After: "I left the door to the underground passage open, so go have a look."
ACTOR_AFRAID_OF_DODONPAS_THUGSA bald man in red who fears Dodonpa's men. "Merchants are supposed to be protected under the laws of Angara." After: "I wonder if any of Dodonpa's thugs have come here after Hammet..."
ACTOR_ASKING_ABOUT_THE_SILK_TRADEA young man with brown hair in green who asks whether Hammet's silk trade has ended. "Has the legacy of Lord Hammet's silk trading come to an end?" After: "The secret passage is locked because Hammet's treasure is in there."

Definition at line 86 of file hammet_palace.c.

Functions in detail

scHammetPalaceSetUpEntrance

static void scHammetPalaceSetUpEntrance(void)

Sets up the room the party enters by: every door drawn shut, Layana and Hammet where the story has them, and the door to the underground passage open once Layana has had it opened.

References fdActorGet(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatilesTo(), fdTilesetAnimationPause(), gmFlagGet(), MainRoutineStateWork, scHammetPalaceHammetsHomecoming(), scHammetPalaceIvanReportsToLayana(), Sint32 and sySynch().

Referenced by scInit().

Definition at lines 134 and 295 of file hammet_palace.c.

scHammetPalaceIvanReportsToLayana

static void scHammetPalaceIvanReportsToLayana(void)

Ivan's report in Hammet Palace, when the guards at the door bring the party to Layana: she had hoped Hammet came back with him.

References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetScript(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWalkTo(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdPaletteFadeApplySource(), fdPaletteFadeApplyTarget(), fdPaletteFadeStartInterpolation(), fdScriptAskYesNo(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagClear(), gmFlagSet(), HammetPalacePartyActions, scFieldScriptShowMessageThenWait(), scHammetPalaceFacePartyNorth(), scHammetPalaceFacePartyOutward(), Sint32, state and sySynch().

Referenced by scHammetPalaceSetUpEntrance().

Definition at lines 135 and 357 of file hammet_palace.c.

scHammetPalaceFacePartyOutward

static void scHammetPalaceFacePartyOutward(Sint32 waitTicks)

Turns the party outward from the group, then optionally waits.

References fdActorFaceDirection(), fdScriptWait() and Sint32.

Referenced by scHammetPalaceIvanReportsToLayana().

Definition at lines 136 and 971 of file hammet_palace.c.

scHammetPalaceFacePartyNorth

static void scHammetPalaceFacePartyNorth(Sint32 waitTicks)

Turns all four party members north toward Layana, then optionally waits.

References fdActorFaceDirection(), fdScriptWait() and Sint32.

Referenced by scHammetPalaceHammetsHomecoming() and scHammetPalaceIvanReportsToLayana().

Definition at lines 137 and 984 of file hammet_palace.c.

scHammetPalaceHammetsHomecoming

static void scHammetPalaceHammetsHomecoming(void)

Hammet's homecoming in Hammet Palace, the first time the party walks into Layana's room once he is free.

References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorRunScriptAndWait(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetPosFX(), fdActorSetScript(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWalkTo(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), gmFlagClear(), gmFlagSet(), HammetPalacePartyActions, scFieldScriptShowMessageThenWait(), scHammetPalaceAdvanceMessage(), scHammetPalaceFacePartyNorth(), Sint32, state and sySynch().

Referenced by scHammetPalaceSetUpEntrance().

Definition at lines 138 and 998 of file hammet_palace.c.

scHammetPalaceAdvanceMessage

static inline void scHammetPalaceAdvanceMessage(Sint32 amount)

Skips messages of the conversation, past an answer not taken.

References Sint32.

Referenced by scHammetPalaceHammetsHomecoming().

Definition at line 141 of file hammet_palace.c.

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

Selects Hammet Palace's entrances, or the fallback table for any other scene.

References HammetPalaceEntrances, HammetPalaceEntrancesOther and MainRoutineStateWork.

Definition at line 147 of file hammet_palace.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 158 of file hammet_palace.c.

scGetExits

const Uint32 *scGetExits(void)

References HammetPalaceExits.

Definition at line 163 of file hammet_palace.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

Hammet Palace's actors, the people only of the room the party enters (CONDITION_IN_VIEW).

References fdAssignViewFlags(), HammetPalaceActorPlacements, HammetPalaceActorPlacementsOther and MainRoutineStateWork.

Definition at line 170 of file hammet_palace.c.

scGetCues

const CUE *scGetCues(void)

Hammet Palace's cues, or none for any other scene.

References HammetPalaceCues, HammetPalaceCuesOther and MainRoutineStateWork.

Definition at line 181 of file hammet_palace.c.

scHammetPalaceAskWhetherHammetWillBeReleased

static void scHammetPalaceAskWhetherHammetWillBeReleased(void)

Talking to one of the people of Hammet Palace before Hammet is free: she hopes for his release.

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

Referenced by HammetPalaceCues.

Definition at line 194 of file hammet_palace.c.

scHammetPalaceAskWhetherSilkTradeHasEnded

static void scHammetPalaceAskWhetherSilkTradeHasEnded(void)

Talking to one of the people of Hammet Palace before Hammet is free: he worries for Hammet's silk trade.

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

Referenced by HammetPalaceCues.

Definition at line 207 of file hammet_palace.c.

scHammetPalaceLayanaScoldsLunpaVisit

static void scHammetPalaceLayanaScoldsLunpaVisit(void)

Layana scolds Isaac for sneaking into Lunpa.

References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart() and gmFlagSet().

Referenced by HammetPalaceCues.

Definition at line 219 of file hammet_palace.c.

scHammetPalaceLeaveThroughDoor

static void scHammetPalaceLeaveThroughDoor(void)

Walking north into a door of the entrance room or the landing: it opens, and the leader walks through it to the next room.

Each step cue's metatile is the number of its exit. The door to Layana's room thumps open, and the leader walks straight on rather than first lining up with the middle of his column.

References fdActorCenterAndWalk(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), state, syImportScriptSetExitRequest() and sySoundPlay().

Referenced by HammetPalaceCues.

Definition at line 245 of file hammet_palace.c.

scInit

Sint32 scInit(void)

Sets up Hammet Palace as the party enters.

References MainRoutineStateWork, scHammetPalaceSetUpEntrance() and Sint32.

Definition at line 281 of file hammet_palace.c.

Variables in detail

HammetPalacePartyActions

extern Sint32 HammetPalacePartyActions[]

Sint32 HammetPalacePartyActions[]

Garet, Ivan and Mia walk into Isaac and fall in behind him.

References Sint32.

Referenced by scHammetPalaceHammetsHomecoming() and scHammetPalaceIvanReportsToLayana().

Definition at lines 63 and 1216 of file hammet_palace.c.

HammetPalaceEntrancesOther

extern SCENE_ENTRANCE HammetPalaceEntrancesOther[]

SCENE_ENTRANCE HammetPalaceEntrancesOther[]

Referenced by scGetEntrances().

Definition at lines 64 and 1226 of file hammet_palace.c.

HammetPalaceEntrances

extern SCENE_ENTRANCE HammetPalaceEntrances[]

SCENE_ENTRANCE HammetPalaceEntrances[]

Referenced by scGetEntrances().

Definition at lines 65 and 1239 of file hammet_palace.c.

HammetPalaceExits

extern Uint32 HammetPalaceExits[]

Uint32 HammetPalaceExits[]

Referenced by scGetExits().

Definition at lines 66 and 1357 of file hammet_palace.c.

HammetPalaceActorPlacementsOther

extern ACTOR_PLACE HammetPalaceActorPlacementsOther[]

ACTOR_PLACE HammetPalaceActorPlacementsOther[]

Referenced by scGetActorPlacements().

Definition at lines 67 and 1404 of file hammet_palace.c.

HammetPalaceActorPlacements

extern ACTOR_PLACE HammetPalaceActorPlacements[]

ACTOR_PLACE HammetPalaceActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 68 and 1409 of file hammet_palace.c.

HammetPalaceCuesOther

extern CUE HammetPalaceCuesOther[]

CUE HammetPalaceCuesOther[]

Referenced by scGetCues().

Definition at lines 69 and 1437 of file hammet_palace.c.

HammetPalaceCues

extern CUE HammetPalaceCues[]

CUE HammetPalaceCues[]

References scHammetPalaceAskWhetherHammetWillBeReleased(), scHammetPalaceAskWhetherSilkTradeHasEnded(), scHammetPalaceLayanaScoldsLunpaVisit() and scHammetPalaceLeaveThroughDoor().

Referenced by scGetCues().

Definition at lines 70 and 1441 of file hammet_palace.c.