108 options.
update = Effect_AdvanceMotion;
109 for (angleStep = 0; angleStep <= 16; angleStep += 2) {
110 angle = angleStep << 12;
114 velocityX = velocity.
x;
115 velocity.
z = velocityZ;
117 velocity.
x = velocityX;
119 velocity.
y, velocityZ, 0x01000001, &options);
201 FieldScene_RedrawActorFootprint(9);
202 FieldScene_RedrawActorFootprint(10);
248 if (current == first) {
255 if (current >= first) {
299 column = block->
x.
fixed >> 20;
346 StagedActor_AdvancePair();
542 if (StagedActor_FindClearPosition(&probe) != 0) {
543 SceneActor_MoveAndRedraw(probe);
560 fixedX = ((selectedActor->
x.
fixed + (xOffset *
PIXELS(1))) & 0xFFF00000) +
562 fixedZ = ((selectedActor->
z.
fixed + (zOffset *
PIXELS(1))) & 0xFFF00000) +
583 if (xOffset < 0 || zOffset < 0) {
707 destination.
y = actor->
y.
fixed;
710 s32 direction = (actor->
facing + 0x2000) & 0xc000;
730 movingFlags &= *motionFlags;
731 *motionFlags = (
u8)movingFlags;
735 s16 *pixelCoordinates = (
s16 *)&destination;
737 s16 *pixelCoordinates = (
s16 *)requested;
741 pixelCoordinates[5]);
745 *motionFlags = (
u8)savedMotionFlags;
758 destination.
x = actor->
x.
fixed;
759 destination.
y = actor->
y.
fixed;
770 destination.
x = actor->
x.
fixed;
771 destination.
y = actor->
y.
fixed;
783 destination.
y = actor->
y.
fixed;
784 destination.
z = actor->
z.
fixed;
795 destination.
y = actor->
y.
fixed;
796 destination.
z = actor->
z.
fixed;
809 if (actor12X == 24) {
811 }
else if (actor15X == 24) {
818 }
else if (actorZ == 14) {
819 if (actor12X == 24) {
822 if (actor15X == 24) {
827 }
else if (actorZ == 10) {
828 if (actor15X == 24) {
839 s32 routeX = actorX - 1;
853 s32 footprintColumn = column - 1;
868 s32 footprintRow = row - 1;
884 if (block12Column == 24) {
890 }
else if (row == 10) {
891 if (block12Column == 24) {
895 }
else if (row == 14) {
912 if (block15Column >= 31 && block15Column <= 33) {
914 }
else if (block13Column >= 31 && block13Column <= 33) {
920 }
else if (row == 10) {
921 if (block15Column >= 31 && block15Column <= 33) {
924 if (block13Column >= 31 && block13Column <= 33) {
928 }
else if (row == 7) {
963 }
else if (column == 36) {
986 }
else if (column == 34) {
1002 }
else if (column == 34) {
1005 }
else if (column == 24) {
1020 }
else if (column == 34) {
1022 }
else if (column == 36) {
1037 if (block15Column == 34) {
1039 }
else if (block10Row == 7) {
1041 }
else if (block15Column == 30) {
1047 }
else if (column == 35) {
1048 if (block15Column == 34) {
1051 if (block10Row == 7) {
1053 }
else if (block15Column == 30) {
1059 }
else if (column == 34) {
1060 if (block10Row == 7) {
1063 if (block15Column == 30) {
1068 }
else if (column == 31) {
1069 if (block15Column == 30) {
1073 }
else if (column == 25) {
1089 }
else if (column == 31) {
1091 }
else if (column == 34) {
1093 }
else if (column == 35) {
1095 }
else if (column == 36) {
1110 if (block10Row == 7) {
1112 }
else if (block8Row == 7) {
1118 }
else if (column == 34) {
1119 if (block10Row == 7) {
1124 }
else if (column == 33) {
1126 }
else if (column == 31) {
1128 }
else if (column == 30) {
1130 }
else if (column == 24) {
1145 if (block10Row == 7 || block13Column == 31) {
1147 }
else if (block13Column == 34) {
1150 }
else if (block13Column == 35) {
1157 }
else if (column == 30 || block13Column == 31) {
1158 if (block10Row == 7) {
1161 if (block13Column == 34) {
1163 }
else if (block13Column == 35) {
1168 }
else if (column == 33) {
1169 if (block13Column == 34) {
1172 if (block13Column == 35) {
1177 }
else if (column == 34) {
1179 }
else if (column == 35) {
1193 if (block19Column >= 3 && block19Column <= 5) {
1198 }
else if (row == 18) {
1199 if (block19Column >= 3 && block19Column <= 5) {
1203 }
else if (row == 15) {
1217 }
else if (row == 18) {
1219 }
else if (row == 19) {
1226#define IS_IN_BLOCK_CROSSING_COLUMNS(x) ((x) >= 6 && (x) <= 8)
1253 }
else if (row == 18) {
1264 }
else if (row == 15) {
1273 }
else if (row == 14) {
1282 }
else if (row == 12) {
1287 }
else if (row == 11) {
1292 }
else if (row == 9) {
1301#undef IS_IN_BLOCK_CROSSING_COLUMNS
1308 s32 companion19Column;
1309 s32 companion14Column;
1317 if ((
u32)(companion14Column - 6) <= 2) {
1319 }
else if ((
u32)(companion19Column - 6) <= 2) {
1325 }
else if (row == 11) {
1326 if ((
u32)(companion14Column - 6) <= 2) {
1329 if ((
u32)(companion19Column - 6) <= 2) {
1334 }
else if (row == 12) {
1335 if ((
u32)(companion19Column - 6) <= 2) {
1340 }
else if (row == 14) {
1341 if ((
u32)(companion19Column - 6) <= 2) {
1345 }
else if (row == 15) {
1347 }
else if (row == 18) {
1349 }
else if (row == 19) {
1360#undef IS_IN_BLOCK_CROSSING_COLUMNS
1361#define IS_IN_BLOCK_CROSSING_COLUMNS(x) ((x) >= 9 && (x) <= 11)
1388 }
else if (row == 18) {
1400 }
else if (row == 15) {
1409 }
else if (row == 14) {
1418 }
else if (row == 12) {
1423 }
else if (row == 11) {
1428 }
else if ((
u32)row <= 9) {
1437#undef IS_IN_BLOCK_CROSSING_COLUMNS
1444 s32 companion19Column;
1445 s32 companion14Column;
1446 s32 companion16Column;
1455 if ((
u32)(companion16Column - 9) <= 2) {
1458 if ((
u32)(companion14Column - 9) <= 2) {
1461 if ((
u32)(companion19Column - 9) > 2) {
1466 }
else if (row == 11) {
1467 if ((
u32)(companion14Column - 9) <= 2) {
1470 if ((
u32)(companion19Column - 9) <= 2) {
1475 }
else if (row == 12) {
1476 if ((
u32)(companion14Column - 9) <= 2) {
1479 if ((
u32)(companion19Column - 9) <= 2) {
1484 }
else if (row == 14) {
1485 if ((
u32)(companion19Column - 9) <= 2) {
1489 }
else if (row == 15) {
1491 }
else if (row == 18) {
1520 if (block9Row == 15) {
1522 }
else if (block18Row == 15) {
1524 }
else if (block17Row == 15) {
1530 }
else if (column == 6) {
1531 if (block17Row == 15) {
1535 }
else if (column == 5) {
1537 }
else if (column == 8) {
1538 if (block18Row == 15) {
1541 if (block17Row == 15) {
1546 }
else if (column == 9) {
1547 if (block18Row == 15) {
1550 if (block17Row == 15) {
1555 }
else if (column == 12) {
1556 if (block9Row == 15) {
1559 if (block18Row == 15) {
1561 }
else if (block17Row == 15) {
1586 if (block18Row == 15) {
1588 }
else if (block9Row == 15) {
1594 }
else if (column == 5) {
1595 if (block18Row == 15) {
1598 if (block9Row == 15) {
1603 }
else if (column == 6) {
1604 if (block9Row == 15) {
1609 }
else if (column == 8) {
1610 if (block9Row == 15) {
1614 }
else if (column == 9) {
1616 }
else if (column == 12) {
1640 if ((
u32)(companion9Row - 12) <= 2) {
1642 }
else if ((
u32)(companion18Row - 12) <= 2) {
1647 }
else if (column == 12) {
1648 if ((
u32)(companion9Row - 12) <= 2) {
1651 if ((
u32)(companion18Row - 12) <= 2) {
1656 }
else if (column == 9) {
1657 if ((
u32)(companion18Row - 12) <= 2) {
1661 }
else if (column == 8) {
1662 if ((
u32)(companion18Row - 12) <= 2) {
1666 }
else if (column == 6) {
1672 footprintRow = row - 1;
1693 if ((
u32)(companion9Row - 12) <= 2) {
1695 }
else if ((
u32)(companion18Row - 12) <= 2) {
1700 }
else if (column == 8) {
1701 if ((
u32)(companion9Row - 12) <= 2) {
1705 }
else if (column == 9) {
1706 if ((
u32)(companion9Row - 12) <= 2) {
1710 }
else if (column == 12) {
1712 }
else if (column == 13) {
1718 footprintRow = row - 1;
1739 if ((
u32)(companion9Row - 9) <= 2) {
1741 }
else if ((
u32)(companion18Row - 9) <= 2) {
1746 }
else if (column == 12) {
1747 if ((
u32)(companion9Row - 9) <= 2) {
1750 if ((
u32)(companion18Row - 9) <= 2) {
1755 }
else if (column == 9) {
1756 if ((
u32)(companion18Row - 9) <= 2) {
1760 }
else if (column == 8) {
1762 }
else if (column == 6) {
1768 footprintRow = row - 1;
1786 if ((
u32)(companionRow - 9) <= 2) {
1791 }
else if (column == 8) {
1792 if ((
u32)(companionRow - 9) <= 2) {
1796 }
else if (column == 9) {
1798 }
else if (column == 12) {
1800 }
else if (column == 13) {
1814#define DIRECTION_STEP(dx, dz) (((u32)(dx) << 16) | ((dz) & 0xffff))
1827 207, 205, 228, 229, 298, 297,
1867 MAP_CELL_STEP(58, 23, 1, 2, 5),
MAP_CELL_STEP(59, 23, 1, 2, 5),
MAP_CELL_STEPS_END,
1874 (
const s32 *)0xffff0000,
1876 (
const s32 *)0x40000098,
1877 (
const s32 *)0xffff0000,
1879 (
const s32 *)0xffff,
1880 (
const s32 *)0xffff,
1889 { 1,
CONDITION_ALWAYS, 280, 0, 544,
FACING_NORTH, 0, 0, 0, 512, 560, 0 },
1890 { 2,
CONDITION_ALWAYS, 136, 0, 360,
FACING_SOUTH, 0, 0, 0, 512, 560, 0 },
1895 { 1,
CONDITION_ALWAYS, 312, 0, 520,
FACING_NORTH, 0, 16, 64, 416, 544, 0 },
1896 { 2,
CONDITION_ALWAYS, 280, 0, 144,
FACING_EAST, 0, 16, 64, 416, 544, 0 },
1901 { 1,
CONDITION_ALWAYS, 312, 0, 408,
FACING_NORTH, 0, 0, 16, 640, 464, 0 },
1902 { 2,
CONDITION_ALWAYS, 200, 0, 408,
FACING_NORTH, 0, 0, 16, 640, 464, 0 },
1903 { 99,
CONDITION_ALWAYS, 272, 0, 232,
FACING_SOUTH, 0, 0, 16, 640, 464, 0 },
1908 { 1,
CONDITION_ALWAYS, 184, 0, 136,
FACING_WEST, 0, -1, -1, -1, -1, 0 },
1909 { 2,
CONDITION_ALWAYS, 40, 0, 184,
FACING_EAST, 0, -1, -1, -1, -1, 0 },
1914 { 1,
CONDITION_ALWAYS, 312, 0, 656,
FACING_WEST, 0, -1, -1, -1, -1, 0 },
1915 { 5,
CONDITION_ALWAYS, 216, 0, 544,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
1918 { 1,
CONDITION_ALWAYS, 840, 0, 176,
FACING_WEST, 0, 432, 32, 880, 352, 0 },
1919 { 2,
CONDITION_ALWAYS, 488, 0, 176,
FACING_EAST, 0, 432, 32, 880, 352, 0 },
1920 { 3,
CONDITION_ALWAYS, 712, 0, 152,
FACING_SOUTH, 0, 432, 32, 880, 352, 0 },
1921 { 4,
CONDITION_ALWAYS, 600, 0, 152,
FACING_SOUTH, 0, 432, 32, 880, 352, 0 },
1922 { 5,
CONDITION_ALWAYS, 712, 0, 152,
FACING_NORTH, 0, 432, 32, 880, 352, 0 },
Ability numbers, named from the English release.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
const struct ScenePlacement * Scene_GetPlacements(void)
const struct SceneEntrance * Scene_GetEntrances(void)
const struct SceneEvent * Scene_GetEvents(void)
const u32 * Scene_GetExits(void)
Both scenes share one exit table.
const struct SceneRegion * Scene_GetRegions(void)
s32 Scene_Initialize(void)
Sets up whichever scene is being entered and runs its arrival events.
s32 gStagedActor_DirectionSteps[]
Pixel step by direction: X in the upper halfword, Z in the lower.
s32 gStagedActor_FootprintBounds[]
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds[]
const s32 * gEffectScripts[]
static void Event_PushBlock(void)
Pushing a block: it slides one cell ahead with the leader behind it, if the cell is free.
Calls through a function pointer, by argument count.
static void CrossboneIsle_MoveSelectedActorAndBlock(s32 actorId, s32 xOffset, s32 zOffset)
Moves the selected actor and puzzle block by the same pixel offset.
static void Event_StepOnBlock14(void)
Stepping onto block 14: its animation plays from the start.
static void Event_GrowPlant12(s32 actorId)
Growth on the second plant (actor 12).
static void Event_SlideBlock18South(void)
Walking south onto block 18: it slides south with the leader on it until another block or the wall st...
static void Event_GrowPlant13(s32 actorId)
Growth on the third plant (actor 13).
struct SceneEvent gCrossboneIsleEvents5[]
static void Event_SlideBlock19West(void)
Walking west onto block 19: it slides west with the leader on it until another block or the wall stop...
static void Event_SlideBlock16West(void)
Walking west onto block 16: it slides west with the leader on it until another block or the wall stop...
struct ScenePlacement gCrossboneIslePlacementsOther[]
struct SceneEntrance gCrossboneIsleEntrances5[]
static void Event_SlideBlock18North(void)
Walking north onto block 18: it slides north with the leader on it until another block or the wall st...
static void Event_SlideBlock8North(void)
Walking north onto block 8: it slides north with the leader on it until another block or the wall sto...
struct ScenePlacement gCrossboneIslePlacements1[]
static void Event_SlideBlock17South(void)
Walking south onto block 17: it slides south with the leader on it until another block or the wall st...
static void CrossboneIsle_LeaveClearedRoom(void)
Back from beating a room's guards: the door opens, and the party walks through.
static void Event_FightFinalGuards(void)
Stepping on trigger 10 in the fifth room: the last guards attack, and the party comes back to this ro...
static void Event_SlideBlock14West(void)
Walking west onto block 14: it slides west with the leader on it until another block or the wall stop...
static void CrossboneIsle_DrawVerticalBlockFootprint(s32 actorId, s32 sourceColumn, s32 sourceRow, s32 unused)
Draws the three-cell vertical footprint centered on this block.
static void Event_SlideBlock9North(void)
Walking north onto block 9: it slides north with the leader on it until another block or the wall sto...
static void Event_PushFirstRoomBlock(void)
Walking into one of the first room's blocks: push it if the cell beyond is clear.
struct SceneEvent gCrossboneIsleEvents4[]
static void Event_StepOnBlock19(void)
Stepping onto block 19: its animation plays from the start.
static void Event_GrowPlant11(s32 actorId)
Growth on the first plant (actor 11): it grows, and its cell can be crossed.
static void Event_MoveBlock(void)
Move on a guarded room's block, and after each push: once it reaches column 40 it sinks into the floo...
struct SceneEntrance gCrossboneIsleEntrances3[]
static void Event_SlideBlock19East(void)
Walking east onto block 19: it slides east with the leader on it until another block or the wall stop...
static void CrossboneIsle_SpawnBlockMovedBurst(s32 objectId)
Emits a ring of effects around a moved block.
static s32 Event_HopWest(void)
Walking west against a block's edge: hop 32 pixels west if the landing is clear.
struct ScenePlacement gCrossboneIslePlacements6To14[]
static void Event_StepOnBlock9(void)
Stepping onto block 9: its animation plays from the start.
struct SceneEvent gCrossboneIsleEvents3[]
static void Event_SlideBlock10South(void)
Walking south onto block 10: it slides south with the leader on it until another block or the wall st...
static void Event_StepOnBlock13(void)
Stepping onto block 13: its animation plays from the start.
static s32 Event_HopEast(void)
Walking east against a block's edge: hop 32 pixels east if the landing is clear.
static s32 Event_HopNorth(void)
Walking north against a block's edge: hop 32 pixels north if the landing is clear.
static void Event_StepOnBlock17(void)
Stepping onto block 17: its animation plays from the start.
struct SceneEvent gCrossboneIsleEvents1[]
struct ScenePlacement gCrossboneIslePlacements3[]
static void Event_GrowPlant14(s32 actorId)
Growth on the fourth plant (actor 14), which opens two cells.
static void Event_CatchNut(void)
Catch on the Nut circling in the first room: the party gets it.
static void Event_OpenWestDoor(void)
Walking north into the western door (trigger 4): it opens, and the party goes through.
static void CrossboneIsle_DrawBlockPuzzleFootprints(void)
Draws all twelve block footprints in the sliding-block room.
static void Event_StepOnBlock10(void)
Stepping onto block 10: its animation plays from the start.
struct SceneEntrance gCrossboneIsleEntrances2[]
static void CrossboneIsle_RedrawHorizontalBlockRoute(s32 actorId, s32 column, s32 row)
Copies a horizontal block's old footprint to its new row, then clears the old row.
struct SceneEvent gCrossboneIsleEventsOther[]
static void Event_SlideBlock11West(void)
Walking west onto block 11: it slides west with the leader on it until another block or the wall stop...
struct SceneEvent gCrossboneIsleEvents2[]
static UNUSED void CrossboneIsle_UnusedCallback(void)
static void Event_SlideBlock9South(void)
Walking south onto block 9: it slides south with the leader on it until another block or the wall sto...
static void CrossboneIsle_RestoreMovedRoomBlock(void)
In a guarded room whose Move puzzle is solved, the block stays sunk in its place.
static void Event_StepOnBlock16(void)
Stepping onto block 16: its animation plays from the start.
#define IS_IN_BLOCK_CROSSING_COLUMNS(x)
These three columns form the crossing lane for the vertical blocks.
static void Event_SlideBlock15West(void)
Walking west onto block 15: it slides west with the leader on it until another block or the wall stop...
static void Event_BlowAwayIvy15(void)
Whirlwind on the first ivy (actor 15): it is blown away for good.
static void Event_BlowAwayIvy17(void)
Whirlwind on the third ivy (actor 17).
static void Event_SlideBlock13West(void)
Walking west onto block 13: it slides west with the leader on it until another block or the wall stop...
struct SceneEntrance gCrossboneIsleEntrances4[]
static void Event_SlideBlock10North(void)
Walking north onto block 10: it slides north with the leader on it until another block or the wall st...
static void Event_StepOnBlock18(void)
Stepping onto block 18: its animation plays from the start.
static void Event_SlideBlock17North(void)
Walking north onto block 17: it slides north with the leader on it until another block or the wall st...
static void Event_StepOnBlock12(void)
Stepping onto block 12: its animation plays from the start.
static void Event_SlideBlock16East(void)
Walking east onto block 16: it slides east with the leader on it until another block or the wall stop...
static void Event_StepOnBlock8(void)
Stepping onto block 8: its animation plays from the start.
static void Event_SlideBlock15East(void)
Walking east onto block 15: it slides east with the leader on it until another block or the wall stop...
static void CrossboneIsle_DrawHorizontalBlockFootprint(s32 actorId, s32 sourceColumn, s32 sourceRow, s32 unused)
Draws the three-cell horizontal footprint centered on this block.
static void Event_SlideBlock11East(void)
Walking east onto block 11: it slides east with the leader on it until another block or the wall stop...
struct SceneEntrance gCrossboneIsleEntrances1[]
u32 gCrossboneIsleExits[]
static void Event_StepOnBlock15(void)
Stepping onto block 15: its animation plays from the start.
static void CrossboneIsle_AnimateTouchedBlock(int actorId)
Runs the two animation changes used when touching a puzzle block.
static void Event_SlideBlock14East(void)
Walking east onto block 14: it slides east with the leader on it until another block or the wall stop...
static void CrossboneIsle_RestoreIvy(void)
Ivy blown away stays gone; the rest stands tall.
static void Event_BlowAwayIvy18(void)
Whirlwind on actor 18, a fourth ivy.
static void Event_SlideBlock12East(void)
Walking east onto block 12: it slides east with the leader on it until another block or the wall stop...
static s32 CrossboneIsle_TryHop(struct FieldActor *actor, struct FieldPosition *requested)
Tests a step, then moves the leader with the block-pushing animation.
static void Event_SlideBlock12West(void)
Walking west onto block 12: it slides west with the leader on it until another block or the wall stop...
static s32 Event_HopSouth(void)
Walking south against a block's edge: hop 32 pixels south if the landing is clear.
static void CrossboneIsle_RedrawVerticalBlockRoute(s32 actorId, s32 column, s32 row)
Copies a vertical block's old footprint to its new column, then clears the old one.
u16 gCrossboneIsle_EntranceCells[]
static void Event_SlideBlock13East(void)
Walking east onto block 13: it slides east with the leader on it until another block or the wall stop...
static void Event_BlowAwayIvy16(void)
Whirlwind on the second ivy (actor 16).
static void Event_StepOnBlock11(void)
Stepping onto block 11: its animation plays from the start.
static void Event_EnterGuardedRoom(void)
Walking north into a guarded room's door (trigger 3): the first time, the room's guards attack; once ...
static void Event_SlideBlock8South(void)
Walking south onto block 8: it slides south with the leader on it until another block or the wall sto...
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 FieldObject_CheckMovementCollision(struct FieldActor *actor, struct FieldPosition *position)
Scene commands: the all-caps macros the scene scripts are written in.
#define OBJ_POS_SET(no, x, z)
#define OBJ_SPEED(no, s, a)
Field effects, their scripts and the flags that spawn them.
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)
void Engine_MapCopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Object_SetMode(struct FieldActor *object, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
void Engine_ActorMoveToAndWait(s32 actor, s32 x, s32 z)
s32 Engine_MathSin(s32 angle)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ItemShowFound(s32 item, s32 height)
void Engine_EventWaitForScreen(void)
static s32 Math_Divide(s32 dividend, s32 divisor)
void Engine_EventOpenScreen(void)
void Engine_GameFlagSet(s32 flag)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
#define MAP_CELL_STEPS_END
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_MapAnimateCells(const u16 *steps, s32 destX, s32 destY)
s32 Engine_MathCos(s32 angle)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
static void MapObject_SetPosition(s32 object, s32 fixed_x, s32 fixed_z)
static struct FieldActor * Actor_Get(s32 actor)
Field objects and actors, and the scene transition styles.
@ 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 scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define SCENE_EXIT(exit, scene, entrance)
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define EVENT_TOUCH_WALKING
#define TOUCH_WALKING_INTO(facing)
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
#define FIND_COINS(coins)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void Field_SetMapCellCollision(s32 a0, s32 a1, s32 a2, s32 a3)
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_CROSSBONE_ISLE_FIRST_PASSAGE_OPENED
#define FLAG_SCENE_TEMP_43
#define FLAG_SCENE_TEMP_40
#define FLAG_CROSSBONE_ISLE_FIRST_GUARDS_DEFEATED
The nine guarded rooms: one flag each from these, in room order.
#define FLAG_CROSSBONE_ISLE_FINAL_GUARDS_DEFEATED
#define FLAG_CROSSBONE_ISLE_FIRST_IVY_BLOWN_AWAY
The ivy in the first room: four flags from this one.
#define FLAG_SCENE_TEMP_41
#define FLAG_SCENE_TEMP_42
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.
The screen blend's globals and the graphics routines.
The main-image routines scene overlays import.
Item numbers, named from the English release.
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 reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_POS(x, y, z)
Set position.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
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_SetNextDestination(s32 scene, s32 entrance)
Sets the scene and entrance that the field goes to next (gGameState.nextScene and nextEntrance).
Scene numbers, named after their places.
char SceneId_CrossboneIsle1
char SceneId_CrossboneIsle3
char SceneId_CrossboneIsle14
char SceneId_CrossboneIsle4
char SceneId_CrossboneIsle6
char SceneId_CrossboneIsle5
char SceneId_CrossboneIsle2
Song and sound effect ids, indices into gSound_SongTable.
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_AudioPlayCue()
void Scene_FloatNut(s32 id)
Draws actor id as the Nut's icon and starts it floating, 32 pixels up unless the party returns to whe...
The pushable actors' movement probes and footprint bounds.
#define offsetof(type, member)
The options of a spawned field effect, each used when its EFFECT_USE_ flag (or EFFECT_SCALE_TO_TARGET...
void(*) update(union FieldObject *object)
replaces the update hook
s32 startTransition
SCENE_TRANSITION(style, variant).
A field actor: a person or thing on the field with a position, motion toward a target,...
s32 speed
speed limit, 16.16 fixed-point pixels per frame
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
union FieldCoordinate x
16.16 fixed-point pixels
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....
s32 scaleY
16.16 fixed point, 0x10000 full size
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
s32 z
16.16 fixed-point pixels
The game's state: play time, coins, the scene and the leader's position, the active party and the opt...
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...
Where a large thing ahead of the leader would roll to: its footprint, its actor, that position,...
Three coordinates, x, y and z: a position, a velocity or a direction.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
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.
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels
The patch levels: our groups of the measured changes from the Japanese release.