From 21f01e2bdbc7f9c889161b0b80ee4bedbfe245b3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 16 Mar 2007 01:23:22 +0000 Subject: [PATCH] bindings --- stepmania/src/PlayerStageStats.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/stepmania/src/PlayerStageStats.cpp b/stepmania/src/PlayerStageStats.cpp index 033b3ba9b7..d15ea1c189 100644 --- a/stepmania/src/PlayerStageStats.cpp +++ b/stepmania/src/PlayerStageStats.cpp @@ -648,6 +648,27 @@ public: DEFINE_METHOD( GetPerDifficultyAward, m_pdaToShow ) DEFINE_METHOD( GetPeakComboAward, m_pcaToShow ) + static int GetPlayedSteps( T* p, lua_State *L ) + { + lua_newtable(L); + for( int i = 0; i < (int) p->m_vpPlayedSteps.size(); ++i ) + { + p->m_vpPlayedSteps[i]->PushSelf(L); + lua_rawseti( L, -2, i+1 ); + } + return 1; + } + static int GetPossibleSteps( T* p, lua_State *L ) + { + lua_newtable(L); + for( int i = 0; i < (int) p->m_vpPossibleSteps.size(); ++i ) + { + p->m_vpPossibleSteps[i]->PushSelf(L); + lua_rawseti( L, -2, i+1 ); + } + return 1; + } + LunaPlayerStageStats() { ADD_METHOD( GetCaloriesBurned ); @@ -671,6 +692,8 @@ public: ADD_METHOD( GetMachineHighScoreIndex ); ADD_METHOD( GetPerDifficultyAward ); ADD_METHOD( GetPeakComboAward ); + ADD_METHOD( GetPlayedSteps ); + ADD_METHOD( GetPossibleSteps ); } };