diff options
author | Matthew Hoops | 2010-08-14 04:21:09 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-08-14 04:21:09 +0000 |
commit | f252c0b67ef74da5376fcf3a08d514fb311c4316 (patch) | |
tree | 86414e24710278916e78353946d32fd18fb357d0 /engines/sci/resource.cpp | |
parent | d882661aecbe8dc27979f15fadfc83882fe58a8d (diff) | |
download | scummvm-rg350-f252c0b67ef74da5376fcf3a08d514fb311c4316.tar.gz scummvm-rg350-f252c0b67ef74da5376fcf3a08d514fb311c4316.tar.bz2 scummvm-rg350-f252c0b67ef74da5376fcf3a08d514fb311c4316.zip |
SCI: Add support for Mac 'crsr' cursors used in SCI2+ games
svn-id: r52076
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r-- | engines/sci/resource.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index fe8922b852..00f50714af 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -365,8 +365,6 @@ Common::SeekableReadStream *ResourceManager::getVolumeFile(ResourceSource *sourc return NULL; } -static uint32 resTypeToMacTag(ResourceType type); - void ResourceManager::loadResource(Resource *res) { res->_source->loadResource(this, res); } @@ -382,8 +380,14 @@ void PatchResourceSource::loadResource(ResourceManager *resMan, Resource *res) { } } +static Common::Array<uint32> resTypeToMacTags(ResourceType type); + void MacResourceForkResourceSource::loadResource(ResourceManager *resMan, Resource *res) { - Common::SeekableReadStream *stream = _macResMan->getResource(resTypeToMacTag(res->getType()), res->getNumber()); + Common::SeekableReadStream *stream = 0; + Common::Array<uint32> tagArray = resTypeToMacTags(res->getType()); + + for (uint32 i = 0; i < tagArray.size() && !stream; i++) + stream = _macResMan->getResource(tagArray[i], res->getNumber()); if (!stream) error("Could not get Mac resource fork resource: %s %d", getResourceTypeName(res->getType()), res->getNumber()); @@ -1588,12 +1592,14 @@ struct { { MKID_BE('SYN '), kResourceTypeSync } }; -static uint32 resTypeToMacTag(ResourceType type) { +static Common::Array<uint32> resTypeToMacTags(ResourceType type) { + Common::Array<uint32> tags; + for (uint32 i = 0; i < ARRAYSIZE(macResTagMap); i++) if (macResTagMap[i].type == type) - return macResTagMap[i].tag; + tags.push_back(macResTagMap[i].tag); - return 0; + return tags; } void MacResourceForkResourceSource::scanSource(ResourceManager *resMan) { |