aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_animation.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-12-04 10:13:03 +0800
committerchai <chaifix@163.com>2018-12-04 10:13:03 +0800
commit8cd03a53878b9d67eb4b13fb546dbd989d8217e2 (patch)
treed27371aa2d702705dd86d3c2d8a6c4bd8bd7ec96 /src/lua/modules/graphics/je_lua_animation.cpp
parent7c0da0c1181ecf333aa784d4cce09bc160dfe908 (diff)
*proxy->lua object
Diffstat (limited to 'src/lua/modules/graphics/je_lua_animation.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_animation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/modules/graphics/je_lua_animation.cpp b/src/lua/modules/graphics/je_lua_animation.cpp
index d2c806a..32e2c9c 100644
--- a/src/lua/modules/graphics/je_lua_animation.cpp
+++ b/src/lua/modules/graphics/je_lua_animation.cpp
@@ -1,6 +1,6 @@
#include "libjin/jin.h"
-#include "common/je_lua_proxy.h"
+#include "common/je_lua_object.h"
#include "common/je_lua_common.h"
#include "je_lua_sprite.h"
@@ -24,13 +24,13 @@ namespace JinEngine
LUA_IMPLEMENT inline SharedAnimation checkAnimation(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Animation);
- return proxy->getShared<Animation>();
+ LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation);
+ return luaObj->getShared<Animation>();
}
LUA_IMPLEMENT int l_gc(lua_State* L)
{
- Proxy* p = (Proxy*)luax_checktype(L, 1, Jin_Lua_Animation);
+ LuaObject* p = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation);
p->release();
return 0;
}
@@ -39,7 +39,7 @@ namespace JinEngine
LUA_IMPLEMENT int l_addFrame(lua_State* L)
{
SharedAnimation shrAnimation = checkAnimation(L);
- Proxy* pxySprite = (Proxy*)luax_checktype(L, 2, Jin_Lua_Sprite);
+ LuaObject* pxySprite = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Sprite);
Shared<Sprite>& shrSprite = pxySprite->getShared<Sprite>();
shrAnimation->addFrame(shrSprite.getObject());
int i = shrAnimation->getFrameCount() - 1;
@@ -60,7 +60,7 @@ namespace JinEngine
for (int i = 1; i <= n; ++i)
{
luax_rawgeti(L, 2, i);
- Proxy* pxySprite = (Proxy*)luax_checktype(L, -1, Jin_Lua_Sprite);
+ LuaObject* pxySprite = (LuaObject*)luax_checktype(L, -1, Jin_Lua_Sprite);
Shared<Sprite>& shrSprite = pxySprite->getShared<Sprite>();
shrAnimation->addFrame(shrSprite.getObject());
int index = shrAnimation->getFrameCount() - 1;