diff options
author | Matthew Hoops | 2012-09-22 20:43:34 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-22 20:43:34 -0400 |
commit | 50747429cdd7746202902254a84742f771da4cb9 (patch) | |
tree | 4c3843b19163a38c3cca0063e0042c1cf0a29c58 /engines | |
parent | b9f6121194b2e4e6984daba86041b2cbe63be171 (diff) | |
download | scummvm-rg350-50747429cdd7746202902254a84742f771da4cb9.tar.gz scummvm-rg350-50747429cdd7746202902254a84742f771da4cb9.tar.bz2 scummvm-rg350-50747429cdd7746202902254a84742f771da4cb9.zip |
PEGASUS: Don't allow loading/saving in a few more places
Only affects loading/saving from the GMM
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pegasus/pegasus.cpp | 10 | ||||
-rw-r--r-- | engines/pegasus/pegasus.h | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 4402eb412f..4b1d7d73ae 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -193,6 +193,14 @@ Common::Error PegasusEngine::run() { return Common::kNoError; } +bool PegasusEngine::canLoadGameStateCurrently() { + return _loadAllowed && !isDemo(); +} + +bool PegasusEngine::canSaveGameStateCurrently() { + return _saveAllowed && !isDemo() && g_neighborhood; +} + bool PegasusEngine::detectOpeningClosingDirectory() { // We need to detect what our Opening/Closing directory is listed as // On the original disc, it was 'Opening/Closing' but only HFS(+) supports the slash @@ -1442,6 +1450,7 @@ void PegasusEngine::performJump(NeighborhoodID neighborhoodID) { // Sub chase is special if (neighborhoodID == kNoradSubChaseID) { throwAwayEverything(); + _loadAllowed = false; doSubChase(); if (shouldQuit()) @@ -1450,6 +1459,7 @@ void PegasusEngine::performJump(NeighborhoodID neighborhoodID) { neighborhoodID = kNoradDeltaID; GameState.setNextRoom(kNorad41); GameState.setNextDirection(kEast); + _loadAllowed = true; } Neighborhood *neighborhood; diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index 661f8e0f9d..d197e9b988 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -78,8 +78,8 @@ public: const PegasusGameDescription *_gameDescription; bool hasFeature(EngineFeature f) const; GUI::Debugger *getDebugger(); - bool canLoadGameStateCurrently() { return _loadAllowed && !isDemo(); } - bool canSaveGameStateCurrently() { return _saveAllowed && !isDemo(); } + bool canLoadGameStateCurrently(); + bool canSaveGameStateCurrently(); Common::Error loadGameState(int slot); Common::Error saveGameState(int slot, const Common::String &desc); |