diff options
author | Colin Snover | 2016-07-31 13:41:05 -0500 |
---|---|---|
committer | Colin Snover | 2016-08-19 13:57:40 -0500 |
commit | 80d9182554bcc6b24b493510cf599baf7577dacc (patch) | |
tree | 5312e7e6996e5ccf66932dde2fb8706cb6ba1535 /engines/sci/engine/savegame.cpp | |
parent | 9bfeb3c297a7868c53d4c37775148067d72f44c0 (diff) | |
download | scummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.tar.gz scummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.tar.bz2 scummvm-rg350-80d9182554bcc6b24b493510cf599baf7577dacc.zip |
SCI32: Implement SCI32 cursor support
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 7804b7892d..eeddda8390 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -48,6 +48,7 @@ #include "sci/sound/music.h" #ifdef ENABLE_SCI32 +#include "sci/graphics/cursor32.h" #include "sci/graphics/frameout.h" #include "sci/graphics/palette32.h" #include "sci/graphics/remap32.h" @@ -889,6 +890,29 @@ void GfxRemap32::saveLoadWithSerializer(Common::Serializer &s) { _needsUpdate = true; } } + +void GfxCursor32::saveLoadWithSerializer(Common::Serializer &s) { + if (s.getVersion() < 37) { + return; + } + + s.syncAsSint32LE(_hideCount); + s.syncAsSint16LE(_restrictedArea.left); + s.syncAsSint16LE(_restrictedArea.top); + s.syncAsSint16LE(_restrictedArea.right); + s.syncAsSint16LE(_restrictedArea.bottom); + s.syncAsUint16LE(_cursorInfo.resourceId); + s.syncAsUint16LE(_cursorInfo.loopNo); + s.syncAsUint16LE(_cursorInfo.celNo); + + if (s.isLoading()) { + hide(); + setView(_cursorInfo.resourceId, _cursorInfo.loopNo, _cursorInfo.celNo); + if (!_hideCount) { + show(); + } + } +} #endif void GfxPorts::saveLoadWithSerializer(Common::Serializer &s) { |