add lua binding

This commit is contained in:
Chris Danford
2008-02-15 09:21:53 +00:00
parent acc5c7e7d5
commit 2eb7c3627a
2 changed files with 22 additions and 0 deletions
+18
View File
@@ -433,6 +433,24 @@ void TimingData::NoteRowToMeasureAndBeat( int iNoteRow, int &iMeasureIndexOut, i
return;
}
// lua start
#include "LuaBinding.h"
class LunaTimingData: public Luna<TimingData>
{
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.
+4
View File
@@ -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<BPMSegment> m_BPMSegments; // this must be sorted before gameplay
vector<StopSegment> m_StopSegments; // this must be sorted before gameplay