From de1a35a9d9ae1ba7b9ce23e1a6beb782480a8aad Mon Sep 17 00:00:00 2001 From: David Fioramonti Date: Sat, 14 Jul 2018 04:52:58 -0700 Subject: 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. --- engines/groovie/groovie.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'engines/groovie/groovie.cpp') 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; } -- cgit v1.2.3