simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 20:03:31 +00:00
parent ea7c05cee5
commit 153bcedd40
19 changed files with 64 additions and 96 deletions
+4 -5
View File
@@ -64,8 +64,6 @@ void HelpDisplay::Update( float fDeltaTime )
class LunaHelpDisplay: public Luna<HelpDisplay>
{
public:
LunaHelpDisplay() { LUA->Register( Register ); }
static int settips( T* p, lua_State *L )
{
luaL_checktype( L, 1, LUA_TTABLE );
@@ -104,13 +102,14 @@ public:
return 2;
}
static int setsecsbetweenswitches( T* p, lua_State *L ) { p->SetSecsBetweenSwitches( FArg(1) ); return 0; }
static void Register(lua_State *L)
LunaHelpDisplay()
{
LUA->Register( Register );
ADD_METHOD( settips );
ADD_METHOD( gettips );
ADD_METHOD( setsecsbetweenswitches );
Luna<T>::Register( L );
}
};