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/sound.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/sound.cpp')
-rw-r--r-- | engines/scumm/sound.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 567cf74d4a..f5068e75d0 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1224,7 +1224,7 @@ int ScummEngine::readSoundResource(int idx) { if (!dmuFile.open(buffer)) { error("Can't open music file %s", buffer); - _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET; + _res->_types[rtSound].roomoffs[idx] = RES_INVALID_OFFSET; return 0; } dmuFile.seek(4, SEEK_SET); @@ -1248,7 +1248,7 @@ int ScummEngine::readSoundResource(int idx) { } error("Unrecognized base tag 0x%08x in sound %d", basetag, idx); } - _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET; + _res->_types[rtSound].roomoffs[idx] = RES_INVALID_OFFSET; return 0; } @@ -2123,7 +2123,7 @@ int ScummEngine::readSoundResourceSmallHeader(int idx) { _fileHandle->read(_res->createResource(rtSound, idx, ro_size - 4), ro_size - 4); return 1; } - _res->roomoffs[rtSound][idx] = RES_INVALID_OFFSET; + _res->_types[rtSound].roomoffs[idx] = RES_INVALID_OFFSET; return 0; } |