Alchemy
Loading...
Searching...
No Matches

lunpa_fortress.c File Reference

Dodonpa's fortress above Lunpa, on four maps. More...

Go to the source code of this file.

Macros

#define PAIRED_PATROL_LAYER_ORIGIN_X   (136.0 * 65536)
 The paired patrol's layer origin across: 136 pixels, in 16.16 fixed point.
#define PATROL_PSYNERGY_REQUEST(work)
#define PATROL_ITEM_REQUEST(work)
#define PATROL_RAISED_TRIGGER(work)
#define DIRECTION_STEP(dx, dz)
 The shared source and field.h declarations lack const, but these three tables occupy .rodata.

Enumerations

enum  {
  OUTER_ENTRANCE_GUARD = 12 , OUTER_FIRST_SENTRY = 13 , OUTER_UPPER_HALL_GUARD = 17 , OUTER_PATROL_GUARD = 18 ,
  OUTER_STARTLED_RESIDENT = 20 , OUTER_SECOND_SENTRY = 21
}
 The outer rooms (map 1). More...
enum  {
  GUARD_ROOM_CELL_KEY = 8 , GUARD_ROOM_FIRST_PATROL = 9 , GUARD_ROOM_SECOND_PATROL = 10 , GUARD_ROOM_HALL_GUARD = 11 ,
  GUARD_ROOM_GUARD_A = 12 , GUARD_ROOM_GUARD_B = 13 , GUARD_ROOM_GUARD_C = 14 , GUARD_ROOM_WEST_GUARD = 15 ,
  GUARD_ROOM_EAST_GUARD = 16 , GUARD_ROOM_HALL_PATROL = 17 , GUARD_ROOM_DONPA = 24 , GUARD_ROOM_ATTENDANT = 25 ,
  GUARD_ROOM_DJINNI = 26
}
 The guard rooms and Donpa's chamber (map 2). More...
enum  { COLUMN_ROOM_FIRST_SWITCH_COVER = 8 , COLUMN_ROOM_PASSAGE_COVER = 9 , COLUMN_ROOM_SECOND_SWITCH_COVER = 10 , COLUMN_ROOM_COLUMN = 12 }
 The column room (map 3). More...
enum  {
  RESCUE_MONSTER = 11 , RESCUE_HAMMET = 12 , RESCUE_DODONPA = 13 , RESCUE_DONPA = 14 ,
  RESCUE_MONSTER_PART = 15
}
 The rescue room (map 4). More...
enum  {
  TRIGGER_LOCKED_DOOR = 99 , TRIGGER_SEALED_DOOR = 98 , DOOR_TRIGGER_FIRST = 40 , TRIGGER_PATROL_PAIR_SPOTTED = 91 ,
  TRIGGER_HALL_PATROL_SPOTTED , TRIGGER_OUTER_PATROL_SPOTTED , TRIGGER_UPPER_HALL_SPOTTED , TRIGGER_ENTRANCE_GUARD_SPOTTED ,
  TRIGGER_SENTRIES_SPOTTED
}
 Triggers: the cell doors count from DOOR_TRIGGER_FIRST in each map, and a watching guard raises one of the TRIGGER_*_SPOTTED triggers. More...
enum  { REVEAL_SHOWN = 5 , REVEAL_FADED = 4 }
 Reveal's phases: the hidden things show, and hide again. More...
enum  { EXIT_THROWN_OUT = 60 }
 Where a party caught by a guard is sent: the gate below the fortress. More...
enum  { GUARD_ROOM_ENTRANCE_AFTER_BATTLE = 31 , RESCUE_ENTRANCE_AFTER_BATTLE = 4 }
 Where the party comes back after the three guards' battle and after the monster's. More...
enum  { CLOAK_NEAR_GUARD = 0x2000 | ABILITY_CLOAK }
 What a guard close to the cloaked leader requests of Cloak. More...
enum  { RESCUE_DOOR_FLAG = 0x350 , COLUMN_ROOM_DOOR_FLAG = 0x355 , GUARD_ROOM_DOOR_FLAG = 0x358 , OUTER_DOOR_FLAG = 0x35a }
 The first of the flags that remember which cell doors the Cell Key opened, per map: one for each door trigger from DOOR_TRIGGER_FIRST. More...

Functions

static s32 LunpaFortress_TryCollectDisplayedItem (s32 actorId, s32 itemId)
 Gives the item an actor shows, with its effect; with no room for it, the actor shows the item is left behind.
static void LunpaFortress_CheckSecondEntranceSentry (void)
 The second sentry, as the first.
static s32 LunpaFortress_CanGuardSeeLeader (s32 actorId)
 Whether a guard on screen sees the leader along his row or column.
static s32 LunpaFortress_IsLeaderNearGuard (s32 actorId)
 Whether the leader is within four cells, walking, of the cell below the guard.
static s32 LunpaFortress_IsGuardNearViewCenter (s32 actorId)
 Whether the guard is on screen: within seven columns and five rows of the view's center.
static void LunpaFortress_GuardThrowsPartyOut (s32 actorId)
 A guard who caught the party sends it back to the gate below the fortress.
static void LunpaFortress_ActOutIntruderDialogue (s32 actorId)
 A guard spots an intruder. "Hey! Intruder!".
static void LunpaFortress_ActOutWhosThereDialogue (s32 actorId)
 A guard asks who is there. "Huh? Who's that?".
static void LunpaFortress_ActOutGuardShiftDialogue (s32 actorId)
 A guard expects his relief, then sees who it is. "Is my shift up already?".
static void LunpaFortress_ActOutScoundrelDialogue (s32 actorId)
 A guard calls the party a scoundrel. "You scoundrel!".
static void LunpaFortress_InitializeOuterRooms (void)
 Sets the outer rooms up by entrance: the guards that watch each part, and the cell doors already opened.
static void LunpaFortress_InitializeGuardRooms (void)
 Sets the guard rooms up: beaten guards gone or lying where they fell, the Cell Key gone once taken, the patrols by entrance and Donpa's attendant by his reward's place.
static void LunpaFortress_InitializeColumnRoom (void)
 Sets the column room up: the doors, the column, the Whirlwind covers and the switches as the party left them.
static void LunpaFortress_RestoreOuterDoors (void)
 The outer rooms' cell doors stay open.
static void LunpaFortress_RestoreGuardRoomDoors (void)
 The guard rooms' cell doors stay open.
static void LunpaFortress_RestoreColumnRoomDoors (void)
 The column room's cell doors stay open.
static void LunpaFortress_RestoreRescueRoomDoors (void)
 The rescue room's cell doors stay open.
const struct SceneEntrance * Scene_GetEntrances (void)
const struct SceneRegion * Scene_GetRegions (void)
const u32 * Scene_GetExits (void)
 Both scenes share one exit table.
const struct ScenePlacement * Scene_GetPlacements (void)
 The guards, residents and objects of each map.
const struct SceneEvent * Scene_GetEvents (void)
 What the party can talk to, search and use Psynergy on, by map.
static void LunpaFortress_LowerColumn (void)
 The column sinks into the floor: the party can walk over it.
static void Event_PushColumn (void)
 Pushing the column: it slides one cell along.
static void Event_ColumnSinks (void)
 The column, pushed onto its hole, slides in and sinks.
static void Event_MoveColumn (void)
 Move on the column: once it is past row 22, over its hole, the room shakes and it sinks.
static void LunpaFortress_RestoreLoweredColumn (void)
 The column stays sunk in its hole.
static void LunpaFortress_OpenRescueRoomDoor (s32 doorIndex)
 Draws a rescue room cell door open.
static void Event_UnlockRescueRoomDoor (void)
 Facing a rescue room cell door with the Cell Key: it opens with a rumble.
static void LunpaFortress_OpenColumnRoomDoor (s32 doorIndex)
 Draws a column room cell door open and lets the party through; the middle door opens two cells.
static void Event_UnlockColumnRoomDoor (void)
 Facing a column room cell door with the Cell Key: it opens with a rumble.
static void LunpaFortress_OpenGuardRoomDoor (s32 doorIndex)
 Draws a guard room cell door open.
static void Event_UnlockGuardRoomDoor (void)
 Facing a guard room cell door with the Cell Key: it opens with a rumble.
static void LunpaFortress_OpenOuterDoor (s32 doorIndex)
 Draws an outer room cell door open and lets the party through.
static void Event_UnlockOuterDoor (void)
 Facing an outer room cell door with the Cell Key: it opens with a rumble.
static void Event_SearchLockedDoor (void)
 Searching a cell door without the Cell Key: it stays shut.
static void Event_SearchSealedDoor (void)
 Searching the door no key opens.
static void UNUSED LunpaFortress_TryCollectActorEightItem (void)
 Unused: four items set out on actors 8 to 11, each taken once, with flags 0xf2a to 0xf2d.
static void UNUSED LunpaFortress_TryCollectActorNineItem (void)
static void UNUSED LunpaFortress_TryCollectActorTenItem (void)
static void UNUSED LunpaFortress_TryCollectActorElevenItem (void)
static void UNUSED LunpaFortress_DoNothingA (void)
static void UNUSED LunpaFortress_DoNothingB (void)
static void UNUSED LunpaFortress_DoNothingC (void)
static void UNUSED LunpaFortress_DoNothingD (void)
static void Event_TakeCellKey (void)
 Catch on the Cell Key hanging in the guard rooms, or talking to it: the leader steps up and takes it.
static s32 LunpaFortress_IsLeaderInPatrolSafeZone (void)
 Where the patrolling pair cannot see the leader: the west end of their corridor and the cells below its gap.
static void LunpaFortress_UpdatePairedGuardDetection (void)
 Every frame in the guard rooms: the pair patrolling the west corridor.
static void Event_PatrolPairThrowsPartyOut (void)
 Raised when the patrolling pair spots the leader: the first stops and stares, and the second throws the party out.
