25#include "text/msg_ids.h"
100 leader->
z.
part.pixel);
117 message = MsgValeHearAwfulGrowls;
305 sneakingMessage = MsgValeFineIfTheyDontSee;
486 s32 strangersMessage;
487 s32 accusationMessage;
498 strangersMessage = MsgValeTheyKnowLittleOfThe;
597 accusationMessage = MsgValeYoureTheOnesSneakingAround;
779 leader->
z.
part.pixel);
787 leader->
z.
part.pixel);
836 s32 collisionRadius = 12;
838 actor->
radius = collisionRadius;
914 message = MsgValeRockslideDestroyedFence;
980 leader->
z.
part.pixel);
1072 SC_CALL(Scene_TurnTowardTarget),
1077 {0,
CONDITION_ALWAYS, 228, 0, 172,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1078 {1,
CONDITION_ALWAYS, 454, 0, 290,
FACING_WEST, 0, -1, -1, -1, -1, 0},
1079 {2,
CONDITION_ALWAYS, 454, 0, 443,
FACING_WEST, 0, -1, -1, -1, -1, 0},
1080 {3,
CONDITION_ALWAYS, 229, 0, 233,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1081 {4,
CONDITION_ALWAYS, 72, 0, 80,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1082 {6,
CONDITION_ALWAYS, 104, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1083 {10,
CONDITION_ALWAYS, 232, 0, 264,
FACING_NORTH, 0, -1, -1, -1, -1, 0},
Ability numbers, named from the English release.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
Calls through a function pointer, by argument count.
The engine calls the debug menus import, and their palette swatch tiles.
FacingObject, the view of an object that turns to face a target.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
#define SPEAKER_PORTRAIT_LEFT
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)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
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)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_CameraMoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
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)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(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_CameraFollowActor(s32 actor, s32 keep_position)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
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)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
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 void ColorBuffer_ApplySource(s32 value, s32 mode)
@ TRANSITION_BACKDROP_FADE
#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 FieldObject_SetTargetAndCallback(s32 object, s32 target, const s32 *actions)
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Game flags, named where their meaning is shown.
#define FLAG_MET_SATUROS_AND_MENARDI
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_OVERHEARD_KRADEN
Kraden wondered aloud about the strangers.
#define FLAG_VALE_ROCKSLIDE_SURVIVOR_GAVE_UP
The man hurt in the rockslide believes he will die.
#define FLAG_REACHED_KALAY
Set whenever Kalay is entered; Vale's villagers then talk of the party's journey.
#define FLAG_SANCTUM_VISIT_PLANNED
#define FLAG_VALE_STORM_MONSTER_FOUGHT
A monster was fought on the stormy night: Vale's music changes (song 23).
#define FLAG_VALE_ROCKSLIDE_SURVIVOR_ESCAPED
He found he was unhurt and ran to the plaza.
#define FLAG_VALE_STORM_FIRST_MONSTER_FOUGHT
#define FLAG_VALE_STORM
The prologue's stormy night: lightning over Vale, the rockslide and the monsters loose in the village...
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_VALE_KRADEN_JAR_ELIXIR
The jar's Elixir by the cottage; after Kalay it is searchable only from the third patch.
#define FLAG_SCENE_TEMP_42
#define FLAG_VALE_STORM_SECOND_MONSTER_FOUGHT
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 Effect_SoundAndFlash(void)
Item numbers, named from the English release.
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_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.
Palette fades, the battle effect palette buffers and the colour channel curves.
@ PALETTE_TRANSFORM_PLAIN
each colour unchanged
void Field_RequestBattleFromEncounterTable(s32 zoneNo, s32 slotNo)
Sets up a battle with enemy group slot of encounter table zone.
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
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).
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,...
u16 radius
Collision radius in pixels: 16, or half the sprite metadata's boxY, when created; the overlap checks ...
u8 steeringFlags
ActorSteeringFlag bits.
union FieldCoordinate x
16.16 fixed-point pixels
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...
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
s32 fixed
16.16 fixed-point pixels
static __inline__ void ValeKraden_NodTogether(void)
Finishes the party's nod together before the next line of dialogue.
static void Event_OverhearKraden(void)
Walking up to the cottage: Kraden paces, wondering aloud who the strangers were and what they know of...
static __inline__ void ValeKraden_FacePartySouth(void)
Turns all three party members toward the strangers.
static void Event_MeetSaturosAndMenardi(void)
Walking past the two strangers: Isaac, Garet and Jenna overhear Saturos and Menardi,...
const struct ScenePlacement * ValeKraden_GetPlacements(void)
Returns the one placement table for every visit; ValeKraden_Initialize removes the actors a visit doe...
static void Event_KradenPlansSanctumVisit(void)
Talking to Kraden outside his cottage: he talks Isaac, Garet and Jenna into a secret look at Sol Sanc...
static void Event_FightSecondMonster(void)
On the stormy night, a second monster attacks by the broken fence.
static void Event_EnterCottage(void)
Walking into the cottage: the gate opens unless Kraden left it open.
struct SceneEvent gValeKraden_StormEvents[]
static void Event_TalkToCottageVisitor(void)
After the party has reached Kalay, a villager at the cottage asks Isaac about his memories of it.
struct ScenePlacement gValeKraden_Placements[]
const struct SceneEntrance * ValeKraden_GetEntrances(void)
s32 ValeKraden_Initialize(void)
Places the actors for the storm or for the day, and plays the arrival from the cottage.
s32 gValeKraden_RockslideSurvivorSwayActions[]
Alternates the survivor's width and height while he lies by the fence.
static void Event_TalkToFenceOnlooker(void)
The child at the fence asks whether Isaac hears the growls beyond it; once the party has left Vale,...
static __inline__ void ValeKraden_WalkTowardLeader(s32 companionId)
Starts a companion walking back to Isaac's current pixel position.
struct SceneEvent gValeKraden_Events[]
static void Event_TalkToRockslideSurvivor(void)
The man hurt in the rockslide asks whether he will die: yes, and he gives up; no, and he finds he is ...
static void Event_FightFirstMonster(void)
On the stormy night, a monster attacks by the broken fence.
s32 gValeKraden_FaceTargetActions[]
Keeps a linked actor facing its current target.
struct SceneEntrance gValeKraden_Entrances[]
const u32 * ValeKraden_GetExits(void)
s32 gValeKraden_RockslideSurvivorEscapeActions[]
Leads the party away from the broken fence, then leaves the map.
const struct SceneRegion * ValeKraden_GetRegions(void)
static void Event_KradenSetsOff(void)
Arriving by entrance 10, from the cottage: Kraden comes out ready, and everyone joins Isaac for the m...
const struct SceneEvent * ValeKraden_GetEvents(void)
Selects the events for the current visit to Vale: after Kalay (FLAG_REACHED_KALAY),...
@ ACTOR_ROCKSLIDE_SURVIVOR
@ ACTOR_WEST_ROCK
The west rock. "It's a huge rock that Isaac's strength can't even budge.".
u16 gValeKraden_GateCells[]
struct SceneEvent gValeKraden_EventsAfterKalay[]
void FieldFx_StartLightning(void)
Starts the storm's lightning (FieldFx_UpdateLightning): builds the dark (0x10003) and lit (0x10005) p...