simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 20:30:29 +00:00
parent df887f4efd
commit f4975f1f54
25 changed files with 80 additions and 124 deletions
+3 -5
View File
@@ -788,15 +788,13 @@ bool Model::MaterialsNeedNormals() const
class LunaModel: public Luna<Model>
{
public:
LunaModel() { LUA->Register( Register ); }
static int playanimation( T* p, lua_State *L ) { p->PlayAnimation(SArg(1),FArg(2)); return 0; }
static void Register(lua_State *L)
LunaModel()
{
ADD_METHOD( playanimation );
LUA->Register( Register );
Luna<T>::Register( L );
ADD_METHOD( playanimation );
}
};