summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-24 01:20:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-24 01:20:43 +0300
commita3360d4c38e8dd43d6e71cc4bd38f8dc96040b2e (patch)
tree44306e2fb7f38c44ca9ca89a9e21a76b912169ca /src/actorsprite.cpp
parent2bcfc80fe18a7239e2eae5600e4ed118e038da32 (diff)
downloadplus-a3360d4c38e8dd43d6e71cc4bd38f8dc96040b2e.tar.gz
plus-a3360d4c38e8dd43d6e71cc4bd38f8dc96040b2e.tar.bz2
plus-a3360d4c38e8dd43d6e71cc4bd38f8dc96040b2e.tar.xz
plus-a3360d4c38e8dd43d6e71cc4bd38f8dc96040b2e.zip
Dehardcode some old paths.
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r--src/actorsprite.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 267392a6c..4611ddbd2 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -23,6 +23,7 @@
#include "actorspritelistener.h"
#include "client.h"
+#include "configuration.h"
#include "effectmanager.h"
#include "imagesprite.h"
#include "localplayer.h"
@@ -328,7 +329,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
if (!*it)
continue;
- std::string file = "graphics/sprites/"
+ std::string file = paths.getStringValue("sprites")
+ combineDye2((*it)->sprite, color);
int variant = (*it)->variant;
@@ -340,7 +341,8 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
if (display.image.empty())
{
- addSprite(AnimatedSprite::load("graphics/sprites/error.xml"));
+ addSprite(AnimatedSprite::load(paths.getStringValue("sprites")
+ + paths.getStringValue("spriteErrorFile")));
}
else
{
@@ -350,10 +352,12 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
{
case 0:
default:
- imagePath = "graphics/items/" + display.image;
+ imagePath = paths.getStringValue("itemIcons")
+ + display.image;
break;
case 1:
- imagePath = "graphics/items/" + display.floor;
+ imagePath = paths.getStringValue("itemIcons")
+ + display.floor;
break;
}
imagePath = combineDye2(imagePath, color);