diff options
author | Colin Snover | 2016-08-28 13:04:02 -0500 |
---|---|---|
committer | Colin Snover | 2016-08-28 13:06:34 -0500 |
commit | 1760fb3e0d25704685e9b44f0792536da962082d (patch) | |
tree | c1c20183265ad91add83723cc90a19281482fbb1 /engines/sci | |
parent | af5dcd4ba15e1364b21f679f66a658b8e25685b2 (diff) | |
download | scummvm-rg350-1760fb3e0d25704685e9b44f0792536da962082d.tar.gz scummvm-rg350-1760fb3e0d25704685e9b44f0792536da962082d.tar.bz2 scummvm-rg350-1760fb3e0d25704685e9b44f0792536da962082d.zip |
SCI32: Fix incorrect/missing cursor after restoring a save game
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 13 | ||||
-rw-r--r-- | engines/sci/engine/savegame.h | 5 |
2 files changed, 13 insertions, 5 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index eeddda8390..be2d7660cb 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -427,6 +427,7 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { if (getSciVersion() >= SCI_VERSION_2) { g_sci->_gfxPalette32->saveLoadWithSerializer(s); g_sci->_gfxRemap32->saveLoadWithSerializer(s); + g_sci->_gfxCursor32->saveLoadWithSerializer(s); } else #endif g_sci->_gfxPalette16->saveLoadWithSerializer(s); @@ -892,11 +893,15 @@ void GfxRemap32::saveLoadWithSerializer(Common::Serializer &s) { } void GfxCursor32::saveLoadWithSerializer(Common::Serializer &s) { - if (s.getVersion() < 37) { + if (s.getVersion() < 38) { return; } - s.syncAsSint32LE(_hideCount); + int32 hideCount; + if (s.isSaving()) { + hideCount = _hideCount; + } + s.syncAsSint32LE(hideCount); s.syncAsSint16LE(_restrictedArea.left); s.syncAsSint16LE(_restrictedArea.top); s.syncAsSint16LE(_restrictedArea.right); @@ -908,8 +913,10 @@ void GfxCursor32::saveLoadWithSerializer(Common::Serializer &s) { if (s.isLoading()) { hide(); setView(_cursorInfo.resourceId, _cursorInfo.loopNo, _cursorInfo.celNo); - if (!_hideCount) { + if (!hideCount) { show(); + } else { + _hideCount = hideCount; } } } diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 51dbbedd87..6616081a20 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,7 +37,8 @@ struct EngineState; * * Version - new/changed feature * ============================= - * 37 - Segment entry data changed to pointers, SCI32 cursor + * 38 - SCI32 cursor + * 37 - Segment entry data changed to pointers * 36 - SCI32 bitmap segment * 35 - SCI32 remap * 34 - SCI32 palettes, and store play time in ticks @@ -62,7 +63,7 @@ struct EngineState; */ enum { - CURRENT_SAVEGAME_VERSION = 37, + CURRENT_SAVEGAME_VERSION = 38, MINIMUM_SAVEGAME_VERSION = 14 }; |