summaryrefslogtreecommitdiff
path: root/include/fault.h
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-09-04 02:10:14 -0700
committerGitHub <noreply@github.com>2024-09-04 11:10:14 +0200
commitc6d7cc7697c67989b1f018ae2bc934f6677c09b7 (patch)
treecadb909a8c2adde978320b8505fc1bda48e3342c /include/fault.h
parentaf24970d8919e4e6bb8356fd5672c938582dfcb8 (diff)
[ntsc-1.2] Match __osMalloc.c and code_800FC620.c (new/delete) (#2106)
* Match __osMalloc * Match src/code/code_800FC620.c (new/delete) * Wrap versions-specific files in ifdefs to fix compilation * Fix bss * Remove {FAULT,RAND,OSMALLOC}_VERSION in favor of PLATFORM_N64 * Fix __osMalloc data splits, add unused strings * __osMalloc.h -> osMalloc.h * Fix merge
Diffstat (limited to 'include/fault.h')
-rw-r--r--include/fault.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/fault.h b/include/fault.h
index 4ecb17aea..ac63a234d 100644
--- a/include/fault.h
+++ b/include/fault.h
@@ -4,9 +4,8 @@
#include "ultra64.h"
#include "attributes.h"
#include "padmgr.h"
-#include "versions.h"
-#if FAULT_VERSION == FAULT_GC
+#if PLATFORM_GC
// These are the same as the 3-bit ansi color codes
#define FAULT_COLOR_BLACK 0
#define FAULT_COLOR_RED 1
@@ -34,7 +33,7 @@ typedef struct FaultClient {
/* 0x0C */ void* arg1;
} FaultClient; // size = 0x10
-#if FAULT_VERSION == FAULT_GC
+#if PLATFORM_GC
typedef struct FaultAddrConvClient {
/* 0x00 */ struct FaultAddrConvClient* next;
/* 0x04 */ void* callback;
@@ -56,7 +55,7 @@ NORETURN void Fault_AddHungupAndCrash(const char* file, int line);
void Fault_AddClient(FaultClient* client, void* callback, void* arg0, void* arg1);
void Fault_RemoveClient(FaultClient* client);
-#if FAULT_VERSION == FAULT_GC
+#if PLATFORM_GC
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* arg);
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client);
#endif
@@ -71,13 +70,13 @@ void Fault_SetCursor(s32 x, s32 y);
s32 Fault_Printf(const char* fmt, ...);
void Fault_DrawText(s32 x, s32 y, const char* fmt, ...);
-#if FAULT_VERSION == FAULT_N64
+#if PLATFORM_N64
// Not implemented. Silently noop-ing is fine, these are not essential for functionality.
#define Fault_SetFontColor(color) (void)0
#define Fault_SetCharPad(padW, padH) (void)0
-#elif FAULT_VERSION == FAULT_GC
+#else
void Fault_InitDrawer(void);
void Fault_SetForeColor(u16 color);
@@ -88,13 +87,13 @@ s32 Fault_VPrintf(const char* fmt, va_list args);
#endif
-#if FAULT_VERSION == FAULT_N64
+#if PLATFORM_N64
extern vs32 gFaultMsgId;
#define FAULT_MSG_ID gFaultMsgId
-#elif FAULT_VERSION == FAULT_GC
+#else
typedef struct FaultMgr {
/* 0x000 */ OSThread thread;