]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.c
added GL_AlphaTest function to enable/disable GL_ALPHA_TEST
[xonotic/darkplaces.git] / image.c
diff --git a/image.c b/image.c
index 21e809ed8360ddd11a0c24f05261e578ef09c106..fbfe91d746fac34effabe1df123e3baf33499fde 100644 (file)
--- a/image.c
+++ b/image.c
@@ -754,7 +754,8 @@ unsigned char *loadimagepixels (const char *filename, qboolean complain, int mat
                        Mem_Free(f);
                        if (data)
                        {
-                               Con_DPrintf("loaded image %s (%dx%d)\n", name, image_width, image_height);
+                               if (developer.integer >= 10)
+                                       Con_Printf("loaded image %s (%dx%d)\n", name, image_width, image_height);
                                if (developer_memorydebug.integer)
                                        Mem_CheckSentinelsGlobal();
                                return data;
@@ -1402,9 +1403,9 @@ void Image_HeightmapToNormalmap(const unsigned char *inpixels, unsigned char *ou
                        n[2] = ibumpscale;
                        VectorNormalize(n);
                        */
-                       out[0] = 128.0f + n[0] * 127.0f;
-                       out[1] = 128.0f + n[1] * 127.0f;
-                       out[2] = 128.0f + n[2] * 127.0f;
+                       out[0] = (int)(128.0f + n[0] * 127.0f);
+                       out[1] = (int)(128.0f + n[1] * 127.0f);
+                       out[2] = (int)(128.0f + n[2] * 127.0f);
                        out[3] = (p0[0] + p0[1] + p0[2]) / 3;
                        out += 4;
                }