59 if (
x == 0 &&
z == 0) {
64 x =
work->finishX + 0xc0000;
66 x =
work->finishX - 0xc0000;
69 fz =
work->finishZ + 0x100000;
70 itemActor = &
work->finishItemActorB;
72 fz =
work->finishZ - 0x100000;
73 itemActor = &
work->finishItemActorA;
75 obj->
timer = *itemActor;
106 if (rec->
still > 2) {
111 }
else if (rec->
mode == 2) {
116 if ((
s16)rec->
pos == 0x383e) {
148 if (gauge->
hold != 0) {
151 if (gauge->
level > 0) {
154 }
else if (gauge->
level <= 1) {
155 if (++gauge->
level == 1) {
164 if (gauge->
level == 0) {
171 width = segments * 16;
175 *dst++ = (
x << 16) |
y | shape;
176 *dst++ = tile | 0xe400;
178 for (i = 0; i < segments; i++) {
182 *dst++ = (
x << 16) |
y | shape;
183 *dst++ = (tile + 2) | 0xe400;
189 *dst++ = (
x << 16) |
y | shape;
190 *dst++ = (tile + 6) | 0xe400;
194 *dst++ = (
x << 16) |
y | shape | 0x10000000;
195 *dst++ = (tile + 6) | 0xe400;
197 for (i = 0; i < segments; i++) {
201 *dst++ =
y | (
x << 16) | shape | 0x10000000;
202 *dst++ = (tile + 2) | 0xe400;
212 *dst++ = tile | 0xe400;
226 *dst++ = (tile + 12) | 0xe400;
238 *dst++ = (tile + 8) | 0xe400;
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
The task scheduler: tasks, their order and the scheduler's state.
The Colosso race gauge's sprites and work.
s32 gColosso_RivalFinishScript[]
u8 gColosso_GaugeGraphics[]
static void Colosso_DrawGauge(void)
The race gauge's scene callback: a bar across the top of the screen, with the finish at its centre an...
static void Colosso_UpdatePathRival(void)
The rival's scene callback.
The engine calls the debug menus import, and their palette swatch tiles.
DMA channel registers, and the DMA and CPU fills.
static __inline__ void Dma_Set(const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel)
Starts a DMA transfer: stores the source, destination and control words into channel's registers with...
static s32 FieldResource_DecodeType01(const void *source, void *destination)
Decodes type-01 compressed data.
s32 Math_Atan2(s32 dy, s32 dx)
u16 gColosso_GaugePalette[]
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 Object_SetMode(struct FieldActor *object, s32 animation)
struct FieldActor * Engine_ActorLookup(s32 actor)
s32 Engine_VramLoad(s32 block, s32 size, const void *data)
void Engine_ObjectSetScript(struct FieldActor *object, const s32 *script)
void Engine_GameFlagSet(s32 flag)
s32 Engine_GameFlagIsSet(s32 flag)
Game flags, named where their meaning is shown.
#define FLAG_SCENE_TEMP_11
#define FLAG_MENU_OPEN
Set while the field menu is open; scenes hold their moving actors still.
volatile u32 gFrameCount
Frames WaitFrames has finished.
The screen blend's globals and the graphics routines.
void * Runtime_BumpAllocateAlternatePool(s32 size)
As MemAlloc, but tries EWRAM first.
The hardware's I/O registers and their bits, as pret names them.
#define OBJ_PLTT_COLOR(palette, color)
The heaps: allocating and freeing blocks.
void Runtime_BumpFree(void *buffer)
static __inline__ void * Runtime_CallAlternatePool(void *(*allocate)(s32), s32 size)
The reel game's title lettering.
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
One sprite of the race gauge's list: a link word, its position and shape attributes,...
s32 tile
OAM attribute 2: the tile, with palette 14 and priority 1.
The Colosso race gauge's work at the start of work slot 59: its sprites, how far it has slid down,...
s16 rivalActor
the actor id drawn as the rival's marker
s16 segments
16-pixel bar pieces either side of the centre
s16 hold
nonzero keeps the gauge down (level 2)
struct ColossoGaugeSprite sprites[18]
the bar, its ends and the racers
s16 playerActor
the actor id drawn as the player's marker
s16 level
0 hidden to 2 fully down; the bar's y is level * 6 - 8
s32 finishX
16.16 fixed-point pixels
s16 vramBlock
the VRAM cache entry holding the gauge's tiles
s32 finishZ
16.16 fixed-point pixels
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
union FieldCoordinate x
16.16 fixed-point pixels
union FieldCoordinate y
16.16 fixed-point pixels
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....
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
The Colosso rival's path player in the scene state: its mode (1 playing, 2 recording,...
The race's work: the gauge (struct ColossoGaugeWork) and then the path, in pixels,...
u16 offset
bytes from the start of OBJ VRAM
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
Declares nothing of its own: it only includes the window, battle command, resource and VRAM table hea...
s32 VramCache_ReleaseVram(u32 no)
Gives back entry no's blocks but keeps the entry taken, with size 1, so a later VramCache_Load can re...
struct VramBlockCacheEntry gVramBlockCache[]