aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2018-07-02 21:04:19 +0200
committerBastien Bouclet2018-07-02 21:48:19 +0200
commit9aeb4a356e886cb7a34adfebb3be46d445fcfc54 (patch)
tree45a11d9633ec3c4df62633f0ebc7c21cbaa0053b /engines
parent7df014ea6d63c8ebb831fda2aa69401c4544eebc (diff)
downloadscummvm-rg350-9aeb4a356e886cb7a34adfebb3be46d445fcfc54.tar.gz
scummvm-rg350-9aeb4a356e886cb7a34adfebb3be46d445fcfc54.tar.bz2
scummvm-rg350-9aeb4a356e886cb7a34adfebb3be46d445fcfc54.zip
MOHAWK: MYST: Always clear the screen before playing fullscreen movies
Fixes the broderbund logo movie being partially visible when the Cyan logo is playing. Fixes Trac#10595.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/myst.cpp19
-rw-r--r--engines/mohawk/myst.h1
-rw-r--r--engines/mohawk/myst_graphics.cpp7
-rw-r--r--engines/mohawk/myst_graphics.h1
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp9
-rw-r--r--engines/mohawk/myst_stacks/menu.cpp6
6 files changed, 26 insertions, 17 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index c936046a16..bbd72be956 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -230,6 +230,15 @@ VideoEntryPtr MohawkEngine_Myst::playMovie(const Common::String &name, MystStack
return video;
}
+VideoEntryPtr MohawkEngine_Myst::playMovieFullscreen(const Common::String &name, MystStack stack) {
+ _gfx->clearScreen();
+
+ VideoEntryPtr video = playMovie(name, stack);
+ video->center();
+ return video;
+}
+
+
VideoEntryPtr MohawkEngine_Myst::findVideo(const Common::String &name, MystStack stack) {
Common::String filename = wrapMovieFilename(name, stack);
return _video->findVideo(filename);
@@ -280,15 +289,14 @@ void MohawkEngine_Myst::playFlybyMovie(MystStack stack, uint16 card) {
return;
}
+ _gfx->clearScreen();
+
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());
}
- // Clear screen
- _system->fillScreen(_system->getScreenFormat().RGBToColor(0, 0, 0));
-
video->center();
waitUntilMovieEnds(video);
}
@@ -606,10 +614,7 @@ void MohawkEngine_Myst::changeToStack(MystStack stackId, uint16 card, uint16 lin
_sound->stopBackground();
- if (getFeatures() & GF_ME)
- _system->fillScreen(_system->getScreenFormat().RGBToColor(0, 0, 0));
- else
- _gfx->clearScreenPalette();
+ _gfx->clearScreen();
if (linkSrcSound)
playSoundBlocking(linkSrcSound);
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 96a3c22931..3b349c3d94 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -168,6 +168,7 @@ public:
bool getCacheState() { return _cache.enabled; }
VideoEntryPtr playMovie(const Common::String &name, MystStack stack);
+ VideoEntryPtr playMovieFullscreen(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(MystStack stack, uint16 card);
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 75649275f8..8e557abaef 100644
--- a/engines/mohawk/myst_graphics.cpp
+++ b/engines/mohawk/myst_graphics.cpp
@@ -884,4 +884,11 @@ void MystGraphics::replaceImageWithRect(uint16 destImage, uint16 sourceImage, co
addImageToCache(destImage, destSurface);
}
+void MystGraphics::clearScreen() {
+ if (_vm->getFeatures() & GF_ME)
+ _vm->_system->fillScreen(_pixelFormat.RGBToColor(0, 0, 0));
+ else
+ _vm->_system->fillScreen(0);
+}
+
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_graphics.h b/engines/mohawk/myst_graphics.h
index c9fd8a7865..03f5b76ce2 100644
--- a/engines/mohawk/myst_graphics.h
+++ b/engines/mohawk/myst_graphics.h
@@ -54,6 +54,7 @@ public:
void drawLine(const Common::Point &p1, const Common::Point &p2, uint32 color);
void fadeToBlack();
void fadeFromBlack();
+ void clearScreen();
void clearScreenPalette();
void setPaletteToScreen();
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index 57937c1bcc..15c7195fe1 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -99,8 +99,7 @@ void Intro::introMovies_run() {
switch (_introStep) {
case 0:
_introStep = 1;
- video = _vm->playMovie("broder", kIntroStack);
- video->center();
+ video = _vm->playMovieFullscreen("broder", kIntroStack);
break;
case 1:
if (!_vm->_video->isVideoPlaying())
@@ -108,8 +107,7 @@ void Intro::introMovies_run() {
break;
case 2:
_introStep = 3;
- video = _vm->playMovie("cyanlogo", kIntroStack);
- video->center();
+ video = _vm->playMovieFullscreen("cyanlogo", kIntroStack);
break;
case 3:
if (!_vm->_video->isVideoPlaying())
@@ -119,8 +117,7 @@ void Intro::introMovies_run() {
_introStep = 5;
if (!(_vm->getFeatures() & GF_DEMO)) { // The demo doesn't have the intro video
- video = _vm->playMovie("intro", kIntroStack);
- video->center();
+ video = _vm->playMovieFullscreen("intro", kIntroStack);
}
break;
case 5:
diff --git a/engines/mohawk/myst_stacks/menu.cpp b/engines/mohawk/myst_stacks/menu.cpp
index ebcfb15a65..e3e9feaa26 100644
--- a/engines/mohawk/myst_stacks/menu.cpp
+++ b/engines/mohawk/myst_stacks/menu.cpp
@@ -319,8 +319,7 @@ void Menu::introMovies_run() {
switch (_introStep) {
case 0:
_introStep = 1;
- video = _vm->playMovie("broder", kIntroStack);
- video->center();
+ video = _vm->playMovieFullscreen("broder", kIntroStack);
break;
case 1:
if (!_vm->_video->isVideoPlaying())
@@ -328,8 +327,7 @@ void Menu::introMovies_run() {
break;
case 2:
_introStep = 3;
- video = _vm->playMovie("cyanlogo", kIntroStack);
- video->center();
+ video = _vm->playMovieFullscreen("cyanlogo", kIntroStack);
break;
case 3:
if (!_vm->_video->isVideoPlaying())