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/he | |
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/he')
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index dd502715c8..435e0e547b 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -226,7 +226,7 @@ void ScummEngine_v70he::readRoomsOffsets() { num = READ_LE_UINT16(_heV7RoomOffsets); ptr = _heV7RoomOffsets + 2; for (i = 0; i < num; i++) { - _res->roomoffs[rtRoom][i] = READ_LE_UINT32(ptr); + _res->_types[rtRoom].roomoffs[i] = READ_LE_UINT32(ptr); ptr += 4; } } diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 63c97a958e..b63feeb580 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -621,7 +621,7 @@ void ScummEngine_v72he::o72_getArrayDimSize() { } void ScummEngine_v72he::o72_getNumFreeArrays() { - byte **addr = _res->address[rtString]; + byte **addr = _res->_types[rtString].address; int i, num = 0; for (i = 1; i < _numArray; i++) { |