diff -up nogravity-2.00/rlx32/src/renderers/opengl/gl_v3x.cpp.gcc6 nogravity-2.00/rlx32/src/renderers/opengl/gl_v3x.cpp --- nogravity-2.00/rlx32/src/renderers/opengl/gl_v3x.cpp.gcc6 2006-01-07 01:19:54.000000000 +0100 +++ nogravity-2.00/rlx32/src/renderers/opengl/gl_v3x.cpp 2016-02-20 19:31:21.759831815 +0100 @@ -28,6 +28,7 @@ Prepared for public release: 02/24/2004 #include "v3xdefs.h" #include "v3xrend.h" #include "sysctrl.h" +#include #define PIPE_OPEN 1 @@ -514,7 +515,7 @@ static const V3XMATERIAL *pipe_pMat; #define SET_VTX() glVertex3f( fce->dispTab[i].x, fce->dispTab[i].y, 1.f - (fce->dispTab[i].z * g_fInvZFar)); -#define SET_DIFFUSE(i) glColor4ub(min(255, (pipe_pMat->ambient.r>>2) + xMUL8(fce->rgb[i].r, pipe_pMat->diffuse.r)), min(255, (pipe_pMat->ambient.g>>2) + xMUL8(fce->rgb[i].g, pipe_pMat->diffuse.g)), min(255, (pipe_pMat->ambient.b>>2) + xMUL8(fce->rgb[i].b, pipe_pMat->diffuse.b)), fce->rgb[i].a); +#define SET_DIFFUSE(i) glColor4ub(std::min(255u, (pipe_pMat->ambient.r>>2) + xMUL8(fce->rgb[i].r, pipe_pMat->diffuse.r)), std::min(255u, (pipe_pMat->ambient.g>>2) + xMUL8(fce->rgb[i].g, pipe_pMat->diffuse.g)), std::min(255u, (pipe_pMat->ambient.b>>2) + xMUL8(fce->rgb[i].b, pipe_pMat->diffuse.b)), fce->rgb[i].a); #define SET_CONSTANT() glColor4ub(pipe_pMat->diffuse.r, pipe_pMat->diffuse.b, pipe_pMat->diffuse.g, pipe_pMat->alpha);