]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
fix compile errors and warnings in MSVC
[xonotic/darkplaces.git] / vid_shared.c
index 4236bb766f4fd08cc55b1091d8553a141840d675..85d3ec372091a986ddc3a655de0d39d54a441541 100644 (file)
@@ -199,8 +199,6 @@ cvar_t v_glslgamma = {CVAR_SAVE, "v_glslgamma", "1", "enables use of GLSL to app
 cvar_t v_glslgamma_2d = {CVAR_SAVE, "v_glslgamma_2d", "0", "applies GLSL gamma to 2d pictures (HUD, fonts)"};
 cvar_t v_psycho = {0, "v_psycho", "0", "easter egg"};
 
-extern cvar_t r_viewfbo;
-
 // brand of graphics chip
 const char *gl_vendor;
 // graphics chip model and other information
@@ -1413,7 +1411,7 @@ void VID_BuildGammaTables(unsigned short *ramps, int rampsize)
        {
                int i;
                for(i = 0; i < 3*rampsize; ++i)
-                       ramps[i] = (int)floor(bound(0.0f, Image_sRGBFloatFromLinearFloat(ramps[i] / 65535.0), 1.0f) * 65535.0 + 0.5);
+                       ramps[i] = (int)floor(bound(0.0f, Image_sRGBFloatFromLinearFloat(ramps[i] / 65535.0f), 1.0f) * 65535.0f + 0.5f);
        }
 
        // LordHavoc: this code came from Ben Winslow and Zinx Verituse, I have