From 16dd56bdd3e486c4fe4f83873b8d29c06b937f3c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 19 Feb 2010 22:44:05 -0600 Subject: [PATCH] Allow lighting parameters to be set via XNode in ActorFrame. Only diffuse seems to work... --- src/ActorFrame.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index e06c462ef8..12b9038a06 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -99,13 +99,14 @@ void ActorFrame::LoadFromNode( const XNode* pNode ) pNode->GetAttrValue( "VanishX", m_fVanishX ); pNode->GetAttrValue( "VanishY", m_fVanishY ); m_bOverrideLighting = pNode->GetAttrValue( "Lighting", m_bLighting ); - // new lighting values - // Values need to be converted into RageColors, so more work needs to be done... - /* - pNode->GetAttrValue( "AmbientColor", m_ambientColor ); - pNode->GetAttrValue( "DiffuseColor", m_diffuseColor ); - pNode->GetAttrValue( "SpecularColor", m_specularColor ); - */ + // new lighting values (only ambient color seems to work?) -aj + RString sTemp1,sTemp2,sTemp3; + pNode->GetAttrValue( "AmbientColor", sTemp1 ); + m_ambientColor.FromString(sTemp1); + pNode->GetAttrValue( "DiffuseColor", sTemp2 ); + m_diffuseColor.FromString(sTemp2); + pNode->GetAttrValue( "SpecularColor", sTemp3 ); + m_specularColor.FromString(sTemp3); // Values need to be converted into a RageVector3, so more work needs to be done... //pNode->GetAttrValue( "LightDirection", m_lightDirection ); }