[Scummvm-cvs-logs] SF.net SVN: scummvm:[45761] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sun Nov 8 22:22:33 CET 2009
Revision: 45761
http://scummvm.svn.sourceforge.net/scummvm/?rev=45761&view=rev
Author: megath
Date: 2009-11-08 21:22:32 +0000 (Sun, 08 Nov 2009)
Log Message:
-----------
added set_ons command to console
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/console.cpp
scummvm/trunk/engines/teenagent/console.h
Modified: scummvm/trunk/engines/teenagent/console.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/console.cpp 2009-11-08 20:53:55 UTC (rev 45760)
+++ scummvm/trunk/engines/teenagent/console.cpp 2009-11-08 21:22:32 UTC (rev 45761)
@@ -30,6 +30,7 @@
Console::Console(TeenAgentEngine *engine) : _engine(engine) {
DCmd_Register("enable_object", WRAP_METHOD(Console, enableObject));
DCmd_Register("disable_object", WRAP_METHOD(Console, enableObject));
+ DCmd_Register("set_ons", WRAP_METHOD(Console, setOns));
}
bool Console::enableObject(int argc, const char **argv) {
@@ -61,4 +62,37 @@
return true;
}
+bool Console::setOns(int argc, const char **argv) {
+ if (argc < 3) {
+ DebugPrintf("usage: %s index(0-3) value [scene_id]\n", argv[0]);
+ return true;
+ }
+
+ int index = atoi(argv[1]);
+ if (index < 0 || index > 3) {
+ DebugPrintf("index %d is invalid\n", index);
+ return true;
+ }
+
+ int value = 0;
+ value = atoi(argv[2]);
+ if (value < 0) {
+ DebugPrintf("invalid value\n");
+ return true;
+ }
+
+ int scene_id = 0;
+ if (argc > 3) {
+ scene_id = atoi(argv[3]);
+ if (scene_id < 0) {
+ DebugPrintf("scene id %d is invalid\n", scene_id);
+ return true;
+ }
+ }
+
+ _engine->setOns(index, value, scene_id);
+
+ return true;
}
+
+}
Modified: scummvm/trunk/engines/teenagent/console.h
===================================================================
--- scummvm/trunk/engines/teenagent/console.h 2009-11-08 20:53:55 UTC (rev 45760)
+++ scummvm/trunk/engines/teenagent/console.h 2009-11-08 21:22:32 UTC (rev 45761)
@@ -37,6 +37,7 @@
private:
bool enableObject(int argc, const char **argv);
+ bool setOns(int argc, const char **argv);
TeenAgentEngine *_engine;
};
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