src/scene/lunpa_fortress.c
Lunpa Fortress, the stronghold of the thief Dodonpa at the top of Lunpa, where he holds Hammet, the great merchant of Kalay, for ransom; and the cave and the cells under it, where Hammet is kept. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "debug/debug.h"#include "field/actor_script.h"#include "field/script_inline.h"#include "graphics/graphics.h"#include "scene/walk_into_leader.h"#include "sound/sound_driver_symbols.h"#include "text/msg_ids.h"#include "shared/pushed_actor.c"#include "shared/pushed_actor_tables.c"
Macros
| Name | Description | |
|---|---|---|
#define | LUNPA_FORTRESS_PASSAGE_LAYERS | The map layers the dark halls show (fdMapGridSetShownLayers): the ground, the walls, and MAPGRID_LAYER_OVERHEAD with the circles of light over them. |
#define | LUNPA_FORTRESS_ROOM_LAYERS (DISPCNT_BG2_ON | DISPCNT_BG3_ON) | The map layers the lit rooms show: the ground and the walls, without the circles of light. |
#define | PAIRED_PATROL_LAYER_ORIGIN_X (136.0 * toFIXED(1)) | Where the west hall's pair have their circles of light on the overhead layer, 136 pixels across; the layer scrolls by the first guard's distance from it, so the circles walk with the pair. |
#define | FLAG_LUNPA_FORTRESS_DODONPA_JUDGED FLAG_AREA_TEMP(0x01) | Donpa has judged Dodonpa, so Hammet's cell no longer starts the trap. |
#define | FLAG_LUNPA_FORTRESS_ATTENDANT_TOLD_OF_DONPA FLAG_AREA_TEMP(0x13) | Donpa's attendant has told the party of Donpa and his spoiled son. |
#define | FLAG_LUNPA_FORTRESS_REWARD_SHOWN FLAG_AREA_TEMP(0x14) | Donpa's attendant has shown the party his reward, Tonic, and stands at the door to its room. |
#define | FLAG_LUNPA_FORTRESS_PARTY_SPOTTED FLAG_SCENE_TEMP(0x14) | A guard has spotted the party. |
#define | FLAG_LUNPA_FORTRESS_UNUSED_SPOTTED FLAG_SCENE_TEMP(0x15) | Unused: set beside FLAG_LUNPA_FORTRESS_PARTY_SPOTTED whenever a guard sees the leader, and never read. |
#define | FLAG_LUNPA_FORTRESS_FIRST_SWITCH_UNDER_IVY FLAG_SCENE_TEMP(0x17) | The cave's first switch is still hidden by its ivy. |
#define | FLAG_LUNPA_FORTRESS_SECOND_SWITCH_UNDER_IVY FLAG_SCENE_TEMP(0x18) | The cave's second switch is still hidden by its ivy. |
#define | FLAG_LUNPA_FORTRESS_ENTRANCE_GUARD_CAUGHT_PARTY FLAG_SCENE_TEMP(0x24) | The entrance guard has thrown the party out. |
#define | FLAG_LUNPA_FORTRESS_SENTRIES_CAUGHT_PARTY FLAG_SCENE_TEMP(0x25) | The sentries have spotted the party and thrown it out. |
#define | FLAG_LUNPA_FORTRESS_OLD_MAN_PROMISED_SILENCE FLAG_SCENE_TEMP(0x26) | The startled old man has promised to keep quiet. |
#define | FLAG_LUNPA_FORTRESS_OLD_MAN_STARTLED FLAG_SCENE_TEMP(0x27) | The startled old man has been startled once. |
#define | FLAG_LUNPA_FORTRESS_FINDING_HAMMET FLAG_SCENE_TEMP(0x70) | scLunpaFortressFindHammet is under way. |
#define | PUSHED_ACTOR_TABLES_READ_ONLY | Lunpa Fortress keeps its pushed-actor tables with its read-only data, though the shared declarations in field.h and pushed_actor.c are not const. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { ACTOR_GROUND_FLOOR_ENTRANCE_GUARD, ACTOR_GROUND_FLOOR_FIRST_ … } | The ground floor's people, numbered in the order of LunpaFortressGroundFloorActorPlacements from ACTOR_FIRST_PLACED, past its first four rows. |
enum | anonymous enum { ACTOR_UPPER_FLOOR_CELL_KEY, ACTOR_UPPER_FLOOR_FIRST_PATROL, … } | The upper floor's people and the Cell Key, numbered in the order of LunpaFortressUpperFloorActorPlacements from ACTOR_FIRST_PLACED. |
enum | anonymous enum { ACTOR_CAVE_FIRST_SWITCH_IVY, ACTOR_CAVE_PASSAGE_IVY, ACTOR_C … } | The cave's ivy and crates, numbered in the order of LunpaFortressCaveActorPlacements from ACTOR_FIRST_PLACED. |
enum | anonymous enum { ACTOR_INVISIBLE_TOADONPA_WEST_JAR, ACTOR_INVISIBLE_TOADONPA_ … } | The cells' people, numbered in the order of LunpaFortressToadonpaActorPlacements from ACTOR_FIRST_PLACED. |
enum | LUNPA_FORTRESS_ANIMATION { ANIM_GUARD_BEATEN, ANIM_DONPA_IN_BED, ANIM_TOADONPA_FALLEN, … } | Animations of the fortress's sprites beyond ACTOR_ANIMATION, as their animation tables and ticks under graphics/sprite draw them. |
enum | LUNPA_FORTRESS_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LUNPA_FORTRESS_LOCKED_DOOR, METATILE_BEHAV … } | The metatile behaviors the fortress's cues answer. |
enum | LUNPA_FORTRESS_RAISED_CUE { RAISED_PATROL_PAIR_SPOTTED, RAISED_HALL_PATROL_SPOTTED, RAIS … } | The scripts a watching guard raises on spotting the party. |
enum | anonymous enum { EXIT_THROWN_OUT } | Where a party caught by a guard is sent: the Lunpa Fortress Gates. |
enum | anonymous enum { ENCOUNTER_SLOT_BRIGAND, ENCOUNTER_SLOT_THREE_BRIGANDS, ENCOU … } | The battles the fortress's guards and Dodonpa start, by their slot of ENCOUNTER_ZONE_SCRIPTED. |
enum | anonymous enum { TOADONPA_DOOR_FLAG, CAVE_DOOR_FLAG, UPPER_FLOOR_DOOR_FLAG, G … } | The first of the flags that remember which cell doors the Cell Key opened, per scene: one for each door cue from METATILE_BEHAVIOR_LUNPA_FORTRESS_FIRST_DOOR. |
enum | REUNION_MESSAGE { REUNION_HAMMET_ASKS_IF_TIME_TO_EAT, REUNION_HAMMET_ASKS_WHO, … } | Hammet's reunion with Ivan in his cell and Dodonpa's interruption (scLunpaFortressFindHammet), in order. |
enum | AFTERMATH_MESSAGE { AFTERMATH_DODONPA_CRIES_OUT, AFTERMATH_GARET_ASKS_HOW_DODONP … } | The talk over Dodonpa pinned under his beaten monster (scLunpaFortressDonpaJudgesDodonpa), in order. |
enum | PUNISHMENT_MESSAGE { PUNISHMENT_GARET_FREES_DODONPA, PUNISHMENT_DODONPA_CANNOT_ST … } | The party's debate over Dodonpa's punishment, until Donpa arrives (scLunpaFortressDonpaJudgesDodonpa), in order. |
enum | JUDGMENT_MESSAGE { JUDGMENT_DODONPA_CALLS_FATHER, JUDGMENT_DONPA_PITIES_DODONPA … } | Donpa's judgment of his son and his request to the party (scLunpaFortressDonpaJudgesDodonpa), in order. |
enum | anonymous enum { ACTOR_FIRST_SWORD_CHEST } | The four chests, from ACTOR_FIRST_SWORD_CHEST, that the unused sword pickups open: the ground floor's, whose first four placements are chests at the map's origin. |
Functions
| Name | Description | |
|---|---|---|
static Sint32 | scLunpaFortressTryTakeChestItem (Sint32 actorId, Sint32 itemId) | Unused: called only by the four pickups above. |
static void | scLunpaFortressCheckSecondEntranceSentry (void) | The second sentry, as the first. |
static Bool | scLunpaFortressCanGuardSeeLeader (Sint32 actorId) | Whether a guard on screen sees the leader along his row or column. |
static Bool | scLunpaFortressIsLeaderNearGuard (Sint32 actorId) | Whether the leader is within four metatiles, walking, of the metatile below the guard. |
static Bool | scLunpaFortressIsGuardNearViewCenter (Sint32 actorId) | Whether the guard is on screen: within seven columns and five rows of the view's center. |
static void | scLunpaFortressGuardThrowsPartyOut (Sint32 actorId) | A guard who has seen Isaac stops with a start, turns to him and asks "Who are you? |
static void | scLunpaFortressCryIntruder (Sint32 actorId) | A guard spots an intruder. |
static void | scLunpaFortressAskWhosThat (Sint32 actorId) | A guard asks who is there. |
static void | scLunpaFortressAskIfShiftIsUp (Sint32 actorId) | A guard expects his relief, then sees who it is. |
static void | scLunpaFortressCallPartyScoundrel (Sint32 actorId) | A guard calls the party a scoundrel. |
static void | scLunpaFortressInitGroundFloor (void) | Sets the ground floor up by the way the party came in: the guards who watch that part of the floor, and the cell doors already opened. |
static void | scLunpaFortressInitUpperFloor (void) | Sets the upper floor up by the way the party came in: the guards who watch that part, the guards already beaten, the Cell Key once taken, and Donpa's attendant at the door to Tonic's room once the reward has been shown. |
static void | scLunpaFortressInitCave (void) | Sets the cave up: the crates and ivy as the party left them, and the doorways already opened. |
static void | scLunpaFortressRestoreGroundFloorDoors (void) | The ground floor's opened cell doors stay open. |
static void | scLunpaFortressRestoreUpperFloorDoors (void) | The upper floor's opened cell doors stay open. |
static void | scLunpaFortressRestoreCaveDoors (void) | The cave's opened cell doors stay open. |
static void | scLunpaFortressRestoreToadonpaDoors (void) | The cells' opened doors stay open. |
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 guards, the other people and the objects of each scene. |
const CUE * | scGetCues (void) | What the party can talk to, search and use Psynergy on, by scene. |
static void | scLunpaFortressLowerCrates (void) | The crates settle in the gap at the foot of the cave's middle corridor, at metatile (15, 23), as a step the party can walk across down to the ledge below. |
static void | scLunpaFortressPushCrates (void) | Walking into the stack of crates in the cave pushes it one metatile along: out of its nook behind the middle cell door, through the room below and down the corridor to the gap at its foot. |
static void | scLunpaFortressCratesSink (void) | Pushing the crates on from the end of the cave's middle corridor, at metatile (15, 21), drops them into the gap at its foot, where they settle as a step and Isaac can walk on down over them. |
static void | scLunpaFortressMoveCrates (void) | Casting Move on the stack of crates in the cave: once they stand over the gap at the foot of the middle corridor, the cave shakes, they clatter down and settle in it as when pushed. |
static void | scLunpaFortressRestoreLoweredCrates (void) | On a return to the cave, the crates are back in the gap where they settled. |
static void | scLunpaFortressOpenToadonpaDoor (Sint32 doorIndex) | Draws one of the cells' doors open. |
static void | scLunpaFortressUnlockToadonpaDoor (void) | Walking up to one of the cells' doors with the Cell Key in the party opens it, and the screen shakes. |
static void | scLunpaFortressOpenCaveDoor (Sint32 doorIndex) | Draws one of the cave's cell doors open and lets the party through. |
static void | scLunpaFortressUnlockCaveDoor (void) | Walking up to one of the cave's three cell doors with the Cell Key in the party opens it, and the screen shakes. |
static void | scLunpaFortressOpenUpperFloorDoor (Sint32 doorIndex) | Draws one of the upper floor's two cell doors open. |
static void | scLunpaFortressUnlockUpperFloorDoor (void) | Walking up to the north cell door of the Cell Key room, at metatile (16, 51), with the Cell Key in the party opens it, and the screen shakes. |
static void | scLunpaFortressOpenGroundFloorDoor (Sint32 doorIndex) | Draws one of the ground floor's cell doors open and lets the party through. |
static void | scLunpaFortressUnlockGroundFloorDoor (void) | Walking up to the cell door in the hall at the top of the ground floor, at metatile (28, 10), from either side with the Cell Key in the party opens it, and the screen shakes. |
static void | scLunpaFortressSearchLockedDoor (void) | Searching any cell door of the fortress without the Cell Key shows "The door is tightly locked." |
static void | scLunpaFortressSearchSealedDoor (void) | Searching one of the cave's two sealed doorways shows "The door is tightly locked." No key opens them: one is in the middle of the north wall of the room at the foot of the stairs, at metatile (21, 34), the other in the small north-west chamber, at metatile (6, 10), and each opens to its hidden switch. |
static void UNUSED | scLunpaFortressUnusedTakeArcticBlade (void) | Unused: nothing calls this pickup or the three after it. |
static void UNUSED | scLunpaFortressUnusedTakeMasamune (void) | Unused: the Masamune, from the second chest. |
static void UNUSED | scLunpaFortressUnusedTakeSilverBlade (void) | Unused: the Silver Blade, from the third chest. |
static void UNUSED | scLunpaFortressUnusedTakeShamshir (void) | Unused: the Shamshir, from the fourth chest. |
static void UNUSED | scLunpaFortressNoOperationA (void) | Unused: four empty functions nothing refers to. |
static void UNUSED | scLunpaFortressNoOperationB (void) | |
static void UNUSED | scLunpaFortressNoOperationC (void) | |
static void UNUSED | scLunpaFortressNoOperationD (void) | |
static void | scLunpaFortressTakeCellKey (void) | Isaac takes the Cell Key, which lies on a stool just inside the north cell door of the Cell Key room, on the upper floor. |
static Bool | scLunpaFortressIsLeaderHiddenFromPatrolPair (void) | Where the pair in the upper floor's west hall cannot see Isaac: the top of the hall, rows 5 to 7 west of column 11, and the foot of it by the stairs, columns 8 and 9 below row 22. |
static void | scLunpaFortressCheckPatrolPair (void) | Every tick in the upper floor's west hall: walks the two patrolling guards' circles of light with them, and raises RAISED_PATROL_PAIR_SPOTTED when either sees an uncloaked Isaac. |
static void | scLunpaFortressPatrolPairThrowsPartyOut (void) | When the pair patrolling the upper floor's west hall see Isaac, both stop; the northern one stares, and the southern one throws the party out to the Lunpa Fortress Gates. |
static Bool | scLunpaFortressIsLeaderPassingHallPatrol (void) | Whether Isaac and the east hall's patrol are in its two parallel north-south corridors, columns 52 and 57, one each, where the guard passes without seeing him. |
static void | scLunpaFortressCheckHallPatrol (void) | Every tick in the upper floor's east hall: as scLunpaFortressCheckPatrolPair, for the guard who walks its rounds. |
static void | scLunpaFortressHallPatrolThrowsPartyOut (void) | When the guard walking the upper floor's east hall sees Isaac, he stops and throws the party out to the Lunpa Fortress Gates. |
static Bool | scLunpaFortressIsLeaderHiddenFromGroundFloorPatrol (void) | Where the guard walking the ground floor's east hall cannot see Isaac: three stretches of his rounds, columns 41 to 44 in rows 26 to 28, column 41 in rows 38 to 41, and columns 54 to 56 in rows 31 to 40. |
static void | scLunpaFortressCheckGroundFloorPatrol (void) | Every tick in the ground floor's east hall: as scLunpaFortressCheckPatrolPair, for the guard who walks its rounds. |
static void | scLunpaFortressGroundFloorPatrolThrowsPartyOut (void) | When the guard walking the ground floor's east hall sees Isaac, he stops and throws the party out to the Lunpa Fortress Gates. |
static Bool | scLunpaFortressIsLeaderOutsideNortheastHall (void) | Whether Isaac is anywhere but rows 15 and 16 east of column 45, the stretch of the ground floor's north-east hall its guard watches. |
static void | scLunpaFortressCheckNortheastHallGuard (void) | Every tick in the ground floor's north-east hall: raises RAISED_NORTHEAST_HALL_SPOTTED when its guard sees an uncloaked Isaac in the stretch he watches. |
static void | scLunpaFortressNortheastHallGuardThrowsPartyOut (void) | When the guard in the ground floor's winding north-east hall sees Isaac, he throws the party out to the Lunpa Fortress Gates. |
static void | scLunpaFortressCheckEntranceGuard (void) | Every tick after the party comes into the ground floor's long hall, or the small room inside the door: raises RAISED_ENTRANCE_GUARD_SPOTTED once, when the guard at the hall's west end sees an uncloaked Isaac. |
static void | scLunpaFortressCheckFirstEntranceSentry (void) | Every tick after the party comes into the ground floor's long hall, or the small room inside the door: raises RAISED_SENTRIES_SPOTTED once for both sentries, when the first of them sees an uncloaked Isaac. |
static Bool | scLunpaFortressIsLeaderAlongGuardsColumn (Sint32 actorId) | Whether the leader is in the guard's column, up to six metatiles away. |
static Bool | scLunpaFortressIsLeaderAlongGuardsRow (Sint32 actorId) | Whether the leader is within a row of the guard, up to six metatiles away. |
static void | scLunpaFortressCheckGroundFloorDoorApproach (void) | Every tick in the ground floor's east hall: walking into the column of its cell door, at metatile (43, 30), with the Cell Key in the party opens it. |
static void | scLunpaFortressCheckUpperFloorDoorApproach (void) | Every tick in the Cell Key room: walking north or south into the column of its south cell door, at metatile (16, 57), with the Cell Key in the party opens it. |
static void UNUSED | scLunpaFortressUnusedFirstPatrolThrowsPartyOut (void) | Unused: nothing calls it. |
static void | scLunpaFortressGuardChallengesParty (Sint32 actorId) | A guard who fights turns to Isaac with one of four challenges, drawn at random when the party came in. |
static void | scLunpaFortressFightCellKeyRoomGuard (void) | Walking up to the guard beside the Cell Key, on the floor in front of him in the Cell Key room (metatiles (17, 52) to (24, 53)), he starts, challenges the party and fights it as a Brigand, and is gone after the battle. |
static void | scLunpaFortressFightMiddleHallGuard (void) | Walking up the narrow way north out of the upper floor's middle hall, metatiles (28, 25) to (28, 28), the guard standing in it starts, challenges the party and fights it as a Brigand, and is gone after the battle. |
static void | scLunpaFortressFightThreeGuards (void) | Walking up to the three red-capped guards in the guard room at the north of the upper floor, onto the floor round them (metatiles (40, 4) to (47, 6)), they turn on Isaac, argue over whether he has come for Hammet, and fight the party together as three Brigands. |
static void | scLunpaFortressPlaceThreeBeatenGuards (void) | The three guards lie beaten on the guard room's floor, side by side, where they fought. |
static void | scLunpaFortressFightDonpasDoorGuard (void) | Walking up to the guard in the doorway up to Donpa's room, in the upper floor's south hall (metatiles (41, 52) to (43, 53)), he starts, challenges the party and fights it as a Brigand, and is gone after the battle. |
static void | scLunpaFortressEntranceGuardThrowsPartyOut (void) | When the guard at the west end of the ground floor's long hall sees Isaac, he stops him, "Who are you? |
static void | scLunpaFortressSentriesThrowPartyOut (void) | When the two sentries at the east end of the ground floor's long hall see Isaac, both start and turn to him, the first asks "Who are you? |
static void | scLunpaFortressOpenFirstSwitchPassage (void) | The sealed doorway in the north wall of the room at the foot of the stairs, at metatile (21, 34), opens on the way to the lake. |
static void | scLunpaFortressOpenSecondSwitchPassage (void) | The sealed doorway of the small north-west chamber, at metatile (6, 10), opens on the stairs down to Hammet's cell. |
static void | scLunpaFortressOpenIvyPassage (void) | The passage behind the ivy on the north wall of the cave's east ledge, at metatile (27, 17), opens on the way to the cells. |
static inline void | scLunpaFortressFlipHiddenSwitch (Sint32 metatileX, Sint32 metatileY, void (*openPassage)(void)) | The switch is drawn flipping, two pictures five ticks apart, and then its doorway opens. |
static void | scLunpaFortressFlipFirstSwitch (void) | Searching the wall behind where the ivy grew, west of the sealed doorway in the room at the foot of the stairs (metatile (17, 35)), while Reveal shows the switch there: "Isaac flipped the switch.", and the doorway opens. |
static void | scLunpaFortressFlipSecondSwitch (void) | Searching the wall behind where the ivy grew in the small north-west chamber (metatile (3, 10)), while Reveal shows the switch there: "Isaac flipped the switch.", and the chamber's sealed doorway opens on the stairs down to Hammet's cell. |
static void | scLunpaFortressRevealSwitches (void) | Casting Reveal in the cave shows the two switches hidden in its walls, behind where the ivy grew, and lets them be searched. |
static void | scLunpaFortressHideSwitches (void) | As Reveal wears off in the cave, the two switches hide in the wall again and can no longer be searched. |
static void | scLunpaFortressBlowAwayFirstSwitchIvy (void) | Whirlwind on the ivy west of the sealed doorway, in the room at the foot of the stairs, blows it away from the wall where the first switch hides. |
static void | scLunpaFortressBlowAwayPassageIvy (void) | Whirlwind on the ivy on the north wall of the cave's east ledge blows it away, and the passage behind it to the cells opens. |
static void | scLunpaFortressBlowAwaySecondSwitchIvy (void) | Whirlwind on the ivy in the small north-west chamber, west of its sealed doorway, blows it away from the wall where the second switch hides. |
static void UNUSED | scLunpaFortressNoOperationE (void) | Unused: an empty function nothing refers to. |
static void | scLunpaFortressGatherPartyAroundHammet (void) | Garet, Ivan and Mia step out from Isaac and gather round Hammet. |
static void | scLunpaFortressActivateLeverTrap (void) | Dodonpa's lever: the cell rumbles and shakes, its north wall crashes open on the den behind it, and everyone starts. |
static void | scLunpaFortressRevealMonster (void) | The camera goes up through the opened wall to Toadonpa in its den; Dodonpa cries "Prepare to become monster fodder!", and the monster lumbers down into the cell and rears up. |
static void | scLunpaFortressPartyFacesMonster (void) | The party spreads out and faces Toadonpa. |
static void | scLunpaFortressFindHammet (void) | Walking into Hammet's cell, through its cell door and up to the row at metatile (26, 15) to (30, 15), the party finds Hammet on his straw mat; Ivan and Hammet are reunited, then Dodonpa appears in the doorway behind them, pulls a lever that opens the cell's north wall on his monster Toadonpa, and the battle with Toadonpa begins. |
static void | scLunpaFortressDonpaJudgesDodonpa (void) | After the battle with Toadonpa, the monster has fallen on Dodonpa and pinned him; Isaac is asked whether to lift it off him and they lift it either way, argue over what to do with him, and his father Donpa comes down, locks him in Hammet's cell to think over what he has done, and asks the party to slip out with Hammet before Dodonpa's loyal men find them. |
static void | scLunpaFortressReadSentryMind (void) | Mind Read on the second sentry at the east end of the ground floor's long hall shows one of seven thoughts, drawn at random when the party came in: Hammet as their best source of income, dozing in the warmth, Dodonpa's orders, missing Colosso in Tolbi, someone he could swear is right there, being a coward told to stand guard; or he looks round and vows "I'll take care of anybody that might show up!" |
static void | scLunpaFortressTalkToSentry (void) | Talking to the second sentry at the east end of the ground floor's long hall, he looks round for whoever he heard: "Huh? |
static void | scLunpaFortressTalkToAttendant (void) | Talking to the woman at Donpa's bedside, in his room on the upper floor: before the rescue she hushes the party ("Shhh! |
static void | scLunpaFortressReadAttendantMind (void) | Mind Read on the woman at Donpa's bedside: before the rescue she hopes someone will punish Dodonpa, for which Donpa would surely give a reward; after it she thinks how hard it is for Donpa to teach his child a lesson. |
static void | scLunpaFortressReadDonpaMind (void) | Mind Read on Donpa, asleep in his bed on the upper floor: before the rescue he is sorry about Dodonpa and sure someone will teach him a lesson someday; after it he would like to let Dodonpa out of his cell already. |
static void | scLunpaFortressTalkToDonpa (void) | Talking to Donpa in his bed on the upper floor: before the rescue he only snores, "Z-z-z-z... |
static void | scLunpaFortressDjinniJoins (void) | Talking to Tonic, the Mercury Djinni in the room behind Donpa's, it joins the party. |
static void | scLunpaFortressTalkToBeatenEastGuardOfThree (void) | Talking to the east one of the three beaten guards in the upper floor's guard room, he whimpers and tells the party to go down to the cave and save Hammet. |
static void | scLunpaFortressTalkToBeatenMiddleGuardOfThree (void) | Talking to the middle one of the three beaten guards in the upper floor's guard room, he gives up and says Hammet is down in the cave. |
static void | scLunpaFortressTalkToBeatenWestGuardOfThree (void) | Talking to the west one of the three beaten guards in the upper floor's guard room, he says the party is tougher than they thought and lets it go. |
static void | scLunpaFortressAskWhereDodonpaIs (void) | Talking to Dodonpa's wife in the family's room on the upper floor, she asks "Do you know where Dodonpa is?" |
static void | scLunpaFortressTalkToStartledOldMan (void) | Talking to the old man hiding in the ground floor's room of barrels, he jumps the first time ("Wh-Wh-Who goes there!"), then asks whether the party sneaked into the fortress in search of something; told yes, he promises to keep quiet. |
static void | scLunpaFortressReadStartledOldManMind (void) | Mind Read on the old man in the room of barrels: once he has promised to keep quiet he wonders whether Hammet is why the lower caves are closed off; before that he starts and talks as scLunpaFortressTalkToStartledOldMan. |
static void UNUSED | scLunpaFortressNoOperationF (void) | Unused: an empty function nothing refers to. |
static void | scLunpaFortressTalkToJailedDodonpa (void) | Talking to Dodonpa behind the door of Hammet's old cell, after Donpa's judgment, he begs his father's forgiveness: "I was wrong! |
static void | scLunpaFortressReadJailedDodonpaMind (void) | Mind Read on Dodonpa in his cell after Donpa's judgment: "I can't believe what you did to me! |
Sint32 | scInit (void) | Sets each of the four scenes up. |
Variables
| Name | Description | |
|---|---|---|
extern Sint32 | LunpaFortressRandomPick | A number below 7 drawn on every arrival: its low two bits pick which of the four challenges the guards who fight greet the party with, and the whole of it the second sentry's thought under Mind Read. |
extern SCENE_ENTRANCE | LunpaFortressGroundFloorEntrances [] | |
extern SCENE_ENTRANCE | LunpaFortressUpperFloorEntrances [] | |
extern SCENE_ENTRANCE | LunpaFortressCaveEntrances [] | |
extern SCENE_ENTRANCE | LunpaFortressEntrancesOther [] | |
extern Uint32 | LunpaFortressExitsOther [] | The ground floor's exits. |
extern Uint32 | LunpaFortressUpperFloorExits [] | |
extern Uint32 | LunpaFortressCaveAndToadonpaExits [] | |
extern ACTOR_PLACE | LunpaFortressActorPlacementsOther [] | |
extern ACTOR_PLACE | LunpaFortressUnusedWestLunpaCaveActorPlacements [] | Unused: a copy of West Lunpa Cave's actor placements, taken only by a scene this overlay never runs for. |
extern ACTOR_PLACE | LunpaFortressGroundFloorActorPlacements [] | |
extern ACTOR_PLACE | LunpaFortressUpperFloorActorPlacements [] | |
extern ACTOR_PLACE | LunpaFortressCaveActorPlacements [] | |
extern ACTOR_PLACE | LunpaFortressToadonpaActorPlacements [] | |
extern CUE | LunpaFortressGroundFloorCues [] | |
extern CUE | LunpaFortressUpperFloorCues [] | |
extern CUE | LunpaFortressCaveCues [] | |
extern CUE | LunpaFortressCuesOther [] | |
extern Uint32 | LunpaFortressToadonpaDoorMetatiles [] | The cell doors, as (x, y) pairs: the cells' own (east cell first), the cave's, the upper floor's and the ground floor's. |
extern Uint32 | LunpaFortressCaveDoorMetatiles [] | |
extern Uint32 | LunpaFortressUpperFloorDoorMetatiles [] | |
extern Uint32 | LunpaFortressGroundFloorDoorMetatiles [] | |
Sint32 | LunpaFortressSecondPatrolRoute [] | The patrolling guards' rounds: the west hall's pair walk east and west across it in step, and the east halls' guards walk theirs to and fro, the ground floor's pausing at each end. |
Sint32 | LunpaFortressFirstPatrolRoute [] | |
Sint32 | LunpaFortressDonpaSleeps [] | Donpa lies asleep in his bed. |
Sint32 | LunpaFortressGroundFloorPatrolRoute [] | |
Sint32 | LunpaFortressHallPatrolRoute [] | |
CUE | LunpaFortressNoCues [] | Unused: an empty cue table nothing returns. |
Description
Lunpa Fortress, the stronghold of the thief Dodonpa at the top of Lunpa, where he holds Hammet, the great merchant of Kalay, for ransom; and the cave and the cells under it, where Hammet is kept.
The party slips in by the door at the back of the Lunpa Fortress Gates
(lunpa.c) and sneaks through the dark halls under Cloak. The halls are lit
only in circles of light, round the torches and round each guard. A guard who
sees Isaac stops him ("Who are you? How did you get in here?") and throws the
party back out to the gates. The rooms off the halls are lit, and their
people only talk. In story order:
- The ground floor (
LunpaFortressGroundFloor). A small room inside the door opens on a long winding hall, where a guard at its west end and two sentries at its east end keep watch; stairs at its west end lead up. Off it are a feast room where Dodonpa's men eat and drink on Hammet's ransom; a winding hall in the north-east, with one guard, and beyond it a room of barrels where a startled old man hides and a barrel holds a Vial; and a hall in the east walked by a patrolling guard, where a locked cell door at its north-west keeps a room of four chests (an Elixir, a Lucky Medal, a Mythril Circlet and 100 coins). In the hall at the top of the map a second cell door shuts off the stairs down to the cave from the rest of the floor. - The upper floor (
LunpaFortressUpperFloor). Two guards walk to and fro across the tall west hall in step, one above the other. Past it, three red-capped guards in a room in the north fight the party together as three Brigands, and a guard in the doorway of Donpa's room, another in the middle hall and another in the Cell Key room each fight it as one Brigand. Donpa, Dodonpa's old father, lies asleep in his room; a guard walks the east hall; the Cell Key lies on a stool just inside a cell door of the Cell Key room, where Catch reaches it from the passage outside. Dodonpa's wife and children, and the women he brought to the fortress, talk in their rooms. Stairs from the Cell Key room lead down to the north end of the ground floor, by the stairs to the cave. - The cave (
LunpaFortressCave), a ring of ledges round an underground lake. Whirlwind blows ivy off two switches hidden in its walls, Reveal shows them, and each opens a sealed doorway. More ivy hides a passage to the cells, and a stack of crates pushed down a corridor fills a gap at its foot. - The cells (
LunpaFortressToadonpa): a row of three cells, the middle one holding a Power Bread, and the cell where Hammet is held. Walking in to him, Dodonpa traps the party and sets his monster Toadonpa on it (scLunpaFortressFindHammet). After the battle Dodonpa lies pinned under the fallen monster, and his father Donpa comes down and locks him in Hammet's cell (scLunpaFortressDonpaJudgesDodonpa), which setsFLAG_DODONPA_LOCKED_UPand changes all of Lunpa. The party leaves with Hammet, and may come back to Donpa for his reward, Tonic, a Mercury Djinni.
The four scenes share this overlay and the area name Lunpa Fortress. The
getters choose by MainRoutineStateWork.next; the cave and the cells share
one exit table. Every return to the Lunpa Fortress Gates clears the
fortress's puzzle and beaten-guard flags, so the fortress starts over.
A guard on screen sees the leader in his own column up to six rows away, or
within a row of his up to six columns away, whatever stands between them,
unless Cloak is on (scLunpaFortressCanGuardSeeLeader). Each watching guard
has an event, started by the entrance the party arrives by
(scLunpaFortressInitGroundFloor, scLunpaFortressInitUpperFloor), that raises
one of the RAISED_*_SPOTTED cues when he sees the leader; its script throws
the party out (scLunpaFortressGuardThrowsPartyOut, EXIT_THROWN_OUT). A
cloaked Isaac who comes within four metatiles of a patrolling guard loses
Cloak (CLOAK_END).
The patrolling guards walk actor scripts (LunpaFortressFirstPatrolRoute and
the others) and stand still while a menu, Psynergy or an item is in use. Each
carries his circle of light, drawn on MAPGRID_LAYER_OVERHEAD, which his event
moves with him and shakes by a pixel every tick, so the light flickers. Each
has stretches of its rounds where it cannot see the leader. The pair in the
upper floor's west hall walk east and west across columns 5 to 12, one in row
12 and one in row 18, and never see Isaac in rows 5 to 7 west of column 11,
at the hall's top, or in columns 8 and 9 below row 22, at its foot
(scLunpaFortressIsLeaderHiddenFromPatrolPair).
The guards who fight greet the party with one of four challenges, drawn at
random on every arrival (LunpaFortressRandomPick).
With the Cell Key in the party, walking up to a cell door opens it, in all
four scenes. Each opened door is remembered in an area flag from
FLAG_AREA_TEMP(0x50) (TOADONPA_DOOR_FLAG and the others).
Unused: four item pickups that would give an Arctic Blade, a Masamune, a Silver Blade and a Shamshir from chests the ground floor places out of sight, and copies of West Lunpa Cave's exits and actor placements, which these scenes never read.
Macros in detail
LUNPA_FORTRESS_PASSAGE_LAYERS
#define LUNPA_FORTRESS_PASSAGE_LAYERS
The map layers the dark halls show (fdMapGridSetShownLayers): the ground, the
walls, and MAPGRID_LAYER_OVERHEAD with the circles of light over them.
Referenced by scInit(), scLunpaFortressInitCave(), scLunpaFortressInitGroundFloor() and scLunpaFortressInitUpperFloor().
Definition at line 543 of file lunpa_fortress.c.
LUNPA_FORTRESS_ROOM_LAYERS
#define LUNPA_FORTRESS_ROOM_LAYERS (DISPCNT_BG2_ON | DISPCNT_BG3_ON)
The map layers the lit rooms show: the ground and the walls, without the circles of light.
Referenced by scInit(), scLunpaFortressInitGroundFloor() and scLunpaFortressInitUpperFloor().
Definition at line 547 of file lunpa_fortress.c.
PAIRED_PATROL_LAYER_ORIGIN_X
#define PAIRED_PATROL_LAYER_ORIGIN_X (136.0 * toFIXED(1))
Where the west hall's pair have their circles of light on the overhead layer,
136 pixels across; the layer scrolls by the first guard's distance from it,
so the circles walk with the pair. It is written as a double, so that
subtraction is worked out in floating point and turned back into 16.16;
toFIXED(136) is the same value in integers.
Referenced by scLunpaFortressCheckPatrolPair().
Definition at line 554 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_DODONPA_JUDGED
#define FLAG_LUNPA_FORTRESS_DODONPA_JUDGED FLAG_AREA_TEMP(0x01)
Donpa has judged Dodonpa, so Hammet's cell no longer starts the trap.
Referenced by scLunpaFortressDonpaJudgesDodonpa() and scLunpaFortressFindHammet().
Definition at line 577 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_ATTENDANT_TOLD_OF_DONPA
#define FLAG_LUNPA_FORTRESS_ATTENDANT_TOLD_OF_DONPA FLAG_AREA_TEMP(0x13)
Donpa's attendant has told the party of Donpa and his spoiled son.
Referenced by scLunpaFortressTalkToAttendant().
Definition at line 579 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_REWARD_SHOWN
#define FLAG_LUNPA_FORTRESS_REWARD_SHOWN FLAG_AREA_TEMP(0x14)
Donpa's attendant has shown the party his reward, Tonic, and stands at the door to its room.
Referenced by scLunpaFortressInitUpperFloor() and scLunpaFortressTalkToDonpa().
Definition at line 582 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_PARTY_SPOTTED
#define FLAG_LUNPA_FORTRESS_PARTY_SPOTTED FLAG_SCENE_TEMP(0x14)
A guard has spotted the party.
Referenced by scLunpaFortressCheckGroundFloorPatrol(), scLunpaFortressCheckHallPatrol(), scLunpaFortressCheckNortheastHallGuard() and scLunpaFortressCheckPatrolPair().
Definition at line 584 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_UNUSED_SPOTTED
#define FLAG_LUNPA_FORTRESS_UNUSED_SPOTTED FLAG_SCENE_TEMP(0x15)
Unused: set beside FLAG_LUNPA_FORTRESS_PARTY_SPOTTED whenever a guard sees
the leader, and never read.
Referenced by scLunpaFortressCheckGroundFloorPatrol(), scLunpaFortressCheckHallPatrol(), scLunpaFortressCheckNortheastHallGuard() and scLunpaFortressCheckPatrolPair().
Definition at line 587 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_FIRST_SWITCH_UNDER_IVY
#define FLAG_LUNPA_FORTRESS_FIRST_SWITCH_UNDER_IVY FLAG_SCENE_TEMP(0x17)
The cave's first switch is still hidden by its ivy.
Referenced by LunpaFortressCaveCues, scLunpaFortressBlowAwayFirstSwitchIvy() and scLunpaFortressInitCave().
Definition at line 589 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_SECOND_SWITCH_UNDER_IVY
#define FLAG_LUNPA_FORTRESS_SECOND_SWITCH_UNDER_IVY FLAG_SCENE_TEMP(0x18)
The cave's second switch is still hidden by its ivy.
Referenced by LunpaFortressCaveCues, scLunpaFortressBlowAwaySecondSwitchIvy() and scLunpaFortressInitCave().
Definition at line 591 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_ENTRANCE_GUARD_CAUGHT_PARTY
#define FLAG_LUNPA_FORTRESS_ENTRANCE_GUARD_CAUGHT_PARTY FLAG_SCENE_TEMP(0x24)
The entrance guard has thrown the party out.
Referenced by LunpaFortressGroundFloorCues and scLunpaFortressEntranceGuardThrowsPartyOut().
Definition at line 593 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_SENTRIES_CAUGHT_PARTY
#define FLAG_LUNPA_FORTRESS_SENTRIES_CAUGHT_PARTY FLAG_SCENE_TEMP(0x25)
The sentries have spotted the party and thrown it out.
Referenced by LunpaFortressGroundFloorCues, scLunpaFortressCheckFirstEntranceSentry(), scLunpaFortressCheckSecondEntranceSentry() and scLunpaFortressSentriesThrowPartyOut().
Definition at line 595 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_OLD_MAN_PROMISED_SILENCE
#define FLAG_LUNPA_FORTRESS_OLD_MAN_PROMISED_SILENCE FLAG_SCENE_TEMP(0x26)
The startled old man has promised to keep quiet.
Referenced by scLunpaFortressReadStartledOldManMind() and scLunpaFortressTalkToStartledOldMan().
Definition at line 597 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_OLD_MAN_STARTLED
#define FLAG_LUNPA_FORTRESS_OLD_MAN_STARTLED FLAG_SCENE_TEMP(0x27)
The startled old man has been startled once.
Referenced by scLunpaFortressTalkToStartledOldMan().
Definition at line 599 of file lunpa_fortress.c.
FLAG_LUNPA_FORTRESS_FINDING_HAMMET
#define FLAG_LUNPA_FORTRESS_FINDING_HAMMET FLAG_SCENE_TEMP(0x70)
scLunpaFortressFindHammet is under way.
Referenced by LunpaFortressCuesOther and scLunpaFortressFindHammet().
Definition at line 601 of file lunpa_fortress.c.
PUSHED_ACTOR_TABLES_READ_ONLY
#define PUSHED_ACTOR_TABLES_READ_ONLY
Lunpa Fortress keeps its pushed-actor tables with its read-only data, though
the shared declarations in field.h and pushed_actor.c are not const.
Definition at line 4306 of file lunpa_fortress.c.
Enumerations in detail
anonymous enum
enum { ACTOR_GROUND_FLOOR_ENTRANCE_GUARD, ACTOR_GROUND_FLOOR_FIRST_SENTRY, ACTOR_GROUND_FLOOR_WOMAN_SEEKING_DODONPA, ACTOR_GROUND_FLOOR_FEASTING_MAN, … }
The ground floor's people, numbered in the order of
LunpaFortressGroundFloorActorPlacements from ACTOR_FIRST_PLACED, past its
first four rows. Those four are chests placed out of sight at the map's
origin (see ACTOR_FIRST_SWORD_CHEST). Dodonpa's men, here and upstairs, wear
the sprite of a man with a mop of orange hair (SPRITE_MAN_WITH_ORANGE_HAIR).
The guards who watch the dark halls are recoloured green (SPRITE_COLOR_GRB).
| Enumerator | Value | Description |
|---|---|---|
ACTOR_GROUND_FLOOR_ENTRANCE_GUARD | ACTOR_FIRST_PLACED + 4 | The guard at the west end of the long hall, by the stairs up. |
ACTOR_GROUND_FLOOR_FIRST_SENTRY | The first of the two sentries at the long hall's east end, the one who speaks when they catch the party. | |
ACTOR_GROUND_FLOOR_WOMAN_SEEKING_DODONPA | A woman with fair hair (SPRITE_WOMAN_WITH_FAIR_HAIR), wondering where Dodonpa has gone. | |
ACTOR_GROUND_FLOOR_FEASTING_MAN | One of Dodonpa's men (the guards' sprite), feasting on Kalay's ransom. | |
ACTOR_GROUND_FLOOR_BOASTING_MAN | One of Dodonpa's men, drinking and boasting of Hammet. | |
ACTOR_GROUND_FLOOR_NORTHEAST_HALL_GUARD | The guard in the winding north-east hall. | |
ACTOR_GROUND_FLOOR_PATROL_GUARD | The guard who walks his rounds of the east hall. | |
ACTOR_GROUND_FLOOR_MAN_WONDERING_ABOUT_DONPA | A man with brown hair (SPRITE_YOUNG_MAN_WITH_BROWN_HAIR), talking of Donpa's poor health. | |
ACTOR_GROUND_FLOOR_STARTLED_OLD_MAN | A bent old man with a cane (SPRITE_OLD_MAN_WITH_CANE), startled when the party first speaks to him (scLunpaFortressTalkToStartledOldMan). | |
ACTOR_GROUND_FLOOR_SECOND_SENTRY | The other man standing watch with ACTOR_GROUND_FLOOR_FIRST_SENTRY. |
Definition at line 124 of file lunpa_fortress.c.
anonymous enum
enum { ACTOR_UPPER_FLOOR_CELL_KEY, ACTOR_UPPER_FLOOR_FIRST_PATROL, ACTOR_UPPER_FLOOR_SECOND_PATROL, ACTOR_UPPER_FLOOR_MIDDLE_HALL_GUARD, … }
The upper floor's people and the Cell Key, numbered in the order of
LunpaFortressUpperFloorActorPlacements from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_UPPER_FLOOR_CELL_KEY | ACTOR_FIRST_PLACED | |
ACTOR_UPPER_FLOOR_FIRST_PATROL | The pair who walk to and fro across | |
ACTOR_UPPER_FLOOR_SECOND_PATROL | the west hall in step, the first to the north of the second. | |
ACTOR_UPPER_FLOOR_MIDDLE_HALL_GUARD | The guard in the narrow way north out of the middle hall, to the family's room. | |
ACTOR_UPPER_FLOOR_THREE_GUARDS_WEST | The three guards who fight together, by where they stand once beaten (scLunpaFortressPlaceThreeBeatenGuards): west, middle and east in a row. | |
ACTOR_UPPER_FLOOR_THREE_GUARDS_MIDDLE | ||
ACTOR_UPPER_FLOOR_THREE_GUARDS_EAST | ||
ACTOR_UPPER_FLOOR_CELL_KEY_ROOM_GUARD | The guard beside the Cell Key in the Cell Key room. | |
ACTOR_UPPER_FLOOR_DONPAS_DOOR_GUARD | The guard in the doorway up to Donpa's room. | |
ACTOR_UPPER_FLOOR_HALL_PATROL | The guard who walks his rounds of the east hall. | |
ACTOR_UPPER_FLOOR_DODONPAS_WIFE | Dodonpa's wife, a woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS), the "Mama" of his children, looking for him. | |
ACTOR_UPPER_FLOOR_DONPAPPA | Donpappa, a small boy (SPRITE_BOY_WITH_FAIR_HAIR), Dodonpa's son, as he names himself to Mind Read. | |
ACTOR_UPPER_FLOOR_DODONPAS_DAUGHTER | Dodonpa's daughter, a little girl (SPRITE_GIRL_WITH_PIGTAILS). | |
ACTOR_UPPER_FLOOR_OLD_WOMAN_PRAISING_DONPAPPA | An old woman (SPRITE_OLD_WOMAN) who pities Donpappa. | |
ACTOR_UPPER_FLOOR_WOMAN_FEARING_FOR_DONPA | A woman with fair hair | |
ACTOR_UPPER_FLOOR_CAPTIVE_WOMAN | (SPRITE_WOMAN_WITH_FAIR_HAIR) who fears for Donpa. A woman with fair hair (SPRITE_WOMAN_WITH_FAIR_HAIR), one of the women Dodonpa has brought to the fortress. | |
ACTOR_UPPER_FLOOR_DONPA | Donpa, asleep (SPRITE_DONPA). | |
ACTOR_UPPER_FLOOR_ATTENDANT | Donpa's attendant, a woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS). | |
ACTOR_UPPER_FLOOR_TONIC | Tonic, a Mercury Djinni, Donpa's reward. |
Definition at line 161 of file lunpa_fortress.c.
anonymous enum
enum { ACTOR_CAVE_FIRST_SWITCH_IVY, ACTOR_CAVE_PASSAGE_IVY, ACTOR_CAVE_SECOND_SWITCH_IVY, ACTOR_INVISIBLE_CAVE_JAR, … }
The cave's ivy and crates, numbered in the order of
LunpaFortressCaveActorPlacements from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_CAVE_FIRST_SWITCH_IVY | ACTOR_FIRST_PLACED | Ivy on the north wall of the room at the foot of the stairs, west of its sealed doorway, hiding the first switch. |
ACTOR_CAVE_PASSAGE_IVY | Ivy on the north wall of the cave's east ledge, hiding the passage to the cells. | |
ACTOR_CAVE_SECOND_SWITCH_IVY | Ivy on the wall of the small north-west chamber, west of its sealed doorway, hiding the second switch. | |
ACTOR_INVISIBLE_CAVE_JAR | An invisible solid actor (SPRITE_BLANK, ACTOR_SOLID) at (504, 168). It makes the jar the layout draws there, in the metatile behind the cave's eastern door, stop the leader. The layout's metatile behavior lets him walk onto the jar, and with this actor he stops 14 pixels short of it. A blank sprite draws only its shadow, which scLunpaFortressInitCave turns off. | |
ACTOR_CAVE_CRATES | A stack of wooden crates (the sprite of the crates at the Bilibin Barricade and on Tolbi Docks) in a nook behind the cave's middle cell door, pushed or moved with Move down the corridor into its gap. |
Definition at line 211 of file lunpa_fortress.c.
anonymous enum
enum { ACTOR_INVISIBLE_TOADONPA_WEST_JAR, ACTOR_INVISIBLE_TOADONPA_CHEST, ACTOR_INVISIBLE_TOADONPA_EAST_JAR, ACTOR_TOADONPA_BOSS, … }
The cells' people, numbered in the order of
LunpaFortressToadonpaActorPlacements from ACTOR_FIRST_PLACED. Its rows for
Ivan, Mia and Garet keep the party's own slots.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_INVISIBLE_TOADONPA_WEST_JAR | ACTOR_FIRST_PLACED | Three invisible solid actors (SPRITE_BLANK, ACTOR_SOLID) at (56, 72), (136, 72) and (216, 72). They stand in line with the cell doors LunpaFortressToadonpaDoorMetatiles lists third, second and first. They make the jar, chest and jar the layout draws in those cells stop the leader. The layout's metatile behaviors let him walk onto the two jars. The chest's own metatiles already stop him, so the middle actor changes nothing. scInit turns off the shadows their blank sprites would draw and lays them underfoot. |
ACTOR_INVISIBLE_TOADONPA_CHEST | ||
ACTOR_INVISIBLE_TOADONPA_EAST_JAR | ||
ACTOR_TOADONPA_BOSS | The monster Dodonpa frees on the | |
ACTOR_TOADONPA_HAMMET | party (scLunpaFortressFindHammet). | |
ACTOR_TOADONPA_DODONPA | Dodonpa (SPRITE_DODONPA). | |
ACTOR_TOADONPA_DONPA | ||
ACTOR_INVISIBLE_TOADONPA_BOSS_PART | A blank sprite (SPRITE_BLANK_LARGE) laid underfoot with Toadonpa and moving with it, drawn 4/5 as wide. | |
ACTOR_TOADONPA_CELL_GUARD | One of Dodonpa's men, a man with brown hair (SPRITE_YOUNG_MAN_WITH_BROWN_HAIR), placed by Dodonpa's cell after Donpa's judgment. Read with Mind Read: "Actually, Dodonpa's in here, but only a few people know that." | |
ACTOR_INVISIBLE_TOADONPA_DODONPA | An invisible actor that stands before Dodonpa's cell after Donpa's judgment. Talking to it or reading its mind reaches Dodonpa. |
Definition at line 260 of file lunpa_fortress.c.
LUNPA_FORTRESS_ANIMATION
enum LUNPA_FORTRESS_ANIMATION
Animations of the fortress's sprites beyond ACTOR_ANIMATION, as their
animation tables and ticks under graphics/sprite draw them.
| Enumerator | Value | Description |
|---|---|---|
ANIM_GUARD_BEATEN | 5 | One of Dodonpa's men lying beaten on the floor (man_with_orange_hair.png), as the three guards lie after their fight. |
ANIM_DONPA_IN_BED | 5 | Donpa lying in bed, only his head on the pillow showing (donpa.png). |
ANIM_TOADONPA_FALLEN | 3 | Sprawled on its side (toadonpa.png). |
ANIM_TOADONPA_REAR_UP | 4 | Reared up, its mouth open (toadonpa.png). |
ANIM_DODONPA_PRONE | 7 | Dodonpa lying on his front, propped on his hands, his head raised (dodonpa.png). |
ANIM_DODONPA_PRONE_SLUMP | 5 | ANIM_DODONPA_PRONE with his head sinking to the floor and lifting again, over and over. |
ANIM_DODONPA_PRONE_HEAD_DOWN | 6 | ANIM_DODONPA_PRONE dropping his head, then ANIM_DODONPA_PRONE_SLUMP. |
Definition at line 296 of file lunpa_fortress.c.
LUNPA_FORTRESS_METATILE_BEHAVIOR
enum LUNPA_FORTRESS_METATILE_BEHAVIOR
The metatile behaviors the fortress's cues answer. Each scene numbers its own, so a number can mean one thing on one floor and another below.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_LUNPA_FORTRESS_LOCKED_DOOR | 99 | A cell door, in every scene. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_SEALED_DOOR | 98 | The cave's two sealed doorways, which only their hidden switches open. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_FIRST_DOOR | 40 | The metatiles either side of a scene's first cell door; its other doors count on from here. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_ENTRANCE_GUARD_POST | 50 | Unused: no |
METATILE_BEHAVIOR_LUNPA_FORTRESS_SENTRIES_POST | 51 | metatile of the ground floor has these. Walking onto them would have had the entrance guard, or the sentries, throw the party out. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_BEFORE_MIDDLE_HALL_GUARD | 30 | The upper floor: the floor in front of each guard who fights. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_BEFORE_THREE_GUARDS | 31 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_BEFORE_DONPAS_DOOR_GUARD | 32 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_BEFORE_CELL_KEY_ROOM_GUARD | 33 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CRATES_PATH | 70 | The cave: the floor Isaac can push the crates over, from their nook down the corridor. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CRATES_GAP | 50 | The cave: the end of the crates' corridor, at the edge of the gap. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_SECOND_SWITCH | 51 | The cave: where each |
METATILE_BEHAVIOR_LUNPA_FORTRESS_FIRST_SWITCH | 52 | hidden switch is searched while Reveal shows it. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_HAMMETS_CELL | 20 | The cells: the row just inside the door of Hammet's cell. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CHEST_ELIXIR | 100 | The ground floor's room of four chests, and the barrel room's barrel. |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CHEST_LUCKY_MEDAL | 101 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CHEST_MYTHRIL_CIRCLET | 102 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CHEST_COINS | 103 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_BARREL_VIAL | 104 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_CHEST_POWER_BREAD | 101 | The chest in the middle one of the three cells. |
Definition at line 319 of file lunpa_fortress.c.
LUNPA_FORTRESS_RAISED_CUE
enum LUNPA_FORTRESS_RAISED_CUE
The scripts a watching guard raises on spotting the party.
| Enumerator | Value | Description |
|---|---|---|
RAISED_PATROL_PAIR_SPOTTED | 91 | |
RAISED_HALL_PATROL_SPOTTED | ||
RAISED_GROUND_FLOOR_PATROL_SPOTTED | ||
RAISED_NORTHEAST_HALL_SPOTTED | ||
RAISED_ENTRANCE_GUARD_SPOTTED | ||
RAISED_SENTRIES_SPOTTED |
Definition at line 378 of file lunpa_fortress.c.
anonymous enum
enum { EXIT_THROWN_OUT }
Where a party caught by a guard is sent: the Lunpa Fortress Gates.
| Enumerator | Value | Description |
|---|---|---|
EXIT_THROWN_OUT | 60 |
Definition at line 389 of file lunpa_fortress.c.
anonymous enum
enum { ENCOUNTER_SLOT_BRIGAND, ENCOUNTER_SLOT_THREE_BRIGANDS, ENCOUNTER_SLOT_TOADONPA }
The battles the fortress's guards and Dodonpa start, by their slot of
ENCOUNTER_ZONE_SCRIPTED.
| Enumerator | Value | Description |
|---|---|---|
ENCOUNTER_SLOT_BRIGAND | 2 | |
ENCOUNTER_SLOT_THREE_BRIGANDS | 3 | |
ENCOUNTER_SLOT_TOADONPA | 4 |
Definition at line 396 of file lunpa_fortress.c.
anonymous enum
enum { TOADONPA_DOOR_FLAG, CAVE_DOOR_FLAG, UPPER_FLOOR_DOOR_FLAG, GROUND_FLOOR_DOOR_FLAG }
The first of the flags that remember which cell doors the Cell Key opened,
per scene: one for each door cue from
METATILE_BEHAVIOR_LUNPA_FORTRESS_FIRST_DOOR.
| Enumerator | Value | Description |
|---|---|---|
TOADONPA_DOOR_FLAG | FLAG_AREA_TEMP(0x50) | |
CAVE_DOOR_FLAG | FLAG_AREA_TEMP(0x55) | |
UPPER_FLOOR_DOOR_FLAG | FLAG_AREA_TEMP(0x58) | |
GROUND_FLOOR_DOOR_FLAG | FLAG_AREA_TEMP(0x5a) |
Definition at line 406 of file lunpa_fortress.c.
REUNION_MESSAGE
enum REUNION_MESSAGE
Hammet's reunion with Ivan in his cell and Dodonpa's interruption
(scLunpaFortressFindHammet), in order. The scene shows its own
MsgLunpaDodonpaPulledLever in place of REUNION_DODONPA_PULLS_LEVER.
| Enumerator | Value | Description |
|---|---|---|
REUNION_HAMMET_ASKS_IF_TIME_TO_EAT | ||
REUNION_HAMMET_ASKS_WHO | ||
REUNION_IVAN_NAMES_HAMMET | ||
REUNION_HAMMET_KNOWS_IVAN | ||
REUNION_HAMMET_ASKS_ABOUT_FRIENDS | ||
REUNION_HAMMET_SEES_JOURNEY_BEGUN | ||
REUNION_IVAN_COMES_TO_SAVE_HAMMET | ||
REUNION_HAMMET_WARNS_OF_RISK | ||
REUNION_DODONPA_HALTS_PARTY | ||
REUNION_HAMMET_NAMES_DODONPA | ||
REUNION_DODONPA_INTERRUPTS | ||
REUNION_DODONPA_MOCKS_IVAN | ||
REUNION_DODONPA_SCORNS_CHILD | ||
REUNION_DODONPA_MARVELS_AT_KIDS | ||
REUNION_GARET_TAUNTS_DODONPA | ||
REUNION_IVAN_ACCUSES_DODONPA | ||
REUNION_HAMMET_LEARNS_OF_EXTORTION | ||
REUNION_MIA_TAKES_HAMMET_HOME | ||
REUNION_DODONPA_REFUSES | ||
REUNION_DODONPA_CALLS_HAMMET_MONEY_TREE | ||
REUNION_GARET_CALLS_DODONPA_SCOUNDREL | ||
REUNION_DODONPA_KEEPS_HAMMET | ||
REUNION_DODONPA_PULLS_LEVER | ||
REUNION_DODONPA_SPRINGS_TRAP |
Definition at line 417 of file lunpa_fortress.c.
AFTERMATH_MESSAGE
enum AFTERMATH_MESSAGE
The talk over Dodonpa pinned under his beaten monster
(scLunpaFortressDonpaJudgesDodonpa), in order.
| Enumerator | Value | Description |
|---|---|---|
AFTERMATH_DODONPA_CRIES_OUT | ||
AFTERMATH_GARET_ASKS_HOW_DODONPA_WAS_TRAPPED | ||
AFTERMATH_HAMMET_TELLS_OF_TRICK | ||
AFTERMATH_HAMMET_EXPLAINS_TRICK | ||
AFTERMATH_DODONPA_BOASTS | ||
AFTERMATH_IVAN_CALLS_DODONPA_SNAKE | ||
AFTERMATH_MIA_CALLS_DODONPA_ROTTEN | ||
AFTERMATH_DODONPA_APOLOGIZES | ||
AFTERMATH_GARET_REPEATS_DEMAND | ||
AFTERMATH_IVAN_DOUBTS_STRENGTH | ||
AFTERMATH_MIA_ASKS_TO_MOVE_MONSTER | ||
AFTERMATH_MIA_ASKS_HAMMET | ||
AFTERMATH_HAMMET_WILL_TRY |
Definition at line 447 of file lunpa_fortress.c.
PUNISHMENT_MESSAGE
enum PUNISHMENT_MESSAGE
The party's debate over Dodonpa's punishment, until Donpa arrives
(scLunpaFortressDonpaJudgesDodonpa), in order.
| Enumerator | Value | Description |
|---|---|---|
PUNISHMENT_GARET_FREES_DODONPA | ||
PUNISHMENT_DODONPA_CANNOT_STAND | ||
PUNISHMENT_MIA_ASKS_ABOUT_LEG | ||
PUNISHMENT_DODONPA_WILL_STAND | ||
PUNISHMENT_IVAN_IS_RELIEVED | ||
PUNISHMENT_GARET_QUESTIONS_RELIEF | ||
PUNISHMENT_GARET_RECALLS_ATTACK | ||
PUNISHMENT_HAMMET_FORGIVES | ||
PUNISHMENT_GARET_RECALLS_KIDNAPPING | ||
PUNISHMENT_HAMMET_REMEMBERS | ||
PUNISHMENT_GARET_LOSES_PATIENCE | ||
PUNISHMENT_IVAN_POINTS_TO_SAFETY | ||
PUNISHMENT_GARET_DOUBTS_REFORM | ||
PUNISHMENT_MIA_WONDERS | ||
PUNISHMENT_MIA_ASKS_DODONPA | ||
PUNISHMENT_HAMMET_DEFENDS_DODONPA | ||
PUNISHMENT_GARET_DISTRUSTS_DODONPA | ||
PUNISHMENT_IVAN_ASKS_GARET | ||
PUNISHMENT_GARET_WANTS_DODONPA_LOCKED_UP | ||
PUNISHMENT_DODONPA_PLEADS | ||
PUNISHMENT_MIA_SCOLDS_DODONPA | ||
PUNISHMENT_IVAN_ASKS_TO_LOCK_DODONPA_UP | ||
PUNISHMENT_DONPA_APPROVES | ||
PUNISHMENT_DONPA_LEAVES_DODONPA |
Definition at line 466 of file lunpa_fortress.c.
JUDGMENT_MESSAGE
enum JUDGMENT_MESSAGE
Donpa's judgment of his son and his request to the party
(scLunpaFortressDonpaJudgesDodonpa), in order.
| Enumerator | Value | Description |
|---|---|---|
JUDGMENT_DODONPA_CALLS_FATHER | ||
JUDGMENT_DONPA_PITIES_DODONPA | ||
JUDGMENT_DONPA_RECALLS_WARNING | ||
JUDGMENT_DONPA_DEMANDS_AMENDS | ||
JUDGMENT_DONPA_REGRETS_SPOILING | ||
JUDGMENT_DODONPA_BLAMES_DONPA | ||
JUDGMENT_DONPA_WILL_PUNISH | ||
JUDGMENT_DODONPA_DOUBTS_DONPA | ||
JUDGMENT_DONPA_INSISTS | ||
JUDGMENT_DONPA_SENTENCES_DODONPA | ||
JUDGMENT_DONPA_ASKS_ABOUT_TROUBLE | ||
JUDGMENT_HAMMET_DENIES_TROUBLE | ||
JUDGMENT_DONPA_APOLOGIZES | ||
JUDGMENT_HAMMET_DECLINES_APOLOGY | ||
JUDGMENT_DONPA_ASKS_FORGIVENESS | ||
JUDGMENT_DONPA_HAS_REQUEST | ||
JUDGMENT_HAMMET_ASKS_ABOUT_REQUEST | ||
JUDGMENT_DONPA_ASKS_PARTY_TO_LEAVE | ||
JUDGMENT_GARET_QUESTIONS_SECRECY | ||
JUDGMENT_IVAN_QUESTIONS_SNEAKING | ||
JUDGMENT_DONPA_WARNS_OF_HENCHMEN | ||
JUDGMENT_DONPA_IS_ASHAMED | ||
JUDGMENT_DONPA_WARNS_OF_ATTACK | ||
JUDGMENT_DONPA_FEARS_CELL_CHECK | ||
JUDGMENT_HAMMET_FORESEES_RELEASE | ||
JUDGMENT_DONPA_FORESEES_REVENGE | ||
JUDGMENT_GARET_AGREES | ||
JUDGMENT_MIA_FEARS_FOR_KALAY | ||
JUDGMENT_DONPA_URGES_HASTE | ||
JUDGMENT_IVAN_ASKS_IF_NOW | ||
JUDGMENT_DONPA_SPREAD_RUMORS | ||
JUDGMENT_HAMMET_ASKS_ABOUT_RUMORS | ||
JUDGMENT_DONPA_TELLS_RUMOR | ||
JUDGMENT_GARET_ASKS_WHY | ||
JUDGMENT_DONPA_EXPLAINS_RUMOR | ||
JUDGMENT_MIA_PRAISES_DONPA | ||
JUDGMENT_DONPA_OFFERS_HELP | ||
JUDGMENT_IVAN_URGES_ESCAPE | ||
JUDGMENT_DONPA_HURRIES_PARTY | ||
JUDGMENT_DONPA_PROMISES_CHANGE | ||
JUDGMENT_DODONPA_PROMISES_TO_BEHAVE |
Definition at line 496 of file lunpa_fortress.c.
anonymous enum
enum { ACTOR_FIRST_SWORD_CHEST }
The four chests, from ACTOR_FIRST_SWORD_CHEST, that the unused sword pickups
open: the ground floor's, whose first four placements are chests at the map's
origin. In the other three scenes those slots hold the Cell Key and three
guards, the cave's ivy, and the cells' blank actors.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_FIRST_SWORD_CHEST | ACTOR_FIRST_PLACED |
Definition at line 983 of file lunpa_fortress.c.
Functions in detail
scLunpaFortressTryTakeChestItem
static Sint32 scLunpaFortressTryTakeChestItem(Sint32 actorId, Sint32 itemId)
Unused: called only by the four pickups above.
References fdActorRelease(), fdActorSetAnimation(), fdChestOpenAndShowItem(), fdScriptEnd(), fdScriptStart(), gmPartyGiveItem(), Sint32 and sySoundPlay().
Referenced by scLunpaFortressUnusedTakeArcticBlade(), scLunpaFortressUnusedTakeMasamune(), scLunpaFortressUnusedTakeShamshir() and scLunpaFortressUnusedTakeSilverBlade().
Definition at lines 556 and 1039 of file lunpa_fortress.c.
scLunpaFortressCheckSecondEntranceSentry
static void scLunpaFortressCheckSecondEntranceSentry(void)
The second sentry, as the first.
References fdScriptGetFlag(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressCheckFirstEntranceSentry(), state and syCloseEvent().
Referenced by scLunpaFortressCheckFirstEntranceSentry() and scLunpaFortressInitGroundFloor().
Definition at lines 557 and 1499 of file lunpa_fortress.c.
scLunpaFortressCanGuardSeeLeader
static Bool scLunpaFortressCanGuardSeeLeader(Sint32 actorId)
Whether a guard on screen sees the leader along his row or column.
References scLunpaFortressIsGuardNearViewCenter(), scLunpaFortressIsLeaderAlongGuardsColumn(), scLunpaFortressIsLeaderAlongGuardsRow() and Sint32.
Referenced by scLunpaFortressCheckEntranceGuard(), scLunpaFortressCheckFirstEntranceSentry(), scLunpaFortressCheckGroundFloorPatrol(), scLunpaFortressCheckHallPatrol(), scLunpaFortressCheckNortheastHallGuard(), scLunpaFortressCheckPatrolPair() and scLunpaFortressCheckSecondEntranceSentry().
Definition at lines 558 and 1562 of file lunpa_fortress.c.
scLunpaFortressIsLeaderNearGuard
static Bool scLunpaFortressIsLeaderNearGuard(Sint32 actorId)
Whether the leader is within four metatiles, walking, of the metatile below the guard.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCheckGroundFloorPatrol(), scLunpaFortressCheckHallPatrol() and scLunpaFortressCheckPatrolPair().
Definition at lines 559 and 1581 of file lunpa_fortress.c.
scLunpaFortressIsGuardNearViewCenter
static Bool scLunpaFortressIsGuardNearViewCenter(Sint32 actorId)
Whether the guard is on screen: within seven columns and five rows of the view's center.
References fdActorGet(), fdCameraGetActor() and Sint32.
Referenced by scLunpaFortressCanGuardSeeLeader() and scLunpaFortressCheckHallPatrol().
Definition at lines 560 and 1611 of file lunpa_fortress.c.
scLunpaFortressGuardThrowsPartyOut
static void scLunpaFortressGuardThrowsPartyOut(Sint32 actorId)
A guard who has seen Isaac stops with a start, turns to him and asks "Who are you? How did you get in here?"; Isaac winces, the screen fades, and the party is back outside at the Lunpa Fortress Gates.
References fdActorFaceActor(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetMovementTypeById(), fdActorShowEmote(), fdActorStop(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), Sint32 and syImportScriptSetExitRequest().
Referenced by scLunpaFortressGroundFloorPatrolThrowsPartyOut(), scLunpaFortressHallPatrolThrowsPartyOut(), scLunpaFortressNortheastHallGuardThrowsPartyOut() and scLunpaFortressPatrolPairThrowsPartyOut().
Definition at lines 561 and 1716 of file lunpa_fortress.c.
scLunpaFortressCryIntruder
static void scLunpaFortressCryIntruder(Sint32 actorId)
A guard spots an intruder. "Hey! Intruder!"
References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdScriptSetMessageId(), fdScriptShowMessage() and Sint32.
Referenced by scLunpaFortressGuardChallengesParty().
Definition at lines 562 and 1768 of file lunpa_fortress.c.
scLunpaFortressAskWhosThat
static void scLunpaFortressAskWhosThat(Sint32 actorId)
A guard asks who is there. "Huh? Who's that?"
References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdScriptSetMessageId(), fdScriptShowMessage() and Sint32.
Referenced by scLunpaFortressGuardChallengesParty().
Definition at lines 563 and 1789 of file lunpa_fortress.c.
scLunpaFortressAskIfShiftIsUp
static void scLunpaFortressAskIfShiftIsUp(Sint32 actorId)
A guard expects his relief, then sees who it is. "Is my shift up already?"
References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by scLunpaFortressGuardChallengesParty().
Definition at lines 564 and 1807 of file lunpa_fortress.c.
scLunpaFortressCallPartyScoundrel
static void scLunpaFortressCallPartyScoundrel(Sint32 actorId)
A guard calls the party a scoundrel. "You scoundrel!"
References fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdScriptSetMessageId(), fdScriptShowMessage() and Sint32.
Referenced by scLunpaFortressGuardChallengesParty().
Definition at lines 565 and 1831 of file lunpa_fortress.c.
scLunpaFortressInitGroundFloor
static void scLunpaFortressInitGroundFloor(void)
Sets the ground floor up by the way the party came in: the guards who watch that part of the floor, and the cell doors already opened.
References fdActorSetSpriteColorById(), fdMapGridCenterOnFollowedPoint(), fdMapGridCopyMetatiles(), fdMapGridSetShownLayers(), MainRoutineStateWork, scLunpaFortressCheckEntranceGuard(), scLunpaFortressCheckFirstEntranceSentry(), scLunpaFortressCheckGroundFloorDoorApproach(), scLunpaFortressCheckGroundFloorPatrol(), scLunpaFortressCheckNortheastHallGuard(), scLunpaFortressCheckSecondEntranceSentry(), scLunpaFortressRestoreGroundFloorDoors(), sySetTickEvent() and sySynch().
Referenced by scInit().
Definition at lines 566 and 3991 of file lunpa_fortress.c.
scLunpaFortressInitUpperFloor
static void scLunpaFortressInitUpperFloor(void)
Sets the upper floor up by the way the party came in: the guards who watch that part, the guards already beaten, the Cell Key once taken, and Donpa's attendant at the door to Tonic's room once the reward has been shown.
References fdActorGet(), fdActorSetSpriteColorById(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdMapGridCenterOnFollowedPoint(), fdMapGridSetShownLayers(), gmFlagGet(), MainRoutineStateWork, scLunpaFortressCheckHallPatrol(), scLunpaFortressCheckPatrolPair(), scLunpaFortressCheckUpperFloorDoorApproach(), scLunpaFortressPlaceThreeBeatenGuards(), scLunpaFortressRestoreUpperFloorDoors(), sySetTickEvent() and sySynch().
Referenced by scInit().
Definition at lines 567 and 4066 of file lunpa_fortress.c.
scLunpaFortressInitCave
static void scLunpaFortressInitCave(void)
Sets the cave up: the crates and ivy as the party left them, and the doorways already opened.
References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridSetShownLayers(), fdScriptEnd(), fdScriptSetFlag(), fdScriptStart(), gmFlagClear(), gmFlagGet(), scLunpaFortressOpenFirstSwitchPassage(), scLunpaFortressOpenIvyPassage(), scLunpaFortressOpenSecondSwitchPassage(), scLunpaFortressRestoreCaveDoors() and scLunpaFortressRestoreLoweredCrates().
Referenced by scInit().
Definition at lines 568 and 4164 of file lunpa_fortress.c.
scLunpaFortressRestoreGroundFloorDoors
static void scLunpaFortressRestoreGroundFloorDoors(void)
The ground floor's opened cell doors stay open.
References gmFlagGet() and scLunpaFortressOpenGroundFloorDoor().
Referenced by scLunpaFortressInitGroundFloor().
Definition at lines 569 and 4233 of file lunpa_fortress.c.
scLunpaFortressRestoreUpperFloorDoors
static void scLunpaFortressRestoreUpperFloorDoors(void)
The upper floor's opened cell doors stay open.
References gmFlagGet() and scLunpaFortressOpenUpperFloorDoor().
Referenced by scLunpaFortressInitUpperFloor().
Definition at lines 570 and 4250 of file lunpa_fortress.c.
scLunpaFortressRestoreCaveDoors
static void scLunpaFortressRestoreCaveDoors(void)
The cave's opened cell doors stay open.
References gmFlagGet() and scLunpaFortressOpenCaveDoor().
Referenced by scLunpaFortressInitCave().
Definition at lines 571 and 4263 of file lunpa_fortress.c.
scLunpaFortressRestoreToadonpaDoors
static void scLunpaFortressRestoreToadonpaDoors(void)
The cells' opened doors stay open.
References gmFlagGet() and scLunpaFortressOpenToadonpaDoor().
Referenced by scInit().
Definition at lines 572 and 4280 of file lunpa_fortress.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References LunpaFortressCaveEntrances, LunpaFortressEntrancesOther, LunpaFortressGroundFloorEntrances, LunpaFortressUpperFloorEntrances and MainRoutineStateWork.
Definition at line 603 of file lunpa_fortress.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 622 of file lunpa_fortress.c.
scGetExits
const Uint32 *scGetExits(void)
References LunpaFortressCaveAndToadonpaExits, LunpaFortressExitsOther, LunpaFortressUpperFloorExits and MainRoutineStateWork.
Definition at line 627 of file lunpa_fortress.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
The guards, the other people and the objects of each scene.
References LunpaFortressActorPlacementsOther, LunpaFortressCaveActorPlacements, LunpaFortressGroundFloorActorPlacements, LunpaFortressToadonpaActorPlacements, LunpaFortressUnusedWestLunpaCaveActorPlacements, LunpaFortressUpperFloorActorPlacements and MainRoutineStateWork.
Definition at line 644 of file lunpa_fortress.c.
scGetCues
const CUE *scGetCues(void)
What the party can talk to, search and use Psynergy on, by scene.
References LunpaFortressCaveCues, LunpaFortressCuesOther, LunpaFortressGroundFloorCues, LunpaFortressUpperFloorCues and MainRoutineStateWork.
Definition at line 673 of file lunpa_fortress.c.
scLunpaFortressLowerCrates
static void scLunpaFortressLowerCrates(void)
The crates settle in the gap at the foot of the cave's middle corridor, at metatile (15, 23), as a step the party can walk across down to the ledge below.
The ledge metatile at the corridor's end, (15, 22), takes the walkable floor of (15, 20), and (15, 23) to (15, 25) take the metatiles of (17, 23) to (17, 25); the crates are drawn underfoot from then on.
References fdActorGet(), fdActorSetSpriteFlags() and fdMapGridCopyMetatileAttributes().
Referenced by scLunpaFortressCratesSink() and scLunpaFortressRestoreLoweredCrates().
Definition at line 699 of file lunpa_fortress.c.
scLunpaFortressPushCrates
static void scLunpaFortressPushCrates(void)
Walking into the stack of crates in the cave pushes it one metatile along: out of its nook behind the middle cell door, through the room below and down the corridor to the gap at its foot.
The floor of the nook, the doorway, the room and the corridor is
METATILE_BEHAVIOR_LUNPA_FORTRESS_CRATES_PATH; standing there and pushing runs
scPushedActorAdvancePair, which slides the crates and Isaac together.
References scPushedActorAdvancePair().
Referenced by LunpaFortressCaveCues.
Definition at line 721 of file lunpa_fortress.c.
scLunpaFortressCratesSink
static void scLunpaFortressCratesSink(void)
Pushing the crates on from the end of the cave's middle corridor, at metatile (15, 21), drops them into the gap at its foot, where they settle as a step and Isaac can walk on down over them.
References fdActorSetDestination(), fdActorWaitForMoveById(), fdScriptWait(), gmFlagSet(), scLunpaFortressLowerCrates() and sySoundPlay().
Referenced by LunpaFortressCaveCues.
Definition at line 729 of file lunpa_fortress.c.
scLunpaFortressMoveCrates
static void scLunpaFortressMoveCrates(void)
Casting Move on the stack of crates in the cave: once they stand over the gap at the foot of the middle corridor, the cave shakes, they clatter down and settle in it as when pushed. Anywhere else nothing happens but Move's hand pushing at them.
They count as over the gap once they stand south of row 22.
References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), gmFlagSet() and sySoundPlay().
Referenced by LunpaFortressCaveCues.
Definition at line 746 of file lunpa_fortress.c.
scLunpaFortressRestoreLoweredCrates
static void scLunpaFortressRestoreLoweredCrates(void)
On a return to the cave, the crates are back in the gap where they settled.
References scLunpaFortressLowerCrates().
Referenced by scLunpaFortressInitCave().
Definition at line 768 of file lunpa_fortress.c.
scLunpaFortressOpenToadonpaDoor
static void scLunpaFortressOpenToadonpaDoor(Sint32 doorIndex)
Draws one of the cells' doors open.
References fdMapGridCopyMetatiles(), LunpaFortressToadonpaDoorMetatiles and Sint32.
Referenced by scLunpaFortressDonpaJudgesDodonpa(), scLunpaFortressRestoreToadonpaDoors() and scLunpaFortressUnlockToadonpaDoor().
Definition at line 775 of file lunpa_fortress.c.
scLunpaFortressUnlockToadonpaDoor
static void scLunpaFortressUnlockToadonpaDoor(void)
Walking up to one of the cells' doors with the Cell Key in the party opens it, and the screen shakes. These are the doors of the three cells in a row and the door of Hammet's cell; after Donpa's judgment Dodonpa is behind that last one, and it stays shut.
The doors are listed in LunpaFortressToadonpaDoorMetatiles, east cell first;
the fourth, at metatile (28, 39), lies outside both rooms, where the party
never goes.
References gmFlagGet(), gmFlagSet(), gmPartyInventoryFindMember(), scLunpaFortressOpenToadonpaDoor(), Sint32, state and sySoundPlay().
Referenced by LunpaFortressCuesOther.
Definition at line 799 of file lunpa_fortress.c.
scLunpaFortressOpenCaveDoor
static void scLunpaFortressOpenCaveDoor(Sint32 doorIndex)
Draws one of the cave's cell doors open and lets the party through. The middle door, to the crates' nook, opens two metatiles.
References fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), LunpaFortressCaveDoorMetatiles and Sint32.
Referenced by scLunpaFortressRestoreCaveDoors() and scLunpaFortressUnlockCaveDoor().
Definition at line 825 of file lunpa_fortress.c.
scLunpaFortressUnlockCaveDoor
static void scLunpaFortressUnlockCaveDoor(void)
Walking up to one of the cave's three cell doors with the Cell Key in the party opens it, and the screen shakes. The doors stand in the north wall of the ledge above the lake: the east one at metatile (31, 17), the middle one, to the crates, at metatile (15, 13), and the west one, to the chamber of the second switch, at metatile (6, 17).
References gmFlagSet(), gmPartyInventoryFindMember(), scLunpaFortressOpenCaveDoor(), Sint32, state and sySoundPlay().
Referenced by LunpaFortressCaveCues.
Definition at line 856 of file lunpa_fortress.c.
scLunpaFortressOpenUpperFloorDoor
static void scLunpaFortressOpenUpperFloorDoor(Sint32 doorIndex)
Draws one of the upper floor's two cell doors open.
References fdMapGridCopyMetatiles(), LunpaFortressUpperFloorDoorMetatiles and Sint32.
Referenced by scLunpaFortressRestoreUpperFloorDoors() and scLunpaFortressUnlockUpperFloorDoor().
Definition at line 877 of file lunpa_fortress.c.
scLunpaFortressUnlockUpperFloorDoor
static void scLunpaFortressUnlockUpperFloorDoor(void)
Walking up to the north cell door of the Cell Key room, at metatile (16, 51),
with the Cell Key in the party opens it, and the screen shakes.
scLunpaFortressCheckUpperFloorDoorApproach opens the room's south door, at
metatile (16, 57), the same way.
References gmFlagSet(), gmPartyInventoryFindMember(), scLunpaFortressOpenUpperFloorDoor(), Sint32, state and sySoundPlay().
Referenced by LunpaFortressUpperFloorCues and scLunpaFortressCheckUpperFloorDoorApproach().
Definition at line 897 of file lunpa_fortress.c.
scLunpaFortressOpenGroundFloorDoor
static void scLunpaFortressOpenGroundFloorDoor(Sint32 doorIndex)
Draws one of the ground floor's cell doors open and lets the party through.
References fdMapGridCopyMetatileAttributeRect(), fdMapGridCopyMetatiles(), LunpaFortressGroundFloorDoorMetatiles and Sint32.
Referenced by scLunpaFortressRestoreGroundFloorDoors() and scLunpaFortressUnlockGroundFloorDoor().
Definition at line 918 of file lunpa_fortress.c.
scLunpaFortressUnlockGroundFloorDoor
static void scLunpaFortressUnlockGroundFloorDoor(void)
Walking up to the cell door in the hall at the top of the ground floor, at
metatile (28, 10), from either side with the Cell Key in the party opens it,
and the screen shakes. scLunpaFortressCheckGroundFloorDoorApproach opens the
east hall's door to the room of chests, at metatile (43, 30), the same way.
References gmFlagSet(), gmPartyInventoryFindMember(), scLunpaFortressOpenGroundFloorDoor(), Sint32, state and sySoundPlay().
Referenced by LunpaFortressGroundFloorCues and scLunpaFortressCheckGroundFloorDoorApproach().
Definition at line 940 of file lunpa_fortress.c.
scLunpaFortressSearchLockedDoor
static void scLunpaFortressSearchLockedDoor(void)
Searching any cell door of the fortress without the Cell Key shows "The door is tightly locked."
References gmPartyInventoryFindMember() and mnFieldMessageShow().
Referenced by LunpaFortressCaveCues, LunpaFortressCuesOther, LunpaFortressGroundFloorCues and LunpaFortressUpperFloorCues.
Definition at line 962 of file lunpa_fortress.c.
scLunpaFortressSearchSealedDoor
static void scLunpaFortressSearchSealedDoor(void)
Searching one of the cave's two sealed doorways shows "The door is tightly locked." No key opens them: one is in the middle of the north wall of the room at the foot of the stairs, at metatile (21, 34), the other in the small north-west chamber, at metatile (6, 10), and each opens to its hidden switch.
References mnFieldMessageShow().
Referenced by LunpaFortressCaveCues.
Definition at line 974 of file lunpa_fortress.c.
scLunpaFortressUnusedTakeArcticBlade
static void UNUSED scLunpaFortressUnusedTakeArcticBlade(void)
Unused: nothing calls this pickup or the three after it.
Each opens one of four chests (ACTOR_FIRST_SWORD_CHEST on) and gives its
sword, showing the picture before the leader. With no room the chest peeks
and shuts. Each sets a flag nothing tests.
This one gives the Arctic Blade, from the first chest.
References gmFlagSet() and scLunpaFortressTryTakeChestItem().
Definition at line 995 of file lunpa_fortress.c.
scLunpaFortressUnusedTakeMasamune
static void UNUSED scLunpaFortressUnusedTakeMasamune(void)
Unused: the Masamune, from the second chest.
References gmFlagSet() and scLunpaFortressTryTakeChestItem().
Definition at line 1006 of file lunpa_fortress.c.
scLunpaFortressUnusedTakeSilverBlade
static void UNUSED scLunpaFortressUnusedTakeSilverBlade(void)
Unused: the Silver Blade, from the third chest.
References gmFlagSet() and scLunpaFortressTryTakeChestItem().
Definition at line 1017 of file lunpa_fortress.c.
scLunpaFortressUnusedTakeShamshir
static void UNUSED scLunpaFortressUnusedTakeShamshir(void)
Unused: the Shamshir, from the fourth chest.
References gmFlagSet() and scLunpaFortressTryTakeChestItem().
Definition at line 1028 of file lunpa_fortress.c.
scLunpaFortressNoOperationA
static void UNUSED scLunpaFortressNoOperationA(void)
Unused: four empty functions nothing refers to.
Definition at line 1062 of file lunpa_fortress.c.
scLunpaFortressNoOperationB
static void UNUSED scLunpaFortressNoOperationB(void)
Definition at line 1066 of file lunpa_fortress.c.
scLunpaFortressNoOperationC
static void UNUSED scLunpaFortressNoOperationC(void)
Definition at line 1070 of file lunpa_fortress.c.
scLunpaFortressNoOperationD
static void UNUSED scLunpaFortressNoOperationD(void)
Definition at line 1074 of file lunpa_fortress.c.
scLunpaFortressTakeCellKey
static void scLunpaFortressTakeCellKey(void)
Isaac takes the Cell Key, which lies on a stool just inside the north cell door of the Cell Key room, on the upper floor. Catch on it from the passage outside the door, or talking to it, walks him up to the door at metatile (16, 49), turns him to face the key, and he holds it up while a window says he got the Cell Key.
Talked to from inside the room, the same walk takes him north into the shut
door, where he stands on top of it while he holds the key up. The key is put
out of sight once taken, and FLAG_LUNPA_FORTRESS_CELL_KEY keeps it gone.
References fdActorFaceDirection(), fdActorSetAnimation(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptWait(), gmFlagSet(), gmItemShowFound() and gmPartyGiveItem().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1087 of file lunpa_fortress.c.
scLunpaFortressIsLeaderHiddenFromPatrolPair
static Bool scLunpaFortressIsLeaderHiddenFromPatrolPair(void)
Where the pair in the upper floor's west hall cannot see Isaac: the top of the hall, rows 5 to 7 west of column 11, and the foot of it by the stairs, columns 8 and 9 below row 22.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCheckPatrolPair().
Definition at line 1104 of file lunpa_fortress.c.
scLunpaFortressCheckPatrolPair
static void scLunpaFortressCheckPatrolPair(void)
Every tick in the upper floor's west hall: walks the two patrolling guards'
circles of light with them, and raises RAISED_PATROL_PAIR_SPOTTED when either
sees an uncloaked Isaac.
A cloaked Isaac who comes within four metatiles of either loses Cloak instead.
References fdActorGet(), fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressIsLeaderHiddenFromPatrolPair(), scLunpaFortressIsLeaderNearGuard(), state and TickCount.
Referenced by scLunpaFortressInitUpperFloor().
Definition at line 1127 of file lunpa_fortress.c.
scLunpaFortressPatrolPairThrowsPartyOut
static void scLunpaFortressPatrolPairThrowsPartyOut(void)
When the pair patrolling the upper floor's west hall see Isaac, both stop; the northern one stares, and the southern one throws the party out to the Lunpa Fortress Gates.
References fdActorFaceActor(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorShowEmote(), fdActorStop(), fdScriptEnd(), fdScriptStart() and scLunpaFortressGuardThrowsPartyOut().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1206 of file lunpa_fortress.c.
scLunpaFortressIsLeaderPassingHallPatrol
static Bool scLunpaFortressIsLeaderPassingHallPatrol(void)
Whether Isaac and the east hall's patrol are in its two parallel north-south corridors, columns 52 and 57, one each, where the guard passes without seeing him.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCheckHallPatrol().
Definition at line 1222 of file lunpa_fortress.c.
scLunpaFortressCheckHallPatrol
static void scLunpaFortressCheckHallPatrol(void)
Every tick in the upper floor's east hall: as scLunpaFortressCheckPatrolPair,
for the guard who walks its rounds.
References fdActorGet(), fdCameraGetActor(), fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressIsGuardNearViewCenter(), scLunpaFortressIsLeaderNearGuard(), scLunpaFortressIsLeaderPassingHallPatrol(), state and TickCount.
Referenced by scLunpaFortressInitUpperFloor().
Definition at line 1245 of file lunpa_fortress.c.
scLunpaFortressHallPatrolThrowsPartyOut
static void scLunpaFortressHallPatrolThrowsPartyOut(void)
When the guard walking the upper floor's east hall sees Isaac, he stops and throws the party out to the Lunpa Fortress Gates.
References fdScriptEnd() and scLunpaFortressGuardThrowsPartyOut().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1307 of file lunpa_fortress.c.
scLunpaFortressIsLeaderHiddenFromGroundFloorPatrol
static Bool scLunpaFortressIsLeaderHiddenFromGroundFloorPatrol(void)
Where the guard walking the ground floor's east hall cannot see Isaac: three stretches of his rounds, columns 41 to 44 in rows 26 to 28, column 41 in rows 38 to 41, and columns 54 to 56 in rows 31 to 40.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCheckGroundFloorPatrol().
Definition at line 1316 of file lunpa_fortress.c.
scLunpaFortressCheckGroundFloorPatrol
static void scLunpaFortressCheckGroundFloorPatrol(void)
Every tick in the ground floor's east hall: as
scLunpaFortressCheckPatrolPair, for the guard who walks its rounds.
References fdActorGet(), fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressIsLeaderHiddenFromGroundFloorPatrol(), scLunpaFortressIsLeaderNearGuard(), state and TickCount.
Referenced by scLunpaFortressInitGroundFloor().
Definition at line 1341 of file lunpa_fortress.c.
scLunpaFortressGroundFloorPatrolThrowsPartyOut
static void scLunpaFortressGroundFloorPatrolThrowsPartyOut(void)
When the guard walking the ground floor's east hall sees Isaac, he stops and throws the party out to the Lunpa Fortress Gates.
References fdScriptEnd() and scLunpaFortressGuardThrowsPartyOut().
Referenced by LunpaFortressGroundFloorCues.
Definition at line 1399 of file lunpa_fortress.c.
scLunpaFortressIsLeaderOutsideNortheastHall
static Bool scLunpaFortressIsLeaderOutsideNortheastHall(void)
Whether Isaac is anywhere but rows 15 and 16 east of column 45, the stretch of the ground floor's north-east hall its guard watches.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCheckNortheastHallGuard().
Definition at line 1407 of file lunpa_fortress.c.
scLunpaFortressCheckNortheastHallGuard
static void scLunpaFortressCheckNortheastHallGuard(void)
Every tick in the ground floor's north-east hall: raises
RAISED_NORTHEAST_HALL_SPOTTED when its guard sees an uncloaked Isaac in the
stretch he watches.
References fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressIsLeaderOutsideNortheastHall() and state.
Referenced by scLunpaFortressInitGroundFloor().
Definition at line 1424 of file lunpa_fortress.c.
scLunpaFortressNortheastHallGuardThrowsPartyOut
static void scLunpaFortressNortheastHallGuardThrowsPartyOut(void)
When the guard in the ground floor's winding north-east hall sees Isaac, he throws the party out to the Lunpa Fortress Gates.
References fdScriptEnd() and scLunpaFortressGuardThrowsPartyOut().
Referenced by LunpaFortressGroundFloorCues.
Definition at line 1453 of file lunpa_fortress.c.
scLunpaFortressCheckEntranceGuard
static void scLunpaFortressCheckEntranceGuard(void)
Every tick after the party comes into the ground floor's long hall, or the
small room inside the door: raises RAISED_ENTRANCE_GUARD_SPOTTED once, when
the guard at the hall's west end sees an uncloaked Isaac.
References MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), state and syCloseEvent().
Referenced by scLunpaFortressInitGroundFloor().
Definition at line 1462 of file lunpa_fortress.c.
scLunpaFortressCheckFirstEntranceSentry
static void scLunpaFortressCheckFirstEntranceSentry(void)
Every tick after the party comes into the ground floor's long hall, or the
small room inside the door: raises RAISED_SENTRIES_SPOTTED once for both
sentries, when the first of them sees an uncloaked Isaac.
References fdScriptGetFlag(), gmFlagSet(), MainRoutineStateWork, scLunpaFortressCanGuardSeeLeader(), scLunpaFortressCheckSecondEntranceSentry(), state and syCloseEvent().
Referenced by scLunpaFortressCheckSecondEntranceSentry() and scLunpaFortressInitGroundFloor().
Definition at line 1477 of file lunpa_fortress.c.
scLunpaFortressIsLeaderAlongGuardsColumn
static Bool scLunpaFortressIsLeaderAlongGuardsColumn(Sint32 actorId)
Whether the leader is in the guard's column, up to six metatiles away.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCanGuardSeeLeader().
Definition at line 1521 of file lunpa_fortress.c.
scLunpaFortressIsLeaderAlongGuardsRow
static Bool scLunpaFortressIsLeaderAlongGuardsRow(Sint32 actorId)
Whether the leader is within a row of the guard, up to six metatiles away.
References fdActorGet() and Sint32.
Referenced by scLunpaFortressCanGuardSeeLeader().
Definition at line 1540 of file lunpa_fortress.c.
scLunpaFortressCheckGroundFloorDoorApproach
static void scLunpaFortressCheckGroundFloorDoorApproach(void)
Every tick in the ground floor's east hall: walking into the column of its cell door, at metatile (43, 30), with the Cell Key in the party opens it.
References fdActorGet(), gmFlagGet(), scLunpaFortressUnlockGroundFloorDoor() and Sint32.
Referenced by scLunpaFortressInitGroundFloor().
Definition at line 1640 of file lunpa_fortress.c.
scLunpaFortressCheckUpperFloorDoorApproach
static void scLunpaFortressCheckUpperFloorDoorApproach(void)
Every tick in the Cell Key room: walking north or south into the column of its south cell door, at metatile (16, 57), with the Cell Key in the party opens it.
References fdActorGet(), gmFlagGet(), scLunpaFortressUnlockUpperFloorDoor() and Sint32.
Referenced by scLunpaFortressInitUpperFloor().
Definition at line 1663 of file lunpa_fortress.c.
scLunpaFortressUnusedFirstPatrolThrowsPartyOut
static void UNUSED scLunpaFortressUnusedFirstPatrolThrowsPartyOut(void)
Unused: nothing calls it. The northern guard of the pair patrolling the upper
floor's west hall would stop, ask who the party is and send it out; the pair
throws the party out through scLunpaFortressPatrolPairThrowsPartyOut instead.
References fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetMovementTypeById(), fdActorShowEmote(), fdActorStop(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), Sint32 and syImportScriptSetExitRequest().
Definition at line 1688 of file lunpa_fortress.c.
scLunpaFortressGuardChallengesParty
static void scLunpaFortressGuardChallengesParty(Sint32 actorId)
A guard who fights turns to Isaac with one of four challenges, drawn at random when the party came in.
References fdActorFaceActor(), LunpaFortressRandomPick, scLunpaFortressAskIfShiftIsUp(), scLunpaFortressAskWhosThat(), scLunpaFortressCallPartyScoundrel(), scLunpaFortressCryIntruder() and Sint32.
Referenced by scLunpaFortressFightCellKeyRoomGuard(), scLunpaFortressFightDonpasDoorGuard() and scLunpaFortressFightMiddleHallGuard().
Definition at line 1753 of file lunpa_fortress.c.
scLunpaFortressFightCellKeyRoomGuard
static void scLunpaFortressFightCellKeyRoomGuard(void)
Walking up to the guard beside the Cell Key, on the floor in front of him in the Cell Key room (metatiles (17, 52) to (24, 53)), he starts, challenges the party and fights it as a Brigand, and is gone after the battle.
References fdActorSetAnimation(), fdActorShowEmote(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), gmFlagSet(), scLunpaFortressGuardChallengesParty() and sySoundPlay().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1855 of file lunpa_fortress.c.
scLunpaFortressFightMiddleHallGuard
static void scLunpaFortressFightMiddleHallGuard(void)
Walking up the narrow way north out of the upper floor's middle hall, metatiles (28, 25) to (28, 28), the guard standing in it starts, challenges the party and fights it as a Brigand, and is gone after the battle.
References fdActorSetAnimation(), fdActorShowEmote(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), gmFlagSet(), scLunpaFortressGuardChallengesParty() and sySoundPlay().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1876 of file lunpa_fortress.c.
scLunpaFortressFightThreeGuards
static void scLunpaFortressFightThreeGuards(void)
Walking up to the three red-capped guards in the guard room at the north of the upper floor, onto the floor round them (metatiles (40, 4) to (47, 6)), they turn on Isaac, argue over whether he has come for Hammet, and fight the party together as three Brigands. "Who are you!?"
After the battle the party is back in the room, and the three lie beaten on
the floor (scLunpaFortressPlaceThreeBeatenGuards).
References fdActorFaceActor(), fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorWaitForMoveById(), fdActorWalkTo(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), gmFlagSet(), Sint32 and sySoundPlay().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 1901 of file lunpa_fortress.c.
scLunpaFortressPlaceThreeBeatenGuards
static void scLunpaFortressPlaceThreeBeatenGuards(void)
The three guards lie beaten on the guard room's floor, side by side, where they fought.
References fdActorFaceActor(), fdActorSetAnimation(), fdScriptEnd(), fdScriptStart() and fdScriptStartScreenTransition().
Referenced by scLunpaFortressInitUpperFloor().
Definition at line 1990 of file lunpa_fortress.c.
scLunpaFortressFightDonpasDoorGuard
static void scLunpaFortressFightDonpasDoorGuard(void)
Walking up to the guard in the doorway up to Donpa's room, in the upper floor's south hall (metatiles (41, 52) to (43, 53)), he starts, challenges the party and fights it as a Brigand, and is gone after the battle.
References fdActorSetAnimation(), fdActorShowEmote(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), gmFlagSet(), scLunpaFortressGuardChallengesParty() and sySoundPlay().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 2009 of file lunpa_fortress.c.
scLunpaFortressEntranceGuardThrowsPartyOut
static void scLunpaFortressEntranceGuardThrowsPartyOut(void)
When the guard at the west end of the ground floor's long hall sees Isaac, he stops him, "Who are you? How did you get in here?", and the party is back outside at the Lunpa Fortress Gates.
Its step row, METATILE_BEHAVIOR_LUNPA_FORTRESS_ENTRANCE_GUARD_POST, is on no
metatile of the map: only scLunpaFortressCheckEntranceGuard starts it.
References fdActorFaceActor(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetMovementTypeById(), fdActorShowEmote(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), Sint32, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by LunpaFortressGroundFloorCues.
Definition at line 2033 of file lunpa_fortress.c.
scLunpaFortressSentriesThrowPartyOut
static void scLunpaFortressSentriesThrowPartyOut(void)
When the two sentries at the east end of the ground floor's long hall see Isaac, both start and turn to him, the first asks "Who are you? How did you get in here?", and the party is back outside at the Lunpa Fortress Gates.
Its step row, METATILE_BEHAVIOR_LUNPA_FORTRESS_SENTRIES_POST, is on no
metatile of the map: only the sentries' events start it.
References fdActorFaceActor(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetMovementTypeById(), fdActorShowEmote(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), Sint32, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by LunpaFortressGroundFloorCues.
Definition at line 2068 of file lunpa_fortress.c.
scLunpaFortressOpenFirstSwitchPassage
static void scLunpaFortressOpenFirstSwitchPassage(void)
The sealed doorway in the north wall of the room at the foot of the stairs, at metatile (21, 34), opens on the way to the lake.
References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatiles().
Referenced by scLunpaFortressFlipFirstSwitch() and scLunpaFortressInitCave().
Definition at line 2102 of file lunpa_fortress.c.
scLunpaFortressOpenSecondSwitchPassage
static void scLunpaFortressOpenSecondSwitchPassage(void)
The sealed doorway of the small north-west chamber, at metatile (6, 10), opens on the stairs down to Hammet's cell.
References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatiles().
Referenced by scLunpaFortressFlipSecondSwitch() and scLunpaFortressInitCave().
Definition at line 2110 of file lunpa_fortress.c.
scLunpaFortressOpenIvyPassage
static void scLunpaFortressOpenIvyPassage(void)
The passage behind the ivy on the north wall of the cave's east ledge, at metatile (27, 17), opens on the way to the cells.
References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatiles().
Referenced by scLunpaFortressBlowAwayPassageIvy() and scLunpaFortressInitCave().
Definition at line 2118 of file lunpa_fortress.c.
scLunpaFortressFlipHiddenSwitch
static inline void scLunpaFortressFlipHiddenSwitch(Sint32 metatileX, Sint32 metatileY, void (*openPassage)(void))
The switch is drawn flipping, two pictures five ticks apart, and then its doorway opens.
References fdMapGridCopyMetatiles(), fdScriptWait() and Sint32.
Referenced by scLunpaFortressFlipFirstSwitch() and scLunpaFortressFlipSecondSwitch().
Definition at line 2126 of file lunpa_fortress.c.
scLunpaFortressFlipFirstSwitch
static void scLunpaFortressFlipFirstSwitch(void)
Searching the wall behind where the ivy grew, west of the sealed doorway in the room at the foot of the stairs (metatile (17, 35)), while Reveal shows the switch there: "Isaac flipped the switch.", and the doorway opens.
The switch can be searched only once Whirlwind has blown the ivy away, and
only while Reveal lasts (scLunpaFortressRevealSwitches).
References fdScriptGetFlag(), fdScriptWait(), gmFlagSet(), mnFieldMessageShow(), scLunpaFortressFlipHiddenSwitch(), scLunpaFortressOpenFirstSwitchPassage() and sySoundPlay().
Referenced by LunpaFortressCaveCues.
Definition at line 2143 of file lunpa_fortress.c.
scLunpaFortressFlipSecondSwitch
static void scLunpaFortressFlipSecondSwitch(void)
Searching the wall behind where the ivy grew in the small north-west chamber (metatile (3, 10)), while Reveal shows the switch there: "Isaac flipped the switch.", and the chamber's sealed doorway opens on the stairs down to Hammet's cell.
References fdScriptGetFlag(), fdScriptWait(), gmFlagSet(), mnFieldMessageShow(), scLunpaFortressFlipHiddenSwitch(), scLunpaFortressOpenSecondSwitchPassage() and sySoundPlay().
Referenced by LunpaFortressCaveCues.
Definition at line 2163 of file lunpa_fortress.c.
scLunpaFortressRevealSwitches
static void scLunpaFortressRevealSwitches(void)
Casting Reveal in the cave shows the two switches hidden in its walls, behind where the ivy grew, and lets them be searched.
The cave turns grey but for Reveal's circle round Isaac. Each switch's picture is drawn into its wall, and the metatile in front of it, (17, 35) or (3, 10), takes the switch's metatile behavior from the spare copy at (15, 33) or (3, 8).
References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatiles().
Referenced by LunpaFortressCaveCues.
Definition at line 2186 of file lunpa_fortress.c.
scLunpaFortressHideSwitches
static void scLunpaFortressHideSwitches(void)
As Reveal wears off in the cave, the two switches hide in the wall again and can no longer be searched.
References fdMapGridCopyMetatileAttributes() and fdMapGridCopyMetatiles().
Referenced by LunpaFortressCaveCues.
Definition at line 2196 of file lunpa_fortress.c.
scLunpaFortressBlowAwayFirstSwitchIvy
static void scLunpaFortressBlowAwayFirstSwitchIvy(void)
Whirlwind on the ivy west of the sealed doorway, in the room at the foot of the stairs, blows it away from the wall where the first switch hides.
References gmFlagClear() and gmFlagSet().
Referenced by LunpaFortressCaveCues.
Definition at line 2206 of file lunpa_fortress.c.
scLunpaFortressBlowAwayPassageIvy
static void scLunpaFortressBlowAwayPassageIvy(void)
Whirlwind on the ivy on the north wall of the cave's east ledge blows it away, and the passage behind it to the cells opens.
References gmFlagSet() and scLunpaFortressOpenIvyPassage().
Referenced by LunpaFortressCaveCues.
Definition at line 2215 of file lunpa_fortress.c.
scLunpaFortressBlowAwaySecondSwitchIvy
static void scLunpaFortressBlowAwaySecondSwitchIvy(void)
Whirlwind on the ivy in the small north-west chamber, west of its sealed doorway, blows it away from the wall where the second switch hides.
References gmFlagClear() and gmFlagSet().
Referenced by LunpaFortressCaveCues.
Definition at line 2224 of file lunpa_fortress.c.
scLunpaFortressNoOperationE
static void UNUSED scLunpaFortressNoOperationE(void)
Unused: an empty function nothing refers to.
Definition at line 2232 of file lunpa_fortress.c.
scLunpaFortressGatherPartyAroundHammet
static void scLunpaFortressGatherPartyAroundHammet(void)
Garet, Ivan and Mia step out from Isaac and gather round Hammet.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptWait() and scPlaceAtLeader().
Referenced by scLunpaFortressFindHammet().
Definition at line 2237 of file lunpa_fortress.c.
scLunpaFortressActivateLeverTrap
static void scLunpaFortressActivateLeverTrap(void)
Dodonpa's lever: the cell rumbles and shakes, its north wall crashes open on the den behind it, and everyone starts.
References fdActorShowEmote(), fdMapGridCopyMetatiles(), fdScriptWait() and sySoundPlay().
Referenced by scLunpaFortressFindHammet().
Definition at line 2260 of file lunpa_fortress.c.
scLunpaFortressRevealMonster
static void scLunpaFortressRevealMonster(void)
The camera goes up through the opened wall to Toadonpa in its den; Dodonpa cries "Prepare to become monster fodder!", and the monster lumbers down into the cell and rears up.
References fdActorSetAnimation(), fdActorWaitForMoveById(), fdActorWalkTo(), fdCameraFollowActor(), fdCameraMoveToActorById(), fdCameraWaitForMove(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptWait().
Referenced by scLunpaFortressFindHammet().
Definition at line 2282 of file lunpa_fortress.c.
scLunpaFortressPartyFacesMonster
static void scLunpaFortressPartyFacesMonster(void)
The party spreads out and faces Toadonpa.
References fdActorFaceDirection(), fdActorWaitForMoveById() and fdActorWalkTo().
Referenced by scLunpaFortressFindHammet().
Definition at line 2301 of file lunpa_fortress.c.
scLunpaFortressFindHammet
static void scLunpaFortressFindHammet(void)
Walking into Hammet's cell, through its cell door and up to the row at metatile (26, 15) to (30, 15), the party finds Hammet on his straw mat; Ivan and Hammet are reunited, then Dodonpa appears in the doorway behind them, pulls a lever that opens the cell's north wall on his monster Toadonpa, and the battle with Toadonpa begins.
After a lost battle, coming back into the cell skips the reunion and goes straight to Dodonpa's "Back for more? I guess you didn't learn your lesson!" and his trap. Once Donpa has judged Dodonpa, the cell starts nothing.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorJump(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetDestinationOffset(), fdActorSetSpriteFlags(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdActorWalkToAndWait(), fdCameraFollowActor(), fdCameraMoveToActorById(), fdCameraWaitForMove(), fdRequestBattleFromEncounterTable(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet(), mnFieldMessageShow(), scLunpaFortressActivateLeverTrap(), scLunpaFortressGatherPartyAroundHammet(), scLunpaFortressPartyFacesMonster(), scLunpaFortressRevealMonster(), Sint32 and sySoundPlay().
Referenced by LunpaFortressCuesOther.
Definition at line 2327 of file lunpa_fortress.c.
scLunpaFortressDonpaJudgesDodonpa
static void scLunpaFortressDonpaJudgesDodonpa(void)
After the battle with Toadonpa, the monster has fallen on Dodonpa and pinned him; Isaac is asked whether to lift it off him and they lift it either way, argue over what to do with him, and his father Donpa comes down, locks him in Hammet's cell to think over what he has done, and asks the party to slip out with Hammet before Dodonpa's loyal men find them.
It plays as the party comes back from the battle
(LUNPA_FORTRESS_TOADONPA_AFTER_BATTLE). It sets FLAG_DODONPA_LOCKED_UP, which
changes all of Lunpa, and ends with the party and Hammet leaving for the
Lunpa Fortress Gates.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetDestinationOffset(), fdActorSetSpriteFlags(), fdActorSetSpritePriority(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdCameraFollowActor(), fdMapGridCopyMetatiles(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), gmFlagSet(), scLunpaFortressOpenToadonpaDoor(), Sint32, syImportScriptSetExitRequest() and sySoundPlay().
Referenced by scInit().
Definition at line 2644 of file lunpa_fortress.c.
scLunpaFortressReadSentryMind
static void scLunpaFortressReadSentryMind(void)
Mind Read on the second sentry at the east end of the ground floor's long hall shows one of seven thoughts, drawn at random when the party came in: Hammet as their best source of income, dozing in the warmth, Dodonpa's orders, missing Colosso in Tolbi, someone he could swear is right there, being a coward told to stand guard; or he looks round and vows "I'll take care of anybody that might show up!"
References fdActorFaceDirection(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and LunpaFortressRandomPick.
Referenced by LunpaFortressGroundFloorCues.
Definition at line 3421 of file lunpa_fortress.c.
scLunpaFortressTalkToSentry
static void scLunpaFortressTalkToSentry(void)
Talking to the second sentry at the east end of the ground floor's long hall, he looks round for whoever he heard: "Huh? I could swear I just heard someone!"
References fdActorFaceDirection(), fdActorSetAnimation(), fdActorShowEmote(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by LunpaFortressGroundFloorCues.
Definition at line 3481 of file lunpa_fortress.c.
scLunpaFortressTalkToAttendant
static void scLunpaFortressTalkToAttendant(void)
Talking to the woman at Donpa's bedside, in his room on the upper floor: before the rescue she hushes the party ("Shhh! Please don't wake Donpa!"), tells of Donpa's despair over Dodonpa and asks whether Isaac is the one Donpa said would come to punish him; after it she says Donpa is grateful.
She tells it all once; after that she only hopes Dodonpa's eyes will be opened.
References fdActorFaceActor(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdCameraMoveToActorById(), fdCameraWaitForMove(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet() and Sint32.
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3517 of file lunpa_fortress.c.
scLunpaFortressReadAttendantMind
static void scLunpaFortressReadAttendantMind(void)
Mind Read on the woman at Donpa's bedside: before the rescue she hopes someone will punish Dodonpa, for which Donpa would surely give a reward; after it she thinks how hard it is for Donpa to teach his child a lesson.
References fdScriptSetMessageId(), fdScriptShowMessage() and gmFlagGet().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3623 of file lunpa_fortress.c.
scLunpaFortressReadDonpaMind
static void scLunpaFortressReadDonpaMind(void)
Mind Read on Donpa, asleep in his bed on the upper floor: before the rescue he is sorry about Dodonpa and sure someone will teach him a lesson someday; after it he would like to let Dodonpa out of his cell already.
References fdScriptSetMessageId(), fdScriptShowMessage() and gmFlagGet().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3642 of file lunpa_fortress.c.
scLunpaFortressTalkToDonpa
static void scLunpaFortressTalkToDonpa(void)
Talking to Donpa in his bed on the upper floor: before the rescue he only snores, "Z-z-z-z... Z-z-z-z..."; after it he thanks the party for teaching Dodonpa a lesson and has his attendant show it his reward, a creature he once fought, in the room behind his.
Once the reward has been shown, or Tonic has joined, he only worries whether Dodonpa will really turn over a new leaf.
References fdActorFaceActor(), fdActorFaceDirection(), fdActorFaceEachOther(), fdActorRunRepeatedMotion(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait(), gmFlagGet(), gmFlagSet() and Sint32.
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3665 of file lunpa_fortress.c.
scLunpaFortressDjinniJoins
static void scLunpaFortressDjinniJoins(void)
Talking to Tonic, the Mercury Djinni in the room behind Donpa's, it joins the party.
References fdDjinnJoinParty() and gmFlagSet().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3743 of file lunpa_fortress.c.
scLunpaFortressTalkToBeatenEastGuardOfThree
static void scLunpaFortressTalkToBeatenEastGuardOfThree(void)
Talking to the east one of the three beaten guards in the upper floor's guard room, he whimpers and tells the party to go down to the cave and save Hammet. "Owww! Hey! Don't hurt me again..."
References fdActorRunRepeatedMotion(), fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3753 of file lunpa_fortress.c.
scLunpaFortressTalkToBeatenMiddleGuardOfThree
static void scLunpaFortressTalkToBeatenMiddleGuardOfThree(void)
Talking to the middle one of the three beaten guards in the upper floor's guard room, he gives up and says Hammet is down in the cave. "We give up!"
References fdActorRunRepeatedMotion(), fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3763 of file lunpa_fortress.c.
scLunpaFortressTalkToBeatenWestGuardOfThree
static void scLunpaFortressTalkToBeatenWestGuardOfThree(void)
Talking to the west one of the three beaten guards in the upper floor's guard room, he says the party is tougher than they thought and lets it go. "Who'd have thought they'd be so tough?"
References fdActorRunRepeatedMotion(), fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3774 of file lunpa_fortress.c.
scLunpaFortressAskWhereDodonpaIs
static void scLunpaFortressAskWhereDodonpaIs(void)
Talking to Dodonpa's wife in the family's room on the upper floor, she asks "Do you know where Dodonpa is?"
References fdScriptAskYesNo() and fdScriptSetMessageId().
Referenced by LunpaFortressUpperFloorCues.
Definition at line 3784 of file lunpa_fortress.c.
scLunpaFortressTalkToStartledOldMan
static void scLunpaFortressTalkToStartledOldMan(void)
Talking to the old man hiding in the ground floor's room of barrels, he jumps the first time ("Wh-Wh-Who goes there!"), then asks whether the party sneaked into the fortress in search of something; told yes, he promises to keep quiet.
References fdActorFaceActor(), fdActorJump(), fdActorSetAnimation(), fdActorShowEmote(), fdActorStop(), fdActorWaitForScriptEndById(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptGetFlag(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet() and Sint32.
Referenced by LunpaFortressGroundFloorCues and scLunpaFortressReadStartledOldManMind().
Definition at line 3797 of file lunpa_fortress.c.
scLunpaFortressReadStartledOldManMind
static void scLunpaFortressReadStartledOldManMind(void)
Mind Read on the old man in the room of barrels: once he has promised to keep
quiet he wonders whether Hammet is why the lower caves are closed off; before
that he starts and talks as scLunpaFortressTalkToStartledOldMan.
References fdPsynergyStopMindReadWave(), fdScriptSetMessageId(), fdScriptShowMessage(), gmFlagGet() and scLunpaFortressTalkToStartledOldMan().
Referenced by LunpaFortressGroundFloorCues.
Definition at line 3865 of file lunpa_fortress.c.
scLunpaFortressNoOperationF
static void UNUSED scLunpaFortressNoOperationF(void)
Unused: an empty function nothing refers to.
Definition at line 3882 of file lunpa_fortress.c.
scLunpaFortressTalkToJailedDodonpa
static void scLunpaFortressTalkToJailedDodonpa(void)
Talking to Dodonpa behind the door of Hammet's old cell, after Donpa's judgment, he begs his father's forgiveness: "I was wrong! I'll turn over a new leaf, Dad! Please forgive me!" With the Cell Key in the party, "The key doesn't work. Maybe Donpa changed the locks."
The party talks to an invisible actor standing in front of the door
(ACTOR_INVISIBLE_TOADONPA_DODONPA).
References fdScriptSetMessageId(), fdScriptShowMessage(), gmPartyInventoryFindMember(), mnFieldMessageShow() and Sint32.
Referenced by LunpaFortressCuesOther.
Definition at line 3893 of file lunpa_fortress.c.
scLunpaFortressReadJailedDodonpaMind
static void scLunpaFortressReadJailedDodonpaMind(void)
Mind Read on Dodonpa in his cell after Donpa's judgment: "I can't believe what you did to me! When I get out of here, I'll get you all!"
References fdScriptSetMessageId() and fdScriptShowMessage().
Referenced by LunpaFortressCuesOther.
Definition at line 3909 of file lunpa_fortress.c.
scInit
Sint32 scInit(void)
Sets each of the four scenes up. In the cells, coming back by the stairs
after Donpa's judgment, Hammet is gone, one of Dodonpa's men stands by the
door of the cell where Dodonpa is locked up, and Dodonpa is behind it; coming
back from the battle with Toadonpa plays the judgment
(scLunpaFortressDonpaJudgesDodonpa).
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteFlags(), fdMapGridSetShownLayers(), gmFlagGet(), LunpaFortressRandomPick, MainRoutineStateWork, scLunpaFortressDonpaJudgesDodonpa(), scLunpaFortressInitCave(), scLunpaFortressInitGroundFloor(), scLunpaFortressInitUpperFloor(), scLunpaFortressRestoreToadonpaDoors() and Sint32.
Definition at line 3921 of file lunpa_fortress.c.
Variables in detail
LunpaFortressRandomPick
extern Sint32 LunpaFortressRandomPick
Sint32 LunpaFortressRandomPick
A number below 7 drawn on every arrival: its low two bits pick which of the four challenges the guards who fight greet the party with, and the whole of it the second sentry's thought under Mind Read.
References Sint32.
Referenced by scInit(), scLunpaFortressGuardChallengesParty() and scLunpaFortressReadSentryMind().
Definition at lines 95 and 4313 of file lunpa_fortress.c.
LunpaFortressGroundFloorEntrances
extern SCENE_ENTRANCE LunpaFortressGroundFloorEntrances[]
SCENE_ENTRANCE LunpaFortressGroundFloorEntrances[]
Referenced by scGetEntrances().
Definition at lines 96 and 4415 of file lunpa_fortress.c.
LunpaFortressUpperFloorEntrances
extern SCENE_ENTRANCE LunpaFortressUpperFloorEntrances[]
SCENE_ENTRANCE LunpaFortressUpperFloorEntrances[]
Referenced by scGetEntrances().
Definition at lines 97 and 4460 of file lunpa_fortress.c.
LunpaFortressCaveEntrances
extern SCENE_ENTRANCE LunpaFortressCaveEntrances[]
SCENE_ENTRANCE LunpaFortressCaveEntrances[]
Referenced by scGetEntrances().
Definition at lines 98 and 4517 of file lunpa_fortress.c.
LunpaFortressEntrancesOther
extern SCENE_ENTRANCE LunpaFortressEntrancesOther[]
SCENE_ENTRANCE LunpaFortressEntrancesOther[]
Referenced by scGetEntrances().
Definition at lines 99 and 4534 of file lunpa_fortress.c.
LunpaFortressExitsOther
extern Uint32 LunpaFortressExitsOther[]
Uint32 LunpaFortressExitsOther[]
The ground floor's exits. Unused: its rows first copy West Lunpa Cave's, which no scene of this overlay reads.
Referenced by scGetExits().
Definition at lines 100 and 4549 of file lunpa_fortress.c.
LunpaFortressUpperFloorExits
extern Uint32 LunpaFortressUpperFloorExits[]
Uint32 LunpaFortressUpperFloorExits[]
Referenced by scGetExits().
Definition at lines 101 and 4619 of file lunpa_fortress.c.
LunpaFortressCaveAndToadonpaExits
extern Uint32 LunpaFortressCaveAndToadonpaExits[]
Uint32 LunpaFortressCaveAndToadonpaExits[]
Referenced by scGetExits().
Definition at lines 102 and 4697 of file lunpa_fortress.c.
LunpaFortressActorPlacementsOther
extern ACTOR_PLACE LunpaFortressActorPlacementsOther[]
ACTOR_PLACE LunpaFortressActorPlacementsOther[]
Referenced by scGetActorPlacements().
Definition at lines 103 and 4735 of file lunpa_fortress.c.
LunpaFortressUnusedWestLunpaCaveActorPlacements
extern ACTOR_PLACE LunpaFortressUnusedWestLunpaCaveActorPlacements[]
ACTOR_PLACE LunpaFortressUnusedWestLunpaCaveActorPlacements[]
Unused: a copy of West Lunpa Cave's actor placements, taken only by a scene this overlay never runs for.
Referenced by scGetActorPlacements().
Definition at lines 104 and 4741 of file lunpa_fortress.c.
LunpaFortressGroundFloorActorPlacements
extern ACTOR_PLACE LunpaFortressGroundFloorActorPlacements[]
ACTOR_PLACE LunpaFortressGroundFloorActorPlacements[]
References LunpaFortressGroundFloorPatrolRoute and Sint32.
Referenced by scGetActorPlacements().
Definition at lines 105 and 4763 of file lunpa_fortress.c.
LunpaFortressUpperFloorActorPlacements
extern ACTOR_PLACE LunpaFortressUpperFloorActorPlacements[]
ACTOR_PLACE LunpaFortressUpperFloorActorPlacements[]
References LunpaFortressDonpaSleeps, LunpaFortressFirstPatrolRoute, LunpaFortressHallPatrolRoute, LunpaFortressSecondPatrolRoute and Sint32.
Referenced by scGetActorPlacements().
Definition at lines 106 and 4798 of file lunpa_fortress.c.
LunpaFortressCaveActorPlacements
extern ACTOR_PLACE LunpaFortressCaveActorPlacements[]
ACTOR_PLACE LunpaFortressCaveActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 107 and 4843 of file lunpa_fortress.c.
LunpaFortressToadonpaActorPlacements
extern ACTOR_PLACE LunpaFortressToadonpaActorPlacements[]
ACTOR_PLACE LunpaFortressToadonpaActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 108 and 4857 of file lunpa_fortress.c.
LunpaFortressGroundFloorCues
extern CUE LunpaFortressGroundFloorCues[]
CUE LunpaFortressGroundFloorCues[]
References scLunpaFortressEntranceGuardThrowsPartyOut(), scLunpaFortressGroundFloorPatrolThrowsPartyOut(), scLunpaFortressNortheastHallGuardThrowsPartyOut(), scLunpaFortressReadSentryMind(), scLunpaFortressReadStartledOldManMind(), scLunpaFortressSearchLockedDoor(), scLunpaFortressSentriesThrowPartyOut(), scLunpaFortressTalkToSentry(), scLunpaFortressTalkToStartledOldMan() and scLunpaFortressUnlockGroundFloorDoor().
Referenced by scGetCues().
Definition at lines 109 and 4892 of file lunpa_fortress.c.
LunpaFortressUpperFloorCues
extern CUE LunpaFortressUpperFloorCues[]
CUE LunpaFortressUpperFloorCues[]
References scLunpaFortressAskWhereDodonpaIs(), scLunpaFortressDjinniJoins(), scLunpaFortressFightCellKeyRoomGuard(), scLunpaFortressFightDonpasDoorGuard(), scLunpaFortressFightMiddleHallGuard(), scLunpaFortressFightThreeGuards(), scLunpaFortressHallPatrolThrowsPartyOut(), scLunpaFortressPatrolPairThrowsPartyOut(), scLunpaFortressReadAttendantMind(), scLunpaFortressReadDonpaMind(), scLunpaFortressSearchLockedDoor(), scLunpaFortressTakeCellKey(), scLunpaFortressTalkToAttendant(), scLunpaFortressTalkToBeatenEastGuardOfThree(), scLunpaFortressTalkToBeatenMiddleGuardOfThree(), scLunpaFortressTalkToBeatenWestGuardOfThree(), scLunpaFortressTalkToDonpa() and scLunpaFortressUnlockUpperFloorDoor().
Referenced by scGetCues().
Definition at lines 110 and 5005 of file lunpa_fortress.c.
LunpaFortressCaveCues
extern CUE LunpaFortressCaveCues[]
CUE LunpaFortressCaveCues[]
References scLunpaFortressBlowAwayFirstSwitchIvy(), scLunpaFortressBlowAwayPassageIvy(), scLunpaFortressBlowAwaySecondSwitchIvy(), scLunpaFortressCratesSink(), scLunpaFortressFlipFirstSwitch(), scLunpaFortressFlipSecondSwitch(), scLunpaFortressHideSwitches(), scLunpaFortressMoveCrates(), scLunpaFortressPushCrates(), scLunpaFortressRevealSwitches(), scLunpaFortressSearchLockedDoor(), scLunpaFortressSearchSealedDoor() and scLunpaFortressUnlockCaveDoor().
Referenced by scGetCues().
Definition at lines 111 and 5126 of file lunpa_fortress.c.
LunpaFortressCuesOther
extern CUE LunpaFortressCuesOther[]
CUE LunpaFortressCuesOther[]
References scLunpaFortressFindHammet(), scLunpaFortressReadJailedDodonpaMind(), scLunpaFortressSearchLockedDoor(), scLunpaFortressTalkToJailedDodonpa() and scLunpaFortressUnlockToadonpaDoor().
Referenced by scGetCues().
Definition at lines 112 and 5182 of file lunpa_fortress.c.
LunpaFortressToadonpaDoorMetatiles
extern Uint32 LunpaFortressToadonpaDoorMetatiles[]
Uint32 LunpaFortressToadonpaDoorMetatiles[]
The cell doors, as (x, y) pairs: the cells' own (east cell first), the cave's, the upper floor's
and the ground floor's. Each is the top of the door's picture on the walls layer
(MAPGRID_LAYER_MIDDLE), whose cells begin at the map grid's row 48 in the cave and the cells and
row 64 on the two floors; the door routines name the metatile the party walks through, at the
door's foot.
Referenced by scLunpaFortressOpenToadonpaDoor().
Definition at lines 113 and 5239 of file lunpa_fortress.c.
LunpaFortressCaveDoorMetatiles
extern Uint32 LunpaFortressCaveDoorMetatiles[]
Uint32 LunpaFortressCaveDoorMetatiles[]
Referenced by scLunpaFortressOpenCaveDoor().
Definition at lines 114 and 5243 of file lunpa_fortress.c.
LunpaFortressUpperFloorDoorMetatiles
extern Uint32 LunpaFortressUpperFloorDoorMetatiles[]
Uint32 LunpaFortressUpperFloorDoorMetatiles[]
Referenced by scLunpaFortressOpenUpperFloorDoor().
Definition at lines 115 and 5246 of file lunpa_fortress.c.
LunpaFortressGroundFloorDoorMetatiles
extern Uint32 LunpaFortressGroundFloorDoorMetatiles[]
Uint32 LunpaFortressGroundFloorDoorMetatiles[]
Referenced by scLunpaFortressOpenGroundFloorDoor().
Definition at lines 116 and 5249 of file lunpa_fortress.c.
LunpaFortressSecondPatrolRoute
Sint32 LunpaFortressSecondPatrolRoute[]
The patrolling guards' rounds: the west hall's pair walk east and west across it in step, and the east halls' guards walk theirs to and fro, the ground floor's pausing at each end.
References Sint32.
Referenced by LunpaFortressUpperFloorActorPlacements.
Definition at line 4317 of file lunpa_fortress.c.
LunpaFortressFirstPatrolRoute
Sint32 LunpaFortressFirstPatrolRoute[]
References Sint32.
Referenced by LunpaFortressUpperFloorActorPlacements.
Definition at line 4330 of file lunpa_fortress.c.
LunpaFortressDonpaSleeps
Sint32 LunpaFortressDonpaSleeps[]
Donpa lies asleep in his bed.
References Sint32.
Referenced by LunpaFortressUpperFloorActorPlacements.
Definition at line 4344 of file lunpa_fortress.c.
LunpaFortressGroundFloorPatrolRoute
Sint32 LunpaFortressGroundFloorPatrolRoute[]
References Sint32.
Referenced by LunpaFortressGroundFloorActorPlacements.
Definition at line 4349 of file lunpa_fortress.c.
LunpaFortressHallPatrolRoute
Sint32 LunpaFortressHallPatrolRoute[]
References Sint32.
Referenced by LunpaFortressUpperFloorActorPlacements.
Definition at line 4385 of file lunpa_fortress.c.
LunpaFortressNoCues
CUE LunpaFortressNoCues[]
Unused: an empty cue table nothing returns.
Definition at line 4888 of file lunpa_fortress.c.