Code Question
by William Todd Scott · in Torque Game Engine Advanced · 08/18/2007 (6:19 pm) · 3 replies
Hi,
Sorry for the obscure title, but I wasn't sure what to categorize this as....
I am seeing code like this in different spots in the engine:
In particular the first two lines of the function with object and argc.
Can someone tell me what these lines are doing? To be honest, I'm not really sure why that is even valid C++ syntax, so any enlightment is helpful!
Thanks
Todd
Sorry for the obscure title, but I wasn't sure what to categorize this as....
I am seeing code like this in different spots in the engine:
ConsoleMethod( GuiCanvas, setContent, void, 3, 3, "(GuiControl ctrl)"
"Set the content of the canvas.")
{
object;
argc;
GuiControl *gui = NULL;
if(argv[2][0])
{
if (!Sim::findObject(argv[2], gui))
{
Con::printf("%s(): Invalid control: %s", argv[0], argv[2]);
return;
}
}
//set the new content control
Canvas->setContentControl(gui);
}In particular the first two lines of the function with object and argc.
Can someone tell me what these lines are doing? To be honest, I'm not really sure why that is even valid C++ syntax, so any enlightment is helpful!
Thanks
Todd
Torque 3D Owner Peter Simard
Default Studio Name