28#include "text/msg_ids.h"
97 object->scaleX = 0x10000;
99 object->scaleY = 0x10000;
110 s32 message = MsgLaliveroLeavingLalivero;
750 object->actor.retainSpriteCache = 1;
751 object->actor.motionFlags = 0;
752 sprite =
object->actor.sprite;
753 object->actor.y.fixed =
PIXELS(10);
778 object->actor.collisionFlags = 0;
780 object->actor.sprite->flags = 0;
783 object->actor.collisionFlags = 0;
785 object->actor.sprite->flags = 0;
798 object->actor.paused = 1;
800 object->actor.paused = 1;
803 object->actor.paused = 0;
805 object->actor.paused = 0;
844 {0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
845 {1,
CONDITION_ALWAYS, 72, 0, 184,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
846 {2,
CONDITION_ALWAYS, 152, 0, 216,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
847 {3,
CONDITION_ALWAYS, 200, 0, 168,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
848 {4,
CONDITION_ALWAYS, 296, 0, 168,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
849 {5,
CONDITION_ALWAYS, 360, 0, 168,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
850 {6,
CONDITION_ALWAYS, 432, 0, 152,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
851 {7,
CONDITION_ALWAYS, 72, 0, 328,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
852 {8,
CONDITION_ALWAYS, 104, 0, 312,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
853 {9,
CONDITION_ALWAYS, 360, 0, 280,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
854 {10,
CONDITION_ALWAYS, 440, 0, 328,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
855 {11,
CONDITION_ALWAYS, 424, 0, 264,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
856 {20,
CONDITION_ALWAYS, 248, 0, 416,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
857 {21,
CONDITION_ALWAYS, 248, 0, 64,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
953 { 0, 0 }, { 4, 9 }, { 9, 11 }, { 12, 8 }, { 18, 8 }, { 22, 8 }, { 26, 7 }, { 4, 18 },
954 { 0, 0 }, { 22, 15 }, { 27, 18 }, { 0, 0 },
958 MAP_CELL_STEP(33, 0, 1, 2, 8),
MAP_CELL_STEP(34, 0, 1, 2, 1),
MAP_CELL_STEPS_END,
962 MAP_CELL_STEP(34, 2, 2, 2, 8),
MAP_CELL_STEP(36, 2, 2, 2, 1),
MAP_CELL_STEPS_END,
Ability numbers, named from the English release.
void Motion_LaunchFromFocusedObject(u32 objectId, s32 xOffset, s32 zOffset, s32 action)
Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0....
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
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,...
Field effects, their scripts and the flags that spawn them.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static s32 Event_OpenMessage(s32 speaker, s32 flags)
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)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
void Engine_ItemLoadIcon(s32 item)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
void Engine_HeapRelease(s32 slot)
s32 Engine_VramLoad(s32 block, s32 size, const void *data)
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_MapCopyCellsLayered(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
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.
void Engine_ActorWaitForMove(s32 actor)
void * Engine_HeapAllocate(s32 slot, s32 size)
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)
static void Actor_WalkBy(s32 actor, s32 dx, s32 dz)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
static void Map_CopyCellsLayered(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static struct FieldActor * Actor_Get(s32 actor)
@ TRANSITION_BACKDROP_FADE
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
@ ACTOR_FALLS
falls by its gravity and bounces
#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 SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
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_LALIVERO_WOUNDED_SOLDIERS_SEEN
#define FLAG_IODEM_FAREWELL_SEEN
Iodem gave the Black Orb.
#define FLAG_LALIVERO_WHARF_OPEN
the guard lets the party to the ship
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.
Item numbers, named from the English release.
s16 gLaliveroDoorCells[][2]
u16 gLaliveroDoorOpenSteps[]
static void TalkToVillagerAskingIfLeaving(s32 actor)
After Venus Lighthouse: a villager asks whether the party is leaving Lalivero, and answers yes or no.
@ ENTRANCE_FROM_AERIE_QUIETLY
@ ENTRANCE_FROM_AERIE
Arriving from Venus Lighthouse's aerie: 90 also plays the talk about the ship the party saw from the ...
@ ENTRANCE_WORLD_MAP_NORTH
@ ENTRANCE_WORLD_MAP_SOUTH
const struct ScenePlacement * Lalivero_GetPlacements(void)
The townsfolk, who stand differently once the party is back from Venus Lighthouse.
static void WatchWoundedSoldiers(void)
The first visit, arriving from the world map: the party and Iodem find Tolbi's soldiers beaten in the...
const struct SceneRegion * Lalivero_GetRegions(void)
static void TalkToIodemAboutTheShip(void)
The ship the party saw from the lighthouse was not Babi's but, Garet guesses, Saturos's.
struct ScenePlacement gLaliveroPlacements[]
struct SceneEvent gLaliveroEvents[]
const u32 * Lalivero_GetExits(void)
const struct SceneEntrance * Lalivero_GetEntrances(void)
s32 Lalivero_Initialize(void)
Sets Lalivero up as the party enters: the Black Orb prop, the wounded soldiers of the first visit (an...
s32 gLaliveroMournerSobs[]
The mourner's sobbing: the sprite squashes and stretches twice, then rests 80 frames.
u16 gLaliveroGateOpenSteps[]
static void TalkToWharfGuard(void)
Once Iodem has given the Black Orb, the guard at the wharf door lets the party through and steps asid...
static void EnterDoor(void)
The leader walks into a doorway: the door (or the gate) swings open, the leader steps in and the exit...
static void TakeTouchedExit(void)
An exit with no door: leave by the touched trigger's exit.
const struct SceneEvent * Lalivero_GetEvents(void)
What the party can talk to, touch and search, which changes once they are back from Venus Lighthouse.
static void ReceiveBlackOrb(void)
Trigger 50 after Venus Lighthouse, until Iodem has spoken: Garet stops the leader,...
struct ScenePlacement gLaliveroPlacementsAfterLighthouse[]
@ WHARF_GUARD
keeps the door to Babi's ship
@ NORTH_EXIT_SPRITE
placed after Venus Lighthouse
@ SOLDIER_WEST
Tolbi's soldiers, wounded on the first visit.
@ MOURNER
sobs for Sheba (gLaliveroMournerSobs)
static void TalkToMourner(s32 actor)
The villager mourning Sheba stops sobbing to answer, faces north again and goes back to sobbing.
struct SceneEvent gLaliveroEventsAfterLighthouse[]
static void TalkToTorch(void)
Torch, Mars Djinni 6, joins the party.
struct SceneEntrance gLaliveroEntrances[]
static void TurnBackFromTheGate(void)
Trigger 51 at the town exit: Garet turns the leader back toward Babi's ship and the wharf the guard w...
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_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
Song and sound effect ids, indices into gSound_SongTable.
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationSpritePart image
u8 slot
VRAM cache entry holding its tiles.
u8 count
layers in use, up to the last one present
u16 fullColor
256 colours; set for both parts when created
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,...
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
union FieldCoordinate y
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.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
An object on the field, read as an actor or as an effect.