[Scummvm-cvs-logs] scummvm master -> 328c0d761f68853470ff88abda235c76b7f9532d
dreammaster
dreammaster at scummvm.org
Sat Aug 8 17:53:41 CEST 2015
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:
328c0d761f SHERLOCK: RT: Fix loading savegames when credits are active
Commit: 328c0d761f68853470ff88abda235c76b7f9532d
https://github.com/scummvm/scummvm/commit/328c0d761f68853470ff88abda235c76b7f9532d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-08-08T11:52:40-04:00
Commit Message:
SHERLOCK: RT: Fix loading savegames when credits are active
Changed paths:
engines/sherlock/tattoo/tattoo_scene.cpp
engines/sherlock/tattoo/widget_credits.cpp
engines/sherlock/tattoo/widget_credits.h
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index 3708eb0..20e495b 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -787,10 +787,14 @@ int TattooScene::findBgShape(const Common::Point &pt) {
void TattooScene::synchronize(Serializer &s) {
TattooEngine &vm = *(TattooEngine *)_vm;
+ TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
Scene::synchronize(s);
- if (s.isLoading())
+ if (s.isLoading()) {
+ // In case we were showing the intro prologue or the ending credits, stop them
vm._runningProlog = false;
+ ui._creditsWidget.close();
+ }
}
int TattooScene::closestZone(const Common::Point &pt) {
diff --git a/engines/sherlock/tattoo/widget_credits.cpp b/engines/sherlock/tattoo/widget_credits.cpp
index dcb73b5..b8e2977 100644
--- a/engines/sherlock/tattoo/widget_credits.cpp
+++ b/engines/sherlock/tattoo/widget_credits.cpp
@@ -113,6 +113,11 @@ void WidgetCredits::initCredits() {
delete stream;
}
+void WidgetCredits::close() {
+ _creditsActive = false;
+ _creditLines.clear();
+}
+
void WidgetCredits::drawCredits() {
Screen &screen = *_vm->_screen;
Common::Rect screenRect(0, 0, screen.w(), screen.h());
@@ -199,9 +204,9 @@ void WidgetCredits::eraseCredits() {
}
if (_creditLines[_creditLines.size() - 1]._position.y < -_creditSpeed) {
+ // Completely finished credits display. Note that the credits will still remain flagged as active,
+ // so that the user interface knows not to allow and standard scene interaction
_creditLines.clear();
- _creditsActive = false;
- _vm->setFlags(!3000);
}
}
diff --git a/engines/sherlock/tattoo/widget_credits.h b/engines/sherlock/tattoo/widget_credits.h
index 5c05049..d31c6ac 100644
--- a/engines/sherlock/tattoo/widget_credits.h
+++ b/engines/sherlock/tattoo/widget_credits.h
@@ -62,6 +62,11 @@ public:
void initCredits();
/**
+ * Closes down credits display
+ */
+ void close();
+
+ /**
* Draw credits on the screen
*/
void drawCredits();
More information about the Scummvm-git-logs
mailing list