22#include "text/msg_ids.h"
228 s32 advanceAfterReply;
229 const s32 *partyScript;
399 advanceAfterReply = 1;
402 advanceAfterReply = 0;
405 if (advanceAfterReply != 0) {
695 if (waitFrames != 0) {
706 if (waitFrames != 0) {
720 const s32 *partyScript;
891 {0,
CONDITION_ALWAYS, 168, 0, 168,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
896 {0,
CONDITION_ALWAYS, 168, 0, 168,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
897 {1,
CONDITION_ALWAYS, 240, 0, 648,
FACING_NORTH, 0, 45, 360, 440, 680, 0},
898 {2,
CONDITION_ALWAYS, 88, 0, 552,
FACING_SOUTH, 0, 45, 360, 440, 680, 0},
899 {3,
CONDITION_ALWAYS, 392, 0, 552,
FACING_SOUTH, 0, 45, 360, 440, 680, 0},
900 {4,
CONDITION_ALWAYS, 240, 0, 408,
FACING_SOUTH, 0, 45, 360, 440, 680, 0},
901 {5,
CONDITION_ALWAYS, 152, 0, 432,
FACING_SOUTH, 0, 45, 360, 440, 680, 0},
902 {6,
CONDITION_ALWAYS, 264, 0, 136,
FACING_NORTH, 0, 40, 20, 305, 285, 0},
903 {7,
CONDITION_ALWAYS, 504, 0, 152,
FACING_NORTH, 0, 380, 20, 755, 290, 0},
904 {8,
CONDITION_ALWAYS, 448, 0, 112,
FACING_SOUTH, 0, 380, 20, 755, 290, 0},
905 {9,
CONDITION_ALWAYS, 864, 0, 576,
FACING_NORTH, 0, 750, 370, 985, 635, 0},
906 {10,
CONDITION_ALWAYS, 928, 0, 224,
FACING_WEST, 0, 800, 20, 1040, 250, 0},
907 {11,
CONDITION_ALWAYS, 904, 0, 72,
FACING_SOUTH, 0, 800, 20, 1040, 250, 0},
908 {12,
CONDITION_ALWAYS, 616, 0, 824,
FACING_NORTH, 0, 465, 640, 705, 875, 0},
909 {13,
CONDITION_ALWAYS, 128, 0, 808,
FACING_EAST, 0, 20, 730, 260, 890, 0},
910 {14,
CONDITION_ALWAYS, 168, 0, 808,
FACING_SOUTH, 0, 20, 730, 260, 890, 0},
911 {20,
CONDITION_ALWAYS, 864, 0, 576,
FACING_NORTH, 0, 750, 370, 985, 635, 0},
976 {
EVENT_TALK,
LAYANA, 0x321, MSGNO(MsgHammetPalaceDodonpaIsAVeryShrewdMan) },
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.
The engine calls the debug menus import, and their palette swatch tiles.
Scene commands: the all-caps macros the scene scripts are written in.
#define OBJ_DIR(no, d, t)
#define OBJ_POS_SET(no, x, z)
#define OBJ_WALK(no, x, z)
#define OBJ_EMOTE(no, e, t)
#define OBJ_SPEED(no, s, a)
void FieldScene_PrepareActors(struct ScenePlacement *entry)
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_ActorSetAnimationAndWait(s32 actor, s32 animation)
#define SPEAKER_WINDOW_ABOVE
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
#define SPEAKER_PORTRAIT_RIGHT
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
void Engine_EventWaitForScreen(void)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_EventOpenScreen(void)
void Engine_GameFlagSet(s32 flag)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
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)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
void Engine_MapRedraw(void)
void Engine_ColorBufferInterpolate(s32 frames)
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)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
static void ColorBuffer_ApplySource(s32 value, s32 mode)
#define SCENE_TRANSITION(style, variant)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#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 TOUCH_WALKING_INTO(facing)
Game flags, named where their meaning is shown.
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_LUNPA_TRADE_REOPENED
#define FLAG_IVAN_REPORTED_TO_LAYANA
that Hammet is still in Lunpa
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_LAYANA_SCOLDED_LUNPA_VISIT
#define FLAG_HAMMET_HOMECOMING_SEEN
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.
static void Event_LayanaScoldsLunpaVisit(void)
Talking to Layana once the party has been to Lunpa: she is glad Hammet is unhurt, but asks the party ...
struct ScenePlacement gHammetPalacePlacements[]
static void Event_LeaveThroughDoor(void)
Walking north into a door (triggers 2, 3, 4 and 14): it opens, and Isaac walks through it to the next...
static void HammetPalace_IvanReportsToLayana(void)
Ivan brings the party to Layana: she had hoped Hammet came back with him.
static void HammetPalace_HammetsHomecoming(void)
Back with Hammet, the party walks into the audience hall: Hammet welcomes them, Layana scolds Ivan fo...
s32 gHammetPalace_PartyActions[]
static void HammetPalace_FacePartyNorth(s32 waitFrames)
Turns all four party members north toward Layana, then optionally waits.
struct SceneEvent gHammetPalaceEventsOther[]
struct SceneEntrance gHammetPalaceEntrances[]
static void HammetPalace_FacePartyOutward(s32 waitFrames)
Turns the party outward from the group, then optionally waits.
static void Event_AskWhetherSilkTradeHasEnded(void)
Talking to a resident (actor 16) before Hammet is rescued: the resident worries for his silk trade.
struct ScenePlacement gHammetPalacePlacementsOther[]
static void HammetPalace_SetUpEntrance(void)
Sets up the room the party enters by: Layana and Hammet in the audience hall (entrance 9),...
static void Event_AskWhetherHammetWillBeReleased(void)
Talking to a resident (actor 13) before Hammet is rescued: the resident hopes for his release.
struct SceneEvent gHammetPalaceEvents[]
struct SceneEntrance gHammetPalaceEntrancesOther[]
static __inline__ void HammetPalace_AdvanceMessage(s32 amount)
Advances within the current conversation's consecutive message block.
Item numbers, named from the English release.
void Map_SetLayerEntryFlag(u32 channelIndex)
Pauses tile animation channel channelIndex by setting its paused byte.
void Map_ClearLayerEntryFlag(u32 channelIndex)
Resumes tile animation channel channelIndex by clearing its paused byte.
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#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_END
Return to the main script.
Scene numbers, named after their places.
char SceneId_HammetPalace
Song and sound effect ids, indices into gSound_SongTable.
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_ActorShowEmote()
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s32 startTransition
SCENE_TRANSITION(style, variant).
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,...
union FieldCoordinate x
16.16 fixed-point pixels
union FieldCoordinate 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.
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels