aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-11 17:57:13 +0000
committerFilippos Karapetis2008-11-11 17:57:13 +0000
commit0414a78a65b3ae843ffa69f6966682498d3c32eb (patch)
treea938e619dc28f21968628ff75d2b2ceb942bd116 /engines
parent113a83c0da91cafdb2b3c9d73094a801311c940f (diff)
downloadscummvm-rg350-0414a78a65b3ae843ffa69f6966682498d3c32eb.tar.gz
scummvm-rg350-0414a78a65b3ae843ffa69f6966682498d3c32eb.tar.bz2
scummvm-rg350-0414a78a65b3ae843ffa69f6966682498d3c32eb.zip
Added save/load support from the GMM for the touche engine
svn-id: r35008
Diffstat (limited to 'engines')
-rw-r--r--engines/touche/detection.cpp4
-rw-r--r--engines/touche/touche.cpp8
-rw-r--r--engines/touche/touche.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index d37bd0775e..4e81eb9c1e 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -153,7 +153,9 @@ bool ToucheMetaEngine::hasFeature(MetaEngineFeature f) const {
bool Touche::ToucheEngine::hasFeature(EngineFeature f) const {
return
- (f == kSupportsRTL);
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
}
bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 0033d80cb2..be211a34a1 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -3286,4 +3286,12 @@ void ToucheEngine::updatePalette() {
_system->setPalette(_paletteBuffer, 0, 256);
}
+bool ToucheEngine::canLoadGameStateCurrently() {
+ return (_flagsTable[618] == 0 && !_hideInventoryTexts);
+}
+
+bool ToucheEngine::canSaveGameStateCurrently() {
+ return (_flagsTable[618] == 0 && !_hideInventoryTexts);
+}
+
} // namespace Touche
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index b5256a9d8f..475104f35a 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -499,6 +499,8 @@ protected:
void loadGameStateData(Common::ReadStream *stream);
Common::Error saveGameState(int num, const char *description);
Common::Error loadGameState(int num);
+ bool canLoadGameStateCurrently();
+ bool canSaveGameStateCurrently();
void readGameStateDescription(int num, char *description, int len);
void generateGameStateFileName(int num, char *dst, int len, bool prefixOnly = false) const;
int getGameStateFileSlot(const char *filename) const;