aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarisa-Chan2014-03-05 18:44:23 +0700
committerMarisa-Chan2014-03-05 18:44:23 +0700
commit5f92871a9c76d5f8bda74c10ef304c3ec1a328f5 (patch)
tree6f6e53fc058d839aa5f5b96a00fba420c70fa40c
parent5eb6462d60a27ef158afbfc23b578b6f57f8f789 (diff)
downloadscummvm-rg350-5f92871a9c76d5f8bda74c10ef304c3ec1a328f5.tar.gz
scummvm-rg350-5f92871a9c76d5f8bda74c10ef304c3ec1a328f5.tar.bz2
scummvm-rg350-5f92871a9c76d5f8bda74c10ef304c3ec1a328f5.zip
ZVISION: Fix timer values for savegame
-rw-r--r--engines/zvision/script_manager.cpp4
-rw-r--r--engines/zvision/timer_node.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index 2178887469..1a567397a8 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -659,6 +659,10 @@ void ScriptManager::deserialize(Common::SeekableReadStream *stream) {
case MKTAG('T', 'I', 'M', 'R'): {
uint32 key = stream->readUint32LE();
uint32 time = stream->readUint32LE();
+ if (_engine->getGameId() == GID_GRANDINQUISITOR)
+ time /= 100;
+ else if (_engine->getGameId() == GID_NEMESIS)
+ time /= 1000;
addSideFX(new TimerNode(_engine, key, time));
}
break;
diff --git a/engines/zvision/timer_node.cpp b/engines/zvision/timer_node.cpp
index 0d7f9b1114..a94f6db19b 100644
--- a/engines/zvision/timer_node.cpp
+++ b/engines/zvision/timer_node.cpp
@@ -70,7 +70,7 @@ void TimerNode::serialize(Common::WriteStream *stream) {
stream->writeUint32BE(MKTAG('T', 'I', 'M', 'R'));
stream->writeUint32LE(8); // size
stream->writeUint32LE(_key);
- stream->writeUint32LE(_timeLeft / (_engine->getGameId() == GID_NEMESIS ? 1000 : 100));
+ stream->writeUint32LE(_timeLeft);
}
void TimerNode::deserialize(Common::SeekableReadStream *stream) {