From e9455457a896aa5020d8e5ec3489b4580c5056b0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 8 Aug 2015 11:42:25 -0400 Subject: [PATCH] SHERLOCK: RT: Don't allow saving when credits are active --- engines/sherlock/tattoo/tattoo.cpp | 5 +++++ engines/sherlock/tattoo/tattoo.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp index 889a0429e7d..b11615a7937 100644 --- a/engines/sherlock/tattoo/tattoo.cpp +++ b/engines/sherlock/tattoo/tattoo.cpp @@ -194,6 +194,11 @@ void TattooEngine::saveConfig() { ConfMan.flushToDisk(); } +bool TattooEngine::canSaveGameStateCurrently() { + TattooUserInterface &ui = *(TattooUserInterface *)_ui; + return _canLoadSave && !ui._creditsWidget.active(); +} + } // End of namespace Tattoo } // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/tattoo.h b/engines/sherlock/tattoo/tattoo.h index 022a0ad8974..71872ab1b9d 100644 --- a/engines/sherlock/tattoo/tattoo.h +++ b/engines/sherlock/tattoo/tattoo.h @@ -101,6 +101,11 @@ public: * Save the game configuration */ virtual void saveConfig(); + + /** + * Returns true if the game can be saved + */ + virtual bool canSaveGameStateCurrently(); }; } // End of namespace Tattoo