for (i = 3;i < size;i += 4)
if (ddspixels[i] < 255)
break;
- if (i < size)
- flags |= TEXF_ALPHA;
+ if (i >= size)
+ flags &= ~TEXF_ALPHA;
}
else if (!memcmp(dds+84, "DXT1", 4))
{
if (ddspixels[i+0] + ddspixels[i+1] * 256 <= ddspixels[i+2] + ddspixels[i+3] * 256)
break;
if (i < size)
- {
textype = TEXTYPE_DXT1A;
- flags |= TEXF_ALPHA;
- }
+ else
+ flags &= ~TEXF_ALPHA;
}
else if (!memcmp(dds+84, "DXT3", 4))
{
Con_Printf("^1%s: invalid DXT3 DDS image\n", filename);
return NULL;
}
- flags |= TEXF_ALPHA;
}
else if (!memcmp(dds+84, "DXT5", 4))
{
Con_Printf("^1%s: invalid DXT5 DDS image\n", filename);
return NULL;
}
- flags |= TEXF_ALPHA;
}
else
{