summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-03 02:50:03 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-03 02:50:03 +0200
commitde51eaa43e05c2126fc1eef2a7e115843f972547 (patch)
tree286a05a069e048247f90c7595f1b8939be784608 /src/actorsprite.cpp
parentd4c08d3bf69410a35a50875de50cc6fe74b3bf3e (diff)
parent8627c7745f47492ab349da6a74e98e3d5813418f (diff)
downloadmv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.gz
mv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.bz2
mv-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.xz
mv-de51eaa43e05c2126fc1eef2a7e115843f972547.zip
Merge branch 'coloritems'
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r--src/actorsprite.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index fc648741c..686c871e7 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -301,7 +301,8 @@ void ActorSprite::handleStatusEffect(StatusEffect *effect, int effectId)
}
void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
- bool forceDisplay, int imageType)
+ bool forceDisplay, int imageType,
+ std::string color)
{
clear();
@@ -310,7 +311,9 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
for (it = display.sprites.begin(), it_end = display.sprites.end();
it != it_end; ++it)
{
- std::string file = "graphics/sprites/" + (*it)->sprite;
+ std::string file = "graphics/sprites/"
+ + combineDye2((*it)->sprite, color);
+
int variant = (*it)->variant;
addSprite(AnimatedSprite::load(file, variant));
}
@@ -336,6 +339,8 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
imagePath = "graphics/items/" + display.floor;
break;
}
+ imagePath = combineDye2(imagePath, color);
+
Image *img = resman->getImage(imagePath);
if (!img)