[Scummvm-git-logs] scummvm master -> 7146df7e9e59792589eb70ef7046328d5bd8d737
bluegr
noreply at scummvm.org
Mon Jun 13 22:44:53 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7146df7e9e SCI: Disable ScummVM autosaves
Commit: 7146df7e9e59792589eb70ef7046328d5bd8d737
https://github.com/scummvm/scummvm/commit/7146df7e9e59792589eb70ef7046328d5bd8d737
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-06-14T01:44:24+03:00
Commit Message:
SCI: Disable ScummVM autosaves
Changed paths:
engines/sci/metaengine.cpp
engines/sci/sci.h
diff --git a/engines/sci/metaengine.cpp b/engines/sci/metaengine.cpp
index bc5c84a6408..c6af60afe93 100644
--- a/engines/sci/metaengine.cpp
+++ b/engines/sci/metaengine.cpp
@@ -280,6 +280,8 @@ public:
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
+ // Disable autosave (see mirrored method in sci.h for detailed explanation)
+ int getAutosaveSlot() const override { return -1; }
// A fallback detection method. This is not ideal as all detection lives in MetaEngine, but
// here fb detection has many engine dependencies.
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 42fa57acac8..fe89fed3d0f 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -153,6 +153,33 @@ public:
uint32 getTickCount();
void setTickCount(const uint32 ticks);
+ /**
+ * Disable support for ScummVM autosaves.
+ *
+ * A lot of SCI games already have an autosaving mechanism.
+ * Also, a lot of games have death screens when the player
+ * does something wrong, and autosaves could kick in when the
+ * death screen is shown, which makes them useless, since
+ * the player can only restore or restart.
+ *
+ * Another place where autosaves could kick in is during
+ * screens with internal loops, e.g. the inventory screen,
+ * where the autosave created would be invalid, as the internal
+ * loop isn't persisted in saved games.
+ *
+ * For now, we allow saving in places where the user has
+ * control via GuestAdditions::userHasControl(), but as
+ * mentioned above, these do not cover cases where the user
+ * does have control, but saving would either be useless (e.g.
+ * in death screens) or invalid saved would be created (e.g.
+ * while the inventory screen is open).
+ *
+ * In the future, if we are able to detect all death screens,
+ * all internal loops and generally all places where saving
+ * shouldn't be allowed, we could re-enable this feature.
+ */
+ int getAutosaveSlot() const override { return -1; }
+
const SciGameId &getGameId() const { return _gameId; }
const char *getGameIdStr() const;
Common::Language getLanguage() const;
More information about the Scummvm-git-logs
mailing list