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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Aug 8 03:05:47 CEST 2010


Revision: 51916
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51916&view=rev
Author:   drmccoy
Date:     2010-08-08 01:05:46 +0000 (Sun, 08 Aug 2010)

Log Message:
-----------
GOB: Handle VMD subtitles again

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

Modified: scummvm/trunk/engines/gob/scenery.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery.cpp	2010-08-08 01:05:16 UTC (rev 51915)
+++ scummvm/trunk/engines/gob/scenery.cpp	2010-08-08 01:05:46 UTC (rev 51916)
@@ -636,12 +636,9 @@
 			_vm->_vidPlayer->play(obj.videoSlot - 1, props);
 		}
 
-		/*
-		// Subtitle
-		Graphics::CoktelVideo::State state = _vm->_vidPlayer->getState(obj.videoSlot - 1);
-		if (state.flags & Graphics::CoktelVideo::kStateSpeech)
-			_vm->_draw->printTotText(state.speechId);
-		*/
+		int32 subtitle = _vm->_vidPlayer->getSubtitleIndex(obj.videoSlot - 1);
+		if (subtitle != -1)
+			_vm->_draw->printTotText(subtitle);
 
 		destX  = 0;
 		destY  = 0;

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2010-08-08 01:05:16 UTC (rev 51915)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2010-08-08 01:05:46 UTC (rev 51916)
@@ -380,11 +380,9 @@
 			// Only retrace if we're playing the frame we actually want to play
 			_vm->_video->retrace();
 
-		/*
-		// Subtitle
-		if (state.flags & Graphics::CoktelDecoder::kStateSpeech)
-			_vm->_draw->printTotText(state.speechId);
-		*/
+		int32 subtitle = video->decoder->getSubtitleIndex();
+		if (subtitle != -1)
+			_vm->_draw->printTotText(subtitle);
 
 		if (modifiedPal && ((properties.palCmd == 2) || (properties.palCmd == 4)))
 			_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0);
@@ -510,6 +508,14 @@
 	return video->decoder->getEmbeddedFile(fileName);
 }
 
+int32 VideoPlayer::getSubtitleIndex(int slot) const {
+	const Video *video = getVideoBySlot(slot);
+	if (!video)
+		return -1;
+
+	return video->decoder->getSubtitleIndex();
+}
+
 void VideoPlayer::writeVideoInfo(const Common::String &file, int16 varX, int16 varY,
 		int16 varFrames, int16 varWidth, int16 varHeight) {
 

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2010-08-08 01:05:16 UTC (rev 51915)
+++ scummvm/trunk/engines/gob/videoplayer.h	2010-08-08 01:05:46 UTC (rev 51916)
@@ -123,6 +123,8 @@
 	bool                      hasEmbeddedFile(const Common::String &fileName, int slot = 0) const;
 	Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName, int slot = 0);
 
+	int32 getSubtitleIndex(int slot = 0) const;
+
 	void writeVideoInfo(const Common::String &file, int16 varX, int16 varY,
 			int16 varFrames, int16 varWidth, int16 varHeight);
 


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