From 7c2f33bdf37de7acf9b0728a115377081344db1c Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 11 Nov 2018 20:18:26 +0800 Subject: =?UTF-8?q?*=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/graphics/je_lua_texture.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/lua/modules/graphics/je_lua_texture.cpp') diff --git a/src/lua/modules/graphics/je_lua_texture.cpp b/src/lua/modules/graphics/je_lua_texture.cpp index a643dae..5236438 100644 --- a/src/lua/modules/graphics/je_lua_texture.cpp +++ b/src/lua/modules/graphics/je_lua_texture.cpp @@ -10,9 +10,9 @@ namespace JinEngine namespace Lua { - typedef Shared& TextureRef; + typedef Shared& SharedTexture; - LUA_IMPLEMENT inline TextureRef checkTexture(lua_State* L) + LUA_IMPLEMENT inline SharedTexture checkTexture(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_TEXTURE); return proxy->getShared(); @@ -20,23 +20,23 @@ namespace JinEngine LUA_IMPLEMENT int l_getWidth(lua_State* L) { - TextureRef ref = checkTexture(L); - luax_pushnumber(L, ref->getWidth()); + SharedTexture shared = checkTexture(L); + luax_pushnumber(L, shared->getWidth()); return 1; } LUA_IMPLEMENT int l_getHeight(lua_State *L) { - TextureRef ref = checkTexture(L); - luax_pushnumber(L, ref->getHeight()); + SharedTexture shared = checkTexture(L); + luax_pushnumber(L, shared->getHeight()); return 1; } LUA_IMPLEMENT int l_getSize(lua_State* L) { - TextureRef ref = checkTexture(L); - luax_pushnumber(L, ref->getWidth()); - luax_pushnumber(L, ref->getHeight()); + SharedTexture shared = checkTexture(L); + luax_pushnumber(L, shared->getWidth()); + luax_pushnumber(L, shared->getHeight()); return 2; } -- cgit v1.1-26-g67d0