aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 01:04:19 +0000
committerSven Hesse2010-08-08 01:04:19 +0000
commitf40b128bd9dc1356666ee81c5db9689aea762786 (patch)
tree342486f7f31d5d2013c7d0fa7c4e927ce9757285 /engines/gob/videoplayer.cpp
parentaf96a0fa3bfe0509efbdf99d15b1dd0d146f8968 (diff)
downloadscummvm-rg350-f40b128bd9dc1356666ee81c5db9689aea762786.tar.gz
scummvm-rg350-f40b128bd9dc1356666ee81c5db9689aea762786.tar.bz2
scummvm-rg350-f40b128bd9dc1356666ee81c5db9689aea762786.zip
GOB: Partly fixing VMD slot playing
svn-id: r51913
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index db82c9b965..d0d2f4309f 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -521,10 +521,10 @@ void VideoPlayer::writeVideoInfo(const Common::String &file, int16 varX, int16 v
int16 x = -1, y = -1, width = -1, height = -1;
- x = video.decoder->getDefaultX();
- y = video.decoder->getDefaultY();
- width = video.decoder->getWidth();
- width = video.decoder->getHeight();
+ x = video.decoder->getDefaultX();
+ y = video.decoder->getDefaultY();
+ width = video.decoder->getWidth();
+ height = video.decoder->getHeight();
if (VAR_OFFSET(varX) == 0xFFFFFFFF)
video.decoder->getFrameCoords(1, x, y, width, height);
@@ -535,6 +535,8 @@ void VideoPlayer::writeVideoInfo(const Common::String &file, int16 varX, int16 v
WRITE_VAR_OFFSET(varWidth , width);
WRITE_VAR_OFFSET(varHeight, height);
+ closeVideo(slot);
+
} else {
WRITE_VAR_OFFSET(varX , (uint32) -1);
WRITE_VAR_OFFSET(varY , (uint32) -1);
@@ -560,7 +562,7 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
int32 h = MIN<int32>(height, surface->h);
const byte *src = (byte*)surface->pixels + (top * surface->pitch) + left;
- byte *dst = dest + (y * pitch) + x;
+ byte *dst = dest + (y * pitch) + x;
if (transp < 0) {
// No transparency
@@ -578,10 +580,10 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
const byte *srcRow = src;
byte *dstRow = dst;
- memcpy(dst, src, w);
+ memcpy(dstRow, srcRow, w);
- srcRow += surface->pitch;
- dstRow += pitch;
+ src += surface->pitch;
+ dst += pitch;
}
return true;
@@ -597,8 +599,8 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
if (*srcRow != transp)
*dstRow = *srcRow;
- srcRow += surface->pitch;
- dstRow += pitch;
+ src += surface->pitch;
+ dst += pitch;
}
return true;