summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-27 18:08:34 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-27 23:26:17 +0200
commitdf5c7ae83a80db63ab90142df9e3a93f5ee630d0 (patch)
tree465991eb7785c1d17e1b15f6798efa67951a0c83 /src/actorsprite.cpp
parent41e84157e0eca3a494cd6d44eec96dfbde0f5626 (diff)
downloadplus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.gz
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.bz2
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.tar.xz
plus-df5c7ae83a80db63ab90142df9e3a93f5ee630d0.zip
First part of implimintation item colors.
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..4188ff224 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/"
+ + combineDye((*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 = combineDye(imagePath, color);
+
Image *img = resman->getImage(imagePath);
if (!img)