aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/riven.cpp9
-rw-r--r--engines/mohawk/riven.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 252c994437..163785ee72 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -679,13 +679,17 @@ void MohawkEngine_Riven::loadGameStateAndDisplayError(int slot) {
}
Common::Error MohawkEngine_Riven::saveGameState(int slot, const Common::String &desc) {
+ return saveGameState(slot, desc, false);
+}
+
+Common::Error MohawkEngine_Riven::saveGameState(int slot, const Common::String &desc, bool autosave) {
if (_menuSavedStack != -1) {
_vars["CurrentStackID"] = _menuSavedStack;
_vars["CurrentCardID"] = _menuSavedCard;
}
const Graphics::Surface *thumbnail = _menuSavedStack != -1 ? _menuTumbnail.get() : nullptr;
- Common::Error error = _saveLoad->saveGame(slot, desc, thumbnail, false);
+ Common::Error error = _saveLoad->saveGame(slot, desc, thumbnail, autosave);
if (_menuSavedStack != -1) {
_vars["CurrentStackID"] = 1;
@@ -717,8 +721,7 @@ void MohawkEngine_Riven::tryAutoSaving() {
return; // Can't autosave ever, try again after the next autosave delay
}
- const Graphics::Surface *thumbnail = _menuSavedStack != -1 ? _menuTumbnail.get() : nullptr;
- Common::Error saveError = _saveLoad->saveGame(RivenSaveLoad::kAutoSaveSlot, "Autosave", thumbnail, true);
+ Common::Error saveError = saveGameState(RivenSaveLoad::kAutoSaveSlot, "Autosave", true);
if (saveError.getCode() != Common::kNoError)
warning("Attempt to autosave has failed.");
}
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 80ff6daea7..e2a11622a5 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -163,6 +163,7 @@ public:
void runSaveDialog();
void tryAutoSaving();
void loadGameStateAndDisplayError(int slot);
+ Common::Error saveGameState(int slot, const Common::String &desc, bool autosave);
void saveGameStateAndDisplayError(int slot, const Common::String &desc);
/**