47 logger->
log1(
"Initializing color database...");
49 std::map<ItemColor, ItemColorData> colors;
61 "hairColorPatchDir"), list,
".xml");
82 std::map<ItemColor, ItemColorData> &colors,
88 XmlNodeConstPtrConst root = doc->
rootNode();
90 if ((root ==
nullptr) || !xmlNameEqual(root,
"colors"))
92 logger->
log(
"ColorDB: Failed to find hair colors file.");
102 if (xmlNameEqual(node,
"include"))
109 else if (xmlNameEqual(node,
"color"))
114 if (colors.find(
id) != colors.end())
134 XmlNodeConstPtrConst root = doc->
rootNode();
143 if (xmlNameEqual(node,
"include"))
150 else if (xmlNameEqual(node,
"list"))
156 std::map <ItemColor, ItemColorData> colors;
164 if (xmlNameEqual(colorNode,
"color"))
204 if (i == (*it).second.end())
210 return i->second.name;
218 const std::map <ItemColor, ItemColorData>
#define loadXmlDir(name, function)
#define reportAlways(...)
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
#define FOR_EACH(type, iter, array)
#define fromInt(val, name)
const ItemColor ItemColor_zero
#define for_each_xml_child_node(var, parent)
const std::map< ItemColor, ItemColorData > * getColorsList(const std::string &name)
Colors::iterator ColorIterator
void loadColorLists(const std::string &fileName, const SkipError skipError)
std::map< std::string, std::map< ItemColor, ItemColorData > > ColorLists
void loadHair(const std::string &fileName, std::map< ItemColor, ItemColorData > &colors, const SkipError skipError)
ColorLists::iterator ColorListsIterator
std::string & getHairColorName(const ItemColor id)
void getFilesInDir(const std::string &dir, StringVect &list, const std::string &ext)
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
std::string mFail("#ffffff")
ColorDB::ColorLists mColorLists
const bool SkipError_false
const bool SkipError_true
StringVect::const_iterator StringVectCIter
std::vector< std::string > StringVect
const bool UseVirtFs_true