diff options
author | Travis Howell | 2006-04-26 10:55:27 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-26 10:55:27 +0000 |
commit | 46058e8d17a1178fb856dbbf4aad1eb94f4040ca (patch) | |
tree | deb9724a60f369af52cf0987199e490a8d0a4812 /engines | |
parent | 7383f81d2fef5af29243c68c9b818f1a43b08d4f (diff) | |
download | scummvm-rg350-46058e8d17a1178fb856dbbf4aad1eb94f4040ca.tar.gz scummvm-rg350-46058e8d17a1178fb856dbbf4aad1eb94f4040ca.tar.bz2 scummvm-rg350-46058e8d17a1178fb856dbbf4aad1eb94f4040ca.zip |
Fix timer events time when saving game in FF
svn-id: r22179
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/saveload.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |