Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
This commit is contained in:
parent
8ab958fab9
commit
40dfcee06e
24 changed files with 335 additions and 186 deletions
|
@ -3271,37 +3271,6 @@ void Com_Shutdown (void) {
|
|||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
|
||||
/*
|
||||
=====================
|
||||
Q_acos
|
||||
|
||||
the msvc acos doesn't always return a value between -PI and PI:
|
||||
|
||||
int i;
|
||||
i = 1065353246;
|
||||
acos(*(float*) &i) == -1.#IND0
|
||||
|
||||
This should go in q_math but it is too late to add new traps
|
||||
to game and ui
|
||||
=====================
|
||||
*/
|
||||
float Q_acos(float c) {
|
||||
float angle;
|
||||
|
||||
angle = acos(c);
|
||||
|
||||
if (angle > M_PI) {
|
||||
return (float)M_PI;
|
||||
}
|
||||
if (angle < -M_PI) {
|
||||
return (float)M_PI;
|
||||
}
|
||||
return angle;
|
||||
}
|
||||
|
||||
/*
|
||||
===========================================
|
||||
command line completion
|
||||
|
|
|
@ -1011,3 +1011,32 @@ int Q_isnan( float x )
|
|||
|
||||
return (int)( (unsigned int)fi.ui >> 31 );
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#ifndef Q3_VM
|
||||
/*
|
||||
=====================
|
||||
Q_acos
|
||||
|
||||
the msvc acos doesn't always return a value between -PI and PI:
|
||||
|
||||
int i;
|
||||
i = 1065353246;
|
||||
acos(*(float*) &i) == -1.#IND0
|
||||
|
||||
=====================
|
||||
*/
|
||||
float Q_acos(float c) {
|
||||
float angle;
|
||||
|
||||
angle = acos(c);
|
||||
|
||||
if (angle > M_PI) {
|
||||
return (float)M_PI;
|
||||
}
|
||||
if (angle < -M_PI) {
|
||||
return (float)M_PI;
|
||||
}
|
||||
return angle;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -73,6 +73,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
// for windows fastcall option
|
||||
#define QDECL
|
||||
#define QCALL
|
||||
|
||||
//================================================================= WIN64/32 ===
|
||||
|
||||
|
@ -84,6 +85,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#undef QDECL
|
||||
#define QDECL __cdecl
|
||||
|
||||
#undef QCALL
|
||||
#define QCALL __stdcall
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
#define OS_STRING "win_msvc64"
|
||||
#elif defined __MINGW64__
|
||||
|
@ -108,6 +112,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#undef QDECL
|
||||
#define QDECL __cdecl
|
||||
|
||||
#undef QCALL
|
||||
#define QCALL __stdcall
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
#define OS_STRING "win_msvc"
|
||||
#elif defined __MINGW32__
|
||||
|
@ -129,6 +136,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
//============================================================== MAC OS X ===
|
||||
|
||||
#if defined(MACOS_X) || defined(__APPLE_CC__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue