Alchemy
Loading...
Searching...
No Matches

vault_jail.c File Reference

Vault's jail, where the thieves who stole Hammet's Shaman's Rod are held; on the party's return a lone prisoner takes their place. More...

Go to the source code of this file.

Enumerations

enum  JailEntrance { JAIL_ENTRANCE_FROM_VAULT = 1 , JAIL_ENTRANCE_FROM_LUNPA = 2 , JAIL_ENTRANCE_FROM_VAULT_REVISIT = 10 }
enum  JailExit { JAIL_EXIT_TO_VAULT = 1 , JAIL_EXIT_TO_VAULT_REVISIT = 2 , JAIL_EXIT_TO_LUNPA = 3 }
enum  { ENTRANCE_FROM_JAIL = 12 }
enum  JailTrigger {
  TRIGGER_VAULT_DOOR = 1 , TRIGGER_LUNPA_DOOR = 2 , TRIGGER_CHEST_WATER_OF_LIFE = 100 , TRIGGER_CHEST_SMOKE_BOMB ,
  TRIGGER_CHEST_LUCKY_MEDAL , TRIGGER_CHEST_ANTIDOTE , TRIGGER_CHEST_COINS , TRIGGER_CHEST_ELIXIR
}
enum  JailActor { ACTOR_THIEF_LEADER = ACTOR_FIRST_PLACED , ACTOR_LEFT_THIEF , ACTOR_RIGHT_THIEF , ACTOR_PRISONER = ACTOR_FIRST_PLACED }
enum  JailSprite { SPRITE_THIEF_LEADER = 0x3f , SPRITE_THIEF = 0x40 , SPRITE_PRISONER = 0x74 }
enum  { CELL_COLLISION_FLAGS = 0x14 }

Functions

const struct SceneEntrance * Scene_GetEntrances (void)
 Returns the entrances from Vault, Lunpa and the revisited Vault.
const struct SceneRegion * Scene_GetRegions (void)
const u32 * Scene_GetExits (void)
 Returns the exits to Vault, to the revisited Vault and to Lunpa.
const struct ScenePlacement * Scene_GetPlacements (void)
 Places the three jailed thieves, or, entered from the revisited Vault (entrance 10, after they have broken out), the lone prisoner.
const struct SceneEvent * Scene_GetEvents (void)
 Returns the thieves' events, or the prisoner's when the party came in from the revisited Vault, matching Scene_GetPlacements.
static void Event_LeaderSilencesThieves (void)
 The jailed leader glares at each of his men and snaps at them, then turns to the party: they got us this time, but you'll pay for this.
static void Event_LeftThiefRegretsEscape (void)
 The left thief wishes they had escaped to the cave northeast of the Goma Range.
static void Event_RightThiefRegretsStaying (void)
 The right thief shakes his head: they should have skipped town sooner.
static void Event_ReadLeaderMind (void)
 Mind Read on the leader: he'll be out of this jail before you know it.
static void Event_ReadLeftThiefMind (void)
 Mind Read on the left thief: will he ever run free again?
static void Event_ReadRightThiefMind (void)
 Mind Read on the right thief: is this for stealing Hammet's Shaman's Rod?
static void Event_LeaveForVault (void)
 The party steps out of the jail into Vault.
s32 Scene_Initialize (void)
 Opens the scene through a window transition and makes the occupants solid.

Variables

const struct SceneEntrance gJailEntrances []
const u32 gJailExits []
const struct ScenePlacement gJailThiefPlacements []
const struct ScenePlacement gJailPrisonerPlacements []
const struct SceneEvent gJailThiefEvents []
const struct SceneEvent gJailPrisonerEvents []

Detailed Description

Vault's jail, where the thieves who stole Hammet's Shaman's Rod are held; on the party's return a lone prisoner takes their place.

Definition in file vault_jail.c.

Enumeration Type Documentation

◆ JailEntrance

Enumerator
JAIL_ENTRANCE_FROM_VAULT 
JAIL_ENTRANCE_FROM_LUNPA 
JAIL_ENTRANCE_FROM_VAULT_REVISIT 

Definition at line 27 of file vault_jail.c.

◆ JailExit

enum JailExit
Enumerator
JAIL_EXIT_TO_VAULT 
JAIL_EXIT_TO_VAULT_REVISIT 
JAIL_EXIT_TO_LUNPA 

Definition at line 33 of file vault_jail.c.

◆ anonymous enum

anonymous enum
Enumerator
ENTRANCE_FROM_JAIL 

Definition at line 39 of file vault_jail.c.

◆ JailTrigger

Enumerator
TRIGGER_VAULT_DOOR 
TRIGGER_LUNPA_DOOR 
TRIGGER_CHEST_WATER_OF_LIFE 
TRIGGER_CHEST_SMOKE_BOMB 
TRIGGER_CHEST_LUCKY_MEDAL 
TRIGGER_CHEST_ANTIDOTE 
TRIGGER_CHEST_COINS 
TRIGGER_CHEST_ELIXIR 

