18 buffer[index] = digits[value & 0xF];
52 magnitude = 0U - magnitude;
55 magnitude = -magnitude;
60 placeValue = *placeValues++;
62 if (magnitude < placeValue) {
68 placeValue = *placeValues++;
69 }
while (magnitude < placeValue);
74 if (placesLeft != 0) {
76 placeValue = *placeValues++;
77 digit = magnitude / placeValue;
78 *output++ = digit +
'0';
79 magnitude -= digit * placeValue;
81 }
while (placesLeft != 0);
83 output[0] = magnitude +
'0';
93 for (index = 0; index < count; index++)
102void *
memcpy(
void *destination,
const void *source,
unsigned long size) {
103 u8 *to = destination;
104 const u8 *from = source;
129 if (dst == (
u16 *)addr)
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...
#define Dma_Fill32(value, destination, size)
Fills size bytes at destination with the word value by DMA3.
#define BG_SCREEN_BLOCK(n)
#define RGB(r, g, b)
A 15-bit colour from its red, green and blue levels (0 to 31 each), as the palette stores it: blue in...
#define BGCNT_SCREEN_BASE(block)
#define DMA_COPY_WORDS(n)
#define BG_PLTT_COLOR(palette, color)
#define Io_Write16(v, reg)
Writes a value to a 16-bit register or memory location.
const u8 gText_HexDigits[]
const s32 gText_PowersOfTen[9]
Place values for decimal display.
char ResourceId_WindowTiles
What every part of the runtime object shares: its includes and the library call two parts make.
void * Resource_GetTableEntry(s32 index)
Returns the ROM address of resource index from the resource directory.
const u8 gSystem_BasicColorPalette[]
const u16 gUi_WindowPalette[]
u8 gNumberTextDecimalEnd[]
void DebugText_PrintDecimal(s32 value, s32 digits)
Prints the last digits characters of value in signed decimal (1 to 10; anything else prints 10).
void DebugText_PrintBlanks(u32 count)
Writes count blank characters at the debug text cursor and moves it on.
void Palette_LoadBasicObjColors(void)
Loads the basic sprite palettes (palettes 0 to 13).
void DebugText_PrintHex(u32 value, s32 digits)
Prints the last digits hexadecimal digits of value (1 to 8; anything else prints all 8).
void NumberText_FormatHex(u32 value)
Writes value as eight hexadecimal digits to the number buffer.
void DebugText_Print(const u8 *src)
Prints the string src (at most 32 characters) at the debug text cursor, wrapping from the end of the ...
void Ui_LoadWindowGraphics(void)
Loads the window font and frame tiles into BG character block 0, the window palette into BG palette 1...
void DebugText_Clear(void)
Blanks the debug text screen, homes the cursor and points BG0 at it.
void NumberText_FormatDecimal(s32 number)
Writes number to the number buffer as eleven characters: spaces, a sign (a space or '-') and its deci...
void * memcpy(void *destination, const void *source, unsigned long size)