simpler Lua boilerplate

This commit is contained in:
Glenn Maynard
2006-09-27 20:30:29 +00:00
parent df887f4efd
commit f4975f1f54
25 changed files with 80 additions and 124 deletions
+3 -5
View File
@@ -2906,8 +2906,6 @@ MenuButton GameManager::GetMenuButtonSecondaryFunction( const Game *pGame, GameB
class LunaGameManager: public Luna<GameManager>
{
public:
LunaGameManager() { LUA->Register( Register ); }
static int StepsTypeToLocalizedString( T* p, lua_State *L ) { lua_pushstring(L, p->StepsTypeToLocalizedString(Enum::Check<StepsType>(L, 1)) ); return 1; }
static int GetFirstStepsTypeForGame( T* p, lua_State *L )
{
@@ -2921,12 +2919,12 @@ public:
return 1;
}
static void Register(lua_State *L)
LunaGameManager()
{
LUA->Register( Register );
ADD_METHOD( StepsTypeToLocalizedString );
ADD_METHOD( GetFirstStepsTypeForGame );
Luna<T>::Register( L );
}
};