aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_canvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_canvas.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_canvas.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_canvas.cpp b/src/lua/modules/graphics/je_lua_canvas.cpp
index 70edfd1..be6bb84 100644
--- a/src/lua/modules/graphics/je_lua_canvas.cpp
+++ b/src/lua/modules/graphics/je_lua_canvas.cpp
@@ -1,7 +1,8 @@
#include "lua/modules/luax.h"
-#include "lua/modules/types.h"
+
#include "lua/common/je_lua_common.h"
#include "libjin/jin.h"
+#include "je_lua_canvas.h"
using namespace JinEngine::Graphics;
@@ -10,11 +11,13 @@ namespace JinEngine
namespace Lua
{
+ const char* Jin_Lua_Canvas = "Canvas";
+
typedef Shared<Canvas>& SharedCanvas;
LUA_IMPLEMENT inline SharedCanvas checkCanvas(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_CANVAS);
+ Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Canvas);
return proxy->getShared<Canvas>();
}
@@ -42,7 +45,7 @@ namespace JinEngine
LUA_IMPLEMENT int l_gc(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_CANVAS);
+ Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Canvas);
proxy->release();
return 0;
}
@@ -56,7 +59,7 @@ namespace JinEngine
{ "getSize", l_getSize },
{ 0, 0 }
};
- luax_newtype(L, JIN_GRAPHICS_CANVAS, f);
+ luax_newtype(L, Jin_Lua_Canvas, f);
return 0;
}