From 328c0d761f68853470ff88abda235c76b7f9532d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 8 Aug 2015 11:52:40 -0400 Subject: SHERLOCK: RT: Fix loading savegames when credits are active --- engines/sherlock/tattoo/tattoo_scene.cpp | 6 +++++- engines/sherlock/tattoo/widget_credits.cpp | 9 +++++++-- engines/sherlock/tattoo/widget_credits.h | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 3708eb08e5..20e495bb01 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 dcb73b5adb..b8e297709f 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 5c0504944e..d31c6ac216 100644 --- a/engines/sherlock/tattoo/widget_credits.h +++ b/engines/sherlock/tattoo/widget_credits.h @@ -61,6 +61,11 @@ public: */ void initCredits(); + /** + * Closes down credits display + */ + void close(); + /** * Draw credits on the screen */ -- cgit v1.2.3