mirror of
https://github.com/PrimeDecomp/prime.git
synced 2026-07-12 18:18:56 -07:00
Match and link ansi_fp.c
This commit is contained in:
+1
-1
@@ -1209,7 +1209,7 @@ config.libs = [
|
||||
Object(Matching, "Runtime/abort_exit.c"),
|
||||
Object(NonMatching, "Runtime/alloc.c"),
|
||||
Object(Matching, "Runtime/ansi_files.c"),
|
||||
Object(NonMatching, "Runtime/ansi_fp.c"),
|
||||
Object(Matching, "Runtime/ansi_fp.c"),
|
||||
Object(Matching, "Runtime/arith.c"),
|
||||
Object(Matching, "Runtime/buffer_io.c"),
|
||||
Object(Matching, "Runtime/ctype.c"),
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
const float& operator[](EDimZ) const { return mZ; }
|
||||
|
||||
float& operator[](int i) { return (&mX)[i]; }
|
||||
float operator[](int i) const { return (&mX)[i]; }
|
||||
const float operator[](int i) const { return (&mX)[i]; }
|
||||
bool IsNonZero() const { return mX != 0.f || mY != 0.f || mZ != 0.f; }
|
||||
|
||||
CVector3f DropZ() const { return CVector3f(mX, mY, 0.f); }
|
||||
|
||||
@@ -5,12 +5,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MAX 3.402823466e+38f
|
||||
#define FLT_EPSILON 1.192092896e-07f
|
||||
#define FLT_MIN 1.175494351e-38f
|
||||
|
||||
#define DBL_DIG 6
|
||||
#define DBL_MIN 5.8774717e-39
|
||||
#define DBL_MAX (* (double *) __double_max)
|
||||
#define DBL_EPSILON 1.1920929e-07
|
||||
|
||||
#define DBL_MANT_DIG 53
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+9
-4
@@ -56,6 +56,7 @@ extern _INT32 __float_huge[];
|
||||
extern _INT32 __float_nan[];
|
||||
extern _INT32 __double_huge[];
|
||||
extern _INT32 __extended_huge[];
|
||||
extern _INT32 __double_max[];
|
||||
|
||||
#define HUGE_VAL (*(double*)__double_huge)
|
||||
#define INFINITY (*(float*)__float_huge)
|
||||
@@ -111,6 +112,8 @@ _MATH_INLINE float powf(float __x, float __y) { return pow(__x, __y); }
|
||||
#define __UHI(x) (*(_UINT32*)&x)
|
||||
#endif
|
||||
|
||||
#define signbit(x)((int)(__HI(x)&0x80000000))
|
||||
|
||||
#define FP_NAN 1
|
||||
#define FP_INFINITE 2
|
||||
#define FP_ZERO 3
|
||||
@@ -204,14 +207,16 @@ float sqrtf(float x);
|
||||
double sqrt(double x);
|
||||
#endif
|
||||
|
||||
static inline float ldexpf(float x, int exp) { return (float)ldexp((double)x, exp); }
|
||||
static inline double scalbn(double x, int n) { return ldexp(x, n); }
|
||||
static inline float scalbnf(float x, int n) { return (float)ldexpf(x, n); }
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#pragma cplusplus reset
|
||||
#endif
|
||||
|
||||
static inline float ldexpf(float x, int exp) { return (float)ldexp((double)x, exp); }
|
||||
double frexp(double, int *exp);
|
||||
static inline double scalbn(double x, int n) { return ldexp(x, n); }
|
||||
static inline float scalbnf(float x, int n) { return (float)ldexpf(x, n); }
|
||||
double nextafter(double, double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
struct CCharacterIdentifier {
|
||||
wchar_t chr;
|
||||
uint rank;
|
||||
|
||||
struct Compare {
|
||||
bool operator()(const CCharacterIdentifier& ident, wchar_t chr) { return ident.chr == chr; }
|
||||
bool operator()(wchar_t chr, const CCharacterIdentifier& ident) { return chr == ident.chr; }
|
||||
};
|
||||
};
|
||||
|
||||
const CCharacterIdentifier gCantBeginChars[63] = {
|
||||
@@ -21,7 +26,7 @@ const CCharacterIdentifier gCantBeginChars[63] = {
|
||||
|
||||
const CCharacterIdentifier gCantEndChars[89] = {
|
||||
{L'#', 2}, {L'$', 2}, {L'(', 1}, {L'@', 2}, {L'B', 4}, {L'C', 4}, {L'D', 4},
|
||||
{L'E', 4}, {L'F', 4}, {L'G', 4}, {L'J', 4}, {L'K', 4}, {L'L', 4}, {L'M', 4},
|
||||
{L'F', 4}, {L'G', 4}, {L'H', 4}, {L'J', 4}, {L'K', 4}, {L'L', 4}, {L'M', 4},
|
||||
{L'N', 4}, {L'P', 4}, {L'Q', 4}, {L'R', 4}, {L'S', 4}, {L'T', 4}, {L'V', 4},
|
||||
{L'W', 4}, {L'X', 4}, {L'Y', 4}, {L'Z', 4}, {L'b', 4}, {L'c', 4}, {L'd', 4},
|
||||
{L'f', 4}, {L'g', 4}, {L'h', 4}, {L'j', 4}, {L'k', 4}, {L'l', 4}, {L'm', 4},
|
||||
@@ -36,4 +41,6 @@ const CCharacterIdentifier gCantEndChars[89] = {
|
||||
};
|
||||
|
||||
int CWordBreakTables::GetBeginRank(wchar_t chr) {
|
||||
//rstl::binary_find(&gCantBeginChars[0], &gCantBeginChars[62], chr, CCharacterIdentifier::Compare());
|
||||
return -1;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user