diff options
author | Martin Kiewitz | 2010-08-02 21:44:41 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-02 21:44:41 +0000 |
commit | d42d7ad6c52ad90c53b510f10611cbbb6eb56f5b (patch) | |
tree | 8f255e49d150d8ffd7b153b1286923404b923e64 /engines | |
parent | 7da703f0af8cf85d7f961d43becee616dffa28aa (diff) | |
download | scummvm-rg350-d42d7ad6c52ad90c53b510f10611cbbb6eb56f5b.tar.gz scummvm-rg350-d42d7ad6c52ad90c53b510f10611cbbb6eb56f5b.tar.bz2 scummvm-rg350-d42d7ad6c52ad90c53b510f10611cbbb6eb56f5b.zip |
SCI: allowing kCheckSaveGame with id 0
qfg2 - when trying to restore from an empty saved game list
svn-id: r51663
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 4f0ad12285..39c32ccc68 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -488,6 +488,10 @@ reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { Common::Array<SavegameDesc> saves; listSavegames(saves); + // we allow 0 (happens in QfG2 when trying to restore from an empty saved game list) and return false in that case + if (virtualId == 0) + return NULL_REG; + // Find saved-game if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) error("kCheckSaveGame: called with invalid savegameId!"); @@ -502,7 +506,7 @@ reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { return NULL_REG; // Otherwise we assume the savegame is OK - return make_reg(0, 1); + return TRUE_REG; } reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index d8ea7ff7e1..336dd5343b 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -111,7 +111,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_QFG1, -1, 210, 0, "Encounter", "init", 0xbe4, 0, { WORKAROUND_FAKE, 0 } }, // qfg1: going to the brigands hideout { GID_QFG2, -1, 71, 0, "theInvSheet", "doit", -1, 1, { WORKAROUND_FAKE, 0 } }, // accessing the inventory { GID_QFG2, -1, 701, -1, "Alley", "at", -1, 0, { WORKAROUND_FAKE, 0 } }, // when walking inside the alleys in the town - bug #3035835 & #3038367 - { GID_QFG2, -1, 990, 0, "Restore", "doit", -1, 0, { WORKAROUND_FAKE, 0 } }, // when press enter in restore dialog w/o any saved games present + { GID_QFG2, -1, 990, 0, "Restore", "doit", -1, 364, { WORKAROUND_FAKE, 0 } }, // when press enter in restore dialog w/o any saved games present { GID_QFG3, 330, 330, 0, "rajahTeller", "doChild", -1, -1, { WORKAROUND_FAKE, 0 } }, // when talking to King Rajah about "Rajah" (bug #3036390, temp 1) or "Tarna" (temp 0) { GID_SQ1, 103, 103, 0, "hand", "internalEvent", -1, -1, { WORKAROUND_FAKE, 0 } }, // Spanish (and maybe early versions?) only: when moving cursor over input pad, temps 1 and 2 { GID_SQ1, -1, 703, 0, "", "export 1", -1, 0, { WORKAROUND_FAKE, 0 } }, // sub that's called from several objects while on sarien battle cruiser |