mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +00:00
[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
This commit is contained in:
parent
af24970d89
commit
c6d7cc7697
24 changed files with 682 additions and 159 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue