aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2014-02-17 11:52:49 +0200
committerFilippos Karapetis2014-02-17 11:52:49 +0200
commit9addca7287b7e22f22d80ffc04077187a0693ad3 (patch)
treef52c7a00b6566d246927883fe66a0adc4594889a /engines/sci
parent474c45fdc6326d9f2bebea9fcc7df704e0951173 (diff)
downloadscummvm-rg350-9addca7287b7e22f22d80ffc04077187a0693ad3.tar.gz
scummvm-rg350-9addca7287b7e22f22d80ffc04077187a0693ad3.tar.bz2
scummvm-rg350-9addca7287b7e22f22d80ffc04077187a0693ad3.zip
SCI: Allow saving without a VERSION file in Jones
Apparently, the original does the same. Fixes bug #6535
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kfile.cpp7
2 files changed, 3 insertions, 6 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 39244bd760..71f1712d36 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -431,7 +431,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(RestartGame), SIG_EVERYWHERE, "", NULL, NULL },
{ MAP_CALL(RestoreGame), SIG_EVERYWHERE, "[r0]i[r0]", NULL, NULL },
{ MAP_CALL(Said), SIG_EVERYWHERE, "[r0]", NULL, NULL },
- { MAP_CALL(SaveGame), SIG_EVERYWHERE, "[r0]i[r0](r)", NULL, NULL },
+ { MAP_CALL(SaveGame), SIG_EVERYWHERE, "[r0]i[r0](r0)", NULL, NULL },
{ MAP_CALL(ScriptID), SIG_EVERYWHERE, "[io](i)", NULL, NULL },
{ MAP_CALL(SetCursor), SIG_SCI21, SIGFOR_ALL, "i(i)([io])(i*)", NULL, NULL },
// TODO: SCI2.1 may supply an object optionally (mother goose sci21 right on startup) - find out why
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index b940eca6f5..71e8ec6442 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -743,11 +743,11 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
savegameId = dialog->runModalWithCurrentTarget();
game_description = dialog->getResultString();
if (game_description.empty()) {
- // create our own description for the saved game, the user didnt enter it
+ // create our own description for the saved game, the user didn't enter it
game_description = dialog->createDefaultSaveDescription(savegameId);
}
delete dialog;
- g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save)
+ g_sci->_soundCmd->pauseAll(false); // unpause music (we can't have it paused during save)
if (savegameId < 0)
return NULL_REG;
@@ -849,8 +849,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
}
// don't adjust ID of the saved game, it's already correct
} else {
- if (argv[2].isNull())
- error("kRestoreGame: called with parameter 2 being NULL");
if (g_sci->getGameId() == GID_JONES) {
// Jones has one save slot only
savegameId = 0;
@@ -879,7 +877,6 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
in = saveFileMan->openForLoading(filename);
if (in) {
// found a savegame file
-
gamestate_restore(s, in);
delete in;