diff options
author | Matthew Hoops | 2010-12-07 18:15:07 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-12-07 18:15:07 +0000 |
commit | d06a3553411c8fb1a638f573f6ceb07a940569b9 (patch) | |
tree | 94fb6d8750c23c4299b3b037c3f93ba9bf64fc4d /engines/mohawk | |
parent | 9a0c20a45fe18f13d02f31c0201248521df8d8a5 (diff) | |
download | scummvm-rg350-d06a3553411c8fb1a638f573f6ceb07a940569b9.tar.gz scummvm-rg350-d06a3553411c8fb1a638f573f6ceb07a940569b9.tar.bz2 scummvm-rg350-d06a3553411c8fb1a638f573f6ceb07a940569b9.zip |
MOHAWK: Further limit where Myst can be saved
svn-id: r54812
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst.cpp | 20 | ||||
-rw-r--r-- | engines/mohawk/myst.h | 4 |
2 files changed, 22 insertions, 2 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index ed92f6081e..e9661f54df 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -1079,4 +1079,24 @@ Common::Error MohawkEngine_Myst::saveGameState(int slot, const char *desc) { return _saveLoad->saveGame(Common::String(desc)) ? Common::kNoError : Common::kUnknownError; } +bool MohawkEngine_Myst::canLoadGameStateCurrently() { + // No loading in the demo/makingof + return !(getFeatures() & GF_DEMO) && getGameType() != GType_MAKINGOF; +} + +bool MohawkEngine_Myst::canSaveGameStateCurrently() { + // There's a limited number of stacks the game can save in + switch (_curStack) { + case kChannelwoodStack: + case kDniStack: + case kMechanicalStack: + case kMystStack: + case kSeleniticStack: + case kStoneshipStack: + return true; + } + + return false; +} + } // End of namespace Mohawk diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h index 73be28d393..3601cc3f03 100644 --- a/engines/mohawk/myst.h +++ b/engines/mohawk/myst.h @@ -191,8 +191,8 @@ public: GUI::Debugger *getDebugger() { return _console; } - bool canLoadGameStateCurrently() { return !(getFeatures() & GF_DEMO); } - bool canSaveGameStateCurrently() { return !(getFeatures() & GF_DEMO); } + bool canLoadGameStateCurrently(); + bool canSaveGameStateCurrently(); Common::Error loadGameState(int slot); Common::Error saveGameState(int slot, const char *desc); bool hasFeature(EngineFeature f) const; |