--- a/src/colors.cpp Sun Sep 06 20:45:51 2015 +0300 +++ b/src/colors.cpp Tue Sep 22 00:59:21 2015 +0300 @@ -33,7 +33,7 @@ static ColorDataEntry ColorData[512]; -void InitColors() +void initColors() { print ("Initializing color information.\n"); @@ -108,7 +108,7 @@ QColor LDColor::edgeColor() const { if (isDirect()) - return Luma (faceColor()) < 48 ? Qt::white : Qt::black; + return luma() < 48 ? Qt::white : Qt::black; else if (isLDConfigColor()) return ColorData[index()].edgeColor; else @@ -117,12 +117,12 @@ int LDColor::luma() const { - return Luma (faceColor()); + return ::luma (faceColor()); } int LDColor::edgeLuma() const { - return Luma (edgeColor()); + return ::luma (edgeColor()); } qint32 LDColor::index() const @@ -143,16 +143,11 @@ return index() >= 0x02000000; } -int Luma (const QColor& col) +int luma (const QColor& col) { return (0.2126f * col.red()) + (0.7152f * col.green()) + (0.0722f * col.blue()); } -int CountLDConfigColors() -{ - return countof (ColorData); -} - void parseLDConfig() { QFile* fp = OpenLDrawFile ("LDConfig.ldr", false);