diff options
Diffstat (limited to 'engines/wintermute/base/file/base_disk_file.cpp')
-rw-r--r-- | engines/wintermute/base/file/base_disk_file.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp index 3c1ecc7a73..808dc9e00d 100644 --- a/engines/wintermute/base/file/base_disk_file.cpp +++ b/engines/wintermute/base/file/base_disk_file.cpp @@ -66,12 +66,6 @@ static Common::FSNode getNodeForRelativePath(const Common::String &filename) { const Common::FSNode gameDataDir(ConfMan.get("path")); Common::FSNode curNode = gameDataDir; - Common::String fixedPath = ""; - while (!path.empty()) { - fixedPath += path.nextToken() + "/"; - } - fixedPath.deleteLastChar(); - // Parse all path-elements while (!path.empty()) { // Get the next path-component by slicing on '\\' @@ -123,6 +117,8 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { if (fixedFilename.contains(':')) { if (fixedFilename.hasPrefix("c:/windows/fonts/")) { // East Side Story refers to "c:\windows\fonts\framd.ttf" fixedFilename = filename.c_str() + 14; + } else if (fixedFilename.hasPrefix("c:/carol6/svn/data/")) { // Carol Reed 6: Black Circle refers to "c:\carol6\svn\data\sprites\system\help.png" + fixedFilename = fixedFilename.c_str() + 19; } else { error("openDiskFile::Absolute path or invalid filename used in %s", filename.c_str()); } @@ -155,7 +151,8 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { } if (compressed) { - uint32 dataOffset, compSize, uncompSize; + uint32 dataOffset, compSize; + unsigned long uncompSize; dataOffset = file->readUint32LE(); compSize = file->readUint32LE(); uncompSize = file->readUint32LE(); @@ -177,7 +174,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { file->seek(dataOffset + prefixSize, SEEK_SET); file->read(compBuffer, compSize); - if (Common::uncompress(data, (unsigned long *)&uncompSize, compBuffer, compSize) != true) { + if (Common::uncompress(data, &uncompSize, compBuffer, compSize) != true) { error("Error uncompressing file '%s'", filename.c_str()); delete[] compBuffer; delete file; @@ -198,4 +195,4 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { return nullptr; } -} // end of namespace Wintermute +} // End of namespace Wintermute |