diff options
author | Einar Johan Trøan Sømåen | 2012-07-30 23:46:46 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-30 23:46:46 +0200 |
commit | 5a1fae94fb1e2d9f5caa21b7c9bad1457cbfc807 (patch) | |
tree | 8cd80ba32293c879439fbde92dd91e5e65cf3f5b | |
parent | 6330c1e5fdced523e1e245eac67754cd2b519c32 (diff) | |
download | scummvm-rg350-5a1fae94fb1e2d9f5caa21b7c9bad1457cbfc807.tar.gz scummvm-rg350-5a1fae94fb1e2d9f5caa21b7c9bad1457cbfc807.tar.bz2 scummvm-rg350-5a1fae94fb1e2d9f5caa21b7c9bad1457cbfc807.zip |
WINTERMUTE: Implement load from GMM.
-rw-r--r-- | engines/wintermute/base/base_persistence_manager.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/wintermute.cpp | 11 | ||||
-rw-r--r-- | engines/wintermute/wintermute.h | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index b6cd59328d..4236203292 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -89,7 +89,7 @@ BasePersistenceManager::BasePersistenceManager(const char *savePrefix, bool dele //////////////////////////////////////////////////////////////////////////
BasePersistenceManager::~BasePersistenceManager() {
cleanup();
- if (_deleteSingleton)
+ if (_deleteSingleton && BaseEngine::instance().getGameRef() == NULL)
BaseEngine::destroy();
}
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index 80b02f7db6..5ee98b8158 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -99,6 +99,8 @@ bool WinterMuteEngine::hasFeature(EngineFeature f) const { switch (f) { case kSupportsRTL: return true; + case kSupportsLoadingDuringRuntime: + return true; default: return false; } @@ -294,6 +296,15 @@ void WinterMuteEngine::deinit() { BaseEngine::destroy(); } +Common::Error WinterMuteEngine::loadGameState(int slot) { + BaseEngine::instance().getGameRef()->loadGame(slot); + return Common::kNoError; +} + +bool WinterMuteEngine::canLoadGameStateCurrently() { + return true; +} + bool WinterMuteEngine::getGameInfo(const Common::FSList &fslist, Common::String &name, Common::String &caption) { bool retVal = false; caption = name = "(invalid)"; diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h index 14c2ba2ab5..e9deea91d3 100644 --- a/engines/wintermute/wintermute.h +++ b/engines/wintermute/wintermute.h @@ -53,6 +53,8 @@ public: Common::SaveFileManager *getSaveFileMan() { return _saveFileMan; } SystemClassRegistry *getClassRegistry(){ return _classReg; } uint32 randInt(int from, int to); + virtual Common::Error loadGameState(int slot); + virtual bool canLoadGameStateCurrently(); // For detection-purposes: static bool getGameInfo(const Common::FSList &fslist, Common::String &name, Common::String &caption); private: |