47#include "text/msg_ids.h"
65#define COLOSSO_LOG_FACE_DIRECTION Engine_ActorFaceDirection
66#define COLOSSO_LOG_INITIALIZE_MODE_TASK \
67 ColossoLogRollingStage_InitializeModeTask
68#define COLOSSO_LOG_APPLY_MATCHING_SLOT_VALUES Scene_GiveAndEquipItem
70#define COLOSSO_LOG_FACE_DIRECTION ((s32 (*)())Engine_ActorFaceDirection)
71#define COLOSSO_LOG_INITIALIZE_MODE_TASK \
72 ((s32 (*)())ColossoLogRollingStage_InitializeModeTask)
73#define COLOSSO_LOG_APPLY_MATCHING_SLOT_VALUES \
74 ((s32 (*)())Scene_GiveAndEquipItem)
148 for (i = 18; i <= 22; i++) {
160 for (i = 18; i <= 22; i++) {
162 if ((
u32)(actor->
x.
fixed - (i << 21) + 0x31ffff) <= 0x13fffe) {
163 if (row == 11 && kind == 4)
164 work->raisedTrigger = kind;
165 if (row == 12 && kind == 5)
166 work->raisedTrigger = kind;
219 if ((
u32)(
z - 183) <= 3) {
306 object->motionFlags = 0;
310 object->motionFlags = 0;
387 for (slot = 15; slot <= 17; slot++) {
395 x2 = actor->
x.
fixed >> 20;
396 z2 = actor->
z.
fixed >> 20;
414 if (
x == 81 &&
z == 12) {
415 if ((actor->
facing & 0xE000) == 0x4000) {
487 if ((ahead[0] - x >= 0 ? ahead[0] - x : x - ahead[0]) >
PIXELS(8) ||
488 (ahead[2] - z >= 0 ? ahead[2] - z : z - ahead[2]) >
PIXELS(32)) {
529 acceleration =
PIXELS(1) / 5;
596 effect->
speed = moveRate;
636 z = actor->
z.
fixed & 0xFFF00000;
666 z = actor->
z.
fixed & 0xFFF00000;
688 messageOffset = competitorId * 3;
725 for (i = 0; i < 10; i++) {
842 for (i = 15; i <= 17; i++) {
845 if (actor->
y.
fixed == 0 && height == 0) {
851 (actor->
z.
fixed >> 20) + 52);
857 for (i = 18; i <= 22; i++) {
871 for (i = 18; i <= 22; i++) {
996 particle->
timer += 5;
1016 switch (count % 180) {
1029 if (particle == 0) {
1042 particle->
x.
fixed =
x + height;
1044 particle->
y.
fixed = height;
1047 particle->
timer = 25;
1048 particle->
work = 128;
1055 const s32 *leaderScaleScript;
1065 if (battleResult < 0) {
1262 guideX = actor->
x.
part.pixel;
1263 guideZ = actor->
z.
part.pixel;
1338 if (promptResult == 0) {
1381 }
else if (promptResult == 1) {
1401 if (promptResult == 0) {
1436 }
else if (promptResult == 1) {
1455 if (promptResult == 0) {
1480 if (++promptResult > 239) {
1493 }
else if (promptResult == 1) {
1556 }
else if (result == 1) {
1630 for (i = 119; i >= 0; i--) {
1644 }
else if (result == 1) {
1686 }
else if (state == 1) {
1720 if (parameter != 0) {
1742 Colosso_LoadLettering(0);
1755 *(
s16 *)((
u8 *)base + 30) = (mode * 60);
1759 Colosso_LoadLettering(mode);
1768 Colosso_LoadLettering(5);
1775 Colosso_LoadLettering(6);
1779 Colosso_LoadLettering(7);
1796 (countdown < 0 ? -countdown : countdown) * 60;
1797 if (countdown < 0) {
1800 Colosso_LoadLettering(8);
1811 Colosso_LoadLettering(4);
1840 for (digitIndex = 7; digitIndex >= 0; digitIndex--) {
1860 while (recorder->
mode != 9) {
1877 if (randomValue * 100 >> 16 <= 9) {
1887 s32 x = position[0];
1888 s32 y = position[1];
1889 s32 z = position[2];
1923 s32 rivalFinishedFirst;
1927 s16 *linkedItemActor;
1936 if (rivalFinishedFirst != 0) {
1938 itemActorId = &
work->finishItemActorB;
1941 itemActorId = &
work->finishItemActorA;
1943 linkedItemActor = &actor->
timer;
1944 *linkedItemActor = *itemActorId;
1950 while (*linkedItemActor != 0) {
1953 if (rivalFinishedFirst == 0) {
1969 return rivalFinishedFirst;
1992 direction = subject->
facing >> 12;
1995 position.
x = subject->
x.
fixed + (step & 0xffff0000);
1996 position.
y = subject->
y.
fixed;
1998 position.
z = subject->
z.
fixed + step;
2000 target = SceneData_FindSlotAtPosition(&position, subject);
2006 position.
x = target->
x.
fixed + (step & 0xffff0000);
2009 position.
z = target->
z.
fixed + step;
2011 blocker = SceneData_FindSlotAtPosition(&position, target);
2020 blocker = SceneData_FindSlotAtPosition(&position, target);
2029 position.
x = target->
x.
fixed + (step & 0xffff0000);
2032 position.
z = target->
z.
fixed + step;
2069 {7, 5, 7, 5, 7, 11},
2070 {4, 6, 4, 6, 4, 10},
2071 {5, 7, 5, 7, 5, 12},
2072 {6, 4, 6, 4, 6, 10},
2077 0, 0, 0x4000, 0x8000, 0x8000, 0x8000, 0xc000, 0,
2095#if LANGUAGE == LANGUAGE_JAPANESE || LANGUAGE == LANGUAGE_ENGLISH
2096 0, 32, 32, 32, 96, 64, 64, 64, 128, 0,
2098 0, 32, 32, 32, 96, 64, 64, 160, 128, 0,
2103 0x1000, 512, 1, 0x2000, 0, 1, 0x1000, 256,
2104 6, 0x2000, 16, 6, 0x7fff, 30, 0x2000, 0,
2109 0x1000, 128, 1, 0x2000, 0, 1, 0x1000, 256,
2110 6, 0x2000, 16, 6, 0x7fff, 60, 0x1000, 384,
2111 6, 0x7fff, 6, 0x1000, 240, 6, 0x7fff, 6,
2112 0x1000, 368, 6, 0x7fff, 6, 0x1000, 224, 6,
2113 0x7fff, 6, 0x2000, 0, 30, 0x1000, 352, 6,
2114 0x7fff, 6, 0x1000, 208, 6, 0x7fff, 6, 0x1000,
2115 336, 6, 0x7fff, 6, 0x1000, 192, 6, 0x7fff,
2116 6, 0x1000, 320, 6, 0x7fff, 6, -1,
2164#define DIRECTION_STEP(x, z) ((u32)(x) << 16 | (u16)(z))
2186 { 0,
CONDITION_ALWAYS, 88, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2187 { 1,
CONDITION_ALWAYS, 88, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2188 { 2,
CONDITION_ALWAYS, 136, 0, 392,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
2189 { 4,
CONDITION_ALWAYS, 88, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2190 { 5,
CONDITION_ALWAYS, 88, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
2438#if LANGUAGE == LANGUAGE_JAPANESE
2439 0x4000, -188, 2048, 0x1000, 256, 1, 0x2000, 16,
2441 0x4000, -188, 2048, 0x1000, 384, 1, 0x2000, 16,
2443 1, 0x7fff, 14, 0x3000, 0, 20, 0x7fff, 60,
2444 0x3000, 2048, 20, 0x7fff, 60, -1,
2448#if LANGUAGE == LANGUAGE_FRENCH
2449 0x1000, 512, 1, 0x2000, 0, 1, 0x1000, 384,
2450 6, 0x2000, 16, 6, 0x7fff, 6, 0x1000, 512,
2451 6, 0x7fff, 6, 0x1000, 384, 6, 0x7fff, 6,
2452 0x1000, 512, 6, 0x7fff, 6, 0x1000, 384, 6,
2453 0x7fff, 6, 0x2000, 0, 30, 0x1000, 512, 6,
2454 0x7fff, 6, 0x1000, 384, 6, 0x7fff, 6, 0x1000,
2455 512, 6, 0x7fff, 6, 0x1000, 384, 6, 0x7fff,
2456 6, 0x1000, 512, 6, 0x7fff, 6, -1,
2457#elif LANGUAGE == LANGUAGE_SPANISH || LANGUAGE == LANGUAGE_ITALIAN
2458 0x1000, 384, 1, 0x2000, 0, 1, 0x1000, 256,
2459 6, 0x2000, 16, 6, 0x7fff, 6, 0x1000, 384,
2460 6, 0x7fff, 6, 0x1000, 256, 6, 0x7fff, 6,
2461 0x1000, 384, 6, 0x7fff, 6, 0x1000, 256, 6,
2462 0x7fff, 6, 0x2000, 0, 30, 0x1000, 384, 6,
2463 0x7fff, 6, 0x1000, 256, 6, 0x7fff, 6, 0x1000,
2464 384, 6, 0x7fff, 6, 0x1000, 256, 6, 0x7fff,
2465 6, 0x1000, 384, 6, 0x7fff, 6, -1,
2467 0x1000, 512, 1, 0x2000, 0, 1, 0x1000, 256,
2468 6, 0x2000, 16, 6, 0x7fff, 6, 0x1000, 384,
2469 6, 0x7fff, 6, 0x1000, 256, 6, 0x7fff, 6,
2470 0x1000, 384, 6, 0x7fff, 6, 0x1000, 256, 6,
2471 0x7fff, 6, 0x2000, 0, 30, 0x1000, 384, 6,
2472 0x7fff, 6, 0x1000, 256, 6, 0x7fff, 6, 0x1000,
2473 384, 6, 0x7fff, 6, 0x1000, 256, 6, 0x7fff,
2474 6, 0x1000, 384, 6, 0x7fff, 6, -1,
2479 0x1000, 128, 1, 0x2000, 0, 1, 0x1000, 256,
2480 6, 0x2000, 16, 6, 0x7fff, 60, 0x1000, 384,
2481 6, 0x7fff, 6, 0x1000, 272, 6, 0x7fff, 6,
2482 0x1000, 400, 6, 0x7fff, 6, 0x1000, 288, 6,
2483 0x7fff, 6, 0x2000, 0, 30, 0x1000, 416, 6,
2484 0x7fff, 6, 0x1000, 304, 6, 0x7fff, 6, 0x1000,
2485 432, 6, 0x7fff, 6, 0x1000, 320, 6, 0x7fff,
2486 6, 0x1000, 448, 6, 0x7fff, 6, -1,
Ability numbers, named from the English release.
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
void Object_LinkObjectAndSetCallback(u32 objectId, u32 linkedObjectId)
Makes an actor follow another (the linked action script): writes its linkedObject.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
s32 gStagedActor_DirectionSteps[]
Pixel step by direction: X in the upper halfword, Z in the lower.
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
static void Event_CheckAhead(void)
Checks the blocked direction before allowing another movement step.
static void Event_GrowPlant(void)
Growth on the entrance section's target: the plant grows and its cell's collision changes; 0x305 keep...
void(*) SchedulerCallback(void)
s32 Field_ClimbUp(void)
Climbing up (the player presses up at a climbable wall).
The Colosso race gauge's sprites and work.
static void Event_TalkToWallWedgeAttendant(s32 guideId)
The Wall Wedge's attendant: the first time, a warrior times his way through the moving wall; then tha...
static UNUSED void ColossoLog_RunCompetitorTalk(s32 competitorId)
Offers to practise the course with a selected solo competitor.
s16 gColossoModeScript3A[]
s32 gColossoRandomEffect[]
void(*) SceneTaskEntry(void)
static UNUSED void ColossoLog_MarkRivalFinished(void)
Marks the rival path recorder as finished.
static void ColossoLogRollingStage_WaitForSceneTask(void)
Waits for the wall pattern used by the tutorial, with a bounded timeout.
struct ScenePlacement gColossoLogPlacements[]
struct SceneEvent gColossoLogEvents[]
s32 gColossoLog_PlaceScript[]
static void Event_MoveStone(void)
After Move on the stone: its column is kept (byte flag 0x370) and its cell rebuilt.
static void Event_PassNorthWallOpening(void)
The rider passes through the moving wall's northern opening.
s32 gColossoLinkedEffect[]
static void ColossoLog_WaitForRivalToFinish(void)
Waits until the rival path recorder reaches its finished mode.
s32 gColossoSceneTaskStatus
static void ColossoLogRollingStage_InitializeModeTask(u32 mode, u32 parameter)
Selects the portrait task script and clears its movement state.
static void Event_PassSouthWallOpening(void)
The rider passes through the moving wall's southern opening.
const s8 gColossoLog_LogPattern[][6]
static s32 ColossoLogRollingStage_AdvanceParticleMotion(struct ScriptInterpreter *interpreter)
Advances a reunion particle; timer and work hold signed 1/256-pixel steps.
const u8 gColosso_LetteringPaletteOffsets[]
const struct SceneRegion * ColossoLog_GetRegions(void)
s32 gColossoParticleCount
static void ColossoLog_IntroduceFinalCourse(s32 guideId)
Stages the party behind the guide for the introduction to the third finals.
static void Event_IgnoreMove(void)
Move on this rock needs nothing more.
s32 gColossoSceneTaskState
static void Event_ReachArena(void)
Reaching the arena: the leader takes a prize (the Claymore if first, the Hunter's Sword if second),...
static s32 ColossoLogRollingStage_CheckObstacleDestination(s32 x, s32 z)
Rejects blocked cells and cells occupied by one of the three obstacles.
static void InitializeSelectedActor(s32 actorId)
Sets a companion speed for the shared solo-party placement routine.
s32 gColossoParticleKinds[]
static void InitializeActorZero(void)
Sets the leader speed for the shared solo-party placement routine.
const struct ScenePlacement * ColossoLog_GetPlacements(void)
static void Event_RideMovingSidewalk(void)
On the Moving Sidewalk, until 0x363 is set, the belt carries the controlled actor and the camera west...
static void Event_RollLongLog(void)
Walking into the long log rolls it, with the leader, the way the pad is held until something stops it...
const u16 gColossoEarlySequenceData[]
s16 gColosso_LetteringSlot
@ PRIZE_A
the arena's Claymore and Hunter's Sword
@ OPPONENT
the warrior racing Isaac to the arena
@ STEPPING_STONE_ATTENDANT
@ LONG_LOG
the log-rolling area's long log
@ FROST_TARGET
on the eastern pan
@ SCALE_PAN_WEST
the Scales of Justice
@ SCALE_WEIGHT
pushed onto the western pan
@ GUIDE
explains the third course
@ MOVING_SIDEWALK_ATTENDANT
static void Event_TalkToLogRollingAttendant(s32 actor)
The log-rolling area's attendant: the first time, a marker traces the log's route; then the objective...
s32 gColossoLog_LeaderActionB[]
static void Event_ForceSidewalkBlock(void)
Force on the Moving Sidewalk's block: it slides away and the belt carries no one any more (0x363).
static void Event_TalkToSteppingStoneAttendant(s32 guideId)
The Stepping-Stone Stage's attendant: the first time, a warrior finds the way; then the objective.
s32 ColossoLog_Initialize(void)
Restores obstacle progress, then enters practice, introduction or battle aftermath.
static void Event_TalkToScalesAttendant(s32 guideId)
The Scales of Justice's attendant: the first time, the pans are shown; then the objective.
static void Event_HaltWall(void)
Halt on the wall operator: the Wall Wedge stops at its next open pattern (0x361).
static void ColossoLogRollingStage_SpawnPeriodicParticle(void)
Shows one of three reunion particles at its scheduled point in the cycle.
static void ColossoLog_MoveOnScales(struct FieldActor *pan, s32 height)
Moves a scale pan vertically at the shared speed and acceleration.
static void Event_StepOffScales(void)
Stepping off the western pan: the scales swing back.
static void Event_TalkToMovingSidewalkAttendant(s32 guideId)
The Moving Sidewalk Stage's attendant: the first time, a warrior walks against the belt; then the obj...
static void ColossoLogRollingStage_PositionActor(s32 selector, s32 x, s32 z)
Starts a scripted pixel destination while preserving the actor height.
s16 gColossoModeScript4[]
s32 gColosso_RivalFinishScript[]
static void ColossoLogRollingStage_SpawnRandomSceneEffect(union FieldObject *fieldObject)
Occasionally scatters an effect around a moving source actor.
const struct SceneEvent * ColossoLog_GetEvents(void)
static void Event_PushWeightOrCheckAhead(void)
Walking into something: the weight is pushed, anything else is checked.
static UNUSED void ColossoLogRollingStage_NoopSceneEventHook(void)
static s32 ColossoLog_ShowActivatedSidewalkLayer(struct ScriptInterpreter *interpreter)
Displays the activated moving sidewalk and plays its arrival sounds.
s32 gColossoLog_LeaderActionA[]
const s32 gColossoLog_Record30Script[]
const s16 gColossoModeScript2[]
#define COLOSSO_LOG_FACE_DIRECTION
const struct SceneEntrance * ColossoLog_GetEntrances(void)
static void Event_FreezeOnScales(void)
Frost on the target on the eastern pan: it freezes and the Scales of Justice tip, the western pan dow...
static void ColossoLog_PushActorAhead(void)
Pushes a neighboring actor one cell when its destination and overhead are clear.
static UNUSED void FieldScene_RunScene3bcSequenceA(s32 countdown)
Unused portrait countdown for a signed number of seconds.
s16 gColossoModeScriptDefault[]
#define COLOSSO_LOG_APPLY_MATCHING_SLOT_VALUES
static void Event_SettleRocks(void)
A rock resting on the floor becomes a step (FLAG_SCENE_TEMP_14 to _16).
static s32 ColossoLog_CollectFinishEquipment(s32 firstItem, s32 secondItem)
Moves to the available finish item, equips it and announces it.
const s16 gColossoModeScript3B[]
static void ColossoLogRollingStage_RunScriptedTransition(s32 mode)
Plays the countdown portraits and the start-of-race transition.
static void ColossoLogRollingStage_ResetAndRunSceneTask(void)
Resets the moving wall to its first displayed pattern.
s32 gColossoLog_LeaderActionC[]
const u32 * ColossoLog_GetExits(void)
static void Event_TalkToFreeClimbAttendant(s32 guideId)
The Free-Climb Area's attendant: the first time, a warrior climbs across; then the objective.
static void Event_StepOnScales(void)
Stepping onto the western pan, unless the scales are frozen: it sinks with the rider as the eastern p...
static s32 ColossoLogRollingStage_RaiseLinkedSceneEffect(struct ScriptInterpreter *interpreter)
Raises the linked item actor and clears the source link.
static void ColossoLogRollingStage_NoopSceneHook(void)
static void ColossoLog_UpdateEastEndCollision(void)
Changes the eastern end collision according to the rider facing.
static void Event_PushWeight(void)
Walking into the weight pushes it, perhaps onto the scales.
static void ColossoLogRollingStage_PositionAndActivateActor(s32 selector, s32 x, s32 z)
Moves to a scripted pixel destination, waits, then restores the idle mode.
static UNUSED void WriteU32AsHex(u8 *hexText, u32 value)
Writes eight hexadecimal digits followed by a terminator.
char gColossoHexChars[20]
static s32 ColossoLogRollingStage_CheckPathClearance(s32 x, s32 z)
Checks all four cells covered by the long rolling log.
static void ColossoLogRollingStage_SceneTask(void)
Cycles the moving wall and raises the opening event beneath the rider.
static void ColossoLogRollingStage_StartSceneTask(void)
Resumes cycling the moving wall.
static void Event_SetWeightOnScales(void)
When the weight reaches the western pan, it sinks the pan and the eastern pan rises (0x368).
static void Event_PushRock(void)
Walking into a rock pushes it.
static void ColossoLog_PlayPostBattleReunion(s32 battleResult)
Reunites the party after the battle and plays the resting conversation.
struct SceneEntrance gColossoLogEntrances[]
#define COLOSSO_LOG_INITIALIZE_MODE_TASK
s32 gColossoMultiPhaseData[]
s32 gColossoLog_Actor8Action[]
const s32 gColossoSceneEventEffect[]
Declares nothing of its own: it only includes types.h.
The Colosso finals' three courses (Colosso Log, River and Wall): a helper for the race gauge that no ...
s16 gColosso_ModeMoveTarget
s16 * gColosso_LetteringScript
s16 gColosso_LetteringTimer
s32 gColosso_LetteringPosition
s16 gColosso_ModeMoveDuration
s16 gColosso_LetteringParam
s16 gColosso_LetteringMode
The engine calls the debug menus import, and their palette swatch tiles.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
static s32 FieldObject_CheckMovementCollision(struct FieldActor *actor, struct FieldPosition *position)
static s32 FieldGameFlag_GetByte(s32 flag)
static void FieldBattleFx_RunRisingObjectSequence(s32 actor, s32 mode, s32 action)
static void FieldGameFlag_SetByte(s32 flag, s32 value)
void ObjectDispatch_StartCamera(struct DispatchObject *object, s32 linkedObjectHandle)
Starts an object on the camera script (SC_CAMERA).
void ObjectDispatch_StartIdle(struct DispatchObject *object)
Starts an object on the idle script (a lone SC_END).
void ObjectDispatch_WaitForValue16(void *rawObject)
Waits until the object's script reaches SC_END (0x10), at most 300 frames.
void ObjectSystem_SuspendProjectionAndShowSprites(void)
Suspends the object camera updates, starts the palette back to normal and, a frame later,...
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_ObjectSetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
s32 Engine_LeaderCheckAhead(void)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_MapCopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Object_SetMode(struct FieldActor *object, s32 animation)
struct FieldActor * Engine_ActorLookup(s32 actor)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
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)
s32 Engine_TaskRemoveCallback(void(*callback)(void))
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_ActorSetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_ActorFaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_EventCloseScreen(void)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
void Engine_ActorDestroy(s32 actor)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
void Engine_ObjectSetScript(struct FieldActor *object, const s32 *script)
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_ActorRunRepeatedMotion(s32 actor, s32 repeats)
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)
#define STORE_CONST(place)
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
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)
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 void Actor_SetAttachedEffect(s32 actor, s32 effect)
Field objects and actors, and the scene transition styles.
@ TRANSITION_BACKDROP_FADE
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
@ ACTOR_FOLLOWS_TERRAIN
moves with the ground height under it
@ ACTOR_FALLS
falls by its gravity and bounces
#define SCENE_TRANSITION(style, variant)
The field's runtime work: map cells, scene records and regions, map markers and FieldWork.
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define IF_FLAG_SET(flag)
#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
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static s32 Task_AddCallback(void(*callback)(void), s32 priority)
Calls the main-image scheduler through engine_call.h.
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_COLOSSO_OVER
the Colosso finals have been fought
#define FLAG_SCENE_TEMP_15
#define FLAG_KEEP_MUSIC
The next scene keeps the music that is playing; scene.c clears FLAG_KEEP_MUSIC as it does,...
#define FLAG_SCENE_TEMP_16
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
#define FLAG_SCENE_TEMP_11
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_SCENE_TEMP_10
#define FLAG_SCENE_TEMP_14
#define FLAG_WON_COLOSSO
the party won the finals
GameState, the game's state: play time, coins, the scene and the leader's position,...
#define Battle_SetStart(mode)
Sets the battle start type.
struct GameState gGameState
The screen blend's globals and the graphics routines.
void BattleEffect_PauseObject(s32 actorId)
Pauses object id, keeping its per-frame update and, if it is animated, its first animation's param in...
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
The heap's work slots and HeapState.
The main-image routines scene overlays import.
The hardware's I/O registers and their bits, as pret names them.
The register write queue that VBlank carries out after each finished frame.
Colosso Log, River and Wall, and Goma Cave's entrance: giving a character an item and putting it on.
Item numbers, named from the English release.
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysHeld
Keys down now.
Small statement macros both games use for positions, velocities and bounds.
#define SET_VECTOR(v, x, y, z)
Sets the x, y and z of a three-part vector: a position about to be projected, a per-frame step,...
void Map_SetLayerEntryFlag(u32 channelIndex)
Pauses tile animation channel channelIndex by setting its paused byte.
void Map_ClearLayerEntryFlag(u32 channelIndex)
Resumes tile animation channel channelIndex by clearing its paused byte.
void Vector_AddPolarOffset(s32 radius, s32 angle, void *position)
Moves the point position by radius in direction angle on the ground plane: x by the cosine,...
The heaps: allocating and freeing blocks.
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_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.
void FieldObject_WaitForMove(void *fieldObject)
Waits a frame at a time until a field object has arrived at its target, at most 600 frames.
Palette fades, the battle effect palette buffers and the colour channel curves.
@ PALETTE_TRANSFORM_GREY
grey of brightness (2R + 4G + B) / 7
@ 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 Event_SetDefeatDestination(s32 scene, s32 entrance)
Sets where the party wakes up after losing a battle (gGameState.defeatScene and defeatEntrance).
void Event_SetNextDestination(s32 scene, s32 entrance)
Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
Resource numbers, named where their contents are known.
char ResourceId_RivalPathC
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Scene numbers, named after their places.
The field object script interpreter and the operands its commands read.
Song and sound effect ids, indices into gSound_SongTable.
#define MUS_TREASURE_FOUND
s32 AudioCommand_GetStateByte(void)
Returns the remaining delay before BGM can be restored after a fanfare.
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()
Colosso Log, River and Wall, and Crossbone Isle's platform rooms: an actor drawn as an item's menu ic...
void Colosso_ShowItemIcon(s32 id, s32 item)
Replaces the picture of actor id, when it has a sprite of its own, with the icon of item: the icon's ...
void Colosso_ShowPointer(u32 x, u32 y, u32 style)
Shows the pointer at screen pixel (x, y), drawn at priority style & 3.
void Colosso_MovePointer(u32 x, u32 y, u32 duration)
Glides the pointer to screen pixel (x, y) over duration frames.
void OverlayObject_ResetMotionFields(s32 actor)
Stops the actor where it is: no velocity and no destination.
void Colosso_WalkActorTo(s32 actorId, s32 x, s32 z)
Walks the actor at 2 pixels a frame towards pixel (x, z) and returns at once.
void Colosso_FadeInCompetitor(s32 id, s32 x, s32 z)
Isaac (id) appears at pixel (x, z) on the stage, facing south: he fades in through the backgrounds wh...
void Colosso_HidePointer(void)
Hides the pointer and frees its VRAM block.
void Colosso_WalkActorToAndStand(s32 actorId, s32 x, s32 z)
Walks the actor at 1.25 pixels a frame to pixel (x, z), waits until it arrives and stands it there.
void Colosso_RestoreCompetitor(s32 id)
Puts Isaac (id) back where Colosso_FadeInCompetitor found him: he stands (or turns south,...
void * Colosso_FindActorAhead(void)
Returns the placed actor standing one cell, or else two cells, ahead of the actor the player moves (s...
Colosso Log and Colosso River: setting up a race against the rival, with the race gauge at the top of...
void Colosso_StartRaceGauge(s32 playerActor, s32 rivalActor, s32 segments, s32 finishX, s32 finishZ, s32 finishItemActorA, s32 finishItemActorB)
Starts the race gauge (struct ColossoGaugeWork, in work slot 59): Isaac and the rival as playerActor ...
void Colosso_StartRival(s32 resource)
Decodes the rival's recorded path (resource) after the gauge's work and, unless the party returns to ...
void Colosso_OfferCheeringSpot(s32 mode, s32 guide, s32 stage)
The guide at a stage, with the mode Colosso_GreetAtStage returned: offer a friend's cheering at the s...
void Colosso_RepeatStageNumber(s32 speaker, s32 competitor)
A stage's guide, after describing the stage, names it again: the copy of that line after it in the te...
void Colosso_AskDoneCheering(s32 id)
A stage's guide, talking to a friend who looks around alone, asks whether they are done cheering.
static void Colosso_TakePlaceForMatch(void)
Raised event 99: the nearest actor with animation 165 level with or below the friend on the map calls...
void Colosso_PlaceFriendsAtCheeringSpots(void)
Puts Garet, Ivan and Mia back at the cells where they chose to cheer, at the centre of each cell.
void Colosso_ClearCheeringSpots(void)
Forgets where Garet, Ivan and Mia cheer from.
s32 Colosso_GreetAtStage(s32 speaker, s32 competitor)
A stage's guide names the stage and decides what to do next.
void Colosso_ControlCharacterAlone(s32 id)
Makes the character the party's only member, the one the player moves and the camera follows,...
void Colosso_RaiseTakePlaceOnPsynergy(void)
A scene callback while a friend looks around the course alone (entrance 2): when the Psynergy request...
static void Colosso_AskReadyToRace(s32 actorId)
The guide at the course's start.
#define offsetof(type, member)
The Colosso race gauge's work at the start of work slot 59: its sprites, how far it has slid down,...
A field object as the object dispatcher's far calls take it.
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
struct FieldActor * viewCenter
the object the map view follows
s16 raisedTrigger
a raised event for Scene_RunRaisedEvent
s32 startTransition
SCENE_TRANSITION(style, variant).
s16 mode
MODE_WORLD_MAP (3) on the world map.
s32 transitionFrames
frames
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 speed
speed limit, 16.16 fixed-point pixels per frame
u16 radius
Collision radius in pixels: 16, or half the sprite metadata's boxY, when created; the overlap checks ...
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 velocityX
16.16 fixed-point pixels per frame
union FieldCoordinate y
16.16 fixed-point pixels
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
s32 terrainHeight
16.16 fixed-point pixels
s32 velocityY
16.16 fixed-point pixels per frame
union FieldCoordinate z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
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
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
s32 velocityZ
16.16 fixed-point pixels per frame
u8 terrainId
The map layer (0 to 3) its ground height is read from, which the scrolling camera updates from the ce...
s32 z
16.16 fixed-point pixels
Full event work allocated by Field_RunScene (heap slot 27).
The game's state: play time, coins, the scene and the leader's position, the active party and the opt...
u8 movementMode
1 while the leader is climbing, 0 otherwise
s32 selectedActor
the leader: its unit and its actor
The Colosso rival's path player in the scene state: its mode (1 playing, 2 recording,...
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 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.
s32 GetMapCellCollision(s32 layer, s32 x, s32 y)
Returns the collision code of a layer's cell at (x, y) in 16.16 pixels.
void SetMapCellCollision(u32 layer, s32 x, s32 y, u32 collisionCode)
Sets the collision code of a layer's cell at (x, y) in 16.16 pixels.
s32 Map_GetTerrainHeight(s32 layer, s32 x, s32 y)
Returns the ground height of a layer at (x, y) in 16.16 pixels: the height function of the cell's ter...
The integer types, TRUE, UNUSED and the fixed-address macros.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
void Party_RestoreHpPp(s32 cureConditions)
Restores every party member's HP and PP; with cureConditions 1 it also cures poison and haunting.
The patch levels: our groups of the measured changes from the Japanese release.
The sprite VRAM block cache and its owners.
void UiWork_PushValueSlot(u32 value, u32 kind)
Adds a message argument of kind (MSG_ARG_) with value to the first free place of the argument table; ...