aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie/groovie.cpp
diff options
context:
space:
mode:
authorDavid Fioramonti2018-07-14 04:52:58 -0700
committerEugene Sandulenko2018-08-03 14:53:43 +0200
commitde1a35a9d9ae1ba7b9ce23e1a6beb782480a8aad (patch)
treee98099ec20f1cdd2856872953d5011ef4bd4a8dd /engines/groovie/groovie.cpp
parent78e165ed22f97c8d1a20bf2bc7622fa32a3003de (diff)
downloadscummvm-rg350-de1a35a9d9ae1ba7b9ce23e1a6beb782480a8aad.tar.gz
scummvm-rg350-de1a35a9d9ae1ba7b9ce23e1a6beb782480a8aad.tar.bz2
scummvm-rg350-de1a35a9d9ae1ba7b9ce23e1a6beb782480a8aad.zip
GROOVIE: Allow saving via GMM and increase save slots to 25
If the user enters in an invalid description for the save then it will be simplified by the saved name cache process in Script::savegame. I checked this with t7g, but not with the 11th guest or any other Groovie game. The original in-game loading/saving can still only access the first 10 save slots (0-9). Its possible to saving via the GMM when the game is interactive. Loading a game saved via the gui using the original in-game load menu works fine. Saving via the GMM with timestamp works, but only only saves the characters up to the first non-alpha non-letter characer.
Diffstat (limited to 'engines/groovie/groovie.cpp')
-rw-r--r--engines/groovie/groovie.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 291e3a1fde..672c440e44 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -350,6 +350,7 @@ Common::Platform GroovieEngine::getPlatform() const {
bool GroovieEngine::hasFeature(EngineFeature f) const {
return
(f == kSupportsRTL) ||
+ (f == kSupportsSavingDuringRuntime) ||
(f == kSupportsLoadingDuringRuntime);
}
@@ -372,7 +373,18 @@ void GroovieEngine::syncSoundSettings() {
bool GroovieEngine::canLoadGameStateCurrently() {
// TODO: verify the engine has been initialized
- return true;
+ if (_script)
+ return true;
+ else
+ return false;
+}
+
+bool GroovieEngine::canSaveGameStateCurrently() {
+ // TODO: verify the engine has been initialized
+ if (_script)
+ return true;
+ else
+ return false;
}
Common::Error GroovieEngine::loadGameState(int slot) {
@@ -382,6 +394,13 @@ Common::Error GroovieEngine::loadGameState(int slot) {
return Common::kNoError;
}
+Common::Error GroovieEngine::saveGameState(int slot, const Common::String &desc) {
+ _script->directGameSave(slot,desc);
+
+ // TODO: Use specific error codes
+ return Common::kNoError;
+}
+
void GroovieEngine::waitForInput() {
_waitingForInput = true;
}