summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-11 20:05:44 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-11 20:05:44 +0200
commitabde0f51b3062c158fb52e9dfff23d21d3be03d1 (patch)
tree4af561ea9e8cd3f7f981cce9817cf57f3e353787 /src/resources/itemdb.cpp
parent93e1a2a9e5f379945a6efb24598319b605be1dfa (diff)
downloadmana-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.gz
mana-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.bz2
mana-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.xz
mana-abde0f51b3062c158fb52e9dfff23d21d3be03d1.zip
Made the different hard-coded paths and files be now taken from the
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 077012c7..3fdee021 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -30,6 +30,7 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
#include "utils/xml.h"
+#include "configuration.h"
#include <libxml/tree.h>
@@ -115,8 +116,9 @@ void ItemDB::load()
mUnknown = new ItemInfo;
mUnknown->setName(_("Unknown item"));
mUnknown->setImageName("");
- mUnknown->setSprite("error.xml", GENDER_MALE);
- mUnknown->setSprite("error.xml", GENDER_FEMALE);
+ std::string errFile = paths.getValue("spriteErrorFile", "error.xml");
+ mUnknown->setSprite(errFile, GENDER_MALE);
+ mUnknown->setSprite(errFile, GENDER_FEMALE);
XML::Document doc("items.xml");
xmlNodePtr rootNode = doc.rootNode();