aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2011-10-30 12:07:10 +0200
committerFilippos Karapetis2011-10-30 21:42:32 +0200
commitacebd6d0be60c25c4e7b157f3dc04afe5fcbb535 (patch)
tree27b64fd4e86c6d0d7b7769084dd4938d0b0dad23 /engines/sci/engine
parent40e22d9e33f2f4e09cabc2bc14805c9b51141b90 (diff)
downloadscummvm-rg350-acebd6d0be60c25c4e7b157f3dc04afe5fcbb535.tar.gz
scummvm-rg350-acebd6d0be60c25c4e7b157f3dc04afe5fcbb535.tar.bz2
scummvm-rg350-acebd6d0be60c25c4e7b157f3dc04afe5fcbb535.zip
SCI: Removed the hack for the creation of LARRY3.DRV, used in LSL3
This is no longer necessary, as our file I/O code handles this case correctly now. Also, updated the description of file I/O on top.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kfile.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 4d869c3f09..ce903626e7 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -53,9 +53,10 @@ struct SavegameDesc {
* arbitrary data files, simply because many of our target platforms do not
* support this. The only files one can create are savestates. But SCI has an
* opcode to create and write to seemingly 'arbitrary' files. This is mainly
- * used in LSL3 for LARRY3.DRV (which is a game data file, not a driver) and
- * in LSL5 for MEMORY.DRV (which is again a game data file and contains the
- * game's password).
+ * used in LSL3 for LARRY3.DRV (which is a game data file, not a driver, used
+ * for persisting the results of the "age quiz" across restarts) and in LSL5
+ * for MEMORY.DRV (which is again a game data file and contains the game's
+ * password, XOR encrypted).
* To implement that opcode, we combine the SaveFileManager with regular file
* code, similarly to how the SCUMM HE engine does it.
*
@@ -116,20 +117,6 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
if (!inFile)
inFile = SearchMan.createReadStreamForMember(englishName);
- // Special case for LSL3: It tries to create a new dummy file,
- // LARRY3.DRV. Apparently, if the file doesn't exist here, it should be
- // created. The game scripts then go ahead and fill its contents with
- // data. It seems to be a similar case as the dummy MEMORY.DRV file in
- // LSL5, but LSL5 creates the file if it can't find it with a separate
- // call to file_open().
- if (!inFile && englishName == "LARRY3.DRV") {
- outFile = saveFileMan->openForSaving(wrappedName);
- outFile->finalize();
- delete outFile;
- outFile = 0;
- inFile = SearchMan.createReadStreamForMember(wrappedName);
- }
-
if (!inFile)
debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str());
} else if (mode == _K_FILE_MODE_CREATE) {