simpler Lua boilerplate
This commit is contained in:
@@ -198,24 +198,19 @@ void Character::UndemandGraphics()
|
||||
class LunaCharacter: public Luna<Character>
|
||||
{
|
||||
public:
|
||||
LunaCharacter() { LUA->Register( Register ); }
|
||||
|
||||
static int GetCardPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetCardPath() ); return 1; }
|
||||
static int GetIconPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetIconPath() ); return 1; }
|
||||
static int GetSongSelectIconPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongSelectIconPath() ); return 1; }
|
||||
static int GetStageIconPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetStageIconPath() ); return 1; }
|
||||
|
||||
RString GetCardPath() const;
|
||||
RString GetIconPath() const;
|
||||
|
||||
static void Register( Lua *L )
|
||||
LunaCharacter()
|
||||
{
|
||||
LUA->Register( Register );
|
||||
|
||||
ADD_METHOD( GetCardPath );
|
||||
ADD_METHOD( GetIconPath );
|
||||
ADD_METHOD( GetSongSelectIconPath );
|
||||
ADD_METHOD( GetStageIconPath );
|
||||
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user