aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-30 10:54:25 +0000
committerFilippos Karapetis2009-05-30 10:54:25 +0000
commit33a924e766627e97caf926f6699860cc1a45e839 (patch)
treeff4f511d5cb776aaf0bded2fc700446b78f24ee4 /engines
parentc7c9f05cac225b65fb4cd8faf957f167a3b0d576 (diff)
downloadscummvm-rg350-33a924e766627e97caf926f6699860cc1a45e839.tar.gz
scummvm-rg350-33a924e766627e97caf926f6699860cc1a45e839.tar.bz2
scummvm-rg350-33a924e766627e97caf926f6699860cc1a45e839.zip
Swapped the checks for suffixes and branches to first check for SCI1 resources, and then for SCI0 resources (as in SCI1 games, tree branches are in resource 901, which coincides with the SCI0 suffix vocabulary resource 901)
svn-id: r41026
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/vocabulary.cpp27
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();