aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2009-08-21 19:48:48 +0000
committerMatthew Hoops2009-08-21 19:48:48 +0000
commit6b21f1c9327170c86d839ee5160a9eaeec7d82ef (patch)
tree8e044261d5712cb06a225b0017ca68bf1596ce69
parent4155e8eebf6aeb4ba90ff4901328a2bb9414eaa9 (diff)
downloadscummvm-rg350-6b21f1c9327170c86d839ee5160a9eaeec7d82ef.tar.gz
scummvm-rg350-6b21f1c9327170c86d839ee5160a9eaeec7d82ef.tar.bz2
scummvm-rg350-6b21f1c9327170c86d839ee5160a9eaeec7d82ef.zip
Fix detection of some later SCI32 games (RESMAP.001) and some cleanup.
svn-id: r43608
-rw-r--r--engines/sci/resource.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 049abe8202..e07b904324 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -356,6 +356,8 @@ int ResourceManager::addAppropriateSources() {
#ifdef ENABLE_SCI32
else if (Common::File::exists("RESMAP.000"))
map = addExternalMap("RESMAP.000");
+ else if (Common::File::exists("RESMAP.001"))
+ map = addExternalMap("RESMAP.001");
#endif
else
return 0;
@@ -746,14 +748,11 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() {
while (!fileStream->eos()) {
directoryType = fileStream->readByte();
directoryOffset = fileStream->readUint16LE();
-
+
// Only SCI32 has directory type < 0x80
- if (directoryType < 0x80 && mapDetected != kResVersionUnknown && mapDetected != kResVersionSci32)
+ if (directoryType < 0x80 && (mapDetected == kResVersionUnknown || mapDetected == kResVersionSci32))
mapDetected = kResVersionSci32;
- else
- break;
-
- if (directoryType > 0xA0 && directoryType != 0xFF)
+ else if ((directoryType < 0x80) || (directoryType > 0xA0 && directoryType != 0xFF))
break;
// Offset is above file size? -> definitely not SCI1/SCI1.1