aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2010-06-15 12:35:17 +0000
committerMax Horn2010-06-15 12:35:17 +0000
commite4153ffa381542ee14ad268475f679917d177254 (patch)
treee75a98cea618952e27aff10f910ce5a80f1e9982 /engines/sci
parent82b66ffdf8439eff0043256bff9daf4f0c3d84ed (diff)
downloadscummvm-rg350-e4153ffa381542ee14ad268475f679917d177254.tar.gz
scummvm-rg350-e4153ffa381542ee14ad268475f679917d177254.tar.bz2
scummvm-rg350-e4153ffa381542ee14ad268475f679917d177254.zip
SCI: Add Resource::getNumber method
svn-id: r49848
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/resource.cpp8
-rw-r--r--engines/sci/resource.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index cf253619e6..24e92060e2 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -334,10 +334,10 @@ void PatchResourceSource::loadResource(Resource *res) {
}
void MacResourceForkResourceSource::loadResource(Resource *res) {
- Common::SeekableReadStream *stream = _macResMan->getResource(resTypeToMacTag(res->getType()), res->_id.getNumber());
+ Common::SeekableReadStream *stream = _macResMan->getResource(resTypeToMacTag(res->getType()), res->getNumber());
if (!stream)
- error("Could not get Mac resource fork resource: %d %d", res->getType(), res->_id.getNumber());
+ error("Could not get Mac resource fork resource: %d %d", res->getType(), res->getNumber());
int error = res->decompress(stream);
if (error) {
@@ -799,7 +799,7 @@ Common::List<ResourceId> *ResourceManager::listResources(ResourceType type, int
ResourceMap::iterator itr = _resMap.begin();
while (itr != _resMap.end()) {
- if ((itr->_value->getType() == type) && ((mapNumber == -1) || (itr->_value->_id.getNumber() == mapNumber)))
+ if ((itr->_value->getType() == type) && ((mapNumber == -1) || (itr->_value->getNumber() == mapNumber)))
resources->push_back(itr->_value->_id);
++itr;
}
@@ -1551,7 +1551,7 @@ int Resource::readResourceInfo(Common::SeekableReadStream *file,
// Doesn't store this data in the resource. Fortunately,
// we already have this data.
type = getType();
- number = _id.getNumber();
+ number = getNumber();
szPacked = file->size();
szUnpacked = file->size();
wCompression = 0;
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 43408b0ffe..9d372eaf02 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -198,6 +198,7 @@ public:
void unalloc();
inline ResourceType getType() const { return _id.getType(); }
+ inline uint16 getNumber() const { return _id.getNumber(); }
/**
* Write the resource to the specified stream.