aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-07-01 23:42:34 +0000
committerTravis Howell2007-07-01 23:42:34 +0000
commit7e83dfd275599b1f12de2140e5ff16253a6b7026 (patch)
tree22a9c65d7e515f0ef5f876b21e25f98636b52c49
parent8fcece52ac068eb0b89513ffe8c9dc811016ce4a (diff)
downloadscummvm-rg350-7e83dfd275599b1f12de2140e5ff16253a6b7026.tar.gz
scummvm-rg350-7e83dfd275599b1f12de2140e5ff16253a6b7026.tar.bz2
scummvm-rg350-7e83dfd275599b1f12de2140e5ff16253a6b7026.zip
Fix bug ##1746094 - Elvira 2: Strange behavior a - counter of P.P.
svn-id: r27839
-rw-r--r--engines/agos/saveload.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index dfd9f1eef9..32b767073a 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -1283,9 +1283,12 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
Common::OutSaveFile *f;
uint item_index, num_item, i, j;
TimeEvent *te;
- uint32 curTime = 0;
uint32 gsc = _gameStoppedClock;
+ uint32 curTime = 0;
+ if (getGameType() != GType_SIMON1 && getGameType() != GType_SIMON2)
+ curTime = time(NULL);
+
_lockWord |= 0x100;
f = _saveFileMan->openForSaving(genSaveName(slot));
@@ -1299,7 +1302,6 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
// No caption
} else if (getGameType() == GType_FF) {
f->write(caption, 100);
- curTime = time(NULL);
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
f->write(caption, 18);
} else {
@@ -1308,7 +1310,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
f->writeUint32BE(_itemArrayInited - 1);
f->writeUint32BE(0xFFFFFFFF);
- f->writeUint32BE(0);
+ f->writeUint32BE(curTime);
f->writeUint32BE(0);
i = 0;