[Scummvm-cvs-logs] CVS: scummvm/gui console.cpp,1.64,1.65

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Thu Jul 14 00:00:13 CEST 2005


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27743

Modified Files:
	console.cpp 
Log Message:
Don't count the time it takes to do the blending when timing the slide
action of the console. (I thought I could do this simpler by doing the
blending in open(), but for some reason I couldn't get that to work, and I
would still have had to blend in drawDialog() anyway, so maybe this is for
the best...)


Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/console.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- console.cpp	13 Jul 2005 14:38:26 -0000	1.64
+++ console.cpp	14 Jul 2005 06:58:06 -0000	1.65
@@ -121,7 +121,6 @@
 	// background in a separate "canvas", just like in the About dialog.
 	_canvas.pixels = NULL;
 
-
 	// Initiate sliding the console down. We do a very simple trick to achieve
 	// this effect: we simply move the console dialog just above (outside) the
 	// visible screen area, then shift it down in handleTickle() over a
@@ -145,9 +144,19 @@
 
 void ConsoleDialog::drawDialog() {
 	if (!_canvas.pixels) {
-		// Blend over the background
+		// Blend over the background. Don't count the time used for
+		// this when timing the slide action.
+
+		uint32 now = g_system->getMillis();
+		uint32 delta;
+
 		g_gui.blendRect(0, 0, _w, _h, g_gui._bgcolor, 2);
 		g_gui.copyToSurface(&_canvas, 0, 0, _w, _h);
+
+		delta = g_system->getMillis() - now;
+
+		if (_slideTime)
+			_slideTime += delta;
 	}
 
 	g_gui.drawSurface(_canvas, 0, 0);





More information about the Scummvm-git-logs mailing list