simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 20:10:14 +00:00
parent 153bcedd40
commit 8ef5aeb341
8 changed files with 23 additions and 38 deletions
+3 -5
View File
@@ -206,8 +206,6 @@ LuaFunction( FormatPercentScore, PercentageDisplay::FormatPercentScore( FArg(1)
class LunaPercentageDisplay: public Luna<PercentageDisplay>
{
public:
LunaPercentageDisplay() { LUA->Register( Register ); }
static int LoadFromStats( T* p, lua_State *L )
{
const PlayerState *pStageStats = Luna<PlayerState>::check( L, 1 );
@@ -216,11 +214,11 @@ public:
return 0;
}
static void Register(lua_State *L)
LunaPercentageDisplay()
{
ADD_METHOD( LoadFromStats );
LUA->Register( Register );
Luna<T>::Register( L );
ADD_METHOD( LoadFromStats );
}
};