46#include "text/msg_ids.h"
60#define COLOSSO_WALL_FIRST_PLATFORM 22
61#define COLOSSO_WALL_LAST_PLATFORM 25
62#define COLOSSO_WALL_PLATFORM_CYCLE_FRAMES 120
63#define COLOSSO_WALL_PLATFORM_CROSSING_FRAME 75
64#define COLOSSO_WALL_DEMONSTRATION_TIMEOUT_FRAMES 600
65#define COLOSSO_WALL_LOG_TRAVEL_PIXELS 64
70#define COLOSSO_WALL_OFFSET_FIXED(value) ((value) * 0x10000)
72#define COLOSSO_WALL_OFFSET_FIXED(value) ((value) << 16)
75#if LANGUAGE == LANGUAGE_JAPANESE || LANGUAGE == LANGUAGE_ENGLISH
76#define COLOSSO_WALL_ALTERNATE_PORTRAIT_PALETTE_OFFSET 64
78#define COLOSSO_WALL_ALTERNATE_PORTRAIT_PALETTE_OFFSET 160
81#if LANGUAGE == LANGUAGE_JAPANESE
82#define COLOSSO_WALL_INTRO_SCALE 256
84#define COLOSSO_WALL_INTRO_SCALE 384
87#if LANGUAGE == LANGUAGE_FRENCH
88#define COLOSSO_WALL_PULSE_FIRST_SCALE 512
89#define COLOSSO_WALL_PULSE_HIGH_SCALE 512
90#define COLOSSO_WALL_PULSE_LOW_SCALE 384
91#elif LANGUAGE == LANGUAGE_SPANISH || LANGUAGE == LANGUAGE_ITALIAN
92#define COLOSSO_WALL_PULSE_FIRST_SCALE 384
93#define COLOSSO_WALL_PULSE_HIGH_SCALE 384
94#define COLOSSO_WALL_PULSE_LOW_SCALE 256
96#define COLOSSO_WALL_PULSE_FIRST_SCALE 512
97#define COLOSSO_WALL_PULSE_HIGH_SCALE 384
98#define COLOSSO_WALL_PULSE_LOW_SCALE 256
102#define COLOSSO_WALL_SHOW_MESSAGE Engine_EventShowMessage
103#define COLOSSO_WALL_MOVE_ACTOR_PAIR ColossoWall_MovePusherAndLog
104#define COLOSSO_WALL_START_MODE_TASK ColossoWall_StartLetteringAnimation
105#define COLOSSO_WALL_APPLY_MATCHING_SLOT_VALUE Scene_GiveAndEquipItem
107#define COLOSSO_WALL_SHOW_MESSAGE ((s32 (*)())Engine_EventShowMessage)
108#define COLOSSO_WALL_MOVE_ACTOR_PAIR ((s32 (*)())ColossoWall_MovePusherAndLog)
109#define COLOSSO_WALL_START_MODE_TASK \
110 ((s32 (*)())ColossoWall_StartLetteringAnimation)
111#define COLOSSO_WALL_APPLY_MATCHING_SLOT_VALUE \
112 ((s32 (*)())Scene_GiveAndEquipItem)
152#define WORK_SLOT_STAGE 59
201 if ((obstacle->
x.
fixed >> 20) == 36) {
229 column = obstacle->
x.
fixed >> 20;
234 column = obstacle->
x.
fixed >> 20;
239 column = obstacle->
x.
fixed >> 20;
258 s32 settleRotationStep;
262 sprite = obstacle->sprite;
265 obstacle->
speed = 0x13333;
269 for (rotationStep = 0, fallFrames = 9; fallFrames >= 0; fallFrames--) {
275 for (settleRotationStep = 0x168, settleFrames = 21; settleFrames >= 0;
277 sprite->
rotation -= settleRotationStep;
279 settleRotationStep += 36;
361 pusher->
speed = 0x10000;
375 log->
speed = 0x10000;
379 if (offsetX < 0 || offsetZ < 0) {
398 if (pusher->
z.
fixed >> 20 > 12) {
427 s32 heading = (pusherActor->
facing + 0x1000) & 0xe000;
428 s32 alongX = (log->
x.
fixed >> 20) != halfCellX / 2;
435 offsetX = (halfCellX - log->
x.
fixed) / 2;
439 offsetZ = (halfCellZ - log->
z.
fixed) / 2;
459 pusherActor->
z.
fixed + offsetZ);
540 platformX = platform->
x.
fixed;
542 deltaX = platformX - riderX;
544 if (deltaX > 0x9ffff) {
549 if (riderX > 0x9ffff) {
553 platformZ = platform->
z.
fixed;
555 deltaZ = platformZ - riderZ;
557 if (deltaZ > 0x9ffff) {
562 if (riderZ > 0x9ffff) {
567 riderZ = platform->
z.
fixed;
677 s32 rivalFinishedFirst;
689 refreshCount = (refreshCount - 1);
690 }
while (refreshCount >= 0);
712 resultBase - rivalFinishedFirst + 1);
763 for (obstacleId = 26; obstacleId <= 30; obstacleId++) {
805 column = actor->
x.
fixed >> 20;
810 column = actor->
x.
fixed >> 20;
821 actor->
x.
fixed = (
x << 20) + 0x80000;
830 actor->
x.
fixed = (
x << 20) + 0x80000;
839 actor->
x.
fixed = (
x << 20) + 0x80000;
850 platformId++, columnOffset += 2) {
864 actor->
speed = 0x8000;
933 attendantX = actor->
x.
part.pixel;
934 attendantZ = actor->
z.
part.pixel;
942 ((attendantZ << 16) - 0x300000));
944 (attendantZ << 16) - 0x280000);
946 (attendantZ << 16) - 0x280000);
948 ((attendantZ << 16) - 0x200000));
950 ((attendantZ << 16) - 0x500000));
1031 }
else if (result == 1) {
1131 }
else if (result == 1) {
1188 }
else if (result == 1) {
1202 s32 alongX = (obstacle->
x.
fixed >> 20) != column / 2;
1209 offsetX = (column - obstacle->
x.
fixed) / 2;
1213 offsetZ = (row - obstacle->
z.
fixed) / 2;
1217 obstacle->
speed = 0x8000;
1227 pusherActor->
z.
fixed + offsetZ);
1274 }
else if (result == 1) {
1294 s32 priority = 0xc80;
1306 if (tileVariant != 0) {
1328 Colosso_LoadLettering(0);
1341 *(
s16 *)((
u8 *)openingScript + 30) = (mode * 60);
1345 Colosso_LoadLettering(mode);
1355 Colosso_LoadLettering(5);
1362 Colosso_LoadLettering(6);
1366 Colosso_LoadLettering(7);
1384 (result < 0 ? -result : result) * 60;
1388 Colosso_LoadLettering(8);
1398 Colosso_LoadLettering(4);
1427 for (digit = 7; digit >= 0; digit--) {
1459 if (chance * 100 >> 16 <= 9) {
1469 s32 x = position[0];
1470 s32 y = position[1];
1471 s32 z = position[2];
1475 if (particle != 0) {
1506 s32 finishAlreadyReached;
1517 if (*(
s32 *)(raceWork + 232) < competitor->
x.
fixed) {
1518 x = *(
s32 *)(raceWork + 232) + 0xc0000;
1520 x = *(
s32 *)(raceWork + 232) - 0xc0000;
1523 if (finishAlreadyReached != 0) {
1524 z = *(
s32 *)(raceWork + 236) + 0x100000;
1525 itemActor = (
u16 *)(raceWork + 228);
1527 z = *(
s32 *)(raceWork + 236) - 0x100000;
1528 itemActor = (
u16 *)(raceWork + 226);
1532 *
timer = *itemActor;
1534 competitor->
speed = 0x10000;
1540 while (*
timer != 0) {
1545 if (finishAlreadyReached == 0) {
1565 return finishAlreadyReached;
1573 s32 raceMode,
s32 finishX,
1574 s32 finishZ,
s32 firstItem,
1585 *(
u16 *)(raceWork + 222) = leaderId;
1586 *(
u16 *)(raceWork + 224) = rivalId;
1587 *(
u16 *)(raceWork + 226) = firstItem;
1588 *(
u16 *)(raceWork + 228) = secondItem;
1589 *(
u16 *)(raceWork + 230) = raceMode;
1590 *(
s32 *)(raceWork + 232) = finishX;
1591 *(
s32 *)(raceWork + 236) = finishZ;
1602 *(
u16 *)(raceWork + 218) = 0;
1603 *(
u16 *)(raceWork + 220) = 0;
1610 *(
u16 *)(raceWork + 216) = vramSlot;
1628 pathState->
f4 = *(
u16 *)(raceWork + 224);
1654 direction = pusher->
facing >> 12;
1657 destination.
x = pusher->
x.
fixed + (packedOffset & 0xffff0000);
1658 destination.
y = pusher->
y.
fixed;
1659 packedOffset <<= 16;
1660 destination.
z = pusher->
z.
fixed + packedOffset;
1662 obstacle = SceneData_FindSlotAtPosition(&destination, pusher);
1663 if (obstacle == 0) {
1669 destination.
x = obstacle->
x.
fixed + (packedOffset & 0xffff0000);
1670 destination.
y = obstacle->
y.
fixed;
1671 packedOffset <<= 16;
1672 destination.
z = obstacle->
z.
fixed + packedOffset;
1674 blocker = SceneData_FindSlotAtPosition(&destination, obstacle);
1679 destination.
x = obstacle->
x.
fixed;
1680 destination.
y = obstacle->
y.
fixed + 0x100000;
1681 destination.
z = obstacle->
z.
fixed;
1683 blocker = SceneData_FindSlotAtPosition(&destination, obstacle);
1692 destination.
x = obstacle->
x.
fixed + (packedOffset & 0xffff0000);
1693 destination.
y = obstacle->
y.
fixed;
1694 packedOffset <<= 16;
1695 destination.
z = obstacle->
z.
fixed + packedOffset;
1705 obstacle->
speed = 0x3333;
1710 pusher->
speed = 0x3333;
1718 obstacle->
x.
fixed = destination.
x;
1719 obstacle->
z.
fixed = destination.
z;
1732 0, 32, 32, 32, 96, 64, 64,
1737 0x1000, 512, 1, 0x2000, 0, 1, 0x1000, 256,
1738 6, 0x2000, 16, 6, 0x7fff, 30, 0x2000, 0,
1743 0x1000, 128, 1, 0x2000, 0, 1, 0x1000, 256,
1744 6, 0x2000, 16, 6, 0x7fff, 60, 0x1000, 384,
1745 6, 0x7fff, 6, 0x1000, 240, 6, 0x7fff, 6,
1746 0x1000, 368, 6, 0x7fff, 6, 0x1000, 224, 6,
1747 0x7fff, 6, 0x2000, 0, 30, 0x1000, 352, 6,
1748 0x7fff, 6, 0x1000, 208, 6, 0x7fff, 6, 0x1000,
1749 336, 6, 0x7fff, 6, 0x1000, 192, 6, 0x7fff,
1750 6, 0x1000, 320, 6, 0x7fff, 6, -1,
1797#define DIRECTION_STEP(x, z) ((u32)(x) << 16 | (u16)(z))
1819 { 1,
CONDITION_ALWAYS, 1272, 0, 168,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1820 { 2,
CONDITION_ALWAYS, 1224, 0, 488,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
1821 { 10,
CONDITION_ALWAYS, 384, 0, 264,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1965 1, 0x7fff, 14, 0x3000, 0, 20, 0x7fff, 60,
1966 0x3000, 2048, 20, 0x7fff, 60, -1,
1982 0x1000, 128, 1, 0x2000, 0, 1, 0x1000, 256,
1983 6, 0x2000, 16, 6, 0x7fff, 60, 0x1000, 384,
1984 6, 0x7fff, 6, 0x1000, 272, 6, 0x7fff, 6,
1985 0x1000, 400, 6, 0x7fff, 6, 0x1000, 288, 6,
1986 0x7fff, 6, 0x2000, 0, 30, 0x1000, 416, 6,
1987 0x7fff, 6, 0x1000, 304, 6, 0x7fff, 6, 0x1000,
1988 432, 6, 0x7fff, 6, 0x1000, 320, 6, 0x7fff,
1989 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.
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)
#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...
The task scheduler: tasks, their order and the scheduler's state.
s32 Field_ClimbUp(void)
Climbing up (the player presses up at a climbable wall).
const u8 gColosso_LetteringPaletteOffsets[]
static void Event_IgnoreMove(void)
Move on this rock needs nothing more.
static void Event_ReachArena(void)
Reaching the arena: the leader takes a prize (the Claymore if first, the Hunter's Sword if second),...
s16 gColosso_LetteringSlot
@ PRIZE_A
the arena's Claymore and Hunter's Sword
@ OPPONENT
the warrior racing Isaac to the arena
@ GUIDE
explains the third course
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 gColosso_RivalFinishScript[]
static void Event_PushRock(void)
Walking into a rock pushes it.
u8 gColosso_GaugeGraphics[]
static UNUSED void Text_WriteU32AsHex(u8 *buf, u32 value)
Writes eight hexadecimal digits and a terminating null.
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
static s32 ColossoWall_ApproachFinishAndTakeItem(s32 firstItem, s32 secondItem)
Approaches the finish item on the unused side and shows the item message.
static void Event_TalkToWallAttendant(s32 attendant)
The Wall's attendant: a warrior climbs it; then the objective.
static void ColossoWall_StageBattleResult(s32 result)
Back from the battle: the two warriors stand in the arena as the result is shown.
static void ColossoWall_ShowRoundStartLettering(s32 mode)
Shows the course-opening lettering and plays its timed audio cues.
static s32 ColossoWall_RaiseLinkedSceneEffect(struct ScriptInterpreter *interpreter)
Raises the linked finish effect, starts its script and clears the link.
static void ColossoWall_StartRivalPath(s32 pathResource)
Decodes the rival's recorded path and starts its playback task.
static void ColossoWall_ShowBattleResultLettering(s32 result)
Shows the win-or-loss lettering and the appropriate competitor's reaction.
static void Event_FreezeWestTarget(void)
Frost on the western target: it freezes and its crossing opens (0x331).
s32 gColossoWall_ApproachScript[]
#define COLOSSO_WALL_OFFSET_FIXED(value)
const u8 gColossoWall_RollLogScript[]
static void Event_PrepareForce(void)
Enables the child effect for Force on the course obstacle.
static void ColossoWall_StartMovingPlatforms(void)
Starts the moving-platform task and releases its pause flag.
#define COLOSSO_WALL_PLATFORM_CROSSING_FRAME
struct ScenePlacement gColossoWallPlacements[]
struct SceneEntrance gColossoWallEntrances[]
s16 gColossoWall_ModeRecordDefault[]
@ FALLING_OBSTACLE
knocked down by Force on FORCE_TARGET
@ SHIFTING_FLOOR_ATTENDANT
@ RIDING_LOG_NORTH
the Log-Rolling Stage's two logs
static void InitializeSelectedActor(s32 actorId)
Sets the specified actor's walking speed and acceleration.
static UNUSED void ColossoWall_RollCenterLogSouth(void)
Rolls the center log south and rebuilds the log collision rectangles.
#define COLOSSO_WALL_INTRO_SCALE
static void Event_KnockDownObstacle(void)
Force on the target: the obstacle spins down into place and the way past it opens (0x330).
static void InitializeActorZero(void)
Sets the party leader's walking speed and acceleration.
static void ColossoWall_WaitForRivalFinish(void)
static void Event_RollWestLogWest(void)
static void Event_PushRockAndUpdateCells(void)
Pushes an obstacle, then restores the first obstacle's collision cell.
static void Event_FreezeEastTarget(void)
Frost on the eastern target: it freezes and its crossing opens (0x332).
u32 gColossoWall_DirectionSteps[]
static void SceneState_EmptyHook(void)
Retains the empty hook called before the finish sequence.
const s16 gColossoWall_ModeRecordThreeAlt[]
s16 gColossoWall_ModeRecordFour[]
s32 gColossoWall_SpectatorTimer
static void Event_RollEastLogEast(void)
static void ColossoWall_PushAdjacentObstacle(void)
Pushes the adjacent obstacle only when the destination and space above are clear.
#define COLOSSO_WALL_LAST_PLATFORM
#define COLOSSO_WALL_SHOW_MESSAGE
static void Event_TalkToMiniMazeAttendant(s32 attendant)
The Mini-Maze's attendant: the first time, a warrior runs the maze; then the objective.
#define COLOSSO_WALL_PULSE_FIRST_SCALE
static void ColossoWall_StartLetteringAnimation(u32 mode, u32 tileVariant)
Chooses the lettering animation script and resets its task state.
static void Event_UpdateMovedRockCell(void)
Updates the first movable obstacle's collision after Move.
static void Event_TalkToShiftingFloorAttendant(s32 attendant)
The shifting floor's attendant: the first time, a warrior rides the lifts; then, that the lifts' oper...
#define COLOSSO_WALL_DEMONSTRATION_TIMEOUT_FRAMES
#define COLOSSO_WALL_FIRST_PLATFORM
#define COLOSSO_WALL_START_MODE_TASK
static UNUSED void ColossoWall_RollCenterLogNorth(void)
Rolls the center log north and rebuilds the log collision rectangles.
#define COLOSSO_WALL_PULSE_HIGH_SCALE
s32 gColossoWall_SpectatorPhase
static void ColossoWall_UpdateRollingLogCollision(void)
Rebuilds the three rolling logs' collision rectangles at their positions.
const s16 gColossoWall_ModeRecordTwo[]
#define COLOSSO_WALL_PULSE_LOW_SCALE
static void Event_RunRisingSequence(void)
Runs the rising-object sequence for the actor touching the obstacle.
static void ColossoWall_WaitForPlatformCrossingPhase(void)
Waits for the demonstration's crossing phase, with a ten-second timeout.
static void Event_SaveMovedRockColumns(void)
Saves the movable obstacles' columns and rebuilds their collision cells.
void FieldScene_BuildDescriptorAndInstallTask(s32 leaderId, s32 rivalId, s32 raceMode, s32 finishX, s32 finishZ, s32 firstItem, s32 secondItem)
Allocates the race work, records both competitors and installs the gauge task.
static void ColossoWall_RollLogToCell(s32 logId, s32 halfCellX, s32 halfCellZ)
Rolls a log to half-cell coordinates while its pusher follows halfway.
static void ColossoWall_ResetMovingPlatforms(void)
Stops the moving-platform task and restores its starting row.
#define COLOSSO_WALL_PLATFORM_CYCLE_FRAMES
static void Event_RollEastLogWest(void)
static void Event_RollWestLogEast(void)
struct SceneEvent gColossoWallEvents[]
static UNUSED void ColossoWall_MarkRivalFinished(void)
static void ColossoWall_MovePusherAndLog(s32 logId, s32 offsetX, s32 offsetZ)
Moves a riding log and its pusher to aligned cell centers.
s32 ColossoWall_Initialize(void)
Restores obstacle progress and sets up the selected course entrance.
static void ColossoWall_IntroduceSecondFinals(s32 attendantId)
Introduces the second finals course, then gathers the party behind Isaac.
static void ColossoWall_PushBlockToCell(s32 obstacleId, s32 column, s32 row)
Moves a demonstration obstacle to pixel coordinates while its pusher follows.
static void ColossoWall_UpdateMovingPlatforms(void)
Carries the selected actor on the moving platforms and alternates their routes.
static void Event_HaltLifts(void)
Halt on the lift operator: the lifts stop and leave a crossing (0x334).
#define COLOSSO_WALL_MOVE_ACTOR_PAIR
static void Event_RideLog(void)
Moves the aligned riding log in the direction the player holds.
static void ColossoWall_SpawnRandomSceneEffect(union FieldObject *fieldObject)
Occasionally spawns a falling particle around the linked finish effect.
#define COLOSSO_WALL_APPLY_MATCHING_SLOT_VALUE
static void Event_TalkToBoardWalkAttendant(s32 attendant)
The Board Walk's attendant: a warrior rolls a log into a path; then the objective.
s32 gColossoWall_RaiseScript[]
#define COLOSSO_WALL_ALTERNATE_PORTRAIT_PALETTE_OFFSET
#define COLOSSO_WALL_LOG_TRAVEL_PIXELS
s32 gColossoWall_SparkScript[]
s16 gColossoWall_ModeRecordThree[]
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 FieldResource_DecodeType01(const void *source, void *destination)
Decodes type-01 compressed data.
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_WaitForValue16(void *rawObject)
Waits until the object's script reaches SC_END (0x10), at most 300 frames.
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_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Object_SetMode(struct FieldActor *object, s32 animation)
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))
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 Actor_FaceActor(s32 actor, s32 target, s32 frames)
s32 Engine_VramLoad(s32 block, s32 size, const void *data)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
void Engine_ActorDestroy(s32 actor)
void Engine_ObjectSetScript(struct FieldActor *object, const s32 *script)
void Engine_EventOpenScreen(void)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(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)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
void Engine_ActorSetChildValue(s32 actor, s32 value)
#define STORE_CONST(place)
s32 Engine_GameFlagIsSet(s32 flag)
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)
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)
Field objects and actors, and the scene transition styles.
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 SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void FieldObject_SetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
Game flags, named where their meaning is shown.
#define FLAG_KEEP_MUSIC
The next scene keeps the music that is playing; scene.c clears FLAG_KEEP_MUSIC as it does,...
#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
BattleFxScene, the work of a battle or field Psynergy effect scene, and its arc objects.
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 work slots of gWorkSlot, read through their own names.
void * gEffectWork
Slot 56: points to a scene-specific structure.
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_BumpAllocateAlternatePool(s32 size)
As MemAlloc, but tries EWRAM first.
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 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.
void Runtime_BumpFree(void *buffer)
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_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.
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_RivalPathB
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Scene numbers, named after their places.
s32 Scheduler_SetTaskFlags(SchedulerCallback callback, u32 mask)
Stores mask as the flags of the task running callback; bit 0 keeps it running while the overlay tasks...
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_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_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_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.
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
u16 rotation
1/65536 turns
The work of a Psynergy effect scene: its caster and target, where it takes place, the map state it re...
s8 childMode
set by some scenes: Frost and Force leave the target be
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 ...
s32 startTransition
SCENE_TRANSITION(style, variant).
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
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
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
u8 paused
nonzero skips its script and motion, not its update
union FieldCoordinate y
16.16 fixed-point pixels
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
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....
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
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 rival's recorded-path playback state, held in the scene state; status 9 marks the rival finished.
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
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
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.
s32 Resource_FindFreeEntry(void)
Returns the number of the first free cache entry, or VRAM_CACHE_ENTRY_COUNT when all are taken.
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; ...