static s32 LunpaFortress_IsLeaderPassingPatrollingGuard (void)
 Whether the leader and the hall patrol are in the two parallel corridors, where the guard passes without seeing the leader.
static void LunpaFortress_UpdateHallGuardDetection (void)
 Every frame in the guard rooms: the patrol in the east hall, as LunpaFortress_UpdatePairedGuardDetection; seeing the leader, it raises TRIGGER_HALL_PATROL_SPOTTED.
static void Event_HallPatrolThrowsPartyOut (void)
 Raised when the hall patrol spots the leader: it throws the party out.
static s32 LunpaFortress_IsLeaderInOuterPatrolSafeZone (void)
 Where the outer rooms' patrol cannot see the leader: three stretches of its rounds.
static void LunpaFortress_UpdateOuterGuardDetection (void)
 Every frame in the outer rooms: the patrolling guard, as LunpaFortress_UpdatePairedGuardDetection; seeing the leader, it raises TRIGGER_OUTER_PATROL_SPOTTED.
static void Event_OuterPatrolThrowsPartyOut (void)
 Raised when the outer rooms' patrol spots the leader: it throws the party out.
static s32 LunpaFortress_IsLeaderOutsideUpperHall (void)
 Whether the leader is outside the upper hall the guard there watches.
static void LunpaFortress_CheckUpperHallGuard (void)
 Every frame in the upper hall: the guard who sees the uncloaked leader raises TRIGGER_UPPER_HALL_SPOTTED.
static void Event_UpperHallGuardThrowsPartyOut (void)
 Raised when the upper hall's guard spots the leader: he throws the party out.
static void LunpaFortress_CheckEntranceGuard (void)
 Every frame past the entrance: the guard who sees the uncloaked leader raises TRIGGER_ENTRANCE_GUARD_SPOTTED, once.
static void LunpaFortress_CheckFirstEntranceSentry (void)
 Every frame past the entrance: either sentry who sees the uncloaked leader raises TRIGGER_SENTRIES_SPOTTED, once for both.
static s32 LunpaFortress_IsLeaderInGuardVerticalSight (s32 actorId)
 Whether the leader is in the guard's column, up to six cells away.
static s32 LunpaFortress_IsLeaderInGuardHorizontalSight (s32 actorId)
 Whether the leader is within a row of the guard, up to six cells away.
static void LunpaFortress_CheckOuterDoorApproach (void)
 Every frame in the outer rooms: walking into the second cell door's column with the Cell Key unlocks it.
static void LunpaFortress_CheckGuardDoorApproach (void)
 Every frame in the guard rooms: walking east or west into the first cell door's column with the Cell Key unlocks it.
static void UNUSED LunpaFortress_FirstPatrolThrowsPartyOut (void)
 Unused: the first patrol asks who the party is and sends them out.
static void LunpaFortress_GuardChallengesParty (s32 actorId)
 A guard faces the leader with one of four challenges, chosen at random when the map was entered.
static void Event_FightWestGuard (void)
 Walking up to the west guard: he challenges the party to a battle, and is gone after it.
static void Event_FightHallGuard (void)
 Walking up to the hall guard: he challenges the party to a battle, and is gone after it.
static void Event_FightThreeGuards (void)
 Walking up to the three guards: they argue, then fight the party together.
static void LunpaFortress_PlaceThreeBeatenGuards (void)
 The three guards lie beaten where they fought.
static void Event_FightEastGuard (void)
 Walking up to the east guard: he challenges the party to a battle, and is gone after it.
static void Event_EntranceGuardThrowsPartyOut (void)
 Walking past the entrance guard, or seen by him: the party is sent back to the gate below the fortress.
static void Event_SentriesThrowPartyOut (void)
 Walking between the sentries, or seen by them: the party is sent back to the gate below the fortress.
static void LunpaFortress_OpenFirstSwitchPassage (void)
 The first switch's passage opens.
static void LunpaFortress_OpenSecondSwitchPassage (void)
 The second switch's passage opens.
static void LunpaFortress_OpenCoveredPassage (void)
 The passage behind the second Whirlwind cover opens.
static __inline__ void LunpaFortress_FlipHiddenSwitch (s32 cellX, s32 cellY, void(*openPassage)(void))
 A switch flips in two frames, then its passage opens.
static void Event_FlipFirstSwitch (void)
 Searching the first switch while Reveal shows it flips it, and its passage opens.
static void Event_FlipSecondSwitch (void)
 Searching the second switch while Reveal shows it flips it, and its passage opens.
static void Event_RevealSwitches (void)
 Reveal: both switches show and can be searched.
static void Event_HideSwitches (void)
 Reveal's end: both switches hide again.
static void Event_BlowAwayFirstSwitchCover (void)
 Whirlwind on what hides the first switch: it blows away.
static void Event_BlowAwayPassageCover (void)
 Whirlwind on what hides the passage: it blows away and the passage opens.
static void Event_BlowAwaySecondSwitchCover (void)
 Whirlwind on what hides the second switch: it blows away.
static void UNUSED LunpaFortress_DoNothingE (void)
static void LunpaFortress_GatherPartyAroundHammet (void)
 Garet, Ivan and Mia step out of the leader and gather around Hammet.
static void LunpaFortress_ActivateLeverTrap (void)
 Dodonpa's lever: the room shakes, the floor opens and everyone startles.
static void LunpaFortress_RevealMonster (void)
 The camera finds the monster Dodonpa has freed; it lumbers forward.
static void LunpaFortress_PositionPartyForMonster (void)
 The party spreads out and faces the monster.
static void Event_FindHammet (void)
 Walking into Hammet's cell.
static void Event_DonpaJudgesDodonpa (void)
 After the battle: the monster has fallen on Dodonpa.
static void Event_ReadSentrysThoughts (void)
 Mind Read on the second sentry: one of eight thoughts, chosen at random when the map was entered; in one he looks around first.
static void Event_TalkToSentry (void)
 The second sentry looks around, hearing someone he cannot see.
static void Event_TalkToAttendant (void)
 Donpa's attendant.
static void Event_ReadAttendantsThoughts (void)
 Mind Read on Donpa's attendant.
static void Event_ReadDonpasThoughts (void)
 Mind Read on Donpa.
static void Event_TalkToDonpa (void)
 Donpa: asleep before the rescue.
static void Event_DjinniJoins (void)
 Talking to the Djinni in Donpa's room: it joins the party.
static void Event_TalkToBeatenGuardC (void)
 The third of the beaten guards begs. "Owww! Hey! Don't hurt me again...".
static void Event_TalkToBeatenGuardB (void)
 The second of the beaten guards gives up, and Hammet is in the cave.
static void Event_TalkToBeatenGuardA (void)
 The first of the beaten guards marvels at the party.
static void Event_AskWhereDodonpaIs (void)
 Asks where Dodonpa is. "Do you know where Dodonpa is?".
static void Event_TalkToStartledResident (void)
 A resident of the outer rooms, startled the first time, asks whether the party sneaked in in search of something; on yes, promises to keep quiet.
static void Event_ReadStartledResidentsThoughts (void)
 Mind Read on the startled resident: once they have promised, a thought about Hammet; before, Mind Read stops and they talk instead.
static void UNUSED LunpaFortress_DoNothingF (void)
static void Event_TalkToJailedDodonpa (void)
 Dodonpa behind bars begs his father's forgiveness; with the Cell Key, a further line shows.
static void Event_ReadJailedDodonpasThoughts (void)
 Mind Read on the jailed Dodonpa.
s32 Scene_Initialize (void)
 Sets each map up: a random pick for the guards' lines, the doors already opened, the watching guards and, in the rescue room, the scene after the monster battle or Dodonpa jailed.

Variables

s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds []
s32 gStagedActor_FootprintBounds []
s32 gLunpaFortressRandomPick = 0
s32 gSecondPatrolRoute []
s32 gFirstPatrolRoute []
s32 gDonpaSleeps []
s32 gOuterPatrolRoute []
s32 gHallPatrolRoute []
struct SceneEntrance gLunpaFortressEntrances1 []
struct SceneEntrance gLunpaFortressEntrances2 []
struct SceneEntrance gLunpaFortressEntrances3 []
struct SceneEntrance gLunpaFortressEntrancesOther []
u32 gLunpaFortressExitsOther []
 Scenes 161 to 163 are the fortress's maps 2 to 4; field_scene.h has no names for them yet, nor for scene 99.
u32 gLunpaFortressExits2 []
u32 gLunpaFortressExits3And4 []
struct ScenePlacement gLunpaFortressPlacementsOther []
struct ScenePlacement gLunpaFortressPlacementsWestLunpaCave []
struct ScenePlacement gLunpaFortressPlacements1 []
struct ScenePlacement gLunpaFortressPlacements2 []
struct ScenePlacement gLunpaFortressPlacements3 []
struct ScenePlacement gLunpaFortressPlacements4 []
struct SceneEvent gLunpaFortressNoEvents []
struct SceneEvent gLunpaFortressEvents1 []
struct SceneEvent gLunpaFortressEvents2 []
struct SceneEvent gLunpaFortressEvents3 []
struct SceneEvent gLunpaFortressEventsOther []
u32 gRescueRoomDoorCells []
u32 gColumnRoomDoorCells []
u32 gGuardRoomDoorCells []
u32 gOuterDoorCells []

Detailed Description

Dodonpa's fortress above Lunpa, on four maps.

The outer rooms (map 1) and the guard rooms with Donpa's chamber (map 2) are watched by guards who throw an uncloaked party out; the column room (map 3) hides its passages behind Whirlwind, Reveal and a column to Move; in the rescue room (map 4) the party finds Hammet, Dodonpa springs his trap and Donpa judges his son.

