51 logger->
log1(
"Initializing avatar database...");
63 XmlNodeConstPtrConst rootNode = doc.
rootNode();
65 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"avatars"))
67 logger->
log(
"Avatars Database: Error while loading %s!",
75 if (xmlNameEqual(avatarNode,
"include"))
83 if (!xmlNameEqual(avatarNode,
"avatar"))
91 if (currentInfo ==
nullptr)
96 avatarNode,
"name",
_(
"unnamed")));
102 "targetOffsetY", 0));
114 if (xmlNameEqual(spriteNode,
"sprite"))
116 if (!XmlHaveChildContent(spriteNode))
120 currentSprite->
sprite = XmlChildContent(spriteNode);
122 spriteNode,
"variant", 0);
123 display.
sprites.push_back(currentSprite);
static void loadXmlFile(const std::string &file, const std::string &name, BadgesInfos &arr, const SkipError skipError)
#define loadXmlDir(name, function)
BeingInfos::iterator BeingInfoIterator
std::map< BeingTypeId, BeingInfo * > BeingInfos
void setName(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setTargetOffsetY(const int n)
static BeingInfo * unknown
void setWidth(const int n)
void setHeight(const int n)
void setTargetOffsetX(const int n)
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
void delete_all(Container &c)
#define fromInt(val, name)
#define for_each_xml_child_node(var, parent)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
BeingInfo * get(const BeingTypeId id)
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)
const bool SkipError_false
const bool SkipError_true
std::vector< SpriteReference * > sprites
const bool UseVirtFs_true