From 4fa13e4132cf8adb2f07bb34927e62e525c8cc79 Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Sat, 2 Sep 2023 15:34:29 -0400 Subject: Move libultra function declarations to libultra headers (#1196) * Delete unused headers * Move PR and io to ultra64 * move headers to ultra64 * more cleanups * more reorganizing * i think that should be all * format * ifdef guards cleanup * Add IO_READ and IO_WRITE macros for future use * warnings * review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * warnings again * warn * ifdef guards * fix merge * fix merge * fix merge * bss * padutils.h * bss * bss * bss * fix merge * bss * bss * bss * fix merge * fixes * fixes * bss * bss * fix merge * fix * fix * fix includepaths * fix paths * bss * fix * ultra64/ -> PR/ * header guards * fix ehader guards * fix * fix++ * format * bss is borken * prevent 2 * :despair: * bss * rename assert to dbg_hungup * fix * a * fix * bss * fix * bss * bss --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> --- src/boot_O2/assert.c | 11 ----------- src/boot_O2/debug.c | 11 +++++++++++ src/boot_O2/loadfragment.c | 1 + src/boot_O2/mtxuty-cvt.c | 2 +- src/boot_O2/padutils.c | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 src/boot_O2/assert.c create mode 100644 src/boot_O2/debug.c (limited to 'src/boot_O2') diff --git a/src/boot_O2/assert.c b/src/boot_O2/assert.c deleted file mode 100644 index 04fcf87fe..000000000 --- a/src/boot_O2/assert.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "global.h" -#include "fault.h" - -void __assert(const char* file, u32 lineNum) { - osGetThreadId(NULL); - Fault_AddHungupAndCrash(file, lineNum); -} - -void func_800862B4(void) { - Fault_AddHungupAndCrash("Reset", 0); -} diff --git a/src/boot_O2/debug.c b/src/boot_O2/debug.c new file mode 100644 index 000000000..3933b585e --- /dev/null +++ b/src/boot_O2/debug.c @@ -0,0 +1,11 @@ +#include "global.h" +#include "fault.h" + +void _dbg_hungup(const char* file, int lineNum) { + osGetThreadId(NULL); + Fault_AddHungupAndCrash(file, lineNum); +} + +void Reset(void) { + Fault_AddHungupAndCrash("Reset", 0); +} diff --git a/src/boot_O2/loadfragment.c b/src/boot_O2/loadfragment.c index 517c82bbb..b22b1a692 100644 --- a/src/boot_O2/loadfragment.c +++ b/src/boot_O2/loadfragment.c @@ -9,6 +9,7 @@ * The main difference between them seems to be the lack of vramEnd arguments here. * Instead they are calculated on the fly. */ + #include "global.h" #include "system_malloc.h" #include "loadfragment.h" diff --git a/src/boot_O2/mtxuty-cvt.c b/src/boot_O2/mtxuty-cvt.c index 2c1634392..a5da24522 100644 --- a/src/boot_O2/mtxuty-cvt.c +++ b/src/boot_O2/mtxuty-cvt.c @@ -15,5 +15,5 @@ void MtxConv_F2L(Mtx* mtx, MtxF* mf) { } void MtxConv_L2F(MtxF* mtx, Mtx* mf) { - guMtxL2F(mtx, mf); + guMtxL2F(mtx->mf, mf); } diff --git a/src/boot_O2/padutils.c b/src/boot_O2/padutils.c index accd09e11..1c6bbe868 100644 --- a/src/boot_O2/padutils.c +++ b/src/boot_O2/padutils.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "padutils.h" void PadUtils_Init(Input* input) { bzero(input, sizeof(Input)); -- cgit v1.2.3