diff options
author | Johannes Schickel | 2013-08-04 01:07:34 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-04 01:07:34 +0200 |
commit | 8fc54d6d77d36c18c22272e2dc3d70414f195e0c (patch) | |
tree | ffa6fbc929b25512df0351f69c2b1c4ebc8e6516 /video | |
parent | 604e1b00701c4a01031a06f175b88107710cbd32 (diff) | |
download | scummvm-rg350-8fc54d6d77d36c18c22272e2dc3d70414f195e0c.tar.gz scummvm-rg350-8fc54d6d77d36c18c22272e2dc3d70414f195e0c.tar.bz2 scummvm-rg350-8fc54d6d77d36c18c22272e2dc3d70414f195e0c.zip |
VIDEO: Fix regression in Urban Runner videos.
This is a regression from 6fce92b0ea2fce78c375ade0bc6c2ac4231b96bd. Thanks to
DrMcCoy for tracking this down.
Diffstat (limited to 'video')
-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 40ac035582..024e479bf7 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -2399,7 +2399,10 @@ void VMDDecoder::blit16(const Graphics::Surface &srcSurf, Common::Rect &rect) { Graphics::PixelFormat pixelFormat = getPixelFormat(); - const byte *src = (const byte *)srcSurf.getBasePtr(srcRect.left, srcRect.top); + // We cannot use getBasePtr here because srcSurf.format.bytesPerPixel is + // different from _bytesPerPixel. + const byte *src = (const byte *)srcSurf.getPixels() + + (srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel; byte *dst = (byte *)_surface.getBasePtr(_x + rect.left, _y + rect.top); for (int i = 0; i < rect.height(); i++) { @@ -2437,7 +2440,10 @@ void VMDDecoder::blit24(const Graphics::Surface &srcSurf, Common::Rect &rect) { Graphics::PixelFormat pixelFormat = getPixelFormat(); - const byte *src = (const byte *)srcSurf.getBasePtr(srcRect.left, srcRect.top); + // We cannot use getBasePtr here because srcSurf.format.bytesPerPixel is + // different from _bytesPerPixel. + const byte *src = (const byte *)srcSurf.getPixels() + + (srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel; byte *dst = (byte *)_surface.getBasePtr(_x + rect.left, _y + rect.top); for (int i = 0; i < rect.height(); i++) { |