Scene flags: FLAG_SCENE_TEMP_14, a guard has spotted the party and FLAG_SCENE_TEMP_15 with it; FLAG_SCENE_TEMP_17 and _18, the first and second switch are still hidden; FLAG_SCENE_TEMP_24, the entrance guard has thrown the party out; FLAG_SCENE_TEMP_25, the sentries have; FLAG_SCENE_TEMP_26, the startled resident promised to keep quiet; FLAG_SCENE_TEMP_27, the resident was already startled; FLAG_SCENE_TEMP_70, Hammet's rescue has begun.

The flags from 0x300 are reused from place to place: 0x301, Hammet is rescued; 0x313, the attendant has told Donpa's story; 0x314, Donpa has shown his reward; 0x350 to 0x35c, the cell doors the Cell Key opened.

Definition in file lunpa_fortress.c.

Macro Definition Documentation

◆ PAIRED_PATROL_LAYER_ORIGIN_X

#define PAIRED_PATROL_LAYER_ORIGIN_X   (136.0 * 65536)

The paired patrol's layer origin across: 136 pixels, in 16.16 fixed point.

Definition at line 138 of file lunpa_fortress.c.

Referenced by LunpaFortress_UpdatePairedGuardDetection().

◆ PATROL_PSYNERGY_REQUEST

#define PATROL_PSYNERGY_REQUEST ( work)

◆ PATROL_ITEM_REQUEST

#define PATROL_ITEM_REQUEST ( work)

◆ PATROL_RAISED_TRIGGER

#define PATROL_RAISED_TRIGGER ( work)

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((u32)(dx) << 16) | ((u32)(dz) & 0xffff))
unsigned int u32
Definition types.h:15

The shared source and field.h declarations lack const, but these three tables occupy .rodata.

Pixel steps pack X above Z in two halfwords. Unsigned packing also defines the entries with negative X steps.

Definition at line 3108 of file lunpa_fortress.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The outer rooms (map 1).

Enumerator
OUTER_ENTRANCE_GUARD 
OUTER_FIRST_SENTRY 
OUTER_UPPER_HALL_GUARD 
OUTER_PATROL_GUARD 
OUTER_STARTLED_RESIDENT 
OUTER_SECOND_SENTRY 

Definition at line 53 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

The guard rooms and Donpa's chamber (map 2).

Enumerator
GUARD_ROOM_CELL_KEY 
GUARD_ROOM_FIRST_PATROL 
GUARD_ROOM_SECOND_PATROL 
GUARD_ROOM_HALL_GUARD 
GUARD_ROOM_GUARD_A 

The three guards who fight together.

GUARD_ROOM_GUARD_B 
GUARD_ROOM_GUARD_C 
GUARD_ROOM_WEST_GUARD 
GUARD_ROOM_EAST_GUARD 
GUARD_ROOM_HALL_PATROL 
GUARD_ROOM_DONPA 
GUARD_ROOM_ATTENDANT 
GUARD_ROOM_DJINNI 

Definition at line 63 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

The column room (map 3).

Enumerator
COLUMN_ROOM_FIRST_SWITCH_COVER 
COLUMN_ROOM_PASSAGE_COVER 
COLUMN_ROOM_SECOND_SWITCH_COVER 
COLUMN_ROOM_COLUMN 

Definition at line 81 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

The rescue room (map 4).

Enumerator
RESCUE_MONSTER 
RESCUE_HAMMET 
RESCUE_DODONPA 
RESCUE_DONPA 
RESCUE_MONSTER_PART 

Definition at line 89 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

Triggers: the cell doors count from DOOR_TRIGGER_FIRST in each map, and a watching guard raises one of the TRIGGER_*_SPOTTED triggers.

Enumerator
TRIGGER_LOCKED_DOOR 
TRIGGER_SEALED_DOOR 
DOOR_TRIGGER_FIRST 
TRIGGER_PATROL_PAIR_SPOTTED 
TRIGGER_HALL_PATROL_SPOTTED 
TRIGGER_OUTER_PATROL_SPOTTED 
TRIGGER_UPPER_HALL_SPOTTED 
TRIGGER_ENTRANCE_GUARD_SPOTTED 
TRIGGER_SENTRIES_SPOTTED 

Definition at line 99 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

Reveal's phases: the hidden things show, and hide again.

Enumerator
REVEAL_SHOWN 
REVEAL_FADED 

Definition at line 112 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

Where a party caught by a guard is sent: the gate below the fortress.

Enumerator
EXIT_THROWN_OUT 

Definition at line 115 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

Where the party comes back after the three guards' battle and after the monster's.

Enumerator
GUARD_ROOM_ENTRANCE_AFTER_BATTLE 
RESCUE_ENTRANCE_AFTER_BATTLE 

Definition at line 119 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

What a guard close to the cloaked leader requests of Cloak.

Enumerator
CLOAK_NEAR_GUARD 

Definition at line 125 of file lunpa_fortress.c.

◆ anonymous enum

anonymous enum

The first of the flags that remember which cell doors the Cell Key opened, per map: one for each door trigger from DOOR_TRIGGER_FIRST.

Enumerator
RESCUE_DOOR_FLAG 
COLUMN_ROOM_DOOR_FLAG 
GUARD_ROOM_DOOR_FLAG 
OUTER_DOOR_FLAG 

Definition at line 129 of file lunpa_fortress.c.

Function Documentation

◆ LunpaFortress_TryCollectDisplayedItem()

s32 LunpaFortress_TryCollectDisplayedItem ( s32 actorId,
s32 itemId )
static

Gives the item an actor shows, with its effect; with no room for it, the actor shows the item is left behind.

Returns whether it was given.

Definition at line 445 of file lunpa_fortress.c.

Referenced by LunpaFortress_TryCollectActorEightItem(), LunpaFortress_TryCollectActorElevenItem(), LunpaFortress_TryCollectActorNineItem(), LunpaFortress_TryCollectActorTenItem(), and LunpaFortress_TryCollectDisplayedItem().

◆ LunpaFortress_CheckSecondEntranceSentry()

void LunpaFortress_CheckSecondEntranceSentry ( void )
static

◆ LunpaFortress_CanGuardSeeLeader()

◆ LunpaFortress_IsLeaderNearGuard()

s32 LunpaFortress_IsLeaderNearGuard ( s32 actorId)
static

Whether the leader is within four cells, walking, of the cell below the guard.

Definition at line 922 of file lunpa_fortress.c.

Referenced by LunpaFortress_IsLeaderNearGuard(), LunpaFortress_UpdateHallGuardDetection(), LunpaFortress_UpdateOuterGuardDetection(), and LunpaFortress_UpdatePairedGuardDetection().

◆ LunpaFortress_IsGuardNearViewCenter()

s32 LunpaFortress_IsGuardNearViewCenter ( s32 actorId)
static

Whether the guard is on screen: within seven columns and five rows of the view's center.

Definition at line 948 of file lunpa_fortress.c.

Referenced by LunpaFortress_CanGuardSeeLeader(), LunpaFortress_IsGuardNearViewCenter(), and LunpaFortress_UpdateHallGuardDetection().

◆ LunpaFortress_GuardThrowsPartyOut()

void LunpaFortress_GuardThrowsPartyOut ( s32 actorId)
static

A guard who caught the party sends it back to the gate below the fortress.

"Who are you? How did you get in here?"

Definition at line 1036 of file lunpa_fortress.c.

Referenced by Event_HallPatrolThrowsPartyOut(), Event_OuterPatrolThrowsPartyOut(), Event_PatrolPairThrowsPartyOut(), Event_UpperHallGuardThrowsPartyOut(), and LunpaFortress_GuardThrowsPartyOut().

◆ LunpaFortress_ActOutIntruderDialogue()

void LunpaFortress_ActOutIntruderDialogue ( s32 actorId)
static

A guard spots an intruder. "Hey! Intruder!".

Definition at line 1092 of file lunpa_fortress.c.

Referenced by LunpaFortress_ActOutIntruderDialogue(), and LunpaFortress_GuardChallengesParty().

◆ LunpaFortress_ActOutWhosThereDialogue()

void LunpaFortress_ActOutWhosThereDialogue ( s32 actorId)
static

A guard asks who is there. "Huh? Who's that?".

Definition at line 1109 of file lunpa_fortress.c.

Referenced by LunpaFortress_ActOutWhosThereDialogue(), and LunpaFortress_GuardChallengesParty().

◆ LunpaFortress_ActOutGuardShiftDialogue()

void LunpaFortress_ActOutGuardShiftDialogue ( s32 actorId)
static

A guard expects his relief, then sees who it is. "Is my shift up already?".

Definition at line 1123 of file lunpa_fortress.c.

Referenced by LunpaFortress_ActOutGuardShiftDialogue(), and LunpaFortress_GuardChallengesParty().

◆ LunpaFortress_ActOutScoundrelDialogue()

void LunpaFortress_ActOutScoundrelDialogue ( s32 actorId)
static

A guard calls the party a scoundrel. "You scoundrel!".

Definition at line 1142 of file lunpa_fortress.c.

Referenced by LunpaFortress_ActOutScoundrelDialogue(), and LunpaFortress_GuardChallengesParty().

◆ LunpaFortress_InitializeOuterRooms()

void LunpaFortress_InitializeOuterRooms ( void )
static

Sets the outer rooms up by entrance: the guards that watch each part, and the cell doors already opened.

Definition at line 2854 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeOuterRooms(), and Scene_Initialize().

◆ LunpaFortress_InitializeGuardRooms()

void LunpaFortress_InitializeGuardRooms ( void )
static

Sets the guard rooms up: beaten guards gone or lying where they fell, the Cell Key gone once taken, the patrols by entrance and Donpa's attendant by his reward's place.

Definition at line 2911 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeGuardRooms(), and Scene_Initialize().

◆ LunpaFortress_InitializeColumnRoom()

void LunpaFortress_InitializeColumnRoom ( void )
static

Sets the column room up: the doors, the column, the Whirlwind covers and the switches as the party left them.

Definition at line 2995 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeColumnRoom(), and Scene_Initialize().

◆ LunpaFortress_RestoreOuterDoors()

void LunpaFortress_RestoreOuterDoors ( void )
static

