[splittiming] Add PlayerState.GetSongPosition() and GameState.GetSongPosition() to Lua; add lua bindings to SongPosition
This commit is contained in:
@@ -2251,11 +2251,13 @@ public:
|
||||
DEFINE_METHOD( GetHardestStepsDifficulty, GetHardestStepsDifficulty() )
|
||||
DEFINE_METHOD( IsEventMode, IsEventMode() )
|
||||
DEFINE_METHOD( GetNumPlayersEnabled, GetNumPlayersEnabled() )
|
||||
//TODO: move GetSongBeat (etc.) to a compatbility layer
|
||||
DEFINE_METHOD( GetSongBeat, m_Position.m_fSongBeat )
|
||||
DEFINE_METHOD( GetSongBeatVisible, m_Position.m_fSongBeatVisible )
|
||||
DEFINE_METHOD( GetSongBPS, m_Position.m_fCurBPS )
|
||||
DEFINE_METHOD( GetSongFreeze, m_Position.m_bFreeze )
|
||||
DEFINE_METHOD( GetSongDelay, m_Position.m_bDelay )
|
||||
DEFINE_METHOD( GetSongPosition, m_Position )
|
||||
DEFINE_METHOD( GetGameplayLeadIn, m_bGameplayLeadIn )
|
||||
DEFINE_METHOD( GetCoins, m_iCoins )
|
||||
DEFINE_METHOD( IsSideJoined, m_bSideIsJoined[Enum::Check<PlayerNumber>(L, 1)] )
|
||||
@@ -2465,6 +2467,7 @@ public:
|
||||
ADD_METHOD( GetSongBPS );
|
||||
ADD_METHOD( GetSongFreeze );
|
||||
ADD_METHOD( GetSongDelay );
|
||||
ADD_METHOD( GetSongPosition );
|
||||
ADD_METHOD( GetGameplayLeadIn );
|
||||
ADD_METHOD( GetCoins );
|
||||
ADD_METHOD( IsSideJoined );
|
||||
|
||||
@@ -197,6 +197,7 @@ class LunaPlayerState: public Luna<PlayerState>
|
||||
{
|
||||
public:
|
||||
DEFINE_METHOD( GetPlayerNumber, m_PlayerNumber );
|
||||
DEFINE_METHOD( GetSongPosition, m_Position );
|
||||
DEFINE_METHOD( GetMultiPlayerNumber, m_mp );
|
||||
DEFINE_METHOD( GetPlayerController, m_PlayerController );
|
||||
static int SetPlayerOptions( T* p, lua_State *L )
|
||||
|
||||
@@ -74,6 +74,38 @@ void SongPosition::Reset()
|
||||
|
||||
}
|
||||
|
||||
//lua start
|
||||
#include "LuaBinding.h"
|
||||
class LunaSongPosition: public Luna<SongPosition>
|
||||
{
|
||||
public:
|
||||
DEFINE_METHOD( GetMusicSecondsVisible, m_fMusicSecondsVisible );
|
||||
DEFINE_METHOD( GetSongBeatVisible, m_fSongBeatVisible );
|
||||
DEFINE_METHOD( GetMusicSeconds, m_fMusicSeconds );
|
||||
DEFINE_METHOD( GetSongBeat, m_fSongBeat );
|
||||
DEFINE_METHOD( GetSongBeatNoOffset, m_fSongBeatNoOffset );
|
||||
DEFINE_METHOD( GetCurBPS, m_fCurBPS );
|
||||
DEFINE_METHOD( GetFreeze, m_bFreeze );
|
||||
DEFINE_METHOD( GetDelay, m_bDelay );
|
||||
DEFINE_METHOD( GetWarpBeginRow, m_fWarpBeginRow );
|
||||
DEFINE_METHOD( GetWarpDestination, m_fWarpDestination );
|
||||
|
||||
LunaSongPosition()
|
||||
{
|
||||
ADD_METHOD( GetMusicSecondsVisible );
|
||||
ADD_METHOD( GetSongBeatVisible );
|
||||
ADD_METHOD( GetMusicSeconds );
|
||||
ADD_METHOD( GetSongBeat );
|
||||
ADD_METHOD( GetSongBeatNoOffset );
|
||||
ADD_METHOD( GetCurBPS );
|
||||
ADD_METHOD( GetFreeze );
|
||||
ADD_METHOD( GetDelay );
|
||||
ADD_METHOD( GetWarpBeginRow );
|
||||
ADD_METHOD( GetWarpDestination );
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_CLASS( SongPosition )
|
||||
/**
|
||||
* @file
|
||||
* @author Thai Pangsakulyanont (c) 2011
|
||||
|
||||
Reference in New Issue
Block a user