30#include "text/msg_ids.h"
142 text = MsgVaultWarriorGuy;
167 originalFacing = actor->
facing;
174 actor->
facing = originalFacing;
268 actor->
timer = clear;
279 if (requestHeard == 0) {
318 for (frames = 60; frames != 0; --frames) {
639 {0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
640 {1,
CONDITION_ALWAYS, 400, 0, 472,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
641 {2,
CONDITION_ALWAYS, 224, 0, 138,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
642 {5,
CONDITION_ALWAYS, 408, 0, 344,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
643 {6,
CONDITION_ALWAYS, 312, 0, 328,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
644 {7,
CONDITION_ALWAYS, 216, 0, 312,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
645 {8,
CONDITION_ALWAYS, 376, 0, 248,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
646 {9,
CONDITION_ALWAYS, 296, 0, 200,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
647 {10,
CONDITION_ALWAYS, 120, 0, 168,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
648 {11,
CONDITION_ALWAYS, 64, 0, 294,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
649 {12,
CONDITION_ALWAYS, 70, 0, 183,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
650 {13,
CONDITION_ALWAYS, 217, 0, 409,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
651 {14,
CONDITION_ALWAYS, 420, 0, 136,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
706 MAP_CELL_STEP(35, 52, 2, 2, 4),
MAP_CELL_STEP(33, 52, 2, 2, 4),
MAP_CELL_STEPS_END,
710 MAP_CELL_STEP(35, 50, 2, 2, 4),
MAP_CELL_STEP(33, 50, 2, 2, 4),
MAP_CELL_STEPS_END,
714 MAP_CELL_STEP(35, 48, 2, 2, 4),
MAP_CELL_STEP(33, 48, 2, 2, 4),
MAP_CELL_STEPS_END,
718 MAP_CELL_STEP(42, 48, 2, 2, 4),
MAP_CELL_STEP(40, 48, 2, 2, 4),
MAP_CELL_STEPS_END,
722 MAP_CELL_STEP(42, 46, 2, 2, 4),
MAP_CELL_STEP(40, 46, 2, 2, 4),
MAP_CELL_STEPS_END,
726 MAP_CELL_STEP(35, 46, 2, 2, 4),
MAP_CELL_STEP(33, 46, 2, 2, 4),
MAP_CELL_STEPS_END,
730 MAP_CELL_STEP(35, 33, 2, 2, 4),
MAP_CELL_STEP(33, 33, 2, 2, 4),
MAP_CELL_STEPS_END,
Ability numbers, named from the English release.
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.
const s32 * gEffectScripts[]
Calls through a function pointer, by argument count.
The engine calls the debug menus import, and their palette swatch tiles.
void Djinn_JoinParty(s32 slot, s32 element, s32 djinn)
A Djinni joins the party: djinn (0 to 19) of element goes to the member with the fewest Djinn,...
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static UNUSED void * OverlayObject_CreateConfiguredObject(s32 x, s32 y, s32 z, s32 type)
A still effect in palette 15, at sprite priority 1, drawn under the actors.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static s32 Event_OpenMessage(s32 speaker, s32 flags)
void Engine_ActorFaceActor(s32 actor, s32 target, s32 frames)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_SetBuiltinAction(s32 actor, s32 action)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorMoveToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
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)
static void Event_PlayCue(s32 cue)
#define MAP_CELL_STEPS_END
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_MapAnimateCells(const u16 *steps, s32 destX, s32 destY)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
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)
static struct FieldActor * Actor_Get(s32 actor)
Field objects and actors, and the scene transition styles.
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define PSYNERGY_IN_AREA(ability, phase)
#define IF_FLAG_SET(flag)
#define SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define USE_ITEM_ON_ACTOR(item)
#define TOUCH_WALKING_INTO(facing)
Game flags, named where their meaning is shown.
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_VAULT_BOX_NUT
#define FLAG_VAULT_DJINNI_CALLED_BY_BELL
#define FLAG_DJINNI_0
the flag of Djinni 0, set once it is caught
#define FLAG_VAULT_DOG_SHOWN_PASSAGE
#define FLAG_SCENE_TEMP_00
#define FLAG_KEEP_PARTY_POSITION
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The screen blend's globals and the graphics routines.
s32 PartyInventory_Discard(s32 itemId)
Discards one itemId from whoever carries it first, as Inventory_Discard does; always returns 0.
s32 PartyInventory_FindOwner(s32 itemId)
Returns who carries itemId, asking the selected character first, or -1.
gOverflowItem, an item slot the spoils code uses when items are handed out.
Item numbers, named from the English release.
The IWRAM call layer: the routines the game keeps resident in IWRAM, each at its fixed address,...
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_LABEL(n)
Branch destination.
#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.
Song and sound effect ids, indices into gSound_SongTable.
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_EventSetMessage()
void Engine_EventShowMessage()
Vault, before and after the thieves are caught: villagers who walk about stop when someone is close 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
u16 unk172
FieldWork's menu request; scenes set it to 1.
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...
union FieldCoordinate x
16.16 fixed-point pixels
u8 paused
nonzero skips its script and motion, not its update
s32 bounce
The share of its falling speed kept as it bounces on landing, 16.16 fixed point (0x4000 when created)...
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
s32 velocityY
16.16 fixed-point pixels per frame
s32 gravity
Taken off the vertical velocity each frame while it is above the ground, in 16.16 fixed-point pixels ...
union FieldCoordinate z
16.16 fixed-point pixels
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
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.
An object on the field, read as an actor or as an effect.
static void Event_EnterCentralHouse(void)
Animates the central house door before entering.
static void Event_EnterSoutheastHouse(void)
Opens the southeastern door and enters its interior.
static void Event_GiveBoneToDog(void)
Given a Bone, the dog runs to the hidden passage and jumps there three times.
static void Event_EnterNorthwestHouse(void)
Opens and enters the northwestern house.
static void Event_TalkToDog(void)
The dog stops and barks.
static void Event_RingBell(void)
Isaac rings the bell; the first time, the Venus Djinni hiding nearby jumps out and comes to the bell.
static void Event_EnterNortheastHouse(void)
Enters the northeastern doorway behind its foreground tiles.
static void Event_PeerIntoWell(void)
Isaac peers into the well and hears water rumbling down there.
static void Event_EnterNorthHouse(void)
Enters the northern doorway behind its foreground tiles.
static void Event_EnterCentralEastHouse(void)
Opens and enters the house east of the town's center.
static void Event_EnterJail(void)
The jail door opens and the party walks in, drawn behind the doorway.
@ ACTOR_VAULT_VENUS_DJINNI
@ ACTOR_WATCHMAN
Keeps watch. "Nobody's stealing anything on my watch!".
@ VAULT_VENUS_DJINNI_INDEX
@ ACTOR_FIRST_WALKER
The two who walk in circles.
Vault, before and after the thieves are caught: the two villagers who walk about together (actors 14 ...
static s32 Vault_UpdateWalkingVillager(union FieldObject *fieldObject)
static void Event_ReadMindAndPraisePartyStrength(void)
Mind Read before the villager has spoken: he turns and praises the party.
s32 gVaultRevisit_Actor1[]
static void Event_AskAboutJailbreak(void)
Asks about the jail.
struct ScenePlacement gVaultRevisit_Placements[]
u16 gVaultRevisit_Scene5Cells[]
static void Event_ReadMindOnFeelingBrave(void)
Mind Read on the first walker: watching the party makes one feel brave, or, before the walker has spo...
static void Event_ReadMindAndRecognizeThiefCatchers(void)
Mind Read on the greeter before he has spoken: he turns and recognizes the party.
static void Event_GreetWarriorGuy(void)
The first walker stops circling.
@ ACTOR_LUNPA_GOSSIP
rumors of thieves from Lunpa running wild
@ VAULT_PROXIMITY_REACTION_PAUSED
@ ACTOR_MAYORS_VISITOR
Has talked with the mayor. "I was just talking about you with our mayor".
@ ACTOR_VOLCANO_WATCHER
if the volcano stays calm...
u16 gVaultRevisit_Scene6Cells[]
static void Event_ReadMindOnWinter(void)
Mind Read: it would have been great to have everything solved before winter.
static void Event_ReadMindOnScaredGrownUps(void)
Mind Read on the second walker: grown-ups always get so scared.
@ FLAG_WARRIOR_GUY_GREETED
@ FLAG_GREETER_RECOGNIZED_PARTY
static void Event_RevealPassage(void)
Restores the passage's visible tiles and collision cell during Reveal.
s32 gVaultRevisit_Actor0[]
u16 gVaultRevisit_Scene12Cells[]
static void VaultRevisit_JumpActorToAndWait(int actor, int x, int z, int velocityY)
Gives the actor vertical velocity, moves it, and waits briefly for it to settle.
static void Event_ReadMindOnJailKey(void)
Mind Read on the watchman: before he has asked about the jail he asks now; afterwards,...
static void Event_TalkToVenusDjinni(void)
The Venus Djinni the bell called out joins the party when spoken to.
u16 gVaultRevisit_Scene9Cells[]
static void Event_PraisePartyStrength(void)
The villager was just talking about the party with the mayor: they are so strong, let those thieves a...
static void Event_ReadMindOnDodonpa(void)
Mind Read: since Dodonpa took over, Lunpa's outlaws are no better than thieves.
u16 gVaultRevisit_Scene10Cells[]
static s32 VaultRevisit_ShouldKeepBellDjinniPosition(void)
Patched editions keep the bell's Djinni position when preserving the party.
static void Event_RecognizeThiefCatchers(void)
The party is recognized.
static void Event_WishEldersWereBrave(void)
The second walker stops. "I wish Vault's elders were as brave as you!".
static void Event_HidePassage(void)
Covers the hidden passage when Reveal ends.
u16 gVaultRevisit_Scene8Cells[]
static void Event_HopeVolcanoStaysCalm(void)
If the volcano stays calm and the southern bridge stays fixed, there is nothing to worry about.
static void Vault_WalkThroughExit(s32 x, s32 z, s32 exitId)
Walks the leader into a doorway during the sixteen-frame exit delay.
static void Event_TalkOfLunpaThieves(void)
There are rumors of thieves from Lunpa running wild, yet they have been quiet.
struct SceneEntrance gVaultRevisit_Entrances[]
static void VaultRevisit_ShowStandingActorMessage(s32 actor)
Stands the actor still while showing the message already selected.
u16 gVaultRevisit_Scene7Cells[]
u32 gVaultRevisit_Exits[]
static void VaultRevisit_DogJumpAtPassage(void)
Jumps at the hidden passage, then pauses so the party can see the clue.
struct SceneEvent gVaultRevisit_Events[]
Vault, before and after the thieves are caught: the doorway of exit 11, which opens in two frames as ...
static void Vault_OpenDoorwayAndEnter(void)
Walking north into cell code 11 opens the doorway to the Sanctum.
Vault, before and after the thieves are caught: touch triggers 1 and 2 swap the collision of the 4x2 ...
static void Vault_RestorePassageCells(void)
Cell code 2 restores the passage's usual collision and clears FLAG_SCENE_TEMP_00.
static void Vault_EnableAlternatePassageCells(void)
Cell code 1 selects the passage's alternate collision and sets FLAG_SCENE_TEMP_00,...
The window renderer's work.