aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/titanic.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-09-05 23:01:12 -0400
committerPaul Gilbert2017-09-05 23:01:12 -0400
commitaa3adfb4b12bcfac20aa3caf2d424a3d9e3e24fc (patch)
treee7689beb83d04acce3842ea6e1fd066f80de4cc7 /engines/titanic/titanic.cpp
parentd5cfa3f2be047975623162d880cd3267c10764d3 (diff)
downloadscummvm-rg350-aa3adfb4b12bcfac20aa3caf2d424a3d9e3e24fc.tar.gz
scummvm-rg350-aa3adfb4b12bcfac20aa3caf2d424a3d9e3e24fc.tar.bz2
scummvm-rg350-aa3adfb4b12bcfac20aa3caf2d424a3d9e3e24fc.zip
TITANIC: Allow GMM loading from the copyright and continue dialog
Diffstat (limited to 'engines/titanic/titanic.cpp')
-rw-r--r--engines/titanic/titanic.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 9c05a13d81..5af822a235 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -69,6 +69,7 @@ TitanicEngine::TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDe
_scriptHandler = nullptr;
_script = nullptr;
CMusicRoom::_musicHandler = nullptr;
+ _loadSaveSlot = -1;
// Set up debug channels
DebugMan.addDebugChannel(kDebugCore, "core", "Core engine debug level");
@@ -188,12 +189,16 @@ void TitanicEngine::setRoomNames() {
bool TitanicEngine::canLoadGameStateCurrently() {
CGameManager *gameManager = _window->_gameManager;
CScreenManager *screenMan = CScreenManager::_screenManagerPtr;
+
+ if (!gameManager)
+ // Allow loading from copyright screen and continue dialogs
+ return true;
if (!_window->_inputAllowed)
return false;
if (screenMan && screenMan->_inputHandler->isLocked())
return false;
- if (!gameManager || !gameManager->isntTransitioning())
+ if (!gameManager->isntTransitioning())
return false;
CProjectItem *project = gameManager->_project;
@@ -220,7 +225,11 @@ bool TitanicEngine::canSaveGameStateCurrently() {
}
Common::Error TitanicEngine::loadGameState(int slot) {
- _window->_project->loadGame(slot);
+ CGameManager *gameManager = _window->_gameManager;
+ if (!gameManager)
+ _loadSaveSlot = slot;
+ else
+ _window->_project->loadGame(slot);
return Common::kNoError;
}