VIDEO: Fix regression in Urban Runner videos.

This is a regression from 6fce92b0ea. Thanks to
DrMcCoy for tracking this down.
This commit is contained in:
Johannes Schickel 2013-08-04 01:07:34 +02:00
parent 604e1b0070
commit 8fc54d6d77

View File

@ -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++) {