Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.

This commit is contained in:
Vincent Gee 2014-11-03 22:42:51 -05:00
parent 378a933894
commit acb192e2a5
133 changed files with 1716 additions and 2087 deletions

View file

@ -571,21 +571,22 @@ DefineEngineMethod( SimXMLDocument, attribute, const char*, ( const char* attrib
}
// These two methods don't make a lot of sense the way TS works. Leaving them in for backwards-compatibility.
ConsoleMethod( SimXMLDocument, attributeF32, F32, 3, 3, "(string attributeName)"
DefineConsoleMethod( SimXMLDocument, attributeF32, F32, (const char * attributeName), , "(string attributeName)"
"@brief Get float attribute from the current Element on the stack.\n\n"
"@param attributeName Name of attribute to retrieve.\n"
"@return The value of the given attribute in the form of a float.\n"
"@deprecated Use attribute().")
{
return dAtof( object->attribute( argv[2] ) );
return dAtof( object->attribute( attributeName ) );
}
ConsoleMethod(SimXMLDocument, attributeS32, S32, 3, 3, "(string attributeName)"
DefineConsoleMethod(SimXMLDocument, attributeS32, S32, (const char * attributeName), , "(string attributeName)"
"@brief Get int attribute from the current Element on the stack.\n\n"
"@param attributeName Name of attribute to retrieve.\n"
"@return The value of the given attribute in the form of an integer.\n"
"@deprecated Use attribute().")
{
return dAtoi( object->attribute( argv[2] ) );
return dAtoi( object->attribute( attributeName ) );
}
// -----------------------------------------------------------------------------