[Scummvm-cvs-logs] SF.net SVN: scummvm:[51024] scummvm/trunk/engines/sci/parser/vocabulary.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Mon Jul 19 12:38:03 CEST 2010


Revision: 51024
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51024&view=rev
Author:   m_kiewitz
Date:     2010-07-19 10:38:03 +0000 (Mon, 19 Jul 2010)

Log Message:
-----------
SCI: vocab version change for pq2 japanese

pq2 japanese only uses sci01 vocabulary and everything else is still like in sci0 - fixes pq2 not accepting any input in parser

Modified Paths:
--------------
    scummvm/trunk/engines/sci/parser/vocabulary.cpp

Modified: scummvm/trunk/engines/sci/parser/vocabulary.cpp
===================================================================
--- scummvm/trunk/engines/sci/parser/vocabulary.cpp	2010-07-19 10:19:13 UTC (rev 51023)
+++ scummvm/trunk/engines/sci/parser/vocabulary.cpp	2010-07-19 10:38:03 UTC (rev 51024)
@@ -85,7 +85,9 @@
 		return false; // NOT critical: SCI1 games and some demos don't have one!
 	}
 
-	if (_vocabVersion == kVocabularySCI0) {
+	VocabularyVersions resourceType = _vocabVersion;
+
+	if (resourceType == kVocabularySCI0) {
 		if (resource->size < 26 * 2) {
 			warning("Invalid main vocabulary encountered: Much too small");
 			return false;
@@ -99,12 +101,12 @@
 		// If all of them were empty, we are definitely seeing SCI01 vocab in disguise (e.g. pq2 japanese)
 		if (alphabetNr == 26) {
 			warning("SCI0: Found SCI01 vocabulary in disguise");
-			_vocabVersion = kVocabularySCI1;
+			resourceType = kVocabularySCI1;
 		}
 	}
 
 	unsigned int seeker;
-	if (_vocabVersion == kVocabularySCI1)
+	if (resourceType == kVocabularySCI1)
 		seeker = 255 * 2; // vocab.900 starts with 255 16-bit pointers which we don't use
 	else
 		seeker = 26 * 2; // vocab.000 starts with 26 16-bit pointers which we don't use
@@ -122,7 +124,7 @@
 
 		currentwordpos = resource->data[seeker++]; // Parts of previous words may be re-used
 
-		if (_vocabVersion == kVocabularySCI1) {
+		if (resourceType == kVocabularySCI1) {
 			c = 1;
 			while (seeker < resource->size && currentwordpos < 255 && c) {
 				c = resource->data[seeker++];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list