diff options
-rw-r--r-- | engines/sci/vocabulary.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/engines/sci/vocabulary.cpp b/engines/sci/vocabulary.cpp index df2c1bc6d2..7dd756f928 100644 --- a/engines/sci/vocabulary.cpp +++ b/engines/sci/vocabulary.cpp @@ -225,11 +225,11 @@ const char *vocab_get_any_group_word(int group, const WordMap &words) { } bool vocab_get_suffixes(ResourceManager *resmgr, SuffixList &suffixes) { - // Determine if we got a SCI0 vocabulary loaded - Resource* resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, 1); + // Determine if we can find a SCI1 suffix vocabulary first + Resource* resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, 1); if (!resource) - // No SCI0 vocabulary? Try SCI1 - resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, 1); + // No SCI1 vocabulary? Try SCI0 + resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, 1); if (!resource) return false; // No vocabulary found @@ -263,25 +263,26 @@ bool vocab_get_suffixes(ResourceManager *resmgr, SuffixList &suffixes) { } void vocab_free_suffixes(ResourceManager *resmgr, SuffixList &suffixes) { - // Determine if we got a SCI0 vocabulary loaded - Resource* resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, 0); + // Determine if we got a SCI1 vocabulary loaded + Resource* resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, 0); if (resource && resource->status == kResStatusLocked) { - resmgr->unlockResource(resource, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, kResourceTypeVocab); + resmgr->unlockResource(resource, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, kResourceTypeVocab); } else { - // No SCI0 vocabulary? Try SCI1 - resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, 0); + // No SCI1 vocabulary? Try SCI0 + resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, 0); if (resource && resource->status == kResStatusLocked) - resmgr->unlockResource(resource, VOCAB_RESOURCE_SCI1_SUFFIX_VOCAB, kResourceTypeVocab); + resmgr->unlockResource(resource, VOCAB_RESOURCE_SCI0_SUFFIX_VOCAB, kResourceTypeVocab); } suffixes.clear(); } bool vocab_get_branches(ResourceManager * resmgr, Common::Array<parse_tree_branch_t> &branches) { - Resource *resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_PARSE_TREE_BRANCHES, 0); + // Determine if we can find a SCI1 parser tree first + Resource *resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_PARSE_TREE_BRANCHES, 0); if (!resource) - // No SCI0 parser tree? Try SCI1 - resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_PARSE_TREE_BRANCHES, 0); + // No SCI1 parser tree? Try SCI0 + resource = resmgr->findResource(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_PARSE_TREE_BRANCHES, 0); branches.clear(); |