aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_bitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_bitmap.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_bitmap.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_bitmap.cpp b/src/lua/modules/graphics/je_lua_bitmap.cpp
index 24641a0..2495fb3 100644
--- a/src/lua/modules/graphics/je_lua_bitmap.cpp
+++ b/src/lua/modules/graphics/je_lua_bitmap.cpp
@@ -90,14 +90,13 @@ namespace JinEngine
SharedBitmap shared = checkBitmap(L);
Bitmap* bitmap = shared.getObject();
Bitmap* b = Bitmap::clone(bitmap);
- Proxy* proxy = luax_newinstance(L, Jin_Lua_Bitmap);
- proxy->bind(new Shared<Bitmap>(b, Jin_Lua_Bitmap));
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Bitmap, new Shared<Bitmap>(b, Jin_Lua_Bitmap));
return 1;
}
LUA_EXPORT void luaopen_Bitmap(lua_State* L)
{
- luaL_Reg f[] = {
+ luaL_Reg methods[] = {
{ "__gc", l_gc },
{ "getWidth", l_getWidth },
{ "getHeight", l_getHeight },
@@ -107,7 +106,7 @@ namespace JinEngine
{ "clone", l_clone },
{ 0, 0 }
};
- luax_newtype(L, Jin_Lua_Bitmap, f);
+ luax_newtype(L, Jin_Lua_Bitmap, methods);
}
} // namespace Graphics