From 907f7d3dcc096ec3fbb6182c819f5b44cbe419f0 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 30 Jul 2005 21:12:54 +0000 Subject: [PATCH] remove ugly LuaElementCategory, add bindings for GetPath overloads --- stepmania/src/ThemeManager.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 0b76e22bca..75c8c9ba46 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -34,17 +34,6 @@ static const CString ElementCategoryNames[] = { }; XToString( ElementCategory, NUM_ElementCategory ); StringToX( ElementCategory ); -static void LuaElementCategory(lua_State* L) -{ - FOREACH_ElementCategory( ec ) - { - CString s = ElementCategoryNames[ec]; - s.MakeUpper(); - LUA->SetGlobal( "EC_"+s, ec ); - } -} -REGISTER_WITH_LUA_FUNCTION( LuaElementCategory ); - const CString BASE_THEME_NAME = "default"; @@ -910,16 +899,16 @@ public: LunaThemeManager() { LUA->Register( Register ); } static int GetMetric( T* p, lua_State *L ) { lua_pushstring(L, p->GetMetric(SArg(1),SArg(2)) ); return 1; } - static int GetPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetPath((ElementCategory)IArg(1),SArg(2),SArg(3)) ); return 1; } static int GetPathG( T* p, lua_State *L ) { lua_pushstring(L, p->GetPathG(SArg(1),SArg(2)) ); return 1; } static int GetPathB( T* p, lua_State *L ) { lua_pushstring(L, p->GetPathB(SArg(1),SArg(2)) ); return 1; } + static int GetPathS( T* p, lua_State *L ) { lua_pushstring(L, p->GetPathS(SArg(1),SArg(2)) ); return 1; } static void Register(lua_State *L) { ADD_METHOD( GetMetric ) - ADD_METHOD( GetPath ) ADD_METHOD( GetPathG ) ADD_METHOD( GetPathB ) + ADD_METHOD( GetPathS ) Luna::Register( L );