[Scummvm-cvs-logs] SF.net SVN: scummvm:[54688] scummvm/trunk/engines/mohawk

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Tue Nov 30 22:06:41 CET 2010


Revision: 54688
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54688&view=rev
Author:   fuzzie
Date:     2010-11-30 21:06:40 +0000 (Tue, 30 Nov 2010)

Log Message:
-----------
MOHAWK: add changePage Living Books debug command

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

Modified: scummvm/trunk/engines/mohawk/console.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/console.cpp	2010-11-30 21:05:45 UTC (rev 54687)
+++ scummvm/trunk/engines/mohawk/console.cpp	2010-11-30 21:06:40 UTC (rev 54688)
@@ -652,6 +652,7 @@
 	DCmd_Register("playSound",			WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound));
 	DCmd_Register("stopSound",			WRAP_METHOD(LivingBooksConsole, Cmd_StopSound));
 	DCmd_Register("drawImage",			WRAP_METHOD(LivingBooksConsole, Cmd_DrawImage));
+	DCmd_Register("changePage",			WRAP_METHOD(LivingBooksConsole, Cmd_ChangePage));
 }
 
 LivingBooksConsole::~LivingBooksConsole() {
@@ -694,4 +695,16 @@
 	return false;
 }
 
+bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
+	if (argc == 1) {
+		DebugPrintf("Usage: changePage <page>\n");
+		return true;
+	}
+
+	if (_vm->tryLoadPageStart(_vm->getCurMode(), atoi(argv[1])))
+		return false;
+	DebugPrintf("no such page %d\n", atoi(argv[1]));
+	return true;
+}
+
 } // End of namespace Mohawk

Modified: scummvm/trunk/engines/mohawk/console.h
===================================================================
--- scummvm/trunk/engines/mohawk/console.h	2010-11-30 21:05:45 UTC (rev 54687)
+++ scummvm/trunk/engines/mohawk/console.h	2010-11-30 21:06:40 UTC (rev 54688)
@@ -107,6 +107,7 @@
 	bool Cmd_PlaySound(int argc, const char **argv);
 	bool Cmd_StopSound(int argc, const char **argv);
 	bool Cmd_DrawImage(int argc, const char **argv);
+	bool Cmd_ChangePage(int argc, const char **argv);
 };
 
 } // End of namespace Mohawk


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