src/scene/log_rooms_b.c
Log rooms B (SceneIdLogRoomsB), a rooms map drawn in logs, holds only Vault's rooms: the town's houses, shops and inn once the party has reached Kalay. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "debug/debug.h"#include "field/script.h"#include "graphics/graphics.h"#include "scene/log_rooms_a.h"#include "scene/vault_item_icon.h"#include "game/system_call.h"#include "text/msg_ids.h"#include "shared/vault_leader_beside_bone_flag.c"#include "shared/vault_bone.c"#include "shared/vault_item_icon.c"
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { ACTOR_GEM_OWNER, ACTOR_GEM_OWNERS_WIFE, ACTOR_VILLAGER_HEARD … } | The townspeople, numbering the actor placement rows from ACTOR_FIRST_PLACED and named by what they say on the party's return. |
enum | anonymous enum { FLAG_VAULT_REVISIT_ISAAC_WELCOMED_BACK } | Set once the mayor has told Isaac the thieves escaped from jail. |
Functions
| Name | Description | |
|---|---|---|
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) | Gives the actor placements' condition 0 whether each lies inside the view bounds of the room entered (fdAssignViewFlags), so only that room's people appear. |
static void | scLogRoomsBShowStandingActorMessage (Sint32 actorId) | The actor stands still and says the selected message. |
static inline void | scLogRoomsBFaceAndSpeak (Sint32 actorId, Sint32 msg) | Faces the leader and shows this resident's dialogue while standing still. |
static void | scLogRoomsBWifeSawCatTakeGem (void) | In the gem owner's house, his wife says she saw the cat get up on the table and paw the gemstone, and then it was gone. |
static void | scLogRoomsBBoyDoubtsThievesWereFromLunpa (void) | In the house of the burly grey-haired man, a small boy points out that Dodonpa's henchmen never attacked Vault, so maybe the thieves were not from Lunpa after all. |
static void | scLogRoomsBHusbandLongsForColosso (void) | In the item shop, an old man with a cane says it is near time for Colosso to start in Tolbi, and he would like to go once more before he dies. |
static void | scLogRoomsBWelcomeIsaacBack (void) | The first time Isaac speaks to Vault's mayor after reaching Kalay, the mayor welcomes him back and warns that the thieves he caught have escaped from jail. |
static void | scLogRoomsBWarnOfThievesRevenge (void) | Spoken to again after his welcome, Vault's mayor tells the party that the escaped thieves really wanted revenge on them, so they should take good care of themselves. |
static void | scLogRoomsBUnusedOfferLeftoverBones (void) | Unused: the cook upstairs at the inn offers the party her leftover bones, but gives none. |
static void | scLogRoomsBOfferBones (void) | At Vault's inn, the girl at the inn offers Isaac leftover bones from dinner, or asks "You want more bones?" once he has had one (FLAG_VAULT_BONE_RECEIVED). |
static void | scLogRoomsBReadMindAndWelcomeIsaacBack (void) | Mind Read on Vault's mayor before he has welcomed Isaac back: he notices the party, and his welcome plays as if Isaac had spoken to him. |
static void | scLogRoomsBTalkToWeaponMerchant (void) | Spoken to across the counter, Vault's weapon merchant opens his shop. |
static void | scLogRoomsBTalkToArmorMerchant (void) | Spoken to across the counter, Vault's armor merchant opens his shop. |
static void | scLogRoomsBTalkToItemMerchant (void) | Spoken to across the counter, Vault's item merchant opens her shop. |
static void | scLogRoomsBTalkToInnkeeper (void) | Spoken to across the counter, Vault's innkeeper offers a room. |
static void | scLogRoomsBReadInnGirlsMind (void) | Mind Read on the girl at the inn: before she has given Isaac a Bone she is tempted to taste the cooking; after, she thinks Isaac really likes bones and wonders whether he has a calcium deficiency. |
const CUE * | scGetCues (void) | The rooms' doors, people, Mind Reads and the things to search. |
Sint32 | scInit (void) | Opens the room entered with the window transition. |
Variables
| Name | Description | |
|---|---|---|
extern SCENE_ENTRANCE | LogRoomsBEntrances [] | |
extern Uint32 | LogRoomsBExits [] | |
extern ACTOR_PLACE | LogRoomsBActorPlacements [] | |
extern CUE | LogRoomsBCues [] |
Description
Log rooms B (SceneIdLogRoomsB), a rooms map drawn in logs, holds only Vault's
rooms: the town's houses, shops and inn once the party has reached Kalay.
They replace the first visit's rooms (log_rooms_a.c), as SceneIdVaultRevisit
(vault_revisit.c) replaces the town. Each of its six house doors leads to the
entrance here named for the same door, and each room leads back out through
it.
The thieves have broken out of jail. The talk is of them and of Colosso, the festival about to begin in Tolbi.
The rooms, by entrance:
LOG_ROOMS_B_VAULT_REVISIT_SOUTHEAST, the gem owner's house. He wails that a cat ate his precious stone, and his wife says she saw the cat get up on the table and paw it. The big pale blue gem that stood on the round table in front of him on the first visit is gone:scInitdraws the table bare from a copy kept at map metatile (0, 120) of the overhead layer.LOG_ROOMS_B_VAULT_REVISIT_SOUTH, the house of a boy who doubts the thieves were from Lunpa.LOG_ROOMS_B_VAULT_REVISIT_SOUTHWESTandLOG_ROOMS_B_INN_FROM_INN_UPSTAIRS, the inn. The girl at the inn offers Bones there, and a Bone lies on the barrel beside her. Its stairs lead to the upstairs room, where a cook works.LOG_ROOMS_B_VAULT_REVISIT_EAST, the item shop.LOG_ROOMS_B_VAULT_REVISIT_NORTH, the weapon and armor shops.LOG_ROOMS_B_VAULT_REVISIT_NORTHWEST, the mayor's house. The mayor welcomes Isaac back and warns that the thieves have escaped (FLAG_VAULT_REVISIT_ISAAC_WELCOMED_BACK, an area flag, andFLAG_VAULT_WARNED_OF_ESCAPED_THIEVES). A Mind Read on him before that plays the welcome first.
The Bones are how the party gets the dog in Vault to show its hidden passage.
The girl's offer gives one Bone each time it is accepted.
FLAG_VAULT_BONE_RECEIVED, shared with log_rooms_a.c, changes only her words.
Searching the barrel beside her, with the Bone on it
(METATILE_BEHAVIOR_LOG_ROOMS_A_INN_BARREL, scVaultFindBone) gives another.
While Isaac stands beside that Bone, scVaultUpdateLeaderBesideBoneFlag sets
FLAG_VAULT_LEADER_BESIDE_BONE, which turns her talk row off, so that the A
button there picks the Bone up instead of talking to her.
The shopkeepers open their shops only when spoken to across the counter.
A jar, two barrels and a wooden box keep the first visit's flags, so what the party took then stays taken. Two bookcases can be read.
Enumerations in detail
anonymous enum
enum { ACTOR_GEM_OWNER, ACTOR_GEM_OWNERS_WIFE, ACTOR_VILLAGER_HEARD_PRISONERS, ACTOR_BOY, … }
The townspeople, numbering the actor placement rows from ACTOR_FIRST_PLACED
and named by what they say on the party's return.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_GEM_OWNER | ACTOR_FIRST_PLACED | A young man whose precious stone, he says, a cat ate. |
ACTOR_GEM_OWNERS_WIFE | A woman with fair hair. | |
ACTOR_VILLAGER_HEARD_PRISONERS | A burly grey-haired man in the boy's house. | |
ACTOR_BOY | A small boy. | |
ACTOR_COLOSSO_HUSBAND | An old man with a cane who would like to see Colosso once more. | |
ACTOR_COLOSSO_WIFE | An old woman. | |
ACTOR_BOY_ON_THE_THIEVES_ESCAPE | A small boy in the mayor's house. | |
ACTOR_GIRL_CURIOUS_ABOUT_THE_FESTIVAL | A little girl in the mayor's house. | |
ACTOR_MAYOR | The mayor, an old man with white hair. | |
ACTOR_MAYORS_WIFE | A woman in a green dress. | |
ACTOR_GIRL_AT_THE_INN | The girl at the inn, as the Bone's description calls her, a young woman with fair hair. | |
ACTOR_VAULT_WEAPON_MERCHANT | ||
ACTOR_VAULT_ARMOR_MERCHANT | ||
ACTOR_VAULT_ITEM_MERCHANT | ||
ACTOR_VAULT_INNKEEPER | A man with dark hair behind the inn's counter. | |
ACTOR_COOK | A woman in an apron, upstairs at the inn. |
Definition at line 67 of file log_rooms_b.c.
anonymous enum
enum { FLAG_VAULT_REVISIT_ISAAC_WELCOMED_BACK }
Set once the mayor has told Isaac the thieves escaped from jail.
| Enumerator | Value | Description |
|---|---|---|
FLAG_VAULT_REVISIT_ISAAC_WELCOMED_BACK | FLAG_AREA_TEMP(0x00) |
Definition at line 95 of file log_rooms_b.c.
Functions in detail
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References LogRoomsBEntrances.
Definition at line 102 of file log_rooms_b.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 107 of file log_rooms_b.c.
scGetExits
const Uint32 *scGetExits(void)
References LogRoomsBExits.
Definition at line 112 of file log_rooms_b.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Gives the actor placements' condition 0 whether each lies inside the view
bounds of the room entered (fdAssignViewFlags), so only that room's people
appear.
References fdAssignViewFlags() and LogRoomsBActorPlacements.
Definition at line 120 of file log_rooms_b.c.
scLogRoomsBShowStandingActorMessage
static void scLogRoomsBShowStandingActorMessage(Sint32 actorId)
The actor stands still and says the selected message.
References fdActorSetAnimation(), fdScriptEnd(), fdScriptShowMessage(), fdScriptStart() and Sint32.
Referenced by scLogRoomsBFaceAndSpeak().
Definition at line 129 of file log_rooms_b.c.
scLogRoomsBFaceAndSpeak
static inline void scLogRoomsBFaceAndSpeak(Sint32 actorId, Sint32 msg)
Faces the leader and shows this resident's dialogue while standing still.
References fdActorTurnToFaceEachOther(), fdScriptSetMessageId(), scLogRoomsBShowStandingActorMessage() and Sint32.
Referenced by scLogRoomsBBoyDoubtsThievesWereFromLunpa(), scLogRoomsBHusbandLongsForColosso(), scLogRoomsBUnusedOfferLeftoverBones(), scLogRoomsBWarnOfThievesRevenge() and scLogRoomsBWifeSawCatTakeGem().
Definition at line 138 of file log_rooms_b.c.
scLogRoomsBWifeSawCatTakeGem
static void scLogRoomsBWifeSawCatTakeGem(void)
In the gem owner's house, his wife says she saw the cat get up on the table and paw the gemstone, and then it was gone.
References scLogRoomsBFaceAndSpeak().
Referenced by LogRoomsBCues.
Definition at line 147 of file log_rooms_b.c.
scLogRoomsBBoyDoubtsThievesWereFromLunpa
static void scLogRoomsBBoyDoubtsThievesWereFromLunpa(void)
In the house of the burly grey-haired man, a small boy points out that Dodonpa's henchmen never attacked Vault, so maybe the thieves were not from Lunpa after all.
References scLogRoomsBFaceAndSpeak().
Referenced by LogRoomsBCues.
Definition at line 155 of file log_rooms_b.c.
scLogRoomsBHusbandLongsForColosso
static void scLogRoomsBHusbandLongsForColosso(void)
In the item shop, an old man with a cane says it is near time for Colosso to start in Tolbi, and he would like to go once more before he dies.
References scLogRoomsBFaceAndSpeak().
Referenced by LogRoomsBCues.
Definition at line 162 of file log_rooms_b.c.
scLogRoomsBWelcomeIsaacBack
static void scLogRoomsBWelcomeIsaacBack(void)
The first time Isaac speaks to Vault's mayor after reaching Kalay, the mayor welcomes him back and warns that the thieves he caught have escaped from jail. Asked whether they have run into them, a Yes has him say to watch out for suspicious shadows, a No that it's good, but be careful.
References fdActorSetAnimation(), fdActorSetAnimationAndWait(), fdActorShowEmote(), fdActorTurnToFaceEachOther(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessageThenWait(), fdScriptStart(), fdScriptWait() and gmFlagSet().
Referenced by LogRoomsBCues and scLogRoomsBReadMindAndWelcomeIsaacBack().
Definition at line 172 of file log_rooms_b.c.
scLogRoomsBWarnOfThievesRevenge
static void scLogRoomsBWarnOfThievesRevenge(void)
Spoken to again after his welcome, Vault's mayor tells the party that the escaped thieves really wanted revenge on them, so they should take good care of themselves.
References scLogRoomsBFaceAndSpeak().
Referenced by LogRoomsBCues.
Definition at line 203 of file log_rooms_b.c.
scLogRoomsBUnusedOfferLeftoverBones
static void scLogRoomsBUnusedOfferLeftoverBones(void)
Unused: the cook upstairs at the inn offers the party her leftover bones, but gives none.
References scLogRoomsBFaceAndSpeak().
Referenced by LogRoomsBCues.
Definition at line 210 of file log_rooms_b.c.
scLogRoomsBOfferBones
static void scLogRoomsBOfferBones(void)
At Vault's inn, the girl at the inn offers Isaac leftover bones from dinner,
or asks "You want more bones?" once he has had one
(FLAG_VAULT_BONE_RECEIVED). Accepting gives a Bone, unless his bags are full
and she calls him a greedy lad.
References fdActorFaceDirection(), fdActorRunRepeatedMotion(), fdActorSetAnimationAndWait(), fdActorTurnToFaceEachOther(), fdItemDisplayShowItem(), fdPartyInventoryGiveItem(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmFlagGet(), gmFlagSet() and gmPartyInventoryHasSpace().
Referenced by LogRoomsBCues.
Definition at line 219 of file log_rooms_b.c.
scLogRoomsBReadMindAndWelcomeIsaacBack
static void scLogRoomsBReadMindAndWelcomeIsaacBack(void)
Mind Read on Vault's mayor before he has welcomed Isaac back: he notices the party, and his welcome plays as if Isaac had spoken to him.
References fdActorGet(), fdActorRunRepeatedMotion(), fdActorSetMovementTypeById(), fdScriptEnd(), fdScriptStart() and scLogRoomsBWelcomeIsaacBack().
Referenced by LogRoomsBCues.
Definition at line 275 of file log_rooms_b.c.
scLogRoomsBTalkToWeaponMerchant
static void scLogRoomsBTalkToWeaponMerchant(void)
Spoken to across the counter, Vault's weapon merchant opens his shop. From anywhere else he talks of the river of fire on the other side of Mt. Aleph.
References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and mnShopRun().
Referenced by LogRoomsBCues.
Definition at line 295 of file log_rooms_b.c.
scLogRoomsBTalkToArmorMerchant
static void scLogRoomsBTalkToArmorMerchant(void)
Spoken to across the counter, Vault's armor merchant opens his shop. From anywhere else he says the volcano on Mt. Aleph has torn the continent in two.
References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and mnShopRun().
Referenced by LogRoomsBCues.
Definition at line 318 of file log_rooms_b.c.
scLogRoomsBTalkToItemMerchant
static void scLogRoomsBTalkToItemMerchant(void)
Spoken to across the counter, Vault's item merchant opens her shop. From anywhere else she says they haven't been getting many customers lately.
References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and mnShopRun().
Referenced by LogRoomsBCues.
Definition at line 341 of file log_rooms_b.c.
scLogRoomsBTalkToInnkeeper
static void scLogRoomsBTalkToInnkeeper(void)
Spoken to across the counter, Vault's innkeeper offers a room. From anywhere else he grumbles that there is nothing to do.
References fdActorGet(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and mnInnCheckIn().
Referenced by LogRoomsBCues.
Definition at line 364 of file log_rooms_b.c.
scLogRoomsBReadInnGirlsMind
static void scLogRoomsBReadInnGirlsMind(void)
Mind Read on the girl at the inn: before she has given Isaac a Bone she is tempted to taste the cooking; after, she thinks Isaac really likes bones and wonders whether he has a calcium deficiency.
References fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart() and gmFlagGet().
Referenced by LogRoomsBCues.
Definition at line 388 of file log_rooms_b.c.
scGetCues
const CUE *scGetCues(void)
The rooms' doors, people, Mind Reads and the things to search.
References LogRoomsBCues.
Definition at line 404 of file log_rooms_b.c.
scInit
Sint32 scInit(void)
Opens the room entered with the window transition. In the gem owner's house the table is drawn bare; at the inn the Bone is set on the barrel beside the girl at the inn.
References fdActorGet(), fdMapGridCopyMetatilesTo(), MainRoutineStateWork, scVaultPlaceItemIcon(), scVaultUpdateLeaderBesideBoneFlag(), Sint32 and sySetTickEvent().
Definition at line 412 of file log_rooms_b.c.
Variables in detail
LogRoomsBEntrances
extern SCENE_ENTRANCE LogRoomsBEntrances[]
SCENE_ENTRANCE LogRoomsBEntrances[]
Referenced by scGetEntrances().
Definition at lines 60 and 441 of file log_rooms_b.c.
LogRoomsBExits
extern Uint32 LogRoomsBExits[]
Uint32 LogRoomsBExits[]
Referenced by scGetExits().
Definition at lines 61 and 510 of file log_rooms_b.c.
LogRoomsBActorPlacements
extern ACTOR_PLACE LogRoomsBActorPlacements[]
ACTOR_PLACE LogRoomsBActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 62 and 540 of file log_rooms_b.c.
LogRoomsBCues
extern CUE LogRoomsBCues[]
CUE LogRoomsBCues[]
References scLogRoomsBBoyDoubtsThievesWereFromLunpa(), scLogRoomsBHusbandLongsForColosso(), scLogRoomsBOfferBones(), scLogRoomsBReadInnGirlsMind(), scLogRoomsBReadMindAndWelcomeIsaacBack(), scLogRoomsBTalkToArmorMerchant(), scLogRoomsBTalkToInnkeeper(), scLogRoomsBTalkToItemMerchant(), scLogRoomsBTalkToWeaponMerchant(), scLogRoomsBUnusedOfferLeftoverBones(), scLogRoomsBWarnOfThievesRevenge(), scLogRoomsBWelcomeIsaacBack(), scLogRoomsBWifeSawCatTakeGem() and scVaultFindBone().
Referenced by scGetCues().