Alchemy
Loading...
Searching...
No Matches

mccoy_palace_garden.c File Reference

The garden before Lord McCoy's palace in Bilibin. More...

Go to the source code of this file.

Macros

#define MCCOY_GARDEN_SET_ACTOR_POSITION   ((s32 (*)())Engine_ActorSetPosition)

Enumerations

enum  {
  ACTOR_WEST_WORKER = 8 , ACTOR_NORTH_WORKER = 9 , ACTOR_LORD_MCCOY = 10 , ACTOR_WEST_GUARD = 11 ,
  ACTOR_EAST_GUARD = 12 , ACTOR_FLOATING_NUT = 13
}

Functions

static void Garden_ApplyProgress (void)
 The guards stand where the party left them; once the curse is lifted, McCoy waits in the garden and, the first time, the guards arrest the party.
static void Event_GuardsArrestParty (void)
 Kolima's curse is lifted: the guards stop the party, ask whether they broke the holy tree's curse until they answer yes, and march them into the palace to McCoy.
static void Garden_OpenPalaceGate (void)
 The palace gate swings open.
const struct SceneEntrance * Scene_GetEntrances (void)
const struct SceneRegion * Scene_GetRegions (void)
const u32 * Scene_GetExits (void)
 Both scenes share one exit table.
const struct ScenePlacement * Scene_GetPlacements (void)
 The garden's people.
static void Event_CatchFloatingNut (void)
 Catch on the nut floating over the garden: the party gets it.
static void Event_SearchWell (void)
 Searching the dry well.
const struct SceneEvent * Scene_GetEvents (void)
 What the party can talk to, search and catch in the garden.
static void Event_TalkToNorthWorker (void)
 The north worker asks whether the party has seen the barricade.
static void Event_TalkToMcCoy (void)
 McCoy asks whether the palace work makes him responsible for the curse.
static void Event_TalkToWestGuard (void)
 The young west guard asks whether he can become a warrior like them.
static void Event_TalkToEastGuard (void)
 The east guard: until he lets them in, he asks whether they are brave enough to meet McCoy and, on yes, opens the gate and walks in with his partner; after, he scolds them once for keeping McCoy waiting.
static void Event_EnterPalace (void)
 Walking into the palace gate: it opens if still shut and the leader walks in.
s32 Scene_Initialize (void)
 Sets the garden up: the west worker drawn in front, and the guards, McCoy and the arrest as the story stands.

Variables

u16 gPalaceGateOpenSteps []
 The gate opening: three steps of cells, 5 frames each.
s32 gGuardWatchesParty []
 A guard turns to keep facing the party.
struct SceneEntrance gMcCoyPalaceGardenEntrances []
u32 gMcCoyPalaceGardenExits []
struct ScenePlacement gMcCoyPalaceGardenPlacementsOther []
struct ScenePlacement gMcCoyPalaceGardenPlacements []
struct SceneEvent gMcCoyPalaceGardenEventsOther []
struct SceneEvent gMcCoyPalaceGardenEvents []

Detailed Description

The garden before Lord McCoy's palace in Bilibin.

Two guards keep the palace gate and let only brave warriors through; once Kolima's curse is lifted, they arrest the party for breaking it and take them to McCoy.

Scene flags: FLAG_SCENE_TEMP_00, the palace gate is open; FLAG_SCENE_TEMP_01, the east guard has scolded the party for keeping McCoy waiting. Flag 0x304, reused from place to place, is set in Bilibin when McCoy is looking for the party.

Definition in file mccoy_palace_garden.c.

Macro Definition Documentation

◆ MCCOY_GARDEN_SET_ACTOR_POSITION

#define MCCOY_GARDEN_SET_ACTOR_POSITION   ((s32 (*)())Engine_ActorSetPosition)

Definition at line 43 of file mccoy_palace_garden.c.

Referenced by Event_TalkToEastGuard().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ACTOR_WEST_WORKER 
ACTOR_NORTH_WORKER 
ACTOR_LORD_MCCOY 
ACTOR_WEST_GUARD 
ACTOR_EAST_GUARD 
ACTOR_FLOATING_NUT 

Definition at line 46 of file mccoy_palace_garden.c.

Function Documentation

◆ Garden_ApplyProgress()

void Garden_ApplyProgress ( void )
static

The guards stand where the party left them; once the curse is lifted, McCoy waits in the garden and, the first time, the guards arrest the party.

Definition at line 254 of file mccoy_palace_garden.c.

Referenced by Garden_ApplyProgress(), and Scene_Initialize().

◆ Event_GuardsArrestParty()

void Event_GuardsArrestParty ( void )
static

Kolima's curse is lifted: the guards stop the party, ask whether they broke the holy tree's curse until they answer yes, and march them into the palace to McCoy.

Definition at line 287 of file mccoy_palace_garden.c.

Referenced by Event_GuardsArrestParty(), and Garden_ApplyProgress().

◆ Garden_OpenPalaceGate()

void Garden_OpenPalaceGate ( void )
static

The palace gate swings open.

Definition at line 374 of file mccoy_palace_garden.c.

Referenced by Event_EnterPalace(), Event_GuardsArrestParty(), Event_TalkToEastGuard(), and Garden_OpenPalaceGate().

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 61 of file mccoy_palace_garden.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 65 of file mccoy_palace_garden.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 67 of file mccoy_palace_garden.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

