35#include "text/msg_ids.h"
44#define VAULT_INTERIORS_ENTRY_ACTOR_Z PIXELS(451)
46#define VAULT_INTERIORS_ENTRY_ACTOR_Z PIXELS(464)
50#define VAULT_INTERIORS_CORNERED_FRAMES 30
129 s32 next,
const s32 *actions);
190 savedMotionFlags = *flags;
208 *flags = savedMotionFlags;
239 VaultInteriors_TryJumpTo(pos);
254 VaultInteriors_TryJumpTo(pos);
272 if ((crate->
x.
fixed >> 20) == 42) {
290 if (leaderFacing >= 0xa001 && leaderFacing <= 0xdfff) {
311 if (leaderFacing >= 0xa001 && leaderFacing <= 0xdfff) {
332 if (leaderFacing >= 0xa001 && leaderFacing <= 0xdfff) {
448 if (leaderFacing >= 0xa001 && leaderFacing <= 0xdfff) {
497 s32 thankedForHelpingFlag;
547 if ((
u32)((suspect->
facing & 0xf000) - 0x5000) <= 0x6000) {
548 routeState = (
s16 *)&suspect->
timer;
549 routeIndex = *routeState;
550 if (routeIndex <= 2) {
553 *(
u16 *)routeState = *(
u16 *)routeState + 1;
557 nextRoute = *(
u16 *)routeState - 1;
558 *(
u16 *)routeState = nextRoute;
561 routeState = (
s16 *)&suspect->
timer;
562 routeIndex = *routeState;
563 if (routeIndex > 2) {
566 *(
u16 *)routeState = *(
u16 *)routeState + 1;
570 nextRoute = *(
u16 *)routeState - 1;
571 *(
u16 *)routeState = nextRoute;
574 if (*routeState > 5) {
576 *(
u16 *)routeState = nextRoute;
578 if (*routeState < 0) {
580 *(
u16 *)routeState = nextRoute;
589 s32 routePair,
u16 routeDelta) {
593 actor->
timer = actor->
timer - routePair * 2 + routeDelta;
608 routePair = actor->
timer >> 1;
614 switch (actor->
timer) {
953 message = MsgVaultThankHelpBelieve;
1134 base = MsgVaultVaultCutFree;
1289 base = MsgVaultVaultThievesCaught;
1439 if (actor24->
timer <= 3) {
1444 if (actor25->
timer <= 2) {
1464 base = MsgVaultTheyreActingSuspiciousSomethingsNot;
1554 suspect->
timer = routeIndex;
1560 suspect->
timer = routeIndex;
1677 suspect->
timer = routeIndex;
1683 suspect->
timer = routeIndex;
1697 s32 persistedWithQuestions;
1758 persistedWithQuestions = 0;
1764 persistedWithQuestions = 0;
1772 persistedWithQuestions = 0;
1789 persistedWithQuestions = 1;
1794 if (persistedWithQuestions == 0) {
1884 s32 next,
const s32 *actions) {
1887 if (suspect->
timer == expected) {
1889 suspect->
timer = next;
2202 thirdThiefSprite = actor->sprite;
2485 aftermath = MsgVaultYouIsaacRightWontForget;
2721 u8 *pauseFlag = &temporaryActor->
paused;
2818 rod = MsgVaultIvanGotShamansRod;
2839 u16 *slot = &
event->message;
2864 if (actor !=
NULL) {
2947 for (i = 0; i <= 36; i++, stop++) {
2965 s16 *requestedFacing) {
2968 s32 nearestDifference;
2970 s32 angleDifference;
2971 u32 connectionIndex;
2972 u16 connectionFacing;
2975 chosenFacing = *requestedFacing;
2977 nearestDifference = 0x8000;
2978 for (connectionIndex = 0; connectionIndex <= 2;
2979 connectionIndex++, connection++) {
2980 connectionFacing = connection->
facing << 8;
2981 angleDifference = (
s16)(connectionFacing - *requestedFacing);
2982 if (angleDifference < 0)
2983 angleDifference = -angleDifference;
2987 if (*(
volatile u8 *)&connection->
stopIndex != 0xff &&
2988 angleDifference < nearestDifference) {
2989 nearestDifference = angleDifference;
2991 chosenFacing = (
s16)connectionFacing;
2996 *requestedFacing = chosenFacing;
3035 ax = (ax -
x) >> 16;
3036 az = (az -
z) >> 16;
3037 if (ax * ax + az * az <= 0x100)
3091 s16 facingDifference;
3105 if (work->
blockedSteps > 0 && dx * dx + dz * dz <= 400 &&
3106 (facingDifference = (
u16)facing - angle) > -0x1000 &&
3107 facingDifference < 0x1000) {
3111 facingDifference = 0;
3113 }
else if (dx * dx + dz * dz > 64) {
3137 currentFacing = actor->
facing;
3138 facing = ((turn - 0x30000000) >> 16) + currentFacing;
3141 facing = actor->
facing + 0x8000;
3163 currentFacing = actor->
facing;
3164 facing = ((turn - 0x30000000) >> 16) + currentFacing;
3167 facing = actor->
facing + 0x8000;
3229#define NO_CONNECTION {255, 0xff, {0, 0}}
3230#define CONNECTION(stop, direction) {stop, (direction) >> 8, {0, 0}}
3603 { 0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
3604 { 5,
CONDITION_ALWAYS, 192, 0, 220,
FACING_NORTH, 0, 32, 0, 272, 240, 0 },
3605 { 6,
CONDITION_ALWAYS, 432, 0, 254,
FACING_NORTH, 0, 288, 0, 528, 272, 0 },
3606 { 7,
CONDITION_ALWAYS, 720, 0, 782,
FACING_NORTH, 0, 432, 576, 800, 800, 0 },
3607 { 8,
CONDITION_ALWAYS, 624, 0, 236,
FACING_NORTH, 0, 560, 32, 848, 256, 0 },
3608 { 9,
CONDITION_ALWAYS, 144, 0, 492,
FACING_NORTH, 0, 16, 288, 256, 512, 0 },
3609 { 10,
CONDITION_ALWAYS, 416, 0, 526,
FACING_NORTH, 0, 320, 288, 592, 544, 0 },
3610 { 11,
CONDITION_ALWAYS, 744, 0, 640,
FACING_SOUTH, 0, 432, 576, 800, 800, 0 },
3611 { 12,
CONDITION_ALWAYS, 358, 0, 632,
FACING_SOUTH, 0, 32, 576, 400, 776, 0 },
3612 { 13,
CONDITION_ALWAYS, 648, 0, 424,
FACING_SOUTH, 0, 560, 320, 800, 480, 0 },
3613 { 14,
CONDITION_ALWAYS, 704, 0, 408,
FACING_WEST, 0, 560, 320, 800, 480, 0 },
3614 { 15,
CONDITION_ALWAYS, 768, 0, 408,
FACING_EAST, 0, 712, 288, 952, 496, 0 },
3615 { 16,
CONDITION_ALWAYS, 792, 0, 432,
FACING_NORTH, 0, 712, 288, 952, 496, 0 },
3616 { 17,
CONDITION_ALWAYS, 792, 0, 432,
FACING_NORTH, 0, 712, 288, 952, 496, 0 },
Ability numbers, named from the English release.
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
void ObjectMotion_WaitForAnimationChange(u32 objectId)
Waits, at most 90 frames, for an actor's animation to change.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
const struct ScenePlacement * Scene_GetPlacements(void)
const struct SceneEntrance * Scene_GetEntrances(void)
const struct SceneEvent * Scene_GetEvents(void)
const u32 * Scene_GetExits(void)
Both scenes share one exit table.
const struct SceneRegion * Scene_GetRegions(void)
s32 Scene_Initialize(void)
Sets up whichever scene is being entered and runs its arrival events.
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
Which units are in a battle, and the Djinn recovery list.
static void Event_TalkToInnkeeper(void)
Opens the inn across the counter, or discusses the curse in Kolima.
The task scheduler: tasks, their order and the scheduler's state.
The engine calls the debug menus import, and their palette swatch tiles.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
static s32 FieldObject_CheckMovementCollision(struct FieldActor *actor, struct FieldPosition *position)
static void FieldMap_SetViewBounds(s32 minX, s32 minY, s32 maxX, s32 maxY)
void FieldScene_PrepareActors(struct ScenePlacement *entry)
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_ObjectSetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
static s32 Event_OpenMessage(s32 speaker, s32 flags)
void Engine_ActorFaceActor(s32 actor, s32 target, s32 frames)
s32 Engine_LeaderCheckAhead(void)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Object_SetMode(struct FieldActor *object, s32 animation)
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
void Engine_PsynergyBegin(s32 ability, s32 flags)
struct FieldActor * Engine_ActorLookup(s32 actor)
static void Actor_SetBuiltinAction(s32 actor, s32 action)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_PsynergyRaiseHands(void)
void Engine_PsynergyLowerHands(void)
void Engine_ActorMoveToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
static void Actor_MoveToAndWait(s32 actor, s32 x, s32 z)
void Engine_ItemShowFound(s32 item, s32 height)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_InnOpen(s32 inn, s32 keeper)
void Engine_EventCloseScreen(void)
void Engine_ObjectDispatchRelease(struct FieldActor *object)
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_CameraWaitForMove(void)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_ActorWaitForMove(s32 actor)
void Engine_CameraFollowActor(s32 actor, s32 keep_position)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
static void Event_ShowMessage(s32 speaker, s32 flags)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
static void Map_CopyCells(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_PsynergyPlayEffect(s32 effect)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_MapRedraw(void)
void Engine_ShopOpen(s32 shop, s32 keeper)
static void Camera_MoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
void Engine_PsynergySetTarget(s32 caster, s32 target)
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
#define SCENE_TRANSITION(style, variant)
@ ACTOR_FACES_MOTION
turns toward its velocity, 1/16 turn a frame
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define IF_FLAG_SET(flag)
#define FIND_MESSAGE(message)
#define SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define FIND_COINS(coins)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static s32 Task_AddCallback(void(*callback)(void), s32 priority)
Calls the main-image scheduler through engine_call.h.
static s32 FieldScheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 priority)
Calls the main-image scheduler through engine_call.h.
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Game flags, named where their meaning is shown.
#define FLAG_VAULT_IVAN_JOINED_ROD_SEARCH
Set when the party agrees to help Ivan find the rod; while it is set and the thieves are free,...
#define FLAG_VAULT_BONE_RECEIVED
#define FLAG_MENUS_RAISE_EVENT
While set, opening the field menu or the pause menu, or pressing a shortcut, raises event 250 instead...
#define FLAG_VAULT_MET_IVAN
Set when Ivan first shows the party his strange powers at the mayor's.
#define FLAG_VAULT_INTERIORS_BOX_MINT
#define FLAG_VAULT_SUSPECTS_MIND_READ
Set once Ivan has read the minds of the two cornered suspects.
#define FLAG_VAULT_THIEVES_JAILED
#define FLAG_VAULT_WATER_OF_LIFE_RECEIVED
Set once the mayor has given the party the Water of Life.
#define FLAG_VAULT_SUSPECTS_APPROACHED
Set when the party first approaches the two suspects at the inn.
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_VAULT_CRATE_MOVED
Set once the crate is pushed aside, opening the passage behind it.
#define FLAG_VAULT_INTERIORS_BARREL_COINS
#define FLAG_VAULT_INTERIORS_JAR_COINS
#define FLAG_VAULT_MAYOR_THANKED_PARTY
Set once the mayor has thanked the party for helping Ivan.
#define FLAG_VAULT_THIEVES_CONFRONTED
Set as the three thieves are confronted in the attic, before the battle.
#define FLAG_VAULT_INTERIORS_BARREL_SLEEP_BOMB
#define FLAG_SCENE_TEMP_50
GameState, the game's state: play time, coins, the scene and the leader's position,...
#define Battle_SetStart(mode)
Sets the battle start type.
struct GameState gGameState
The screen blend's globals and the graphics routines.
The main-image routines scene overlays import.
s32 PartyInventory_HasSpace(void)
Returns 1 when the selected character or any party member has a free inventory slot.
Item numbers, named from the English release.
static void Event_TalkToArmorMerchant(void)
After Lunpa reopens, across the counter, the armor shop; otherwise small talk.
static void Event_TalkToItemMerchant(void)
Across the counter, the item shop; otherwise small talk.
static void Event_TalkToWeaponMerchant(void)
After Lunpa reopens, across the counter, the weapon shop; otherwise small talk.
Small statement macros both games use for positions, velocities and bounds.
#define SET_POSITION(p, px, py, pz)
Sets the position or the velocity of a particle, a piece of debris or an object in one statement.
s32 ArcTan2(s32 x, s32 y)
Returns the angle of the vector (x, y), in 1/65536 turns, measured from the y axis: 0 along +y,...
The heaps: allocating and freeing blocks.
void Ui_SetBank15PaletteAndClearRenderMode(void)
Stops the BG0 scanline scroll and restores BG palette 15.
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_SET(w, v)
Write a work value.
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_POS(x, y, z)
Set position.
#define SC_SYNC
Wait for arrival.
#define SC_MOVE(x, y, z)
Move toward the target.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
#define SC_END
Return to the main script.
s32 BattleFx_PlayCueAndStartEmitterOnTarget(s32 actor, s32 target, s32 itemId)
If actor target exists, plays SE_124, gives it animation 4 and, 12 frames later, shows itemId in fron...
void Leader_StopMoving(void)
Stops the leader where it stands: no horizontal velocity, the normal walking speed (1....
void Party_RemoveOwnerRestored(s32 unit)
Takes unit out of the party, fully restoring its HP and PP and curing its poison.
void Event_PrepareObjectAndApplyValue(s32 unit, s32 announce)
Adds unit to the party.
void BattleEffect_CleanupSceneObjects(void)
Ends a Psynergy effect: frees the effect slots still in use and, unless another effect is being resol...
#define ACTOR_ACTION_IDLE
void Field_RequestBattleFromEncounterTable(s32 zoneNo, s32 slotNo)
Sets up a battle with enemy group slot of encounter table zone.
void Event_SetDefeatDestination(s32 scene, s32 entrance)
Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance).
void Event_SetNextDestination(s32 scene, s32 entrance)
Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Scene numbers, named after their places.
char SceneId_VaultInteriors
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
Song and sound effect ids, indices into gSound_SongTable.
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_ActorShowEmote()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
Vault's interiors, before and after the thieves are caught: an item lying on the floor,...
void Vault_PlaceItemIcon(s32 item, s32 fixed_x, s32 fixed_y, s32 fixed_z)
Creates object 22 at the 16.16 position and draws it as the item's icon: the sprite's own animation i...
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationSpritePart image
u16 priority
2 when created
u8 djinnOwnedCounts[4]
the Djinn held in each element, at most 10
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s16 raisedTrigger
a raised event for Scene_RunRaisedEvent
s32 startTransition
SCENE_TRANSITION(style, variant).
s16 blockedSteps
frames the leader has pushed against something
s16 touchedTrigger
the step event a touch or exit event answers
s32 transitionFrames
frames
u16 message
the next message, advanced as each window opens
A field actor: a person or thing on the field with a position, motion toward a target,...
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
s32 speed
speed limit, 16.16 fixed-point pixels per frame
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 steeringFlags
ActorSteeringFlag bits.
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
union FieldCoordinate x
16.16 fixed-point pixels
s32 targetZ
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 paused
nonzero skips its script and motion, not its update
union FieldCoordinate y
16.16 fixed-point pixels
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
s32 terrainHeight
16.16 fixed-point pixels
s32 velocityY
16.16 fixed-point pixels per frame
union FieldCoordinate z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
s32 targetY
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
s32 z
16.16 fixed-point pixels
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
Values that differ by patch level or language, chosen once for their code.
The integer types, TRUE, UNUSED and the fixed-address macros.
A field coordinate, read whole or as its fraction and its whole pixels.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...
Vault's interiors, before and after the thieves are caught: the Bone left on the floor of the house w...
static void Vault_FindBone(void)
Searching cell code 41 beside the bone giver takes a Bone after the thieves are jailed.
Vault and its interiors: Ivan hands back Isaac's Djinni before he leaves the party.
static s32 Vault_ReturnIsaacsDjinni(void)
Brings every Djinni back from recovery (twenty rounds of it), then, if Ivan holds the first Venus Dji...
s32 gVaultInteriors_PairScriptG[]
static void VaultInteriors_OpenWindowTransition(void)
Opens the window transition and waits one frame after it finishes.
struct SceneEntrance gVaultInteriors_Entrances[]
static void VaultInteriors_ApplySecondSuspectRoute(struct FieldActor *actor, s32 scriptRow, s32 routePair, u16 routeDelta)
Selects a response script and advances the second suspect's route state.
s32 gVaultInteriors_PairScriptM[]
VaultInteriorsRaisedEvent
The chase adds the blocked-suspect mask (1 the leader, 2 the thief) to 200.
@ VAULT_INTERIORS_LEADER_CORNERED
@ VAULT_INTERIORS_BOTH_CORNERED
@ VAULT_INTERIORS_CORNERED_EVENT_BASE
@ VAULT_INTERIORS_THIEF_CORNERED
s32 gVaultInteriors_PairScriptR[]
s32 * gVaultInteriors_IdleActions[]
static void Event_MeetIvan(void)
Talking to Ivan at the mayor's: the first time, he reads the two's minds, admits his strange powers a...
s32 gVaultInteriors_PairScriptK[]
static void VaultInteriors_StandAndShowMessage(s32 x)
Stands the speaker, faces the leader, and shows the selected message.
static void VaultInteriors_BeginMindRead(s32 casterId, s32 targetId)
Begins Mind Read, chooses its target, and shows its opening effect.
s32 gVaultInteriors_PairScriptJ[]
static void VaultInteriors_SetPartyImagePriority(void)
Sets the three party images to the priority used during the mind-reading scene.
s32 gVaultInteriors_PairScriptC[]
struct SceneEvent gVaultInteriors_Events[]
static void Event_ReadMindOnThieves(void)
Mind Read on Grandpa: could they be thieves?
static void Event_SearchEmptyBarrel(void)
Isaac checks the barrel but doesn't find anything.
s32 gVaultInteriors_FirstThiefEntryScript[]
static void VaultInteriors_MoveActorToStop(struct FieldActor *actor, struct VaultInteriorsStop *stop)
Sets the actor's destination to the route stop's cell center.
s32 gVaultInteriors_VaultScriptD[]
s32 gVaultInteriors_ActionTable[]
static void VaultInteriors_ReturnStolenGoods(void)
Returns the stolen goods and rod, thanks the party, and clears the attic.
s32 gVaultInteriors_VaultScriptA[]
#define CONNECTION(stop, direction)
s32 gVaultInteriors_PairScriptH[]
static void VaultInteriors_FaceActorAndWait(s32 actorId, s32 targetId, s32 waitFrames)
static void VaultInteriors_ShowMessageAndWait(s32 actorId, s32 waitFrames)
s32 gVaultInteriors_PairScriptO[]
static void Event_OfferBones(void)
The bone giver offers leftover bones from dinner; a yes gets a Bone if there is room,...
static void Event_FreeRooferAndConfrontThieves(void)
In the loft, Isaac cuts the roofer free; the three thieves arrive, boast of Lunpa and Dodonpa,...
static void Event_DiscussSuspiciousGuests(void)
Stepping out, the party talks it over: Ivan can't read their minds while they run; Garet tells Isaac ...
static void Event_ReadMindOnRock(void)
Mind Read on the wife: let me see that rock, or maybe it is worthless.
static void Event_ReadBoneGiverMind(void)
Mind Read on the bone giver: the master and his wife are blinded by money; after the thieves are jail...
static void Event_TalkAboutMissingThings(void)
Talks about missing things, or, after the thieves are jailed, says they hid the treasure in the loft ...
u16 gVaultInteriors_StopTimer
s32 gVaultInteriors_VaultScriptC[]
static void VaultInteriors_FaceSuspectsTowardLeader(void)
Keeps both suspects facing the leader while they evade the party.
static void Event_AdvanceSuspectRoutes(void)
The leader stepping on one of the route triggers 11 to 18 moves the fleeing suspects on to their next...
static void VaultInteriors_AdvanceSuspectRoute(s32 actor, s32 expected, s32 next, const s32 *actions)
Installs a route script only when the suspect is in its expected state.
static void VaultInteriors_FaceEachOtherAndWait(s32 firstId, s32 secondId, s32 waitFrames)
s32 gVaultInteriors_PairScriptE[]
struct SceneEvent gVaultInteriors_AtticEvents[]
static s32 VaultInteriors_CheckStopOccupancy(struct VaultInteriorsStop *stop)
Reserves a full cell around the leader and half a cell around each actor following a route.
static void VaultInteriors_ConfrontThievesAgain(void)
Arranges the attic confrontation and restarts the thieves' battle.
static s32 VaultInteriors_IsActorWithinSixteenPixels(s32 x, s32 z, s32 id)
Checks whether an actor's destination or current position lies within sixteen pixels.
s32 * gVaultInteriors_ResponseScripts[]
static void VaultInteriors_UpdateActorStops(void)
Steers Ivan and both suspects through the graph and detects a sustained cornering.
static void Event_CheckCrateMoved(void)
Once the crate has been moved aside to column 42, the passage behind it opens.
s32 gVaultInteriors_PairScriptI[]
s32 gVaultInteriors_PairScriptD[]
static void VaultInteriors_LoseToThieves(void)
Shows the thieves' reaction after the party loses their battle: the party lies beaten and the thieves...
static void Event_SuspectedThiefDodges(void)
The suspected thief cries out and runs to his next spot.
static void Event_OfferIvansSecret(void)
Offers Ivan's secret.
static void Event_TalkAboutRocks(void)
The gem owner's wife wishes their rocks were gems, or, after the thieves are jailed,...
static void Event_JumpAcrossRoofGap(void)
Facing north or south across the gap in the roof, the leader jumps it.
static void VaultInteriors_EndMindRead(void)
Finishes Mind Read and releases its scene effect objects.
s32 gVaultInteriors_PairScriptQ[]
struct ScenePlacement gVaultInteriors_AtticPlacements[]
s32 gVaultInteriors_VaultScriptE[]
static void Event_MayorGivesWaterOfLife(void)
After the thieves are jailed, the mayor thanks Isaac and gives the promised Water of Life,...
struct SceneRegion gVaultInteriors_Regions[]
static void Event_SearchEmptyChest(void)
Isaac checks the chest, but it is empty.
static void VaultInteriors_AskYesNoAndShowReply(s32 x)
Faces the leader and selects the next reply when the answer is no.
s32 gVaultInteriors_VaultScriptB[]
s32 gVaultInteriors_SecondThiefEntryScript[]
static void Event_AskAboutDefeatingThieves(void)
Asks about defeating the thieves. "I heard you defeated those thieves!".
static void VaultInteriors_DiscussMindReading(void)
Shows the party's branching conversation about what Ivan learned: the stolen goods are hidden in the ...
s32 gVaultInteriors_PairScriptP[]
static void Event_ChildAsksAboutTravel(void)
The child asks about travel.
#define VAULT_INTERIORS_CORNERED_FRAMES
A cornering lasts half a second before the chase raises an event.
s32 gVaultInteriors_PairScriptL[]
struct SceneEvent gVaultInteriors_EventsAfterThieves[]
u32 gVaultInteriors_Exits[]
static s32 VaultInteriors_IsActorWithinEightPixels(s32 x, s32 z, s32 id)
Checks whether an actor's destination or current position lies within eight pixels.
static void Event_GoToEntrance11(void)
The party walks through to entrance 11.
static void Event_LeaveAttic(void)
Leaving the loft before the thieves are confronted, the party hears the roofer groan.
static void VaultInteriors_IvanJoinsRodSearch(void)
Ivan thanks them, they exchange names, and he shows Isaac and Garet Mind Read; he joins the party.
static void Event_ClimbToAttic(void)
The party climbs up into the inn's loft.
struct VaultInteriorsStop gVaultInteriors_Stops[]
static void Event_ChildWorriesAboutFather(void)
The child's father worries about the prisoners from Lunpa.
s32 gVaultInteriors_PairScriptA[]
static void Event_GaretRefusesToLeave(void)
Garet refuses to leave.
static void VaultInteriors_StartActorStops(void)
Arranges the chase, constrains its camera, and starts the route callback.
static void Event_SuspectedLeaderDodges(void)
The suspected leader cries out and runs to his next spot, chosen by the way he faces and where he is ...
static struct VaultInteriorsStop * VaultInteriors_FindStopAtPosition(s32 *position)
Finds the route node containing the actor's position on the eight-pixel grid.
s32 gVaultInteriors_PairScriptN[]
@ ACTOR_WOULD_BE_HELPER
"I could help Ivan if I were just a little older."
@ ACTOR_INN_STAFF
Works at the inn.
@ ACTOR_CRATE
pushed aside to open a passage
@ ACTOR_GRANDPAS_WIFE
Says Grandpa keeps wondering if anything was stolen.
@ ACTOR_GEM_OWNER
a sparkling rock was blown here from the volcano
@ ACTOR_MAYOR
Ivan's host; his wife calls him the mayor.
@ ACTOR_GRANDPA
Wonders what was stolen. "Is it just me, or am I missing something?".
@ ACTOR_WARY_NEIGHBOR
Distrusts the man next door. "My neighbor creeps me out.".
@ ACTOR_SUSPECTED_LEADER
The two guests at the inn the town suspects: the thieves' leader and one of his men.
@ ACTOR_CHILD
Asks about travel. "Hey, mister! Is it fun to see strange new places?".
@ ACTOR_SECRET_KEEPER
Tells the party Ivan's secret once it helps him.
#define VAULT_INTERIORS_ENTRY_ACTOR_Z
static void VaultInteriors_ResetSuspectRoutes(void)
Has the suspects react to the party's return and resets their route states.
static void Event_MayorAsksHelpForIvan(void)
The mayor asks for someone to help Ivan; once the party has agreed, he thanks them the first time and...
@ ACTOR_FOUND_URN
rises from the first crate: the mayor's urn
@ ACTOR_FOUND_STATUE
rises from the second: the Sanctum's gold statue
@ ACTOR_ATTIC_ESCORT
Comes up with the mayor and helps tie the thieves up.
@ ACTOR_ATTIC_SEARCHER
Comes up with the mayor and opens the crates.
@ ACTOR_ATTIC_ROOFER
tied up while fixing the roof
static void Event_WarnAboutThreeStrangers(void)
The three strangers have fooled the innkeeper and his wife.
static void Event_BeginCorneringSuspects(void)
The party sets out to corner the two suspects.
s32 gVaultInteriors_PairScriptF[]
struct ScenePlacement gVaultInteriors_Placements[]
@ FLAG_SUSPECTS_FLEEING
Set while the two suspects run from the party, until the party steps aside to talk it over.
s32 gVaultInteriors_PairScriptB[]
static void VaultInteriors_DefeatThieves(void)
Stages the defeated thieves and gathers the townspeople in the attic.
static void Event_ApproachSuspects(void)
The suspects at the inn spot that weird kid with the party and run from him.
static struct VaultInteriorsStop * VaultInteriors_SnapToNearestStop(struct VaultInteriorsStop *node, s16 *requestedFacing)
Chooses the outgoing connection nearest the requested facing.
static s32 VaultInteriors_GetIvanVenusDjinnCount(void)
Counts the Venus Djinn Ivan holds, which he gives back before he leaves the party.
static void Event_ReadMayorMind(void)
Mind Read on the mayor: a laugh, or the cave in the Goma Range is dangerous, but the party will be ok...
static void Event_ReadChildMind(void)
Mind Read on the child: what is the outside world like, or Father looks sad.
static void Event_ReadCorneredSuspectsMinds(void)
Once a suspect is cornered, Garet calls Ivan and Ivan reads their minds.
static void Event_AskWhetherThievesCameFromLunpa(void)
Asks whether the thieves came from Lunpa.
static void VaultInteriors_PlayAnimationAndWait(s32 actorId, s32 animation, s32 waitFrames)
Waits for the animation to change before the following pause.
s32 * gVaultInteriors_StepActions[]
Vault's interiors, before and after the thieves are caught: whether the leader stands beside the Bone...
static void Vault_UpdateBoneProximityFlag(void)
Prevents the bone giver offering another Bone while the leader stands beside the one on the floor.
Vault and its interiors: a villager's thought read with Mind Read.
static void Vault_ShowThought(s32 actorId)
Shows the message already set as the actor's thought: the actor stops and stands while the thought is...
The patch levels: our groups of the measured changes from the Japanese release.