diff options
author | lukaslw | 2014-11-09 02:42:48 +0100 |
---|---|---|
committer | lukaslw | 2014-11-09 02:42:48 +0100 |
commit | cb01dd36b62fca7b8bcd8d41d701f6f41b8249d8 (patch) | |
tree | 4d82813d2f3cc5b9d912e9b35a32413d45d0d5e1 | |
parent | d5938d25204f6d2bb2f97d9340db281742db8c5b (diff) | |
download | scummvm-rg350-cb01dd36b62fca7b8bcd8d41d701f6f41b8249d8.tar.gz scummvm-rg350-cb01dd36b62fca7b8bcd8d41d701f6f41b8249d8.tar.bz2 scummvm-rg350-cb01dd36b62fca7b8bcd8d41d701f6f41b8249d8.zip |
PRINCE: canLoadGameStateCurrently() - to check if loading is allowed
Also block saving during dialogbox and inventory drawing
-rw-r--r-- | engines/prince/saveload.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/engines/prince/saveload.cpp b/engines/prince/saveload.cpp index 65983f40de..46e598be70 100644 --- a/engines/prince/saveload.cpp +++ b/engines/prince/saveload.cpp @@ -177,7 +177,10 @@ bool PrinceEngine::canSaveGameStateCurrently() { if (_mainHero->_visible) { // 29 - Basement if (_locationNr != 29) { - return true; + // No dialog box and not in inventory + if (!_dialogFlag && !_showInventoryFlag) { + return true; + } } } } @@ -185,8 +188,18 @@ bool PrinceEngine::canSaveGameStateCurrently() { } bool PrinceEngine::canLoadGameStateCurrently() { - // Always true - return true; + if (_mouseFlag && _mouseFlag != 3) { + if (_mainHero->_visible) { + // 29 - Basement + if (_locationNr != 29) { + // No dialog box and not in inventory + if (!_dialogFlag && !_showInventoryFlag) { + return true; + } + } + } + } + return false; } Common::Error PrinceEngine::saveGameState(int slot, const Common::String &desc) { @@ -512,9 +525,6 @@ bool PrinceEngine::loadGame(int slotNumber) { syncGame(readStream, nullptr); delete readStream; - // TODO - //syncSpeechSettings(); - return true; } |