From 1f12c3dd8e3b61ad41a5f05a1a4020e73f46e3c8 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 9 Mar 2010 03:18:31 +0000 Subject: [PATCH] - Whoops. DXT5 decompression got the alpha values wrong. That's "wrong" as in "garbage", since yalphaslice was never initialized to anything. (I should probably test this to make sure I actually got it right now...) SVN r2205 (trunk) --- src/textures/ddstexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textures/ddstexture.cpp b/src/textures/ddstexture.cpp index 3d68c41779..ab5b4505de 100644 --- a/src/textures/ddstexture.cpp +++ b/src/textures/ddstexture.cpp @@ -831,7 +831,7 @@ void FDDSTexture::DecompressDXT5 (FWadLump &lump, bool premultiplied, BYTE *tcbu break; } // Alpha values are stored in 3 bytes for 2 rows - if ((y & 0) == 0) + if ((y & 1) == 0) { yalphaslice = block[y*3] | (block[y*3+1] << 8) | (block[y*3+2] << 16); }