Definition at line 41 of file vault_jail.c.

◆ JailActor

enum JailActor
Enumerator
ACTOR_THIEF_LEADER 
ACTOR_LEFT_THIEF 
ACTOR_RIGHT_THIEF 
ACTOR_PRISONER 

Definition at line 52 of file vault_jail.c.

◆ JailSprite

enum JailSprite
Enumerator
SPRITE_THIEF_LEADER 
SPRITE_THIEF 
SPRITE_PRISONER 

Definition at line 59 of file vault_jail.c.

◆ anonymous enum

anonymous enum
Enumerator
CELL_COLLISION_FLAGS 

Definition at line 65 of file vault_jail.c.

Function Documentation

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Returns the entrances from Vault, Lunpa and the revisited Vault.

Definition at line 68 of file vault_jail.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 70 of file vault_jail.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Returns the exits to Vault, to the revisited Vault and to Lunpa.

Both scenes share one exit table.

Definition at line 73 of file vault_jail.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

Places the three jailed thieves, or, entered from the revisited Vault (entrance 10, after they have broken out), the lone prisoner.

Definition at line 77 of file vault_jail.c.

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

Returns the thieves' events, or the prisoner's when the party came in from the revisited Vault, matching Scene_GetPlacements.

Definition at line 86 of file vault_jail.c.

◆ Event_LeaderSilencesThieves()

void Event_LeaderSilencesThieves ( void )
static

The jailed leader glares at each of his men and snaps at them, then turns to the party: they got us this time, but you'll pay for this.

"Shut yer yaps!"

Reached by talking to the thieves' leader (actor 8) while FLAG_VAULT_THIEVES_JAILED is set.

Definition at line 98 of file vault_jail.c.

Referenced by Event_LeaderSilencesThieves().

◆ Event_LeftThiefRegretsEscape()

void Event_LeftThiefRegretsEscape ( void )
static

The left thief wishes they had escaped to the cave northeast of the Goma Range.

Reached by talking to the left thief (actor 9) while FLAG_VAULT_THIEVES_JAILED is set.

Definition at line 132 of file vault_jail.c.

Referenced by Event_LeftThiefRegretsEscape().

◆ Event_RightThiefRegretsStaying()

void Event_RightThiefRegretsStaying ( void )
static

The right thief shakes his head: they should have skipped town sooner.

Reached by talking to the right thief (actor 10) while FLAG_VAULT_THIEVES_JAILED is set.

Definition at line 145 of file vault_jail.c.

Referenced by Event_RightThiefRegretsStaying().

◆ Event_ReadLeaderMind()

void Event_ReadLeaderMind ( void )
static

Mind Read on the leader: he'll be out of this jail before you know it.

Reached by Mind Read on actor 8 while FLAG_VAULT_THIEVES_JAILED is set; the two below are reached the same way on actors 9 and 10.

Definition at line 158 of file vault_jail.c.

Referenced by Event_ReadLeaderMind().

◆ Event_ReadLeftThiefMind()

void Event_ReadLeftThiefMind ( void )
static

Mind Read on the left thief: will he ever run free again?

Definition at line 166 of file vault_jail.c.

Referenced by Event_ReadLeftThiefMind().

◆ Event_ReadRightThiefMind()

void Event_ReadRightThiefMind ( void )
static

Mind Read on the right thief: is this for stealing Hammet's Shaman's Rod?

Definition at line 174 of file vault_jail.c.

Referenced by Event_ReadRightThiefMind().

◆ Event_LeaveForVault()

void Event_LeaveForVault ( void )
static

The party steps out of the jail into Vault.

Reached by stepping on the Vault door (cell code 1) while the thieves are held; takes exit 1 to Vault's entrance 12. The prisoner's events leave by exit 2 instead, to the revisited Vault.

Definition at line 186 of file vault_jail.c.

Referenced by Event_LeaveForVault().

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Opens the scene through a window transition and makes the occupants solid.

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

Called by the engine once the actors are placed. Coming up from Lunpa (entrance 2) clears FLAG_SHOW_LOCATION_NAME, so no place name is shown; otherwise it adds collision flags 0x14 to the prisoner or to the three thieves.

Definition at line 197 of file vault_jail.c.

Variable Documentation

◆ gJailEntrances

