diff options
Diffstat (limited to 'engines/scumm/saveload.cpp')
-rw-r--r-- | engines/scumm/saveload.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index cd48feee54..0ca16482ce 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]._address[idx]) { s->saveUint16(idx); // Save the index of the resource saveResource(s, type, idx); } @@ -1663,14 +1663,14 @@ 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]._address[idx]); if (_res->_types[type]._mode == kDynamicResTypeMode) { - byte *ptr = _res->_types[type].address[idx]; - uint32 size = ((MemBlkHeader *)ptr)->size; + byte *ptr = _res->_types[type]._address[idx]; + uint32 size = _res->_types[type]._size[idx]; ser->saveUint32(size); - ser->saveBytes(ptr + sizeof(MemBlkHeader), size); + ser->saveBytes(ptr, size); if (type == rtInventory) { ser->saveUint16(_inventory[idx]); |