[Scummvm-cvs-logs] SF.net SVN: scummvm:[48062] scummvm/trunk/engines/mohawk

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Sun Feb 14 20:01:11 CET 2010


Revision: 48062
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48062&view=rev
Author:   tdhs
Date:     2010-02-14 19:01:02 +0000 (Sun, 14 Feb 2010)

Log Message:
-----------
Mohawk : Corrected Myst Opcode 200/300 in Intro/Demo stack to correctly call Intro movies.

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/myst.cpp
    scummvm/trunk/engines/mohawk/myst_scripts.cpp

Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp	2010-02-14 18:30:12 UTC (rev 48061)
+++ scummvm/trunk/engines/mohawk/myst.cpp	2010-02-14 19:01:02 UTC (rev 48062)
@@ -178,37 +178,11 @@
 	else
 		changeToStack(kIntroStack);
 
-	if (getGameType() == GType_MAKINGOF)
+	if (getFeatures() & GF_DEMO)
+		changeToCard(2000);
+	else
 		changeToCard(1);
-	else {
-		if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh) {
-			_video->playMovieCentered(wrapMovieFilename("mattel", kIntroStack));
-			_video->playMovieCentered(wrapMovieFilename("presto", kIntroStack));
-		} else
-			_video->playMovieCentered(wrapMovieFilename("broder", kIntroStack));
 
-		_video->playMovieCentered(wrapMovieFilename("cyanlogo", kIntroStack));
-
-		if (!(getFeatures() & GF_DEMO)) { // The demo doesn't have the intro video
-			if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh)
-				// intro.mov uses Sorenson, introc uses Cinepak. Otherwise, they're the same.
-				_video->playMovieCentered(wrapMovieFilename("introc", kIntroStack));
-			else
-				_video->playMovieCentered(wrapMovieFilename("intro", kIntroStack));
-		}
-
-		if (shouldQuit())
-			return Common::kNoError;
-
-		if (getFeatures() & GF_DEMO)
-			changeToCard(2001);
-		else {
-			// It should be card 1 for the full game eventually too, but it's not working
-			// there at the moment. Card 2 is the card with the book on the ground.
-			changeToCard(2);
-		}
-	}
-
 	// Load game from launcher/command line if requested
 	if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) {
 		uint32 gameToLoad = ConfMan.getInt("save_slot");

Modified: scummvm/trunk/engines/mohawk/myst_scripts.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst_scripts.cpp	2010-02-14 18:30:12 UTC (rev 48061)
+++ scummvm/trunk/engines/mohawk/myst_scripts.cpp	2010-02-14 19:01:02 UTC (rev 48062)
@@ -3113,6 +3113,10 @@
 
 	if (g_opcode200Parameters.enabled) {
 		switch (_vm->getCurStack()) {
+		case kIntroStack: // Used on Card 1
+		case kDemoStack: // Used on Card 2000
+			// TODO : Implement function here to play though intro movies and change card?
+			break;
 		case kSeleniticStack:
 			// Used on Card 1191 (Maze Runner)
 
@@ -3178,11 +3182,6 @@
 			// TODO: Fill in Function...
 			// Variable indicates that this is related to Secret Panel State
 			break;
-		case kDemoStack:
-			// Used on Card 2000
-
-			// TODO: Fill in Function...
-			break;
 		case kDemoSlidesStack:
 			// Used on Cards...
 			if (_vm->_system->getMillis() - g_opcode200Parameters.lastCardTime >= 2 * 1000)
@@ -3203,12 +3202,34 @@
 
 void MystScriptParser::opcode_200(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
 	switch (_vm->getCurStack()) {
-	case kIntroStack:
+	case kIntroStack: // Used on Card 1
+	case kDemoStack: // Used on Card 2000
 		varUnusedCheck(op, var);
 
-		// TODO: Play Intro Movies..
-		// and then _vm->changeToCard(2);
-		unknown(op, var, argc, argv);
+		// TODO : Clicking during the intro movies does not stop them and change to Card 5.
+		//        This is due to the movies playing blocking, but making them non-blocking causes
+		//        the card change here to prevent them playing. Need to move the following to the
+		//        opcode_200_run process and wait for all movies to finish playing before the card
+		//        change is performed.
+
+		// Play Intro Movies..
+		if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) {
+			_vm->_video->playMovieCentered(_vm->wrapMovieFilename("mattel", kIntroStack));
+			_vm->_video->playMovieCentered(_vm->wrapMovieFilename("presto", kIntroStack));
+		} else
+			_vm->_video->playMovieCentered(_vm->wrapMovieFilename("broder", kIntroStack));
+
+		_vm->_video->playMovieCentered(_vm->wrapMovieFilename("cyanlogo", kIntroStack));
+
+		if (!(_vm->getFeatures() & GF_DEMO)) { // The demo doesn't have the intro video
+			if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh)
+				// intro.mov uses Sorenson, introc uses Cinepak. Otherwise, they're the same.
+				_vm->_video->playMovieCentered(_vm->wrapMovieFilename("introc", kIntroStack));
+			else
+				_vm->_video->playMovieCentered(_vm->wrapMovieFilename("intro", kIntroStack));
+		}
+
+		_vm->changeToCard(_vm->getCurCard()+1);
 		break;
 	case kSeleniticStack:
 		varUnusedCheck(op, var);
@@ -3284,13 +3305,6 @@
 		} else
 			unknown(op, var, argc, argv);
 		break;
-	case kDemoStack:
-		// Used on Card 2000
-		if (argc == 0) {
-			g_opcode200Parameters.enabled = true;
-		} else
-			unknown(op, var, argc, argv);
-		break;
 	case kDemoSlidesStack:
 		// Used on Cards...
 		if (argc == 1) {
@@ -4665,8 +4679,8 @@
 	switch (_vm->getCurStack()) {
 	case kIntroStack:
 		varUnusedCheck(op, var);
-		// TODO: StopSound?
-		unknown(op, var, argc, argv);
+		// In the original engine, this opcode stopped Intro Movies if playing,
+		// upon card change, but this behaviour is now default in this engine.
 		break;
 	case kDemoPreviewStack:
 	case kMystStack:


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