Create headers for some libu64 files (#2440)

* Create headers for some libu64 files

* apply bss patch
This commit is contained in:
mzxrules
2025-01-24 13:25:05 -05:00
committed by GitHub
parent ab37332793
commit f448a48cd6
16 changed files with 81 additions and 45 deletions
-26
View File
@@ -26,14 +26,6 @@ NORETURN void func_80002384(const char* exp, const char* file, int line);
#endif
OSPiHandle* osDriveRomInit(void);
void Mio0_Decompress(u8* src, u8* dst);
#if DEBUG_FEATURES
void LogUtils_LogHexDump(void* ptr, s32 size0);
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line);
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, int line);
void LogUtils_LogThreadId(const char* name, int line);
#endif
void LogUtils_HungupThread(const char* name, int line);
void LogUtils_ResetHungup(void);
EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params);
EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params);
@@ -290,24 +282,6 @@ size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, voi
// ? func_800FC83C(?);
// ? func_800FCAB4(?);
void SystemHeap_Init(void* start, u32 size);
void PadUtils_Init(Input* input);
void func_800FCB70(void);
void PadUtils_ResetPressRel(Input* input);
u32 PadUtils_CheckCurExact(Input* input, u16 value);
u32 PadUtils_CheckCur(Input* input, u16 key);
u32 PadUtils_CheckPressed(Input* input, u16 key);
u32 PadUtils_CheckReleased(Input* input, u16 key);
u16 PadUtils_GetCurButton(Input* input);
u16 PadUtils_GetPressButton(Input* input);
s8 PadUtils_GetCurX(Input* input);
s8 PadUtils_GetCurY(Input* input);
void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
s8 PadUtils_GetRelXImpl(Input* input);
s8 PadUtils_GetRelYImpl(Input* input);
s8 PadUtils_GetRelX(Input* input);
s8 PadUtils_GetRelY(Input* input);
void PadUtils_UpdateRelXY(Input* input);
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
f32 absf(f32);
+25
View File
@@ -0,0 +1,25 @@
#ifndef LIBU64_DEBUG_H
#define LIBU64_DEBUG_H
#include "ultra64.h"
#if PLATFORM_N64 || DEBUG_FEATURES
f32 LogUtils_CheckFloatRange(const char* exp, int line, const char* valueName, f32 value, const char* minName, f32 min,
const char* maxName, f32 max);
#endif
#if DEBUG_FEATURES
s32 LogUtils_CheckIntRange(const char* exp, int line, const char* valueName, s32 value, const char* minName, s32 min,
const char* maxName, s32 max);
void LogUtils_LogHexDump(void* ptr, s32 size0);
void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, int line);
void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, int line);
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line);
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, int line);
void LogUtils_LogThreadId(const char* name, int line);
#endif
void LogUtils_HungupThread(const char* name, int line);
void LogUtils_ResetHungup(void);
#endif
@@ -1,5 +1,5 @@
#ifndef GFXPRINT_H
#define GFXPRINT_H
#ifndef LIBU64_GFXPRINT_H
#define LIBU64_GFXPRINT_H
#include "ultra64.h"
#include "color.h"
+31
View File
@@ -0,0 +1,31 @@
#ifndef LIBU64_PAD_H
#define LIBU64_PAD_H
#include "ultra64.h"
typedef struct Input {
/* 0x00 */ OSContPad cur;
/* 0x06 */ OSContPad prev;
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
/* 0x12 */ OSContPad rel; // X/Y store adjusted
} Input; // size = 0x18
void PadUtils_Init(Input* input);
void func_800FCB70(void);
void PadUtils_ResetPressRel(Input* input);
u32 PadUtils_CheckCurExact(Input* input, u16 value);
u32 PadUtils_CheckCur(Input* input, u16 key);
u32 PadUtils_CheckPressed(Input* input, u16 key);
u32 PadUtils_CheckReleased(Input* input, u16 key);
u16 PadUtils_GetCurButton(Input* input);
u16 PadUtils_GetPressButton(Input* input);
s8 PadUtils_GetCurX(Input* input);
s8 PadUtils_GetCurY(Input* input);
void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
s8 PadUtils_GetRelXImpl(Input* input);
s8 PadUtils_GetRelYImpl(Input* input);
s8 PadUtils_GetRelX(Input* input);
s8 PadUtils_GetRelY(Input* input);
void PadUtils_UpdateRelXY(Input* input);
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef LIBU64_PADSETUP_H
#define LIBU64_PADSETUP_H
#include "ultra64.h"
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
#endif
+1 -7
View File
@@ -2,6 +2,7 @@
#define PADMGR_H
#include "ultra64.h"
#include "libu64/pad.h"
#include "irqmgr.h"
#include "versions.h"
@@ -11,13 +12,6 @@ typedef enum ControllerPakType {
CONT_PAK_OTHER
} ControllerPakType;
typedef struct Input {
/* 0x00 */ OSContPad cur;
/* 0x06 */ OSContPad prev;
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
/* 0x12 */ OSContPad rel; // X/Y store adjusted
} Input; // size = 0x18
typedef struct PadMgr {
/* 0x0000 */ OSContStatus padStatus[MAXCONTROLLERS];
/* 0x0010 */ OSMesg serialMsg;
+2 -1
View File
@@ -54,7 +54,7 @@
#include "sequence.h"
#include "sfx.h"
#include "color.h"
#include "gfxprint.h"
#include "libu64/gfxprint.h"
#include "z_lib.h"
#include "ichain.h"
#include "regs.h"
@@ -86,6 +86,7 @@
#include "libc64/malloc.h"
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "libu64/debug.h"
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240