include/common.h file

Classes

struct Input
Holds input information from system registers.
struct DungeonFloorMetadata
struct DungeonLayout

Functions

void LoadPalettes(const u8* src, s32 destPaletteNum, s32 numPalettes)
void LoadPaletteGroup(u32 group)
Loads a packed group of palettes.
void LoadGfxGroup(u32 group)
Loads a packed group of tiles.
void SetColor(u32 colorIndex, u32 color)
Set color in the palette.
void SetFillColor(u32 color, u32 arg1)
void MemFill16(u32 value, void* dest, u32 size)
Fill memory with 16 bit value.
void MemFill32(u32 value, void* dest, u32 size)
Fill memory with 32 bit value.
void MemClear(void* dest, u32 size)
Clear memory.
void MemCopy(const void* src, void* dest, u32 size)
Copy memory.
void ReadKeyInput(void)
Refresh gInput from system registers.
void zMallocInit(void)
Initialize the heap.
auto zMalloc(u32 size) -> void*
Allocate memory on heap.
void zFree(void* ptr)
Free memory from heap.
void DispReset(bool32 refresh)
Reset All display system registers.
auto CheckPlayerProximity(u32 x, u32 y, u32 distX, u32 DistY) -> u32
auto CheckKinstoneFused(u32) -> u32
void sub_0801E1EC(u32 a1, u32 a2, u32 a3)
void sub_0801DD58(u32 area, u32 room)
void sub_0801E1B8(u32 a1, u32 a2)
void AddKinstoneToBag(u32)
void InitializeFuseInfo(struct Entity_* entity, u32 textIndex, u32 cancelledTextIndex, u32 fusingTextIndex)
auto PerformFuseAction(void) -> u32
auto CheckFusionMapMarkerDisabled(u32) -> bool32
auto sub_0801DB94(void) -> u32
auto GetRandomSharedFusion(u8* fuserData) -> u32

Variables

Input gInput
Input instance.
const DungeonFloorMetadata gDungeonFloorMetadatas

Function documentation

void LoadPaletteGroup(u32 group)

Loads a packed group of palettes.

Parameters
group Group number.

void LoadGfxGroup(u32 group)

Loads a packed group of tiles.

Parameters
group Group number.

void SetColor(u32 colorIndex, u32 color)

Set color in the palette.

Parameters
colorIndex Color index.
color Color.

void MemFill16(u32 value, void* dest, u32 size)

Fill memory with 16 bit value.

Parameters
value Fill value.
dest Destination.
size Byte count.

void MemFill32(u32 value, void* dest, u32 size)

Fill memory with 32 bit value.

Parameters
value Fill value.
dest Destination.
size Byte count.

void MemClear(void* dest, u32 size)

Clear memory.

Parameters
dest Destination
size Byte count.

void MemCopy(const void* src, void* dest, u32 size)

Copy memory.

Parameters
src Source.
dest Destination.
size Byte count.

void* zMalloc(u32 size)

Allocate memory on heap.

Parameters
size u32 Size to be allocated.
Returns Pointer to allocated memory.

The heap size is 0x1000 bytes and should be used sparingly. It is customary for entities store the returned pointer in the Entity.myHeap field.

void zFree(void* ptr)

Free memory from heap.

Parameters
ptr Pointer to be freed.

The Entity system will automatically free the pointer stored in the Entity.myHeap field.

void DispReset(bool32 refresh)

Reset All display system registers.

Parameters
refresh Request refresh of HUD layer (bg 0).