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

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Fri Jan 29 02:31:06 CET 2010


Revision: 47663
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47663&view=rev
Author:   waltervn
Date:     2010-01-29 01:31:05 +0000 (Fri, 29 Jan 2010)

Log Message:
-----------
SCI: Added OnStartup debug flag to start the debugger at the start of the game.

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

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-29 01:09:41 UTC (rev 47662)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-29 01:31:05 UTC (rev 47663)
@@ -1941,6 +1941,10 @@
 static EngineState *_game_run(EngineState *&s, int restoring) {
 	EngineState *successor = NULL;
 	int game_is_finished = 0;
+
+	if (Common::isDebugChannelEnabled(kDebugLevelOnStartup))
+		((Sci::SciEngine*)g_engine)->getSciDebugger()->attach();
+
 	do {
 		s->_executionStackPosChanged = false;
 		run_vm(s, (successor || restoring) ? 1 : 0);

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-01-29 01:09:41 UTC (rev 47662)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-01-29 01:31:05 UTC (rev 47663)
@@ -74,6 +74,7 @@
 	Common::addDebugChannel(kDebugLevelScripts, "Scripts", "Notifies when scripts are unloaded");
 	Common::addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging");
 	Common::addDebugChannel(kDebugLevelSci0Pic, "Sci0Pic", "SCI0 pic drawing debugging");
+	Common::addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game");
 
 	_gamestate = 0;
 

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2010-01-29 01:09:41 UTC (rev 47662)
+++ scummvm/trunk/engines/sci/sci.h	2010-01-29 01:31:05 UTC (rev 47663)
@@ -77,7 +77,8 @@
 	kDebugLevelScripts    = 1 << 19,
 	kDebugLevelGC         = 1 << 20,
 	kDebugLevelSci0Pic    = 1 << 21,
-	kDebugLevelResMan     = 1 << 22
+	kDebugLevelResMan     = 1 << 22,
+	kDebugLevelOnStartup  = 1 << 23
 };
 
 extern const char *versionNames[];


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