aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2008-05-07 03:49:53 +0000
committerSven Hesse2008-05-07 03:49:53 +0000
commit9d5eea2d2c3f79147b15fb7920cd6d5de8e15d44 (patch)
tree828ae2af338f062c2023b26d0c24d0d9d3e15ab5 /engines
parent5681ae1e82ba2c125928ecbfbd937cb187c06aa4 (diff)
downloadscummvm-rg350-9d5eea2d2c3f79147b15fb7920cd6d5de8e15d44.tar.gz
scummvm-rg350-9d5eea2d2c3f79147b15fb7920cd6d5de8e15d44.tar.bz2
scummvm-rg350-9d5eea2d2c3f79147b15fb7920cd6d5de8e15d44.zip
Sound in object videos works now, too
svn-id: r31916
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/mult_v2.cpp5
-rw-r--r--engines/gob/videoplayer.cpp12
-rw-r--r--engines/gob/videoplayer.h1
3 files changed, 17 insertions, 1 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 9045089632..5ff0612497 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -686,6 +686,11 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
return;
animLayer = _vm->_scenery->getAnimLayer(nAnim, nLayer);
+ } else {
+ if (animObj.videoSlot > 0) {
+ _vm->_video->retrace();
+ _vm->_vidPlayer->slotWaitEndFrame(animObj.videoSlot - 1, true);
+ }
}
if (animData.animType == 4) {
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index e088646498..6b21c18676 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -334,7 +334,7 @@ int VideoPlayer::slotOpen(const char *videoFile, Type which) {
}
video->getVideo()->setVideoMemory();
- video->getVideo()->disableSound();
+ video->getVideo()->enableSound(*_vm->_mixer);
_videoSlots.push_back(video);
@@ -388,6 +388,16 @@ void VideoPlayer::slotCopyPalette(int slot, int16 palStart, int16 palEnd) {
copyPalette(*(_videoSlots[slot]->getVideo()), palStart, palEnd);
}
+void VideoPlayer::slotWaitEndFrame(int slot, bool onlySound) {
+ if ((slot < 0) || (((uint) slot) >= _videoSlots.size()))
+ return;
+
+ CoktelVideo &video = *(_videoSlots[slot]->getVideo());
+
+ if (!onlySound || (video.getFeatures() & CoktelVideo::kFeaturesSound))
+ video.waitEndFrame();
+}
+
bool VideoPlayer::slotIsOpen(int slot) const {
if ((slot >= 0) && (((uint) slot) < _videoSlots.size()))
return true;
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index fd3c68aa1a..a04a0dbc9d 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -68,6 +68,7 @@ public:
uint16 left, uint16 top, uint16 width, uint16 height,
uint16 x, uint16 y, uint16 pitch, int16 transp = -1);
void slotCopyPalette(int slot, int16 palStart = -1, int16 palEnd = -1);
+ void slotWaitEndFrame(int slot, bool onlySound = false);
bool slotIsOpen(int slot) const;