Appended hex color to the end of material name

This commit is contained in:
2017-07-05 16:25:00 -07:00
parent dbcd7c59d8
commit a1f1a35372
3 changed files with 5 additions and 2 deletions

View File

@ -118,7 +118,7 @@ using namespace std;
if (SECONDCH(fdata) == 'x') {
// this is the unidentified hex digit.
// out of range for stoi
x.hex = strtoul(fdata.c_str(), NULL, 16);
x.hex = fdata;
hex = true;
}
} else if (!hex) {

View File

@ -90,6 +90,9 @@ std::vector<TPlanePoints> GetBrushPlanes(const TBrush& _krBrush)
}
TPlanePoints PP = GetPlanePoints(Verts.data(), Verts.size());
PP.m_material = krFace.m_Material;
if (!krFace.hex.empty()) {
PP.m_material.append("+" + krFace.hex);
}
Planes.push_back(PP);
}

View File

@ -18,7 +18,7 @@ struct TFace
float m_fYScale;
float m_fRotation;
std::vector<int> m_Indices;
unsigned long hex;
std::string hex;
std::string m_Material;
};