[Scummvm-git-logs] scummvm master -> 9aeb4a356e886cb7a34adfebb3be46d445fcfc54
bgK
bastien.bouclet at gmail.com
Mon Jul 2 19:51:51 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:
9aeb4a356e MOHAWK: MYST: Always clear the screen before playing fullscreen movies
Commit: 9aeb4a356e886cb7a34adfebb3be46d445fcfc54
https://github.com/scummvm/scummvm/commit/9aeb4a356e886cb7a34adfebb3be46d445fcfc54
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-07-02T21:48:19+02:00
Commit Message:
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.
Changed paths:
engines/mohawk/myst.cpp
engines/mohawk/myst.h
engines/mohawk/myst_graphics.cpp
engines/mohawk/myst_graphics.h
engines/mohawk/myst_stacks/intro.cpp
engines/mohawk/myst_stacks/menu.cpp
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index c936046..bbd72be 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 96a3c22..3b349c3 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 7564927..8e557ab 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 c9fd8a7..03f5b76 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 57937c1..15c7195 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 ebcfb15..e3e9fea 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())
More information about the Scummvm-git-logs
mailing list