From abde0f51b3062c158fb52e9dfff23d21d3be03d1 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Sun, 11 Jul 2010 20:05:44 +0200 Subject: 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. --- src/resources/itemdb.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/resources/itemdb.cpp') 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 @@ -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(); -- cgit v1.2.3-70-g09d2