The outer rooms' cell doors stay open.

Definition at line 3051 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeOuterRooms(), and LunpaFortress_RestoreOuterDoors().

◆ LunpaFortress_RestoreGuardRoomDoors()

void LunpaFortress_RestoreGuardRoomDoors ( void )
static

The guard rooms' cell doors stay open.

Definition at line 3064 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeGuardRooms(), and LunpaFortress_RestoreGuardRoomDoors().

◆ LunpaFortress_RestoreColumnRoomDoors()

void LunpaFortress_RestoreColumnRoomDoors ( void )
static

The column room's cell doors stay open.

Definition at line 3074 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeColumnRoom(), and LunpaFortress_RestoreColumnRoomDoors().

◆ LunpaFortress_RestoreRescueRoomDoors()

void LunpaFortress_RestoreRescueRoomDoors ( void )
static

The rescue room's cell doors stay open.

Definition at line 3087 of file lunpa_fortress.c.

Referenced by LunpaFortress_RestoreRescueRoomDoors(), and Scene_Initialize().

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 160 of file lunpa_fortress.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 175 of file lunpa_fortress.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 177 of file lunpa_fortress.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

The guards, residents and objects of each map.

Definition at line 191 of file lunpa_fortress.c.

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

What the party can talk to, search and use Psynergy on, by map.

Definition at line 213 of file lunpa_fortress.c.

◆ LunpaFortress_LowerColumn()

void LunpaFortress_LowerColumn ( void )
static

The column sinks into the floor: the party can walk over it.

Definition at line 229 of file lunpa_fortress.c.

Referenced by Event_ColumnSinks(), LunpaFortress_LowerColumn(), and LunpaFortress_RestoreLoweredColumn().

◆ Event_PushColumn()

void Event_PushColumn ( void )
static

Pushing the column: it slides one cell along.

Definition at line 243 of file lunpa_fortress.c.

Referenced by Event_PushColumn().

◆ Event_ColumnSinks()

void Event_ColumnSinks ( void )
static

The column, pushed onto its hole, slides in and sinks.

Definition at line 246 of file lunpa_fortress.c.

Referenced by Event_ColumnSinks().

◆ Event_MoveColumn()

void Event_MoveColumn ( void )
static

Move on the column: once it is past row 22, over its hole, the room shakes and it sinks.

Definition at line 258 of file lunpa_fortress.c.

Referenced by Event_MoveColumn().

◆ LunpaFortress_RestoreLoweredColumn()

void LunpaFortress_RestoreLoweredColumn ( void )
static

The column stays sunk in its hole.

Definition at line 278 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeColumnRoom(), and LunpaFortress_RestoreLoweredColumn().

◆ LunpaFortress_OpenRescueRoomDoor()

void LunpaFortress_OpenRescueRoomDoor ( s32 doorIndex)
static

◆ Event_UnlockRescueRoomDoor()

void Event_UnlockRescueRoomDoor ( void )
static

Facing a rescue room cell door with the Cell Key: it opens with a rumble.

After Hammet's rescue the fifth, Dodonpa's cell, stays shut.

Definition at line 295 of file lunpa_fortress.c.

Referenced by Event_UnlockRescueRoomDoor().

◆ LunpaFortress_OpenColumnRoomDoor()

void LunpaFortress_OpenColumnRoomDoor ( s32 doorIndex)
static

Draws a column room cell door open and lets the party through; the middle door opens two cells.

Definition at line 316 of file lunpa_fortress.c.

Referenced by Event_UnlockColumnRoomDoor(), LunpaFortress_OpenColumnRoomDoor(), and LunpaFortress_RestoreColumnRoomDoors().

◆ Event_UnlockColumnRoomDoor()

void Event_UnlockColumnRoomDoor ( void )
static

Facing a column room cell door with the Cell Key: it opens with a rumble.

Definition at line 334 of file lunpa_fortress.c.

Referenced by Event_UnlockColumnRoomDoor().

◆ LunpaFortress_OpenGuardRoomDoor()

void LunpaFortress_OpenGuardRoomDoor ( s32 doorIndex)
static

Draws a guard room cell door open.

Definition at line 350 of file lunpa_fortress.c.

Referenced by Event_UnlockGuardRoomDoor(), LunpaFortress_OpenGuardRoomDoor(), and LunpaFortress_RestoreGuardRoomDoors().

◆ Event_UnlockGuardRoomDoor()

void Event_UnlockGuardRoomDoor ( void )
static

Facing a guard room cell door with the Cell Key: it opens with a rumble.

Definition at line 360 of file lunpa_fortress.c.

Referenced by Event_UnlockGuardRoomDoor(), and LunpaFortress_CheckGuardDoorApproach().

◆ LunpaFortress_OpenOuterDoor()

void LunpaFortress_OpenOuterDoor ( s32 doorIndex)
static

Draws an outer room cell door open and lets the party through.

Definition at line 376 of file lunpa_fortress.c.

Referenced by Event_UnlockOuterDoor(), LunpaFortress_OpenOuterDoor(), and LunpaFortress_RestoreOuterDoors().

◆ Event_UnlockOuterDoor()

void Event_UnlockOuterDoor ( void )
static

Facing an outer room cell door with the Cell Key: it opens with a rumble.

Definition at line 389 of file lunpa_fortress.c.

Referenced by Event_UnlockOuterDoor(), and LunpaFortress_CheckOuterDoorApproach().

◆ Event_SearchLockedDoor()

void Event_SearchLockedDoor ( void )
static

Searching a cell door without the Cell Key: it stays shut.

"The door is tightly locked."

Definition at line 406 of file lunpa_fortress.c.

Referenced by Event_SearchLockedDoor(), Event_SearchLockedDoor(), and Event_SearchLockedDoor().

◆ Event_SearchSealedDoor()

void Event_SearchSealedDoor ( void )
static

Searching the door no key opens.

Definition at line 413 of file lunpa_fortress.c.

Referenced by Event_SearchSealedDoor().

◆ LunpaFortress_TryCollectActorEightItem()

void UNUSED LunpaFortress_TryCollectActorEightItem ( void )
static

Unused: four items set out on actors 8 to 11, each taken once, with flags 0xf2a to 0xf2d.

Definition at line 419 of file lunpa_fortress.c.

Referenced by LunpaFortress_TryCollectActorEightItem().

◆ LunpaFortress_TryCollectActorNineItem()

void UNUSED LunpaFortress_TryCollectActorNineItem ( void )
static

Definition at line 425 of file lunpa_fortress.c.

Referenced by LunpaFortress_TryCollectActorNineItem().

◆ LunpaFortress_TryCollectActorTenItem()

void UNUSED LunpaFortress_TryCollectActorTenItem ( void )
static

Definition at line 431 of file lunpa_fortress.c.

Referenced by LunpaFortress_TryCollectActorTenItem().

◆ LunpaFortress_TryCollectActorElevenItem()

void UNUSED LunpaFortress_TryCollectActorElevenItem ( void )
static

Definition at line 437 of file lunpa_fortress.c.

Referenced by LunpaFortress_TryCollectActorElevenItem().

◆ LunpaFortress_DoNothingA()

void UNUSED LunpaFortress_DoNothingA ( void )
static

Definition at line 464 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingA().

◆ LunpaFortress_DoNothingB()

void UNUSED LunpaFortress_DoNothingB ( void )
static

Definition at line 466 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingB().

◆ LunpaFortress_DoNothingC()

void UNUSED LunpaFortress_DoNothingC ( void )
static

Definition at line 468 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingC().

◆ LunpaFortress_DoNothingD()

void UNUSED LunpaFortress_DoNothingD ( void )
static

Definition at line 470 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingD().

◆ Event_TakeCellKey()

void Event_TakeCellKey ( void )
static

Catch on the Cell Key hanging in the guard rooms, or talking to it: the leader steps up and takes it.

Definition at line 474 of file lunpa_fortress.c.

Referenced by Event_TakeCellKey().

◆ LunpaFortress_IsLeaderInPatrolSafeZone()

s32 LunpaFortress_IsLeaderInPatrolSafeZone ( void )
static

Where the patrolling pair cannot see the leader: the west end of their corridor and the cells below its gap.

Definition at line 488 of file lunpa_fortress.c.

Referenced by LunpaFortress_IsLeaderInPatrolSafeZone(), and LunpaFortress_UpdatePairedGuardDetection().

◆ LunpaFortress_UpdatePairedGuardDetection()

void LunpaFortress_UpdatePairedGuardDetection ( void )
static

Every frame in the guard rooms: the pair patrolling the west corridor.

They stand still while flag 0x106 is set or Psynergy or an item is in use; otherwise they walk, with map layer 2 shaking and following the first. Close to a cloaked leader they request CLOAK_NEAR_GUARD; seeing an uncloaked leader, they raise TRIGGER_PATROL_PAIR_SPOTTED.

Definition at line 530 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeGuardRooms(), and LunpaFortress_UpdatePairedGuardDetection().

◆ Event_PatrolPairThrowsPartyOut()

void Event_PatrolPairThrowsPartyOut ( void )
static

Raised when the patrolling pair spots the leader: the first stops and stares, and the second throws the party out.

Definition at line 591 of file lunpa_fortress.c.

Referenced by Event_PatrolPairThrowsPartyOut().

◆ LunpaFortress_IsLeaderPassingPatrollingGuard()

s32 LunpaFortress_IsLeaderPassingPatrollingGuard ( void )
static

Whether the leader and the hall patrol are in the two parallel corridors, where the guard passes without seeing the leader.

Definition at line 604 of file lunpa_fortress.c.

Referenced by LunpaFortress_IsLeaderPassingPatrollingGuard(), and LunpaFortress_UpdateHallGuardDetection().

◆ LunpaFortress_UpdateHallGuardDetection()

void LunpaFortress_UpdateHallGuardDetection ( void )
static

