diff --git a/stepmania/src/TimingData.cpp b/stepmania/src/TimingData.cpp index 46720f78fd..6fb401639f 100644 --- a/stepmania/src/TimingData.cpp +++ b/stepmania/src/TimingData.cpp @@ -433,6 +433,24 @@ void TimingData::NoteRowToMeasureAndBeat( int iNoteRow, int &iMeasureIndexOut, i return; } + +// lua start +#include "LuaBinding.h" + +class LunaTimingData: public Luna +{ +public: + static int HasStops( T* p, lua_State *L ) { lua_pushboolean(L, p->HasStops()); return 1; } + + LunaTimingData() + { + ADD_METHOD( HasStops ); + } +}; + +LUA_REGISTER_CLASS( TimingData ) +// lua end + /* * (c) 2001-2004 Chris Danford, Glenn Maynard * All rights reserved. diff --git a/stepmania/src/TimingData.h b/stepmania/src/TimingData.h index 6ff191d993..7356860b88 100644 --- a/stepmania/src/TimingData.h +++ b/stepmania/src/TimingData.h @@ -4,6 +4,7 @@ #define TIMING_DATA_H #include "NoteTypes.h" +struct lua_State; #define COMPARE(x) if(x!=other.x) return false; @@ -132,6 +133,9 @@ public: void InsertRows( int iStartRow, int iRowsToAdd ); void DeleteRows( int iStartRow, int iRowsToDelete ); + // Lua + void PushSelf( lua_State *L ); + RString m_sFile; // informational only vector m_BPMSegments; // this must be sorted before gameplay vector m_StopSegments; // this must be sorted before gameplay