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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sat Jul 31 21:18:37 CEST 2010


Revision: 51548
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51548&view=rev
Author:   mthreepwood
Date:     2010-07-31 19:18:35 +0000 (Sat, 31 Jul 2010)

Log Message:
-----------
SCI: Don't include the time running the debugger in the game running time

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/console.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-07-31 18:21:22 UTC (rev 51547)
+++ scummvm/trunk/engines/sci/console.cpp	2010-07-31 19:18:35 UTC (rev 51548)
@@ -67,7 +67,7 @@
 static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeValue);
 
 Console::Console(SciEngine *engine) : GUI::Debugger(),
-	_engine(engine), _debugState(engine->_debugState) {
+	_engine(engine), _debugState(engine->_debugState), _enterTime(0) {
 
 	// Variables
 	DVar_Register("sleeptime_factor",	&g_debug_sleeptime_factor, DVAR_INT, 0);
@@ -214,6 +214,7 @@
 void Console::preEnter() {
 	if (g_sci && g_sci->_soundCmd)
 		g_sci->_soundCmd->pauseAll(true);
+	_enterTime = g_system->getMillis();
 }
 
 void Console::postEnter() {
@@ -272,6 +273,9 @@
 		_videoFile.clear();
 		_videoFrameDelay = 0;
 	}
+
+	// Subtract the time we were running the debugger from the game running time
+	_engine->_gamestate->gameStartTime += g_system->getMillis() - _enterTime;
 }
 
 bool Console::cmdHelp(int argc, const char **argv) {

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2010-07-31 18:21:22 UTC (rev 51547)
+++ scummvm/trunk/engines/sci/console.h	2010-07-31 19:18:35 UTC (rev 51548)
@@ -163,6 +163,7 @@
 	bool _mouseVisible;
 	Common::String _videoFile;
 	int _videoFrameDelay;
+	uint32 _enterTime;
 };
 
 } // End of namespace Sci


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