Skip to content

Commit

Permalink
TITANIC: Don't allow GMM save/loading during cutscenes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jul 5, 2017
1 parent 348edec commit afe27c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engines/titanic/input_handler.h
Expand Up @@ -77,6 +77,11 @@ class CInputHandler {
* 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
Expand Down
5 changes: 5 additions & 0 deletions engines/titanic/titanic.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit afe27c6

Please sign in to comment.