[Scummvm-cvs-logs] SF.net SVN: scummvm: [28456] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Aug 5 03:42:38 CEST 2007


Revision: 28456
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28456&view=rev
Author:   drmccoy
Date:     2007-08-04 18:42:38 -0700 (Sat, 04 Aug 2007)

Log Message:
-----------
Possible fix for bug #1767748 (Gobliiins is not fast as it can be on slow computers)

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game_v1.cpp
    scummvm/trunk/engines/gob/video.cpp
    scummvm/trunk/engines/gob/video.h

Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp	2007-08-04 23:27:31 UTC (rev 28455)
+++ scummvm/trunk/engines/gob/game_v1.cpp	2007-08-05 01:42:38 UTC (rev 28456)
@@ -911,7 +911,8 @@
 								_shouldPushColls = 0;
 								_vm->_global->_inter_execPtr = savedIP;
 								deltaTime = timeVal -
-									(_vm->_util->getTimeKey() - timeKey);
+									((_vm->_util->getTimeKey() - timeKey)
+									 - _vm->_video->_lastRetraceLength);
 
 								if (deltaTime < 2)
 									deltaTime = 2;

Modified: scummvm/trunk/engines/gob/video.cpp
===================================================================
--- scummvm/trunk/engines/gob/video.cpp	2007-08-04 23:27:31 UTC (rev 28455)
+++ scummvm/trunk/engines/gob/video.cpp	2007-08-05 01:42:38 UTC (rev 28456)
@@ -94,6 +94,7 @@
 	_splitHeight1 = 200;
 	_splitHeight2 = 0;
 	_splitStart = 0;
+	_lastRetraceLength = 0;
 
 	_curSparse = 0;
 	_lastSparse = 0xFFFFFFFF;
@@ -161,6 +162,8 @@
 }
 
 void Video::retrace(bool mouse) {
+	uint32 time = _vm->_util->getTimeKey();
+
 	if (mouse)
 		CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0);
 	if (_vm->_global->_primarySurfDesc) {
@@ -173,14 +176,13 @@
 					_vm->_height - _splitHeight2, _vm->_width, _splitHeight2);
 		g_system->updateScreen();
 	}
+
+	_lastRetraceLength = _vm->_util->getTimeKey() - time;
 }
 
 void Video::waitRetrace(bool mouse) {
-	uint32 time;
-
-	time = _vm->_util->getTimeKey();
 	retrace(mouse);
-	_vm->_util->delay(MAX(1, 10 - (int)(_vm->_util->getTimeKey() - time)));
+	_vm->_util->delay(MAX(1, 10 - (int) _lastRetraceLength));
 }
 
 void Video::sparseRetrace(int max) {

Modified: scummvm/trunk/engines/gob/video.h
===================================================================
--- scummvm/trunk/engines/gob/video.h	2007-08-04 23:27:31 UTC (rev 28455)
+++ scummvm/trunk/engines/gob/video.h	2007-08-05 01:42:38 UTC (rev 28456)
@@ -104,6 +104,7 @@
 	int16 _splitHeight1;
 	int16 _splitHeight2;
 	int16 _splitStart;
+	uint32 _lastRetraceLength;
 
 	void freeDriver();
 	void initPrimary(int16 mode);


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