#include "quakedef.h"
-cvar_t r_max_size = {"r_max_size", "2048"};
-cvar_t r_picmip = {"r_picmip", "0"};
-cvar_t r_lerpimages = {"r_lerpimages", "1"};
-cvar_t r_upload = {"r_upload", "1"};
-cvar_t r_precachetextures = {"r_precachetextures", "1", true};
+cvar_t r_max_size = {0, "r_max_size", "2048"};
+cvar_t r_picmip = {0, "r_picmip", "0"};
+cvar_t r_lerpimages = {CVAR_SAVE, "r_lerpimages", "1"};
+cvar_t r_upload = {0, "r_upload", "1"};
+cvar_t r_precachetextures = {CVAR_SAVE, "r_precachetextures", "1"};
int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR; //NEAREST;
int gl_filter_max = GL_LINEAR;
inrow = (int *)indata + inwidth*(i*inheight/outheight);
frac = fracstep >> 1;
j = outwidth - 4;
- while(j >= 0)
+ while (j >= 0)
{
out[0] = inrow[frac >> 16];frac += fracstep;
out[1] = inrow[frac >> 16];frac += fracstep;
out[2] = inrow[frac >> 16];frac += fracstep;
out[3] = inrow[frac >> 16];frac += fracstep;
out += 4;
- j--;
+ j -= 4;
}
if (j & 2)
{
if (!identifier[0])
Host_Error("R_LoadTexture: no identifier\n");
+ if (data == NULL)
+ Host_Error("R_LoadTexture: \"%s\" has no data\n", identifier);
// clear the alpha flag if the texture has no transparent pixels
if (flags & TEXF_ALPHA)