Added two new Lua bindings to Song.
GetSampleStart() GetSampleLength()
This commit is contained in:
@@ -8,6 +8,11 @@ ________________________________________________________________________________
|
||||
StepMania 5.0 $next | 2011????
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
2011/09/18
|
||||
----------
|
||||
* [Song] Added GetSampleStart() and GetSampleLength()
|
||||
Lua bindings. [Wolfman2000]
|
||||
|
||||
2011/09/16
|
||||
----------
|
||||
* [UnlockManager] Added GetNumLockedSongs() Lua binding. [Wolfman2000]
|
||||
|
||||
@@ -1279,6 +1279,8 @@
|
||||
<Function name='GetMusicPath'/>
|
||||
<Function name='GetOneSteps'/>
|
||||
<Function name='GetOrigin'/>
|
||||
<Function name='GetSampleLength'/>
|
||||
<Function name='GetSampleStart'/>
|
||||
<Function name='GetSongDir'/>
|
||||
<Function name='GetSongFilePath'/>
|
||||
<Function name='GetStepsByStepsType'/>
|
||||
|
||||
@@ -3364,6 +3364,12 @@
|
||||
<Function name='GetOrigin' return='string' arguments=''>
|
||||
Gets the Song's origin.
|
||||
</Function>
|
||||
<Function name='GetSampleLength' return='float' arguments=''>
|
||||
Gets the length of a song's sample time in seconds.
|
||||
</Function>
|
||||
<Function name='GetSampleStart' return='float' arguments=''>
|
||||
Gets the starting position of a song sample in seconds.
|
||||
</Function>
|
||||
<Function name='GetSongDir' return='string' arguments=''>
|
||||
Returns the song's directory.
|
||||
</Function>
|
||||
|
||||
@@ -1761,6 +1761,16 @@ public:
|
||||
lua_pushnumber(L, p->m_fMusicLengthSeconds);
|
||||
return 1;
|
||||
}
|
||||
static int GetSampleStart( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushnumber(L, p->m_fMusicSampleStartSeconds);
|
||||
return 1;
|
||||
}
|
||||
static int GetSampleLength( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushnumber(L, p->m_fMusicSampleLengthSeconds);
|
||||
return 1;
|
||||
}
|
||||
static int IsLong( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushboolean(L, p->IsLong());
|
||||
@@ -1926,6 +1936,8 @@ public:
|
||||
ADD_METHOD( IsEnabled );
|
||||
ADD_METHOD( GetGroupName );
|
||||
ADD_METHOD( MusicLengthSeconds );
|
||||
ADD_METHOD( GetSampleStart );
|
||||
ADD_METHOD( GetSampleLength );
|
||||
ADD_METHOD( IsLong );
|
||||
ADD_METHOD( IsMarathon );
|
||||
ADD_METHOD( HasStepsType );
|
||||
|
||||
Reference in New Issue
Block a user