diff options
Diffstat (limited to 'engines/prince/saveload.cpp')
-rw-r--r-- | engines/prince/saveload.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/engines/prince/saveload.cpp b/engines/prince/saveload.cpp index 39a4002b40..46e598be70 100644 --- a/engines/prince/saveload.cpp +++ b/engines/prince/saveload.cpp @@ -172,14 +172,34 @@ void PrinceMetaEngine::removeSaveState(const char *target, int slot) const { g_system->getSavefileManager()->removeSavefile(fileName); } -// TODO bool PrinceEngine::canSaveGameStateCurrently() { - 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; } -// TODO bool PrinceEngine::canLoadGameStateCurrently() { - 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) { @@ -480,7 +500,7 @@ bool PrinceEngine::loadGame(int slotNumber) { saveFile->read(dataBuffer, size); readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES); delete saveFile; - + // Check to see if it's a ScummVM savegame or not char buffer[kSavegameStrSize + 1]; readStream->read(buffer, kSavegameStrSize + 1); @@ -505,9 +525,6 @@ bool PrinceEngine::loadGame(int slotNumber) { syncGame(readStream, nullptr); delete readStream; - // TODO - //syncSpeechSettings(); - return true; } |