mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 13:21:20 +00:00
remove NEED_FIXED_VECTOR and fix angelchk testcase
This commit is contained in:
parent
c64e4d58b7
commit
96c71c68c8
6 changed files with 7 additions and 23 deletions
|
@ -440,12 +440,8 @@ extern const char *compdate, *comptime, *comprevision;
|
||||||
//#define SLOPENESS
|
//#define SLOPENESS
|
||||||
|
|
||||||
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
|
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
|
||||||
/// Depends on NEED_FIXED_VECTORS? for a few functions.
|
|
||||||
#define ESLOPE
|
#define ESLOPE
|
||||||
|
|
||||||
/// Fixed and float point types
|
|
||||||
//#define NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
/// Delete file while the game is running.
|
/// Delete file while the game is running.
|
||||||
/// \note EXTREMELY buggy, tends to crash game.
|
/// \note EXTREMELY buggy, tends to crash game.
|
||||||
//#define DELFILE
|
//#define DELFILE
|
||||||
|
|
|
@ -119,8 +119,6 @@ fixed_t FixedHypot(fixed_t x, fixed_t y)
|
||||||
return FixedMul(ax, yx1); // |x|*((1 + (x/y)^2)^1/2)
|
return FixedMul(ax, yx1); // |x|*((1 + (x/y)^2)^1/2)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1 //#ifdef NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
vector2_t *FV2_Load(vector2_t *vec, fixed_t x, fixed_t y)
|
vector2_t *FV2_Load(vector2_t *vec, fixed_t x, fixed_t y)
|
||||||
{
|
{
|
||||||
vec->x = x;
|
vec->x = x;
|
||||||
|
@ -863,8 +861,6 @@ void FM_Scale(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z)
|
||||||
#undef M
|
#undef M
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef M_TESTCASE
|
#ifdef M_TESTCASE
|
||||||
//#define MULDIV_TEST
|
//#define MULDIV_TEST
|
||||||
#define SQRT_TEST
|
#define SQRT_TEST
|
||||||
|
|
|
@ -357,9 +357,6 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedRound(fixed_t x)
|
||||||
return INT32_MAX;
|
return INT32_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 1//#ifdef NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
fixed_t x;
|
fixed_t x;
|
||||||
|
@ -438,6 +435,4 @@ void FM_MultMatrix(matrix_t *dest, const matrix_t *multme);
|
||||||
void FM_Translate(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
void FM_Translate(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
||||||
void FM_Scale(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
void FM_Scale(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
||||||
|
|
||||||
#endif // defined NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
#endif //m_fixed.h
|
#endif //m_fixed.h
|
||||||
|
|
|
@ -2225,9 +2225,6 @@ angle_t tantoangle[2049] =
|
||||||
536870912
|
536870912
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if 1 //#ifdef NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
static angle_t fineacon[65536*2] = {
|
static angle_t fineacon[65536*2] = {
|
||||||
ANGLE_MAX, 2143707442, 2142143280, 2140943052, 2139931208, 2139039753, 2138233813, 2137492672, 2136802831, 2136154917, 2135542102, 2134959233, 2134402306, 2133868139, 2133354148, 2132858208,
|
ANGLE_MAX, 2143707442, 2142143280, 2140943052, 2139931208, 2139039753, 2138233813, 2137492672, 2136802831, 2136154917, 2135542102, 2134959233, 2134402306, 2133868139, 2133354148, 2132858208,
|
||||||
2132378539, 2131913638, 2131462220, 2131023174, 2130595537, 2130178462, 2129771202, 2129373097, 2128983555, 2128602046, 2128228092, 2127861261, 2127501162, 2127147436, 2126799757, 2126457825,
|
2132378539, 2131913638, 2131462220, 2131023174, 2130595537, 2130178462, 2129771202, 2129373097, 2128983555, 2128602046, 2128228092, 2127861261, 2127501162, 2127147436, 2126799757, 2126457825,
|
||||||
|
@ -10706,5 +10703,3 @@ void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z)
|
||||||
M(3, 3) = FRACUNIT;
|
M(3, 3) = FRACUNIT;
|
||||||
#undef M
|
#undef M
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -96,9 +96,6 @@ FUNCMATH angle_t FixedAngle(fixed_t fa);
|
||||||
// and with a factor, with +factor for (fa/factor) and -factor for (fa*factor)
|
// and with a factor, with +factor for (fa/factor) and -factor for (fa*factor)
|
||||||
FUNCMATH angle_t FixedAngleC(fixed_t fa, fixed_t factor);
|
FUNCMATH angle_t FixedAngleC(fixed_t fa, fixed_t factor);
|
||||||
|
|
||||||
|
|
||||||
#if 1 //#ifdef NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
/// The FixedAcos function
|
/// The FixedAcos function
|
||||||
FUNCMATH angle_t FixedAcos(fixed_t x);
|
FUNCMATH angle_t FixedAcos(fixed_t x);
|
||||||
|
|
||||||
|
@ -112,8 +109,6 @@ void FV3_Rotate(vector3_t *rotVec, const vector3_t *axisVec, const angle_t angle
|
||||||
/// Fixed Point Matrix functions
|
/// Fixed Point Matrix functions
|
||||||
void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z);
|
void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z);
|
||||||
|
|
||||||
#endif // defined NEED_FIXED_VECTOR
|
|
||||||
|
|
||||||
// The table values in tables.c are calculated with this many fractional bits.
|
// The table values in tables.c are calculated with this many fractional bits.
|
||||||
#define FINE_FRACBITS 16
|
#define FINE_FRACBITS 16
|
||||||
|
|
||||||
|
|
|
@ -351,6 +351,13 @@ int main(int argc, char** argv)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *cpu_cpy(void *dest, const void *src, size_t n)
|
||||||
|
{
|
||||||
|
return memcpy(dest, src, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *(*M_Memcpy)(void* dest, const void* src, size_t n) = cpu_cpy;
|
||||||
|
|
||||||
void I_Error(const char *error, ...)
|
void I_Error(const char *error, ...)
|
||||||
{
|
{
|
||||||
(void)error;
|
(void)error;
|
||||||
|
|
Loading…
Reference in a new issue