From 46058e8d17a1178fb856dbbf4aad1eb94f4040ca Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 26 Apr 2006 10:55:27 +0000 Subject: Fix timer events time when saving game in FF svn-id: r22179 --- engines/simon/saveload.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/simon/saveload.cpp b/engines/simon/saveload.cpp index 86097ebe2f..522d137ff2 100644 --- a/engines/simon/saveload.cpp +++ b/engines/simon/saveload.cpp @@ -481,6 +481,7 @@ bool SimonEngine::saveGame(uint slot, char *caption) { Common::OutSaveFile *f; uint item_index, num_item, i, j; TimeEvent *te; + uint32 curTime = 0; uint32 gsc = _gameStoppedClock; _lockWord |= 0x100; @@ -493,6 +494,7 @@ bool SimonEngine::saveGame(uint slot, char *caption) { if (getGameType() == GType_FF) { f->write(caption, 100); + curTime = time(NULL); } else { f->write(caption, 18); } @@ -510,7 +512,7 @@ bool SimonEngine::saveGame(uint slot, char *caption) { if (_clockStopped) gsc += ((uint32)time(NULL) - _clockStopped); for (te = _firstTimeStruct; te; te = te->next) { - f->writeUint32BE(te->time + gsc); + f->writeUint32BE(te->time - curTime + gsc); f->writeUint16BE(te->subroutine_id); } -- cgit v1.2.3