aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-08-18 15:08:32 +0200
committeruruk2013-08-18 15:08:32 +0200
commitb5914349400b95ac646926e69e5e3acf2094eff2 (patch)
treecdda051ae89b206c9e0df3e03d4ddd91791791da /engines
parentc4891ace820ab47c5136e100adacd31418ea615a (diff)
downloadscummvm-rg350-b5914349400b95ac646926e69e5e3acf2094eff2.tar.gz
scummvm-rg350-b5914349400b95ac646926e69e5e3acf2094eff2.tar.bz2
scummvm-rg350-b5914349400b95ac646926e69e5e3acf2094eff2.zip
AVALANCHE: Add saving/loading during run time.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalanche.cpp20
-rw-r--r--engines/avalanche/avalanche.h10
2 files changed, 27 insertions, 3 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index b950bdb427..f8e873b2ae 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -123,7 +123,7 @@ Common::Platform AvalancheEngine::getPlatform() const {
bool AvalancheEngine::hasFeature(EngineFeature f) const {
- return false;
+ return (f == kSupportsSavingDuringRuntime) || (f == kSupportsLoadingDuringRuntime);
}
const char *AvalancheEngine::getCopyrightString() const {
@@ -132,6 +132,24 @@ const char *AvalancheEngine::getCopyrightString() const {
+bool AvalancheEngine::canSaveGameStateCurrently() {
+ return true;
+}
+
+Common::Error AvalancheEngine::saveGameState(int slot, const Common::String &desc) {
+ return Common::kNoError;
+}
+
+bool AvalancheEngine::canLoadGameStateCurrently() {
+ return true;
+}
+
+Common::Error AvalancheEngine::loadGameState(int slot, const Common::String &desc) {
+ return Common::kNoError;
+}
+
+
+
void AvalancheEngine::updateEvents() {
Common::Event event;
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 2f20393faf..a027dc5988 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -111,10 +111,16 @@ public:
bool hasFeature(EngineFeature f) const;
const char *getCopyrightString() const;
- void updateEvents();
- bool getEvent(Common::Event &event); // A warpper around _eventMan->pollEvent(), se we can use it in Scrolls::normscroll() for example.
+ virtual bool canSaveGameStateCurrently();
+ Common::Error saveGameState(int slot, const Common::String &desc);
+ virtual bool canLoadGameStateCurrently();
+ Common::Error loadGameState(int slot, const Common::String &desc);
+
+
+ void updateEvents();
+ bool getEvent(Common::Event &event); // A warpper around _eventMan->pollEvent(), se we can use it in Scrolls::normscroll() for example.
Common::Point getMousePos();
protected: