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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Oct 23 13:25:49 CEST 2009


Revision: 45345
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45345&view=rev
Author:   m_kiewitz
Date:     2009-10-23 11:25:48 +0000 (Fri, 23 Oct 2009)

Log Message:
-----------
SCI: speed throttler moved to kGameIsRestarting for all games. Also made the delay shorter. sq3 now seems to work fine, kq1 also has animations and lsl5 mud wrestling is also working correctly.

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

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-23 08:55:58 UTC (rev 45344)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-23 11:25:48 UTC (rev 45345)
@@ -949,43 +949,6 @@
 
 	s->_gui->animate(castListReference, cycle, argc, argv);
 
-	// FIXME? currenty this speed throttling causes flickering in kq6 (when looking at the box)
-	//  this will get possibly fixed when reanimate and real cel updates within kAnimate are implemented
-
-	// At least kq1 gets broken by the throttler (actually "just" some animations are missing cause the game thinks we are
-	//  too slow, so also disable us for SCI0 and SCI01 games
-	if (getSciVersion() <= SCI_VERSION_01)
-		return s->r_acc;
-
-	// FIXME: qfg3 gets broken by this, BUT even changing neededSleep to 2 still makes it somewhat broken (palette animation
-	//  isnt working)
-
-	if (s->_gameName == "qfg3" && s->currentRoomNumber() == 130) {
-		// Disable the speed throttler for QFG3, room 130 (the Sierra logo).
-		// kAnimate is called loads of times in that room, and adding any delay here
-		// will make that scene seem like it's stuck (the player needs to wait 5 mins or so)
-		return s->r_acc;
-	}
-
-	// 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;
-
-	// 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;
-	}
-
 	return s->r_acc;
 }
 

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2009-10-23 08:55:58 UTC (rev 45344)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2009-10-23 11:25:48 UTC (rev 45345)
@@ -44,6 +44,8 @@
 	return NULL_REG;
 }
 
+void gfxop_sleep(GfxState *gfx, uint32 duration);
+
 /* kGameIsRestarting():
 ** Returns the restarting_flag in acc
 */
@@ -55,25 +57,15 @@
 			s->restarting_flags &= ~SCI_GAME_WAS_RESTARTED;
 	}
 
-	if (getSciVersion() <= SCI_VERSION_01) {
-		// Do speed throttling for SCI0/SCI01 games in here, actually just a test if lsl3 pushups get fixed that way
-		uint32 curTime = g_system->getMillis();
-		uint32 duration = curTime - s->_lastAnimateTime;
-		uint32 neededSleep = 40;
+	uint32 curTime = g_system->getMillis();
+	uint32 duration = curTime - s->_lastAnimateTime;
+	uint32 neededSleep = 30;
 
-		// 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) {
-			g_system->delayMillis(neededSleep - duration);
-			s->_lastAnimateTime = g_system->getMillis();
-		} else {
-			s->_lastAnimateTime = curTime;
-		}
+	if (duration < neededSleep) {
+		gfxop_sleep(s->gfx_state, neededSleep - duration);
+		s->_lastAnimateTime = g_system->getMillis();
+	} else {
+		s->_lastAnimateTime = curTime;
 	}
 
 	return s->r_acc;


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