diff options
author | Martin Kiewitz | 2010-07-19 10:38:03 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-19 10:38:03 +0000 |
commit | 42107e2f5c09d9b25419ea8e2710502ca94b88a4 (patch) | |
tree | de61344df617ef44626b46d9ca9d90d0470a8426 | |
parent | b48045662dd4618ec9058bdc05ec50089abf740f (diff) | |
download | scummvm-rg350-42107e2f5c09d9b25419ea8e2710502ca94b88a4.tar.gz scummvm-rg350-42107e2f5c09d9b25419ea8e2710502ca94b88a4.tar.bz2 scummvm-rg350-42107e2f5c09d9b25419ea8e2710502ca94b88a4.zip |
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
-rw-r--r-- | engines/sci/parser/vocabulary.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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++]; |