74 if (++waitFrames > 3599)
110 if (++waitFrames > 119)
140#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
141 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
150 encodedGraphics += 0x1c0;
178#if (LANGUAGE == LANGUAGE_JAPANESE) || (LANGUAGE == LANGUAGE_ENGLISH)
181#if (LANGUAGE == LANGUAGE_GERMAN) || (LANGUAGE == LANGUAGE_SPANISH) || \
182 (LANGUAGE == LANGUAGE_FRENCH) || (LANGUAGE == LANGUAGE_ITALIAN)
190 for (; row <= 3; row++) {
191 for (column = 0; column <= 29; column++) {
195 attributes = sprite->
attr;
198 *attributes++ = (column * 8 << 16) | screenY | 0x2400;
199 *attributes++ = tileIndex;
220 screenX = 232 - (18 - column) * 8;
225 *attributes++ = (screenX << 16) | screenY | 0x8400;
226 *attributes++ = 0xf000 | tileIndex;
235 }
while (++column <= 17);
266 for (brightnessStep = 0; brightnessStep <= 16; brightnessStep++) {
297 encodedGraphics += 0x1c0;
304 for (screenY = 0; screenY <= 19; screenY++) {
305 for (screenX = 0; screenX <= 29; screenX++)
306 *tilemap++ = tileIndex++;
307 *tilemap++ = blankTile;
308 *tilemap++ = blankTile;
312 for (screenY = 0; screenY <= 3; screenY++) {
323 {0,
CONDITION_ALWAYS, 0, 0, 0,
FACING_SOUTH, 0, -1, -1, -1, -1, 0},
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 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 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.
void Fade_ToBlack(s32 frames)
Fades out to black.
void Fade_Wait(void)
Waits a frame at a time until the running fade has finished.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_EventWaitForScreen(void)
void Engine_EventOpenScreen(void)
void Engine_EventWait(s32 frames)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
static s32 Vram_Load(s32 block, s32 size, const void *data)
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.
The screen blend's globals and the graphics routines.
void * Runtime_BumpAllocateAlternatePool(s32 size)
As MemAlloc, but tries EWRAM first.
s32 Title_ShowSplashScreen(s32 mode)
Shows the Nintendo logo with its jingle.
The hardware's I/O registers and their bits, as pret names them.
#define BLDCNT_EFFECT_DARKEN
towards black by REG_BLDY
#define OBJ_PLTT_COLOR(palette, color)
#define BLEND_ALPHA(top, bottom)
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
The register write queue that VBlank carries out after each finished frame.
#define IO_WRITE_QUEUE_PUSH(address, value, control)
Disables interrupts to add one register write or DMA to the queue; a write to a full queue is dropped...
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysHeld
Keys down now.
volatile u32 gKeysPressed
Keys that went down this frame.
s32 SceneData_ReturnZero(void)
The heaps: allocating and freeing blocks.
void MemFree(void *buffer)
The reel game's title lettering.
void Event_SetDestination(s32 scene, s32 entrance)
Makes the event leave for the given entrance of the given scene: raises the exit request 999 and writ...
The work pointers in the gWorkSlot table, by name.
#define Ram_MapCellBuffer
void Runtime_PushSlotEntry(void *slotEntry, s32 slot)
Links a sprite entry into depth slot slot (clamped to 0..255) for this frame.
Resource numbers, named where their contents are known.
char ResourceId_GoldenSunLogo
char ResourceId_PaletteFarCalls
char ResourceId_IntroTilesB
The save workspace: slot headers and summaries.
Scene numbers, named after their places.
Song and sound effect ids, indices into gSound_SongTable.
struct EventWork * gEventWork
void Engine_AudioPlayCue()
s32 startTransition
SCENE_TRANSITION(style, variant).
s32 transitionFrames
frames
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
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,...
The title overlay's sprite records, three OAM words each.
u16 offset
bytes from the start of OBJ VRAM
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
void RuntimeDispatch_NoOpHook(s32 unused)
An exported stub that does nothing with its argument.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
u8 * Title_GetExits(void)
u8 * Title_GetEntrances(void)
struct SceneEntrance gTitleEntrances[]
s32 Title_Run(void)
Routes the logo, completion presentation and new-game title entrances.
static void Title_LoadSprites(s32 unused)
Decodes the language-specific title sprites and uploads their palette and tiles.
struct SceneEvent gTitleEvents[]
u8 * Title_GetPlacements(void)
The title overlay has no placed field actors.
u8 * Title_GetEvents(void)
The title overlay has no field events.
static void Title_UpdateSpriteReveal(void)
Reveals successive sprite columns, flickering each newly reached column.
static void Title_LoadBackground(void)
Loads the logo palette and tiles, builds its tilemap and resets scrolling.
static void Title_RevealScreen(s32 unused)
Prepares the logo, reveals its sprites and then opens the screen transition.
struct ScenePlacement gTitlePlacements[]
The integer types, TRUE, UNUSED and the fixed-address macros.
void Party_EndChildhood(void)
The party set-up after the prologue: flags, Jenna recomputed, Isaac and Garet healed with the Machete...
Declares nothing of its own: it only includes the window, battle command, resource and VRAM table hea...
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.
struct VramBlockCacheEntry gVramBlockCache[]
s32 SaveState_ScanRecordFlags(void)
Loads the save file summaries for the title menu and returns how many files there are: plus 100 when ...