12#include "text/msg_ids.h"
107 if (pillar !=
NULL) {
216 if (leader !=
NULL) {
224 if (leader !=
NULL) {
232 if (leader !=
NULL) {
240 if (leader !=
NULL) {
251 sighting = MsgLunpaThinkSawSomeone;
276 recognition = MsgLunpaMoment;
346 reunion = MsgLunpaDodonpaNeverIntention;
562 plan = MsgLunpaBunza;
616 wagon = MsgLunpaLetsTakeWagon;
646 goto check_nothing_left;
652 goto insist_nothing_left;
655 goto ask_about_business;
657 confusion = MsgLunpaTotallyConfusedChanged;
721 warning = MsgLunpaMeaningWontRide;
749 farewell = MsgLunpaInsistStick;
824 if (leader !=
NULL) {
831 if (leader !=
NULL) {
838 if (leader !=
NULL) {
856 departure = MsgLunpaDontUnfinishedBusiness;
912 if (leader !=
NULL) {
919 if (leader !=
NULL) {
926 if (leader !=
NULL) {
971 { 0,
CONDITION_ALWAYS, 168, 0, 632,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
972 {
CAVE_ENTRANCE_FROM_WORLD_MAP,
CONDITION_ALWAYS, 168, 0, 632,
FACING_NORTH, 0, 88, 56, 648, 648, 0 },
973 {
CAVE_ENTRANCE_FROM_LUNPA,
CONDITION_ALWAYS, 552, 0, 328,
FACING_NORTH, 0, 88, 56, 648, 648, 0 },
974 {
CAVE_ENTRANCE_THIRD,
CONDITION_ALWAYS, 552, 0, 328,
FACING_NORTH, 0, 88, 56, 648, 488, 0 },
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 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_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
#define SPEAKER_WINDOW_ABOVE
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_CameraMoveToActor(s32 actor, s32 pan)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_EventCloseScreen(void)
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)
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)
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_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_WalkBy(s32 actor, s32 dx, s32 dz)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_MapRedraw(void)
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)
static struct FieldActor * Actor_Get(s32 actor)
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
#define SCENE_TRANSITION(style, variant)
#define SCENE_EXITS(scene)
#define SCENE_EXIT(exit, scene, entrance)
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define FLAG_SCENE_TEMP_03
#define FLAG_BUNZAS_WAGON_LEFT
Bunza's wagon has left West Lunpa Cave, with the party aboard or without.
#define FLAG_LUNPA_TRADE_REOPENED
#define FLAG_SCENE_TEMP_00
#define FLAG_SCENE_TEMP_02
#define FLAG_LUNPA_CAVE_REUNION_SEEN
#define FLAG_SCENE_TEMP_01
#define FLAG_SCENE_TEMP_04
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
static void Event_FreezeHiddenPuddle(void)
Frost on the puddle Reveal shows: it freezes into a pillar the party can stand on.
Scene numbers, named after their places.
char SceneId_WestLunpaCave
#define MUS_PUZZLE_SOLVED
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_EventEnd(void)
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
@ CAVE_ENTRANCE_FROM_LUNPA
@ LUNPA_ENTRANCE_FROM_CAVE
@ CAVE_ENTRANCE_FROM_WORLD_MAP
@ WARNING_MIA_ASKS_ABOUT_BUSINESS
@ WARNING_BUNZA_CANNOT_WAIT
@ WARNING_IVAN_ASKS_IF_STAYING
@ DEPARTURE_BUNZA_SETS_OFF
@ DEPARTURE_HAMMET_LONGS_FOR_LAYANA
@ DEPARTURE_GARET_HEADS_FOR_KALAY
@ DEPARTURE_IVAN_THINKS_OF_LAYANA
@ RECOGNITION_BUNZA_NAMES_HAMMET
@ RECOGNITION_BUNZA_KNOWS_VOICE
@ RECOGNITION_HAMMET_NAMES_BUNZA
@ RECOGNITION_HAMMET_CALLS_OUT
@ REUNION_HAMMET_THANKS_PARTY
@ REUNION_GARET_ASKS_ABOUT_CAVE
@ REUNION_BUNZA_RECALLS_ADVICE
@ REUNION_BUNZA_MEANS_WISDOM
@ REUNION_IVAN_ASKS_ABOUT_SERVING
@ REUNION_BUNZA_DISCOURAGES_FIGHT
@ REUNION_HAMMET_ON_SELLING
@ REUNION_HAMMET_STARTLED_BUNZA
@ REUNION_GARET_QUESTIONS_IVAN
@ REUNION_BUNZA_AGREES_NOT_TO_FIGHT
@ REUNION_MIA_PRAISES_BUNZA
@ REUNION_BUNZA_KNEW_OF_PRISON
@ REUNION_BUNZA_AVOIDED_LUNPA
@ REUNION_HAMMET_ON_APPEARANCES
@ REUNION_HAMMET_CREDITS_IVAN
@ REUNION_HAMMET_PRAISES_BUNZA
@ REUNION_GARET_ASKS_ABOUT_ENTRY
@ REUNION_MIA_ASKS_WHY_BUNZA_STILL_CAME
@ REUNION_GARET_ASKS_TO_FIGHT
@ REUNION_IVAN_EXPLAINS_COMMOTION
@ REUNION_BUNZA_MENTIONS_COMMOTION
@ REUNION_IVAN_CREDITS_LEADER
@ REUNION_GARET_ASKS_WHY_BUNZA_CAME
@ REUNION_BUNZA_ASKS_ABOUT_RELEASE
@ REUNION_MIA_ASKS_ABOUT_TRADE
@ REUNION_BUNZA_FEARS_CAPTURE
@ REUNION_MIA_URGES_ESCAPE
@ REUNION_BUNZA_WARNS_OF_SEARCH
@ REUNION_BUNZA_ON_UNPLEASANT_PLACES
@ REUNION_BUNZA_CALLS_IT_CHANCE
@ REUNION_IVAN_CREDITS_EVERYONE
@ REUNION_BUNZA_LINKS_COMMOTION
@ REUNION_IVAN_WANTS_STEALTH
@ REUNION_BUNZA_WAS_REFUSED
@ REUNION_BUNZA_HAD_TO_KNOW
@ REUNION_HAMMET_THANKS_IVAN
@ FAREWELL_IVAN_REASSURES
@ FAREWELL_HAMMET_LETS_IVAN_GO
@ FAREWELL_BUNZA_SAYS_GOODBYE
@ FAREWELL_MIA_HOPES_FOR_SAFETY
@ FAREWELL_GARET_MOVES_ON
@ TRIGGER_LOWERING_SWITCH
@ TRIGGER_BUNZA_HIDING_PLACE
@ TRIGGER_WORLD_MAP_PASSAGE
@ SIGHTING_GARET_ASKS_WHAT_ELSE
@ SIGHTING_MIA_SAW_SOMETHING
@ SIGHTING_GARET_WILL_FIGHT
@ SIGHTING_IVAN_ASKS_IF_FOUND
@ SIGHTING_GARET_SAW_SOMEONE
@ WORLD_MAP_ENTRANCE_FROM_CAVE
@ PLAN_BUNZA_IS_UNSUSPECTED
@ PLAN_MIA_ASKS_ABOUT_WAGON
@ CONFUSION_GARET_ASKS_AGAIN
@ CONFUSION_IVAN_IS_CONFUSED
@ WAGON_BUNZA_LEADS_THE_WAY
@ WAGON_GARET_ASKS_TO_RIDE
s32 startTransition
SCENE_TRANSITION(style, variant).
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
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
union FieldCoordinate z
16.16 fixed-point pixels
s32 scaleY
16.16 fixed point, 0x10000 full size
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...
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
const struct ScenePlacement gCaveNoPlacements[]
const struct ScenePlacement gCavePlacements[]
static u8 Mia_AsksIfRidingAfterAll(void)
Asks whether the party has changed its mind about taking the wagon.
static void Event_FreezeSouthPuddle(void)
Frost on the south puddle: it rises as an ice pillar the party can climb.
static u8 Garet_ChecksNothingLeftToDo(void)
Opens Garet's confirmation prompt; WagonChoice_Run collects the answer.
static void Event_FlipLoweringSwitch(void)
Searching the lowering switch: the hero flips it and the gate comes down, unless it is down already o...
static void WagonChoice_Run(void)
Reconciles the party's answers until they either ride or stay behind.
static u8 Party_ConfirmsStaying(void)
Reserved confirmation step; it always succeeds and displays no message.
static u8 Leader_AnswersYes(void)
The scene menu encodes Yes as zero; expose it as a Boolean to the dialogue.
const struct SceneEvent gCaveNoEvents[]
static void Event_FlipRaisingSwitch(void)
Searching the raising switch: the hero flips it and the gate goes up, unless it is up already or prop...
static u8 Bunza_AsksAboutUnfinishedBusiness(void)
Lets Bunza check whether the party has unfinished business before leaving.
static void Reunion_Converse(void)
Explains Bunza's arrival and offers his wagon as a way out of Lunpa.
const struct SceneEntrance gCaveEntrances[]
static void Gate_Raise(void)
Raises the unpropped gate and restores its passable cell attributes.
static void Party_RidesWagon(void)
Leads everyone down the passage and requests the wagon departure exit.
static u8 Garet_AsksAboutThingsToDo(void)
Asks the leader to confirm that something still needs doing here.
static u8 Garet_AsksAboutUnfinishedBusiness(void)
Asks whether unfinished business explains the refusal to ride.
static void Party_StaysBehind(void)
Sends Hammet and Bunza ahead, then returns the companions to the leader.
static u8 Bunza_CannotWait(void)
Explains that Bunza cannot wait and asks again about the party's business.
const struct SceneEvent gCaveEvents[]
static u8 Garet_AsksIfNotRiding(void)
Asks whether the party really intends to refuse the ride.
static void Event_FreezeGatePuddle(void)
Frost on the puddle under the gate: its pillar props the gate open, and if the gate was down the play...
static void Gate_DrawPropped(void)
Animates the raised gate resting on the frozen pillar, then opens collision.
static void Gate_Lower(void)
Lowers the gate in four-frame steps and restores the blocked cell attributes.
static void Event_HammetFindsBunza(void)
Walking past Bunza's hiding place once Lunpa's trade has reopened: Bunza steps out,...
static void Event_FreezeNorthPuddle(void)
Frost on the north puddle: its pillar stays frozen when the party returns.