From c9cdee2d977133cc3371fa582675f4d84bddbd9f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 26 Apr 2005 13:33:17 +0000 Subject: Removed the ugly saveOrLoadCursorImages hack and instead properly overload ScummEngine::saveOrLoad; did the same for the V7 IMuseDigital save/load code svn-id: r17818 --- scumm/saveload.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'scumm/saveload.cpp') diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 4ffbf7faf7..7feca07a96 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -909,13 +909,26 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { if (_imuse && (_saveSound || !_saveTemporaryState)) { _imuse->save_or_load(s, this); } +} - if (_imuseDigital) { - _imuseDigital->saveOrLoad(s); - } +void ScummEngine_v5::saveOrLoad(Serializer *s, uint32 savegameVersion) { + ScummEngine::saveOrLoad(s, savegameVersion); + + const SaveLoadEntry cursorEntries[] = { + MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)), + MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)), + MKEND() + }; // This is probably only needed for Loom. - saveOrLoadCursorImages(s); + s->saveLoadEntries(this, cursorEntries); +} + +void ScummEngine_v7::saveOrLoad(Serializer *s, uint32 savegameVersion) { + ScummEngine::saveOrLoad(s, savegameVersion); + + assert(_imuseDigital); + _imuseDigital->saveOrLoad(s); } void ScummEngine::saveLoadResource(Serializer *ser, int type, int idx) { -- cgit v1.2.3