diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index 644d7d70a2..d019d13a88 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -54,6 +54,30 @@ const char *ChunkReaderString( lua_State *L, void *ptr, size_t *size ) return ret; } +void LuaManager::SetGlobal( const CString &sName, int val ) +{ + LuaHelpers::PushStack(val); + SetGlobal( sName ); +} + +void LuaManager::SetGlobal( const CString &sName, bool val ) +{ + LuaHelpers::PushStack(val); + SetGlobal( sName ); +} + +void LuaManager::SetGlobal( const CString &sName, const CString &val ) +{ + LuaHelpers::PushStack(val); + SetGlobal( sName ); +} + +void LuaManager::UnsetGlobal( const CString &sName ) +{ + PushStackNil(); + SetGlobal( sName ); +} + void LuaManager::PushStackNil() { lua_pushnil( L ); diff --git a/stepmania/src/LuaManager.h b/stepmania/src/LuaManager.h index 0dc2c76a10..9dab9a1c60 100644 --- a/stepmania/src/LuaManager.h +++ b/stepmania/src/LuaManager.h @@ -81,10 +81,10 @@ public: void Fail( const CString &err ); - void SetGlobal( const CString &sName, int val ) { LuaHelpers::PushStack(val); SetGlobal( sName ); } - void SetGlobal( const CString &sName, bool val ) { LuaHelpers::PushStack(val); SetGlobal( sName ); } - void SetGlobal( const CString &sName, const CString &val ) { LuaHelpers::PushStack(val); SetGlobal( sName ); } - void UnsetGlobal( const CString &sName ) { PushStackNil(); SetGlobal( sName ); } + void SetGlobal( const CString &sName, int val ); + void SetGlobal( const CString &sName, bool val ); + void SetGlobal( const CString &sName, const CString &val ); + void UnsetGlobal( const CString &sName ); void PushStackNil(); void PushNopFunction();