aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gob/inter_v6.cpp7
-rw-r--r--engines/gob/videoplayer.cpp10
-rw-r--r--engines/gob/videoplayer.h2
3 files changed, 12 insertions, 7 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index b6884c6fbe..9babcf9a45 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -234,14 +234,15 @@ bool Inter_v6::o6_loadCursor(OpFuncParams &params) {
int16 framesCount = _vm->_vidPlayer->getFrameCount(vmdSlot);
for (int i = 0; i < framesCount; i++) {
- props.startFrame = i;
- props.lastFrame = i;
+ props.startFrame = i;
+ props.lastFrame = i;
+ props.waitEndFrame = false;
_vm->_vidPlayer->play(vmdSlot, props);
_vm->_vidPlayer->copyFrame(vmdSlot, _vm->_draw->_cursorSprites->getData(),
0, 0, _vm->_draw->_cursorWidth, _vm->_draw->_cursorWidth,
(start + i) * _vm->_draw->_cursorWidth, 0,
- _vm->_draw->_cursorSprites->getWidth());
+ _vm->_draw->_cursorSprites->getWidth() * 2, 2);
}
_vm->_vidPlayer->closeVideo(vmdSlot);
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 1b1ed9eb2f..4bbb6a55ce 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -563,7 +563,7 @@ void VideoPlayer::writeVideoInfo(const Common::String &file, int16 varX, int16 v
bool VideoPlayer::copyFrame(int slot, byte *dest,
uint16 left, uint16 top, uint16 width, uint16 height,
- uint16 x, uint16 y, uint16 pitch, int16 transp) const {
+ uint16 x, uint16 y, uint16 pitch, uint8 bpp, int16 transp) const {
const Video *video = getVideoBySlot(slot);
if (!video)
@@ -573,6 +573,8 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
if (!surface)
return false;
+ assert(surface->bytesPerPixel == bpp);
+
int32 w = MIN<int32>(width , surface->w);
int32 h = MIN<int32>(height, surface->h);
@@ -585,7 +587,7 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
if ((x == 0) && (left == 0) && (pitch == surface->pitch) && (width == surface->w)) {
// Dimensions fit, we can copy everything at once
- memcpy(dst, src, w * h);
+ memcpy(dst, src, w * h * bpp);
return true;
}
@@ -595,7 +597,7 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
const byte *srcRow = src;
byte *dstRow = dst;
- memcpy(dstRow, srcRow, w);
+ memcpy(dstRow, srcRow, w * bpp);
src += surface->pitch;
dst += pitch;
@@ -606,6 +608,8 @@ bool VideoPlayer::copyFrame(int slot, byte *dest,
// Copy pixel-by-pixel
+ assert(bpp == 1);
+
while (h-- > 0) {
const byte *srcRow = src;
byte *dstRow = dst;
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index bdd6b4f0c5..408597f580 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -132,7 +132,7 @@ public:
bool copyFrame(int slot, byte *dest,
uint16 left, uint16 top, uint16 width, uint16 height,
- uint16 x, uint16 y, uint16 pitch, int16 transp = -1) const;
+ uint16 x, uint16 y, uint16 pitch, uint8 bpp = 1, int16 transp = -1) const;
private:
struct Video {