mipinfo[0][0] = glt->tilewidth;
mipinfo[0][1] = glt->tileheight;
mipmaps = 1;
- if (glt->flags & TEXF_MIPMAP)
+ if ((glt->flags & TEXF_MIPMAP) && !(glt->tilewidth == 1 && glt->tilewidth == 1))
{
for (mip = 1;mip < 16;mip++)
{
int mip, mipwidth, mipheight, mipsize, mipsize_total;
unsigned int c;
GLint oldbindtexnum = 0;
- const unsigned char *mippixels, *ddspixels, *mippixels_start;
+ const unsigned char *mippixels;
+ const unsigned char *mippixels_start;
+ unsigned char *ddspixels;
unsigned char *dds;
fs_offset_t ddsfilesize;
unsigned int ddssize;
bytesperblock = 8;
ddssize -= 128;
ddssize /= 2;
- for (i = 0;i < ddssize;i += bytesperblock)
+ for (i = 0;i < (int)ddssize;i += bytesperblock)
memcpy(&ddspixels[i], &ddspixels[(i<<1)+8], 8);
ddssize += 128;
}