diff options
author | Eugene Sandulenko | 2006-03-25 04:17:17 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-03-25 04:17:17 +0000 |
commit | 22042bc63741321557b401833adf9d2ccf10eb3b (patch) | |
tree | 5122e534a141c37092e8f583bb33669c49e434e8 /engines/scumm | |
parent | 3331de7105fe8ece9268ad0bc9123dba01a33a2b (diff) | |
download | scummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.tar.gz scummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.tar.bz2 scummvm-rg350-22042bc63741321557b401833adf9d2ccf10eb3b.zip |
- Implemented case insensitive file reading. Left old system as a fallback
in case some engine writer decide to do something unwise
- Removed used of ConfMan.getKey("path") in file-related cases, because
now File class handles that
- Fixed bug in ScummEngine_v80he::o80_getFileSize() where path delimiters
weren't translated
svn-id: r21443
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v80he.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/plugin.cpp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 105ff8cb6b..dfa04811eb 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -560,7 +560,7 @@ int ScummEngine_v72he::convertFilePath(byte *dst, bool setFilePath) { if (setFilePath) { char filePath[256]; - sprintf(filePath, "%s%s", _gameDataPath.c_str(), dst + r); + sprintf(filePath, "%s", dst + r); if (!Common::File::exists(filePath)) { sprintf(filePath, "%s%s", _saveFileMan->getSavePath(), dst + r); } diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp index 6bb48c7ab1..c4de1bc7b6 100644 --- a/engines/scumm/he/script_v80he.cpp +++ b/engines/scumm/he/script_v80he.cpp @@ -399,9 +399,15 @@ void ScummEngine_v80he::o80_createSound() { void ScummEngine_v80he::o80_getFileSize() { byte filename[256]; + uint i; copyScriptString(filename, sizeof(filename)); + for (i = 0; i < strlen((const char *)filename); i++) { + if (filename[i] == '\\') + filename[i] = '/'; + } + Common::File f; if (!f.open((char *)filename)) { push(-1); diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp index 4ff003e0e2..946e20e0bf 100644 --- a/engines/scumm/plugin.cpp +++ b/engines/scumm/plugin.cpp @@ -1595,7 +1595,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { // Instead, use the fs.h code to get a list of all files in that // directory and simply check whether that filename is contained // in it. - if (Common::File::exists(detectName, ConfMan.get("path").c_str())) { + if (Common::File::exists(detectName)) { found = true; break; } @@ -1630,7 +1630,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { } else { // Compute the MD5 of the file, and (if we succeeded) store a hex version // of it in gameMD5 (useful to print it to the user in messages). - if (Common::md5_file(detectName, md5sum, ConfMan.get("path").c_str(), kMD5FileSizeLimit)) { + if (Common::md5_file(detectName, md5sum, NULL, kMD5FileSizeLimit)) { for (int j = 0; j < 16; j++) { sprintf(gameMD5 + j*2, "%02x", (int)md5sum[j]); } |