[Scummvm-cvs-logs] SF.net SVN: scummvm: [22003] scummvm/trunk/engines/simon
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Tue Apr 18 04:39:15 CEST 2006
Revision: 22003
Author: kirben
Date: 2006-04-18 04:38:18 -0700 (Tue, 18 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22003&view=rev
Log Message:
-----------
Fix time events continuing, when using the oracle in FF
Modified Paths:
--------------
scummvm/trunk/engines/simon/saveload.cpp
scummvm/trunk/engines/simon/simon.cpp
scummvm/trunk/engines/simon/simon.h
Modified: scummvm/trunk/engines/simon/saveload.cpp
===================================================================
--- scummvm/trunk/engines/simon/saveload.cpp 2006-04-18 10:15:28 UTC (rev 22002)
+++ scummvm/trunk/engines/simon/saveload.cpp 2006-04-18 11:38:18 UTC (rev 22003)
@@ -327,7 +327,7 @@
get_out:;
unk_132_helper_3();
- _base_time = time(NULL) - save_time + _base_time;
+ _gameStoppedClock = time(NULL) - save_time + _gameStoppedClock;
_copyPartialMode = 0;
restoreBlock(94, 208, 46, 80);
@@ -507,7 +507,7 @@
f->writeUint32BE(i);
for (te = _firstTimeStruct; te; te = te->next) {
- f->writeUint32BE(te->time + _base_time);
+ f->writeUint32BE(te->time + _gameStoppedClock);
f->writeUint16BE(te->subroutine_id);
}
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-18 10:15:28 UTC (rev 22002)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-18 11:38:18 UTC (rev 22003)
@@ -312,8 +312,6 @@
_firstTimeStruct = 0;
_pendingDeleteTimeEvent = 0;
- _base_time = 0;
-
_mouseX = 0;
_mouseY = 0;
_mouseXOld = 0;
@@ -1453,7 +1451,9 @@
time(&cur_time);
- te->time = cur_time + timeout - _base_time;
+ te->time = cur_time + timeout - _gameStoppedClock;
+ if (_clockStopped)
+ te->time -= ((uint32)time(NULL) - _clockStopped);
te->subroutine_id = subroutine_id;
first = _firstTimeStruct;
@@ -1524,8 +1524,11 @@
TimeEvent *te;
bool result = false;
+ if (_clockStopped)
+ return result;
+
time(&cur_time);
- cur_time -= _base_time;
+ cur_time -= _gameStoppedClock;
while ((te = _firstTimeStruct) != NULL && te->time <= (uint32)cur_time) {
result = true;
@@ -1544,11 +1547,14 @@
Subroutine *sub;
_scriptVerb = 0;
+
if (_runScriptReturn1)
return;
+
sub = getSubroutineByID(te->subroutine_id);
if (sub != NULL)
startSubroutineEx(sub);
+
_runScriptReturn1 = false;
}
Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h 2006-04-18 10:15:28 UTC (rev 22002)
+++ scummvm/trunk/engines/simon/simon.h 2006-04-18 11:38:18 UTC (rev 22003)
@@ -306,8 +306,6 @@
TimeEvent *_firstTimeStruct, *_pendingDeleteTimeEvent;
- uint _base_time;
-
int _mouseX, _mouseY;
int _mouseXOld, _mouseYOld;
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