19#define FIELD_STAGED_ACTOR_IMPORTS
22#include "text/msg_ids.h"
147 return ((coordinate >> 20) << 4) + 8;
149 return (
s16)(coordinate >> 16);
161 adjacentTile.
y = actor->
y.
fixed;
249 if ((leader->
z.
fixed >> 19) <= depthLimit) {
252 effectWork->
actor = leader;
287 Effect_Spawn(x, object->
y.
fixed +
PIXELS(16), z, 0, 0, 0, 0x90001, &options);
328 s32 remainingFrames = 60;
332 if (remainingFrames != 0) {
378 for (i = 0; i < 8; i++) {
384 s32 velocityX = horizontalRoll * 0x3332;
389 0, velocityZ, 0x1000001, &options);
398#define ACTOR_UPDATE_IDLE SceneActor_SetFlagBitByRelativeDepth
400#define ACTOR_UPDATE_IDLE \
401 ((void (*)(union FieldObject *))SceneActor_SetFlagBitByRelativeDepth)
404#define ACTOR_UPDATE_RIDE_BLOCK TunnelRuins_RideBlockBelow
406#define ACTOR_UPDATE_RIDE_BLOCK \
407 ((void (*)(union FieldObject *))TunnelRuins_RideBlockBelow)
453 StagedActor_AdvancePair();
476 StagedActor_AdvancePair();
508 StagedActor_AdvancePair();
580 if ((actor->
x.
fixed >> 20) != 32 || (actor->
z.
fixed >> 20) != 50) {
590 if ((actor->
x.
fixed >> 20) != 30 || (actor->
z.
fixed >> 20) != 52) {
621 if ((actor->
x.
fixed >> 20) == 46) {
626 effectOptions = &options;
632 for (i = 0; i < 16; i++) {
636 randomX = ((((
u32)(randomX << 4) >> 16) << 16) +
PIXELS(736));
638 Effect_Spawn(randomX, 0,
639 ((((
u32)(((randomZ << 3) + randomZ) << 1) >> 16) << 16) +
641 0, 0, 0, 0x90000, effectOptions);
666 StagedActor_AdvancePair();
702 if ((actor->
x.
fixed >> 20) == 48) {
705 overlay = OverlayObject_PrepareObject(
PIXELS(770), 0,
PIXELS(274), 223);
706 effectOptions = &options;
712 for (i = 0; i < 16; i++) {
716 effectX = ((((
u32)(randomX << 4) >> 16) << 16) +
PIXELS(768));
718 effectZ = ((((
u32)(((randomZ << 3) + randomZ) << 1) >> 16) << 16) +
720 Effect_Spawn(effectX, 0, effectZ, 0, 0, 0, 0x90000, effectOptions);
747 StagedActor_AdvancePair();
808 StagedActor_AdvancePair();
876 s16 *supportingActorId = &supportedActor->
timer;
917 for (i = 0; i < 5; i++) {
934 for (i = 0; i <= 4; i++) {
937 if (candidateId == actorId)
982 for (i = 0; i <= 2; i++) {
999 for (j = 0; j < i; j++) {
1062 StagedActor_AdvancePair();
1093 StagedActor_AdvancePair();
1131 s32 correctPositions;
1135 correctPositions = 0;
1170 if ((actor->
x.
fixed >> 20) == 25) {
1172 if ((actor->
z.
fixed >> 20) == 49) {
1173 correctPositions = 1;
1177 if ((actor->
x.
fixed >> 20) == 23) {
1179 if ((actor->
z.
fixed >> 20) == 49) {
1180 correctPositions = (correctPositions + 1);
1184 if ((actor->
x.
fixed >> 20) == 25) {
1186 if ((actor->
z.
fixed >> 20) == 47) {
1187 correctPositions = (correctPositions + 1);
1191 if ((actor->
x.
fixed >> 20) == 23) {
1193 if ((actor->
z.
fixed >> 20) == 47) {
1194 correctPositions = (correctPositions + 1);
1198 if ((actor->
x.
fixed >> 20) == 24) {
1200 if ((actor->
z.
fixed >> 20) == 48) {
1201 correctPositions = (correctPositions + 1);
1205 if (correctPositions == 5) {
1244 StagedActor_AdvancePair();
1653#define DIRECTION_STEP(dx, dz) (((dx) << 16) | ((dz) & 0xffff))
1665 207, 205, 228, 229, 298, 297,
1669 -32, -8, 32, 8, -8, -32, 8, 32, -32, -16, 32, 0,
1670 -8, -32, 8, 32, -32, -8, 32, 8, -8, -32, 8, 32,
1737 {0,
CONDITION_ALWAYS, 744, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1738 {10,
CONDITION_ALWAYS, 440, 0, 552,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1743 {0,
CONDITION_ALWAYS, 744, 0, 104,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1744 {1,
CONDITION_ALWAYS, 104, 0, 152,
FACING_SOUTH, 0, 48, 48, 288, 368, 0},
1745 {2,
CONDITION_ALWAYS, 200, 0, 328,
FACING_NORTH, 0, 48, 48, 288, 368, 0},
1746 {3,
CONDITION_ALWAYS, 184, 0, 552,
FACING_SOUTH, 0, 64, 464, 304, 816, 0},
1747 {4,
CONDITION_ALWAYS, 168, 0, 816,
FACING_NORTH, 0, 64, 464, 304, 816, 0},
1748 {5,
CONDITION_ALWAYS, 520, 0, 104,
FACING_SOUTH, 0, 336, 48, 576, 288, 0},
1749 {6,
CONDITION_ALWAYS, 392, 0, 192,
FACING_NORTH, 0, 336, 48, 576, 288, 0},
1750 {7,
CONDITION_ALWAYS, 520, 0, 256,
FACING_NORTH, 0, 336, 48, 576, 288, 0},
1751 {8,
CONDITION_ALWAYS, 568, 0, 440,
FACING_SOUTH, 0, 384, 352, 624, 640, 0},
1752 {9,
CONDITION_ALWAYS, 440, 0, 648,
FACING_NORTH, 0, 384, 352, 624, 640, 0},
1753 {10,
CONDITION_ALWAYS, 744, 0, 104,
FACING_SOUTH, 0, 624, 40, 864, 288, 0},
1754 {11,
CONDITION_ALWAYS, 680, 0, 256,
FACING_NORTH, 0, 624, 40, 864, 288, 0},
1755 {12,
CONDITION_ALWAYS, 504, 0, 792,
FACING_SOUTH, 0, 368, 720, 608, 976, 0},
1756 {13,
CONDITION_ALWAYS, 568, 0, 872,
FACING_SOUTH, 0, 368, 720, 608, 976, 0},
1757 {14,
CONDITION_ALWAYS, 776, 0, 432,
FACING_NORTH, 0, 688, 368, 928, 640, 0},
1758 {15,
CONDITION_ALWAYS, 840, 0, 608,
FACING_NORTH, 0, 688, 368, 928, 640, 0},
1759 {16,
CONDITION_ALWAYS, 744, 0, 792,
FACING_SOUTH, 0, 688, 736, 928, 976, 0},
1760 {17,
CONDITION_ALWAYS, 744, 0, 944,
FACING_NORTH, 0, 688, 736, 928, 976, 0},
1761 {18,
CONDITION_ALWAYS, 872, 0, 880,
FACING_NORTH, 0, 688, 736, 928, 976, 0},
1766 {0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
1767 {1,
CONDITION_ALWAYS, 632, 0, 344,
FACING_SOUTH, 0, 592, 64, 880, 400, 0},
1768 {2,
CONDITION_ALWAYS, 840, 0, 120,
FACING_SOUTH, 0, 592, 64, 880, 400, 0},
1769 {3,
CONDITION_ALWAYS, 824, 0, 344,
FACING_SOUTH, 0, 592, 64, 880, 400, 0},
1770 {4,
CONDITION_ALWAYS, 216, 0, 104,
FACING_SOUTH, 0, 32, 48, 272, 320, 0},
1771 {5,
CONDITION_ALWAYS, 216, 0, 296,
FACING_NORTH, 0, 32, 48, 272, 320, 0},
1772 {6,
CONDITION_ALWAYS, 360, 0, 104,
FACING_SOUTH, 0, 304, 48, 544, 352, 0},
1773 {7,
CONDITION_ALWAYS, 488, 0, 328,
FACING_NORTH, 0, 304, 48, 544, 352, 0},
1774 {8,
CONDITION_ALWAYS, 120, 0, 568,
FACING_NORTH, 0, 80, 400, 448, 592, 0},
1775 {9,
CONDITION_ALWAYS, 216, 0, 456,
FACING_SOUTH, 0, 80, 400, 448, 592, 0},
1776 {10,
CONDITION_ALWAYS, 312, 0, 568,
FACING_NORTH, 0, 80, 400, 448, 592, 0},
1777 {11,
CONDITION_ALWAYS, 408, 0, 456,
FACING_SOUTH, 0, 80, 400, 448, 592, 0},
1778 {12,
CONDITION_ALWAYS, 136, 0, 712,
FACING_SOUTH, 0, 16, 656, 256, 880, 0},
1779 {13,
CONDITION_ALWAYS, 392, 0, 712,
FACING_SOUTH, 0, 288, 656, 560, 864, 0},
1780 {14,
CONDITION_ALWAYS, 520, 0, 776,
FACING_SOUTH, 0, 288, 656, 560, 864, 0},
1781 {15,
CONDITION_ALWAYS, 648, 0, 952,
FACING_NORTH, 0, 608, 816, 848, 976, 0},
1782 {16,
CONDITION_ALWAYS, 776, 0, 904,
FACING_SOUTH, 0, 608, 816, 848, 976, 0},
1783 {17,
CONDITION_ALWAYS, 696, 0, 680,
FACING_SOUTH, 0, 624, 592, 864, 768, 0},
1788 {624, 16, 336, 640, 32, 352, -1, 15},
1789 {816, 16, 336, 832, 32, 352, -1, 16},
1790 {832, 16, 112, 848, 32, 128, -1, 17},
1791 {-1, 0, 0, 0, 0, 0, 0, 0},
2026 MSGNO(MsgTunnelRuinsRedShinesNorthwestOfMe)},
2028 MSGNO(MsgTunnelRuinsYellowShinesNortheastOfMe)},
2030 MSGNO(MsgTunnelRuinsRedShinesDueWestOfMe)},
2032 MSGNO(MsgTunnelRuinsVioletShinesSoutheastOfMe)},
2034 MSGNO(MsgTunnelRuinsVioletPointsSoutheast)},
Ability numbers, named from the English release.
void ObjectMotion_WaitForAnimationChange(u32 objectId)
Waits, at most 90 frames, for an actor's animation to change.
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.
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[]
struct FieldActor * Camera_GetEventObject(void)
The event command "get view centre": returns the camera object.
static s32 Event_HopWest(void)
Walking west against a block's edge: hop 32 pixels west if the landing is clear.
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 s32 Event_HopSouth(void)
Walking south against a block's edge: hop 32 pixels south if the landing is clear.
The engine calls the debug menus import, and their palette swatch tiles.
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static void SceneEffect_SpawnNineRadialEffects(s32 actor)
Burst nine particles out from the actor in a ring (the ninth on the first), flung a third further eas...
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 void FieldBattleFx_RunRisingObjectSequence(s32 actor, s32 mode, s32 action)
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)
void BattleFx_StartFadeOverlay(void *object)
Starts the fade overlay on object (the party leader when NULL): loads its solid tiles,...
void FieldScene_PrepareActors(struct ScenePlacement *entry)
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)
void Engine_MessageShowCentered(s32 message, s32 flags)
void Engine_CameraSetSpeed(s32 speed, s32 acceleration)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_ActorMoveToAndWait(s32 actor, s32 x, s32 z)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
void Engine_ObjectDispatchRelease(struct FieldActor *object)
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
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_ActorWaitForMove(s32 actor)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
static void Map_CopyCells(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
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.
#define MAP_CELL_STEPS_END
static void MapObject_SetPosition(s32 object, s32 fixed_x, s32 fixed_z)
static s32 Random_Next(void)
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 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 ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
#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 PSYNERGY_IN_AREA(ability, phase)
#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
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static void FieldVector_AddPolarOffset(s32 radius, s32 heading, struct FieldPosition *probe)
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_SHOW_LOCATION_NAME
#define FLAG_TUNNEL_RUINS_ORACLES_ROBE
a chest in the second scene
#define FLAG_SCENE_TEMP_03
#define FLAG_TUNNEL_RUINS_EAST_PILLAR_B_PUSHED_WEST
#define FLAG_SCENE_TEMP_00
#define FLAG_SCENE_TEMP_02
#define FLAG_TUNNEL_RUINS_STATUE_DOOR_OPEN
#define FLAG_TUNNEL_RUINS_EAST_PILLAR_A_PUSHED_WEST
#define FLAG_TUNNEL_RUINS_PILLAR_B_SUNK
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_TUNNEL_RUINS_PILLAR_A_SUNK
#define FLAG_SCENE_TEMP_01
#define FLAG_SCENE_TEMP_04
#define FLAG_TUNNEL_RUINS_ASURAS_ARMOR
a chest in the second scene
#define FLAG_VENUS_LIGHTHOUSE_SECOND_PATH
#define FLAG_TUNNEL_RUINS_BUSH_BLOWN_AWAY
#define FLAG_VENUS_LIGHTHOUSE_FIRST_PATH
The path the statue opened: the first or the second of its two.
volatile u32 gFrameCount
Frames WaitFrames has finished.
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
static void Event_MoveEastPillar(void)
Move on the east pillar: once it reaches column 23 it settles into the floor and can be walked over.
static void Event_PushEastPillar(void)
Walking into the east pillar pushes it a step.
The screen blend's globals and the graphics routines.
The main-image routines scene overlays import.
Item numbers, named from the English release.
static void Event_SearchLockedDoor(void)
Searching a cell door without the Cell Key: it stays shut.
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_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
#define SC_END
Return to the main script.
static void SceneActor_SwapPositionsByDepth(s32 first, s32 second)
Unless actor first is south of actor second, swaps their positions and waits a frame.
The fade overlay, the weather particles and the actor effect work.
struct FadeOverlayWork * gActorEffectWork
static s32 StagedActor_FillGridAttributeRectangle(u32 layer, s32 x, s32 z, u32 width, u32 height, s32 value)
Sets the collision code of a width by height rectangle of cells, from cell (x, z),...
Scene numbers, named after their places.
char SceneId_TunnelRuins2
char SceneId_TunnelRuins1
char SceneId_BabiLighthouse3
The field object script interpreter and the operands its commands read.
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_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_AudioPlayCue()
The pushable actors' movement probes and footprint bounds.
The options of a spawned field effect, each used when its EFFECT_USE_ flag (or EFFECT_SCALE_TO_TARGET...
s32 palette
passed to ObjectGroup_SetChildValue
s32 startScaleY
16.16 fixed point, 0x10000 full size
s32 startScaleX
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
replaces the update hook
s32 startTransition
SCENE_TRANSITION(style, variant).
The fade overlay draws one mark on each side of its tracked actor.
struct FieldActor * actor
the actor tracked; null draws nothing
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
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
u8 riseCounter
not read by the engine; scene code's own counter
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 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
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 wait
the object script's wait, in frames (ScriptMotionObject)
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
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
s16 retreatEntrance
where Retreat goes; the group's first entrance
s16 retreatScene
where Retreat goes; the group's first entrance
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.
Position record used by the shared radial-effect source below.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
u16 gTunnelRuins_DoorCloseSteps[]
struct SceneEntrance gTunnelRuinsEntrances2[]
static void TunnelRuins_WaitForActorToLand(struct FieldActor *actor)
Waits up to 60 frames for landing, then stops vertical motion at the terrain.
static void Event_MoveDousePillar(void)
Moving the Douse pillar (until its puddle is frozen): nothing more happens.
static s32 TunnelRuins_SplashDousedPillar(union FieldObject *fieldObject)
static __inline__ s32 TunnelRuins_GetLandingPixel(s32 coordinate)
Later patches land at the tile center; the base release uses the target pixel.
static void Event_HopDownStep(void)
Walking south off a step: the leader hops 12 pixels forward and slides 16 pixels down,...
static void TunnelRuins_UpdateSecondPillarCells(void)
After the second pillars move: the same for their room.
static void Event_HopWestUnlessAtCell32x50(void)
Hops west as Event_HopWest, except from cell (32, 50).
struct SceneEntrance gTunnelRuinsEntrances1[]
static void Event_DouseBeginsOnPillar(void)
As Douse begins on the pillar, water splashes on it and it is soaked; its puddle follows it from then...
#define ACTOR_UPDATE_IDLE
s32 gTunnelRuins_StretchScript[]
The bushes stand 8/5 as tall as their sprite.
static void Event_SinkPillarA(void)
Moving sinking pillar A into column 46: it sinks 16 pixels into the floor in a cloud of dust,...
static void Event_BlowAwayBushA(void)
Whirlwind on bush A blows it away.
static void Event_ShowFalseStatues(void)
The two false statues stand, blocking their cells: on entering their rooms and at Reveal's phase 4.
static __inline__ void TunnelRuins_AnimateLoweringImpact(s32 sourceColumn, s32 column, s32 row)
Draws an impact frame of the passage and starts a decaying vertical shake.
static void Event_ReadFirstStatue(void)
Searching the first statue: it speaks to the leader's soul of the lady whose leave opens the way up V...
s32 gTunnelRuins_ShrinkScript[]
struct ScenePlacement gTunnelRuinsPlacementsOther[]
static s32 TunnelRuins_PuddleFollowsPillar(union FieldObject *fieldObject)
static void TunnelRuins_DropBlockOnStack(s32 actorId)
A carried block drops onto the highest platform or block in its cell and lands with a thud and a ring...
static void Event_PushSecondPillars(void)
Walking into the second pair of pillars pushes them along.
static void Event_FreezePuddleB(void)
Frost on puddle B freezes it into a pillar of ice.
struct SceneEntrance gTunnelRuinsEntrancesOther[]
s32 TunnelRuins_Initialize(void)
On entering a room: the puzzle as it was left, and the route the statue at Venus Lighthouse chose (fl...
static void Event_PushObject(void)
Walking into a pushable object pushes it along.
static void Event_HopNorthUnlessAtCell30x52(void)
Hops north as Event_HopNorth, except from cell (30, 52).
static void Event_SinkPillarB(void)
Moving sinking pillar B into column 48 once Douse has soaked it: it sinks as pillar A does,...
#define ACTOR_UPDATE_RIDE_BLOCK
static void Event_HopSouthOrPushBlocks(void)
Walking south at the blocks: the leader hops a gap if there is one, and pushes the block in front oth...
static void Event_ReadSecondStatue(void)
Searching the second statue.
static s32 TunnelRuins_HopLeaderTo(struct FieldPosition *target)
The leader hops over the cell ahead to the target, when that cell is no wall and the target is clear;...
static void TunnelRuins_UpdateFirstPillarCells(void)
After the first pillars move: redraw their room's cells and mark the cells the pillars stand on.
static void Event_PushFirstPillars(void)
Walking into the first pair of pillars pushes them along.
s32 gTunnelRuins_DouseSplashScript[]
Douse: splashes on the pillar from frame 35 for 130 frames.
u16 gTunnelRuins_DoorOpenSteps[]
const struct SceneEvent * TunnelRuins_GetEvents(void)
The first ruins' events, or the other ruins'.
static void Event_BlowAwayBushB(void)
Whirlwind on bush B blows it away, as for bush A.
const struct SceneEntrance * TunnelRuins_GetEntrances(void)
The entrances of the first ruins, the second, or the rooms beyond.
static void Event_JumpDownLedge(void)
Walking south off a ledge: the leader jumps down.
static void Event_MoveLadyStatue(void)
Moving a statue of the lady: with all five on their marks (cells (25, 49), (23, 49),...
static void TunnelRuins_UpdateTrackedActor(void)
The fade overlay follows the leader only south of a depth set per room.
const struct SceneRegion * TunnelRuins_GetRegions(void)
static void Event_PushSinkingPillarA(void)
Walking into sinking pillar A pushes it, and it sinks if it reaches column 46 (until FLAG_TUNNEL_RUIN...
static void Event_FreezeDousePuddle(void)
Frost on the pillar's puddle freezes it into a pillar of ice where it stands.
static void Event_PushLadyStatue(void)
Walking into a statue of the lady pushes it along, then checks the door.
static void TunnelRuins_SettleBalance(s32 wait)
The balance platforms move to the heights their weights give them (their timers index gTunnelRuins_Ba...
static s32 TunnelRuins_RefreshActorAfterShrinking(struct ScriptInterpreter *interpreter)
Refreshes the actor presentation after its shrink script finishes.
static void Event_SetBlockOnBalance(void)
Setting down a block with Carry: one dropped into a pit is gone; one set in row 9 drops onto the bala...
struct SceneEvent gTunnelRuinsEventsOther[]
struct SceneEvent gTunnelRuinsEvents1[]
static void Event_PushSinkingPillarB(void)
Walking into sinking pillar B pushes it, and it sinks if it is soaked and reaches column 48.
struct ScenePlacement gTunnelRuinsPlacements1[]
const struct ScenePlacement * TunnelRuins_GetPlacements(void)
The first ruins' actors or the other ruins' (the enums above), each prepared to appear only when it l...
static void Event_HideFalseStatues(void)
At Reveal's phase 5 the two false statues vanish and their cells can be walked through.
struct SceneRegion gTunnelRuinsRegions2[]
static void Event_PushDousePillar(void)
Walking into the Douse pillar pushes it along.
static void Event_FreezePuddleA(void)
Frost on puddle A freezes it into a pillar of ice.
const u32 * TunnelRuins_GetExits(void)
static s32 TunnelRuins_RideBlockBelow(union FieldObject *fieldObject)
static void Event_PushBlocks(void)
Walking into the blocks pushes the one in front along.
static void Event_DousePillarB(void)
Douse soaks sinking pillar B, which sinks at once if it is in column 48.
static void Event_BlowAwayBushC(void)
Whirlwind on bush C blows it away for good.
static void TunnelRuins_UpdateBlockCells(void)
After the blocks move: redraw their room's cells and mark the cells the blocks stand on.
static void TunnelRuins_MarkPushPillarCells(void)
Redraws the east pillars' row and marks the cells they stand on.
u32 gTunnelRuins_BalanceHeights[]
A balance platform's height by its weight (its timer): each block on it takes it 16 pixels further do...
static void Event_DouseBeginsOnPillarB(void)
As Douse begins on sinking pillar B, water splashes on it.
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
The patch levels: our groups of the measured changes from the Japanese release.