diff options
author | Max Horn | 2011-05-11 16:23:26 +0200 |
---|---|---|
committer | Max Horn | 2011-05-13 11:47:08 +0200 |
commit | 45e65d7ea04b10cf7bb5282bd66b8df609700a63 (patch) | |
tree | 9600fbf0670d552e5b68b7f55c446c0fb5c9596d /engines/scumm/resource_v4.cpp | |
parent | b37463fe5921420a9081aa6c5cf7588d52b41e78 (diff) | |
download | scummvm-rg350-45e65d7ea04b10cf7bb5282bd66b8df609700a63.tar.gz scummvm-rg350-45e65d7ea04b10cf7bb5282bd66b8df609700a63.tar.bz2 scummvm-rg350-45e65d7ea04b10cf7bb5282bd66b8df609700a63.zip |
SCUMM: Refactor how resource (types) are srepresented
Previously, we had a couple of arrays of size N (where N = number of
resource types), one for each attribute of a resource type (such as as
the number of resources of that type.
Now, we have one array of size N, whose elements are a record
aggregating all the attributes of each resource type.
Diffstat (limited to 'engines/scumm/resource_v4.cpp')
-rw-r--r-- | engines/scumm/resource_v4.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp index a3a2786e20..8fc27627b2 100644 --- a/engines/scumm/resource_v4.cpp +++ b/engines/scumm/resource_v4.cpp @@ -38,13 +38,13 @@ int ScummEngine_v4::readResTypeList(int id) { num = _fileHandle->readUint16LE(); - if (num != _res->num[id]) { + if (num != _res->_types[id].num) { error("Invalid number of %ss (%d) in directory", resTypeFromId(id), num); } for (i = 0; i < num; i++) { - _res->roomno[id][i] = _fileHandle->readByte(); - _res->roomoffs[id][i] = _fileHandle->readUint32LE(); + _res->_types[id].roomno[i] = _fileHandle->readByte(); + _res->_types[id].roomoffs[i] = _fileHandle->readUint32LE(); } return num; |