switch to dtk setup (#2203)

* switch to dtk setup

* some cleanup / fixes

* cleanup d_a_alink literals

* Restore doxygen, update CI & README.md (#1)

* Fix build image ref (#2)

---------

Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
TakaRikka
2024-10-10 07:29:58 -07:00
committed by GitHub
parent 2fd702c0ac
commit 12eb254d76
33438 changed files with 370506 additions and 3055930 deletions
+90
View File
@@ -0,0 +1,90 @@
//
// Generated By: dol2asm
// Translation Unit: JMATrigonometric
//
// don't include header until this "zero" mess is figured out
// #include "JSystem/JMath/JMATrigonometric.h"
#include "math.h"
#include "dol2asm.h"
#include "global.h"
namespace std {
template <typename A1, typename B1>
struct pair {
A1 a1;
B1 b1;
pair() {
f32 tmp = FLOAT_LABEL(zero);
a1 = tmp;
b1 = tmp;
// a1 = A1();
// b1 = B1();
}
};
} // namespace std
// fake, but couldn't find another way to make 0.0f go first in sdata2 in this TU
SECTION_SDATA2 static f32 zero[1 + 1] = {0.0f, 0.0f};
inline f64 getConst() {
return 6.2831854820251465;
}
template<int N, typename T>
struct TSinCosTable {
std::pair<T, T> table[1 << N];
TSinCosTable() {
for (int i = 0; i < 1 << N; i++) {
table[i].a1 = sin((i * getConst()) / (1 << N));
table[i].b1 = cos((i * getConst()) / (1 << N));
}
}
};
inline f64 getConst2() {
return 9.765625E-4;
}
struct TAtanTable {
f32 table[1025];
u8 pad[0x1C];
TAtanTable() {
// (u32) cast needed for cmplwi instead of cmpwi
for (int i = 0; i < (u32)1024; i++) {
table[i] = atan(getConst2() * i);
}
table[0] = FLOAT_LABEL(zero);
table[1024] = 0.7853982; // 0.25 * PI
}
};
struct TAsinAcosTable {
f32 table[1025];
u8 pad[0x1C];
TAsinAcosTable() {
for (int i = 0; i < 1024; i++) {
table[i] = asin(getConst2() * i);
}
table[0] = FLOAT_LABEL(zero);
table[1024] = 0.7853982; // 0.25 * PI
}
};
//
// Declarations:
//
namespace JMath {
/* ############################################################################################## */
/* 80439A20-80449A20 066740 10000+00 1/1 265/265 705/705 .bss sincosTable___5JMath */
TSinCosTable<13, f32> sincosTable_;
/* 80449A20-8044AA40 076740 1020+00 1/1 0/0 0/0 .bss atanTable___5JMath */
TAtanTable atanTable_;
/* 8044AA40-8044BA60 077760 1020+00 1/1 1/1 0/0 .bss asinAcosTable___5JMath */
TAsinAcosTable asinAcosTable_;
} // namespace JMath