Merge remote-tracking branch 'upstream/main' into displaytext

This commit is contained in:
Yanis002
2025-06-29 21:29:34 +02:00
274 changed files with 6030 additions and 2785 deletions
+2
View File
@@ -5,4 +5,6 @@
typedef unsigned int size_t;
#define offsetof(type, member) ((size_t) &((type *) NULL)->member)
#endif
+6
View File
@@ -0,0 +1,6 @@
#ifndef _C_STDIO_H
#define _C_STDIO_H
int sprintf(char *__restrict s, const char *__restrict format, ...);
#endif
+6 -3
View File
@@ -8,6 +8,8 @@
extern "C" {
#endif
#define ABS(x) ((x) < 0 ? -(x) : (x))
// Q20.12 fixed point number
typedef s32 q20;
// Q4.12 fixed point number
@@ -19,6 +21,7 @@ typedef s16 q4;
#define FLOAT_TO_Q19(n) ((s32) (((n) * 8192 + 1)))
#define ROUND_Q20(n) (((s32) (n) + 0x800) >> 12)
#define MUL_Q20(a, b) (q20)((((s64) (a)) * ((s64) (b)) + 0x800) >> 12)
#define DIV_Q20(a, b) (((a) << 12) / (b))
#define DEG_TO_ANG(n) ((n) * 0x10000 / 360)
#define SIN(n) (gSinCosTable[2 * ((n) >> 4)])
@@ -31,7 +34,7 @@ u32 SoftDivide(u32 a, u32 b);
u32 CoDivide64By32(u32 a, u32 b);
u32 func_01ff98f0(u32 a, u32 b);
u32 CoReciprocal(u32 x);
u32 func_01ff992c(u32 x);
u64 func_01ff992c(u32 x);
u32 CoSqrt(u32 x);
u32 CoInvSqrt(u32 x);
u32 AwaitDivisionResult();
@@ -49,8 +52,8 @@ bool Approach_thunk(unk32 *src, unk32 dest, unk32 step);
extern q4 gSinCosTable[];
typedef struct {
/* 0 */ s8 x;
/* 1 */ s8 y;
/* 0 */ u8 x;
/* 1 */ u8 y;
/* 2 */
} Vec2b;
@@ -1,6 +1,13 @@
#ifndef _NDS_OVERLAY_H
#define _NDS_OVERLAY_H
#ifdef __cplusplus
extern "C" {
#endif
#define EXTERN_OVERLAY_ID(name_or_index) extern u32 OVERLAY_##name_or_index##_ID;
#define OVERLAY_ID(name_or_index) ((u32) & OVERLAY_##name_or_index##_ID)
typedef struct Overlay {
/* 00 */ unk32 mId;
/* 04 */ void *mBaseAddress;
@@ -27,4 +34,8 @@ bool Overlay_Destroy(Overlay *overlay);
bool Overlay_Load(Overlay *overlay, unk32 param2);
bool Overlay_Unload(Overlay *overlay, unk32 param2);
#ifdef __cplusplus
}
#endif
#endif
+1 -1
View File
@@ -37,7 +37,7 @@ void Mat4p_Multiply(Mat4p *a, Mat4p *b, Mat4p *out) {}
u32 CoDivide64By32(u32 a, u32 b) {}
u32 func_01ff98f0(u32 a, u32 b) {}
u32 CoReciprocal(u32 x) {}
u32 func_01ff992c(u32 x) {}
u64 func_01ff992c(u32 x) {}
u32 CoSqrt(u32 x) {}
u32 CoInvSqrt(u32 x) {}
u32 AwaitDivisionResult() {}