diff options
| author | Aetias <aetias@outlook.com> | 2025-01-18 16:24:12 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-01-18 16:24:12 +0100 |
| commit | 370e632197490213fd0a8e18f0967c39c14e1ba3 (patch) | |
| tree | 57e71d9032ab64b9e6e38a10154acd394cfc0a8e /libs | |
| parent | c81c165c37b64fab29b33a0a5c76f06efe53aa73 (diff) | |
Move ITCM documentation from Ghidra
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/nds/include/nds/math.h | 4 | ||||
| -rw-r--r-- | libs/nds/src/itcm/math_1.c (renamed from libs/nds/src/itcm/math.c) | 1 | ||||
| -rw-r--r-- | libs/nds/src/itcm/math_2.c | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/libs/nds/include/nds/math.h b/libs/nds/include/nds/math.h index 162625c3..517cbde2 100644 --- a/libs/nds/include/nds/math.h +++ b/libs/nds/include/nds/math.h @@ -120,6 +120,10 @@ q20 Vec3p_Length(Vec3p *a); void Vec3p_Normalize(Vec3p *vec, Vec3p *out); void Vec3p_Axpy(q20 a, Vec3p *x, Vec3p *y, Vec3p *out); q20 Vec3p_Distance(Vec3p *a, Vec3p *b); +bool Vec3p_TryNormalize(Vec3p *vec); +q20 Vec3p_DistanceSquared(Vec3p *a, Vec3p *b); +void Vec3p_Scale(Vec3p *vec, q20 scale); +bool Vec3p_CalculateNormal(Vec3p *vec, Vec3p *a, Vec3p *b, Vec3p *c); inline void Vec3p_Rotate(Vec3p *vec, q20 sin, q20 cos, Vec3p *out) { out->x += MUL_Q20(vec->z, sin); diff --git a/libs/nds/src/itcm/math.c b/libs/nds/src/itcm/math_1.c index 962fd2bf..ee452869 100644 --- a/libs/nds/src/itcm/math.c +++ b/libs/nds/src/itcm/math_1.c @@ -58,6 +58,7 @@ q20 Vec3p_Length(Vec3p *a) {} void Vec3p_Normalize(Vec3p *vec, Vec3p *out) {} void Vec3p_Axpy(q20 a, Vec3p *x, Vec3p *y, Vec3p *out) {} q20 Vec3p_Distance(Vec3p *a, Vec3p *b) {} +void Vec3p_func_01fffc94(Vec3p *a, Vec3p *b); u32 func_01ff9f3c(s32 a, s32 b) {} s32 Atan2(s32 x, s32 y) {} diff --git a/libs/nds/src/itcm/math_2.c b/libs/nds/src/itcm/math_2.c new file mode 100644 index 00000000..b63286fb --- /dev/null +++ b/libs/nds/src/itcm/math_2.c @@ -0,0 +1,7 @@ +#include "nds/math.h" + +bool Vec3p_TryNormalize(Vec3p *vec) {} +q20 Vec3p_DistanceSquared(Vec3p *a, Vec3p *b) {} +void Vec3p_Scale(Vec3p *vec, q20 scale) {} +bool Vec3p_CalculateNormal(Vec3p *vec, Vec3p *a, Vec3p *b, Vec3p *c) {} +void Vec3p_func_01fffc94(Vec3p *a, Vec3p *b) {} |
