aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_texture.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_texture.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lua/modules/graphics/je_lua_texture.cpp b/src/lua/modules/graphics/je_lua_texture.cpp
index 9d2d567..7bac237 100644
--- a/src/lua/modules/graphics/je_lua_texture.cpp
+++ b/src/lua/modules/graphics/je_lua_texture.cpp
@@ -12,31 +12,29 @@ namespace JinEngine
const char* Jin_Lua_Texture = "Texture";
- typedef Shared<Texture>& SharedTexture;
-
- LUA_IMPLEMENT inline SharedTexture checkTexture(lua_State* L)
+ LUA_IMPLEMENT inline Texture* checkTexture(lua_State* L)
{
LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Texture);
- return luaObj->getShared<Texture>();
+ return luaObj->getObject<Texture>();
}
LUA_IMPLEMENT int l_getWidth(lua_State* L)
{
- SharedTexture shared = checkTexture(L);
+ Texture* shared = checkTexture(L);
luax_pushnumber(L, shared->getWidth());
return 1;
}
LUA_IMPLEMENT int l_getHeight(lua_State *L)
{
- SharedTexture shared = checkTexture(L);
+ Texture* shared = checkTexture(L);
luax_pushnumber(L, shared->getHeight());
return 1;
}
LUA_IMPLEMENT int l_getSize(lua_State* L)
{
- SharedTexture shared = checkTexture(L);
+ Texture* shared = checkTexture(L);
luax_pushnumber(L, shared->getWidth());
luax_pushnumber(L, shared->getHeight());
return 2;