From 180f188b88dd7be12df5152f52f95b9b7039f012 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 2 Aug 2010 18:25:48 +0000 Subject: SCI: Cleanup SCI0 late version detection After discussing with Walter, we should be able to detect SCI0 late on the presence of a SCI0 vocab.999 without checking if we're using the old decompressors. svn-id: r51644 --- engines/sci/resource.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9d722a08c0..2fdf091314 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1907,18 +1907,18 @@ void ResourceManager::detectSciVersion() { return; } + if (hasSci0Voc999()) { + s_sciVersion = SCI_VERSION_0_LATE; + return; + } + if (oldDecompressors) { // It's either SCI_VERSION_0_LATE or SCI_VERSION_01 // We first check for SCI1 vocab.999 if (testResource(ResourceId(kResourceTypeVocab, 999))) { - if (hasSci0Voc999()) { - s_sciVersion = SCI_VERSION_0_LATE; - return; - } else { - s_sciVersion = SCI_VERSION_01; - return; - } + s_sciVersion = SCI_VERSION_01; + return; } // If vocab.999 is missing, we try vocab.900 @@ -1938,12 +1938,7 @@ void ResourceManager::detectSciVersion() { return; } - // New decompressors. It's either SCI_VERSION_0_LATE, SCI_VERSION_1_EGA or SCI_VERSION_1_EARLY. - if (testResource(ResourceId(kResourceTypeVocab, 0))) { - s_sciVersion = SCI_VERSION_0_LATE; - return; - } - + // New decompressors. It's either SCI_VERSION_1_EGA or SCI_VERSION_1_EARLY. if (hasSci1Voc900()) { s_sciVersion = SCI_VERSION_1_EGA; return; -- cgit v1.2.3