From ff89372ac559674e3475bffb23f9c841954eb869 Mon Sep 17 00:00:00 2001 From: XProger Date: Tue, 17 Jul 2018 00:04:55 +0300 Subject: [PATCH] #129 fix Escape-130 decoder --- src/platform/win/OpenLara.vcxproj.user | 6 +++--- src/video.h | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/platform/win/OpenLara.vcxproj.user b/src/platform/win/OpenLara.vcxproj.user index 37c9869..c656139 100644 --- a/src/platform/win/OpenLara.vcxproj.user +++ b/src/platform/win/OpenLara.vcxproj.user @@ -1,17 +1,17 @@  - ../../../bin + C:\Projects\OpenLara\bin\TR3_PC WindowsLocalDebugger - ../../../bin + C:\Projects\OpenLara\bin\ WindowsLocalDebugger - ../../../bin + C:\Projects\OpenLara\bin\TR3_PC WindowsLocalDebugger diff --git a/src/video.h b/src/video.h index bcdd4d2..575c654 100644 --- a/src/video.h +++ b/src/video.h @@ -658,8 +658,10 @@ struct Video { for (int i = 0; i < 4; i++) Y[i] = clamp(luma + offsetLUT[diff] * signLUT[sign][i], 0U, 63U); - } else if (bs.readBit()) { - luma = bs.readBit() ? bs.read(6) : ((luma + lumaLUT[bs.read(3)]) & 63); + } else { + if (bs.readBit()) { + luma = bs.readBit() ? bs.read(6) : ((luma + lumaLUT[bs.read(3)]) & 63); + } for (int i = 0; i < 4; i++) Y[i] = luma;