lua
This commit is contained in:
@@ -183,6 +183,27 @@ bool Trail::ContainsSong( Song* pSong ) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lua start
|
||||||
|
#include "LuaBinding.h"
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
class LunaTrail : public Luna<T>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LunaTrail() { LUA->Register( Register ); }
|
||||||
|
|
||||||
|
static int GetDifficulty( T* p, lua_State *L ) { lua_pushnumber(L, p->m_CourseDifficulty ); return 1; }
|
||||||
|
|
||||||
|
static void Register(lua_State *L)
|
||||||
|
{
|
||||||
|
ADD_METHOD( GetDifficulty )
|
||||||
|
Luna<T>::Register( L );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
LUA_REGISTER_CLASS( Trail )
|
||||||
|
// lua end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
class Song;
|
class Song;
|
||||||
class Steps;
|
class Steps;
|
||||||
|
struct lua_State;
|
||||||
|
|
||||||
struct TrailEntry
|
struct TrailEntry
|
||||||
{
|
{
|
||||||
@@ -70,6 +71,9 @@ public:
|
|||||||
void GetDisplayBpms( DisplayBpms &AddTo );
|
void GetDisplayBpms( DisplayBpms &AddTo );
|
||||||
bool IsSecret() const;
|
bool IsSecret() const;
|
||||||
bool ContainsSong( Song* pSong ) const;
|
bool ContainsSong( Song* pSong ) const;
|
||||||
|
|
||||||
|
// Lua
|
||||||
|
void PushSelf( lua_State *L );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user