It seems very common for dds images to have a rgb_bitcount of 32 even when they do not contain an alpha channel. Unfortunately I do not have a sample that I'm allowed to distribute but I have lots of them in the game files on my local hd. When this happens you have to skip one byte in ReadUncompressedRGB for every pixel, since it has to read 4 bytes instead of 3 for each pixel, as such:
Code: Select all
if (dds_info->pixelformat.rgb_bitcount == 32)
ReadBlobByte(image);
(after q->red = ...) This is of course not the most proper fix but a very quick one.
Actually the code should probably look at r_bitmask et al as well, though I've yet to encounter a file where those does not match the presumed ones.