src/scene/mccoy_palace_grounds.c
The grounds of McCoy's Palace, at the top of Bilibin. 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 "scene/floating_nut.h"#include "scene/catch_nut.h"#include "text/msg_ids.h"#include "shared/actor_facing.c"#include "shared/floating_nut.c"
Enumerations
| Name | Description | |
|---|---|---|
enum | MC_COY_PALACE_GROUNDS_ACTOR_ID { ACTOR_WEST_WORKER, ACTOR_NORTH_WORKER, ACTOR_LADY_MCCOY, ACT … } | The placed actors, numbered in the order of McCoyPalaceGroundsActorPlacements. |
enum | MC_COY_PALACE_GROUNDS_METATILE_BEHAVIOR { METATILE_BEHAVIOR_MCCOY_PALACE_GROUNDS_WELL } | The stone well by the palace's east corner, metatiles (28, 16) to (29, 17), which the cues answer besides the exits, whose metatile behaviors are their exits' numbers. |
enum | anonymous enum { FLAG_DOOR_OPEN, FLAG_GUARD_ASKED_WHERE_YOU_WERE, FLAG_KEEPIN … } | The grounds' temporary flags. |
Functions
| Name | Description | |
|---|---|---|
static void | scMcCoyPalaceGroundsRestoreStory (void) | Places the people by the story. |
static void | scMcCoyPalaceGroundsGuardsArrestParty (void) | The first time the party climbs the steps after lifting Kolima's curse, the guards cry "Oh! |
static void | scMcCoyPalaceGroundsOpenDoor (void) | The palace door swings open with a thump. |
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 outside McCoy's Palace. |
static void | scMcCoyPalaceGroundsCatchFloatingNut (void) | Catch on the Nut in the orange tree west of the steps pulls it down and gives it to the party. |
static void | scMcCoyPalaceGroundsSearchWell (void) | Searching the stone well by the palace's east corner (metatiles (28, 16) to (29, 17)): "Isaac peered into the well... |
const CUE * | scGetCues (void) | What the party can talk to, search and catch outside McCoy's Palace. |
static void | scMcCoyPalaceGroundsTalkToNorthWorker (void) | Before the curse is lifted, the wandering worker asks whether the party has seen the barricade they built on the road to Kolima. |
static void | scMcCoyPalaceGroundsTalkToLadyMcCoy (void) | Before the curse is lifted, Lady McCoy asks "Are you telling me that I'm responsible for this?" On yes she owns that she had the tree cut down for her palace, but calls herself the victim; on no she calls the curse a foolish old superstition. |
static void | scMcCoyPalaceGroundsTalkToWestGuard (void) | After the reward, the west guard asks "Do you think I can become as fine a warrior as you?" On yes he will try his best; on no he begs Isaac to just say yes. |
static void | scMcCoyPalaceGroundsTalkToEastGuard (void) | The east guard at the palace door asks whether the party is up to meeting his lord. |
static void | scMcCoyPalaceGroundsEnterPalace (void) | Walking north into the palace doorway (metatile (20, 16)), once the guards have let the party in and stepped aside: the door swings open if it is shut, Isaac walks through, and the palace's hall appears. |
Sint32 | scInit (void) | Sets up the grounds outside McCoy's Palace, and plays the guards' arrest once the curse is lifted. |
Variables
| Name | Description | |
|---|---|---|
extern Uint16 | McCoyPalaceGroundsDoorOpenSteps [] | The door's opening, drawn in three steps of 5 ticks each from the spare metatiles at (34, 25) to (36, 27). |
extern Sint32 | McCoyPalaceGroundsGuardWatchesParty [] | A guard turns to keep facing Isaac. |
extern SCENE_ENTRANCE | McCoyPalaceGroundsEntrances [] | |
extern Uint32 | McCoyPalaceGroundsExits [] | |
extern ACTOR_PLACE | McCoyPalaceGroundsNoActorPlacements [] | SceneIdMcCoyPalaceGrounds, and the overlay serves no other. |
extern ACTOR_PLACE | McCoyPalaceGroundsActorPlacements [] | |
extern CUE | McCoyPalaceGroundsNoCues [] | Unused, as McCoyPalaceGroundsNoActorPlacements is. |
extern CUE | McCoyPalaceGroundsCues [] |
Description
The grounds of McCoy's Palace, at the top of Bilibin.
The grounds are their own scene, SceneIdMcCoyPalaceGrounds, sharing the area
name McCoy's Palace with the palace itself (mccoy_palace.c). Steps lead up
from Bilibin to a sandy yard before the palace door, where two soldiers in
spiked helmets stand guard. West of the yard, workers with pickaxes have been
building Lady McCoy a new palace, stopped since the lumber from Kolima
vanished, and Lady McCoy herself complains of it. A Nut hangs in the orange
tree west of the steps for Catch, and a dry stone well stands by the palace's
east corner.
Talking to the east guard is the way in
(scMcCoyPalaceGroundsTalkToEastGuard). He asks whether the party is up to
meeting his lord; on yes the two guards confer, the west guard opens the door
(scMcCoyPalaceGroundsOpenDoor) and goes in ahead, and walking north into the
doorway takes the party inside (scMcCoyPalaceGroundsEnterPalace). After McCoy
has turned it away, the guards only talk.
The first time the party comes back once Kolima's curse is lifted, the guards
stop it on the steps, ask whether it broke the curse of the holy tree until
Isaac says yes, put it "under arrest" and march it straight into McCoy's room
for its reward (scMcCoyPalaceGroundsGuardsArrestParty). After the curse, Lady
McCoy stands at the west edge of the yard.
Its people follow three story flags: FLAG_MCCOY_PALACE_ADMITTED,
FLAG_MCCOY_PALACE_BARRICADE_NEEDS_NO_KEY (set once McCoy has turned the party
away) and FLAG_KOLIMA_CURSE_LIFTED; scMcCoyPalaceGroundsRestoreStory places
them by those flags.
In the French, Spanish and Italian editions, a patch of ivy (SPRITE_IVY)
grows at metatile (8, 24), over a dark opening at the foot of the cliff on
the grounds' south edge. The earlier editions leave the opening bare. No exit
or cue answers that opening, so the ivy only hides a way in that leads
nowhere.
Enumerations in detail
MC_COY_PALACE_GROUNDS_ACTOR_ID
enum MC_COY_PALACE_GROUNDS_ACTOR_ID
The placed actors, numbered in the order of
McCoyPalaceGroundsActorPlacements.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_WEST_WORKER | ACTOR_FIRST_PLACED | A worker with a pickaxe at the west edge of the yard, by the new palace. Before the curse is lifted: "The lumber I ordered from Kolima disappeared after the incident." |
ACTOR_NORTH_WORKER | The worker with a pickaxe who wanders by the new palace, north of the other. "Have you seen the barricade we built on the road to Kolima?" | |
ACTOR_LADY_MCCOY | Lady McCoy, a woman with curly purple hair in a pink dress, at the foot of the new palace. Once the curse is lifted she stands at the west edge of the yard: "Hmph! My palace is not finished!" | |
ACTOR_WEST_GUARD | The west guard at the palace door, a soldier in a spiked helmet, who goes in ahead of the party. "Lord McCoy is so upset about this curse that he can't even eat." | |
ACTOR_EAST_GUARD | The east guard at the palace door, who decides who may see McCoy. "The lord will only meet with brave and mighty warriors." | |
ACTOR_FLOATING_NUT | The Nut in the orange tree west of the steps, gone once Catch has taken it (FLAG_MCCOY_PALACE_GROUNDS_NUT_CAUGHT). |
Definition at line 59 of file mccoy_palace_grounds.c.
MC_COY_PALACE_GROUNDS_METATILE_BEHAVIOR
enum MC_COY_PALACE_GROUNDS_METATILE_BEHAVIOR
The stone well by the palace's east corner, metatiles (28, 16) to (29, 17), which the cues answer besides the exits, whose metatile behaviors are their exits' numbers.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_MCCOY_PALACE_GROUNDS_WELL | 90 |
Definition at line 96 of file mccoy_palace_grounds.c.
anonymous enum
enum { FLAG_DOOR_OPEN, FLAG_GUARD_ASKED_WHERE_YOU_WERE, FLAG_KEEPING_MCCOY_WAITING }
The grounds' temporary flags.
| Enumerator | Value | Description |
|---|---|---|
FLAG_DOOR_OPEN | FLAG_SCENE_TEMP(0x00) | The palace door stands open |
FLAG_GUARD_ASKED_WHERE_YOU_WERE | FLAG_SCENE_TEMP(0x01) | (scMcCoyPalaceGroundsOpenDoor), until the scene is left. The east guard has scolded the party for keeping McCoy waiting. |
FLAG_KEEPING_MCCOY_WAITING | FLAG_AREA_TEMP(0x04) | Set by Bilibin (bilibin.c) while the guards have let the party in but it has not yet entered the palace. The grounds are in another area than Bilibin, so entering them clears it before the guard can read it. |
Definition at line 102 of file mccoy_palace_grounds.c.
Functions in detail
scMcCoyPalaceGroundsRestoreStory
static void scMcCoyPalaceGroundsRestoreStory(void)
Places the people by the story. After the guards let the party in, the west guard is gone inside and the east guard stands aside, watching Isaac, until McCoy has turned the party away; then both stand either side of the door. Once the curse is lifted, Lady McCoy moves to the west edge of the yard and the worker by the new palace turns east, and the guards' arrest plays until McCoy has rewarded the party. The Nut is hung in its tree until it is caught.
References fdActorFaceDirection(), gmFlagClear(), gmFlagGet(), McCoyPalaceGroundsGuardWatchesParty, scFieldActorWatchAndStartScript(), scFloatNut() and scMcCoyPalaceGroundsGuardsArrestParty().
Referenced by scInit().
Definition at lines 116 and 384 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsGuardsArrestParty
static void scMcCoyPalaceGroundsGuardsArrestParty(void)
The first time the party climbs the steps after lifting Kolima's curse, the guards cry "Oh! Sir!" and "We've been looking everywhere for you!", and ask "The curse of the holy tree... You're the ones who broke it, right?" Each no brings "That's not true. We have witnesses who say they saw you in the forest!" and the question again. On yes the west guard declares "You're under arrest!", opens the door and marches Isaac straight into McCoy's room.
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdMapGridCenterOnFollowedPoint(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), scMcCoyPalaceGroundsOpenDoor(), syImportScriptSetExitRequest() and sySynch().
Referenced by scMcCoyPalaceGroundsRestoreStory().
Definition at lines 117 and 429 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsOpenDoor
static void scMcCoyPalaceGroundsOpenDoor(void)
The palace door swings open with a thump.
References fdMapGridPlayMapEdit(), gmFlagSet(), McCoyPalaceGroundsDoorOpenSteps and sySoundPlay().
Referenced by scMcCoyPalaceGroundsEnterPalace(), scMcCoyPalaceGroundsGuardsArrestParty() and scMcCoyPalaceGroundsTalkToEastGuard().
Definition at lines 118 and 524 of file mccoy_palace_grounds.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References McCoyPalaceGroundsEntrances.
Definition at line 122 of file mccoy_palace_grounds.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 127 of file mccoy_palace_grounds.c.
scGetExits
const Uint32 *scGetExits(void)
References McCoyPalaceGroundsExits.
Definition at line 132 of file mccoy_palace_grounds.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
The people outside McCoy's Palace.
References gmFlagGet(), MainRoutineStateWork, McCoyPalaceGroundsActorPlacements and McCoyPalaceGroundsNoActorPlacements.
Definition at line 138 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsCatchFloatingNut
static void scMcCoyPalaceGroundsCatchFloatingNut(void)
Catch on the Nut in the orange tree west of the steps pulls it down and gives it to the party.
References scCatchNut().
Referenced by McCoyPalaceGroundsCues.
Definition at line 157 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsSearchWell
static void scMcCoyPalaceGroundsSearchWell(void)
Searching the stone well by the palace's east corner (metatiles (28, 16) to (29, 17)): "Isaac peered into the well... Upon closer inspection, it seems the well is dried up." Nothing is found.
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by McCoyPalaceGroundsCues.
Definition at line 165 of file mccoy_palace_grounds.c.
scGetCues
const CUE *scGetCues(void)
What the party can talk to, search and catch outside McCoy's Palace.
References MainRoutineStateWork, McCoyPalaceGroundsCues and McCoyPalaceGroundsNoCues.
Definition at line 174 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsTalkToNorthWorker
static void scMcCoyPalaceGroundsTalkToNorthWorker(void)
Before the curse is lifted, the wandering worker asks whether the party has seen the barricade they built on the road to Kolima. On yes he admits it is pretty shabby, built on short notice; on no he says it is off to the east.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by McCoyPalaceGroundsCues.
Definition at line 186 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsTalkToLadyMcCoy
static void scMcCoyPalaceGroundsTalkToLadyMcCoy(void)
Before the curse is lifted, Lady McCoy asks "Are you telling me that I'm responsible for this?" On yes she owns that she had the tree cut down for her palace, but calls herself the victim; on no she calls the curse a foolish old superstition.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by McCoyPalaceGroundsCues.
Definition at line 201 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsTalkToWestGuard
static void scMcCoyPalaceGroundsTalkToWestGuard(void)
After the reward, the west guard asks "Do you think I can become as fine a warrior as you?" On yes he will try his best; on no he begs Isaac to just say yes.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by McCoyPalaceGroundsCues.
Definition at line 215 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsTalkToEastGuard
static void scMcCoyPalaceGroundsTalkToEastGuard(void)
The east guard at the palace door asks whether the party is up to meeting his lord. On yes he and the west guard confer, decide nobody else seems up to the challenge, and the west guard says "All right. I shall let you pass. Follow me!", opens the door and goes in; on no the guard says he cannot send such inexperienced children. Once the party is let in, he warns that Lord McCoy is a very difficult man, and keeps turning to watch Isaac. After McCoy has turned the party away, he only talks.
Unused: the branch for a party back from Bilibin never runs. In it he scolds
the party once for keeping McCoy waiting (MsgBilibinWhere, Where were you?,
and MsgBilibinMasterQuiteCranky). The branch is never reached because
FLAG_KEEPING_MCCOY_WAITING is cleared on entering the grounds.
References fdActorFaceDirection(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWalkToAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), McCoyPalaceGroundsGuardWatchesParty, scFieldActorWatchAndStartScript() and scMcCoyPalaceGroundsOpenDoor().
Referenced by McCoyPalaceGroundsCues.
Definition at line 238 of file mccoy_palace_grounds.c.
scMcCoyPalaceGroundsEnterPalace
static void scMcCoyPalaceGroundsEnterPalace(void)
Walking north into the palace doorway (metatile (20, 16)), once the guards have let the party in and stepped aside: the door swings open if it is shut, Isaac walks through, and the palace's hall appears.
References fdActorCenterAndWalk(), fdActorSetAnimation(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagGet(), scMcCoyPalaceGroundsOpenDoor() and syImportScriptSetExitRequest().
Referenced by McCoyPalaceGroundsCues.
Definition at line 341 of file mccoy_palace_grounds.c.
scInit
Sint32 scInit(void)
Sets up the grounds outside McCoy's Palace, and plays the guards' arrest once the curse is lifted.
References fdActorGet(), MainRoutineStateWork, scMcCoyPalaceGroundsRestoreStory(), Sint32 and state.
Definition at line 359 of file mccoy_palace_grounds.c.
Variables in detail
McCoyPalaceGroundsDoorOpenSteps
extern Uint16 McCoyPalaceGroundsDoorOpenSteps[]
Uint16 McCoyPalaceGroundsDoorOpenSteps[]
The door's opening, drawn in three steps of 5 ticks each from the spare metatiles at (34, 25) to (36, 27).
Referenced by scMcCoyPalaceGroundsOpenDoor().
Definition at lines 48 and 536 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsGuardWatchesParty
extern Sint32 McCoyPalaceGroundsGuardWatchesParty[]
Sint32 McCoyPalaceGroundsGuardWatchesParty[]
A guard turns to keep facing Isaac.
References scTurnTowardTarget() and Sint32.
Referenced by scMcCoyPalaceGroundsRestoreStory() and scMcCoyPalaceGroundsTalkToEastGuard().
Definition at lines 49 and 542 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsEntrances
extern SCENE_ENTRANCE McCoyPalaceGroundsEntrances[]
SCENE_ENTRANCE McCoyPalaceGroundsEntrances[]
Referenced by scGetEntrances().
Definition at lines 50 and 547 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsExits
extern Uint32 McCoyPalaceGroundsExits[]
Uint32 McCoyPalaceGroundsExits[]
Referenced by scGetExits().
Definition at lines 51 and 555 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsNoActorPlacements
extern ACTOR_PLACE McCoyPalaceGroundsNoActorPlacements[]
ACTOR_PLACE McCoyPalaceGroundsNoActorPlacements[]
SceneIdMcCoyPalaceGrounds, and the overlay serves no other.
Referenced by scGetActorPlacements().
Definition at lines 52 and 570 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsActorPlacements
extern ACTOR_PLACE McCoyPalaceGroundsActorPlacements[]
ACTOR_PLACE McCoyPalaceGroundsActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 53 and 574 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsNoCues
extern CUE McCoyPalaceGroundsNoCues[]
CUE McCoyPalaceGroundsNoCues[]
Unused, as McCoyPalaceGroundsNoActorPlacements is.
Referenced by scGetCues().
Definition at lines 54 and 595 of file mccoy_palace_grounds.c.
McCoyPalaceGroundsCues
extern CUE McCoyPalaceGroundsCues[]
CUE McCoyPalaceGroundsCues[]
References scMcCoyPalaceGroundsCatchFloatingNut(), scMcCoyPalaceGroundsEnterPalace(), scMcCoyPalaceGroundsSearchWell(), scMcCoyPalaceGroundsTalkToEastGuard(), scMcCoyPalaceGroundsTalkToLadyMcCoy(), scMcCoyPalaceGroundsTalkToNorthWorker() and scMcCoyPalaceGroundsTalkToWestGuard().
Referenced by scGetCues().
Definition at lines 55 and 599 of file mccoy_palace_grounds.c.