From df30c9d13185a525d2c45de3becd39c4a178f484 Mon Sep 17 00:00:00 2001 From: tma Date: Thu, 22 Sep 2005 03:21:33 +0000 Subject: * Port to MinGW git-svn-id: svn://svn.icculus.org/quake3/trunk@97 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/renderer/qgl.h | 3 +++ code/renderer/tr_font.c | 4 ++-- code/renderer/tr_shade_calc.c | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'code/renderer') diff --git a/code/renderer/qgl.h b/code/renderer/qgl.h index 3aa111a..e92b3d3 100644 --- a/code/renderer/qgl.h +++ b/code/renderer/qgl.h @@ -32,12 +32,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #elif defined( _WIN32 ) +#if _MSC_VER #pragma warning (disable: 4201) #pragma warning (disable: 4214) #pragma warning (disable: 4514) #pragma warning (disable: 4032) #pragma warning (disable: 4201) #pragma warning (disable: 4214) +#endif + #include #include diff --git a/code/renderer/tr_font.c b/code/renderer/tr_font.c index 5a0c839..1878025 100644 --- a/code/renderer/tr_font.c +++ b/code/renderer/tr_font.c @@ -311,12 +311,12 @@ typedef union { float readFloat( void ) { poor me; -#if __WORD_ORDER == __BIG_ENDIAN +#if defined BigFloat me.fred[0] = fdFile[fdOffset+3]; me.fred[1] = fdFile[fdOffset+2]; me.fred[2] = fdFile[fdOffset+1]; me.fred[3] = fdFile[fdOffset+0]; -#else +#elif defined LittleFloat me.fred[0] = fdFile[fdOffset+0]; me.fred[1] = fdFile[fdOffset+1]; me.fred[2] = fdFile[fdOffset+2]; diff --git a/code/renderer/tr_shade_calc.c b/code/renderer/tr_shade_calc.c index b97f674..ca6f07c 100644 --- a/code/renderer/tr_shade_calc.c +++ b/code/renderer/tr_shade_calc.c @@ -1025,10 +1025,14 @@ void RB_CalcRotateTexCoords( float degsPerSecond, float *st ) #if id386 && !( (defined __linux__ || defined __FreeBSD__ ) && (defined __i386__ ) ) // rb010123 long myftol( float f ) { +#ifndef __MINGW32__ static int tmp; __asm fld f __asm fistp tmp __asm mov eax, tmp +#else + return (long)f; +#endif } #endif -- cgit v1.2.3