From: eihrul Date: Sat, 29 Jan 2011 07:13:28 +0000 (+0000) Subject: added _USE_MATH_DEFINES for weird MSVC problem X-Git-Tag: xonotic-v0.5.0~438^2~65 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9658976be8da44e1ad67c7cd196776e73a55704c;p=xonotic%2Fdarkplaces.git added _USE_MATH_DEFINES for weird MSVC problem git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10776 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/dpsoftrast.c b/dpsoftrast.c index 6005fcdf..3ff70958 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -1,6 +1,7 @@ #include #include +#define _USE_MATH_DEFINES #include #include "quakedef.h" #include "dpsoftrast.h" @@ -3765,7 +3766,7 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numtriangles, const i y = _mm_cvtss_si32(mipedgetc); if (y > 0) { - y = (int)(log(y)/M_LN2); + y = (int)(log((float)y)/M_LN2); if (y > texture->mipmaps - 1) y = texture->mipmaps - 1; } @@ -3801,7 +3802,7 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numtriangles, const i case 0xF000: /*1110*/ edge0p = 3;edge0n = 0;edge1p = 3;edge1n = 2;break; case 0x0FFF: /*0001*/ edge0p = 2;edge0n = 3;edge1p = 0;edge1n = 3;break; case 0x0FF0: /*1001*/ edge0p = 2;edge0n = 3;edge1p = 1;edge1n = 0;break; - case 0x0F0F: /*0101*/ edge0p = 2;edge0n = 3;edge1p = 1;edge1n = 2;break; // concave - nonsense + case 0x0F0F: /*0101*/ edge0p = 2;edge0n = 3;edge1p = 2;edge1n = 1;break; // concave - nonsense case 0x0F00: /*1101*/ edge0p = 2;edge0n = 3;edge1p = 2;edge1n = 1;break; case 0x00FF: /*0011*/ edge0p = 1;edge0n = 2;edge1p = 0;edge1n = 3;break; case 0x00F0: /*1011*/ edge0p = 1;edge0n = 2;edge1p = 1;edge1n = 0;break;