mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
jaudio_NES: link ja_calc
This commit is contained in:
+1
-1
@@ -778,7 +778,7 @@ config.libs = [
|
||||
Object(Matching, "jaudio_NES/internal/fxinterface.c"),
|
||||
Object(NonMatching, "jaudio_NES/internal/heapctrl.c"),
|
||||
Object(Matching, "jaudio_NES/internal/ipldec.c"),
|
||||
Object(NonMatching, "jaudio_NES/internal/ja_calc.c"),
|
||||
Object(Matching, "jaudio_NES/internal/ja_calc.c", extra_cflags=["-sym off"]),
|
||||
Object(NonMatching, "jaudio_NES/internal/jammain_2.c"),
|
||||
Object(NonMatching, "jaudio_NES/internal/jamosc.c"),
|
||||
Object(NonMatching, "jaudio_NES/internal/memory.c"),
|
||||
|
||||
@@ -10,6 +10,27 @@ namespace std {
|
||||
float sqrtf(float);
|
||||
float sinf(float);
|
||||
|
||||
inline float sinf(float x) {
|
||||
return (float)sin((double)x);
|
||||
}
|
||||
|
||||
inline float sqrtf(float x) {
|
||||
static const double _half = .5;
|
||||
static const double _three = 3.0;
|
||||
volatile float y;
|
||||
|
||||
if (x > 0.0f) {
|
||||
double guess = __frsqrte((double)x); // returns an approximation to
|
||||
guess = _half * guess * (_three - guess * guess * x); // now have 12 sig bits
|
||||
guess = _half * guess * (_three - guess * guess * x); // now have 24 sig bits
|
||||
guess = _half * guess * (_three - guess * guess * x); // now have 32 sig bits
|
||||
y = (float)(x * guess);
|
||||
return y;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -43,9 +43,10 @@ f32 atanf2(f32 x, f32 y)
|
||||
* Address: ........
|
||||
* Size: 000020
|
||||
*/
|
||||
void sinf2(f32)
|
||||
f32 sinf2(f32 x)
|
||||
{
|
||||
// UNUSED FUNCTION
|
||||
// @fabricated
|
||||
return std::sinf(x);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user