simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 19:47:52 +00:00
parent e0bf203af4
commit 4002071bea
7 changed files with 29 additions and 43 deletions
+4 -5
View File
@@ -2634,16 +2634,15 @@ void ScreenGameplay::SaveReplay()
class LunaScreenGameplay: public Luna<ScreenGameplay>
{
public:
LunaScreenGameplay() { LUA->Register( Register ); }
static int GetNextCourseSong( T* p, lua_State *L ) { p->GetNextCourseSong()->PushSelf(L); return 1; }
static int Center1Player( T* p, lua_State *L ) { lua_pushboolean( L, p->Center1Player() ); return 1; }
static void Register( Lua *L )
LunaScreenGameplay()
{
LUA->Register( Register );
ADD_METHOD( GetNextCourseSong );
ADD_METHOD( Center1Player );
Luna<T>::Register( L );
}
};