ManaPlus
|
Typedefs | |
typedef std::map< ItemColor, ItemColorData > | Colors |
typedef Colors::iterator | ColorIterator |
typedef std::map< std::string, std::map< ItemColor, ItemColorData > > | ColorLists |
typedef ColorLists::iterator | ColorListsIterator |
Functions | |
void | load () |
void | loadHair (const std::string &fileName, std::map< ItemColor, ItemColorData > &colors, const SkipError skipError) |
void | loadColorLists (const std::string &fileName, const SkipError skipError) |
void | unload () |
std::string & | getHairColorName (const ItemColor id) |
int | getHairSize () |
const std::map< ItemColor, ItemColorData > * | getColorsList (const std::string &name) |
Color information database.
typedef Colors::iterator ColorDB::ColorIterator |
typedef std::map<std::string, std::map <ItemColor, ItemColorData> > ColorDB::ColorLists |
typedef ColorLists::iterator ColorDB::ColorListsIterator |
typedef std::map<ItemColor, ItemColorData> ColorDB::Colors |
const std::map< ItemColor, ItemColorData > * ColorDB::getColorsList | ( | const std::string & | name | ) |
Definition at line 219 of file colordb.cpp.
References anonymous_namespace{colordb.cpp}::mColorLists.
Referenced by BeingInfo::setColorsList(), ItemInfo::setColorsList(), and ItemInfo::setIconColorsList().
std::string & ColorDB::getHairColorName | ( | const ItemColor | id | ) |
Definition at line 190 of file colordb.cpp.
References AvatarDB::load(), anonymous_namespace{colordb.cpp}::mColorLists, anonymous_namespace{colordb.cpp}::mFail(), anonymous_namespace{colordb.cpp}::mLoaded, reportAlways, and toInt.
Referenced by CharCreateDialog::updateHair().
int ColorDB::getHairSize | ( | ) |
Definition at line 213 of file colordb.cpp.
References anonymous_namespace{colordb.cpp}::mHairColorsSize.
Referenced by CharCreateDialog::CharCreateDialog(), and CharCreateDialog::updateHair().
void ColorDB::load | ( | ) |
Loads the color data from colors.xml
.
Definition at line 42 of file colordb.cpp.
References CAST_S32, FOR_EACH, VirtFs::getFilesInDir(), Configuration::getStringValue(), loadColorLists(), loadHair(), loadXmlDir, Logger::log1(), logger, anonymous_namespace{colordb.cpp}::mColorLists, anonymous_namespace{colordb.cpp}::mHairColorsSize, anonymous_namespace{colordb.cpp}::mLoaded, paths, SkipError_false, SkipError_true, and Net::unload().
Referenced by DbManager::loadDb().
void ColorDB::loadColorLists | ( | const std::string & | fileName, |
const SkipError | skipError | ||
) |
Definition at line 128 of file colordb.cpp.
References fileName, for_each_xml_child_node, fromInt, XML::getProperty(), ItemColorData::id, XML::langProperty(), anonymous_namespace{colordb.cpp}::mColorLists, XML::Document::rootNode(), and UseVirtFs_true.
Referenced by load().
void ColorDB::loadHair | ( | const std::string & | fileName, |
std::map< ItemColor, ItemColorData > & | colors, | ||
const SkipError | skipError | ||
) |
Loads the color data from colors.xml
.
Definition at line 81 of file colordb.cpp.
References fileName, for_each_xml_child_node, fromInt, XML::getProperty(), ItemColor_zero, XML::langProperty(), Logger::log(), logger, reportAlways, XML::Document::rootNode(), toInt, and UseVirtFs_true.
Referenced by load().
void ColorDB::unload | ( | ) |
Clear the color data
Definition at line 182 of file colordb.cpp.
References Logger::log1(), logger, anonymous_namespace{colordb.cpp}::mColorLists, and anonymous_namespace{colordb.cpp}::mLoaded.
Referenced by DbManager::unloadDb().