29#include "text/msg_ids.h"
67#define ACTOR_BEHIND_COUNTER 4
113 u16 side = (leader->
facing + 0x2000) & 0xc000;
121 s32 message = MsgLaliveroTakenHostageFaran;
587 if (leader !=
NULL) {
589 leader->
z.
part.pixel);
595 if (leader !=
NULL) {
602 if (leader !=
NULL) {
604 leader->
z.
part.pixel);
693 actor->sprite->image.priority = 2;
697 actor->sprite->image.priority = 2;
701 actor->sprite->image.priority = 2;
713 actor->sprite->image.priority = 2;
765 {1,
CONDITION_ALWAYS, 144, 0, 168,
FACING_NORTH, 0, 0, 8, 240, 192, 0},
766 {2,
CONDITION_ALWAYS, 400, 0, 168,
FACING_NORTH, 0, 256, 8, 496, 192, 0},
767 {3,
CONDITION_ALWAYS, 648, 0, 72,
FACING_NORTH, 0, 488, 8, 728, 184, 0},
768 {4,
CONDITION_ALWAYS, 128, 0, 472,
FACING_NORTH, 0, 0, 216, 240, 488, 0},
769 {5,
CONDITION_ALWAYS, 136, 0, 296,
FACING_SOUTH, 0, 0, 216, 240, 488, 0},
770 {6,
CONDITION_ALWAYS, 368, 0, 472,
FACING_NORTH, 0, 240, 216, 480, 488, 0},
771 {7,
CONDITION_ALWAYS, 392, 0, 296,
FACING_SOUTH, 0, 240, 216, 480, 488, 0},
772 {8,
CONDITION_ALWAYS, 648, 0, 280,
FACING_NORTH, 0, 480, 216, 720, 488, 0},
773 {9,
CONDITION_ALWAYS, 96, 0, 680,
FACING_NORTH, 0, 8, 520, 312, 696, 0},
774 {10,
CONDITION_ALWAYS, 200, 0, 600,
FACING_SOUTH, 0, 8, 520, 312, 696, 0},
775 {11,
CONDITION_ALWAYS, 432, 0, 728,
FACING_NORTH, 0, 312, 520, 552, 744, 0},
776 {12,
CONDITION_ALWAYS, 432, 0, 630,
FACING_NORTH, 0, 312, 520, 552, 744, 0},
777 {21,
CONDITION_ALWAYS, 96, 0, 168,
FACING_NORTH, 0, 8, 8, 312, 192, 0},
778 {22,
CONDITION_ALWAYS, 216, 0, 88,
FACING_SOUTH, 0, 8, 8, 312, 192, 0},
779 {23,
CONDITION_ALWAYS, 224, 0, 392,
FACING_NORTH, 0, 8, 232, 312, 416, 0},
780 {24,
CONDITION_ALWAYS, 88, 0, 312,
FACING_SOUTH, 0, 8, 232, 312, 416, 0},
781 {25,
CONDITION_ALWAYS, 384, 0, 368,
FACING_NORTH, 0, 320, 240, 632, 400, 0},
782 {26,
CONDITION_ALWAYS, 456, 0, 376,
FACING_NORTH, 0, 320, 240, 632, 400, 0},
783 {27,
CONDITION_ALWAYS, 504, 0, 376,
FACING_NORTH, 0, 320, 240, 632, 400, 0},
784 {28,
CONDITION_ALWAYS, 472, 0, 72,
FACING_SOUTH, 0, 344, 8, 584, 168, 0},
785 {29,
CONDITION_ALWAYS, 744, 0, 72,
FACING_SOUTH, 0, 632, 8, 872, 168, 0},
786 {30,
CONDITION_ALWAYS, 832, 0, 872,
FACING_NORTH, 0, 280, 504, 912, 896, 0},
787 {31,
CONDITION_ALWAYS, 464, 0, 832,
FACING_SOUTH, 0, 280, 504, 912, 896, 0},
788 {99,
CONDITION_ALWAYS, 96, 0, 168,
FACING_NORTH, 0, 8, 8, 312, 192, 0},
Ability numbers, named from the English release.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
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.
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)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Engine_ActorWalkByAndWait(s32 actor, s32 dx, s32 dz)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
#define SPEAKER_PORTRAIT_RIGHT
void Engine_CameraMoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
void Engine_EventWaitForScreen(void)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
static void Actor_WalkByAndWait(s32 actor, s32 dx, s32 dz)
void Engine_EventOpenScreen(void)
void Engine_ActorSetActionCallback(struct FieldActor *actor, s32 value)
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_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 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)
#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)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void FieldMotion_LaunchFromFocusedObject(s32 actor, s32 dx, s32 dz, s32 facing)
Game flags, named where their meaning is shown.
#define FLAG_RETURNED_FROM_VENUS_LIGHTHOUSE
The party is back from Venus Lighthouse, by the aerie's exit.
#define FLAG_SAW_SHIP_FROM_VENUS_LIGHTHOUSE
The party saw the ship from Venus Lighthouse before coming back.
#define FLAG_IODEM_FAREWELL_SEEN
Iodem gave the Black Orb.
#define FLAG_IODEM_ASKED_TO_MEET
Iodem asked the party to wait for him outside.
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.
The main-image routines scene overlays import.
void Engine_ResetSceneEffectCounter(void)
s32 Inn_CheckIn(s32 innId, s32 objectId)
Runs an inn's counter: the innkeeper names the price, and on Yes, with the coins, the party sleeps (I...
Item numbers, named from the English release.
@ ENTRANCE_FROM_AERIE
Arriving from Venus Lighthouse's aerie: 90 also plays the talk about the ship the party saw from the ...
struct ScenePlacement gLaliveroPlacements[]
struct SceneEvent gLaliveroEvents[]
struct SceneEvent gLaliveroEventsAfterLighthouse[]
struct SceneEntrance gLaliveroEntrances[]
#define ACTOR_BEHIND_COUNTER
Behind a counter: the actor is drawn under the counter's top and the party talks across it.
struct SceneRegion gLaliveroRegions[]
struct ScenePlacement gFaranHousePlacementsAfterLighthouse[]
static void TellFaranAboutFelix(void)
The party tells Faran and Iodem what became of Felix, when it did not see the ship from the lighthous...
static void ReportToFaran(void)
Back from Venus Lighthouse, the party reports to Faran with Iodem: no sign of Sheba or of Felix,...
const struct SceneRegion * LaliveroInteriors_GetRegions(void)
static void TalkToPriest(s32 priest)
The sanctum's services across the counter; otherwise small talk.
static void TalkToShopkeeper34(s32 keeper)
Shop 34 across the counter; otherwise small talk.
static void TalkToIodem(void)
Iodem, talked to before he has given the Black Orb, repeats his request.
static void TalkToInnkeeper(s32 innkeeper)
A room for the night across the counter (inn 11); otherwise small talk.
@ ENTRANCE_SANCTUM
Stepping into the sanctum makes it where a defeated party wakes.
@ ENTRANCE_REPORT_TO_FARAN
Back from Venus Lighthouse: the party is led straight to Faran.
const struct SceneEvent * LaliveroInteriors_GetEvents(void)
What the party can talk to, touch and search on each map, before and after Venus Lighthouse.
static s32 Maid_Sigh(struct ScriptInterpreter *interpreter)
The maid sighs between chores.
struct SceneEvent gFaranHouseEvents[]
struct SceneRegion gLaliveroSanctumRegions[]
static void IodemCallsOut(void)
Trigger 51 in Faran's house after the report: the camera finds Iodem, who asks the party to wait for ...
const u32 * LaliveroInteriors_GetExits(void)
static void TalkToShopkeeper32(s32 keeper)
A shopkeeper across the counter opens shop 32; from elsewhere they talk about Sheba,...
struct SceneEvent gFaranHouseEventsAfterLighthouse[]
const struct ScenePlacement * LaliveroInteriors_GetPlacements(void)
The people of each map; Faran's house fills up after Venus Lighthouse.
const struct SceneEntrance * LaliveroInteriors_GetEntrances(void)
s32 gLaliveroMaidChores[]
The maid's chores once she has apologized: she paces between two spots, turning to each side,...
static void TalkToShopkeeper33(s32 keeper)
Shop 33 across the counter; otherwise small talk.
static void TalkToMaid(void)
The maid stops her chores to apologize: worry for Sheba keeps her from concentrating.
struct ScenePlacement gFaranHousePlacements[]
static void LeaveBuilding(void)
A doorway out: take the touched trigger's exit with the exit sound.
static u16 Leader_GetSide(void)
The side the leader faces: the facing rounded to the nearest of east, south, west and north.
@ SHOPKEEPER_32
runs shop 32
@ ACTOR_15
posed in animation 6
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_SYNC
Wait for arrival.
#define SC_MOVE(x, y, z)
Move toward the target.
#define SC_WAIT(n)
Wait n frames.
s32 Shop_Run(s32 stockRow, s32 keeperId)
Runs a shop: the shopkeeper's welcome, then buy, sell, artifacts and repair until the player leaves.
Scene numbers, named after their places.
char SceneId_LaliveroInteriors2
char SceneId_LaliveroInteriors1
The field object script interpreter and the operands its commands read.
s32 Shop_ConfirmAct(s32 unitId)
Runs the sanctum service menu using the shared shop cursor and window resources.
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_ActorShowEmote()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
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
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
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
union FieldCoordinate z
16.16 fixed-point pixels
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
s16 savedScene
where a defeat returns to without a defeat point
s16 savedEntrance
where a defeat returns to without a defeat point
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,...
u16 facing
1/65536 turns (enum Facing)
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The prefix that command handlers read from a field object's 0x70-byte slot.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
The integer types, TRUE, UNUSED and the fixed-address macros.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
void Party_RestoreHpPp(s32 cureConditions)
Restores every party member's HP and PP; with cureConditions 1 it also cures poison and haunting.