src/scene/madra_drawbridge.c
The Madra Drawbridge, east of Madra, where two guards keep the way into Osenia shut until Madra's elder gives the party permission. More…
#include "field/field.h"#include "game/game.h"#include "field/script_inline.h"#include "field/field_engine_script.h"#include "text/msg_ids.h"
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_DRAWBRIDGE_GUARDS_LET_PARTY_THROUGH 0x916 | The guards have let the permitted party over the bridge. |
#define | FLAG_GUARDS_BLOCKED_BRIDGE FLAG_SCENE_TEMP(0x00) | Set once the guards have closed ranks on this visit. |
#define | FLAG_GUARDS_ASKED_FOR_PERMISSION FLAG_AREA_TEMP(0x01) | Set once the guards have told the party to fetch the elder's permission. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { METATILE_BEHAVIOR_MADRA_DRAWBRIDGE_FOOT } | The metatiles at the foot of the bridge, whose step cue brings the guards across it. |
enum | MADRA_DRAWBRIDGE_ACTOR_ID { ACTOR_EAST_GUARD, ACTOR_WEST_GUARD } | The two guards, numbering the rows of ActorPlacements. |
Functions
| Name | Description | |
|---|---|---|
const SCENE_ENTRANCE * | scGetEntrances (void) | Where the party can enter: the cave under the spring has its own entrances. |
const SCENE_REGION * | scGetExitRegions (void) | The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room. |
const Uint32 * | scGetExits (void) | The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
void | scMadraDrawbridgeAskGoingToOsenia (void) | The east guard asks whether the party is bound for Osenia, and without the elder's permission sends it back to town for a permit. |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
void | scMadraDrawbridgeBlockBridge (void) | The guards close ranks across the bridge as the party steps onto it, once a visit, and the first time they ask for the elder's permission. |
void | scMadraDrawbridgeLetPermittedPartyThrough (void) | With the elder's permission, the guards greet the party and let it through. |
Sint32 | scInit (void) | Opens the room through the window transition, and in the debug room draws the cat 1.7 times its size. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
Variables
| Name | Description | |
|---|---|---|
SCENE_ENTRANCE | SceneEntrances [] | Besides the party's return to the pier after the ship is stolen, four unused spots about the mast: below the huge block, on the dock by its crate, on the deck, and at the top of the sail's east pole. |
Uint32 | SceneExits [] | The room has no exits of its own. |
ACTOR_PLACE | ActorPlacements [] | The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
The Madra Drawbridge, east of Madra, where two guards keep the way into Osenia shut until Madra's elder gives the party permission.
The first time the party steps onto the bridge (scMadraDrawbridgeBlockBridge)
the guards close ranks across it and send the party back for the elder's
permission. Once FLAG_OSENIA_PASSAGE_GRANTED is set they greet the party
instead (scMadraDrawbridgeLetPermittedPartyThrough) and step aside.
Macros in detail
FLAG_DRAWBRIDGE_GUARDS_LET_PARTY_THROUGH
#define FLAG_DRAWBRIDGE_GUARDS_LET_PARTY_THROUGH 0x916
The guards have let the permitted party over the bridge.
Referenced by SceneCues and scMadraDrawbridgeLetPermittedPartyThrough().
Definition at line 16 of file madra_drawbridge.c.
FLAG_GUARDS_BLOCKED_BRIDGE
#define FLAG_GUARDS_BLOCKED_BRIDGE FLAG_SCENE_TEMP(0x00)
Set once the guards have closed ranks on this visit.
Referenced by scMadraDrawbridgeBlockBridge().
Definition at line 19 of file madra_drawbridge.c.
FLAG_GUARDS_ASKED_FOR_PERMISSION
#define FLAG_GUARDS_ASKED_FOR_PERMISSION FLAG_AREA_TEMP(0x01)
Set once the guards have told the party to fetch the elder's permission.
Referenced by scMadraDrawbridgeBlockBridge().
Definition at line 21 of file madra_drawbridge.c.
Enumerations in detail
anonymous enum
enum { METATILE_BEHAVIOR_MADRA_DRAWBRIDGE_FOOT }
The metatiles at the foot of the bridge, whose step cue brings the guards across it.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_MADRA_DRAWBRIDGE_FOOT | 10 |
Definition at line 25 of file madra_drawbridge.c.
MADRA_DRAWBRIDGE_ACTOR_ID
enum MADRA_DRAWBRIDGE_ACTOR_ID
The two guards, numbering the rows of ActorPlacements.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_EAST_GUARD | ACTOR_FIRST_PLACED | The guard on the east side of the bridge. |
ACTOR_WEST_GUARD | The guard on the west side of the bridge. |
Definition at line 31 of file madra_drawbridge.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 39 of file madra_drawbridge.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 44 of file madra_drawbridge.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 49 of file madra_drawbridge.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References ActorPlacements.
Definition at line 54 of file madra_drawbridge.c.
scMadraDrawbridgeAskGoingToOsenia
void scMadraDrawbridgeAskGoingToOsenia(void)
The east guard asks whether the party is bound for Osenia, and without the elder's permission sends it back to town for a permit.
References fdActorSetAnimationAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), MainRoutineStateWork and Sint32.
Referenced by SceneCues.
Definition at line 61 of file madra_drawbridge.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 87 of file madra_drawbridge.c.
scMadraDrawbridgeBlockBridge
void scMadraDrawbridgeBlockBridge(void)
The guards close ranks across the bridge as the party steps onto it, once a visit, and the first time they ask for the elder's permission.
References fdActorFaceDirection(), fdActorGetById(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraWaitForArrival(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptGetFlag(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait(), MainRoutineStateWork and Sint32.
Referenced by SceneCues.
Definition at line 94 of file madra_drawbridge.c.
scMadraDrawbridgeLetPermittedPartyThrough
void scMadraDrawbridgeLetPermittedPartyThrough(void)
With the elder's permission, the guards greet the party and let it through.
References fdActorSetAnimationAndWait(), fdCameraWaitForArrival(), fdScriptEnd(), fdScriptEndLastingPsynergy(), fdScriptSetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and Sint32.
Referenced by SceneCues.
Definition at line 141 of file madra_drawbridge.c.
scInit
Sint32 scInit(void)
References Sint32.
Definition at line 159 of file madra_drawbridge.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 165 of file madra_drawbridge.c.
Variables in detail
SceneEntrances
SCENE_ENTRANCE SceneEntrances[]
Referenced by scGetEntrances().
Definition at line 170 of file madra_drawbridge.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 175 of file madra_drawbridge.c.
ActorPlacements
ACTOR_PLACE ActorPlacements[]
Referenced by scGetActorPlacements().
Definition at line 182 of file madra_drawbridge.c.
SceneCues
CUE SceneCues[]
References scMadraDrawbridgeAskGoingToOsenia(), scMadraDrawbridgeBlockBridge() and scMadraDrawbridgeLetPermittedPartyThrough().
Referenced by scGetCues().
Definition at line 204 of file madra_drawbridge.c.