[Scummvm-cvs-logs] SF.net SVN: scummvm:[45093] scummvm/trunk/engines/sci/engine

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Oct 14 23:45:17 CEST 2009


Revision: 45093
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45093&view=rev
Author:   m_kiewitz
Date:     2009-10-14 21:45:16 +0000 (Wed, 14 Oct 2009)

Log Message:
-----------
SCI: kAnimate now delays a bit if needed (fixes typing in intro of lsl5, kq6 sierra logo and much more)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/state.h

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-14 20:21:43 UTC (rev 45092)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-14 21:45:16 UTC (rev 45093)
@@ -933,6 +933,16 @@
 	process_sound_events(s);
 
 	s->_gui->animate(castListReference, cycle, argc, argv);
+
+	// Do some speed throttling to calm down games that rely on counting cycles
+	uint32 curTime = g_system->getMillis();
+	uint32 duration = curTime - s->_lastAnimateTime;
+
+	if (duration < 50) {
+		g_system->delayMillis(50-duration);
+	}
+	s->_lastAnimateTime = curTime;
+
 	return s->r_acc;
 }
 

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2009-10-14 20:21:43 UTC (rev 45092)
+++ scummvm/trunk/engines/sci/engine/state.h	2009-10-14 21:45:16 UTC (rev 45093)
@@ -218,6 +218,8 @@
 	uint32 game_start_time; /**< The time at which the interpreter was started */
 	uint32 last_wait_time; /**< The last time the game invoked Wait() */
 
+	uint32 _lastAnimateTime; /**< last time kAnimate was invoked */
+
 	/* Kernel File IO stuff */
 
 	Common::Array<FileHandle> _fileHandles; /**< Array of file handles. Dynamically increased if required. */


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