[Scummvm-cvs-logs] SF.net SVN: scummvm:[41026] scummvm/trunk/engines/sci/vocabulary.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat May 30 12:54:25 CEST 2009
Revision: 41026
http://scummvm.svn.sourceforge.net/scummvm/?rev=41026&view=rev
Author: thebluegr
Date: 2009-05-30 10:54:25 +0000 (Sat, 30 May 2009)
Log Message:
-----------
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)
Modified Paths:
--------------
scummvm/trunk/engines/sci/vocabulary.cpp
Modified: scummvm/trunk/engines/sci/vocabulary.cpp
===================================================================
--- scummvm/trunk/engines/sci/vocabulary.cpp 2009-05-30 10:42:08 UTC (rev 41025)
+++ scummvm/trunk/engines/sci/vocabulary.cpp 2009-05-30 10:54:25 UTC (rev 41026)
@@ -225,11 +225,11 @@
}
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 @@
}
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();
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