aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorGreg Frieger2009-03-07 01:08:34 +0000
committerGreg Frieger2009-03-07 01:08:34 +0000
commit18efc4476832a1799c304c38e74cdf667e869c7a (patch)
tree8ff066df06b1d5861fc89604f75938cf9f1b264b /engines/sci
parentf028f53d3e9b077c7a821b244a717124f631ac10 (diff)
downloadscummvm-rg350-18efc4476832a1799c304c38e74cdf667e869c7a.tar.gz
scummvm-rg350-18efc4476832a1799c304c38e74cdf667e869c7a.tar.bz2
scummvm-rg350-18efc4476832a1799c304c38e74cdf667e869c7a.zip
Use map/volume versions from detection.cpp if set
svn-id: r39170
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/scicore/resource.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp
index e483af813c..aca8e23592 100644
--- a/engines/sci/scicore/resource.cpp
+++ b/engines/sci/scicore/resource.cpp
@@ -380,18 +380,23 @@ ResourceManager::ResourceManager(int version, int maxMemory) {
_memoryLocked = 0;
_memoryLRU = 0;
_LRU.clear();
-
_resMap.clear();
_sources = NULL;
_sciVersion = version;
addAppropriateSources();
- _mapVersion = detectMapVersion();
- debug("Detected resource map:%d %s", _mapVersion, sci_version_types[_mapVersion]);
- _volVersion = detectVolVersion();
- debug("Detected volume :%d %s", _volVersion, sci_version_types[_volVersion]);
- scanNewSources(_sources);
+ if (version != SCI_VERSION_AUTODETECT) {
+ _mapVersion = version;
+ _volVersion = version;
+ } else {
+ _mapVersion = detectMapVersion();
+ _volVersion = detectVolVersion();
+ }
+ debug("Using resource map version %d %s", _mapVersion, sci_version_types[_mapVersion]);
+ debug("Using volume version %d %s", _volVersion, sci_version_types[_volVersion]);
+
+ scanNewSources(_sources);
if (version == SCI_VERSION_AUTODETECT)
switch (_mapVersion) {
case SCI_VERSION_0: