This commit is contained in:
Jonathan Payne
2014-08-18 02:03:50 -07:00
+25 -4
View File
@@ -248,6 +248,9 @@ void ActorFrame::DrawPrimitives()
return;
}
RageColor diffuse = m_pTempState->diffuse[0];
RageColor glow = m_pTempState->glow;
// draw all sub-ActorFrames while we're in the ActorFrame's local coordinate space
if( m_bDrawByZPosition )
{
@@ -255,8 +258,8 @@ void ActorFrame::DrawPrimitives()
ActorUtil::SortByZPosition( subs );
for( unsigned i=0; i<subs.size(); i++ )
{
subs[i]->SetInternalDiffuse(m_pTempState->diffuse[0]);
subs[i]->SetInternalGlow(m_pTempState->glow);
subs[i]->SetInternalDiffuse( diffuse );
subs[i]->SetInternalGlow( glow );
subs[i]->Draw();
}
}
@@ -264,8 +267,8 @@ void ActorFrame::DrawPrimitives()
{
for( unsigned i=0; i<m_SubActors.size(); i++ )
{
m_SubActors[i]->SetInternalDiffuse(m_pTempState->diffuse[0]);
m_SubActors[i]->SetInternalGlow(m_pTempState->glow);
m_SubActors[i]->SetInternalDiffuse( diffuse );
m_SubActors[i]->SetInternalGlow( glow );
m_SubActors[i]->Draw();
}
}
@@ -632,6 +635,15 @@ public:
static int SetDrawByZPosition( T* p, lua_State *L ) { p->SetDrawByZPosition( BArg(1) ); return 1; }
static int SetDrawFunction( T* p, lua_State *L )
{
if(lua_isnil(L,1))
{
LuaReference ref;
lua_pushnil( L );
ref.SetFromStack( L );
p->SetDrawFunction( ref );
return 0;
}
luaL_checktype( L, 1, LUA_TFUNCTION );
LuaReference ref;
@@ -647,6 +659,15 @@ public:
}
static int SetUpdateFunction( T* p, lua_State *L )
{
if(lua_isnil(L,1))
{
LuaReference ref;
lua_pushnil( L );
ref.SetFromStack( L );
p->SetUpdateFunction( ref );
return 0;
}
luaL_checktype( L, 1, LUA_TFUNCTION );
LuaReference ref;