added elapsedTime()

git-svn-id: svn://anubis/anaglym/trunk@41 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-10-01 02:02:57 +00:00
parent 7bc249599f
commit 95c13516ef
2 changed files with 8 additions and 0 deletions

7
ag.cc
View File

@ -29,6 +29,7 @@ namespace ag
{ "startFrame", startFrame },
{ "endFrame", endFrame },
{ "setCamera", setCamera },
{ "elapsedTime", elapsedTime },
{ NULL, NULL }
};
luaL_register(L, "ag", functions);
@ -188,6 +189,12 @@ namespace ag
return g_engine->setCamera(L);
}
int elapsedTime(lua_State * L)
{
lua_pushinteger(L, SDL_GetTicks());
return 1;
}
namespace object
{
int draw(lua_State * L)

1
ag.h
View File

@ -16,6 +16,7 @@ namespace ag
int startFrame(lua_State * L);
int endFrame(lua_State * L);
int setCamera(lua_State * L);
int elapsedTime(lua_State * L);
namespace object
{