aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_texture.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-11 20:18:26 +0800
committerchai <chaifix@163.com>2018-11-11 20:18:26 +0800
commit7c2f33bdf37de7acf9b0728a115377081344db1c (patch)
treecd82766dd4d1d84229ae610e69225bb48b3001b9 /src/lua/modules/graphics/je_lua_texture.cpp
parente92caa97329016d012b46b9d37e1b2c3b613a8f2 (diff)
*格式化
Diffstat (limited to 'src/lua/modules/graphics/je_lua_texture.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_texture.cpp18
1 files changed, 9 insertions, 9 deletions
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<Texture>& TextureRef;
+ typedef Shared<Texture>& 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<Texture>();
@@ -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;
}