diff options
author | Max Horn | 2008-11-06 15:41:38 +0000 |
---|---|---|
committer | Max Horn | 2008-11-06 15:41:38 +0000 |
commit | 8f33d4a40aef337673fe98bb3b44be300fe697e6 (patch) | |
tree | 0c5dfe2ec185fa37b8d44b4ef24e67c938471a63 /engines/scumm | |
parent | edf9f249260b1fd4364f6727fa622991e81e8cf3 (diff) | |
download | scummvm-rg350-8f33d4a40aef337673fe98bb3b44be300fe697e6.tar.gz scummvm-rg350-8f33d4a40aef337673fe98bb3b44be300fe697e6.tar.bz2 scummvm-rg350-8f33d4a40aef337673fe98bb3b44be300fe697e6.zip |
Implemented GMM loading (and, once the GMM supports it, saving) for SCUMM
svn-id: r34913
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/detection.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 26 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 8 |
3 files changed, 35 insertions, 4 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index fc85e13250..6ca3406230 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -701,7 +701,10 @@ bool ScummMetaEngine::hasFeature(MetaEngineFeature f) const { } bool ScummEngine::hasFeature(EngineFeature f) const { - return (f == kSupportsRTL); + return + (f == kSupportsRTL) || + (f == kSupportsLoadingDuringRuntime) || + (f == kSupportsSavingDuringRuntime); } GameList ScummMetaEngine::getSupportedGames() const { diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 267e06dafd..bb8a6bac65 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -75,9 +75,31 @@ struct SaveInfoSection { #pragma mark - -void ScummEngine::requestSave(int slot, const char *name, bool temporary) { +int ScummEngine::loadGameState(int slot) { + requestLoad(slot); + return 0; +} + +bool ScummEngine::canLoadGameStateCurrently() { + // FIXME: For now always allow loading + return true; +} + +int ScummEngine::saveGameState(int slot, const char *desc) { + requestSave(slot, desc); + return 0; +} + +bool ScummEngine::canSaveGameStateCurrently() { + // FIXME: For now always allow saving + return true; + return 0; +} + + +void ScummEngine::requestSave(int slot, const char *name) { _saveLoadSlot = slot; - _saveTemporaryState = temporary; + _saveTemporaryState = false; _saveLoadFlag = 1; // 1 for save assert(name); strncpy(_saveLoadName, name, sizeof(_saveLoadName)); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index e12a99c0c9..80f5784351 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -449,6 +449,12 @@ public: virtual GUI::Debugger *getDebugger(); virtual bool hasFeature(EngineFeature f) const; virtual void syncSoundSettings(); + + virtual int loadGameState(int slot); + virtual bool canLoadGameStateCurrently(); + virtual int saveGameState(int slot, const char *desc); + virtual bool canSaveGameStateCurrently(); + virtual void pauseEngineIntern(bool pause); protected: @@ -628,7 +634,7 @@ public: bool getSavegameName(int slot, Common::String &desc); void listSavegames(bool *marks, int num); - void requestSave(int slot, const char *name, bool temporary = false); + void requestSave(int slot, const char *name); void requestLoad(int slot); // thumbnail + info stuff |