mirror of
https://github.com/zeldaret/oot.git
synced 2025-04-08 23:56:26 +00:00
Create headers for some libu64 files (#2440)
* Create headers for some libu64 files * apply bss patch
This commit is contained in:
parent
ab37332793
commit
f448a48cd6
16 changed files with 81 additions and 45 deletions
|
@ -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
include/libu64/debug.h
Normal file
25
include/libu64/debug.h
Normal 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
include/libu64/pad.h
Normal file
31
include/libu64/pad.h
Normal 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
include/libu64/padsetup.h
Normal file
8
include/libu64/padsetup.h
Normal 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
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.2:66 pal-1.0:64 pal-1.1:64"
|
||||
"ntsc-1.2:64 pal-1.0:62 pal-1.1:62"
|
||||
|
||||
StackEntry sDmaMgrStackInfo;
|
||||
OSMesgQueue sDmaMgrMsgQueue;
|
||||
|
|
|
@ -24,7 +24,7 @@ extern struct IrqMgr gIrqMgr;
|
|||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \
|
||||
"ntsc-1.0:127 ntsc-1.1:127 ntsc-1.2:127 pal-1.0:125 pal-1.1:125"
|
||||
"ntsc-1.0:125 ntsc-1.1:125 ntsc-1.2:125 pal-1.0:123 pal-1.1:123"
|
||||
|
||||
extern u8 _buffersSegmentEnd[];
|
||||
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
* `osContStartReadData` to receiving the data. By running this on a separate thread to the game state, work can be
|
||||
* done while waiting for this operation to complete.
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "libu64/debug.h"
|
||||
#include "libu64/padsetup.h"
|
||||
#include "macros.h"
|
||||
#include "fault.h"
|
||||
#include "terminal.h"
|
||||
#include "line_numbers.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "macros.h"
|
||||
#include "sys_math3d.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:98 gc-eu-mq:98 gc-jp:98 gc-jp-ce:98 gc-jp-mq:98 gc-us:98 gc-us-mq:98" \
|
||||
#pragma increment_block_number "gc-eu:97 gc-eu-mq:97 gc-jp:97 gc-jp-ce:97 gc-jp-mq:97 gc-us:97 gc-us-mq:97" \
|
||||
"ntsc-1.0:80 ntsc-1.1:80 ntsc-1.2:79 pal-1.0:80 pal-1.1:80"
|
||||
|
||||
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
|
||||
|
|
|
@ -3639,7 +3639,7 @@ s32 Camera_KeepOn3(Camera* camera) {
|
|||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.0:129 ntsc-1.1:129 ntsc-1.2:129 pal-1.0:127 pal-1.1:127"
|
||||
"ntsc-1.0:127 ntsc-1.1:127 ntsc-1.2:127 pal-1.0:125 pal-1.1:125"
|
||||
|
||||
s32 Camera_KeepOn4(Camera* camera) {
|
||||
static Vec3f D_8015BD50;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "ultra64.h"
|
||||
#include "libu64/pad.h"
|
||||
|
||||
void PadUtils_Init(Input* input) {
|
||||
bzero(input, sizeof(Input));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status) {
|
||||
s32 ret;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:163 gc-eu-mq:163 gc-jp:163 gc-jp-ce:163 gc-jp-mq:163 gc-us:163 gc-us-mq:163" \
|
||||
#pragma increment_block_number "gc-eu:162 gc-eu-mq:162 gc-jp:162 gc-jp-ce:162 gc-jp-mq:162 gc-us:162 gc-us-mq:162" \
|
||||
"ntsc-1.0:121 ntsc-1.1:121 ntsc-1.2:121 pal-1.0:121 pal-1.1:121"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
|
|
@ -332,7 +332,7 @@ void Player_Action_CsAction(Player* this, PlayState* play);
|
|||
// .bss part 1
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:128 pal-1.1:128"
|
||||
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
|
||||
|
||||
static s32 D_80858AA0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue