From 52ae78a40e71523a3e0069aea8ca2c9881eddb7d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 21 Sep 2006 22:08:49 +0000 Subject: [PATCH] self:diffuse({1,1,1,1}) --- stepmania/src/Actor.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 07ef01156c..d0cfa39c06 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -1376,7 +1376,20 @@ public: static int fadetop( T* p, lua_State *L ) { p->SetFadeTop(FArg(1)); return 0; } static int faderight( T* p, lua_State *L ) { p->SetFadeRight(FArg(1)); return 0; } static int fadebottom( T* p, lua_State *L ) { p->SetFadeBottom(FArg(1)); return 0; } - static int diffuse( T* p, lua_State *L ) { p->SetDiffuse( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; } + static int diffuse( T* p, lua_State *L ) + { + if( lua_type(L,1) == LUA_TTABLE ) + { + RageColor c; + c.FromStack( L, 1 ); + p->SetDiffuse( c ); + } + else + { + p->SetDiffuse( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); + } + return 0; + } static int diffuseupperleft( T* p, lua_State *L ) { p->SetDiffuseUpperLeft( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; } static int diffuseupperright( T* p, lua_State *L ) { p->SetDiffuseUpperRight( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; } static int diffuselowerleft( T* p, lua_State *L ) { p->SetDiffuseLowerLeft( RageColor(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; }