mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 21:40:03 +00:00
[headers 14] libc64 headers (#2177)
* [headers 14] libc64 headers * bss * bss
This commit is contained in:
parent
cbf9eacf42
commit
76d97ac18a
16 changed files with 73 additions and 40 deletions
|
@ -1366,31 +1366,6 @@ s8 PadUtils_GetRelY(Input* input);
|
|||
void PadUtils_UpdateRelXY(Input* input);
|
||||
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
|
||||
|
||||
void* SystemArena_Malloc(u32 size);
|
||||
void* SystemArena_MallocR(u32 size);
|
||||
void* SystemArena_Realloc(void* ptr, u32 newSize);
|
||||
void SystemArena_Free(void* ptr);
|
||||
void* SystemArena_Calloc(u32 num, u32 size);
|
||||
void SystemArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
|
||||
void SystemArena_Check(void);
|
||||
void SystemArena_Init(void* start, u32 size);
|
||||
void SystemArena_Cleanup(void);
|
||||
s32 SystemArena_IsInitialized(void);
|
||||
#if OOT_DEBUG
|
||||
void* SystemArena_MallocDebug(u32 size, const char* file, int line);
|
||||
void* SystemArena_MallocRDebug(u32 size, const char* file, int line);
|
||||
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
|
||||
void SystemArena_FreeDebug(void* ptr, const char* file, int line);
|
||||
void SystemArena_Display(void);
|
||||
#endif
|
||||
s32 PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args);
|
||||
s32 PrintUtils_Printf(PrintCallback* pfn, const char* fmt, ...);
|
||||
void Sleep_Cycles(OSTime cycles);
|
||||
void Sleep_Nsec(u32 nsec);
|
||||
void Sleep_Usec(u32 usec);
|
||||
void Sleep_Msec(u32 ms);
|
||||
void Sleep_Sec(u32 sec);
|
||||
|
||||
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
|
||||
void guScale(Mtx* m, f32 x, f32 y, f32 z);
|
||||
OSTask* _VirtualToPhysicalTask(OSTask* intp);
|
||||
|
|
11
include/libc64/aprintf.h
Normal file
11
include/libc64/aprintf.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef LIBC64_APRINTF_H
|
||||
#define LIBC64_APRINTF_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "stdarg.h"
|
||||
|
||||
s32 PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args);
|
||||
s32 PrintUtils_Printf(PrintCallback* pfn, const char* fmt, ...);
|
||||
|
||||
#endif
|
28
include/libc64/malloc.h
Normal file
28
include/libc64/malloc.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef LIBC64_MALLOC_H
|
||||
#define LIBC64_MALLOC_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "libc64/os_malloc.h"
|
||||
|
||||
void* SystemArena_Malloc(u32 size);
|
||||
void* SystemArena_MallocR(u32 size);
|
||||
void* SystemArena_Realloc(void* ptr, u32 newSize);
|
||||
void SystemArena_Free(void* ptr);
|
||||
void* SystemArena_Calloc(u32 num, u32 size);
|
||||
void SystemArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
|
||||
void SystemArena_Check(void);
|
||||
void SystemArena_Init(void* start, u32 size);
|
||||
void SystemArena_Cleanup(void);
|
||||
s32 SystemArena_IsInitialized(void);
|
||||
|
||||
#if OOT_DEBUG
|
||||
void* SystemArena_MallocDebug(u32 size, const char* file, int line);
|
||||
void* SystemArena_MallocRDebug(u32 size, const char* file, int line);
|
||||
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
|
||||
void SystemArena_FreeDebug(void* ptr, const char* file, int line);
|
||||
void SystemArena_Display(void);
|
||||
#endif
|
||||
|
||||
extern Arena gSystemArena;
|
||||
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef FP_MATH_H
|
||||
#define FP_MATH_H
|
||||
#ifndef LIBC64_MATH64_H
|
||||
#define LIBC64_MATH64_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
12
include/libc64/sleep.h
Normal file
12
include/libc64/sleep.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef LIBC64_SLEEP_H
|
||||
#define LIBC64_SLEEP_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
void Sleep_Cycles(OSTime cycles);
|
||||
void Sleep_Nsec(u32 nsec);
|
||||
void Sleep_Usec(u32 usec);
|
||||
void Sleep_Msec(u32 ms);
|
||||
void Sleep_Sec(u32 sec);
|
||||
|
||||
#endif
|
|
@ -1,9 +1,11 @@
|
|||
#ifndef STDIO_H
|
||||
#define STDIO_H
|
||||
#ifndef LIBC64_SPRINTF_H
|
||||
#define LIBC64_SPRINTF_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "stdarg.h"
|
||||
|
||||
int sprintf(char* dst, const char* fmt, ...);
|
||||
int vsprintf(char* dst, const char* fmt, va_list args);
|
||||
int sprintf(char* dst, const char* fmt, ...);
|
||||
|
||||
#endif
|
|
@ -7,7 +7,6 @@
|
|||
#include "libc/stdbool.h"
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "libc/stdio.h"
|
||||
#include "libc/stdlib.h"
|
||||
#include "libc/string.h"
|
||||
|
||||
|
|
|
@ -223,7 +223,6 @@ extern ActiveSequence gActiveSeqs[4];
|
|||
extern AudioContext gAudioCtx;
|
||||
extern AudioCustomUpdateFunction gAudioCustomUpdateFunction;
|
||||
|
||||
extern Arena gSystemArena;
|
||||
extern OSPifRam __osContPifRam;
|
||||
extern u8 __osContLastCmd;
|
||||
extern u8 __osMaxControllers;
|
||||
|
|
|
@ -66,12 +66,16 @@
|
|||
#include "libc64/qrand.h"
|
||||
#include "sys_math.h"
|
||||
#include "sys_math3d.h"
|
||||
#include "fp_math.h"
|
||||
#include "libc64/math64.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "main.h"
|
||||
#include "segmented_address.h"
|
||||
#include "stackcheck.h"
|
||||
#include "kaleido_manager.h"
|
||||
#include "libc64/aprintf.h"
|
||||
#include "libc64/malloc.h"
|
||||
#include "libc64/sleep.h"
|
||||
#include "libc64/sprintf.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "macros.h"
|
||||
#include "sys_math3d.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:105 gc-eu-mq:105 gc-jp:105 gc-jp-ce:105 gc-jp-mq:105 gc-us:105 gc-us-mq:105"
|
||||
#pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106"
|
||||
|
||||
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
|
||||
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "z64math.h"
|
||||
#include "fp_math.h"
|
||||
#include "libc64/math64.h"
|
||||
#include "z_lib.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "libc64/aprintf.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
s32 PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args) {
|
||||
return _Printf(*pfn, pfn, fmt, args);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "libc64/malloc.h"
|
||||
#include "ultra64.h"
|
||||
#include "macros.h"
|
||||
#include "libc64/os_malloc.h"
|
||||
|
||||
#define LOG_SEVERITY_NOLOG 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "libc64/sprintf.h"
|
||||
#include "stdarg.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "ultra64/xstdio.h"
|
||||
|
||||
|
|
|
@ -1395,7 +1395,7 @@ void func_80B3F3D8(void) {
|
|||
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
|
||||
}
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:64 gc-us:128 gc-us-mq:64"
|
||||
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:64 gc-us:128 gc-us-mq:64"
|
||||
|
||||
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
|
||||
static Vec3f D_80B42DA0;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:139 gc-eu-mq:139 gc-jp:141 gc-jp-ce:141 gc-jp-mq:141 gc-us:141 gc-us-mq:141"
|
||||
#pragma increment_block_number "gc-eu:136 gc-eu-mq:136 gc-jp:138 gc-jp-ce:138 gc-jp-mq:138 gc-us:138 gc-us-mq:138"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
|
Loading…
Reference in a new issue