From 175ae8cac43ccbcd6587ceec1fb2ada0ad9abc21 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 21 Sep 2006 07:19:13 +0000 Subject: [PATCH] I ended up not using this. --- stepmania/src/LuaManager.cpp | 19 ------------------- stepmania/src/LuaManager.h | 4 ---- 2 files changed, 23 deletions(-) diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index deb6d8aa92..42fa6144e0 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -486,25 +486,6 @@ bool LuaHelpers::RunScriptFile( const RString &sFile ) return true; } -bool LuaHelpers::Call( Lua *L, const RString &sFunction, int iArgs, int iResults ) -{ - LuaHelpers::Push( sFunction, L ); - lua_gettable( L, LUA_GLOBALSINDEX ); - - if( lua_isnil(L, -1) ) - { - lua_pop( L, 1 ); - Dialog::OK( ssprintf("Unknown Lua function \"%s\".", sFunction.c_str()), "LUA_ERROR" ); - return false; - } - if( !lua_pcall(L, iArgs, iResults, 0) ) - return true; - - RString sError; - LuaHelpers::Pop( sError, L ); - Dialog::OK( ssprintf("Lua runtime error calling functin \"%s\": %s", sFunction.c_str(), sError.c_str()), "LUA_ERROR" ); - return false; -} bool LuaHelpers::RunScript( Lua *L, const RString &sScript, const RString &sName, RString &sError, int iReturnValues ) { diff --git a/stepmania/src/LuaManager.h b/stepmania/src/LuaManager.h index fcc418feca..935acb679d 100644 --- a/stepmania/src/LuaManager.h +++ b/stepmania/src/LuaManager.h @@ -48,10 +48,6 @@ private: namespace LuaHelpers { - /* Call a Lua function with args on the stack and the results will left on the stack. - * Returns false on error. */ - bool Call( Lua *L, const RString &sFunction, int iArgs = 0, int iResults = 0 ); - /* Run a script with the given name. Return values are left on the Lua stack. * Returns false on error, with sError set. */ bool RunScript( Lua *L, const RString &sScript, const RString &sName, RString &sError, int iReturnValues = 0 );