From c39a109dae3a704480bcb84e6a3c9f9a3d584f9f Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 7 Mar 2011 19:14:17 +0000 Subject: BGE internal cosmetic changes - Replacing hardcoded values with new defines --------------------------------------------------------------------------- The Rasterizer code was relying in the values defined on TF_ DNA files. I'm working in the recode of TexFace, bringing the options to the material panel and ran into those cases. They are hard to spot and add a lot of the "magic" effect to the code. Hardcoded values are at least easy to spot. We (still) have a few defines duplicated, relying on each other (a flag previously defined in the code is checked later on but using a different define (although with same value. (e.g. TF_BMFONT and RAS_RENDER_3DPOLYGON_TEXT). It's hell =) I'm adding some comments to help on that. Things will be revamped anyways, but it's nice to keep the code a bit more coherent before the real feature commit. That's all, thanks for listening. --- source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp') diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index e8c0a73813e..47f1dcb412a 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -241,7 +241,7 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const else if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID); else if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW); else - dolights = (m_drawingmode & 16)!=0; + dolights = (m_drawingmode & RAS_IRasterizer::KX_LIGHT)!=0; return dolights; } -- cgit v1.2.3