[Scummvm-cvs-logs] SF.net SVN: scummvm: [22179] scummvm/trunk/engines/simon/saveload.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Wed Apr 26 03:56:01 CEST 2006


Revision: 22179
Author:   kirben
Date:     2006-04-26 03:55:27 -0700 (Wed, 26 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22179&view=rev

Log Message:
-----------
Fix timer events time when saving game in FF

Modified Paths:
--------------
    scummvm/trunk/engines/simon/saveload.cpp
Modified: scummvm/trunk/engines/simon/saveload.cpp
===================================================================
--- scummvm/trunk/engines/simon/saveload.cpp	2006-04-26 10:54:32 UTC (rev 22178)
+++ scummvm/trunk/engines/simon/saveload.cpp	2006-04-26 10:55:27 UTC (rev 22179)
@@ -481,6 +481,7 @@
 	Common::OutSaveFile *f;
 	uint item_index, num_item, i, j;
 	TimeEvent *te;
+	uint32 curTime = 0;
 	uint32 gsc = _gameStoppedClock;
 
 	_lockWord |= 0x100;
@@ -493,6 +494,7 @@
 
 	if (getGameType() == GType_FF) {
 		f->write(caption, 100);
+		curTime = time(NULL);
 	} else {
 		f->write(caption, 18);
 	}
@@ -510,7 +512,7 @@
 	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);
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list