mccoy_palace.c
Lord McCoy's palace in Bilibin.
games/tbs/src/scene/mccoy_palace.c on GitHub
Lord McCoy's palace in Bilibin. At the first audience McCoy asks the party to lift the curse on Kolima, then turns them away as too young; once the curse is lifted, his guards bring them back and he rewards them with one of four treasures.
Scene flags: FLAG_SCENE_TEMP_00, the escort has opened the front door; FLAG_SCENE_TEMP_02, the party is choosing its reward; FLAG_SCENE_TEMP_10 to _13, the chest it chose. The flags from 0x300 are reused from place to place: 0x302 and 0x303, the admirer has spoken or been read once; 0x321, McCoy has turned the party away; 0x322, the reward is still to choose; 0x333, the reward visit is over. McCoy speaks as SPEAKER_PORTRAIT_RIGHT | ACTOR_LORD_MCCOY, a speaker bit field_event.h does not name yet.
Functions
Scene_GetPlacements
const struct ScenePlacement *Scene_GetPlacements(void)
The palace's people. Once the reward is taken, the startled resident, the admirer, the Kolima watcher and the reward keeper turn differently when talked to.
Scene_GetEvents
const struct SceneEvent *Scene_GetEvents(void)
What the party can talk to and search in the palace.
Event_AskAboutGoingToKolima
static void Event_AskAboutGoingToKolima(void)
Asks about going to Kolima. "Oh, are you willing to go to Kolima Forest?"
Used by gMcCoyPalaceEvents.
Event_TalkToStartledResident
static void Event_TalkToStartledResident(void)
The resident in a nightgown screams, then turns to the party. "AAAAH!!!"
Used by Event_ReadStartledResidentsThoughts, gMcCoyPalaceEvents.
Event_TalkToAdmirer
static void Event_TalkToAdmirer(void)
The admirer praises the party the first time, then warns of the holy tree. "You are a fine warrior." After, "It's very reckless for such young warriors to face the holy tree..."
Used by gMcCoyPalaceEvents.
Event_TalkToKolimaWatcher
static void Event_TalkToKolimaWatcher(void)
The watcher saw the party go to Kolima. "I was watching from here. After all that fuss, you still went to Kolima?"
Used by gMcCoyPalaceEvents.
Event_TalkToRewardKeeper
static void Event_TalkToRewardKeeper(void)
The keeper of McCoy's treasures: while the party chooses, only one item; after, the reward was the greatest; before, Bilibin's great treasures go to whoever ends the curse.
Used by gMcCoyPalaceEvents.
Event_ReadAdmirersThoughts
static void Event_ReadAdmirersThoughts(void)
Mind Read on the admirer shows two thoughts. "Sometimes, we need children to remind us of our own responsibilities." Then "You looked very courageous walking toward Kolima."
Used by gMcCoyPalaceEvents.
Event_WalkThroughDoor
static void Event_WalkThroughDoor(void)
Walking through one of the palace's doors: it opens with a sound, the leader walks through and the next room loads. The front door makes no sound once the escort has opened it.
Used by gMcCoyPalaceEvents.
McCoyPalace_ShowChestEmpty
static void McCoyPalace_ShowChestEmpty(void)
The chest is empty. "Isaac checked the chest... but it was empty."
Used by McCoyPalace_ShowUnavailableChest.
McCoyPalace_ShowChestLocked
static void McCoyPalace_ShowChestLocked(void)
The chest is locked. "The treasure chest is locked."
Used by McCoyPalace_ShowUnavailableChest.
McCoyPalace_ShowUnavailableChest
static void McCoyPalace_ShowUnavailableChest(s32 chestFlag)
Searching a reward chest after the reward: the chosen one is empty, the others locked.
Used by Event_SearchPotionChest, Event_SearchPsyCrystalChest, Event_SearchVialChest, Event_SearchWaterOfLifeChest.
Event_SearchVialChest
static void Event_SearchVialChest(void)
Searching the first reward chest: a Vial, while no reward is taken.
Used by gMcCoyPalaceEvents.
Event_SearchPotionChest
static void Event_SearchPotionChest(void)
Searching the second reward chest: a Potion, while no reward is taken.
Used by gMcCoyPalaceEvents.
Event_SearchPsyCrystalChest
static void Event_SearchPsyCrystalChest(void)
Searching the third reward chest: a Psy Crystal, while no reward is taken.
Used by gMcCoyPalaceEvents.
Event_SearchWaterOfLifeChest
static void Event_SearchWaterOfLifeChest(void)
Searching the fourth reward chest: a Water of Life, while no reward is taken.
Used by gMcCoyPalaceEvents.
McCoyPalace_ClaimReward
static void McCoyPalace_ClaimReward(s32 chestActorId, s32 itemId, s32 chestFlag)
The chest opens and gives its item; with no room for it, the chest closes again and the reward is still to choose.
Used by Event_SearchPotionChest, Event_SearchPsyCrystalChest, Event_SearchVialChest, Event_SearchWaterOfLifeChest.
Event_EscortAsksPartyToChoose
static void Event_EscortAsksPartyToChoose(void)
Leaving the reward room without a reward: the escort walks the leader back. "Please take your reward before your depart!"
Used by gMcCoyPalaceEvents.
Event_EscortSeesPartyOff
static void Event_EscortSeesPartyOff(void)
Leaving the reward room with a reward: the escort leaves. "You are always welcome in the palace of Lord McCoy."
Used by gMcCoyPalaceEvents.
McCoyPalace_PositionRewardChests
static __inline__ void McCoyPalace_PositionRewardChests(void)
The four reward chests stand in a row.
Used by Event_PresentRewardChests, Scene_Initialize.
McCoyPalace_OpenRewardChestRow
static __inline__ void McCoyPalace_OpenRewardChestRow(void)
The cells before the chest row can be walked on.
Used by Event_PresentRewardChests, Scene_Initialize.
Scene_Initialize
s32 Scene_Initialize(void)
Sets the palace up: McCoy's first audience, the escort at the door after it, the reward audience once Kolima's curse is lifted, or the reward chests where the party left them.
McCoyPalace_PrepareCompanionApproach
static __inline__ void McCoyPalace_PrepareCompanionApproach(void)
Garet, Ivan and Mia get ready to walk up to McCoy.
Used by Event_AudienceWithMcCoy, Event_McCoyRewardsParty.
Event_AudienceWithMcCoy
static void Event_AudienceWithMcCoy(void)
The first audience: the escort announces the party and McCoy asks them to lift Kolima's curse. Refusing, he calls them too young and they leave; coming back, they may change their minds. Accepting, McCoy gives the key to the barricades, Garet bristles at being called children, and McCoy takes the key back.
Used by Scene_Initialize.
Event_EscortHintsAtBarricade
static void Event_EscortHintsAtBarricade(void)
At the front door after the audience: McCoy's escort is sorry the party was rejected, asks them not to go to Kolima and lets slip that the barricade may not need a key.
Used by Scene_Initialize.
McCoyPalace_FaceCompanionsForDiscussion
static void McCoyPalace_FaceCompanionsForDiscussion(void)
Garet, Ivan and Mia turn to talk among themselves.
Used by Event_McCoyRewardsParty.
McCoyPalace_FaceCompanionsForAudience
static void McCoyPalace_FaceCompanionsForAudience(void)
Garet, Ivan and Mia face McCoy again.
Used by Event_McCoyRewardsParty.
Event_McCoyRewardsParty
static void Event_McCoyRewardsParty(void)
Brought in after lifting Kolima's curse: McCoy thanks the party and sends them to choose a reward.
Used by Scene_Initialize.
Event_PresentRewardChests
static void Event_PresentRewardChests(void)
In the reward room: the escort shows the four chests and the keeper explains that only one may be chosen.
Used by Scene_Initialize.
Also, functions without a comment: Scene_GetEntrances, Scene_GetRegions, Scene_GetExits, Event_ReadRewardKeepersThoughts.
Globals, without a comment: gPalace_FacingActions, gPalace_PacingActions, gMcCoyPalaceEntrances, gMcCoyPalaceExits, gMcCoyPalacePlacementsOther, gMcCoyPalacePlacements, gMcCoyPalaceEventsOther, gMcCoyPalaceEvents.