src/scene/lunpa.c
Lunpa, the town the righteous thief Lunpa founded, and the Lunpa Fortress Gates above it. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "macros.h"#include "sounds.h"#include "field/field_effect.h"#include "scene/floating_nut.h"#include "scene/catch_nut.h"#include "game/system_call.h"#include "text/msg_ids.h"#include "shared/field_effect_create.c"#include "shared/field_effect_spawn.c"#include "shared/field_effect_duration_scripts.c"#include "shared/floating_nut.c"
Macros
| Name | Description | |
|---|---|---|
#define | ROOM_ENTRANCE (exit) ((exit) - LUNPA_FIRST_HOME + ROOM_ENTRANCE_FIRST) | The RockRooms entrance a door's exit leads to. |
#define | FLAG_LUNPA_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00) | Frost has frozen the hidden puddle into an ice pillar to stand on. |
#define | FLAG_LUNPA_SECRETS_HIDDEN FLAG_SCENE_TEMP(0x01) | The town's secrets are hidden: Reveal is not shining. |
#define | FLAG_LUNPA_HIDDEN_PASSAGE_OPEN FLAG_SCENE_TEMP(0x02) | The hidden switch has opened the passage to the hidden room. |
#define | FLAG_LUNPA_FORTRESS_GATES_GUARDS_AT_DOOR FLAG_SCENE_TEMP(0x40) | The guards have stepped in front of the fortress door. |
#define | FLAG_LUNPA_FORTRESS_GATES_CLOAK_CAST FLAG_SCENE_TEMP(0x41) | Cloak has been cast at the gates and has not yet faded. |
#define | FLAG_LUNPA_FORTRESS_GATES_ENTERING_FORTRESS FLAG_SCENE_TEMP(0x42) | The leader is going through the fortress door. |
#define | FLAG_LUNPA_FORTRESS_GATES_GARET_WARNING FLAG_SCENE_TEMP(0x43) | Garet's warning against going back up to the fortress is under way. |
#define | FLAG_LUNPA_FORTRESS_GATES_GUARDS_CAUGHT_PARTY FLAG_SCENE_TEMP(0x44) | The guards have caught the party and are marching it down the steps. |
#define | LUNPA_ENTRANCE (entrance, x, z, facing) | An entrance of the town, with its camera free, and of the Lunpa Fortress Gates, its camera kept in their bounds. |
#define | GATE_ENTRANCE (entrance, x, z, facing) | |
#define | ROOM_EXIT (exit) SCENE_EXIT((exit), RockRooms, ROOM_ENTRANCE(exit)) | A door's exit into its room of RockRooms. |
#define | TALK (actorId, value) {CUE_TALK, (actorId), CONDITION_ALWAYS, (va … | A cue for talking to an actor, for Mind Read on it, and for walking north into a door. |
#define | MIND_READ (actorId, value) | |
#define | DOOR (cue) | |
#define | LUNPA_ROADS_AND_DOORS | The roads out of town and the doors, which every one of the town's cue tables holds. |
#define | LUNPA_SECRETS_AND_SEARCHES | The hidden puddle, what Reveal shows, the grave, barrel and well to search and the Nut to Catch, which the town's cue tables share. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { GATE_EXIT_THIRD } | Unused: the exit of a third road out of the gates (METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_THIRD_ROAD), which no metatile of the gates' map has. |
enum | anonymous enum { ROOM_ENTRANCE_FIRST } | The first of the rooms in RockRooms that Lunpa's doors lead into. |
enum | LUNPA_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LUNPA_WORLD_MAP_ROAD, METATILE_BEHAVIOR_LU … } | The metatile behaviors Lunpa's cues answer. |
enum | LUNPA_FORTRESS_GATES_METATILE_BEHAVIOR { METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_FORTRESS_DOOR, METATI … } | The metatile behaviors the Lunpa Fortress Gates' cues answer. |
enum | LUNPA_FORTRESS_GATES_RAISED_CUE { RAISED_PARTY_SPOTTED } | The script the gates' guards raise on spotting the uncloaked party. |
enum | anonymous enum { DOOR_COUNT, DOOR_TEMPLE } | Lunpa's doors that open as the leader walks in (LunpaDoors), counted from the first home's; at the temple's he goes through without first stepping into the doorway. |
enum | LUNPA_ACTOR_ID { ACTOR_HIDDEN_PUDDLE, ACTOR_MAN_ASKING_HOW_LONG_IN_LUNPA, ACT … } | Lunpa's placed actors, numbered in the order of LunpaActorPlacements from ACTOR_FIRST_PLACED. |
enum | GATE_ACTOR_ID { ACTOR_LEFT_GUARD, ACTOR_RIGHT_GUARD } | The Lunpa Fortress Gates' placed actors, numbered in the order of LunpaFortressGatesActorPlacements from ACTOR_FIRST_PLACED. |
enum | anonymous enum { SPARKLE_SCALE_X, SPARKLE_SCALE_Y } | How the switch's sparkle is stretched while Reveal shows it. |
enum | anonymous enum { GATE_RETREAT_ENTRANCE } | Where Retreat at the gates sends the party (MAIN_ROUTINE_STATE.retreatEntrance). |
enum | CATCH_MESSAGE { CATCH_LEFT_GUARD_CHALLENGES, CATCH_RIGHT_GUARD_WONDERS, CATC … } | The gate guards' lines when they catch the party uncloaked, in order. |
enum | RECOGNITION_MESSAGE { RECOGNITION_SEEN_THAT_MAN, RECOGNITION_IMPOSSIBLE } | The left guard's two lines once he has seen Hammet with the party. |
enum | anonymous enum { ANIM_SPRAWLED } | The leader lying where the guards threw him down the steps. |
enum | anonymous enum { PILLAR_TOP_HEIGHT, METATILE_SIZE } | How high the ice pillar's top is, and a metatile: 16 pixels each. |
enum | anonymous enum { TREASURE_SPOT_PSYNERGY_STONE } | The treasure spot of the town's Psynergy Stone. |
enum | anonymous enum { PALETTE_TRANSLUCENT_EFFECT, PALETTE_EFFECT } | Unused: nothing in the scene reads them. |
Functions
| Name | Description | |
|---|---|---|
static void | scLunpaWatchForUncloakedParty (void) | Every tick at the Lunpa Fortress Gates: an uncloaked Isaac in the gap of the upper palisade is spotted by the guards. |
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 townsfolk of Lunpa, or the guards of the Lunpa Fortress Gates. |
static void | scLunpaCatchFloatingNut (void) | Catch on the Nut in the tree just west of Lunpa's shut south gate, outside the palisade, brings it down to Isaac. |
static inline void | scLunpaApplyFrozenPuddleCollision (void) | Makes the frozen puddle's metatile, (14, 4), and the metatiles either side of it into the ice pillar's top and sides, from copies kept at (17, 4) and (15, 3). |
static void | scLunpaFreezeHiddenPuddle (void) | Frost on the blue puddle that Reveal shows between the two log pillars at the top of Lunpa (metatile (14, 4)) freezes it into an ice pillar to stand on. |
static void | scLunpaUpdateIcePillarDrawOrder (void) | Every tick while Reveal shows the puddle: once Isaac is up on the ice pillar, it is drawn under him. |
static inline void | scLunpaDrawHiddenPassagePicture (Sint32 srcColumn, Sint32 srcRow) | Draws one picture of the hidden passage's cave mouth in the cliff at the west edge of town, from a set of copies kept at (srcColumn, srcRow). |
static void | scLunpaRevealSecrets (void) | Casting Reveal in Lunpa turns the town grey and shows its secrets: the blue puddle between the log pillars at the top of town, the sparkle of the hidden switch on the west cliff (or, once it has been pressed, the cave mouth it opened), and the Psynergy Stone's spot at metatile (7, 16). |
static void | scLunpaHideSecrets (void) | As Reveal ends, and on every arrival in Lunpa, the puddle, the sparkle, the cave mouth and the Psynergy Stone's spot are hidden again, and a frozen puddle thaws. |
static void | scLunpaSearchWell (void) | Searching the well in the middle of Lunpa (metatiles (16, 13) to (17, 14)), Isaac peers in and hears frogs inside. |
const CUE * | scGetCues (void) | The cues of the Lunpa Fortress Gates, or the town's before and after Donpa's judgment. |
static void | scLunpaTalkToWestGuard (void) | Before Donpa's judgment, the guard on the left of Lunpa's shut south gate winces and asks whether the party wants to enter Lunpa, and sends them back where they came from whatever they answer. |
static void | scLunpaTalkToEastGuard (void) | Before Donpa's judgment, the guard on the right of Lunpa's shut south gate says no one may enter without Dodonpa's authorization. |
static void | scLunpaReadEastGuardsThoughts (void) | Mind Read on the guard on the right of Lunpa's south gate. |
static void | scLunpaAskAboutLengthOfStay (void) | Before Donpa's judgment, a young man with brown hair near the inn asks whether the party has been in Lunpa long, and takes a No to mean they are new members of Dodonpa's gang. |
static void | scLunpaAskAboutHammetsKidnapping (void) | Before Donpa's judgment, a stout man in Lunpa asks whether it is true that Dodonpa kidnapped Hammet and extorted ransom for him. |
static void | scLunpaAskAboutSeeingDonpa (void) | Before Donpa's judgment, a small boy at the top of Lunpa asks whether the party wants to see Donpa: he is in the fortress, or, on a No, impossible to see now. |
static void | scLunpaComplainAboutCold (void) | After Donpa's judgment, a woman with fair hair in Lunpa shivers and complains that it has gotten colder. |
static void | scLunpaAskAboutFortressCommotion (void) | After Donpa's judgment, a woman in a green dress in Lunpa offers to tell what caused the commotion at the fortress: someone snuck in to save Hammet and ran away. |
static void | scLunpaTalkToLeftGuard (void) | Talking to the left guard at the Lunpa Fortress Gates under Cloak, he could swear he just heard someone. |
static void | scLunpaTalkToRightGuard (void) | Talking to the right guard at the Lunpa Fortress Gates, he boasts that not even a mouse could get in while he is on watch. |
static void | scLunpaReadLeftGuardsThoughts (void) | Mind Read on the left guard at the Lunpa Fortress Gates: he thinks keeping Hammet to squeeze money out of Kalay is genius. |
static void | scLunpaReadRightGuardsThoughts (void) | Mind Read on the right guard at the Lunpa Fortress Gates: you would have to be a shadow to sneak past him. |
static void | scLunpaWatchForFortressApproach (void) | Every tick at the Lunpa Fortress Gates between Donpa's judgment and the meeting with Bunza: Isaac stepping into the upper palisade's gap (map row 10) raises Garet's warning, scLunpaGaretTurnsIsaacBack. |
static void | scLunpaGaretTurnsIsaacBack (void) | After Donpa's judgment, walking up into the gap in the upper palisade at the Lunpa Fortress Gates, Garet reminds Isaac they can't go in there, and Isaac winces and steps back. |
static void | scLunpaEnterDoor (void) | Walking north into one of Lunpa's doors, it swings open and Isaac goes through into the home, shop, inn, temple or crate room behind it. |
static void | scLunpaEnterHiddenPassage (void) | Walking north into the cave mouth the hidden switch opened in Lunpa's west cliff, metatile (2, 19), takes Isaac into Lunpa's hidden room. |
static void | scLunpaEnterFortress (void) | Walking up to the golden door in the cliff at the top of the Lunpa Fortress Gates, metatiles (9, 5) and (10, 5), it opens and Isaac goes into Lunpa Fortress. |
static void | scLunpaTryJumpForward (void) | Unused: jumps Isaac forward. |
static void | scLunpaPlayRevealSound (void) | Unused: plays the treasure jingle while Reveal is shining. |
static void | scLunpaPressHiddenSwitch (void) | Searching the sparkle Reveal shows on Lunpa's west cliff, from metatile (3, 18) below it, makes the rock crumble away into a dark cave mouth, the passage to Lunpa's hidden room. |
static inline void | scLunpaCopyGatewayCollision (Sint32 srcColumn, Sint32 srcRow) | Copies the metatile at (srcColumn, srcRow) over the three metatiles (7, 11) to (9, 11) at the Lunpa Fortress Gates, just below the west half of the upper palisade. |
static void | scLunpaGuardsBlockGate (void) | |
static void | scLunpaNoOperation (void) | Unused: does nothing, and nothing calls it. |
static void | scLunpaCastCloak (void) | Casting Cloak at the Lunpa Fortress Gates rewrites the three metatiles (7, 11) to (9, 11) from the one at (6, 11); scLunpaCloakFades puts them back. |
static void | scLunpaGuardsCatchParty (void) | When the guards at the Lunpa Fortress Gates spot the party, they turn and shout who are you, wonder how anyone got past them, and march Isaac back out through the gap in the lower palisade. |
static void | scLunpaReopenGateway (void) | Puts back the three metatiles (7, 11) to (9, 11) that Cloak and the guards at the door rewrite, from the metatile at (7, 12). |
static void | scLunpaCloakFades (void) | As Cloak fades at the Lunpa Fortress Gates, a party still in the yard between the palisades is caught by the guards. |
static void | scLunpaKickUpLeaderDust (void) | Every 16 ticks while Isaac is dragged and thrown: a puff of dust at his feet. |
static void | scLunpaGuardsThrowIsaacOut (void) | Caught inside Lunpa Fortress, Isaac is dragged out of the door by the two guards, struggling, down through both palisades, and thrown sprawling onto the slope below. |
static void | scLunpaLeaderSneaksOut (void) | After the rescue, Isaac comes out of the fortress door, casts Cloak in the upper palisade's gap and slips round behind the guards, west along the palisade and down the west side of the slope. |
Sint32 | scInit (void) | Sets up Lunpa (secrets hidden, the Nut in its tree) or the Lunpa Fortress Gates (the throw-out or the sneak-out, Garet's watch, the guards' watch and the fortress started over). |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_ENTRANCE | LunpaEntrances [] | |
extern SCENE_ENTRANCE | LunpaFortressGatesEntrances [] | |
extern Uint32 | LunpaExits [] | |
extern Uint32 | LunpaFortressGatesExits [] | |
extern ACTOR_PLACE | LunpaActorPlacements [] | |
extern ACTOR_PLACE | LunpaFortressGatesActorPlacements [] | |
extern CUE | LunpaSealedCues [] | |
extern CUE | LunpaReopenedCues [] | |
extern CUE | LunpaFortressGatesCues [] | |
extern MAP_EDIT | LunpaDoors [] | Each door's opening animation and the map grid metatile it plays at, by its step cue from METATILE_BEHAVIOR_LUNPA_FIRST_HOME_DOOR. |
const Sint32 * | FieldEffectDurationScripts [] | The resident copy of the scripts EFFECT_SCRIPT_MASK picks, by enum EFFECT_DURATION. |
Uint16 | LunpaDoorSteps [DOOR_COUNT][11] | Each door's opening, as a map grid animation. |
Uint32 | LunpaUnusedWord | Unused: a zero word nothing reads. |
Description
Lunpa, the town the righteous thief Lunpa founded, and the Lunpa Fortress Gates above it. While Dodonpa, Donpa's son, holds Hammet in Lunpa Fortress, his men keep the town sealed: two guards stand outside the shut gate in the log palisade at the south end, where the road from the World Map ends, and turn the party away. The way in is through West Lunpa Cave, whose gate Frost opens; it comes out at the cave mouth in the town's north-west cliff (metatile (7, 4)).
Two areas share this overlay, each a scene of its own:
- Lunpa (
SceneIdLunpa): the town. Doors lead into three homes, the weapon and armor shop, the item shop, the inn, the temple and the crate room (RockRooms,rock_rooms.c). The road out of the top of the town (metatiles (13, 0) to (16, 0)) climbs to the Lunpa Fortress Gates. - Lunpa Fortress Gates (
SceneIdLunpaFortressGates): the slope up to the golden fortress door in the cliff. Two log palisades cross it, each with a gap in the middle, and two guards stand in the yard between them, just below the upper gap. The party slips past them under Cloak.
The getters choose by MainRoutineStateWork.next. The town's cues also choose
by FLAG_DODONPA_LOCKED_UP, which Donpa's judgment in the fortress sets.
Before it the townspeople live under Dodonpa's men (LunpaSealedCues). After
it they talk of the intruders in the fortress (LunpaReopenedCues). Both
tables share the roads and doors (LUNPA_ROADS_AND_DOORS), and Reveal's
secrets and the spots to search (LUNPA_SECRETS_AND_SEARCHES).
Reveal turns the town grey and shows three secrets (scLunpaRevealSecrets): a
blue puddle between the two log pillars below the road to the gates, which
Frost freezes into an ice pillar; a sparkle on the cliff at the west edge of
town (metatile (3, 16)), the switch that opens the passage to Lunpa's hidden
room, searched from metatile (3, 18) below it; and a Psynergy Stone, found by
searching metatile (7, 16), south of the inn. Every entry and the end of
Reveal hide them again (scLunpaHideSecrets). Searching the sparkle opens a
dark cave mouth in the cliff beside it, and the passage can be walked into
only while Reveal shows it (scLunpaEnterHiddenPassage). The room beyond
(StoneRooms) holds six chests.
At the gates, walking uncloaked into the yard before the guards
(METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_GUARDED_GROUND) makes them step into
the upper gap and warn the party off. An uncloaked leader in that gap, or one
still in the yard as Cloak fades, is caught and marched back down through the
lower palisade (scLunpaGuardsCatchParty).
A party caught inside the fortress is thrown out by the guards and down the
slope (scLunpaGuardsThrowIsaacOut). After the rescue it comes out of the
fortress door and Isaac sneaks past the guards under Cloak
(scLunpaLeaderSneaksOut).
Every arrival at the gates clears the fortress's puzzle and beaten-guard flags, so the fortress starts over.
Between Donpa's judgment and the meeting with Bunza outside West Lunpa Cave
(FLAG_LUNPA_CAVE_REUNION_SEEN), Garet stops Isaac from going back up through
the upper gap (scLunpaGaretTurnsIsaacBack).
Macros in detail
ROOM_ENTRANCE
#define ROOM_ENTRANCE(exit) ((exit) - LUNPA_FIRST_HOME + ROOM_ENTRANCE_FIRST)
The RockRooms entrance a door's exit leads to.
Definition at line 96 of file lunpa.c.
FLAG_LUNPA_PUDDLE_FROZEN
#define FLAG_LUNPA_PUDDLE_FROZEN FLAG_SCENE_TEMP(0x00)
Frost has frozen the hidden puddle into an ice pillar to stand on.
Referenced by scLunpaFreezeHiddenPuddle(), scLunpaHideSecrets() and scLunpaRevealSecrets().
Definition at line 264 of file lunpa.c.
FLAG_LUNPA_SECRETS_HIDDEN
#define FLAG_LUNPA_SECRETS_HIDDEN FLAG_SCENE_TEMP(0x01)
The town's secrets are hidden: Reveal is not shining.
Referenced by scInit(), scLunpaEnterHiddenPassage(), scLunpaHideSecrets(), scLunpaPlayRevealSound(), scLunpaPressHiddenSwitch() and scLunpaRevealSecrets().
Definition at line 266 of file lunpa.c.
FLAG_LUNPA_HIDDEN_PASSAGE_OPEN
#define FLAG_LUNPA_HIDDEN_PASSAGE_OPEN FLAG_SCENE_TEMP(0x02)
The hidden switch has opened the passage to the hidden room.
Referenced by scLunpaEnterHiddenPassage(), scLunpaPressHiddenSwitch() and scLunpaRevealSecrets().
Definition at line 268 of file lunpa.c.
FLAG_LUNPA_FORTRESS_GATES_GUARDS_AT_DOOR
#define FLAG_LUNPA_FORTRESS_GATES_GUARDS_AT_DOOR FLAG_SCENE_TEMP(0x40)
The guards have stepped in front of the fortress door.
Referenced by LunpaFortressGatesCues, scLunpaCloakFades() and scLunpaGuardsBlockGate().
Definition at line 270 of file lunpa.c.
FLAG_LUNPA_FORTRESS_GATES_CLOAK_CAST
#define FLAG_LUNPA_FORTRESS_GATES_CLOAK_CAST FLAG_SCENE_TEMP(0x41)
Cloak has been cast at the gates and has not yet faded.
Referenced by scLunpaCastCloak() and scLunpaCloakFades().
Definition at line 272 of file lunpa.c.
FLAG_LUNPA_FORTRESS_GATES_ENTERING_FORTRESS
#define FLAG_LUNPA_FORTRESS_GATES_ENTERING_FORTRESS FLAG_SCENE_TEMP(0x42)
The leader is going through the fortress door.
Referenced by LunpaFortressGatesCues and scLunpaEnterFortress().
Definition at line 274 of file lunpa.c.
FLAG_LUNPA_FORTRESS_GATES_GARET_WARNING
#define FLAG_LUNPA_FORTRESS_GATES_GARET_WARNING FLAG_SCENE_TEMP(0x43)
Garet's warning against going back up to the fortress is under way.
Referenced by scLunpaGaretTurnsIsaacBack() and scLunpaWatchForFortressApproach().
Definition at line 276 of file lunpa.c.
FLAG_LUNPA_FORTRESS_GATES_GUARDS_CAUGHT_PARTY
#define FLAG_LUNPA_FORTRESS_GATES_GUARDS_CAUGHT_PARTY FLAG_SCENE_TEMP(0x44)
The guards have caught the party and are marching it down the steps.
Referenced by scLunpaCloakFades() and scLunpaGuardsCatchParty().
Definition at line 278 of file lunpa.c.
LUNPA_ENTRANCE
#define LUNPA_ENTRANCE(entrance, x, z, facing)
An entrance of the town, with its camera free, and of the Lunpa Fortress Gates, its camera kept in their bounds.
Referenced by LunpaEntrances.
Definition at line 1353 of file lunpa.c.
GATE_ENTRANCE
#define GATE_ENTRANCE(entrance, x, z, facing)
Referenced by LunpaFortressGatesEntrances.
Definition at line 1355 of file lunpa.c.
ROOM_EXIT
#define ROOM_EXIT(exit) SCENE_EXIT((exit), RockRooms, ROOM_ENTRANCE(exit))
A door's exit into its room of RockRooms.
Referenced by LunpaExits.
Definition at line 1402 of file lunpa.c.
TALK
#define TALK(actorId, value) {CUE_TALK, (actorId), CONDITION_ALWAYS, (value)}
A cue for talking to an actor, for Mind Read on it, and for walking north into a door.
Referenced by LunpaFortressGatesCues, LunpaReopenedCues and LunpaSealedCues.
Definition at line 1476 of file lunpa.c.
MIND_READ
#define MIND_READ(actorId, value)
Referenced by LunpaFortressGatesCues, LunpaReopenedCues and LunpaSealedCues.
Definition at line 1477 of file lunpa.c.
DOOR
#define DOOR(cue)
Definition at line 1479 of file lunpa.c.
LUNPA_ROADS_AND_DOORS
#define LUNPA_ROADS_AND_DOORS
The roads out of town and the doors, which every one of the town's cue tables holds.
Referenced by LunpaReopenedCues and LunpaSealedCues.
Definition at line 1487 of file lunpa.c.
LUNPA_SECRETS_AND_SEARCHES
#define LUNPA_SECRETS_AND_SEARCHES
The hidden puddle, what Reveal shows, the grave, barrel and well to search and the Nut to Catch, which the town's cue tables share.
Referenced by LunpaReopenedCues and LunpaSealedCues.
Definition at line 1505 of file lunpa.c.
Enumerations in detail
anonymous enum
enum { GATE_EXIT_THIRD }
Unused: the exit of a third road out of the gates
(METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_THIRD_ROAD), which no metatile of the
gates' map has. LunpaFortressGatesExits has no row for it either: gmTakeExit,
reaching the end of the gates' exits, would fall back to the script of their
first exit at ENTRANCE_DEFAULT, LunpaFortressGroundFloor's default entrance.
| Enumerator | Value | Description |
|---|---|---|
GATE_EXIT_THIRD | 3 |
Definition at line 84 of file lunpa.c.
anonymous enum
enum { ROOM_ENTRANCE_FIRST }
The first of the rooms in RockRooms that Lunpa's doors lead into.
| Enumerator | Value | Description |
|---|---|---|
ROOM_ENTRANCE_FIRST | 1 |
Definition at line 90 of file lunpa.c.
LUNPA_METATILE_BEHAVIOR
enum LUNPA_METATILE_BEHAVIOR
The metatile behaviors Lunpa's cues answer.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_LUNPA_WORLD_MAP_ROAD | 1 | |
METATILE_BEHAVIOR_LUNPA_GATE_ROAD | ||
METATILE_BEHAVIOR_LUNPA_CAVE_ROAD | ||
METATILE_BEHAVIOR_LUNPA_FIRST_HOME_DOOR | ||
METATILE_BEHAVIOR_LUNPA_SECOND_HOME_DOOR | ||
METATILE_BEHAVIOR_LUNPA_THIRD_HOME_DOOR | ||
METATILE_BEHAVIOR_LUNPA_ARMS_SHOP_DOOR | ||
METATILE_BEHAVIOR_LUNPA_ITEM_SHOP_DOOR | ||
METATILE_BEHAVIOR_LUNPA_INN_DOOR | ||
METATILE_BEHAVIOR_LUNPA_TEMPLE_DOOR | ||
METATILE_BEHAVIOR_LUNPA_CRATE_ROOM_DOOR | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_PASSAGE | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_SWITCH | 20 | |
METATILE_BEHAVIOR_LUNPA_WELL | 90 | |
METATILE_BEHAVIOR_LUNPA_GRAVE_SLEEP_BOMB | 100 | |
METATILE_BEHAVIOR_LUNPA_BARREL_NUT | ||
METATILE_BEHAVIOR_LUNPA_PSYNERGY_STONE |
Definition at line 99 of file lunpa.c.
LUNPA_FORTRESS_GATES_METATILE_BEHAVIOR
enum LUNPA_FORTRESS_GATES_METATILE_BEHAVIOR
The metatile behaviors the Lunpa Fortress Gates' cues answer. The gates' map
has no metatile of the third road, the fortress approach or the well: the
approach is raised by scLunpaWatchForFortressApproach instead, and the other
two rows never fire.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_FORTRESS_DOOR | 1 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_LUNPA_ROAD | ||
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_THIRD_ROAD | ||
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_GUARDED_GROUND | 10 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_FORTRESS_APPROACH | 20 | |
METATILE_BEHAVIOR_LUNPA_FORTRESS_GATES_WELL | 90 |
Definition at line 124 of file lunpa.c.
LUNPA_FORTRESS_GATES_RAISED_CUE
enum LUNPA_FORTRESS_GATES_RAISED_CUE
The script the gates' guards raise on spotting the uncloaked party.
| Enumerator | Value | Description |
|---|---|---|
RAISED_PARTY_SPOTTED | 91 |
Definition at line 135 of file lunpa.c.
anonymous enum
enum { DOOR_COUNT, DOOR_TEMPLE }
Lunpa's doors that open as the leader walks in (LunpaDoors), counted from the
first home's; at the temple's he goes through without first stepping into the
doorway.
| Enumerator | Value | Description |
|---|---|---|
DOOR_COUNT | 8 | |
DOOR_TEMPLE | METATILE_BEHAVIOR_LUNPA_TEMPLE_DOOR - METATILE_BEHAVIOR_LUNPA_FIRST_HOME_DOOR |
Definition at line 143 of file lunpa.c.
LUNPA_ACTOR_ID
enum LUNPA_ACTOR_ID
Lunpa's placed actors, numbered in the order of LunpaActorPlacements from
ACTOR_FIRST_PLACED. The townspeople are named by their sprites and by what
they say before Donpa's judgment.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_HIDDEN_PUDDLE | ACTOR_FIRST_PLACED | The blue puddle Reveal shows and Frost freezes into an ice pillar. |
ACTOR_MAN_ASKING_HOW_LONG_IN_LUNPA | A man with brown hair | |
ACTOR_WOMAN_WITH_NO_FREEDOM | (SPRITE_YOUNG_MAN_WITH_BROWN_HAIR). A woman with fair hair in a white apron (SPRITE_WOMAN_WITH_FAIR_HAIR). | |
ACTOR_MAN_ON_HAMMETS_KIDNAPPING | A stout man with brown hair (SPRITE_STOUT_MAN). | |
ACTOR_WOMAN_SAYING_DONPA_IS_TOO_OLD | A woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS). | |
ACTOR_OLD_MAN_ON_LUNPA_AND_DONPA | A bent old man with a cane (SPRITE_OLD_MAN_WITH_CANE), who wanders. | |
ACTOR_OLD_WOMAN_ON_DONPA | An old woman with white hair (SPRITE_OLD_WOMAN). | |
ACTOR_BOY_ASKING_TO_SEE_DONPA | A small boy with fair hair (SPRITE_BOY_WITH_FAIR_HAIR). | |
ACTOR_GIRL_ON_THE_CHEFS_MEALS | A little girl with orange pigtails (SPRITE_GIRL_WITH_PIGTAILS), who wanders. | |
ACTOR_WEST_GUARD | The two soldiers in spiked helmets (SPRITE_SOLDIER_IN_SPIKED_HELMET); this one keeps the road in from the World Map. | |
ACTOR_EAST_GUARD | Wants Dodonpa's authorization. | |
ACTOR_SWITCH_SPARKLE | The hidden switch's sparkle, shown by Reveal. | |
ACTOR_FLOATING_NUT | The Nut that floats over the town, for Catch. |
Definition at line 153 of file lunpa.c.
GATE_ACTOR_ID
enum GATE_ACTOR_ID
The Lunpa Fortress Gates' placed actors, numbered in the order of
LunpaFortressGatesActorPlacements from ACTOR_FIRST_PLACED. Garet's row, the
third, takes his own actor, GARET, as every row of a party member's sprite
does.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_LEFT_GUARD | ACTOR_FIRST_PLACED | |
ACTOR_RIGHT_GUARD |
Definition at line 191 of file lunpa.c.
anonymous enum
enum { SPARKLE_SCALE_X, SPARKLE_SCALE_Y }
How the switch's sparkle is stretched while Reveal shows it.
| Enumerator | Value | Description |
|---|---|---|
SPARKLE_SCALE_X | toFIXED(6) / 5 | |
SPARKLE_SCALE_Y | toFIXED(3) / 2 |
Definition at line 198 of file lunpa.c.
anonymous enum
enum { GATE_RETREAT_ENTRANCE }
Where Retreat at the gates sends the party
(MAIN_ROUTINE_STATE.retreatEntrance). The gates are an area of their own, so
Retreat leads back into them, and they have no entrance 10: the party lands
at their first entrance, at the foot of the slope where the road from town
comes in.
| Enumerator | Value | Description |
|---|---|---|
GATE_RETREAT_ENTRANCE | 10 |
Definition at line 209 of file lunpa.c.
CATCH_MESSAGE
enum CATCH_MESSAGE
The gate guards' lines when they catch the party uncloaked, in order.
| Enumerator | Value | Description |
|---|---|---|
CATCH_LEFT_GUARD_CHALLENGES | ||
CATCH_RIGHT_GUARD_WONDERS | ||
CATCH_LEFT_GUARD_REFUSES_ENTRY | ||
CATCH_RIGHT_GUARD_SENDS_PARTY_OFF |
Definition at line 215 of file lunpa.c.
RECOGNITION_MESSAGE
enum RECOGNITION_MESSAGE
The left guard's two lines once he has seen Hammet with the party.
| Enumerator | Value | Description |
|---|---|---|
RECOGNITION_SEEN_THAT_MAN | ||
RECOGNITION_IMPOSSIBLE |
Definition at line 224 of file lunpa.c.
anonymous enum
enum { ANIM_SPRAWLED }
The leader lying where the guards threw him down the steps.
| Enumerator | Value | Description |
|---|---|---|
ANIM_SPRAWLED | 19 |
Definition at line 231 of file lunpa.c.
anonymous enum
enum { PILLAR_TOP_HEIGHT, METATILE_SIZE }
How high the ice pillar's top is, and a metatile: 16 pixels each.
| Enumerator | Value | Description |
|---|---|---|
PILLAR_TOP_HEIGHT | toFIXED(16) | |
METATILE_SIZE | toFIXED(16) |
Definition at line 237 of file lunpa.c.
anonymous enum
enum { TREASURE_SPOT_PSYNERGY_STONE }
The treasure spot of the town's Psynergy Stone.
| Enumerator | Value | Description |
|---|---|---|
TREASURE_SPOT_PSYNERGY_STONE | 102 |
Definition at line 244 of file lunpa.c.
anonymous enum
enum { PALETTE_TRANSLUCENT_EFFECT, PALETTE_EFFECT }
Unused: nothing in the scene reads them.
| Enumerator | Value | Description |
|---|---|---|
PALETTE_TRANSLUCENT_EFFECT | 14 | |
PALETTE_EFFECT | 15 |
Definition at line 254 of file lunpa.c.
Functions in detail
scLunpaWatchForUncloakedParty
static void scLunpaWatchForUncloakedParty(void)
Every tick at the Lunpa Fortress Gates: an uncloaked Isaac in the gap of the upper palisade is spotted by the guards.
References fdActorGet(), MainRoutineStateWork, state and syCloseEvent().
Referenced by scInit(), scLunpaCloakFades() and scLunpaGuardsCatchParty().
Definition at lines 251 and 1121 of file lunpa.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References LunpaEntrances, LunpaFortressGatesEntrances, MainRoutineStateWork and Sint32.
Definition at line 288 of file lunpa.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 303 of file lunpa.c.
scGetExits
const Uint32 *scGetExits(void)
References LunpaExits, LunpaFortressGatesExits, MainRoutineStateWork and Sint32.
Definition at line 308 of file lunpa.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
The townsfolk of Lunpa, or the guards of the Lunpa Fortress Gates.
References LunpaActorPlacements, LunpaFortressGatesActorPlacements, MainRoutineStateWork and Sint32.
Definition at line 324 of file lunpa.c.
scLunpaCatchFloatingNut
static void scLunpaCatchFloatingNut(void)
Catch on the Nut in the tree just west of Lunpa's shut south gate, outside the palisade, brings it down to Isaac.
References scCatchNut().
Definition at line 341 of file lunpa.c.
scLunpaApplyFrozenPuddleCollision
static inline void scLunpaApplyFrozenPuddleCollision(void)
Makes the frozen puddle's metatile, (14, 4), and the metatiles either side of it into the ice pillar's top and sides, from copies kept at (17, 4) and (15, 3).
References fdMapGridCopyMetatileAttributes().
Referenced by scLunpaFreezeHiddenPuddle() and scLunpaRevealSecrets().
Definition at line 349 of file lunpa.c.
scLunpaFreezeHiddenPuddle
static void scLunpaFreezeHiddenPuddle(void)
Frost on the blue puddle that Reveal shows between the two log pillars at the top of Lunpa (metatile (14, 4)) freezes it into an ice pillar to stand on.
References fdActorGet(), fdActorSetSpriteFlags(), gmFlagSet() and scLunpaApplyFrozenPuddleCollision().
Definition at line 358 of file lunpa.c.
scLunpaUpdateIcePillarDrawOrder
static void scLunpaUpdateIcePillarDrawOrder(void)
Every tick while Reveal shows the puddle: once Isaac is up on the ice pillar, it is drawn under him.
References fdActorGet().
Referenced by scLunpaHideSecrets() and scLunpaRevealSecrets().
Definition at line 377 of file lunpa.c.
scLunpaDrawHiddenPassagePicture
static inline void scLunpaDrawHiddenPassagePicture(Sint32 srcColumn, Sint32 srcRow)
Draws one picture of the hidden passage's cave mouth in the cliff at the west edge of town, from a set of copies kept at (srcColumn, srcRow). The second and third copies are the same mouth on the map's other layers.
References fdMapGridCopyMetatiles() and Sint32.
Referenced by scLunpaPressHiddenSwitch() and scLunpaRevealSecrets().
Definition at line 394 of file lunpa.c.
scLunpaRevealSecrets
static void scLunpaRevealSecrets(void)
Casting Reveal in Lunpa turns the town grey and shows its secrets: the blue puddle between the log pillars at the top of town, the sparkle of the hidden switch on the west cliff (or, once it has been pressed, the cave mouth it opened), and the Psynergy Stone's spot at metatile (7, 16). Isaac standing on that spot is first walked a step south off it.
References fdActorGet(), fdActorSetSpriteFlags(), fdActorWalkByAndWait(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdTreasureSpotSetPos(), gmFlagClear(), gmFlagGet(), scLunpaApplyFrozenPuddleCollision(), scLunpaDrawHiddenPassagePicture(), scLunpaUpdateIcePillarDrawOrder(), Sint32 and sySetTickEvent().
Definition at line 407 of file lunpa.c.
scLunpaHideSecrets
static void scLunpaHideSecrets(void)
As Reveal ends, and on every arrival in Lunpa, the puddle, the sparkle, the cave mouth and the Psynergy Stone's spot are hidden again, and a frozen puddle thaws.
References fdActorGet(), fdActorSetAnimation(), fdActorSetColorMode(), fdMapGridCopyMetatileAttributes(), fdMapGridCopyMetatiles(), fdTreasureSpotSetPos(), gmFlagClear(), gmFlagSet(), scLunpaUpdateIcePillarDrawOrder() and syCloseEvent().
Referenced by scInit().
Definition at line 466 of file lunpa.c.
scLunpaSearchWell
static void scLunpaSearchWell(void)
Searching the well in the middle of Lunpa (metatiles (16, 13) to (17, 14)), Isaac peers in and hears frogs inside. The gates' table has a row for a well too, but no metatile there answers it.
References fdScriptEnd(), fdScriptStart() and mnFieldMessageShow().
Referenced by LunpaFortressGatesCues.
Definition at line 495 of file lunpa.c.
scGetCues
const CUE *scGetCues(void)
The cues of the Lunpa Fortress Gates, or the town's before and after Donpa's judgment.
References gmFlagGet(), LunpaFortressGatesCues, LunpaReopenedCues, LunpaSealedCues, MainRoutineStateWork and Sint32.
Definition at line 507 of file lunpa.c.
scLunpaTalkToWestGuard
static void scLunpaTalkToWestGuard(void)
Before Donpa's judgment, the guard on the left of Lunpa's shut south gate winces and asks whether the party wants to enter Lunpa, and sends them back where they came from whatever they answer.
References fdActorShowEmote(), fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by LunpaSealedCues.
Definition at line 527 of file lunpa.c.
scLunpaTalkToEastGuard
static void scLunpaTalkToEastGuard(void)
Before Donpa's judgment, the guard on the right of Lunpa's shut south gate
says no one may enter without Dodonpa's authorization. Once Hammet's caravan
has gone north to Lunpa (FLAG_LUNPA_GUARDS_SUSPECT_KALAY), he asks instead
whether the party is from Kalay, and then whether they have come to save
Hammet, and warns them off by their answers.
References fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagGet().
Referenced by LunpaSealedCues.
Definition at line 544 of file lunpa.c.
scLunpaReadEastGuardsThoughts
static void scLunpaReadEastGuardsThoughts(void)
Mind Read on the guard on the right of Lunpa's south gate. Before Donpa's judgment he fears Dodonpa will blame the guards for any trouble outsiders cause, or, once Hammet's caravan has come, trusts that the gate in the cave opens only from the inside; after it he thinks the merchant is harmless.
References fdScriptSetMessageId(), fdScriptShowMessage(), gmFlagGet() and Sint32.
Referenced by LunpaReopenedCues and LunpaSealedCues.
Definition at line 577 of file lunpa.c.
scLunpaAskAboutLengthOfStay
static void scLunpaAskAboutLengthOfStay(void)
Before Donpa's judgment, a young man with brown hair near the inn asks whether the party has been in Lunpa long, and takes a No to mean they are new members of Dodonpa's gang.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by LunpaSealedCues.
Definition at line 608 of file lunpa.c.
scLunpaAskAboutHammetsKidnapping
static void scLunpaAskAboutHammetsKidnapping(void)
Before Donpa's judgment, a stout man in Lunpa asks whether it is true that Dodonpa kidnapped Hammet and extorted ransom for him.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by LunpaSealedCues.
Definition at line 621 of file lunpa.c.
scLunpaAskAboutSeeingDonpa
static void scLunpaAskAboutSeeingDonpa(void)
Before Donpa's judgment, a small boy at the top of Lunpa asks whether the party wants to see Donpa: he is in the fortress, or, on a No, impossible to see now.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by LunpaSealedCues.
Definition at line 635 of file lunpa.c.
scLunpaComplainAboutCold
static void scLunpaComplainAboutCold(void)
After Donpa's judgment, a woman with fair hair in Lunpa shivers and complains that it has gotten colder.
References fdActorRunRepeatedMotion(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by LunpaReopenedCues.
Definition at line 648 of file lunpa.c.
scLunpaAskAboutFortressCommotion
static void scLunpaAskAboutFortressCommotion(void)
After Donpa's judgment, a woman in a green dress in Lunpa offers to tell what caused the commotion at the fortress: someone snuck in to save Hammet and ran away.
References fdScriptAskYesNo(), fdScriptEnd(), fdScriptSetMessageId() and fdScriptStart().
Referenced by LunpaReopenedCues.
Definition at line 661 of file lunpa.c.
scLunpaTalkToLeftGuard
static void scLunpaTalkToLeftGuard(void)
Talking to the left guard at the Lunpa Fortress Gates under Cloak, he could swear he just heard someone. Uncloaked, he grumbles that Dodonpa is devious; after Donpa's judgment, until the meeting with Bunza, he thinks he has seen the man with the party before, then decides it is impossible.
References fdActorShowEmote(), fdActorStartRepeatedMotion(), fdScriptSetMessageId(), fdScriptShowMessage(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork and Sint32.
Referenced by LunpaFortressGatesCues.
Definition at line 676 of file lunpa.c.
scLunpaTalkToRightGuard
static void scLunpaTalkToRightGuard(void)
Talking to the right guard at the Lunpa Fortress Gates, he boasts that not even a mouse could get in while he is on watch. Under Cloak he answers his partner that the place is kind of creepy; after Donpa's judgment he wonders how the warriors from Kalay got in.
References fdScriptSetMessageId(), fdScriptShowMessage(), gmFlagGet() and MainRoutineStateWork.
Referenced by LunpaFortressGatesCues.
Definition at line 711 of file lunpa.c.
scLunpaReadLeftGuardsThoughts
static void scLunpaReadLeftGuardsThoughts(void)
Mind Read on the left guard at the Lunpa Fortress Gates: he thinks keeping Hammet to squeeze money out of Kalay is genius. After Donpa's judgment, until the meeting with Bunza, he turns to Isaac sure he has seen that man with him before (later, that the man following them looks like that merchant), then dismisses the thought.
References fdActorFaceActor(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdPsynergyStopMindReadWave(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork and Sint32.
Referenced by LunpaFortressGatesCues.
Definition at line 738 of file lunpa.c.
scLunpaReadRightGuardsThoughts
static void scLunpaReadRightGuardsThoughts(void)
Mind Read on the right guard at the Lunpa Fortress Gates: you would have to be a shadow to sneak past him. After Donpa's judgment he can't see how anyone got by them.
References fdScriptSetMessageId(), fdScriptShowMessage() and gmFlagGet().
Referenced by LunpaFortressGatesCues.
Definition at line 782 of file lunpa.c.
scLunpaWatchForFortressApproach
static void scLunpaWatchForFortressApproach(void)
Every tick at the Lunpa Fortress Gates between Donpa's judgment and the
meeting with Bunza: Isaac stepping into the upper palisade's gap (map row 10)
raises Garet's warning, scLunpaGaretTurnsIsaacBack.
References fdActorGet(), fdScriptGetFlag(), gmFlagSet() and Sint32.
Referenced by scInit().
Definition at line 800 of file lunpa.c.
scLunpaGaretTurnsIsaacBack
static void scLunpaGaretTurnsIsaacBack(void)
After Donpa's judgment, walking up into the gap in the upper palisade at the Lunpa Fortress Gates, Garet reminds Isaac they can't go in there, and Isaac winces and steps back.
References fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorShowEmote(), fdActorWaitForMoveById(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagClear().
Referenced by LunpaFortressGatesCues.
Definition at line 816 of file lunpa.c.
scLunpaEnterDoor
static void scLunpaEnterDoor(void)
Walking north into one of Lunpa's doors, it swings open and Isaac goes through into the home, shop, inn, temple or crate room behind it. The townspeople stand still meanwhile.
References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdMapGridAnimateMetatiles(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWait(), fdScriptWaitTransitionTicks(), LunpaDoors, Sint32, state, syImportScriptSetExitRequest() and sySoundPlay().
Definition at line 835 of file lunpa.c.
scLunpaEnterHiddenPassage
static void scLunpaEnterHiddenPassage(void)
Walking north into the cave mouth the hidden switch opened in Lunpa's west cliff, metatile (2, 19), takes Isaac into Lunpa's hidden room. It works only while Reveal shows the mouth; otherwise nothing happens there.
References fdActorCenterAndWalk(), fdActorGet(), fdActorSetAnimation(), fdScriptWait(), gmFlagGet() and syImportScriptSetExitRequest().
Definition at line 874 of file lunpa.c.
scLunpaEnterFortress
static void scLunpaEnterFortress(void)
Walking up to the golden door in the cliff at the top of the Lunpa Fortress Gates, metatiles (9, 5) and (10, 5), it opens and Isaac goes into Lunpa Fortress.
References fdActorGet(), fdActorSetAnimation(), fdActorWalkBy(), fdMapGridCopyMetatiles(), fdScriptEnd(), fdScriptFinishScreenTransition(), fdScriptStart(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagSet(), syImportScriptSetExitRequest() and sySoundPlay().
Referenced by LunpaFortressGatesCues.
Definition at line 893 of file lunpa.c.
scLunpaTryJumpForward
static void scLunpaTryJumpForward(void)
Unused: jumps Isaac forward. Nothing calls it.
References fdTryJumpForward().
Definition at line 914 of file lunpa.c.
scLunpaPlayRevealSound
static void scLunpaPlayRevealSound(void)
Unused: plays the treasure jingle while Reveal is shining. Nothing calls it.
References gmFlagGet() and sySoundPlay().
Definition at line 920 of file lunpa.c.
scLunpaPressHiddenSwitch
static void scLunpaPressHiddenSwitch(void)
Searching the sparkle Reveal shows on Lunpa's west cliff, from metatile (3, 18) below it, makes the rock crumble away into a dark cave mouth, the passage to Lunpa's hidden room.
References fdScriptGetFlag(), gmFlagGet(), gmFlagSet(), scLunpaDrawHiddenPassagePicture(), sySoundPlay() and sySynch().
Definition at line 931 of file lunpa.c.
scLunpaCopyGatewayCollision
static inline void scLunpaCopyGatewayCollision(Sint32 srcColumn, Sint32 srcRow)
Copies the metatile at (srcColumn, srcRow) over the three metatiles (7, 11) to (9, 11) at the Lunpa Fortress Gates, just below the west half of the upper palisade.
References fdMapGridCopyMetatileAttributes() and Sint32.
Referenced by scLunpaCastCloak(), scLunpaGuardsBlockGate() and scLunpaReopenGateway().
Definition at line 960 of file lunpa.c.
scLunpaGuardsBlockGate
static void scLunpaGuardsBlockGate(void)
Walking uncloaked into the yard between the palisades at the Lunpa Fortress
Gates (metatiles (7,
11) to (14, 14)), the two guards cry out, step up into the upper palisade's
gap and warn the
party not to come any closer to the fortress. The three metatiles west of
them are rewritten as Cloak's cast does.References fdActorFaceDirection(), fdActorSetAnimation(), fdActorShowEmote(), fdActorStop(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), MainRoutineStateWork and scLunpaCopyGatewayCollision().
Referenced by LunpaFortressGatesCues.
Definition at line 973 of file lunpa.c.
scLunpaNoOperation
static void scLunpaNoOperation(void)
Unused: does nothing, and nothing calls it.
Definition at line 1003 of file lunpa.c.
scLunpaCastCloak
static void scLunpaCastCloak(void)
Casting Cloak at the Lunpa Fortress Gates rewrites the three metatiles (7,
11) to (9, 11) from the one at (6, 11); scLunpaCloakFades puts them back.
References gmFlagSet() and scLunpaCopyGatewayCollision().
Referenced by LunpaFortressGatesCues and scInit().
Definition at line 1009 of file lunpa.c.
scLunpaGuardsCatchParty
static void scLunpaGuardsCatchParty(void)
When the guards at the Lunpa Fortress Gates spot the party, they turn and shout who are you, wonder how anyone got past them, and march Isaac back out through the gap in the lower palisade.
References fdActorFaceActor(), fdActorGet(), fdActorSetAnimation(), fdActorShowEmote(), fdActorStartRepeatedMotion(), fdActorWaitForMoveById(), fdActorWalkTo(), fdScriptEnd(), fdScriptGetFlag(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scLunpaWatchForUncloakedParty(), Sint32 and sySetTickEvent().
Referenced by LunpaFortressGatesCues.
Definition at line 1018 of file lunpa.c.
scLunpaReopenGateway
static void scLunpaReopenGateway(void)
Puts back the three metatiles (7, 11) to (9, 11) that Cloak and the guards at the door rewrite, from the metatile at (7, 12).
References scLunpaCopyGatewayCollision().
Referenced by scLunpaCloakFades().
Definition at line 1085 of file lunpa.c.
scLunpaCloakFades
static void scLunpaCloakFades(void)
As Cloak fades at the Lunpa Fortress Gates, a party still in the yard between the palisades is caught by the guards.
References fdActorGet(), gmFlagClear(), scLunpaReopenGateway(), scLunpaWatchForUncloakedParty(), state and syCloseEvent().
Referenced by LunpaFortressGatesCues.
Definition at line 1092 of file lunpa.c.
scLunpaKickUpLeaderDust
static void scLunpaKickUpLeaderDust(void)
Every 16 ticks while Isaac is dragged and thrown: a puff of dust at his feet.
References fdActorGet(), Sint32, syCos(), sySin() and TickCount.
Referenced by scLunpaGuardsThrowIsaacOut().
Definition at line 1138 of file lunpa.c.
scLunpaGuardsThrowIsaacOut
static void scLunpaGuardsThrowIsaacOut(void)
Caught inside Lunpa Fortress, Isaac is dragged out of the door by the two guards, struggling, down through both palisades, and thrown sprawling onto the slope below. And don't come back, says one, and they return to their posts.
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetAttachedEffect(), fdActorSetDestination(), fdActorSetSpritePriority(), fdActorWaitForMoveById(), fdActorWalkTo(), fdCameraFollowActor(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), scLunpaKickUpLeaderDust(), syCloseEvent(), sySetTickEvent() and sySoundPlay().
Referenced by scInit().
Definition at line 1164 of file lunpa.c.
scLunpaLeaderSneaksOut
static void scLunpaLeaderSneaksOut(void)
After the rescue, Isaac comes out of the fortress door, casts Cloak in the upper palisade's gap and slips round behind the guards, west along the palisade and down the west side of the slope.
References fdActorWaitForMoveById(), fdActorWalkTo(), fdPsynergyLoadResources(), fdPsynergyRunHandler(), fdPsynergySetupActorPair(), fdPsynergyStartCast(), fdPsynergyStopCasterUpdate(), fdScriptEnd(), fdScriptStart(), fdScriptStartScreenTransition() and fdScriptWait().
Referenced by scInit().
Definition at line 1257 of file lunpa.c.
scInit
Sint32 scInit(void)
Sets up Lunpa (secrets hidden, the Nut in its tree) or the Lunpa Fortress Gates (the throw-out or the sneak-out, Garet's watch, the guards' watch and the fortress started over).
References fdActorGet(), fdActorSetSpriteFlags(), gmFlagClear(), gmFlagGet(), gmFlagSet(), MainRoutineStateWork, scFloatNut(), scLunpaCastCloak(), scLunpaGuardsThrowIsaacOut(), scLunpaHideSecrets(), scLunpaLeaderSneaksOut(), scLunpaWatchForFortressApproach(), scLunpaWatchForUncloakedParty(), Sint32 and sySetTickEvent().
Definition at line 1288 of file lunpa.c.
Variables in detail
LunpaEntrances
extern SCENE_ENTRANCE LunpaEntrances[]
SCENE_ENTRANCE LunpaEntrances[]
Referenced by scGetEntrances().
Definition at lines 67 and 1369 of file lunpa.c.
LunpaFortressGatesEntrances
extern SCENE_ENTRANCE LunpaFortressGatesEntrances[]
SCENE_ENTRANCE LunpaFortressGatesEntrances[]
Referenced by scGetEntrances().
Definition at lines 68 and 1386 of file lunpa.c.
LunpaExits
extern Uint32 LunpaExits[]
Uint32 LunpaExits[]
Referenced by scGetExits().
Definition at lines 69 and 1404 of file lunpa.c.
LunpaFortressGatesExits
extern Uint32 LunpaFortressGatesExits[]
Uint32 LunpaFortressGatesExits[]
Referenced by scGetExits().
Definition at lines 70 and 1423 of file lunpa.c.
LunpaActorPlacements
extern ACTOR_PLACE LunpaActorPlacements[]
ACTOR_PLACE LunpaActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 71 and 1433 of file lunpa.c.
LunpaFortressGatesActorPlacements
extern ACTOR_PLACE LunpaFortressGatesActorPlacements[]
ACTOR_PLACE LunpaFortressGatesActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 72 and 1463 of file lunpa.c.
LunpaSealedCues
extern CUE LunpaSealedCues[]
CUE LunpaSealedCues[]
References scLunpaAskAboutHammetsKidnapping(), scLunpaAskAboutLengthOfStay(), scLunpaAskAboutSeeingDonpa(), scLunpaReadEastGuardsThoughts(), scLunpaTalkToEastGuard() and scLunpaTalkToWestGuard().
Referenced by scGetCues().
Definition at lines 73 and 1526 of file lunpa.c.
LunpaReopenedCues
extern CUE LunpaReopenedCues[]
CUE LunpaReopenedCues[]
References scLunpaAskAboutFortressCommotion(), scLunpaComplainAboutCold() and scLunpaReadEastGuardsThoughts().
Referenced by scGetCues().
Definition at lines 74 and 1564 of file lunpa.c.
LunpaFortressGatesCues
extern CUE LunpaFortressGatesCues[]
CUE LunpaFortressGatesCues[]
References scLunpaCastCloak(), scLunpaCloakFades(), scLunpaEnterFortress(), scLunpaGaretTurnsIsaacBack(), scLunpaGuardsBlockGate(), scLunpaGuardsCatchParty(), scLunpaReadLeftGuardsThoughts(), scLunpaReadRightGuardsThoughts(), scLunpaSearchWell(), scLunpaTalkToLeftGuard() and scLunpaTalkToRightGuard().
Referenced by scGetCues().
Definition at lines 75 and 1606 of file lunpa.c.
LunpaDoors
extern MAP_EDIT LunpaDoors[]
MAP_EDIT LunpaDoors[]
Each door's opening animation and the map grid metatile it plays at, by its
step cue from METATILE_BEHAVIOR_LUNPA_FIRST_HOME_DOOR.
References LunpaDoorSteps.
Referenced by scLunpaEnterDoor().
Definition at lines 249 and 1663 of file lunpa.c.
FieldEffectDurationScripts
const Sint32 *FieldEffectDurationScripts[]
References FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript and Sint32.
Definition at line 282 of file lunpa.c.
LunpaDoorSteps
Uint16 LunpaDoorSteps[DOOR_COUNT][11]
Each door's opening, as a map grid animation.
Referenced by LunpaDoors.
Definition at line 1634 of file lunpa.c.
LunpaUnusedWord
Uint32 LunpaUnusedWord
Unused: a zero word nothing reads.
Definition at line 1675 of file lunpa.c.