diff options
author | Paul Gilbert | 2015-06-05 22:41:53 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-05 22:41:53 -0400 |
commit | 71604c3a46a427f858a0697ad1e75667a41ac503 (patch) | |
tree | 6bc7e292fec9f657e30e75a7e3312c6e31db2a5a /engines/sherlock | |
parent | 993b7af3559fa93b3f3bae44346f599a6527c512 (diff) | |
download | scummvm-rg350-71604c3a46a427f858a0697ad1e75667a41ac503.tar.gz scummvm-rg350-71604c3a46a427f858a0697ad1e75667a41ac503.tar.bz2 scummvm-rg350-71604c3a46a427f858a0697ad1e75667a41ac503.zip |
SHERLOCK: Fix initialization and syncing of map _overPos
This won't affect existing savegames, since we don't allow saving when
the map is active anyway. This is just in case we ever allow it.
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/map.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp index dfc9798822..9c6818a1dd 100644 --- a/engines/sherlock/map.cpp +++ b/engines/sherlock/map.cpp @@ -60,7 +60,7 @@ Map::Map(SherlockEngine *vm): _vm(vm), _topLine(g_system->getWidth(), 12) { _placesShown = false; _cursorIndex = -1; _drawMap = false; - _overPos = Common::Point(13000, 12600); + _overPos = Point32(130 * FIXED_INT_MULTIPLIER, 126 * FIXED_INT_MULTIPLIER); _charPoint = 0; _oldCharPoint = 0; _frameChangeFlag = false; @@ -557,8 +557,15 @@ void Map::highlightIcon(const Common::Point &pt) { void Map::synchronize(Common::Serializer &s) { s.syncAsSint16LE(_bigPos.x); s.syncAsSint16LE(_bigPos.y); - s.syncAsSint16LE(_overPos.x); - s.syncAsSint16LE(_overPos.y); + + Point32 overPos(_overPos.x / FIXED_INT_MULTIPLIER, _overPos.y / FIXED_INT_MULTIPLIER); + s.syncAsSint16LE(overPos.x); + s.syncAsSint16LE(overPos.y); + if (s.isLoading()) { + _overPos.x = overPos.x * FIXED_INT_MULTIPLIER; + _overPos.y = overPos.y * FIXED_INT_MULTIPLIER; + } + s.syncAsSint16LE(_oldCharPoint); } |