aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-26 22:30:42 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitbfbc0ba0edc7a84e49660781d840035d4de7f076 (patch)
treef86397b148637cc3349ca157383e934bb7636448
parent2331a0e9fb3dfe335c15c470d3e7da49cc7ac5f7 (diff)
downloadscummvm-rg350-bfbc0ba0edc7a84e49660781d840035d4de7f076.tar.gz
scummvm-rg350-bfbc0ba0edc7a84e49660781d840035d4de7f076.tar.bz2
scummvm-rg350-bfbc0ba0edc7a84e49660781d840035d4de7f076.zip
GLK: FROTZ: Allow loading savegames from launcher
-rw-r--r--engines/glk/frotz/frotz.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/glk/frotz/frotz.cpp b/engines/glk/frotz/frotz.cpp
index 2ec7585057..69ca0a3530 100644
--- a/engines/glk/frotz/frotz.cpp
+++ b/engines/glk/frotz/frotz.cpp
@@ -48,6 +48,17 @@ void Frotz::runGame(Common::SeekableReadStream *gameFile) {
story_fp = gameFile;
initialize();
+ // If save was selected from the launcher, handle loading it
+ int saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
+ if (saveSlot != -1) {
+ bool success = loadGameState(saveSlot).getCode() == Common::kNoError;
+
+ if (h_version <= V3)
+ branch(success);
+ else
+ store(success);
+ }
+
// Game loop
interpret();