aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base
diff options
context:
space:
mode:
authorPawel Kolodziejski2014-07-22 21:22:45 +0200
committerPawel Kolodziejski2014-07-22 21:22:45 +0200
commit78258151ea16202ca6fd2587565d477657972a96 (patch)
tree4b4d8da731666ce30f6623bc0417330745c6fc2d /engines/wintermute/base
parent04ed4d3a8df92e6ee7b7d55051117add2f16903d (diff)
downloadscummvm-rg350-78258151ea16202ca6fd2587565d477657972a96.tar.gz
scummvm-rg350-78258151ea16202ca6fd2587565d477657972a96.tar.bz2
scummvm-rg350-78258151ea16202ca6fd2587565d477657972a96.zip
WME: added few more games. added ability to detect from exe files.
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r--engines/wintermute/base/base_file_manager.cpp9
-rw-r--r--engines/wintermute/base/base_file_manager.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index 1f78303f52..58684b66a0 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -209,10 +209,15 @@ bool BaseFileManager::registerPackages() {
// than the equivalent of using equalsIgnoreCase.
Common::String fileName = fileIt->getName();
fileName.toLowercase();
+ bool searchSignature = false;
- if (!fileName.hasSuffix(".dcp")) {
+ if (!fileName.hasSuffix(".dcp") && !fileName.hasSuffix(".exe")) {
continue;
}
+ if (fileName.hasSuffix(".exe")) {
+ searchSignature = true;
+ }
+
// HACK: for Reversion1, avoid loading xlanguage_pt.dcp from the main folder:
if (_language != Common::PT_BRA && targetName.hasPrefix("reversion1")) {
if (fileName == "xlanguage_pt.dcp") {
@@ -263,7 +268,7 @@ bool BaseFileManager::registerPackages() {
}
}
debugC(kWintermuteDebugFileAccess, "Registering %s %s", fileIt->getPath().c_str(), fileIt->getName().c_str());
- registerPackage((*fileIt));
+ registerPackage((*fileIt), "", searchSignature);
}
}
diff --git a/engines/wintermute/base/base_file_manager.h b/engines/wintermute/base/base_file_manager.h
index 653721c8f5..d953e44704 100644
--- a/engines/wintermute/base/base_file_manager.h
+++ b/engines/wintermute/base/base_file_manager.h
@@ -63,7 +63,6 @@ private:
Common::SeekableReadStream *openFileRaw(const Common::String &filename);
Common::SeekableReadStream *openPkgFile(const Common::String &filename);
Common::FSList _packagePaths;
- bool findPackageSignature(Common::SeekableReadStream *f, uint32 *offset);
bool registerPackage(Common::FSNode package, const Common::String &filename = "", bool searchSignature = false);
bool _detectionMode;
Common::SearchSet _packages;