src/scene/stone_rooms.c
Stone rooms (SceneIdStoneRooms), a rooms map drawn in stone. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script.h"#include "graphics/graphics.h"#include "text/msg_ids.h"
Enumerations
| Name | Description | |
|---|---|---|
enum | STONE_ROOMS_METATILE_BEHAVIOR { METATILE_BEHAVIOR_VAULT_JAIL_DOOR, METATILE_BEHAVIOR_LUNPA_H … } | The metatile behaviors the jail's cues answer. |
enum | JAIL_ACTOR_ID { ACTOR_THIEF_LEADER, ACTOR_LEFT_THIEF, ACTOR_RIGHT_THIEF, ACT … } | The placed actors, numbering the rows of the table scGetActorPlacements returns. |
enum | anonymous enum { JAIL_REACH_ACROSS_BARS } | The jail's occupants count as nearer than they stand for talk and Psynergy targets, so the party reaches them across the bars. |
Functions
| Name | Description | |
|---|---|---|
const SCENE_ENTRANCE * | scGetEntrances (void) | Returns the entrances from Vault, from Lunpa and from Vault's revisit scene. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Returns the exits to Vault, to Vault's revisit scene and to Lunpa. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Places the three jailed thieves, or the lone prisoner. |
const CUE * | scGetCues (void) | Returns the thieves' cues, or the prisoner's. |
static void | scStoneRoomsLeaderSilencesThieves (void) | In Vault's jail, the thieves' leader silences his men and vows revenge. |
static void | scStoneRoomsLeftThiefRegretsEscape (void) | In Vault's jail, the thief on the left wishes they had escaped to the cave northeast of Goma Range. |
static void | scStoneRoomsRightThiefRegretsStaying (void) | In Vault's jail, the thief on the right shakes his head and says he knew they should have skipped town sooner. |
static void | scStoneRoomsReadLeaderMind (void) | Mind Read on the thieves' leader in Vault's jail shows him thinking he'll be out of this jail before you know it. |
static void | scStoneRoomsReadLeftThiefMind (void) | Mind Read on the thief on the left shows him wondering whether he will ever run free again. |
static void | scStoneRoomsReadRightThiefMind (void) | Mind Read on the thief on the right shows him wondering whether this is because they stole Hammet's Shaman's Rod. |
static void | scStoneRoomsLeaveForVault (void) | The party steps out of Vault's jail into Vault, with the exit sound. |
Sint32 | scInit (void) | Opens the map through a window transition and lets the party reach the jail's occupants across the bars. |
Variables
| Name | Description | |
|---|---|---|
extern const SCENE_ENTRANCE | StoneRoomsEntrances [] | |
extern const Uint32 | StoneRoomsExits [] | |
extern const ACTOR_PLACE | StoneRoomsThiefActorPlacements [] | |
extern const ACTOR_PLACE | StoneRoomsPrisonerActorPlacements [] | |
extern const CUE | StoneRoomsThiefCues [] | |
extern const CUE | StoneRoomsPrisonerCues [] |
Description
Stone rooms (SceneIdStoneRooms), a rooms map drawn in stone.
The game packs rooms of several places that share a tile style onto one map. This one holds two, whose area names differ by entrance.
The entrance also picks the tables. STONE_ROOMS_VAULT and
STONE_ROOMS_FROM_LUNPA take the thieves' tables, and
STONE_ROOMS_FROM_VAULT_REVISIT takes the prisoner's.
The two rooms, in story order, by the exits that lead in:
- Vault (
STONE_ROOMS_VAULTandSTONE_ROOMS_FROM_VAULT_REVISIT), the metatile behind Vault's jail door. Once the party has beaten the three thieves in the inn's loft (FLAG_VAULT_THIEVES_JAILED,log_rooms_a.c), coming in from Vault finds them behind the bars. Each has his own talk and Mind Read. Later Vault becomes its later scene (vault_revisit.c), whose villagers say the thieves have broken out. Its jail door then comes in bySTONE_ROOMS_FROM_VAULT_REVISITand finds a lone prisoner instead. - Lunpa (
STONE_ROOMS_FROM_LUNPA), Lunpa's hidden room, which the town's hidden passage reaches (lunpa.c). Its six chests are each opened once (FLAG_LUNPA_HIDDEN_ROOM_CHEST_*), andMETATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_DOORleads back up into Lunpa. Arriving this way clearsFLAG_SHOW_AREA_NAME, so no area name is shown. The room uses the thieves' tables, so its chests and exit sit in the same cue table as the thieves' talk and the Vault door.
Enumerations in detail
STONE_ROOMS_METATILE_BEHAVIOR
enum STONE_ROOMS_METATILE_BEHAVIOR
The metatile behaviors the jail's cues answer.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_VAULT_JAIL_DOOR | 1 | |
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_DOOR | 2 | |
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_WATER_OF_LIFE | 100 | |
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_SMOKE_BOMB | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_LUCKY_MEDAL | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_ANTIDOTE | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_COINS | ||
METATILE_BEHAVIOR_LUNPA_HIDDEN_ROOM_CHEST_ELIXIR |
Definition at line 45 of file stone_rooms.c.
JAIL_ACTOR_ID
enum JAIL_ACTOR_ID
The placed actors, numbering the rows of the table scGetActorPlacements
returns.
They are the three thieves of StoneRoomsThiefActorPlacements, or the prisoner
of StoneRoomsPrisonerActorPlacements in the same first slot.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_THIEF_LEADER | ACTOR_FIRST_PLACED | The thieves' leader (SPRITE_MAN_WITH_LONG_DARK_HAIR), in the middle of the metatile. |
ACTOR_LEFT_THIEF | The thief on the left (SPRITE_PERSON_IN_PURPLE). | |
ACTOR_RIGHT_THIEF | The thief on the right (SPRITE_PERSON_IN_PURPLE). | |
ACTOR_PRISONER | ACTOR_FIRST_PLACED | The lone prisoner after the thieves have broken out (SPRITE_STRONGMAN). |
Definition at line 62 of file stone_rooms.c.
anonymous enum
enum { JAIL_REACH_ACROSS_BARS }
The jail's occupants count as nearer than they stand for talk and Psynergy targets, so the party reaches them across the bars.
fdFindNearbyTalkTarget scales their distance by 10/13.
| Enumerator | Value | Description |
|---|---|---|
JAIL_REACH_ACROSS_BARS | ACTOR_NEAR_TALK | ACTOR_NEAR_PSYNERGY |
Definition at line 78 of file stone_rooms.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
Returns the entrances from Vault, from Lunpa and from Vault's revisit scene.
References StoneRoomsEntrances.
Definition at line 84 of file stone_rooms.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 89 of file stone_rooms.c.
scGetExits
const Uint32 *scGetExits(void)
Returns the exits to Vault, to Vault's revisit scene and to Lunpa.
References StoneRoomsExits.
Definition at line 95 of file stone_rooms.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Places the three jailed thieves, or the lone prisoner.
References MainRoutineStateWork, StoneRoomsPrisonerActorPlacements and StoneRoomsThiefActorPlacements.
Definition at line 101 of file stone_rooms.c.
scGetCues
const CUE *scGetCues(void)
Returns the thieves' cues, or the prisoner's.
References MainRoutineStateWork, StoneRoomsPrisonerCues and StoneRoomsThiefCues.
Definition at line 111 of file stone_rooms.c.
scStoneRoomsLeaderSilencesThieves
static void scStoneRoomsLeaderSilencesThieves(void)
In Vault's jail, the thieves' leader silences his men and vows revenge.
References fdActorFaceActor(), fdActorRunRepeatedMotion(), fdActorStartRepeatedMotion(), fdActorTurnToFaceEachOther(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and fdScriptWait().
Referenced by StoneRoomsThiefCues.
Definition at line 121 of file stone_rooms.c.
scStoneRoomsLeftThiefRegretsEscape
static void scStoneRoomsLeftThiefRegretsEscape(void)
In Vault's jail, the thief on the left wishes they had escaped to the cave northeast of Goma Range.
References fdActorRunRepeatedMotion(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and fdScriptWait().
Referenced by StoneRoomsThiefCues.
Definition at line 154 of file stone_rooms.c.
scStoneRoomsRightThiefRegretsStaying
static void scStoneRoomsRightThiefRegretsStaying(void)
In Vault's jail, the thief on the right shakes his head and says he knew they should have skipped town sooner.
References fdActorSetAnimationAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and fdScriptWait().
Referenced by StoneRoomsThiefCues.
Definition at line 167 of file stone_rooms.c.
scStoneRoomsReadLeaderMind
static void scStoneRoomsReadLeaderMind(void)
Mind Read on the thieves' leader in Vault's jail shows him thinking he'll be out of this jail before you know it.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by StoneRoomsThiefCues.
Definition at line 180 of file stone_rooms.c.
scStoneRoomsReadLeftThiefMind
static void scStoneRoomsReadLeftThiefMind(void)
Mind Read on the thief on the left shows him wondering whether he will ever run free again.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by StoneRoomsThiefCues.
Definition at line 191 of file stone_rooms.c.
scStoneRoomsReadRightThiefMind
static void scStoneRoomsReadRightThiefMind(void)
Mind Read on the thief on the right shows him wondering whether this is because they stole Hammet's Shaman's Rod.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage() and fdScriptStart().
Referenced by StoneRoomsThiefCues.
Definition at line 202 of file stone_rooms.c.
scStoneRoomsLeaveForVault
static void scStoneRoomsLeaveForVault(void)
The party steps out of Vault's jail into Vault, with the exit sound.
References syImportScriptSetExitRequest() and sySoundPlay().
Referenced by StoneRoomsThiefCues.
Definition at line 212 of file stone_rooms.c.
scInit
Sint32 scInit(void)
Opens the map through a window transition and lets the party reach the jail's occupants across the bars.
References fdActorGet(), gmFlagClear(), MainRoutineStateWork and Sint32.
Definition at line 220 of file stone_rooms.c.
Variables in detail
StoneRoomsEntrances
extern const SCENE_ENTRANCE StoneRoomsEntrances[]
const SCENE_ENTRANCE StoneRoomsEntrances[]
Referenced by scGetEntrances().
Definition at lines 37 and 252 of file stone_rooms.c.
StoneRoomsExits
extern const Uint32 StoneRoomsExits[]
const Uint32 StoneRoomsExits[]
Referenced by scGetExits().
Definition at lines 38 and 262 of file stone_rooms.c.
StoneRoomsThiefActorPlacements
extern const ACTOR_PLACE StoneRoomsThiefActorPlacements[]
const ACTOR_PLACE StoneRoomsThiefActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 39 and 270 of file stone_rooms.c.
StoneRoomsPrisonerActorPlacements
extern const ACTOR_PLACE StoneRoomsPrisonerActorPlacements[]
const ACTOR_PLACE StoneRoomsPrisonerActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 40 and 280 of file stone_rooms.c.
StoneRoomsThiefCues
extern const CUE StoneRoomsThiefCues[]
const CUE StoneRoomsThiefCues[]
References scStoneRoomsLeaderSilencesThieves(), scStoneRoomsLeaveForVault(), scStoneRoomsLeftThiefRegretsEscape(), scStoneRoomsReadLeaderMind(), scStoneRoomsReadLeftThiefMind(), scStoneRoomsReadRightThiefMind() and scStoneRoomsRightThiefRegretsStaying().
Referenced by scGetCues().
Definition at lines 41 and 286 of file stone_rooms.c.
StoneRoomsPrisonerCues
extern const CUE StoneRoomsPrisonerCues[]
const CUE StoneRoomsPrisonerCues[]
Referenced by scGetCues().