aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorMax Horn2005-04-26 13:33:17 +0000
committerMax Horn2005-04-26 13:33:17 +0000
commitc9cdee2d977133cc3371fa582675f4d84bddbd9f (patch)
treef4b7024608138549b4216842e0a4ac542d8afb7b /scumm/saveload.cpp
parent9421c2a9b9eea44dcc7ac8d7cc1170ebc20f0e45 (diff)
downloadscummvm-rg350-c9cdee2d977133cc3371fa582675f4d84bddbd9f.tar.gz
scummvm-rg350-c9cdee2d977133cc3371fa582675f4d84bddbd9f.tar.bz2
scummvm-rg350-c9cdee2d977133cc3371fa582675f4d84bddbd9f.zip
Removed the ugly saveOrLoadCursorImages hack and instead properly overload ScummEngine::saveOrLoad; did the same for the V7 IMuseDigital save/load code
svn-id: r17818
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp21
1 files changed, 17 insertions, 4 deletions
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) {