summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-02-08 19:44:18 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-02-08 19:44:54 -0400
commit64cc4930531375080e0b92c01fcc1c2432d3aa1d (patch)
tree788926215b5eca186ac8c25ddcb8fab918c1d7c0 /include
parentf6f02a456b92de6bdafb80d0bf428044f8217a75 (diff)
OS: Add some externs from the Pikmin 2 decomp project
https://github.com/projectPiki/pikmin2
Diffstat (limited to 'include')
-rw-r--r--include/dolphin/os.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dolphin/os.h b/include/dolphin/os.h
index 8dadda8..a40118d 100644
--- a/include/dolphin/os.h
+++ b/include/dolphin/os.h
@@ -57,6 +57,20 @@ u32 __OSCoreClock AT_ADDRESS(OS_BASE_CACHED | 0x00FC); // sync with OSLoMem.h
#define OSRoundUp32BPtr(v) (void *)OSRoundUp32B(v)
#define OSRoundDown32BPtr(v) (void *)OSRoundDown32B(v)
+typedef s32 OSHeapHandle;
+
+extern volatile OSHeapHandle __OSCurrHeap;
+
+void* OSInitAlloc(void*, void*, s32);
+OSHeapHandle OSCreateHeap(void*, void*);
+OSHeapHandle OSSetCurrentHeap(OSHeapHandle);
+void* OSAllocFromHeap(OSHeapHandle, s32);
+long OSCheckHeap(OSHeapHandle);
+void OSFreeToHeap(OSHeapHandle heap, void* ptr);
+
+#define OSAlloc(size) OSAllocFromHeap(__OSCurrHeap, (size))
+#define OSFree(ptr) OSFreeToHeap(__OSCurrHeap, (ptr))
+
void* OSGetArenaHi(void);
void* OSGetArenaLo(void);
void OSSetArenaHi(void* newHi);