[SongUtil] Added GetPlayableSteps(Song) Lua binding.

This commit is contained in:
AJ Kelly
2011-06-11 13:13:30 -05:00
parent aeb07190d8
commit cd3bb6f0ed
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ StepMania 5.0 Preview 2 | 20110???
* [ScreenEdit] Allow setting the Music Preview via the Alter Menu. Just select
your area, enter the menu, and choose "Designate as Music Preview". No more
math calculations needed! [Wolfman2000]
* [SongUtil] Added GetPlayableSteps(Song) Lua binding. [AJ]
2011/06/10
----------
+9
View File
@@ -1097,6 +1097,14 @@ bool SongID::IsValid() const
namespace
{
int GetPlayableSteps( lua_State *L )
{
const Song *pSong = Luna<Song>::check( L, 1, true );
vector<Steps*> vSteps;
SongUtil::GetPlayableSteps(pSong,vSteps);
LuaHelpers::CreateTableFromArray<Steps*>( vSteps, L );
return 1;
}
int IsStepsTypePlayable( lua_State *L )
{
Song *pSong = Luna<Song>::check( L, 1, true );
@@ -1116,6 +1124,7 @@ namespace
const luaL_Reg SongUtilTable[] =
{
LIST_METHOD( GetPlayableSteps ),
LIST_METHOD( IsStepsTypePlayable ),
LIST_METHOD( IsStepsPlayable ),
{ NULL, NULL }