[Scummvm-cvs-logs] SF.net SVN: scummvm:[39915] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Apr 11 00:33:29 CEST 2009


Revision: 39915
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39915&view=rev
Author:   thebluegr
Date:     2009-04-10 22:33:29 +0000 (Fri, 10 Apr 2009)

Log Message:
-----------
Added a new console command, "wake_up_threads", which can wake up threads that are block waiting

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

Modified: scummvm/trunk/engines/saga/console.cpp
===================================================================
--- scummvm/trunk/engines/saga/console.cpp	2009-04-10 21:47:10 UTC (rev 39914)
+++ scummvm/trunk/engines/saga/console.cpp	2009-04-10 22:33:29 UTC (rev 39915)
@@ -74,6 +74,9 @@
 	DCmd_Register("action_map_info",	WRAP_METHOD(Console, cmdActionMapInfo));
 	DCmd_Register("object_map_info",	WRAP_METHOD(Console, cmdObjectMapInfo));
 
+	// Script commands
+	DCmd_Register("wake_up_threads",	WRAP_METHOD(Console, cmdWakeUpThreads));
+
 	// Panel commands
 	DCmd_Register("current_panel_mode",	WRAP_METHOD(Console, cmdCurrentPanelMode));
 	DCmd_Register("set_panel_mode",		WRAP_METHOD(Console, cmdSetPanelMode));
@@ -159,6 +162,17 @@
 	return true;
 }
 
+bool Console::cmdWakeUpThreads(int argc, const char **argv) {
+	if (argc != 2) {
+		DebugPrintf("Usage: %s <wait type>\n", argv[0]);
+		DebugPrintf("e.g.: 1 for kWaitTypeDelay, 2 for kWaitTypeSpeech, 10 for kWaitTypeWaitFrames");
+		DebugPrintf("Refer to saga/script.h for additional types");
+	} else {
+		_vm->_script->wakeUpThreads(atoi(argv[1]));
+	}
+	return true;
+}
+
 bool Console::cmdCurrentPanelMode(int argc, const char **argv) {
 	DebugPrintf("Current Panel Mode is: %i\n", _vm->_interface->getMode());
 	return true;

Modified: scummvm/trunk/engines/saga/console.h
===================================================================
--- scummvm/trunk/engines/saga/console.h	2009-04-10 21:47:10 UTC (rev 39914)
+++ scummvm/trunk/engines/saga/console.h	2009-04-10 22:33:29 UTC (rev 39915)
@@ -52,6 +52,8 @@
 	bool cmdActionMapInfo(int argc, const char **argv);
 	bool cmdObjectMapInfo(int argc, const char **argv);
 
+	bool cmdWakeUpThreads(int argc, const char **argv);
+
 	bool cmdCurrentPanelMode(int argc, const char **argv);
 	bool cmdSetPanelMode(int argc, const char **argv);
 


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