From eb312ccb0a21afa8cf40879f3b9644b6962e4102 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 9 Sep 2013 14:16:45 -0400 Subject: [PATCH] Small refactor --- PVRTCEncoder/src/Decompressor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PVRTCEncoder/src/Decompressor.cpp b/PVRTCEncoder/src/Decompressor.cpp index a4b90ab..5bed541 100644 --- a/PVRTCEncoder/src/Decompressor.cpp +++ b/PVRTCEncoder/src/Decompressor.cpp @@ -174,11 +174,11 @@ namespace PVRTCC { const uint8 lerpVals[3] = { 8, 4, 0 }; uint8 modVal = b.GetLerpValue(texelIndex); - if(modVal == 2) { - modVal = 1; - punchThrough = true; - } else if(modVal == 3) { - modVal = 2; + if(modVal >= 2) { + if(modVal == 2) { + punchThrough = true; + } + modVal -= 1; } lerpVal = lerpVals[modVal];