[Scummvm-git-logs] scummvm master -> bc983b82af0aa705a702cfeb6e748fbec7c0df67
bgK
bastien.bouclet at gmail.com
Fri Nov 15 19:41:57 CET 2019
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:
bc983b82af MOHAWK: MYST: Loop the flyby movies and allow skipping using left click
Commit: bc983b82af0aa705a702cfeb6e748fbec7c0df67
https://github.com/scummvm/scummvm/commit/bc983b82af0aa705a702cfeb6e748fbec7c0df67
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-11-15T19:34:18+01:00
Commit Message:
MOHAWK: MYST: Loop the flyby movies and allow skipping using left click
Fixes #10599.
Changed paths:
engines/mohawk/myst.cpp
engines/mohawk/myst.h
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index b2d04e1..9d1a1e1 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -284,6 +284,7 @@ void MohawkEngine_Myst::playFlybyMovie(MystStack stack) {
// Play Flyby Entry Movie on Masterpiece Edition.
const char *flyby = nullptr;
+ bool looping = true;
switch (stack) {
case kSeleniticStack:
@@ -295,8 +296,10 @@ void MohawkEngine_Myst::playFlybyMovie(MystStack stack) {
// 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"))
+ if (ConfMan.getBool("playmystflyby")) {
flyby = "myst flyby";
+ looping = false;
+ }
break;
case kMechanicalStack:
flyby = "mech age flyby";
@@ -321,7 +324,36 @@ void MohawkEngine_Myst::playFlybyMovie(MystStack stack) {
}
video->center();
- waitUntilMovieEnds(video);
+ playSkippableMovie(video, looping);
+}
+
+void MohawkEngine_Myst::playSkippableMovie(const VideoEntryPtr &video, bool looping) {
+ _waitingOnBlockingOperation = true;
+
+ video->setLooping(true);
+
+ _cursor->setCursor(_mainCursor);
+
+ while ((looping || !video->endOfVideo()) && !shouldQuit()) {
+ doFrame();
+
+ // Allow skipping
+ if (_escapePressed) {
+ _escapePressed = false;
+ break;
+ }
+
+ if (_mouseClicked) {
+ _mouseClicked = false;
+ break;
+ }
+ }
+
+ _cursor->setCursor(0);
+
+ // Ensure it's removed
+ _video->removeEntry(video);
+ _waitingOnBlockingOperation = false;
}
void MohawkEngine_Myst::waitUntilMovieEnds(const VideoEntryPtr &video) {
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 27fa300..22e6982 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -172,6 +172,7 @@ public:
VideoEntryPtr findVideo(const Common::String &name, MystStack stack);
void playMovieBlocking(const Common::String &name, MystStack stack, uint16 x, uint16 y);
void playFlybyMovie(MystStack stack);
+ void playSkippableMovie(const VideoEntryPtr &video, bool looping);
void waitUntilMovieEnds(const VideoEntryPtr &video);
Common::String selectLocalizedMovieFilename(const Common::String &movieName);
More information about the Scummvm-git-logs
mailing list