26#include "text/msg_ids.h"
428 if (actorOrAnswer != 0) {
431 ((
struct FieldActor *)actorOrAnswer)->z.fixed);
434 if (actorOrAnswer != 0) {
436 ((
struct FieldActor *)actorOrAnswer)->z.fixed);
439 if (actorOrAnswer != 0) {
441 ((
struct FieldActor *)actorOrAnswer)->z.fixed);
522 if (actorOrAnswer == 0) {
720 s32 clearedTrialSeen;
724 if (clearedTrialSeen != 0) {
961 for (counter = 0; counter < 20; counter++) {
1674 {0,
CONDITION_ALWAYS, 72, 0, 72,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1675 {1,
CONDITION_ALWAYS, 72, 0, 72,
FACING_SOUTH, 0, 16, 16, 528, 256, 0},
1676 {2,
CONDITION_ALWAYS, 488, 0, 88,
FACING_SOUTH, 0, 16, 16, 528, 256, 0},
1681 {0,
CONDITION_ALWAYS, 56, 0, 296,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1682 {1,
CONDITION_ALWAYS, 184, 0, 72,
FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1683 {2,
CONDITION_ALWAYS, 56, 0, 120,
FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1684 {3,
CONDITION_ALWAYS, 120, 0, 176,
FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1685 {4,
CONDITION_ALWAYS, 56, 0, 296,
FACING_SOUTH, 0, 0, 0, 240, 384, 0},
1686 {5,
CONDITION_ALWAYS, 392, 0, 120,
FACING_SOUTH, 0, 272, 0, 656, 304, 0},
1687 {6,
CONDITION_ALWAYS, 520, 0, 72,
FACING_SOUTH, 0, 272, 0, 656, 304, 0},
1688 {7,
CONDITION_ALWAYS, 184, 0, 912,
FACING_SOUTH, 0, 0, 736, 368, 1024, 0},
1689 {8,
CONDITION_ALWAYS, 808, 0, 296,
FACING_NORTH, 0, 656, 0, 960, 320, 0},
1690 {12,
CONDITION_ALWAYS, 784, 0, 108,
FACING_SOUTHWEST, 0, 656, 0, 960, 320,
1692 {21,
CONDITION_ALWAYS, 808, 0, 120,
FACING_NORTH, 0, 656, 0, 960, 320, 0},
1693 {31,
CONDITION_ALWAYS, 808, 0, 120,
FACING_NORTH, 0, 656, 0, 960, 320, 0},
1694 {64,
CONDITION_ALWAYS, 808, 0, 120,
FACING_NORTH, 0, 656, 0, 960, 320, 0},
1695 {65,
CONDITION_ALWAYS, 680, 0, 588,
FACING_EAST, 0, 520, 490, 1020, 640, 0},
1696 {66,
CONDITION_ALWAYS, 680, 0, 428,
FACING_EAST, 0, 520, 330, 1020, 480, 0},
1697 {67,
CONDITION_ALWAYS, 900, 0, 588,
FACING_WEST, 0, 520, 490, 1020, 640, 0},
1698 {68,
CONDITION_ALWAYS, 900, 0, 428,
FACING_WEST, 0, 520, 330, 1020, 480, 0},
1699 {69,
CONDITION_ALWAYS, 440, 0, 120,
FACING_SOUTHEAST, 0, 272, 0, 656, 304,
1701 {70,
CONDITION_ALWAYS, 184, 0, 912,
FACING_SOUTH, 0, 0, 736, 368, 1024, 0},
1706 {1,
CONDITION_ALWAYS, 96, 0, 288,
FACING_NORTH, 0, 0, 0, 512, 320, 0},
1707 {2,
CONDITION_ALWAYS, 272, 0, 88,
FACING_SOUTH, 0, 0, 0, 512, 320, 0},
2056 MSGNO(MsgColosseumEntranceIAmMorganIAmThe)},
2066 MSGNO(MsgColosseumEntranceYouCannotLeaveUntilTheFinals)},
2068 MSGNO(MsgColosseumEntranceIFeelWeveBeenWaitingForever)},
2070 MSGNO(MsgColosseumEntranceWhenTheGongSoundsTheFinals)},
Ability numbers, named from the English release.
void Object_SetActionById(u32 objectId, s32 steps)
Sets the animation timer steps of each of an actor's sprites (AnimationObjects_SetActiveTimerSteps).
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
const struct SceneEntrance * ColosseumEntrance_GetEntrances(void)
static void ColosseumEntrance_PositionPartyForBriefing(void)
Places the three companions behind Isaac for the officials' briefing.
static void Event_TalkToAzart(void)
Azart, the second-best, will not lose to someone who skipped the trials; then he goes back to pacing.
s32 gColosseumEntrance_ApproachFinalsGroupScript[]
@ MORGAN
the highest-ranked
u32 gColosseumEntranceExits[]
static void Event_DiscussLuckyGuessSeats(void)
Outside the gates: the Lucky Guess makes the battles better; on the finals day, a good spot costs too...
static void Event_AskIfReadyForFinals(void)
The official asks whether Isaac is ready for the finals.
struct SceneEvent gColosseumEntranceEvents2[]
static void Event_TalkToDekka(void)
Dekka psyches himself up; the first time, Navampa explains he will not answer (0x3c1).
s32 gColosseumEntrance_PulseScaleScript[]
static void Event_DiscussSeating(void)
Outside the gates: during the trials, a man asks whether the party hopes to get in to see Colosso; on...
struct SceneEntrance gColosseumEntranceEntrances3[]
static void ColosseumEntrance_InitializeContestants(void)
The warriors' child values and their waiting actions in the waiting room.
struct ScenePlacement gColosseumEntrancePlacementsOther[]
static void Event_TalkToGalahad(void)
Galahad, the third seed, jumps. "Waah! Don't frighten me!".
const struct ScenePlacement * ColosseumEntrance_GetPlacements(void)
Selects actors for the current area and stage of Colosso.
static void Event_DiscussLuckyGuessWinnings(void)
Outside the gates: a bettor put it all on a warrior no one picked; on the finals day a scalper,...
static void Event_FinalsBegin(void)
Stepping forward in the waiting room: asked whether he is ready, Isaac can still wait; if he is,...
static void Event_CrowdRecognizesIsaac(void)
Outside the gates on the finals day, the crowd recognizes Isaac as Babi's pick, and a guide takes the...
struct ScenePlacement gColosseumEntrancePlacements3[]
struct SceneEvent gColosseumEntranceEvents1[]
static void ColosseumEntrance_WalkToEastExit(void)
Isaac walks east alone to the next stage.
s32 gColosseumEntrance_RejoinPartyScript[]
static void ColosseumEntrance_ApplyArrivalState(void)
Each arrival in the halls has its own scene: the trials, the briefing before the finals,...
struct SceneEntrance gColosseumEntranceEntrances1[]
s32 ColosseumEntrance_Initialize(void)
Sets up the halls by the arrival, or the gates outside by Colosso's stage.
static void ColosseumEntrance_ShowMessageAndPause(s32 speaker)
s32 gColosseumEntrance_JoinFinalsFromSouthScript[]
static void Event_OfferLuckyGuess(void)
The Lucky Guess man explains the game; on the finals day he recognizes Isaac and refuses him,...
struct SceneEvent gColosseumEntranceEvents3[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance12[]
struct ScenePlacement gColosseumEntrancePlacements1[]
static void ColosseumEntrance_ExplainPartySupport(void)
Before the first match: only Isaac may enter the finals, so the officials seat his companions by the ...
static void ColosseumEntrance_ShowFailedTrial(void)
Arriving at entrance 7: a warrior strains at the trial, gives up and runs.
s32 gColosseumEntrance_GatherAtSpectatorPartyScript[]
struct SceneEvent gColosseumEntranceEvents1Entrance12[]
struct SceneEvent gColosseumEntranceEventsOther[]
s32 gColosseumEntrance_LeaveSpectatorAreaScript[]
struct SceneEntrance gColosseumEntranceEntrancesOther[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance66[]
const struct SceneEvent * ColosseumEntrance_GetEvents(void)
static void ColosseumEntrance_EscortToEastExit(void)
An official leads Isaac east to the next stage.
static void ColosseumEntrance_Turn(s32 actor, s32 facing)
static void Event_TalkToTrialAttendant(void)
The trial attendant: before both trials have been watched, the screen goes to the next warrior's tria...
static void Event_RearmFinalsStart(void)
Stepping back from the line arms the question again (scene flags 0x234 and 0x235).
static void Event_TalkToNavampa(void)
Navampa of Gondowan, the sixth-ranked, introduces himself.
static void ColosseumEntrance_CelebrateAdvancement(void)
After the first match: the officials congratulate Isaac and lead him on.
static void ColosseumEntrance_CelebrateBothWins(void)
After the second match: one more win and Isaac is the champion.
struct ScenePlacement gColosseumEntrancePlacements1Entrance7[]
struct ScenePlacement gColosseumEntrancePlacements3FinalsDay[]
static void ColosseumEntrance_FaceDirection(s32 actor, s32 facing)
Turns an actor to the given facing over ten frames.
struct ScenePlacement gColosseumEntrancePlacements1Entrance8[]
struct ScenePlacement gColosseumEntrancePlacements1Entrance5[]
static void ColosseumEntrance_AnnounceFinals(void)
Arriving in the waiting room: the official tells the warriors to prepare.
static void ColosseumEntrance_WalkToWestExit(void)
Isaac walks west alone to the next stage.
static void Event_TalkToBuford(void)
Buford, the seventh seed: anyone could win today.
static void Event_TalkToSatrage(void)
Satrage, the fourth-ranked, opens his eyes and names himself.
static void ColosseumEntrance_UpdateEntranceCells(void)
Outside: once Colosso is over, the tiles by the gates change; before that, actor 16 takes child value...
s32 gColosseumEntrance_EnterFinalsScript[]
const struct SceneRegion * ColosseumEntrance_GetRegions(void)
s32 gColosseumEntrance_GatherAtSpectatorLeaderScript[]
static void ColosseumEntrance_EscortToWestExit(void)
An official leads Isaac west to the next stage.
s32 gColosseumEntrance_JoinFinalsFromEastScript[]
static void ColosseumEntrance_ExplainTrial(void)
Back from a trial: the attendant says the warrior failed, or after the second trial that he cleared i...
static void ColosseumEntrance_ShowClearedTrial(void)
Arriving at entrance 70: a warrior heaves the trial object up in jolts and drops it,...
struct ScenePlacement gColosseumEntrancePlacements3AfterColosso[]
const u32 * ColosseumEntrance_GetExits(void)
Returns the shared colosseum exits.
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)
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
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_SetBuiltinAction(s32 actor, s32 action)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_EventShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
void Engine_CameraSetSpeed(s32 speed, s32 acceleration)
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)
static void Actor_MoveToAndWait(s32 actor, s32 x, s32 z)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
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)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void Event_SkipMessages(s32 count)
#define SPEAKER_WINDOW_BELOW
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
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_MapRenderWaitForValues(void)
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_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)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
void Engine_ActorSetChildValue(s32 actor, s32 value)
static void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)
Sets shake amplitudes in fixed-point pixels and the per-frame decay factor.
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
struct FieldActor * Engine_EventGetViewCenter(void)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
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)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
void Engine_ColorBufferApplySource(s32 value, s32 mode)
Field objects and actors, and the scene transition styles.
@ TRANSITION_BACKDROP_FADE
#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 FIND_MESSAGE(message)
#define SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
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_SCENE_TEMP_35
#define FLAG_COLOSSO_OVER
the Colosso finals have been fought
#define FLAG_BABI_SAVED
The party has saved Babi in Altmiller Cave with his Mystic Draught; Tolbi then holds the Colosso fina...
#define FLAG_SCENE_TEMP_34
#define FLAG_COLOSSO_FIRST_MATCH_WON
#define FLAG_COLOSSO_FAILED_TRIAL_SEEN
a warrior failed his trial
#define FLAG_COLOSSO_CLEARED_TRIAL_SEEN
a warrior cleared his trial
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_COLOSSO_SECOND_MATCH_WON
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 InventorySnapshot_Take(void)
Small statement macros both games use for positions, velocities and bounds.
#define SET_VELOCITY(p, vx, vy, vz)
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.
s32 Party_RemoveActiveOwner(s32 owner)
Takes character owner out of the party: clears its game flag and closes the gap it leaves in gGameSta...
s32 Party_AddActiveOwner(s32 owner)
Adds character owner to the end of the party: sets its game flag and appends it to gGameState....
Scene numbers, named after their places.
char SceneId_ColosseumEntrance3
char SceneId_ColosseumEntrance1
char SceneId_ColosseumEntrance2
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_EventBegin(void)
void Engine_ActorShowEmote()
void Engine_EventSetMessage()
void Engine_EventShowMessage()
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,...
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
u8 steeringFlags
ActorSteeringFlag bits.
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
s32 targetY
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 scaleY
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
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