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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Thu Mar 11 07:15:23 CET 2010


Revision: 48234
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48234&view=rev
Author:   drmccoy
Date:     2010-03-11 06:15:23 +0000 (Thu, 11 Mar 2010)

Log Message:
-----------
Adding support for the early Fascination IMD format

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

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2010-03-11 06:14:52 UTC (rev 48233)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2010-03-11 06:15:23 UTC (rev 48234)
@@ -38,7 +38,7 @@
 
 namespace Gob {
 
-const char *VideoPlayer::_extensions[] = { "IMD", "VMD", "RMD", "SMD" };
+const char *VideoPlayer::_extensions[] = { "IMD", "IMD", "VMD", "RMD", "SMD" };
 
 VideoPlayer::Video::Video(GobEngine *vm) : _vm(vm), _stream(0), _video(0) {
 }
@@ -47,7 +47,7 @@
 	close();
 }
 
-bool VideoPlayer::Video::open(const char *fileName, Type which) {
+bool VideoPlayer::Video::open(const char *fileName, Type which, int16 width, int16 height) {
 	close();
 
 	int16 handle = _vm->_dataIO->openData(fileName);
@@ -61,6 +61,8 @@
 
 	if (which == kVideoTypeIMD) {
 		_video = new Graphics::Imd();
+	} else if (which == kVideoTypePreIMD) {
+		_video = new Graphics::PreImd(width, height);
 	} else if (which == kVideoTypeVMD) {
 		_video = new Graphics::Vmd(_vm->_video->_palLUT);
 	} else if (which == kVideoTypeRMD) {
@@ -223,7 +225,7 @@
 }
 
 bool VideoPlayer::primaryOpen(const char *videoFile, int16 x, int16 y,
-		int32 flags, Type which) {
+		int32 flags, Type which, int16 width, int16 height) {
 
 	char fileName[256];
 
@@ -233,7 +235,7 @@
 		return false;
 
 	if (scumm_strnicmp(_primaryVideo->getFileName(), fileName, strlen(fileName))) {
-		if (!_primaryVideo->open(fileName, which))
+		if (!_primaryVideo->open(fileName, which, width, height))
 			return false;
 
 		// WORKAROUND: In some rare cases, the cursor should still be
@@ -389,7 +391,7 @@
 	_primaryVideo->close();
 }
 
-int VideoPlayer::slotOpen(const char *videoFile, Type which) {
+int VideoPlayer::slotOpen(const char *videoFile, Type which, int16 width, int16 height) {
 	Video *video = new Video(_vm);
 	char fileName[256];
 
@@ -400,7 +402,7 @@
 		return -1;
 	}
 
-	if (!video->open(fileName, which)) {
+	if (!video->open(fileName, which, width, height)) {
 		delete video;
 		return -1;
 	}

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2010-03-11 06:14:52 UTC (rev 48233)
+++ scummvm/trunk/engines/gob/videoplayer.h	2010-03-11 06:15:23 UTC (rev 48234)
@@ -52,15 +52,17 @@
 	enum Type {
 		kVideoTypeTry = -1,
 		kVideoTypeIMD = 0,
-		kVideoTypeVMD = 1,
-		kVideoTypeRMD = 2
+		kVideoTypePreIMD = 1,
+		kVideoTypeVMD = 2,
+		kVideoTypeRMD = 3
 	};
 
 	VideoPlayer(GobEngine *vm);
 	~VideoPlayer();
 
 	bool primaryOpen(const char *videoFile, int16 x = -1, int16 y = -1,
-			int32 flags = kFlagFrontSurface, Type which = kVideoTypeTry);
+			int32 flags = kFlagFrontSurface, Type which = kVideoTypeTry,
+			int16 width = -1, int16 height = -1);
 	bool primaryPlay(int16 startFrame = -1, int16 lastFrame = -1,
 			int16 breakKey = kShortKeyEscape,
 			uint16 palCmd = 8, int16 palStart = 0, int16 palEnd = 255,
@@ -72,7 +74,8 @@
 			uint16 palCmd = 8, int16 palStart = 0, int16 palEnd = 255,
 			int16 palFrame = -1 , int16 endFrame = -1, bool noRetrace = false);
 
-	int slotOpen(const char *videoFile, Type which = kVideoTypeTry);
+	int slotOpen(const char *videoFile, Type which = kVideoTypeTry,
+			int16 width = -1, int16 height = -1);
 	void slotPlay(int slot, int16 frame = -1);
 	void slotClose(int slot);
 	void slotCopyFrame(int slot, byte *dest,
@@ -109,7 +112,7 @@
 			Video(GobEngine *vm);
 			~Video();
 
-			bool open(const char *fileName, Type which);
+			bool open(const char *fileName, Type which, int16 width, int16 height);
 			void close();
 
 			bool isOpen() 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