dont need it as an extra file

This commit is contained in:
Alug committed 2024-01-28 19:16:04 +01:00
1 parent eca7e38763
commit 79bd89016c
4 files changed
+35 -83

No files matched your search

-1
View File
@@ -77,7 +77,6 @@
#include "../tables.h"
#include "r_opengl/r_opengl.h"
#include "../r_main.h" // for cv_fov
#include "../xs_Float.h"
#ifdef HAVE_SPHEREFRUSTRUM
static GLdouble viewMatrix[16];
+35
View File
@@ -268,6 +268,41 @@ 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);
-1
View File
@@ -32,7 +32,6 @@
#include "m_random.h" // quake camera shake
#include "doomstat.h" // MAXSPLITSCREENPLAYERS
#include "r_fps.h" // Frame interpolation/uncapped
#include "xs_Float.h"
#ifdef HWRENDER
#include "hardware/hw_main.h"
-81
View File
@@ -1,81 +0,0 @@
// ====================================================================================================================
// ====================================================================================================================
// xs_Float.h
//
// 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)
// xs_ToInt: Round toward zero, just like the C (int) cast
// xs_FloorToInt: Round down
// xs_CeilToInt: Round up
// xs_RoundToInt: Round toward nearest, but ties round up
// ====================================================================================================================
// ====================================================================================================================
#ifndef _xs_FLOAT_H_
#define _xs_FLOAT_H_
//#include "xs_Config.h"
// ====================================================================================================================
// Defines
// ====================================================================================================================
#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_
#ifdef __GNUC__
#define finline inline __attribute__ ((__always_inline__))
#else
#define finline __forceinline
#endif
typedef double real64;
typedef union _xs_doubleints
{
real64 val;
unsigned ival[2];
} _xs_doubleints;
// ====================================================================================================================
// ====================================================================================================================
// Inline implementation
// ====================================================================================================================
// ====================================================================================================================
finline 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
}
// ====================================================================================================================
// ====================================================================================================================
// Unsigned variants
// ====================================================================================================================
// ====================================================================================================================
finline unsigned xs_CRoundToUInt(real64 val)
{
return (unsigned)xs_CRoundToInt(val);
}
// ====================================================================================================================
// ====================================================================================================================
#endif // _xs_FLOAT_H_