src/main.c file

Contains the main game loop.

Functions

static void InitOverlays(void)
static auto SoftResetKeysPressed(void) -> bool32
auto CheckHeaderValid(void) -> u32
void InitSaveHeader(void)
void AgbMain(void)
Program entry point.
void SetTask(u32 task)
Begin a new task.
void DisableInterruptsAndDMA(void)
void DoSoftReset(void)
Soft reset the system.
void InitDMA(void)
Initialize the DMA system.
void InitVBlankDMA(void)
void SetVBlankDMA(u16* src, u16* dest, u32 size)
Sets a DMA to be performed at next VBlank.
void DisableVBlankDMA(void)
void SetSleepMode(void)
Put the system into sleep mode.
auto CheckRegionOnScreen(u32 x0, u32 y0, u32 x1, u32 y1) -> u32
auto CheckRegionsOnScreen(const u16* arr) -> u32
Iterate over array of AABBs and check if any fit on screen.
void PlayerItemNulled2(void)
void PlayerItemNulled(void)

Variables

u32 gRand
void(*const sTaskHandlers
u8 gUnk_02000030
u8 sub_080B197C
u8 ram_sub_080B197C
u8 RAMFUNCS_END
u8 gCopyToEndOfEwram_Start
u8 gCopyToEndOfEwram_End
u8 gEndOfEwram
const SaveHeader sDefaultSettings

Defines

#define SOFT_RESET_KEYS

Function documentation

void SetTask(u32 task)

Begin a new task.

Parameters
task Task to begin.