26#define COLOR_WHITE "#ffffff"
43 Log::info(
"HairDb: Redefinition of color Id %d in %s",
id, filename.c_str());
58 Log::info(
"Unloading hair style and color database...");
74 Log::warn(
"Redefinition of hairstyle id %i:",
id);
84 Log::warn(
"HairDB::getHairColor() called before settings were loaded!");
90 Log::info(
"HairDb: Error, unknown color Id# %d",
id);
96 std::vector<int> hairStylesIds;
100 if (maxId > 0 && hairStyle > maxId)
102 hairStylesIds.push_back(hairStyle);
104 return hairStylesIds;
109 std::vector<int> hairColorsIds;
113 if ((maxId > 0 &&
id > maxId) ||
id < minId)
115 hairColorsIds.push_back(
id);
117 return hairColorsIds;
std::vector< int > getHairStyleIds(int maxId) const
Returns the available hair style ids.
const std::string & getHairColor(int id) const
std::set< int > mHairStyles
std::map< int, std::string > mHairColors
void addHairStyle(int id)
Add a hair style to the database.
void readHairColorNode(XML::Node node, const std::string &filename)
void unload()
Clear the color data.
std::vector< int > getHairColorIds(int minId, int maxId) const
Returns the available hair color ids.
int getProperty(const char *name, int def) const
void warn(const char *log_text,...) LOG_PRINTF_ATTR
void info(const char *log_text,...) LOG_PRINTF_ATTR