Support improved syntax in materials.xml

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7317 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-01-06 23:29:18 +00:00
parent 279e551371
commit 332209fde8

View File

@ -79,6 +79,12 @@ Material::Material(const XMLNode *node, int index)
else else
m_graphical_effect = GE_NONE; m_graphical_effect = GE_NONE;
node->get("alpha", &s);
if (s == "blend") m_alpha_blending = true;
else if (s == "test") m_alpha_testing = true;
else if (s == "additive") m_add = true;
else if (s != "none") fprintf(stderr, "[Material] WARNING: Unknown alpha mode '%s'\n", s.c_str());
node->get("zipper", &m_zipper ); node->get("zipper", &m_zipper );
node->get("zipper-duration", &m_zipper_duration ); node->get("zipper-duration", &m_zipper_duration );
node->get("zipper-fade-out-time", &m_zipper_fade_out_time ); node->get("zipper-fade-out-time", &m_zipper_fade_out_time );