Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match itmariofireball #1277

Merged
merged 10 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 0 additions & 313 deletions asm/melee/it/items/itmariofireball.s

This file was deleted.

2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def RuntimeLib(lib_name: str, objects: Objects) -> LibDict:
Object(NonMatching, "melee/it/items/itfflowerflame.c"),
Object(NonMatching, "melee/it/items/itevyoshiegg.c"),
# Fighter-related items
Object(NonMatching, "melee/it/items/itmariofireball.c"),
Object(Matching, "melee/it/items/itmariofireball.c"),
Object(NonMatching, "melee/it/items/itkirbycutterbeam.c"),
Object(Matching, "melee/it/items/itfoxlaser.c"),
Object(Matching, "melee/it/items/itfoxillusion.c"),
Expand Down
3 changes: 2 additions & 1 deletion obj_files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ TEXT_O_FILES +=\
$(BUILD_DIR)/asm/melee/it/items/itevyoshiegg.s.o\

TEXT_O_FILES +=\
$(BUILD_DIR)/asm/melee/it/items/itmariofireball.s.o\
$(BUILD_DIR)/src/melee/it/items/itmariofireball.c.o\
$(BUILD_DIR)/asm/melee/it/items/itkirbycutterbeam.s.o\
$(BUILD_DIR)/src/melee/it/items/itfoxlaser.c.o\
$(BUILD_DIR)/src/melee/it/items/itfoxillusion.c.o\
Expand Down Expand Up @@ -794,6 +794,7 @@ TEXT_O_FILES +=\
$(BUILD_DIR)/src/MSL/math_1.c.o\
$(BUILD_DIR)/asm/MSL/trigf.s.o\
$(BUILD_DIR)/asm/MSL/math.s.o\
$(BUILD_DIR)/src/MSL/math_ppc.c.o\

TEXT_O_FILES +=\
$(BUILD_DIR)/asm/MetroTRK/mainloop.s.o\
Expand Down
37 changes: 0 additions & 37 deletions src/MSL/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,6 @@ static float const rad_to_deg = 180 / M_PI;

#define FLT_EPSILON 1.00000001335e-10F

extern 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 __MWERKS__
#pragma pop
#endif
Expand Down Expand Up @@ -103,24 +84,6 @@ static inline f32 fabs_inline(f32 x)
}
}

inline float sqrtf_accurate(float x)
{
volatile float y;
if (x > 0.0f) {
double guess = __frsqrte((double) x); // returns an approximation to
guess =
0.5 * guess * (3.0 - guess * guess * x); // now have 12 sig bits
guess =
0.5 * guess * (3.0 - guess * guess * x); // now have 24 sig bits
guess =
0.5 * guess * (3.0 - guess * guess * x); // now have 32 sig bits
guess = 0.5 * guess * (3.0 - guess * guess * x); // extra iteration
y = (float) (x * guess);
return y;
}
return x;
}

double frexp(double x, int* exponent);
double fabsf__Ff(double);
float tanf(float x);
Expand Down
1 change: 1 addition & 0 deletions src/MSL/math_ppc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "math_ppc.h"
Loading
Loading