The garden's people.

Once McCoy has turned the party away, the east guard turns back after talking, and once the curse is lifted McCoy faces the party.

Definition at line 72 of file mccoy_palace_garden.c.

◆ Event_CatchFloatingNut()

void Event_CatchFloatingNut ( void )
static

Catch on the nut floating over the garden: the party gets it.

Definition at line 84 of file mccoy_palace_garden.c.

◆ Event_SearchWell()

void Event_SearchWell ( void )
static

Searching the dry well.

Definition at line 94 of file mccoy_palace_garden.c.

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

What the party can talk to, search and catch in the garden.

Definition at line 102 of file mccoy_palace_garden.c.

◆ Event_TalkToNorthWorker()

void Event_TalkToNorthWorker ( void )
static

The north worker asks whether the party has seen the barricade.

Definition at line 110 of file mccoy_palace_garden.c.

Referenced by Event_TalkToNorthWorker().

◆ Event_TalkToMcCoy()

void Event_TalkToMcCoy ( void )
static

McCoy asks whether the palace work makes him responsible for the curse.

Definition at line 118 of file mccoy_palace_garden.c.

Referenced by Event_TalkToMcCoy().

◆ Event_TalkToWestGuard()

void Event_TalkToWestGuard ( void )
static

The young west guard asks whether he can become a warrior like them.

Definition at line 126 of file mccoy_palace_garden.c.

◆ Event_TalkToEastGuard()

void Event_TalkToEastGuard ( void )
static

The east guard: until he lets them in, he asks whether they are brave enough to meet McCoy and, on yes, opens the gate and walks in with his partner; after, he scolds them once for keeping McCoy waiting.

Definition at line 136 of file mccoy_palace_garden.c.

◆ Event_EnterPalace()

void Event_EnterPalace ( void )
static

Walking into the palace gate: it opens if still shut and the leader walks in.

Definition at line 218 of file mccoy_palace_garden.c.

Referenced by Event_EnterPalace().

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Sets the garden up: the west worker drawn in front, and the guards, McCoy and the arrest as the story stands.

Sets up whichever scene is being entered and runs its arrival events.

Definition at line 234 of file mccoy_palace_garden.c.

Variable Documentation

◆ gPalaceGateOpenSteps

u16 gPalaceGateOpenSteps[]
Initial value:
= {
MAP_CELL_STEP(34, 25, 1, 3, 5), MAP_CELL_STEP(35, 25, 1, 3, 5), MAP_CELL_STEP(36, 25, 1, 3, 5), MAP_CELL_STEPS_END,
}
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
Definition field_event.h:59
#define MAP_CELL_STEPS_END
Definition field_event.h:61

The gate opening: three steps of cells, 5 frames each.

Definition at line 384 of file mccoy_palace_garden.c.

Referenced by Garden_OpenPalaceGate().

◆ gGuardWatchesParty

s32 gGuardWatchesParty[]
Initial value:
= {
SC_CALL(Scene_TurnTowardTarget),
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_FOREVER
Definition objcmd.h:14
#define SC_TOP
Script start.
Definition objcmd.h:13
#define SC_CALL(fn)
Definition objcmd.h:50

A guard turns to keep facing the party.

Definition at line 389 of file mccoy_palace_garden.c.

Referenced by Event_TalkToEastGuard(), and Garden_ApplyProgress().

◆ gMcCoyPalaceGardenEntrances

struct SceneEntrance gMcCoyPalaceGardenEntrances[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 320, 0, 328, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 2, CONDITION_ALWAYS, 328, 0, 272, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 394 of file mccoy_palace_garden.c.

Referenced by Scene_GetEntrances().

◆ gMcCoyPalaceGardenExits

u32 gMcCoyPalaceGardenExits[]
Initial value:
= {
SCENE_EXIT(1, 30, 2),
SCENE_EXIT(2, 33, 1),
SCENE_EXIT(10, 33, 29),
}
#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 400 of file mccoy_palace_garden.c.

Referenced by Scene_GetExits().

◆ gMcCoyPalaceGardenPlacementsOther

struct ScenePlacement gMcCoyPalaceGardenPlacementsOther[]
Initial value:
= {
}

Definition at line 408 of file mccoy_palace_garden.c.

Referenced by Scene_GetPlacements().

◆ gMcCoyPalaceGardenPlacements

struct ScenePlacement gMcCoyPalaceGardenPlacements[]
Initial value:
= {
PIXELS(135), 0, PIXELS(200), FACING_SOUTH, TALK_FACE_PARTY, 0 },
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_WANDER
@ ACTOR_STAND
@ FACING_SOUTHEAST
Definition field_scene.h:27
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)
#define FLAG_MCCOY_PALACE_GARDEN_NUT_CAUGHT
the floating nut
Definition flags.h:334

Definition at line 412 of file mccoy_palace_garden.c.

Referenced by Scene_GetPlacements().

◆ gMcCoyPalaceGardenEventsOther

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

Definition at line 432 of file mccoy_palace_garden.c.

Referenced by Scene_GetEvents().

◆ gMcCoyPalaceGardenEvents

struct SceneEvent gMcCoyPalaceGardenEvents[]

Definition at line 436 of file mccoy_palace_garden.c.

Referenced by Scene_GetEvents().