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
@@ -110,8 +110,6 @@ void ComboGraph::Load( const StageStats &s, const PlayerStageStats &pss )
class LunaComboGraph: public Luna<ComboGraph>
{
public:
LunaComboGraph() { LUA->Register( Register ); }
static int LoadFromStats( T* p, lua_State *L )
{
StageStats *pStageStats = Luna<StageStats>::check( L, 1 );
@@ -120,11 +118,11 @@ public:
return 0;
}
static void Register(lua_State *L)
LunaComboGraph()
{
ADD_METHOD( LoadFromStats );
LUA->Register( Register );
Luna<T>::Register( L );
ADD_METHOD( LoadFromStats );
}
};