src/scene/mccoy_palace.c
McCoy's Palace in Bilibin, the home of the town's chief. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "graphics/graphics.h"#include "text/msg_ids.h"#include "shared/actor_facing.c"
Enumerations
| Name | Description | |
|---|---|---|
enum | MCCOY_PALACE_ACTOR_ID { ACTOR_VILLAGER_FOLLOW_RED_CARPET, ACTOR_VILLAGER_DO_NOT_OFFE … } | The palace's people and the treasure room's chests, numbering McCoyPalaceActorPlacements' rows from ACTOR_FIRST_PLACED. |
enum | MCCOY_PALACE_METATILE_BEHAVIOR { METATILE_BEHAVIOR_MCCOY_PALACE_BEFORE_REWARD_CHESTS, METATIL … } | The metatiles the cues answer besides the exits, whose metatile behaviors are their exits' numbers. |
enum | MCCOY_PALACE_DOOR_ANIMATION { MCCOY_PALACE_MCCOYS_DOOR_ANIMATION, MCCOY_PALACE_BEDROOM_DOO … } | The palace's doors swing open by the map's tileset animations, which each scene entry pauses so every door is drawn shut; walking through any door runs both a moment. |
enum | anonymous enum { FLAG_MCCOYS_DOOR_OPEN, FLAG_CHOOSING_REWARD, FLAG_TOOK_VIAL, … } | The palace's temporary flags. |
Functions
| Name | Description | |
|---|---|---|
static void | scMcCoyPalaceClaimReward (Sint32 chestActorId, Sint32 itemId, Sint32 chestFlag) | The chest opens and gives its item, and the other three lock. |
static void | scMcCoyPalaceAudienceWithMcCoy (void) | The first audience, on walking through McCoy's door before Kolima's curse is lifted: the captain announces the party, McCoy calls Isaac closer and asks whether they will go to Kolima Forest. |
static void | scMcCoyPalaceCaptainTalksAboutBarricade (void) | Back in the hall after the first audience, McCoy's door opens behind the party and the captain comes out. |
static void | scMcCoyPalaceMcCoyRewardsParty (void) | Once Kolima's curse is lifted, the guards march the party into McCoy's room as if under arrest. |
static void | scMcCoyPalacePresentRewardChests (void) | In the treasure room, the captain walks the party up to four chests in a row before the barred gate. |
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) | The people of McCoy's Palace. |
const CUE * | scGetCues (void) | What the party can talk to and search in the palace. |
static void | scMcCoyPalaceAskAboutGoingToKolima (void) | Before the reward, the woman with fair hair in the hall asks "Oh, are you willing to go to Kolima Forest?" On yes she has lost count of the warriors McCoy has hired to end the curse, and not one has come back; on no, the party does not look too strong, but that may be for the best. |
static void | scMcCoyPalaceTalkToWomanInMiladysNightgown (void) | After the reward, the woman in Lady McCoy's nightgown in the east bedroom winces and screams "AAAAH!!!" when spoken to, then turns: "Oh! |
static void | scMcCoyPalaceTalkToOldManPraisingTheWarriors (void) | After the reward, the old man with a cane in the north-east tower room tells Isaac "You are a fine warrior." Spoken to again before the party leaves McCoy's Palace, he worries instead: "It's very reckless for such young warriors to face the holy tree..." |
static void | scMcCoyPalaceTalkToSoldierWatchingKolima (void) | After the reward, the soldier in the south-east tower room asks "I was watching from here. |
static void | scMcCoyPalaceTalkToSoldierShowingTheReward (void) | The soldier at the treasure room's barred gate shows off what lies behind it: "What do you think? |
static void | scMcCoyPalaceReadOldMansThoughtsOnTheWarriors (void) | After the reward, Mind Read on the old man with a cane in the north-east tower room hears "Sometimes, we need children to remind us of our own responsibilities." Read again before the party leaves McCoy's Palace, he thinks "You looked very courageous walking toward Kolima." |
static void | scMcCoyPalaceReadRewardSoldiersThoughts (void) | Mind Read on the soldier at the treasure room's barred gate. |
static void | scMcCoyPalaceWalkThroughDoor (void) | Walking north into the door at the top of the hall's red carpet (metatiles (15, 39) and (16, 39)) opens it, and Isaac walks through into McCoy's room. |
static void | scMcCoyPalaceShowChestEmpty (void) | "Isaac checked the chest... but it was empty." |
static void | scMcCoyPalaceShowChestLocked (void) | "The treasure chest is locked." |
static void | scMcCoyPalaceShowUnavailableChest (Sint32 chestFlag) | After the reward, the chest the party opened searches as empty and the other three as locked. |
static void | scMcCoyPalaceSearchVialChest (void) | Searching the westmost of the four reward chests in the treasure room (metatile (38, 45)) gives a Vial, if the party has not yet chosen its reward. |
static void | scMcCoyPalaceSearchPotionChest (void) | Searching the second reward chest from the west in the treasure room (metatile (39, 45)) gives a Potion, if the party has not yet chosen its reward. |
static void | scMcCoyPalaceSearchPsyCrystalChest (void) | Searching the third reward chest from the west in the treasure room (metatile (40, 45)) gives a Psy Crystal, if the party has not yet chosen its reward. |
static void | scMcCoyPalaceSearchWaterOfLifeChest (void) | Searching the eastmost of the four reward chests in the treasure room (metatile (41, 45)) gives a Water of Life, if the party has not yet chosen its reward. |
static void | scMcCoyPalaceCaptainAsksPartyToChoose (void) | Walking to the foot of the treasure room's stairs (metatile (36, 47)) without a reward makes the captain call out "Please take your reward before your depart!", and Isaac walks back toward the chests. |
static void | scMcCoyPalaceCaptainSeesPartyOff (void) | Once Isaac has his reward, walking along the row in front of the chests (metatiles (38, 46) to (41, 46)) makes the captain step up beside the soldier at the gate. |
static inline void | scMcCoyPalacePosRewardChests (void) | The four reward chests stand in a row before the barred gate, from west to east the Vial, the Potion, the Psy Crystal and the Water of Life. |
static inline void | scMcCoyPalaceOpenRewardChestRow (void) | The chests' metatiles and the row in front of them take the behaviors the cues answer, copied from the spare metatiles at (38, 55) to (45, 55). |
Sint32 | scInit (void) | Sets McCoy's Palace up and plays the story's scenes: the first audience on entering McCoy's room, the captain's hint outside his door after it, the reward once the curse is lifted, and the chests in the treasure room. |
static inline void | scMcCoyPalacePrepareCompanionApproach (void) | Garet, Ivan and Mia get ready to walk up to McCoy. |
static void | scMcCoyPalaceFaceCompanionsForDiscussion (void) | Garet, Ivan and Mia turn to talk among themselves. |
static void | scMcCoyPalaceFaceCompanionsForAudience (void) | Garet, Ivan and Mia face McCoy again. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | McCoyPalaceTurnTowardWatched [] | Keeps turning the actor toward the one it watches. |
extern Sint32 | McCoyPalaceCaptainStepsBesideMcCoy [] | The captain walks up beside McCoy and turns south. |
extern SCENE_ENTRANCE | McCoyPalaceEntrances [] | |
extern Uint32 | McCoyPalaceExits [] | |
extern ACTOR_PLACE | McCoyPalaceNoActorPlacements [] | Unused: the getters return it for any scene but SceneIdMcCoyPalace, and the overlay serves no other. |
extern ACTOR_PLACE | McCoyPalaceActorPlacements [] | |
extern CUE | McCoyPalaceNoCues [] | Unused, as McCoyPalaceNoActorPlacements is. |
extern CUE | McCoyPalaceCues [] |
Description
McCoy's Palace in Bilibin, the home of the town's chief.
The palace is one scene, SceneIdMcCoyPalace, sharing the area name McCoy's
Palace with its grounds (mccoy_palace_grounds.c). Its rooms are side by side
on one map, each in its own camera box: the entrance hall with its red
carpet, McCoy's room at the carpet's top, Lady McCoy's room with a bedroom
through each of its two back doors, the landings and small tower rooms at the
hall's four corners, and the treasure room below, reached from the west of
the hall.
The party first comes in by the front door once the east guard on the grounds
lets it in. A man in the hall says to follow the red carpet, and walking
through the door at its top (scMcCoyPalaceWalkThroughDoor) brings Isaac
before McCoy, a stout red-haired man who speaks with a heavy accent and a
portrait. Before Kolima's curse is lifted this is the first audience
(scMcCoyPalaceAudienceWithMcCoy): McCoy asks whether the party will save
Kolima. If Isaac says no, he is sent away and can come back to change his
mind. If he says yes, McCoy tosses him the key to the barricades, then takes
it back, deciding they are too young, and his captain sees the party out.
Outside his door the captain is sorry, and lets slip that the barricade on
the way to Kolima may not need a key
(scMcCoyPalaceCaptainTalksAboutBarricade); from then on the people speak as
if the party had been turned away (FLAG_MCCOY_PALACE_BARRICADE_NEEDS_NO_KEY).
Once the curse is lifted, the guards on the grounds march the party straight
into McCoy's room, where McCoy thanks it (scMcCoyPalaceMcCoyRewardsParty).
His lines differ as the party has met him before or not. The captain then
leads it down to the treasure room, where four chests stand in a row before
the barred gate (scMcCoyPalacePresentRewardChests): from west to east a Vial,
a Potion, a Psy Crystal and a Water of Life. Only one may be taken
(scMcCoyPalaceClaimReward); the others are then locked. Heading back up the
stairs without a reward, the captain stops Isaac and sends him back to the
chests; once he has one, the captain bids the party farewell. When the party
comes back later, the four chests are gone, and which one it opened was only
ever kept in the scene's temporary flags (FLAG_TOOK_VIAL and the others).
The palace's people follow three story flags,
FLAG_MCCOY_PALACE_BARRICADE_NEEDS_NO_KEY, FLAG_KOLIMA_CURSE_LIFTED and
FLAG_MCCOY_PALACE_REWARD_TAKEN, which decide what they say and how they turn
when talked to (scGetActorPlacements).
A barrel by the chimney in the hall holds an Elixir and one in the small room at the south-west corner a Smoke Bomb. The wardrobe in the east bedroom holds Lady McCoy's silk negligee, and the bookcase in the west bedroom the long list of gifts McCoy has bought her.
Enumerations in detail
MCCOY_PALACE_ACTOR_ID
enum MCCOY_PALACE_ACTOR_ID
The palace's people and the treasure room's chests, numbering
McCoyPalaceActorPlacements' rows from ACTOR_FIRST_PLACED. Each note gives
what they say before the reward, then after it.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_VILLAGER_FOLLOW_RED_CARPET | ACTOR_FIRST_PLACED | A burly grey-haired man who points the way to McCoy. "If you want to see Lord McCoy, follow the red carpet." Later: "The people of Bilibin will never forget your bravery." |
ACTOR_VILLAGER_DO_NOT_OFFEND_MCCOY | A woman in a green dress who warns the party about McCoy. "Make sure you don't offend Lord McCoy!" Later: "I heard you received a spectacular reward." | |
ACTOR_VILLAGER_ASKING_ABOUT_KOLIMA_FOREST | A woman with fair hair in the hall who asks whether the party is willing to go to Kolima Forest. Later: "Lady McCoy is quite upset that the palace construction was halted." | |
ACTOR_YOUNG_MAN_PROTECT_OLD_TREE | A young man with brown hair who speaks of the old tree in Kolima Forest. Later: "Things are looking grim south of Goma Range..." | |
ACTOR_VILLAGER_LADY_MCCOYS_ROOM | A woman with fair hair standing in Lady McCoy's room. "This is Lady McCoy's room, so don't touch anything." Later: "Milady was very upset when she left the room." | |
ACTOR_VILLAGER_MILADYS_BEAUTY | A woman with fair hair who admires Lady McCoy. "Milady was renowned far and wide for her beauty!" Later: "For once, milord didn't let Lady McCoy push him around!" | |
ACTOR_VILLAGER_IN_MILADYS_NIGHTGOWN | A woman with fair hair who screams when spoken to ("AAAAH!!!"). Mind Read: "Oh, no! This nightgown has a hole... Milady will be furious!" | |
ACTOR_OLD_MAN_PRAISING_THE_WARRIORS | An old man with a cane in the north-east tower room. "You can see Kolima pretty well from here." Later he praises the party. | |
ACTOR_SOLDIER_WATCHING_KOLIMA | A soldier in a spiked helmet in the south-east tower room. "Hmm. It seems the curse of the tree has not yet come to Bilibin." Later he says he watched the party go to Kolima. | |
ACTOR_SOLDIER_SHOWING_THE_REWARD | A soldier in a spiked helmet who guards the treasure room's barred gate, and shows the party the four chests when the captain brings it down. | |
ACTOR_LORD_MCCOY | McCoy, the chief of Bilibin, a stout man with red hair in a pink tunic. | |
ACTOR_CAPTAIN | The captain of McCoy's soldiers, drawn as they are, in a spiked helmet. | |
ACTOR_BARRICADE_KEY | The key McCoy tosses to the party. | |
ACTOR_VIAL_CHEST | ||
ACTOR_POTION_CHEST | ||
ACTOR_PSY_CRYSTAL_CHEST | ||
ACTOR_WATER_OF_LIFE_CHEST |
Definition at line 69 of file mccoy_palace.c.
MCCOY_PALACE_METATILE_BEHAVIOR
enum MCCOY_PALACE_METATILE_BEHAVIOR
The metatiles the cues answer besides the exits, whose metatile behaviors are their exits' numbers.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_MCCOY_PALACE_BEFORE_REWARD_CHESTS | 50 | The row just in |
METATILE_BEHAVIOR_MCCOY_PALACE_FOOT_OF_TREASURE_STAIRS | 51 | front of the four reward chests, metatiles (38, 46) to (41, 46), copied there from (42, 55) to (45, 55) when the chests are brought out. The treasure room's floor at the foot of its stairs, metatile (36, 47), one step before the way out. |
METATILE_BEHAVIOR_MCCOY_PALACE_VIAL_CHEST | 100 | The four reward chests' metatiles, (38, 45) to (41, 45) from west to east, copied there from (38, 55) to (41, 55) when the chests are brought out. |
METATILE_BEHAVIOR_MCCOY_PALACE_POTION_CHEST | 101 | |
METATILE_BEHAVIOR_MCCOY_PALACE_PSY_CRYSTAL_CHEST | 102 | |
METATILE_BEHAVIOR_MCCOY_PALACE_WATER_OF_LIFE_CHEST | 103 | |
METATILE_BEHAVIOR_MCCOY_PALACE_ELIXIR_BARREL | 120 | The barrel by the |
METATILE_BEHAVIOR_MCCOY_PALACE_SMOKE_BOMB_BARREL | 121 | chimney in the hall, metatile (23, 40), with an Elixir. The barrel in the small room at the south-west corner, metatile (45, 29), with a Smoke Bomb. |
METATILE_BEHAVIOR_MCCOY_PALACE_WARDROBE | 200 | The east bedroom's |
METATILE_BEHAVIOR_MCCOY_PALACE_BOOKCASE | 201 | wardrobe, metatiles (17, 3) to (18, 4), with Lady McCoy's silk negligee. The west bedroom's bookcase, metatiles (9, 3) to (10, 4), with the list of McCoy's gifts to his wife. |
Definition at line 147 of file mccoy_palace.c.
MCCOY_PALACE_DOOR_ANIMATION
enum MCCOY_PALACE_DOOR_ANIMATION
The palace's doors swing open by the map's tileset animations, which each scene entry pauses so every door is drawn shut; walking through any door runs both a moment.
| Enumerator | Value | Description |
|---|---|---|
MCCOY_PALACE_MCCOYS_DOOR_ANIMATION | 1 | McCoy's door at the top of the red carpet, four tiles across. |
MCCOY_PALACE_BEDROOM_DOORS_ANIMATION | 2 | The two bedroom doors in Lady McCoy's room, two tiles across. |
Definition at line 191 of file mccoy_palace.c.
anonymous enum
enum { FLAG_MCCOYS_DOOR_OPEN, FLAG_CHOOSING_REWARD, FLAG_TOOK_VIAL, FLAG_TOOK_POTION, … }
The palace's temporary flags. The scene temp flags last until the party leaves the palace's scene, the area temp flags until it leaves McCoy's Palace.
| Enumerator | Value | Description |
|---|---|---|
FLAG_MCCOYS_DOOR_OPEN | FLAG_SCENE_TEMP(0x00) | The captain has opened McCoy's door, so walking through it is silent. |
FLAG_CHOOSING_REWARD | FLAG_SCENE_TEMP(0x02) | The party is choosing its reward among the four chests. |
FLAG_TOOK_VIAL | FLAG_SCENE_TEMP(0x10) | The chest the reward was taken from, which then searches as empty. |
FLAG_TOOK_POTION | FLAG_SCENE_TEMP(0x11) | |
FLAG_TOOK_PSY_CRYSTAL | FLAG_SCENE_TEMP(0x12) | |
FLAG_TOOK_WATER_OF_LIFE | FLAG_SCENE_TEMP(0x13) | |
FLAG_OLD_MAN_HAS_PRAISED | FLAG_AREA_TEMP(0x02) | The old man has praised the party once. He then warns of the holy tree. |
FLAG_OLD_MAN_THOUGHTS_READ | FLAG_AREA_TEMP(0x03) | Mind Read has heard the old man's first thought. |
FLAG_CAPTAIN_SEEING_PARTY_OUT | FLAG_AREA_TEMP(0x21) | McCoy has had the captain see the party out after the first audience. |
FLAG_REWARD_OFFERED | FLAG_AREA_TEMP(0x22) | McCoy has had the captain take the party to the treasure room, until it takes a reward. |
FLAG_PARTY_SEEN_OFF | FLAG_AREA_TEMP(0x33) | The captain has seen the party off with its reward. |
Definition at line 202 of file mccoy_palace.c.
Functions in detail
scMcCoyPalaceClaimReward
static void scMcCoyPalaceClaimReward(Sint32 chestActorId, Sint32 itemId, Sint32 chestFlag)
The chest opens and gives its item, and the other three lock. If no one in the party has room for it, the lid peeks open and shuts again, and the party can still choose.
References fdActorRelease(), fdActorSetAnimation(), fdChestOpenAndShowItem(), fdScriptEnd(), fdScriptStart(), gmFlagClear(), gmFlagSet(), gmPartyGiveItem(), Sint32 and sySoundPlay().
Referenced by scMcCoyPalaceSearchPotionChest(), scMcCoyPalaceSearchPsyCrystalChest(), scMcCoyPalaceSearchVialChest() and scMcCoyPalaceSearchWaterOfLifeChest().
Definition at lines 235 and 602 of file mccoy_palace.c.
scMcCoyPalaceAudienceWithMcCoy
static void scMcCoyPalaceAudienceWithMcCoy(void)
The first audience, on walking through McCoy's door before Kolima's curse is lifted: the captain announces the party, McCoy calls Isaac closer and asks whether they will go to Kolima Forest. On no he sends them away as too young, and a return lets Isaac change his mind. On yes he tosses Isaac the key to the barricades, then, seeing how young the party is, takes it back and has his captain see them out.
References fdActorFaceDirection(), fdActorGet(), fdActorJump(), fdActorMoveToAndWait(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetDestinationOffset(), fdActorSetPosFX(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorStop(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdMapGridCenterOnFollowedPoint(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), gmFlagSet(), McCoyPalaceTurnTowardWatched, scFieldActorWatchAndStartScript(), scFieldScriptShowMessageThenWait(), scMcCoyPalacePrepareCompanionApproach(), syImportScriptSetExitRequest() and sySynch().
Referenced by scInit().
Definition at lines 237 and 827 of file mccoy_palace.c.
scMcCoyPalaceCaptainTalksAboutBarricade
static void scMcCoyPalaceCaptainTalksAboutBarricade(void)
Back in the hall after the first audience, McCoy's door opens behind the party and the captain comes out. He is sorry Isaac was rejected, asks him to promise not to go to Kolima, lets slip "That barricade... You may not need a key.", and leaves down the red carpet.
References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorWalkToAndWait(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), gmFlagClear(), gmFlagSet(), sySoundPlay() and sySynch().
Referenced by scInit().
Definition at lines 238 and 1365 of file mccoy_palace.c.
scMcCoyPalaceMcCoyRewardsParty
static void scMcCoyPalaceMcCoyRewardsParty(void)
Once Kolima's curse is lifted, the guards march the party into McCoy's room as if under arrest. McCoy thanks Isaac, explains he only feared they would not stop by on the way back, and has the captain take them down to the treasure room to choose a reward.
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestination(), fdActorSetDestinationOffset(), fdActorSetPosFX(), fdActorSetScript(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWaitForScriptEndById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdMapGridCenterOnFollowedPoint(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), gmFlagSet(), McCoyPalaceCaptainStepsBesideMcCoy, McCoyPalaceTurnTowardWatched, scFieldActorWatchAndStartScript(), scFieldScriptShowMessageThenWait(), scMcCoyPalaceFaceCompanionsForAudience(), scMcCoyPalaceFaceCompanionsForDiscussion(), scMcCoyPalacePrepareCompanionApproach(), Sint32, syImportScriptSetExitRequest() and sySynch().
Referenced by scInit().
Definition at lines 239 and 1444 of file mccoy_palace.c.
scMcCoyPalacePresentRewardChests
static void scMcCoyPalacePresentRewardChests(void)
In the treasure room, the captain walks the party up to four chests in a row before the barred gate. He tells the soldier at the gate that Lord McCoy ordered Isaac and his companions brought here, and the soldier says "You may select a single item from among these four chests."
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetSpriteFlags(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraGetActor(), fdMapGridCenterOnFollowedPoint(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagClear(), gmFlagSet(), scMcCoyPalaceOpenRewardChestRow(), scMcCoyPalacePosRewardChests() and sySynch().
Referenced by scInit().
Definition at lines 240 and 1794 of file mccoy_palace.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References McCoyPalaceEntrances.
Definition at line 245 of file mccoy_palace.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 250 of file mccoy_palace.c.
scGetExits
const Uint32 *scGetExits(void)
References McCoyPalaceExits.
Definition at line 255 of file mccoy_palace.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
The people of McCoy's Palace. Once the party has its reward, the woman in Lady McCoy's nightgown no longer turns when spoken to, and the old man and the soldiers in the tower rooms and the treasure room turn to the party.
References fdAssignViewFlags(), gmFlagGet(), MainRoutineStateWork, McCoyPalaceActorPlacements and McCoyPalaceNoActorPlacements.
Definition at line 263 of file mccoy_palace.c.
scGetCues
const CUE *scGetCues(void)
What the party can talk to and search in the palace.
References MainRoutineStateWork, McCoyPalaceCues and McCoyPalaceNoCues.
Definition at line 294 of file mccoy_palace.c.
scMcCoyPalaceAskAboutGoingToKolima
static void scMcCoyPalaceAskAboutGoingToKolima(void)
Before the reward, the woman with fair hair in the hall asks "Oh, are you willing to go to Kolima Forest?" On yes she has lost count of the warriors McCoy has hired to end the curse, and not one has come back; on no, the party does not look too strong, but that may be for the best.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by McCoyPalaceCues.
Definition at line 307 of file mccoy_palace.c.
scMcCoyPalaceTalkToWomanInMiladysNightgown
static void scMcCoyPalaceTalkToWomanInMiladysNightgown(void)
After the reward, the woman in Lady McCoy's nightgown in the east bedroom winces and screams "AAAAH!!!" when spoken to, then turns: "Oh! For a second, I thought you were milady. You really startled me!"
References fdActorFaceActor(), fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorShowEmote(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart() and fdScriptWait().
Referenced by McCoyPalaceCues.
Definition at line 321 of file mccoy_palace.c.
scMcCoyPalaceTalkToOldManPraisingTheWarriors
static void scMcCoyPalaceTalkToOldManPraisingTheWarriors(void)
After the reward, the old man with a cane in the north-east tower room tells Isaac "You are a fine warrior." Spoken to again before the party leaves McCoy's Palace, he worries instead: "It's very reckless for such young warriors to face the holy tree..."
References fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagSet().
Referenced by McCoyPalaceCues.
Definition at line 345 of file mccoy_palace.c.
scMcCoyPalaceTalkToSoldierWatchingKolima
static void scMcCoyPalaceTalkToSoldierWatchingKolima(void)
After the reward, the soldier in the south-east tower room asks "I was watching from here. After all that fuss, you still went to Kolima?" On yes he does not know how they lifted the curse, but they are the best; on no he calls Isaac a liar, for he saw them walk through the barricade.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by McCoyPalaceCues.
Definition at line 362 of file mccoy_palace.c.
scMcCoyPalaceTalkToSoldierShowingTheReward
static void scMcCoyPalaceTalkToSoldierShowingTheReward(void)
The soldier at the treasure room's barred gate shows off what lies behind it: "What do you think? These are Bilibin's great treasures. Whoever ends the curse can claim these as his own." While the party is choosing its reward he says "You may choose only one item, but I trust that all of them will prove useful," and once it has one, that it was indeed the greatest of treasures.
Unused: a line the game never shows, "Pick any one of the four treasures.",
would follow his boast if FLAG_MCCOY_PALACE_UNUSED_PICK_OFFERED were set, and
nothing sets it.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagGet().
Referenced by McCoyPalaceCues.
Definition at line 382 of file mccoy_palace.c.
scMcCoyPalaceReadOldMansThoughtsOnTheWarriors
static void scMcCoyPalaceReadOldMansThoughtsOnTheWarriors(void)
After the reward, Mind Read on the old man with a cane in the north-east tower room hears "Sometimes, we need children to remind us of our own responsibilities." Read again before the party leaves McCoy's Palace, he thinks "You looked very courageous walking toward Kolima."
References fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagSet().
Referenced by McCoyPalaceCues.
Definition at line 413 of file mccoy_palace.c.
scMcCoyPalaceReadRewardSoldiersThoughts
static void scMcCoyPalaceReadRewardSoldiersThoughts(void)
Mind Read on the soldier at the treasure room's barred gate. Before the curse is lifted he thinks "What good is treasure if you get turned into a tree?" Once it is lifted: "Are we really giving our treasure to these wimps?" While the party chooses: "Nonetheless...if your luck is sour, you may end up an item you do not need." After the reward he thinks they got a pretty nice reward but were just unlucky.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagGet().
Referenced by McCoyPalaceCues.
Definition at line 432 of file mccoy_palace.c.
scMcCoyPalaceWalkThroughDoor
static void scMcCoyPalaceWalkThroughDoor(void)
Walking north into the door at the top of the hall's red carpet (metatiles (15, 39) and (16, 39)) opens it, and Isaac walks through into McCoy's room. The two doors at the back of Lady McCoy's room, metatiles (6, 23) and (19, 23), open the same way into the west and east bedrooms.
McCoy's door opens with SE_THUMP and the bedroom doors with SE_DOOR_OPEN;
the doors' opening is the map's tileset animations 1 and 2, let run for the
walk. After the captain has come out of McCoy's door
(scMcCoyPalaceCaptainTalksAboutBarricade) it stands open, so walking back in
makes no sound and plays no opening.
References fdActorCenterAndWalk(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), fdTilesetAnimationPause(), fdTilesetAnimationResume(), gmFlagGet(), Sint32, state, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by McCoyPalaceCues.
Definition at line 467 of file mccoy_palace.c.
scMcCoyPalaceShowChestEmpty
static void scMcCoyPalaceShowChestEmpty(void)
"Isaac checked the chest... but it was empty."
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by scMcCoyPalaceShowUnavailableChest().
Definition at line 508 of file mccoy_palace.c.
scMcCoyPalaceShowChestLocked
static void scMcCoyPalaceShowChestLocked(void)
"The treasure chest is locked."
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by scMcCoyPalaceShowUnavailableChest().
Definition at line 516 of file mccoy_palace.c.
scMcCoyPalaceShowUnavailableChest
static void scMcCoyPalaceShowUnavailableChest(Sint32 chestFlag)
After the reward, the chest the party opened searches as empty and the other three as locked.
References gmFlagGet(), scMcCoyPalaceShowChestEmpty(), scMcCoyPalaceShowChestLocked() and Sint32.
Referenced by scMcCoyPalaceSearchPotionChest(), scMcCoyPalaceSearchPsyCrystalChest(), scMcCoyPalaceSearchVialChest() and scMcCoyPalaceSearchWaterOfLifeChest().
Definition at line 525 of file mccoy_palace.c.
scMcCoyPalaceSearchVialChest
static void scMcCoyPalaceSearchVialChest(void)
Searching the westmost of the four reward chests in the treasure room (metatile (38, 45)) gives a Vial, if the party has not yet chosen its reward.
References gmFlagGet(), scMcCoyPalaceClaimReward() and scMcCoyPalaceShowUnavailableChest().
Referenced by McCoyPalaceCues.
Definition at line 539 of file mccoy_palace.c.
scMcCoyPalaceSearchPotionChest
static void scMcCoyPalaceSearchPotionChest(void)
Searching the second reward chest from the west in the treasure room (metatile (39, 45)) gives a Potion, if the party has not yet chosen its reward.
References gmFlagGet(), scMcCoyPalaceClaimReward() and scMcCoyPalaceShowUnavailableChest().
Referenced by McCoyPalaceCues.
Definition at line 554 of file mccoy_palace.c.
scMcCoyPalaceSearchPsyCrystalChest
static void scMcCoyPalaceSearchPsyCrystalChest(void)
Searching the third reward chest from the west in the treasure room (metatile (40, 45)) gives a Psy Crystal, if the party has not yet chosen its reward.
References gmFlagGet(), scMcCoyPalaceClaimReward() and scMcCoyPalaceShowUnavailableChest().
Referenced by McCoyPalaceCues.
Definition at line 569 of file mccoy_palace.c.
scMcCoyPalaceSearchWaterOfLifeChest
static void scMcCoyPalaceSearchWaterOfLifeChest(void)
Searching the eastmost of the four reward chests in the treasure room (metatile (41, 45)) gives a Water of Life, if the party has not yet chosen its reward.
References gmFlagGet(), scMcCoyPalaceClaimReward() and scMcCoyPalaceShowUnavailableChest().
Referenced by McCoyPalaceCues.
Definition at line 585 of file mccoy_palace.c.
scMcCoyPalaceCaptainAsksPartyToChoose
static void scMcCoyPalaceCaptainAsksPartyToChoose(void)
Walking to the foot of the treasure room's stairs (metatile (36, 47)) without a reward makes the captain call out "Please take your reward before your depart!", and Isaac walks back toward the chests.
References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorShowEmote(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait() and gmFlagGet().
Referenced by McCoyPalaceCues.
Definition at line 632 of file mccoy_palace.c.
scMcCoyPalaceCaptainSeesPartyOff
static void scMcCoyPalaceCaptainSeesPartyOff(void)
Once Isaac has his reward, walking along the row in front of the chests (metatiles (38, 46) to (41, 46)) makes the captain step up beside the soldier at the gate. Both nod, and the captain tells Isaac "You are always welcome in the palace of Lord McCoy." before walking off up the stairs.
It can play only in the visit the reward is taken in: the row takes the
metatiles its cue answers only while the chests stand out before the gate
(scMcCoyPalaceOpenRewardChestRow), and once a reward is taken a later visit
does not bring them out again.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorSetAnimationAndWait(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), gmFlagGet() and gmFlagSet().
Referenced by McCoyPalaceCues.
Definition at line 664 of file mccoy_palace.c.
scMcCoyPalacePosRewardChests
static inline void scMcCoyPalacePosRewardChests(void)
The four reward chests stand in a row before the barred gate, from west to east the Vial, the Potion, the Psy Crystal and the Water of Life.
Referenced by scInit() and scMcCoyPalacePresentRewardChests().
Definition at line 695 of file mccoy_palace.c.
scMcCoyPalaceOpenRewardChestRow
static inline void scMcCoyPalaceOpenRewardChestRow(void)
The chests' metatiles and the row in front of them take the behaviors the cues answer, copied from the spare metatiles at (38, 55) to (45, 55).
References fdMapGridCopyMetatileAttributes().
Referenced by scInit() and scMcCoyPalacePresentRewardChests().
Definition at line 705 of file mccoy_palace.c.
scInit
Sint32 scInit(void)
Sets McCoy's Palace up and plays the story's scenes: the first audience on entering McCoy's room, the captain's hint outside his door after it, the reward once the curse is lifted, and the chests in the treasure room. A return from a battle while the party is choosing puts the chests straight back in their row.
References fdActorGet(), fdActorSetSpriteFlags(), fdTilesetAnimationPause(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scMcCoyPalaceAudienceWithMcCoy(), scMcCoyPalaceCaptainTalksAboutBarricade(), scMcCoyPalaceMcCoyRewardsParty(), scMcCoyPalaceOpenRewardChestRow(), scMcCoyPalacePosRewardChests(), scMcCoyPalacePresentRewardChests() and Sint32.
Definition at line 716 of file mccoy_palace.c.
scMcCoyPalacePrepareCompanionApproach
static inline void scMcCoyPalacePrepareCompanionApproach(void)
Garet, Ivan and Mia get ready to walk up to McCoy.
References fdActorSetAnimation().
Referenced by scMcCoyPalaceAudienceWithMcCoy() and scMcCoyPalaceMcCoyRewardsParty().
Definition at line 811 of file mccoy_palace.c.
scMcCoyPalaceFaceCompanionsForDiscussion
static void scMcCoyPalaceFaceCompanionsForDiscussion(void)
Garet, Ivan and Mia turn to talk among themselves.
References fdActorFaceDirection().
Referenced by scMcCoyPalaceMcCoyRewardsParty().
Definition at line 1425 of file mccoy_palace.c.
scMcCoyPalaceFaceCompanionsForAudience
static void scMcCoyPalaceFaceCompanionsForAudience(void)
Garet, Ivan and Mia face McCoy again.
References fdActorFaceDirection().
Referenced by scMcCoyPalaceMcCoyRewardsParty().
Definition at line 1433 of file mccoy_palace.c.
Variables in detail
McCoyPalaceTurnTowardWatched
extern Sint32 McCoyPalaceTurnTowardWatched[]
Sint32 McCoyPalaceTurnTowardWatched[]
Keeps turning the actor toward the one it watches.
References scTurnTowardTarget() and Sint32.
Referenced by scMcCoyPalaceAudienceWithMcCoy() and scMcCoyPalaceMcCoyRewardsParty().
Definition at lines 57 and 1852 of file mccoy_palace.c.
McCoyPalaceCaptainStepsBesideMcCoy
extern Sint32 McCoyPalaceCaptainStepsBesideMcCoy[]
Sint32 McCoyPalaceCaptainStepsBesideMcCoy[]
The captain walks up beside McCoy and turns south.
References Sint32.
Referenced by scMcCoyPalaceMcCoyRewardsParty().
Definition at lines 58 and 1858 of file mccoy_palace.c.
McCoyPalaceEntrances
extern SCENE_ENTRANCE McCoyPalaceEntrances[]
SCENE_ENTRANCE McCoyPalaceEntrances[]
Referenced by scGetEntrances().
Definition at lines 59 and 1872 of file mccoy_palace.c.
McCoyPalaceExits
extern Uint32 McCoyPalaceExits[]
Uint32 McCoyPalaceExits[]
Referenced by scGetExits().
Definition at lines 60 and 2088 of file mccoy_palace.c.
McCoyPalaceNoActorPlacements
extern ACTOR_PLACE McCoyPalaceNoActorPlacements[]
ACTOR_PLACE McCoyPalaceNoActorPlacements[]
Unused: the getters return it for any scene but SceneIdMcCoyPalace, and the
overlay serves no other.
Referenced by scGetActorPlacements().
Definition at lines 61 and 2182 of file mccoy_palace.c.
McCoyPalaceActorPlacements
extern ACTOR_PLACE McCoyPalaceActorPlacements[]
ACTOR_PLACE McCoyPalaceActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 62 and 2187 of file mccoy_palace.c.
McCoyPalaceNoCues
extern CUE McCoyPalaceNoCues[]
CUE McCoyPalaceNoCues[]
Unused, as McCoyPalaceNoActorPlacements is.
Referenced by scGetCues().
Definition at lines 63 and 2255 of file mccoy_palace.c.
McCoyPalaceCues
extern CUE McCoyPalaceCues[]
CUE McCoyPalaceCues[]
References scMcCoyPalaceAskAboutGoingToKolima(), scMcCoyPalaceCaptainAsksPartyToChoose(), scMcCoyPalaceCaptainSeesPartyOff(), scMcCoyPalaceReadOldMansThoughtsOnTheWarriors(), scMcCoyPalaceReadRewardSoldiersThoughts(), scMcCoyPalaceSearchPotionChest(), scMcCoyPalaceSearchPsyCrystalChest(), scMcCoyPalaceSearchVialChest(), scMcCoyPalaceSearchWaterOfLifeChest(), scMcCoyPalaceTalkToOldManPraisingTheWarriors(), scMcCoyPalaceTalkToSoldierShowingTheReward(), scMcCoyPalaceTalkToSoldierWatchingKolima(), scMcCoyPalaceTalkToWomanInMiladysNightgown() and scMcCoyPalaceWalkThroughDoor().
Referenced by scGetCues().