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/statuseffect.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/statuseffect.cpp') diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index 6ab0b8fa..1f913f4a 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -28,6 +28,8 @@ #include "utils/xml.h" +#include "configuration.h" + #include #define STATUS_EFFECTS_FILE "status-effects.xml" @@ -68,7 +70,7 @@ AnimatedSprite *StatusEffect::getIcon() else { AnimatedSprite *sprite = AnimatedSprite::load( - "graphics/sprites/" + mIcon); + paths.getValue("sprites", "graphics/sprites/") + mIcon); if (false && sprite) { sprite->play(ACTION_DEFAULT); @@ -123,8 +125,7 @@ void StatusEffect::load() if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "status-effects")) { - logger->log("Error loading status effects file: " - STATUS_EFFECTS_FILE); + logger->log("Error loading status effects file: " STATUS_EFFECTS_FILE); return; } -- cgit v1.2.3-70-g09d2