From 42107e2f5c09d9b25419ea8e2710502ca94b88a4 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 19 Jul 2010 10:38:03 +0000 Subject: 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 svn-id: r51024 --- engines/sci/parser/vocabulary.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp index ad006b0ca8..0b57d40686 100644 --- a/engines/sci/parser/vocabulary.cpp +++ b/engines/sci/parser/vocabulary.cpp @@ -85,7 +85,9 @@ bool Vocabulary::loadParserWords() { 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 @@ bool Vocabulary::loadParserWords() { // 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 @@ bool Vocabulary::loadParserWords() { 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++]; -- cgit v1.2.3