diff --git a/stepmania/src/RageTypes.cpp b/stepmania/src/RageTypes.cpp index fef3162c64..204286c174 100644 --- a/stepmania/src/RageTypes.cpp +++ b/stepmania/src/RageTypes.cpp @@ -36,6 +36,21 @@ void RageColor::FromStack( lua_State *L, int iPos ) lua_pop( L, 5 ); } +void RageColor::FromStackCompat( lua_State *L, int iPos ) +{ + if( lua_type(L, iPos) == LUA_TTABLE ) + { + FromStack( L, iPos ); + } + else + { + r = FArg(iPos+0); + g = FArg(iPos+1); + b = FArg(iPos+2); + a = FArg(iPos+3); + } +} + namespace LuaHelpers { template<> bool FromStack( lua_State *L, RageColor &Object, int iOffset ) diff --git a/stepmania/src/RageTypes.h b/stepmania/src/RageTypes.h index b186c4a800..a9e3381b37 100644 --- a/stepmania/src/RageTypes.h +++ b/stepmania/src/RageTypes.h @@ -196,6 +196,7 @@ public: void PushTable( lua_State *L ) const; void FromStack( lua_State *L, int iPos ); + void FromStackCompat( lua_State *L, int iPos ); float r, g, b, a; } SM_ALIGN(16);