aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-05 08:22:05 -0400
committerPaul Gilbert2017-07-05 08:22:05 -0400
commitafe27c6de8ea2419e38fcc2e847bbc28d629c553 (patch)
treee86ee23cd64771dd158c3f3ddb288ecd1fe7e7b6
parent348edec17606c9412ed23efefad36c76c7feac03 (diff)
downloadscummvm-rg350-afe27c6de8ea2419e38fcc2e847bbc28d629c553.tar.gz
scummvm-rg350-afe27c6de8ea2419e38fcc2e847bbc28d629c553.tar.bz2
scummvm-rg350-afe27c6de8ea2419e38fcc2e847bbc28d629c553.zip
TITANIC: Don't allow GMM save/loading during cutscenes
-rw-r--r--engines/titanic/input_handler.h5
-rw-r--r--engines/titanic/titanic.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/input_handler.h b/engines/titanic/input_handler.h
index 5f0be04f1a..69434cda88 100644
--- a/engines/titanic/input_handler.h
+++ b/engines/titanic/input_handler.h
@@ -77,6 +77,11 @@ public:
* Handles a genereated mouse message
*/
void handleMessage(CMessage &msg, bool respectLock = true);
+
+ /**
+ * Returns true if input is locked
+ */
+ bool isLocked() const { return _lockCount > 0; }
};
} // End of namespace Titanic
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 1494a6a6a2..8a1b00c0fc 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -177,8 +177,13 @@ void TitanicEngine::setRoomNames() {
bool TitanicEngine::canLoadGameStateCurrently() {
CGameManager *gameManager = _window->_gameManager;
+ CScreenManager *screenMan = CScreenManager::_screenManagerPtr;
+
if (!_window->_inputAllowed || !gameManager->_gameState._petActive)
return false;
+ if (screenMan && screenMan->_inputHandler->isLocked())
+ return false;
+
CProjectItem *project = gameManager->_project;
if (project) {
CPetControl *pet = project->getPetControl();