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

@ -38,8 +38,10 @@
#include "environment/sun.h"
#include "scene/sceneManager.h"
#include "math/mathUtils.h"
#include "math/mTransform.h"
#include "T3D/physics/physicsBody.h"
#include "forest/editor/forestBrushElement.h"
#include "console/engineAPI.h"
/// For frame signal
#include "gui/core/guiCanvas.h"
@ -359,23 +361,22 @@ void Forest::saveDataFile( const char *path )
mData->write( mDataFileName );
}
ConsoleMethod( Forest, saveDataFile, bool, 2, 3, "saveDataFile( [path] )" )
DefineConsoleMethod( Forest, saveDataFile, void, (const char * path), (""), "saveDataFile( [path] )" )
{
object->saveDataFile( argc == 3 ? (const char*)argv[2] : NULL );
return true;
object->saveDataFile( path );
}
ConsoleMethod(Forest, isDirty, bool, 2, 2, "()")
DefineConsoleMethod(Forest, isDirty, bool, (), , "()")
{
return object->getData() && object->getData()->isDirty();
}
ConsoleMethod(Forest, regenCells, void, 2, 2, "()")
DefineConsoleMethod(Forest, regenCells, void, (), , "()")
{
object->getData()->regenCells();
}
ConsoleMethod(Forest, clear, void, 2, 2, "()" )
DefineConsoleMethod(Forest, clear, void, (), , "()" )
{
object->clear();
}