63 XmlNodeConstPtrConst rootNode = doc.
rootNode();
65 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"pets"))
67 logger->
log(
"PET Database: Error while loading %s!",
75 if (xmlNameEqual(petNode,
"include"))
82 else if (!xmlNameEqual(petNode,
"pet"))
99 if (currentInfo ==
nullptr)
107 "targetSelection",
true));
113 "deadSortOffsetY", 31));
118 "removeMessage",
_(
"Return to egg"));
119 currentInfo->
setString(0, returnMessage);
124 if (!XmlHaveChildContent(spriteNode))
127 if (xmlNameEqual(spriteNode,
"sprite"))
130 currentSprite->
sprite = XmlChildContent(spriteNode);
133 display.
sprites.push_back(currentSprite);
135 else if (xmlNameEqual(spriteNode,
"particlefx"))
137 std::string particlefx = XmlChildContent(spriteNode);
163 reportAlways(
"PETDB: Warning, unknown PET ID %d requested",
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
const BeingTypeId BeingTypeId_negOne
#define reportAlways(...)
void setString(const int idx, const std::string &value)
void setTargetSelection(const bool n)
void setName(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setDeadSortOffsetY(const int n)
static BeingInfo * unknown
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 readBasicAttributes(BeingInfo *const info, xmlNode *const node, const std::string &hoverCursor)
void readWalkingAttributes(BeingInfo *const info, xmlNode *const node, const int moreBlockFlags)
BeingInfo * get(const BeingTypeId id)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
bool getBoolProperty(const xmlNodePtr node, const char *const name, const bool 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