From 332209fde8f171ebcf193cc87b0e810bdd166099 Mon Sep 17 00:00:00 2001 From: auria Date: Thu, 6 Jan 2011 23:29:18 +0000 Subject: [PATCH] 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 --- src/graphics/material.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index 4663f37cc..cfc76b2d0 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -79,6 +79,12 @@ Material::Material(const XMLNode *node, int index) else 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-duration", &m_zipper_duration ); node->get("zipper-fade-out-time", &m_zipper_fade_out_time );