Index: code/win32/win_shared.c =================================================================== --- code/win32/win_shared.c (revision 1140) +++ code/win32/win_shared.c (working copy) @@ -53,7 +53,14 @@ return sys_curtime; } - +#if !id386 +void Sys_SnapVector( float *v ) +{ + v[0] = rint(v[0]); + v[1] = rint(v[1]); + v[2] = rint(v[2]); +} +#else #ifndef __GNUC__ //see snapvectora.s /* ================ @@ -80,8 +87,8 @@ __asm fistp i; *v = i; } -#endif - +#endif // !__GNUC__ +#endif // !id386 qboolean Sys_RandomBytes( byte *string, int len ) { HCRYPTPROV prov; Index: code/qcommon/vm_x86.c =================================================================== --- code/qcommon/vm_x86.c (revision 1140) +++ code/qcommon/vm_x86.c (working copy) @@ -62,39 +62,27 @@ static int *instructionPointers = NULL; -#define FTOL_PTR +#ifndef C_ONLY + #define FTOL_PTR + #if defined( _MSC_VER ) || defined( __MINGW__ ) + // provided by msvcrt + int _ftol( float ); + static int ftolPtr = (int)_ftol; + #else + // in matha.s + int qftol0F7F( void ); + static int ftolPtr = (int)qftol0F7F; + #endif // _MSC_VER || __MINGW__ +#endif // C_ONLY #ifdef _MSC_VER + void AsmCall( void ); + static int asmCallPtr = (int)AsmCall; +#else + void doAsmCall( void ); + static int asmCallPtr = (int)doAsmCall; +#endif // _MSC_VER -#if defined( FTOL_PTR ) -int _ftol( float ); -static int ftolPtr = (int)_ftol; -#endif - -void AsmCall( void ); -static int asmCallPtr = (int)AsmCall; - -#else // _MSC_VER - -#if defined( FTOL_PTR ) -// bk001213 - BEWARE: does not work! UI menu etc. broken - stack! -// bk001119 - added: int gftol( float x ) { return (int)x; } - -int qftol( void ); // bk001213 - label, see unix/ftol.nasm -int qftol027F( void ); // bk001215 - fixed FPU control variants -int qftol037F( void ); -int qftol0E7F( void ); // bk010102 - fixed bogus bits (duh) -int qftol0F7F( void ); - - -static int ftolPtr = (int)qftol0F7F; -#endif // FTOL_PTR - -void doAsmCall( void ); -static int asmCallPtr = (int)doAsmCall; -#endif - - static int callMask = 0; // bk001213 - init static int instruction, pass;