Every frame in the guard rooms: the patrol in the east hall, as LunpaFortress_UpdatePairedGuardDetection; seeing the leader, it raises TRIGGER_HALL_PATROL_SPOTTED.

Definition at line 640 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeGuardRooms(), and LunpaFortress_UpdateHallGuardDetection().

◆ Event_HallPatrolThrowsPartyOut()

void Event_HallPatrolThrowsPartyOut ( void )
static

Raised when the hall patrol spots the leader: it throws the party out.

Definition at line 690 of file lunpa_fortress.c.

Referenced by Event_HallPatrolThrowsPartyOut().

◆ LunpaFortress_IsLeaderInOuterPatrolSafeZone()

s32 LunpaFortress_IsLeaderInOuterPatrolSafeZone ( void )
static

Where the outer rooms' patrol cannot see the leader: three stretches of its rounds.

Definition at line 697 of file lunpa_fortress.c.

Referenced by LunpaFortress_IsLeaderInOuterPatrolSafeZone(), and LunpaFortress_UpdateOuterGuardDetection().

◆ LunpaFortress_UpdateOuterGuardDetection()

void LunpaFortress_UpdateOuterGuardDetection ( void )
static

Every frame in the outer rooms: the patrolling guard, as LunpaFortress_UpdatePairedGuardDetection; seeing the leader, it raises TRIGGER_OUTER_PATROL_SPOTTED.

Definition at line 717 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeOuterRooms(), and LunpaFortress_UpdateOuterGuardDetection().

◆ Event_OuterPatrolThrowsPartyOut()

void Event_OuterPatrolThrowsPartyOut ( void )
static

Raised when the outer rooms' patrol spots the leader: it throws the party out.

Definition at line 766 of file lunpa_fortress.c.

Referenced by Event_OuterPatrolThrowsPartyOut().

◆ LunpaFortress_IsLeaderOutsideUpperHall()

s32 LunpaFortress_IsLeaderOutsideUpperHall ( void )
static

Whether the leader is outside the upper hall the guard there watches.

Definition at line 772 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckUpperHallGuard(), and LunpaFortress_IsLeaderOutsideUpperHall().

◆ LunpaFortress_CheckUpperHallGuard()

void LunpaFortress_CheckUpperHallGuard ( void )
static

Every frame in the upper hall: the guard who sees the uncloaked leader raises TRIGGER_UPPER_HALL_SPOTTED.

Definition at line 786 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckUpperHallGuard(), and LunpaFortress_InitializeOuterRooms().

◆ Event_UpperHallGuardThrowsPartyOut()

void Event_UpperHallGuardThrowsPartyOut ( void )
static

Raised when the upper hall's guard spots the leader: he throws the party out.

Definition at line 808 of file lunpa_fortress.c.

Referenced by Event_UpperHallGuardThrowsPartyOut().

◆ LunpaFortress_CheckEntranceGuard()

void LunpaFortress_CheckEntranceGuard ( void )
static

Every frame past the entrance: the guard who sees the uncloaked leader raises TRIGGER_ENTRANCE_GUARD_SPOTTED, once.

Definition at line 815 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckEntranceGuard(), and LunpaFortress_InitializeOuterRooms().

◆ LunpaFortress_CheckFirstEntranceSentry()

void LunpaFortress_CheckFirstEntranceSentry ( void )
static

Every frame past the entrance: either sentry who sees the uncloaked leader raises TRIGGER_SENTRIES_SPOTTED, once for both.

Definition at line 833 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckFirstEntranceSentry(), LunpaFortress_CheckSecondEntranceSentry(), and LunpaFortress_InitializeOuterRooms().

◆ LunpaFortress_IsLeaderInGuardVerticalSight()

s32 LunpaFortress_IsLeaderInGuardVerticalSight ( s32 actorId)
static

Whether the leader is in the guard's column, up to six cells away.

Definition at line 869 of file lunpa_fortress.c.

Referenced by LunpaFortress_CanGuardSeeLeader(), and LunpaFortress_IsLeaderInGuardVerticalSight().

◆ LunpaFortress_IsLeaderInGuardHorizontalSight()

s32 LunpaFortress_IsLeaderInGuardHorizontalSight ( s32 actorId)
static

Whether the leader is within a row of the guard, up to six cells away.

Definition at line 886 of file lunpa_fortress.c.

Referenced by LunpaFortress_CanGuardSeeLeader(), and LunpaFortress_IsLeaderInGuardHorizontalSight().

◆ LunpaFortress_CheckOuterDoorApproach()

void LunpaFortress_CheckOuterDoorApproach ( void )
static

Every frame in the outer rooms: walking into the second cell door's column with the Cell Key unlocks it.

Definition at line 973 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckOuterDoorApproach(), and LunpaFortress_InitializeOuterRooms().

◆ LunpaFortress_CheckGuardDoorApproach()

void LunpaFortress_CheckGuardDoorApproach ( void )
static

Every frame in the guard rooms: walking east or west into the first cell door's column with the Cell Key unlocks it.

Definition at line 993 of file lunpa_fortress.c.

Referenced by LunpaFortress_CheckGuardDoorApproach(), and LunpaFortress_InitializeGuardRooms().

◆ LunpaFortress_FirstPatrolThrowsPartyOut()

void UNUSED LunpaFortress_FirstPatrolThrowsPartyOut ( void )
static

Unused: the first patrol asks who the party is and sends them out.

Definition at line 1013 of file lunpa_fortress.c.

Referenced by LunpaFortress_FirstPatrolThrowsPartyOut().

◆ LunpaFortress_GuardChallengesParty()

void LunpaFortress_GuardChallengesParty ( s32 actorId)
static

A guard faces the leader with one of four challenges, chosen at random when the map was entered.

Definition at line 1068 of file lunpa_fortress.c.

Referenced by Event_FightEastGuard(), Event_FightHallGuard(), Event_FightWestGuard(), and LunpaFortress_GuardChallengesParty().

◆ Event_FightWestGuard()

void Event_FightWestGuard ( void )
static

Walking up to the west guard: he challenges the party to a battle, and is gone after it.

Definition at line 1160 of file lunpa_fortress.c.

Referenced by Event_FightWestGuard().

◆ Event_FightHallGuard()

void Event_FightHallGuard ( void )
static

Walking up to the hall guard: he challenges the party to a battle, and is gone after it.

Definition at line 1176 of file lunpa_fortress.c.

Referenced by Event_FightHallGuard().

◆ Event_FightThreeGuards()

void Event_FightThreeGuards ( void )
static

Walking up to the three guards: they argue, then fight the party together.

"Who are you!?" After the battle the party comes back to this room.

Definition at line 1192 of file lunpa_fortress.c.

Referenced by Event_FightThreeGuards().

◆ LunpaFortress_PlaceThreeBeatenGuards()

void LunpaFortress_PlaceThreeBeatenGuards ( void )
static

The three guards lie beaten where they fought.

Definition at line 1254 of file lunpa_fortress.c.

Referenced by LunpaFortress_InitializeGuardRooms(), and LunpaFortress_PlaceThreeBeatenGuards().

◆ Event_FightEastGuard()

void Event_FightEastGuard ( void )
static

Walking up to the east guard: he challenges the party to a battle, and is gone after it.

Definition at line 1269 of file lunpa_fortress.c.

Referenced by Event_FightEastGuard().

◆ Event_EntranceGuardThrowsPartyOut()

void Event_EntranceGuardThrowsPartyOut ( void )
static

Walking past the entrance guard, or seen by him: the party is sent back to the gate below the fortress.

"Who are you?"

Definition at line 1285 of file lunpa_fortress.c.

Referenced by Event_EntranceGuardThrowsPartyOut().

◆ Event_SentriesThrowPartyOut()

void Event_SentriesThrowPartyOut ( void )
static

Walking between the sentries, or seen by them: the party is sent back to the gate below the fortress.

"Who are you?"

Definition at line 1311 of file lunpa_fortress.c.

Referenced by Event_SentriesThrowPartyOut().

◆ LunpaFortress_OpenFirstSwitchPassage()

void LunpaFortress_OpenFirstSwitchPassage ( void )
static

The first switch's passage opens.

Definition at line 1337 of file lunpa_fortress.c.

Referenced by Event_FlipFirstSwitch(), LunpaFortress_InitializeColumnRoom(), and LunpaFortress_OpenFirstSwitchPassage().

◆ LunpaFortress_OpenSecondSwitchPassage()

void LunpaFortress_OpenSecondSwitchPassage ( void )
static

The second switch's passage opens.

Definition at line 1343 of file lunpa_fortress.c.

Referenced by Event_FlipSecondSwitch(), LunpaFortress_InitializeColumnRoom(), and LunpaFortress_OpenSecondSwitchPassage().

◆ LunpaFortress_OpenCoveredPassage()

void LunpaFortress_OpenCoveredPassage ( void )
static

The passage behind the second Whirlwind cover opens.

Definition at line 1349 of file lunpa_fortress.c.

Referenced by Event_BlowAwayPassageCover(), LunpaFortress_InitializeColumnRoom(), and LunpaFortress_OpenCoveredPassage().

◆ LunpaFortress_FlipHiddenSwitch()

__inline__ void LunpaFortress_FlipHiddenSwitch ( s32 cellX,
s32 cellY,
void(* openPassage )(void) )
static

A switch flips in two frames, then its passage opens.

Definition at line 1356 of file lunpa_fortress.c.

Referenced by Event_FlipFirstSwitch(), Event_FlipSecondSwitch(), and LunpaFortress_FlipHiddenSwitch().

◆ Event_FlipFirstSwitch()

void Event_FlipFirstSwitch ( void )
static

Searching the first switch while Reveal shows it flips it, and its passage opens.

"You flipped the switch."

Definition at line 1367 of file lunpa_fortress.c.

Referenced by Event_FlipFirstSwitch().

◆ Event_FlipSecondSwitch()

void Event_FlipSecondSwitch ( void )
static

Searching the second switch while Reveal shows it flips it, and its passage opens.

"You flipped the switch."

Definition at line 1382 of file lunpa_fortress.c.

Referenced by Event_FlipSecondSwitch().

◆ Event_RevealSwitches()

void Event_RevealSwitches ( void )
static

Reveal: both switches show and can be searched.

Definition at line 1396 of file lunpa_fortress.c.

Referenced by Event_RevealSwitches().

◆ Event_HideSwitches()

void Event_HideSwitches ( void )
static

Reveal's end: both switches hide again.

Definition at line 1404 of file lunpa_fortress.c.

Referenced by Event_HideSwitches().

◆ Event_BlowAwayFirstSwitchCover()

void Event_BlowAwayFirstSwitchCover ( void )
static

Whirlwind on what hides the first switch: it blows away.

Definition at line 1412 of file lunpa_fortress.c.

Referenced by Event_BlowAwayFirstSwitchCover().

◆ Event_BlowAwayPassageCover()

void Event_BlowAwayPassageCover ( void )
static

Whirlwind on what hides the passage: it blows away and the passage opens.

Definition at line 1419 of file lunpa_fortress.c.

Referenced by Event_BlowAwayPassageCover().

◆ Event_BlowAwaySecondSwitchCover()

void Event_BlowAwaySecondSwitchCover ( void )
static

Whirlwind on what hides the second switch: it blows away.

Definition at line 1426 of file lunpa_fortress.c.

Referenced by Event_BlowAwaySecondSwitchCover().

◆ LunpaFortress_DoNothingE()

void UNUSED LunpaFortress_DoNothingE ( void )
static

Definition at line 1432 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingE().

◆ LunpaFortress_GatherPartyAroundHammet()

void LunpaFortress_GatherPartyAroundHammet ( void )
static

Garet, Ivan and Mia step out of the leader and gather around Hammet.

Definition at line 1435 of file lunpa_fortress.c.

Referenced by Event_FindHammet(), and LunpaFortress_GatherPartyAroundHammet().

◆ LunpaFortress_ActivateLeverTrap()

void LunpaFortress_ActivateLeverTrap ( void )
static

Dodonpa's lever: the room shakes, the floor opens and everyone startles.

Definition at line 1467 of file lunpa_fortress.c.

Referenced by Event_FindHammet(), and LunpaFortress_ActivateLeverTrap().

◆ LunpaFortress_RevealMonster()

void LunpaFortress_RevealMonster ( void )
static

The camera finds the monster Dodonpa has freed; it lumbers forward.

Definition at line 1485 of file lunpa_fortress.c.

Referenced by Event_FindHammet(), and LunpaFortress_RevealMonster().

◆ LunpaFortress_PositionPartyForMonster()

void LunpaFortress_PositionPartyForMonster ( void )
static

The party spreads out and faces the monster.

Definition at line 1502 of file lunpa_fortress.c.

Referenced by Event_FindHammet(), and LunpaFortress_PositionPartyForMonster().

◆ Event_FindHammet()

void Event_FindHammet ( void )
static

Walking into Hammet's cell.

The first time, Hammet hears the party out and recognizes Ivan, then Dodonpa arrives, gloats, pulls a lever and frees a monster on them; after a lost battle, the scene goes straight to the trap. Either way, the battle follows.

Definition at line 1522 of file lunpa_fortress.c.

Referenced by Event_FindHammet().

◆ Event_DonpaJudgesDodonpa()

void Event_DonpaJudgesDodonpa ( void )
static

After the battle: the monster has fallen on Dodonpa.

The party may pull it off him; they argue over his punishment until his father Donpa arrives, who orders him locked up, thanks the party, and lets them leave with Hammet.

Definition at line 1791 of file lunpa_fortress.c.

Referenced by Event_DonpaJudgesDodonpa(), and Scene_Initialize().

◆ Event_ReadSentrysThoughts()

void Event_ReadSentrysThoughts ( void )
static

Mind Read on the second sentry: one of eight thoughts, chosen at random when the map was entered; in one he looks around first.

Definition at line 2458 of file lunpa_fortress.c.

Referenced by Event_ReadSentrysThoughts().

◆ Event_TalkToSentry()

void Event_TalkToSentry ( void )
static

The second sentry looks around, hearing someone he cannot see.

Definition at line 2506 of file lunpa_fortress.c.

Referenced by Event_TalkToSentry().

◆ Event_TalkToAttendant()

void Event_TalkToAttendant ( void )
static

Donpa's attendant.

Before the rescue the attendant hushes the party, glances at the sleeping Donpa, asks a question and tells of Donpa and his spoiled son; once told, only a line. After the rescue, Donpa is grateful.

Definition at line 2531 of file lunpa_fortress.c.

Referenced by Event_TalkToAttendant().

◆ Event_ReadAttendantsThoughts()

void Event_ReadAttendantsThoughts ( void )
static

Mind Read on Donpa's attendant.

Definition at line 2593 of file lunpa_fortress.c.

Referenced by Event_ReadAttendantsThoughts().

◆ Event_ReadDonpasThoughts()

void Event_ReadDonpasThoughts ( void )
static

Mind Read on Donpa.

Definition at line 2604 of file lunpa_fortress.c.

Referenced by Event_ReadDonpasThoughts().

◆ Event_TalkToDonpa()

void Event_TalkToDonpa ( void )
static

Donpa: asleep before the rescue.

"ZZZZ..." After it, the first time, he thanks the party and has his attendant show them his reward.

Definition at line 2616 of file lunpa_fortress.c.

Referenced by Event_TalkToDonpa().

◆ Event_DjinniJoins()

void Event_DjinniJoins ( void )
static

Talking to the Djinni in Donpa's room: it joins the party.

Definition at line 2676 of file lunpa_fortress.c.

Referenced by Event_DjinniJoins().

◆ Event_TalkToBeatenGuardC()

void Event_TalkToBeatenGuardC ( void )
static

The third of the beaten guards begs. "Owww! Hey! Don't hurt me again...".

Definition at line 2682 of file lunpa_fortress.c.

Referenced by Event_TalkToBeatenGuardC().

◆ Event_TalkToBeatenGuardB()

void Event_TalkToBeatenGuardB ( void )
static

The second of the beaten guards gives up, and Hammet is in the cave.

"We give up!"

Definition at line 2690 of file lunpa_fortress.c.

Referenced by Event_TalkToBeatenGuardB().

◆ Event_TalkToBeatenGuardA()

void Event_TalkToBeatenGuardA ( void )
static

The first of the beaten guards marvels at the party.

"Who'd have thought they'd be so tough?"

Definition at line 2698 of file lunpa_fortress.c.

Referenced by Event_TalkToBeatenGuardA().

◆ Event_AskWhereDodonpaIs()

void Event_AskWhereDodonpaIs ( void )
static

Asks where Dodonpa is. "Do you know where Dodonpa is?".

Definition at line 2705 of file lunpa_fortress.c.

Referenced by Event_AskWhereDodonpaIs().

◆ Event_TalkToStartledResident()

void Event_TalkToStartledResident ( void )
static

A resident of the outer rooms, startled the first time, asks whether the party sneaked in in search of something; on yes, promises to keep quiet.

"Wh-Wh-Who goes there!"

Definition at line 2713 of file lunpa_fortress.c.

Referenced by Event_ReadStartledResidentsThoughts(), Event_TalkToStartledResident(), and Event_TalkToStartledResident().

◆ Event_ReadStartledResidentsThoughts()

void Event_ReadStartledResidentsThoughts ( void )
static

Mind Read on the startled resident: once they have promised, a thought about Hammet; before, Mind Read stops and they talk instead.

Definition at line 2759 of file lunpa_fortress.c.

Referenced by Event_ReadStartledResidentsThoughts().

◆ LunpaFortress_DoNothingF()

void UNUSED LunpaFortress_DoNothingF ( void )
static

Definition at line 2773 of file lunpa_fortress.c.

Referenced by LunpaFortress_DoNothingF().

◆ Event_TalkToJailedDodonpa()

void Event_TalkToJailedDodonpa ( void )
static

Dodonpa behind bars begs his father's forgiveness; with the Cell Key, a further line shows.

Definition at line 2777 of file lunpa_fortress.c.

Referenced by Event_TalkToJailedDodonpa().

◆ Event_ReadJailedDodonpasThoughts()

void Event_ReadJailedDodonpasThoughts ( void )
static

Mind Read on the jailed Dodonpa.

Definition at line 2788 of file lunpa_fortress.c.

Referenced by Event_ReadJailedDodonpasThoughts().

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Sets each map up: a random pick for the guards' lines, the doors already opened, the watching guards and, in the rescue room, the scene after the monster battle or Dodonpa jailed.

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

Definition at line 2796 of file lunpa_fortress.c.

Variable Documentation

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
Initial value:
= {
DIRECTION_STEP(0, 16), DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0),
DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0), DIRECTION_STEP(0, -16),
DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16),
}
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 3113 of file lunpa_fortress.c.

◆ gStagedActor_FootprintKinds

u32 gStagedActor_FootprintKinds[]
Initial value:
= {
207, 205, 228, 229, 298, 297,
}

Definition at line 3123 of file lunpa_fortress.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
Initial value:
= {
-32, -8, 32, 8,
-8, -32, 8, 32,
-32, -16, 32, 0,
-8, -32, 8, 32,
-32, -8, 32, 8,
-8, -32, 8, 32,
}

Definition at line 3127 of file lunpa_fortress.c.

◆ gLunpaFortressRandomPick

s32 gLunpaFortressRandomPick = 0

◆ gSecondPatrolRoute

