From f7c031ec3c776d446fb2cb9f1aca42c7ee310192 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 17 Feb 2005 17:14:33 +0000 Subject: [PATCH] add Lua methods --- stepmania/src/Profile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 3b3f140962..9dc29ce44a 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -1682,6 +1682,8 @@ class LunaProfile : public Luna public: LunaProfile() { LUA->Register( Register ); } + static int GetWeightPounds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iWeightPounds ); return 1; } + static int SetWeightPounds( T* p, lua_State *L ) { p->m_iWeightPounds = FArg(1); return 0; } static int GetGoalType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_GoalType ); return 1; } static int GetGoalCalories( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalCalories ); return 1; } static int GetGoalSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalSeconds ); return 1; } @@ -1690,7 +1692,11 @@ public: static void Register(lua_State *L) { + ADD_METHOD( GetWeightPounds ) + ADD_METHOD( SetWeightPounds ) + ADD_METHOD( GetGoalType ) ADD_METHOD( GetGoalCalories ) + ADD_METHOD( GetGoalSeconds ) ADD_METHOD( GetCaloriesBurnedToday ) ADD_METHOD( GetSaved ) Luna::Register( L );