mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-16 22:40:04 -04:00
Small boot cleanup (#1475)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include "ultra64.h"
|
||||
#include "libc/stdlib.h"
|
||||
#include "libc/string.h"
|
||||
|
||||
void* proutSprintf(void* dst, const char* fmt, size_t size) {
|
||||
return (void*)((uintptr_t)memcpy(dst, fmt, size) + size);
|
||||
}
|
||||
|
||||
int vsprintf(char* dst, char* fmt, va_list args) {
|
||||
int ans = _Printf(proutSprintf, dst, fmt, args);
|
||||
if (ans > -1) {
|
||||
dst[ans] = 0;
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
int sprintf(char* dst, const char* fmt, ...) {
|
||||
int ans;
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
ans = _Printf(&proutSprintf, dst, fmt, args);
|
||||
if (ans > -1) {
|
||||
dst[ans] = 0;
|
||||
}
|
||||
|
||||
va_end(args);
|
||||
|
||||
return ans;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "carthandle.h"
|
||||
#include "idle.h"
|
||||
#include "stack.h"
|
||||
#include "stackcheck.h"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "carthandle.h"
|
||||
|
||||
OSPiHandle* gCartHandle = NULL;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "idle.h"
|
||||
|
||||
void ViConfig_UpdateVi(u32 black) {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "carthandle.h"
|
||||
#include "fault.h"
|
||||
#include "stack.h"
|
||||
#include "stackcheck.h"
|
||||
#include "z64dma.h"
|
||||
#include "z64thread.h"
|
||||
|
||||
size_t gDmaMgrDmaBuffSize = 0x2000;
|
||||
|
||||
Reference in New Issue
Block a user