[Scummvm-git-logs] scummvm master -> 3a8655bc815e7de3a789373021e74e33810ce701

bgK bastien.bouclet at gmail.com
Tue Apr 10 20:00:20 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3a8655bc81 MOHAWK: MYST: Fix flyby movies to behave more like the original


Commit: 3a8655bc815e7de3a789373021e74e33810ce701
    https://github.com/scummvm/scummvm/commit/3a8655bc815e7de3a789373021e74e33810ce701
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-04-10T19:58:56+02:00

Commit Message:
MOHAWK: MYST: Fix flyby movies to behave more like the original

* Keep playing the previously running background sound while playing the
  flyby.
* Don't play the flyby after loading a save.
* Play the flyby before both linking sounds.

Fixes #10482, Fixes #10483.

Changed paths:
    engines/mohawk/myst.cpp
    engines/mohawk/myst.h


diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 9103b03..11279ec 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -262,8 +262,38 @@ void MohawkEngine_Myst::playMovieBlocking(const Common::String &name, MystStack
 	waitUntilMovieEnds(video);
 }
 
-void MohawkEngine_Myst::playFlybyMovie(const Common::String &name) {
-	Common::String filename = wrapMovieFilename(name, kMasterpieceOnly);
+void MohawkEngine_Myst::playFlybyMovie(uint16 stack, uint16 card) {
+	// Play Flyby Entry Movie on Masterpiece Edition.
+	const char *flyby = nullptr;
+
+	switch (stack) {
+		case kSeleniticStack:
+			flyby = "selenitic flyby";
+			break;
+		case kStoneshipStack:
+			flyby = "stoneship flyby";
+			break;
+			// Myst Flyby Movie not used in Original Masterpiece Edition Engine
+			// We play it when first arriving on Myst, and if the user has chosen so.
+		case kMystStack:
+			if (ConfMan.getBool("playmystflyby"))
+				flyby = "myst flyby";
+			break;
+		case kMechanicalStack:
+			flyby = "mech age flyby";
+			break;
+		case kChannelwoodStack:
+			flyby = "channelwood flyby";
+			break;
+		default:
+			break;
+	}
+
+	if (!flyby) {
+		return;
+	}
+
+	Common::String filename = wrapMovieFilename(flyby, kMasterpieceOnly);
 	VideoEntryPtr video = _video->playMovie(filename, Audio::Mixer::kSFXSoundType);
 	if (!video) {
 		error("Failed to open the '%s' movie", filename.c_str());
@@ -486,20 +516,27 @@ void MohawkEngine_Myst::pauseEngineIntern(bool pause) {
 void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcSound, uint16 linkDstSound) {
 	debug(2, "changeToStack(%d)", stack);
 
-	_curStack = stack;
-
 	// Fill screen with black and empty cursor
 	_cursor->setCursor(0);
 	_currentCursor = 0;
 
+	_sound->stopEffect();
+	_video->stopVideos();
+
+	// In Myst ME, play a fullscreen flyby movie, except when loading saves.
+	// Also play a flyby when first linking to Myst.
+	if (getFeatures() & GF_ME
+			&& (_curStack != kIntroStack || (stack == kMystStack && card == 4134))) {
+		playFlybyMovie(stack, card);
+	}
+
+	_sound->stopBackground();
+
 	if (getFeatures() & GF_ME)
 		_system->fillScreen(_system->getScreenFormat().RGBToColor(0, 0, 0));
 	else
 		_gfx->clearScreenPalette();
 
-	_sound->stopEffect();
-	_sound->stopBackground();
-	_video->stopVideos();
 	if (linkSrcSound)
 		playSoundBlocking(linkSrcSound);
 
@@ -509,6 +546,8 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
 	delete _prevStack;
 	_prevStack = _scriptParser;
 
+	_curStack = stack;
+
 	switch (_curStack) {
 	case kChannelwoodStack:
 		_gameState->_globals.currentAge = 4;
@@ -576,38 +615,6 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
 	_cache.clear();
 	_gfx->clearCache();
 
-	if (getFeatures() & GF_ME) {
-		// Play Flyby Entry Movie on Masterpiece Edition.
-		const char *flyby = nullptr;
-
-		switch (_curStack) {
-		case kSeleniticStack:
-			flyby = "selenitic flyby";
-			break;
-		case kStoneshipStack:
-			flyby = "stoneship flyby";
-			break;
-		// Myst Flyby Movie not used in Original Masterpiece Edition Engine
-		// We play it when first arriving on Myst, and if the user has chosen so.
-		case kMystStack:
-			if (ConfMan.getBool("playmystflyby") && card == 4134)
-				flyby = "myst flyby";
-			break;
-		case kMechanicalStack:
-			flyby = "mech age flyby";
-			break;
-		case kChannelwoodStack:
-			flyby = "channelwood flyby";
-			break;
-		default:
-			break;
-		}
-
-		if (flyby) {
-			playFlybyMovie(flyby);
-		}
-	}
-
 	changeToCard(card, kTransitionCopy);
 
 	if (linkDstSound)
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 379110f..2758b7f 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -229,7 +229,7 @@ public:
 	VideoEntryPtr playMovie(const Common::String &name, MystStack stack);
 	VideoEntryPtr findVideo(const Common::String &name, MystStack stack);
 	void playMovieBlocking(const Common::String &name, MystStack stack, uint16 x, uint16 y);
-	void playFlybyMovie(const Common::String &name);
+	void playFlybyMovie(uint16 stack, uint16 card);
 	void waitUntilMovieEnds(const VideoEntryPtr &video);
 
 	void playSoundBlocking(uint16 id);





More information about the Scummvm-git-logs mailing list