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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jan 5 22:25:59 CET 2010


Revision: 47047
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47047&view=rev
Author:   m_kiewitz
Date:     2010-01-05 21:25:59 +0000 (Tue, 05 Jan 2010)

Log Message:
-----------
SCI: implemented debug command "set_palette"

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-01-05 21:10:58 UTC (rev 47046)
+++ scummvm/trunk/engines/sci/console.cpp	2010-01-05 21:25:59 UTC (rev 47047)
@@ -108,6 +108,7 @@
 	// Screen
 	DCmd_Register("show_map",			WRAP_METHOD(Console, cmdShowMap));
 	// Graphics
+	DCmd_Register("set_palette",		WRAP_METHOD(Console, cmdSetPalette));
 	DCmd_Register("draw_pic",			WRAP_METHOD(Console, cmdDrawPic));
 	DCmd_Register("draw_cel",			WRAP_METHOD(Console, cmdDrawCel));
 	DCmd_Register("undither",           WRAP_METHOD(Console, cmdUndither));
@@ -307,6 +308,7 @@
 	DebugPrintf(" exit - Exits the game\n");
 	DebugPrintf("\n");
 	DebugPrintf("Graphics:\n");
+	DebugPrintf(" set_palette - Sets a palette resource\n");
 	DebugPrintf(" draw_pic - Draws a pic resource\n");
 	DebugPrintf(" draw_cel - Draws a cel from a view resource\n");
 	DebugPrintf(" undither - Enable/disable undithering\n");
@@ -971,6 +973,20 @@
 	return true;
 }
 
+bool Console::cmdSetPalette(int argc, const char **argv) {
+	if (argc < 2) {
+		DebugPrintf("Sets a palette resource\n");
+		DebugPrintf("Usage: %s <resourceId>\n", argv[0]);
+		DebugPrintf("where <resourceId> is the number of the palette resource to set\n");
+		return true;
+	}
+
+	uint16 resourceId = atoi(argv[1]);
+
+	_vm->_gamestate->_gui->paletteSet(resourceId, 2);
+	return true;
+}
+
 bool Console::cmdDrawPic(int argc, const char **argv) {
 	if (argc < 2) {
 		DebugPrintf("Draws a pic resource\n");

Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h	2010-01-05 21:10:58 UTC (rev 47046)
+++ scummvm/trunk/engines/sci/console.h	2010-01-05 21:25:59 UTC (rev 47047)
@@ -83,6 +83,7 @@
 	// Screen
 	bool cmdShowMap(int argc, const char **argv);
 	// Graphics
+	bool cmdSetPalette(int argc, const char **argv);
 	bool cmdDrawPic(int argc, const char **argv);
 	bool cmdDrawCel(int argc, const char **argv);
 	bool cmdUndither(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