ZVISION: Fix timer values for savegame

This commit is contained in:
Marisa-Chan 2014-03-05 18:44:23 +07:00
parent 5eb6462d60
commit 5f92871a9c
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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) {