129 for (cnt = 0; cnt < 18; cnt++) {
131 work->sprite->rotation -= 256;
147 for (cnt = 0; cnt < 17; cnt++) {
167 work->sprite->rotation = 0x1000;
202 {0,
CONDITION_ALWAYS, 172, 0, 149,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
203 {1,
CONDITION_ALWAYS, 376, 0, 776,
FACING_NORTH, 0, 88, 8, 664, 832, 0},
204 {2,
CONDITION_ALWAYS, 168, 0, 552,
FACING_SOUTH, 0, 88, 8, 664, 832, 0},
205 {3,
CONDITION_ALWAYS, 600, 0, 520,
FACING_SOUTH, 0, 88, 8, 664, 832, 0},
206 {4,
CONDITION_ALWAYS, 376, 0, 168,
FACING_SOUTH, 0, 88, 8, 664, 832, 0},
207 {5,
CONDITION_ALWAYS, 614, 0, 848,
FACING_NORTH, 0, 480, 605, 720, 900, 0},
208 {99,
CONDITION_ALWAYS, 424, 0, 280,
FACING_WEST, 0, 88, 8, 664, 832, 0},
213 {1,
CONDITION_ALWAYS, 154, 0, 350,
FACING_NORTH, 0, 16, 48, 632, 360, 0},
214 {2,
CONDITION_ALWAYS, 552, 0, 312,
FACING_NORTH, 0, 16, 48, 632, 360, 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.
const s32 * gEffectScripts[]
Calls through a function pointer, by argument count.
The engine calls the debug menus import, and their palette swatch tiles.
Scene commands: the all-caps macros the scene scripts are written in.
#define OBJ_SPEED(no, s, a)
void Map_WaitForShakeToSettle(void)
Waits until both shake amplitudes are below 1/256 pixel, with a 300-frame limit for a shake whose dec...
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
void Engine_ActorWaitForMove(s32 actor)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
static void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)
Sets shake amplitudes in fixed-point pixels and the per-frame decay factor.
s32 Engine_GameFlagIsSet(s32 flag)
Field objects and actors, and the scene transition styles.
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
#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)
16.16 fixed-point constants, sine and cosine, and the library division.
Game flags, named where their meaning is shown.
#define FLAG_SHOW_LOCATION_NAME
#define FLAG_GOMA_CAVE_WATERWAY_STUMP_MOVED
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
static void Event_MoveStump(void)
Move on the freed stump: from column 11 it spins, leaps away and lies where it lands.
static void GomaCaveWaterway_SpinStump(union FieldObject *object)
The leaping stump's update hook turns its sprite a fixed amount per frame.
struct SceneEvent gGomaCaveWaterwayEvents2[]
struct SceneEntrance gGomaCaveWaterwayEntrances2[]
struct ScenePlacement gGomaCaveWaterwayPlacementsOther[]
struct ScenePlacement gGomaCaveWaterwayPlacements2[]
struct SceneEvent gGomaCaveWaterwayEventsOther[]
static void GomaCaveWaterway_LeapStump(s32 no)
The stump spins in place, leaps and lands with a shake and a ring of dust, then comes to rest a littl...
struct SceneEntrance gGomaCaveWaterwayEntrancesOther[]
u32 gGomaCaveWaterwayExits[]
The screen blend's globals and the graphics routines.
Item numbers, named from the English release.
Declares nothing of its own: it only includes edition.h and types.h.
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.
static void SceneActor_WaitObjectBelowHeight(struct FieldActor *object, s32 height)
Waits until the object has come down to height (16.16), a second at most.
Scene numbers, named after their places.
char SceneId_GomaCaveWaterway2
char SceneId_GomaCaveWaterway1
Song and sound effect ids, indices into gSound_SongTable.
struct EventWork * gEventWork
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_AudioPlayCue()
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
u16 rotation
1/65536 turns
The options of a spawned field effect, each used when its EFFECT_USE_ flag (or EFFECT_SCALE_TO_TARGET...
s16 type
the object type to create; 222 without the flag
s32 targetScaleY
16.16 fixed point, 0x10000 full size
s32 targetScaleX
16.16 fixed point, 0x10000 full size
s32 startScaleY
16.16 fixed point, 0x10000 full size
s32 startScaleX
16.16 fixed point, 0x10000 full size
s32 startTransition
SCENE_TRANSITION(style, variant).
A field actor: a person or thing on the field with a position, motion toward a target,...
s32 targetX
16.16 fixed-point pixels; ACTOR_NO_TARGET when unset
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
s32 gravity
Taken off the vertical velocity each frame while it is above the ground, in 16.16 fixed-point pixels ...
union FieldCoordinate z
16.16 fixed-point pixels
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
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...
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...
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.
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.
Vector3, a three-coordinate vector.