47 logger->
log1(
"Initializing elemental database...");
59 XmlNodeConstPtr rootNode = doc.
rootNode();
61 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"elementals"))
63 logger->
log(
"Elemental Database: Error while loading %s!",
74 if (xmlNameEqual(elementalNode,
"include"))
77 elementalNode,
"name",
"");
82 if (!xmlNameEqual(elementalNode,
"elemental"))
90 logger->
log(
"ElementalDb: Redefinition of elemental ID %d",
id);
93 if (currentInfo ==
nullptr)
98 elementalNode,
"attack");
106 elementalNode,
"deadSortOffsetY", 31));
120 currentInfo,
"ElementalDb");
130 logger->
log1(
"Unloading elemental database...");
147 reportAlways(
"ElementalDb: Warning, unknown elemental ID "
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
#define reportAlways(...)
void setBlockType(const BlockTypeT &blockType)
void setColorsList(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setDeadSortOffsetY(const int n)
void setStaticMaxHP(const bool n)
static BeingInfo * unknown
void setMaxHP(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)
bool readObjectNodes(xmlNode *const &spriteNode, SpriteDisplay &display, BeingInfo *const currentInfo, const std::string &dbName)
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)
int getProperty(const xmlNodePtr node, const char *const name, int def)
BeingInfos mElementalInfos
const bool SkipError_false
const bool SkipError_true
const bool UseVirtFs_true