mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
Fix detection of some later SCI32 games (RESMAP.001) and some cleanup.
svn-id: r43608
This commit is contained in:
parent
4155e8eebf
commit
6b21f1c932
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user