s32 gSecondPatrolRoute[]
Initial value:
= {
SC_SET(SW_ACCEL, 0x11999),
SC_SET(SW_SPEED, 0x11999),
SC_ARG(2),
SC_MOVE(PIXELS(192), 0, PIXELS(288)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(88), 0, PIXELS(288)),
}
#define PIXELS(value)
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_SYNC
Wait for arrival.
Definition objcmd.h:17
#define SC_FOREVER
Definition objcmd.h:14
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_MOVE(x, y, z)
Move toward the target.
Definition objcmd.h:19
#define SC_TOP
Script start.
Definition objcmd.h:13
@ SW_ACCEL
Definition objcmd.h:68
@ SW_SPEED
Definition objcmd.h:67

Definition at line 3138 of file lunpa_fortress.c.

◆ gFirstPatrolRoute

s32 gFirstPatrolRoute[]
Initial value:
= {
SC_SET(SW_ACCEL, 0x11999),
SC_SET(SW_SPEED, 0x11999),
SC_ARG(2),
SC_MOVE(PIXELS(192), 0, PIXELS(192)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(88), 0, PIXELS(192)),
}

Definition at line 3151 of file lunpa_fortress.c.

◆ gDonpaSleeps

s32 gDonpaSleeps[]
Initial value:
= {
SC_ARG(5),
}
#define SC_END
Return to the main script.
Definition objcmd.h:32

Definition at line 3164 of file lunpa_fortress.c.

◆ gOuterPatrolRoute

s32 gOuterPatrolRoute[]

Definition at line 3169 of file lunpa_fortress.c.

◆ gHallPatrolRoute

s32 gHallPatrolRoute[]
Initial value:
= {
SC_SET(SW_ACCEL, 0x3333),
SC_SET(SW_SPEED, 0x9999),
SC_ARG(2),
SC_MOVE(PIXELS(920), 0, PIXELS(648)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(840), 0, PIXELS(648)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(840), 0, PIXELS(592)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(840), 0, PIXELS(648)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(920), 0, PIXELS(648)),
SC_ARG(1),
SC_ARG(2),
SC_MOVE(PIXELS(920), 0, PIXELS(592)),
SC_ARG(1),
}

Definition at line 3205 of file lunpa_fortress.c.

◆ gLunpaFortressEntrances1

struct SceneEntrance gLunpaFortressEntrances1[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 168, 0, 632, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 160, 0, 168, FACING_NORTH, 0, 40, 24, 296, 280, 0 },
{ 2, CONDITION_ALWAYS, 160, 0, 104, FACING_SOUTH, 0, 40, 24, 296, 280, 0 },
{ 3, CONDITION_ALWAYS, 272, 0, 896, FACING_NORTH, 0, 24, 616, 536, 936, 0 },
{ 4, CONDITION_ALWAYS, 376, 0, 896, FACING_NORTH, 0, 24, 616, 536, 936, 0 },
{ 5, CONDITION_ALWAYS, 248, 0, 856, FACING_SOUTH, 0, 24, 616, 536, 936, 0 },
{ 6, CONDITION_ALWAYS, 488, 0, 680, FACING_SOUTH, 0, 24, 616, 536, 936, 0 },
{ 7, CONDITION_ALWAYS, 72, 0, 696, FACING_SOUTH, 0, 24, 616, 536, 936, 0 },
{ 8, CONDITION_ALWAYS, 96, 0, 856, FACING_SOUTH, 0, 24, 616, 536, 936, 0 },
{ 9, CONDITION_ALWAYS, 376, 0, 184, FACING_SOUTH, 0, 328, 8, 568, 232, 0 },
{ 10, CONDITION_ALWAYS, 504, 0, 88, FACING_SOUTH, 0, 328, 8, 568, 232, 0 },
{ 11, CONDITION_ALWAYS, 440, 0, 104, FACING_SOUTH, 0, 328, 8, 568, 232, 0 },
{ 12, CONDITION_ALWAYS, 136, 0, 512, FACING_NORTH, 0, 40, 328, 280, 552, 0 },
{ 13, CONDITION_ALWAYS, 888, 0, 280, FACING_NORTH, 0, 632, 40, 952, 328, 0 },
{ 14, CONDITION_ALWAYS, 696, 0, 264, FACING_SOUTH, 0, 632, 40, 952, 328, 0 },
{ 15, CONDITION_ALWAYS, 824, 0, 120, FACING_SOUTH, 0, 632, 40, 952, 328, 0 },
{ 16, CONDITION_ALWAYS, 664, 0, 632, FACING_NORTH, 0, 616, 344, 936, 696, 0 },
{ 17, CONDITION_ALWAYS, 888, 0, 520, FACING_NORTH, 0, 616, 344, 936, 696, 0 },
{ 18, CONDITION_ALWAYS, 696, 0, 432, FACING_SOUTH, 0, 616, 344, 936, 696, 0 },
{ 19, CONDITION_ALWAYS, 440, 0, 448, FACING_NORTH, 0, 320, 312, 560, 504, 0 },
{ 20, CONDITION_ALWAYS, 696, 0, 824, FACING_NORTH, 0, 616, 744, 856, 952, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 3235 of file lunpa_fortress.c.

Referenced by Scene_GetEntrances().

◆ gLunpaFortressEntrances2

struct SceneEntrance gLunpaFortressEntrances2[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 168, 0, 632, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 136, 0, 392, FACING_SOUTH, 0, 40, 8, 308, 448, 0 },
{ 2, CONDITION_ALWAYS, 136, 0, 80, FACING_SOUTH, 0, 40, 8, 308, 448, 0 },
{ 3, CONDITION_ALWAYS, 264, 0, 416, FACING_SOUTH, 0, 40, 8, 308, 448, 0 },
{ 4, CONDITION_ALWAYS, 376, 0, 232, FACING_NORTH, 0, 328, 8, 568, 272, 0 },
{ 5, CONDITION_ALWAYS, 504, 0, 104, FACING_NORTH, 0, 328, 8, 568, 272, 0 },
{ 6, CONDITION_ALWAYS, 376, 0, 176, FACING_SOUTH, 0, 328, 8, 568, 272, 0 },
{ 7, CONDITION_ALWAYS, 408, 0, 456, FACING_NORTH, 0, 328, 272, 584, 512, 0 },
{ 8, CONDITION_ALWAYS, 456, 0, 352, FACING_SOUTH, 0, 328, 272, 584, 512, 0 },
{ 9, CONDITION_ALWAYS, 504, 0, 456, FACING_NORTH, 0, 328, 272, 584, 512, 0 },
{ 10, CONDITION_ALWAYS, 136, 0, 640, FACING_NORTH, 0, 16, 472, 256, 688, 0 },
{ 11, CONDITION_ALWAYS, 648, 0, 72, FACING_SOUTH, 0, 568, 16, 808, 176, 0 },
{ 12, CONDITION_ALWAYS, 744, 0, 80, FACING_SOUTH, 0, 568, 16, 808, 176, 0 },
{ 13, CONDITION_ALWAYS, 696, 0, 376, FACING_NORTH, 0, 576, 264, 816, 432, 0 },
{ 14, CONDITION_ALWAYS, 200, 0, 848, FACING_SOUTH, 0, 152, 680, 424, 992, 0 },
{ 15, CONDITION_ALWAYS, 264, 0, 776, FACING_SOUTH, 0, 152, 680, 424, 992, 0 },
{ 16, CONDITION_ALWAYS, 376, 0, 824, FACING_SOUTH, 0, 152, 680, 424, 992, 0 },
{ 17, CONDITION_ALWAYS, 536, 0, 696, FACING_NORTH, 0, 488, 584, 760, 896, 0 },
{ 18, CONDITION_ALWAYS, 680, 0, 832, FACING_SOUTH, 0, 488, 584, 760, 896, 0 },
{ 19, CONDITION_ALWAYS, 712, 0, 856, FACING_NORTH, 0, 488, 584, 760, 896, 0 },
{ 20, CONDITION_ALWAYS, 912, 0, 192, FACING_NORTH, 0, 784, 24, 1024, 240, 0 },
{ 21, CONDITION_ALWAYS, 840, 0, 664, FACING_NORTH, 0, 768, 440, 1008, 704, 0 },
{ 22, CONDITION_ALWAYS, 952, 0, 528, FACING_SOUTH, 0, 768, 440, 1008, 704, 0 },
{ 23, CONDITION_ALWAYS, 872, 0, 376, FACING_NORTH, 0, 768, 264, 1016, 432, 0 },
{ 24, CONDITION_ALWAYS, 904, 0, 112, FACING_SOUTH, 0, 784, 24, 1024, 240, 0 },
{ 30, CONDITION_ALWAYS, 408, 0, 456, FACING_NORTH, 0, 328, 272, 584, 512, 0 },
{ 31, CONDITION_ALWAYS, 648, 0, 88, FACING_NORTH, 0, 568, 16, 808, 176, 0 },
}

Definition at line 3260 of file lunpa_fortress.c.

Referenced by Scene_GetEntrances().

◆ gLunpaFortressEntrances3

struct SceneEntrance gLunpaFortressEntrances3[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 168, 0, 632, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 424, 0, 584, FACING_SOUTH, 0, 200, 488, 480, 648, 0 },
{ 2, CONDITION_ALWAYS, 344, 0, 568, FACING_SOUTH, 0, 200, 488, 480, 648, 0 },
{ 3, CONDITION_ALWAYS, 312, 0, 448, FACING_NORTH, 0, 8, 8, 568, 480, 0 },
{ 4, CONDITION_ALWAYS, 440, 0, 296, FACING_SOUTH, 0, 8, 8, 568, 480, 0 },
{ 5, CONDITION_ALWAYS, 312, 0, 248, FACING_SOUTH, 0, 8, 8, 568, 480, 0 },
{ 6, CONDITION_ALWAYS, 104, 0, 184, FACING_SOUTH, 0, 8, 8, 568, 480, 0 },
}

Definition at line 3291 of file lunpa_fortress.c.

Referenced by Scene_GetEntrances().

◆ gLunpaFortressEntrancesOther

struct SceneEntrance gLunpaFortressEntrancesOther[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 168, 0, 632, FACING_NORTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 56, 0, 328, FACING_NORTH, 0, 8, 8, 264, 424, 0 },
{ 2, CONDITION_ALWAYS, 184, 0, 368, FACING_NORTH, 0, 8, 8, 264, 424, 0 },
{ 3, CONDITION_ALWAYS, 328, 0, 344, FACING_SOUTH, 0, 288, 32, 576, 432, 0 },
{ 4, CONDITION_ALWAYS, 440, 0, 224, FACING_NORTH, 0, 288, 32, 576, 432, 0 },
}

Definition at line 3302 of file lunpa_fortress.c.

Referenced by Scene_GetEntrances().

◆ gLunpaFortressExitsOther

u32 gLunpaFortressExitsOther[]
Initial value:
= {
SCENE_EXIT(3, 99, 11),
SCENE_EXIT(8, 161, 1),
SCENE_EXIT(10, 161, 16),
SCENE_EXIT(11, 162, 1),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
@ SCENE_LUNPA_FORTRESS
Definition field_scene.h:21
@ SCENE_WEST_LUNPA_CAVE
Definition field_scene.h:19
@ SCENE_LUNPA
Definition field_scene.h:17
@ SCENE_WORLD_MAP
Definition field_scene.h:13
@ SCENE_LUNPA_FORTRESS_GATE
Definition field_scene.h:20
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77
@ EXIT_THROWN_OUT

Scenes 161 to 163 are the fortress's maps 2 to 4; field_scene.h has no names for them yet, nor for scene 99.

Definition at line 3313 of file lunpa_fortress.c.

Referenced by Scene_GetExits().

◆ gLunpaFortressExits2

u32 gLunpaFortressExits2[]
Initial value:
= {
SCENE_EXIT(2, 161, 4),
SCENE_EXIT(3, 161, 7),
SCENE_EXIT(4, 161, 2),
SCENE_EXIT(5, 161, 11),
SCENE_EXIT(6, 161, 13),
SCENE_EXIT(7, 161, 3),
SCENE_EXIT(8, 161, 10),
SCENE_EXIT(9, 161, 14),
SCENE_EXIT(10, 161, 8),
SCENE_EXIT(11, 161, 5),
SCENE_EXIT(12, 161, 17),
SCENE_EXIT(13, 161, 6),
SCENE_EXIT(14, 161, 9),
SCENE_EXIT(15, 161, 21),
SCENE_EXIT(17, 161, 12),
SCENE_EXIT(18, 161, 20),
SCENE_EXIT(19, 161, 22),
SCENE_EXIT(20, 161, 18),
SCENE_EXIT(21, 161, 15),
SCENE_EXIT(22, 161, 19),
SCENE_EXIT(23, 161, 24),
SCENE_EXIT(24, 161, 23),
}

Definition at line 3343 of file lunpa_fortress.c.

Referenced by Scene_GetExits().

◆ gLunpaFortressExits3And4

u32 gLunpaFortressExits3And4[]
Initial value:

Definition at line 3373 of file lunpa_fortress.c.

Referenced by Scene_GetExits().

◆ gLunpaFortressPlacementsOther

struct ScenePlacement gLunpaFortressPlacementsOther[]
Initial value:
= {
}

Definition at line 3391 of file lunpa_fortress.c.

Referenced by Scene_GetPlacements().

◆ gLunpaFortressPlacementsWestLunpaCave

struct ScenePlacement gLunpaFortressPlacementsWestLunpaCave[]
Initial value:

Definition at line 3395 of file lunpa_fortress.c.

Referenced by Scene_GetPlacements().

◆ gLunpaFortressPlacements1

struct ScenePlacement gLunpaFortressPlacements1[]

Definition at line 3417 of file lunpa_fortress.c.

Referenced by Scene_GetPlacements().

◆ gLunpaFortressPlacements2

struct ScenePlacement gLunpaFortressPlacements2[]

Definition at line 3449 of file lunpa_fortress.c.

Referenced by Scene_GetPlacements().

◆ gLunpaFortressPlacements3

struct ScenePlacement gLunpaFortressPlacements3[]
Initial value:

Definition at line 3491 of file lunpa_fortress.c.

Referenced by Scene_GetPlacements().

◆ gLunpaFortressPlacements4

◆ gLunpaFortressNoEvents

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

Definition at line 3535 of file lunpa_fortress.c.

◆ gLunpaFortressEvents1

struct SceneEvent gLunpaFortressEvents1[]

Definition at line 3539 of file lunpa_fortress.c.

Referenced by Scene_GetEvents().

◆ gLunpaFortressEvents2

struct SceneEvent gLunpaFortressEvents2[]

Definition at line 3593 of file lunpa_fortress.c.

Referenced by Scene_GetEvents().

◆ gLunpaFortressEvents3

struct SceneEvent gLunpaFortressEvents3[]
Initial value:
= {
{ 0x21, 1, CONDITION_ALWAYS, 1 },
{ 0x31, 6, CONDITION_ALWAYS, 6 },
}
@ ABILITY_REVEAL
Definition ability_ids.h:19
@ ABILITY_MOVE
Definition ability_ids.h:15
@ ABILITY_WHIRLWIND
Definition ability_ids.h:13
@ EVENT_EXIT
#define PSYNERGY_IN_AREA(ability, phase)
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
#define TOUCH_FACING(facing)
#define TOUCH_WALKING
@ SEARCH_UNNAMED
#define FLAG_LUNPA_FORTRESS_COLUMN_LOWERED
Definition flags.h:299
#define FLAG_SCENE_TEMP_17
Definition flags.h:736
#define FLAG_SCENE_TEMP_18
Definition flags.h:737
static void Event_UnlockColumnRoomDoor(void)
Facing a column room cell door with the Cell Key: it opens with a rumble.
static void Event_FlipFirstSwitch(void)
Searching the first switch while Reveal shows it flips it, and its passage opens.
static void Event_PushColumn(void)
Pushing the column: it slides one cell along.
@ TRIGGER_LOCKED_DOOR
@ TRIGGER_SEALED_DOOR
@ DOOR_TRIGGER_FIRST
static void Event_RevealSwitches(void)
Reveal: both switches show and can be searched.
static void Event_FlipSecondSwitch(void)
Searching the second switch while Reveal shows it flips it, and its passage opens.
@ COLUMN_ROOM_DOOR_FLAG
static void Event_HideSwitches(void)
Reveal's end: both switches hide again.
static void Event_BlowAwaySecondSwitchCover(void)
Whirlwind on what hides the second switch: it blows away.
static void Event_BlowAwayPassageCover(void)
Whirlwind on what hides the passage: it blows away and the passage opens.
static void Event_BlowAwayFirstSwitchCover(void)
Whirlwind on what hides the first switch: it blows away.
@ COLUMN_ROOM_SECOND_SWITCH_COVER
@ COLUMN_ROOM_COLUMN
@ COLUMN_ROOM_FIRST_SWITCH_COVER
@ COLUMN_ROOM_PASSAGE_COVER
static void Event_SearchSealedDoor(void)
Searching the door no key opens.
static void Event_SearchLockedDoor(void)
Searching a cell door without the Cell Key: it stays shut.
static void Event_MoveColumn(void)
Move on the column: once it is past row 22, over its hole, the room shakes and it sinks.
static void Event_ColumnSinks(void)
The column, pushed onto its hole, slides in and sinks.
@ REVEAL_SHOWN
Definition lunpa.h:143
@ REVEAL_FADED
Definition lunpa.h:143

Definition at line 3656 of file lunpa_fortress.c.

Referenced by Scene_GetEvents().

◆ gLunpaFortressEventsOther

struct SceneEvent gLunpaFortressEventsOther[]
Initial value:
= {
{ 0x21, 5, CONDITION_ALWAYS, 5 },
{ EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgLunpaHammetStillInside) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 16, CONDITION_ALWAYS, MSGNO(MsgLunpaDodonpaSecretlyInside) },
{ EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgLunpaWrongTurnOver) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgLunpaCantBelieveWhen) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_TALK
@ SEARCH_CHEST
#define FLAG_SCENE_TEMP_70
Definition flags.h:825
#define FLAG_LUNPA_FORTRESS_CHEST_POWER_BREAD
Definition flags.h:318
@ ITEM_POWER_BREAD
Definition item_ids.h:50
static void Event_UnlockRescueRoomDoor(void)
Facing a rescue room cell door with the Cell Key: it opens with a rumble.
@ RESCUE_DOOR_FLAG
static void Event_TalkToJailedDodonpa(void)
Dodonpa behind bars begs his father's forgiveness; with the Cell Key, a further line shows.
static void Event_FindHammet(void)
Walking into Hammet's cell.
static void Event_ReadJailedDodonpasThoughts(void)
Mind Read on the jailed Dodonpa.

Definition at line 3682 of file lunpa_fortress.c.

Referenced by Scene_GetEvents().

◆ gRescueRoomDoorCells

u32 gRescueRoomDoorCells[]
Initial value:
= {
13, 56, 8, 56, 3, 56, 28, 85,
28, 65,
}

Definition at line 3703 of file lunpa_fortress.c.

Referenced by LunpaFortress_OpenRescueRoomDoor().

◆ gColumnRoomDoorCells

u32 gColumnRoomDoorCells[]
Initial value:
= {
31, 61, 15, 57, 6, 61,
}

Definition at line 3708 of file lunpa_fortress.c.

Referenced by LunpaFortress_OpenColumnRoomDoor().

◆ gGuardRoomDoorCells

u32 gGuardRoomDoorCells[]
Initial value:
= {
16, 119, 16, 113,
}

Definition at line 3712 of file lunpa_fortress.c.

Referenced by LunpaFortress_OpenGuardRoomDoor().

◆ gOuterDoorCells

u32 gOuterDoorCells[]
Initial value:
= {
28, 72, 43, 92,
}

Definition at line 3716 of file lunpa_fortress.c.

Referenced by LunpaFortress_OpenOuterDoor().