summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
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)