const struct SceneEntrance gJailEntrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ JAIL_ENTRANCE_FROM_VAULT, CONDITION_ALWAYS, 80, 0, 232, FACING_NORTH, 0, 16, 48, 304, 256, 0 },
{ JAIL_ENTRANCE_FROM_LUNPA, CONDITION_ALWAYS, 544, 0, 280, FACING_NORTH, 0, 440, 48, 680, 312, 0 },
{ JAIL_ENTRANCE_FROM_VAULT_REVISIT, CONDITION_ALWAYS, 80, 0, 232, FACING_NORTH, 0, 16, 48, 304, 256, 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
@ JAIL_ENTRANCE_FROM_LUNPA
Definition lunpa.h:61
@ JAIL_ENTRANCE_FROM_VAULT
Definition vault_jail.c:28
@ JAIL_ENTRANCE_FROM_VAULT_REVISIT
Definition vault_jail.c:30

Definition at line 217 of file vault_jail.c.

Referenced by Scene_GetEntrances().

◆ gJailExits

const u32 gJailExits[]
Initial value:
= {
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
@ SCENE_VAULT
Definition field_scene.h:14
@ SCENE_VAULT_JAIL
Definition field_scene.h:15
@ SCENE_LUNPA
Definition field_scene.h:17
@ SCENE_VAULT_REVISIT
Definition field_scene.h:16
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77
@ JAIL_EXIT_TO_VAULT_REVISIT
Definition vault_jail.c:35
@ JAIL_EXIT_TO_LUNPA
Definition vault_jail.c:36
@ JAIL_EXIT_TO_VAULT
Definition vault_jail.c:34
@ ENTRANCE_FROM_JAIL
Definition vault_jail.c:39

Definition at line 225 of file vault_jail.c.

Referenced by Scene_GetExits().

◆ gJailThiefPlacements

const struct ScenePlacement gJailThiefPlacements[]
Initial value:

Definition at line 233 of file vault_jail.c.

Referenced by Scene_GetPlacements().

◆ gJailPrisonerPlacements

const struct ScenePlacement gJailPrisonerPlacements[]
Initial value:

Definition at line 243 of file vault_jail.c.

Referenced by Scene_GetPlacements().

◆ gJailThiefEvents

const struct SceneEvent gJailThiefEvents[]
Initial value:
= {
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define SCENE_EVENTS_END
#define FIND_ITEM(item)
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
@ SEARCH_CHEST
#define FIND_COINS(coins)
#define FLAG_JAIL_CHEST_COINS
Definition flags.h:583
#define FLAG_JAIL_CHEST_WATER_OF_LIFE
Definition flags.h:579
#define FLAG_JAIL_CHEST_ANTIDOTE
Definition flags.h:582
#define FLAG_JAIL_CHEST_ELIXIR
Definition flags.h:584
#define FLAG_JAIL_CHEST_SMOKE_BOMB
Definition flags.h:580
#define FLAG_JAIL_CHEST_LUCKY_MEDAL
Definition flags.h:581
@ ITEM_ELIXIR
Definition item_ids.h:48
@ ITEM_ANTIDOTE
Definition item_ids.h:47
@ ITEM_SMOKE_BOMB
Definition item_ids.h:67
@ ITEM_WATER_OF_LIFE
Definition item_ids.h:49
@ ITEM_LUCKY_MEDAL
Definition item_ids.h:70
@ ACTOR_THIEF_LEADER
static void Event_ReadLeaderMind(void)
Mind Read on the leader: he'll be out of this jail before you know it.
Definition vault_jail.c:158
@ ACTOR_LEFT_THIEF
Definition vault_jail.c:54
@ ACTOR_RIGHT_THIEF
Definition vault_jail.c:55
static void Event_LeftThiefRegretsEscape(void)
The left thief wishes they had escaped to the cave northeast of the Goma Range.
Definition vault_jail.c:132
static void Event_ReadRightThiefMind(void)
Mind Read on the right thief: is this for stealing Hammet's Shaman's Rod?
Definition vault_jail.c:174
static void Event_ReadLeftThiefMind(void)
Mind Read on the left thief: will he ever run free again?
Definition vault_jail.c:166
static void Event_RightThiefRegretsStaying(void)
The right thief shakes his head: they should have skipped town sooner.
Definition vault_jail.c:145
@ TRIGGER_CHEST_COINS
Definition vault_jail.c:48
@ TRIGGER_CHEST_ANTIDOTE
Definition vault_jail.c:47
@ TRIGGER_CHEST_LUCKY_MEDAL
Definition vault_jail.c:46
@ TRIGGER_LUNPA_DOOR
Definition vault_jail.c:43
@ TRIGGER_CHEST_ELIXIR
Definition vault_jail.c:49
@ TRIGGER_CHEST_WATER_OF_LIFE
Definition vault_jail.c:44
@ TRIGGER_CHEST_SMOKE_BOMB
Definition vault_jail.c:45
@ TRIGGER_VAULT_DOOR
Definition vault_jail.c:42
static void Event_LeaveForVault(void)
The party steps out of the jail into Vault.
Definition vault_jail.c:186
static void Event_LeaderSilencesThieves(void)
The jailed leader glares at each of his men and snaps at them, then turns to the party: they got us t...
Definition vault_jail.c:98

Definition at line 249 of file vault_jail.c.

Referenced by Scene_GetEvents().

◆ gJailPrisonerEvents

const struct SceneEvent gJailPrisonerEvents[]
Initial value:

Definition at line 279 of file vault_jail.c.

Referenced by Scene_GetEvents().