[Scummvm-git-logs] scummvm master -> 1760fb3e0d25704685e9b44f0792536da962082d
csnover
csnover at users.noreply.github.com
Sun Aug 28 20:07:01 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1760fb3e0d SCI32: Fix incorrect/missing cursor after restoring a save game
Commit: 1760fb3e0d25704685e9b44f0792536da962082d
https://github.com/scummvm/scummvm/commit/1760fb3e0d25704685e9b44f0792536da962082d
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-08-28T13:06:34-05:00
Commit Message:
SCI32: Fix incorrect/missing cursor after restoring a save game
Changed paths:
engines/sci/engine/savegame.cpp
engines/sci/engine/savegame.h
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index eeddda8..be2d766 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 51dbbed..6616081 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
};
More information about the Scummvm-git-logs
mailing list