mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-15 21:07:15 +00:00
68818044db
* wip decomp ntsc-1.2 fault.c * more ntsc-1.2 fault.c * decompiled fault_v1.c * name fault_v1 functions, wip * try to clean up build system (two versions of the fault system coexisting) * cleanup * cleanup2 * fix build gc-eu-mq-dbg * match 2 more, ty anon * matched * review * more review * fixup spec * `(uintptr_t)ptr op int` instead of `ptr op (type*)int` * move fault.h out of global headers, properly include fault.h and versions.h * compile all fault_*.c files regardless of version by overriding FAULT_VERSION * n64 FaultMgr.framebuffer s32 -> u16* * FaultMgr.framebuffer -> FaultMgr.fb * make gc FaultMgr.fb u16* (yes, thats everything) * bss * fix Fault_Printf return type * noop FaultDrawer_SetFontColor, FaultDrawer_SetCharPad in fault_n64 * fault_color_ stuff is only for fault_gc * rm empty line in makefile * I guess `D_80105A90_unknown` is `[sg]TotalAllocFailures` * bss * `Fault_WaitInput` -> `Fault_WaitForInput` * use named fault funcs in pointers array * FAULT_OOT{N64,GC} -> FAULT_{N64,GC} * Apply suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * review, sync fault_{gc,n64} * Apply `FPCSR_CE` suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
87 lines
1.8 KiB
C
87 lines
1.8 KiB
C
#include "global.h"
|
|
#include "fault.h"
|
|
#include "n64dd.h"
|
|
|
|
// TODO functions of unknown prototype
|
|
extern char func_801C8510_unknown[];
|
|
extern char osGetIntMask[];
|
|
extern char osSetTime[];
|
|
|
|
n64ddStruct_800FF4B0_pointers D_800FF4B0 = {
|
|
func_801C8510_unknown,
|
|
NULL,
|
|
NULL,
|
|
Fault_RemoveClient,
|
|
Fault_AddClient,
|
|
FaultDrawer_DrawText,
|
|
Fault_WaitForInput,
|
|
Fault_AddHungupAndCrashImpl,
|
|
Fault_AddHungupAndCrash,
|
|
func_800ADC08,
|
|
_Printf,
|
|
osCreateThread,
|
|
osDestroyThread,
|
|
osYieldThread,
|
|
osStartThread,
|
|
osStopThread,
|
|
osGetThreadId,
|
|
osSetThreadPri,
|
|
osGetThreadPri,
|
|
osCreateMesgQueue,
|
|
osSendMesg,
|
|
osJamMesg,
|
|
osRecvMesg,
|
|
osSetEventMesg,
|
|
osGetIntMask,
|
|
osSetIntMask,
|
|
osInvalDCache,
|
|
osInvalICache,
|
|
osWritebackDCache,
|
|
osWritebackDCacheAll,
|
|
osGetTime,
|
|
osSetTime,
|
|
osSetTimer,
|
|
osStopTimer,
|
|
&gSaveContext,
|
|
DmaMgr_RequestAsync,
|
|
DmaMgr_RequestSync,
|
|
DmaMgr_DmaFromDriveRom,
|
|
Cutscene_HandleEntranceTriggers,
|
|
gSegments,
|
|
Flags_GetEventChkInf,
|
|
Flags_SetEventChkInf,
|
|
NULL, // TODO possibly file padding
|
|
NULL,
|
|
};
|
|
|
|
n64ddStruct_80121AF0* B_80121AF0;
|
|
|
|
n64ddStruct_80121AF0* func_800ADB30(n64ddStruct_80121AF0* arg0) {
|
|
n64ddStruct_800FF4B0_pointers* temp_a0 = func_800ADBD0();
|
|
|
|
if (arg0 != NULL && arg0->unk_00 != NULL) {
|
|
arg0->unk_00(temp_a0, arg0);
|
|
}
|
|
B_80121AF0 = arg0;
|
|
return B_80121AF0;
|
|
}
|
|
|
|
void func_800ADB8C(void) {
|
|
if ((B_80121AF0 != NULL) && (B_80121AF0->unk_04 != NULL)) {
|
|
B_80121AF0->unk_04();
|
|
}
|
|
B_80121AF0 = NULL;
|
|
}
|
|
|
|
n64ddStruct_800FF4B0_pointers* func_800ADBD0(void) {
|
|
D_800FF4B0.unk_04 = 0;
|
|
D_800FF4B0.unk_08 = gRegEditor;
|
|
D_800FF4B0.unk_88 = &gSaveContext;
|
|
return &D_800FF4B0;
|
|
}
|
|
|
|
void func_800ADC00(void) {
|
|
}
|
|
|
|
void func_800ADC08(s32 arg0, s32 arg1, s32 arg2) {
|
|
}
|