[Scummvm-cvs-logs] SF.net SVN: scummvm:[45173] scummvm/trunk/engines/sci/engine
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Oct 16 20:46:18 CEST 2009
Revision: 45173
http://scummvm.svn.sourceforge.net/scummvm/?rev=45173&view=rev
Author: m_kiewitz
Date: 2009-10-16 18:46:18 +0000 (Fri, 16 Oct 2009)
Log Message:
-----------
SCI: kAnimate now delays the first few calls less, otherwise sq3 will remove details graphicwise. Walter please check, if this creates a regression with lsl3.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/engine/state.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-16 18:32:20 UTC (rev 45172)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-10-16 18:46:18 UTC (rev 45173)
@@ -941,9 +941,17 @@
// Do some speed throttling to calm down games that rely on counting cycles
uint32 curTime = g_system->getMillis();
uint32 duration = curTime - s->_lastAnimateTime;
+ uint32 neededSleep = 40;
- if (duration < 40) {
- gfxop_sleep(s->gfx_state, 40-duration);
+ // We are doing this, so that games like sq3 dont think we are running too slow and will remove details (like
+ // animated sierra logo at the beginning). Hopefully this wont cause regressions with pullups in lsl3 (FIXME?)
+ if (s->_lastAnimateCounter < 10) {
+ s->_lastAnimateCounter++;
+ neededSleep = 8;
+ }
+
+ if (duration < neededSleep) {
+ gfxop_sleep(s->gfx_state, neededSleep - duration);
s->_lastAnimateTime = g_system->getMillis();
} else {
s->_lastAnimateTime = curTime;
Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp 2009-10-16 18:32:20 UTC (rev 45172)
+++ scummvm/trunk/engines/sci/engine/state.cpp 2009-10-16 18:46:18 UTC (rev 45173)
@@ -106,6 +106,7 @@
successor = 0;
+ _lastAnimateCounter = 0;
_lastAnimateTime = 0;
_setCursorType = SCI_VERSION_AUTODETECT;
Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h 2009-10-16 18:32:20 UTC (rev 45172)
+++ scummvm/trunk/engines/sci/engine/state.h 2009-10-16 18:46:18 UTC (rev 45173)
@@ -178,6 +178,7 @@
uint32 game_start_time; /**< The time at which the interpreter was started */
uint32 last_wait_time; /**< The last time the game invoked Wait() */
+ uint32 _lastAnimateCounter; /**< total times kAnimate was invoked */
uint32 _lastAnimateTime; /**< last time kAnimate was invoked */
/* Kernel File IO stuff */
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