diff options
author | Sven Hesse | 2011-01-24 16:06:27 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-24 16:06:27 +0000 |
commit | 3e29897bb72da519c9ff4aa04488fcb0fe8ba131 (patch) | |
tree | b99d9f32259764291c2c3e0a1181d70a0bc2cfbb /video/coktel_decoder.cpp | |
parent | ffb3de5bc05cbc9ef1c7431bf43f157d30f17c00 (diff) | |
download | scummvm-rg350-3e29897bb72da519c9ff4aa04488fcb0fe8ba131.tar.gz scummvm-rg350-3e29897bb72da519c9ff4aa04488fcb0fe8ba131.tar.bz2 scummvm-rg350-3e29897bb72da519c9ff4aa04488fcb0fe8ba131.zip |
VIDEO: Fix a gfx glitch
Visible in some Inca 2 videos
svn-id: r55505
Diffstat (limited to 'video/coktel_decoder.cpp')
-rw-r--r-- | video/coktel_decoder.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index fd9c2be8ed..a4bf2d2e19 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -1377,7 +1377,10 @@ bool IMDDecoder::renderFrame(Common::Rect &rect) { if ((type == 2) && (rect.width() == _surface.w) && (_x == 0)) { // Directly uncompress onto the video surface - deLZ77((byte *)_surface.pixels + (_y * _surface.pitch), dataPtr, dataSize, + int offsetX = rect.left * _surface.bytesPerPixel; + int offsetY = (_y + rect.top) * _surface.pitch; + + deLZ77((byte *)_surface.pixels + offsetX + offsetY, dataPtr, dataSize, _surface.w * _surface.h * _surface.bytesPerPixel); return true; } @@ -2241,7 +2244,10 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) { if ((type == 2) && (rect.width() == _surface.w) && (_x == 0) && (_blitMode == 0)) { // Directly uncompress onto the video surface - deLZ77((byte *)_surface.pixels + (_y * _surface.pitch), dataPtr, dataSize, + int offsetX = rect.left * _surface.bytesPerPixel; + int offsetY = (_y + rect.top) * _surface.pitch; + + deLZ77((byte *)_surface.pixels + offsetX + offsetY, dataPtr, dataSize, _surface.w * _surface.h * _surface.bytesPerPixel); return true; } |