remove xs_CRoundToInt
while ye, less exact stuff doesent matter too much in the context of doom, it matters more in kart, due to polygon rendering and seg processing being extremely heavy and also generally more complex maps
This commit is contained in:
1 parent
c0c44d46bc
commit
751188bcd8
2 files changed
+1
-36
No files matched your search
@@ -339,7 +339,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle)
|
||||
floatangle = 2.0f + (45.0f + (tilt / 1.9f)) * clipfov / 90.0f;
|
||||
if (floatangle >= 180.0)
|
||||
return 0xffffffff;
|
||||
a1 = (angle_t)xs_CRoundToInt(ANG1 * floatangle);
|
||||
a1 = ANG1 * (int)floatangle;
|
||||
return a1;
|
||||
}
|
||||
|
||||
|
||||
@@ -260,41 +260,6 @@ typedef struct
|
||||
fixed_t y;
|
||||
} vector2_t;
|
||||
|
||||
// Source: "Know Your FPU: Fixing Floating Fast"
|
||||
// http://www.stereopsis.com/sree/fpu2006.html
|
||||
//
|
||||
// xs_CRoundToInt: Round toward nearest, but ties round toward even (just like FISTP)
|
||||
// taken from prboom+ for OpenGL big room fix
|
||||
#ifndef _xs_DEFAULT_CONVERSION
|
||||
#define _xs_DEFAULT_CONVERSION 0
|
||||
#endif //_xs_DEFAULT_CONVERSION
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define _xs_iexp_ 0
|
||||
#define _xs_iman_ 1
|
||||
#else
|
||||
#define _xs_iexp_ 1 //intel is little endian
|
||||
#define _xs_iman_ 0
|
||||
#endif //BigEndian_
|
||||
|
||||
typedef double real64;
|
||||
typedef union _xs_doubleints
|
||||
{
|
||||
real64 val;
|
||||
unsigned ival[2];
|
||||
} _xs_doubleints;
|
||||
|
||||
FUNCMATH FUNCINLINE ATTRINLINE int xs_CRoundToInt(real64 val)
|
||||
{
|
||||
#if _xs_DEFAULT_CONVERSION==0
|
||||
_xs_doubleints uval;
|
||||
uval.val = val + 6755399441055744.0;
|
||||
return uval.ival[_xs_iman_];
|
||||
#else
|
||||
return int(floor(val+.5));
|
||||
#endif
|
||||
}
|
||||
|
||||
vector2_t *FV2_Load(vector2_t *vec, fixed_t x, fixed_t y);
|
||||
vector2_t *FV2_UnLoad(vector2_t *vec, fixed_t *x, fixed_t *y);
|
||||
vector2_t *FV2_Copy(vector2_t *a_o, const vector2_t *a_i);
|
||||
|
||||
Reference in new issue
Block a user