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
+3 -5
View File
@@ -192,15 +192,13 @@ void CourseEntryDisplay::SetFromGameState( int iCourseEntryIndex )
class LunaCourseEntryDisplay: public Luna<CourseEntryDisplay>
{
public:
LunaCourseEntryDisplay() { LUA->Register( Register ); }
static int SetFromGameState( T* p, lua_State *L ) { p->SetFromGameState(IArg(1)); return 0; }
static void Register(lua_State *L)
LunaCourseEntryDisplay()
{
ADD_METHOD( SetFromGameState );
LUA->Register( Register );
Luna<T>::Register( L );
ADD_METHOD( SetFromGameState );
}
};