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

@ -0,0 +1,39 @@
#include "platform/platform.h"
#include "console/console.h"
#include "console/consoleTypes.h"
#include "gfx/bitmap/gBitmap.h"
#include "gui/core/guiControl.h"
#include "gfx/gfxDevice.h"
#include "gfx/gfxTextureHandle.h"
#include "gfx/gfxDrawUtil.h"
#include "console/engineAPI.h"
class GuiChunkedBitmapCtrl : public GuiControl
{
private:
typedef GuiControl Parent;
void renderRegion(const Point2I &offset, const Point2I &extent);
protected:
StringTableEntry mBitmapName;
GFXTexHandle mTexHandle;
bool mUseVariable;
bool mTile;
public:
//creation methods
DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
DECLARE_CATEGORY( "Gui Images" );
GuiChunkedBitmapCtrl();
static void initPersistFields();
//Parental methods
bool onWake();
void onSleep();
void setBitmap(const char *name);
void onRender(Point2I offset, const RectI &updateRect);
};

View file

@ -31,35 +31,8 @@
#include "gfx/gfxDrawUtil.h"
#include "console/engineAPI.h"
#include "GuiChunkedBitmapCtrl.h"
class GuiChunkedBitmapCtrl : public GuiControl
{
private:
typedef GuiControl Parent;
void renderRegion(const Point2I &offset, const Point2I &extent);
protected:
StringTableEntry mBitmapName;
GFXTexHandle mTexHandle;
bool mUseVariable;
bool mTile;
public:
//creation methods
DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
DECLARE_CATEGORY( "Gui Images" );
GuiChunkedBitmapCtrl();
static void initPersistFields();
//Parental methods
bool onWake();
void onSleep();
void setBitmap(const char *name);
void onRender(Point2I offset, const RectI &updateRect);
};
IMPLEMENT_CONOBJECT(GuiChunkedBitmapCtrl);

View file

@ -25,6 +25,7 @@
#include "console/console.h"
#include "console/consoleTypes.h"
#include "console/engineAPI.h"
#include "gfx/gfxDrawUtil.h"
@ -176,13 +177,13 @@ ConsoleDocClass( GuiIdleCamFadeBitmapCtrl,
"This is going to be deprecated, and any useful code ported to FadeinBitmap\n\n"
"@internal");
ConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, 2, 2, "()"
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
"@internal")
{
object->fadeIn();
}
ConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, 2, 2, "()"
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
"@internal")
{
object->fadeOut();