From c02420df43bec4ec523c18d8e6fdb381af29c1b5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 May 2011 11:45:42 +0200 Subject: SCUMM: Add a Resource class, refactor res code around it --- engines/scumm/saveload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/scumm/saveload.cpp') 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); -- cgit v1.2.3