aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/saveload.cpp
diff options
context:
space:
mode:
authorMax Horn2011-05-13 11:45:42 +0200
committerMax Horn2011-05-13 11:47:13 +0200
commitc02420df43bec4ec523c18d8e6fdb381af29c1b5 (patch)
treef595cd9d72f0b5ba5b98e80caf3544a0f0401830 /engines/scumm/saveload.cpp
parentabaaf0cad9a63c1a6f1946a8a90facd1535e762d (diff)
downloadscummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.tar.gz
scummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.tar.bz2
scummvm-rg350-c02420df43bec4ec523c18d8e6fdb381af29c1b5.zip
SCUMM: Add a Resource class, refactor res code around it
Diffstat (limited to 'engines/scumm/saveload.cpp')
-rw-r--r--engines/scumm/saveload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index d81095a37b..996e8685bb 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1247,7 +1247,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
s->saveUint16(type); // Save the res type...
for (idx = 0; idx < _res->_types[type]._num; idx++) {
// Only save resources which actually exist...
- if (_res->_types[type]._address[idx]) {
+ if (_res->_types[type]._resources[idx]._address) {
s->saveUint16(idx); // Save the index of the resource
saveResource(s, type, idx);
}
@@ -1663,11 +1663,11 @@ void ScummEngine::loadResourceOLD(Serializer *ser, int type, int idx) {
}
void ScummEngine::saveResource(Serializer *ser, int type, int idx) {
- assert(_res->_types[type]._address[idx]);
+ assert(_res->_types[type]._resources[idx]._address);
if (_res->_types[type]._mode == kDynamicResTypeMode) {
- byte *ptr = _res->_types[type]._address[idx];
- uint32 size = _res->_types[type]._size[idx];
+ byte *ptr = _res->_types[type]._resources[idx]._address;
+ uint32 size = _res->_types[type]._resources[idx]._size;
ser->saveUint32(size);
ser->saveBytes(ptr, size);