working on AMotor support a bit more

git-svn-id: svn://anubis/anaglym/trunk@231 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2010-01-29 19:02:42 +00:00
parent 5f859d9101
commit 8eead374af

16
ag.cc
View File

@ -97,7 +97,7 @@ namespace ag
" return iter_func, table, 0\n"
"end\n"
"ag.createAMotor = function(obj1, obj2, axis1, axis2, axis3)\n"
"ag.createAMotor = function(obj1, obj2, axis0, axis1, axis2)\n"
" local o1 = obj1\n"
" local o2 = obj2\n"
" local num_axes = 1\n"
@ -111,6 +111,20 @@ namespace ag
" o2 = { id = 0 }\n"
" end\n"
" end\n"
" local num_axes = 0\n"
" if (axis0 ~= nil) then\n"
" setAMotorAxis(0, axis0)\n"
" num_axes = 1\n"
" if (axis1 ~= nil) then\n"
" setAMotorAxis(1, axis1)\n"
" num_axes = 1\n"
" if (axis2 ~= nil) then\n"
" setAMotorAxis(2, axis2)\n"
" num_axes = 2\n"
" end\n"
" end\n"
" end\n"
" ag.setAMotorNumAxes(num_axes)\n"
"end\n"
);
lua_pcall(L, 0, 0, 0);