[Scummvm-cvs-logs] SF.net SVN: scummvm: [31916] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Wed May 7 05:49:53 CEST 2008


Revision: 31916
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31916&view=rev
Author:   drmccoy
Date:     2008-05-06 20:49:53 -0700 (Tue, 06 May 2008)

Log Message:
-----------
Sound in object videos works now, too

Modified Paths:
--------------
    scummvm/trunk/engines/gob/mult_v2.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/engines/gob/videoplayer.h

Modified: scummvm/trunk/engines/gob/mult_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/mult_v2.cpp	2008-05-07 02:56:18 UTC (rev 31915)
+++ scummvm/trunk/engines/gob/mult_v2.cpp	2008-05-07 03:49:53 UTC (rev 31916)
@@ -686,6 +686,11 @@
 			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) {

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2008-05-07 02:56:18 UTC (rev 31915)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2008-05-07 03:49:53 UTC (rev 31916)
@@ -334,7 +334,7 @@
 	}
 
 	video->getVideo()->setVideoMemory();
-	video->getVideo()->disableSound();
+	video->getVideo()->enableSound(*_vm->_mixer);
 
 	_videoSlots.push_back(video);
 
@@ -388,6 +388,16 @@
 	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;

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2008-05-07 02:56:18 UTC (rev 31915)
+++ scummvm/trunk/engines/gob/videoplayer.h	2008-05-07 03:49:53 UTC (rev 31916)
@@ -68,6 +68,7 @@
 			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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list