aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf_data.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf_data.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf_data.cpp b/src/lua/modules/graphics/je_lua_ttf_data.cpp
index dedf082..aa2280f 100644
--- a/src/lua/modules/graphics/je_lua_ttf_data.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf_data.cpp
@@ -22,11 +22,10 @@ namespace JinEngine
int fontsize = luax_checkinteger(L, 2);
Shared<TTFData>& shrFontData = pxyTTFData->getShared<TTFData>();
TTFData* fontData = shrFontData.getObject();
- Proxy* pxyTTF = luax_newinstance(L, Jin_Lua_TTF);
TTF* font = fontData->createTTF(fontsize);
Shared<TTF>* shrTTF = new Shared<TTF>(font, Jin_Lua_TTF);
shrTTF->setDependency((int)TTFDependency::DEP_TTFDATA, &shrFontData);
- pxyTTF->bind(shrTTF);
+ Proxy* pxyTTF = luax_newinstance(L, Jin_Lua_TTF, shrTTF);
return 1;
}
@@ -39,12 +38,12 @@ namespace JinEngine
LUA_EXPORT void luaopen_TTFData(lua_State* L)
{
- luaL_Reg f[] = {
+ luaL_Reg methods[] = {
{ "__gc", l_gc },
{ "newTTF", l_newTTF },
{ 0, 0 }
};
- luax_newtype(L, Jin_Lua_TTFData, f);
+ luax_newtype(L, Jin_Lua_TTFData, methods);
}