summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-21 22:12:51 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-21 22:12:51 +0200
commit05ea95733e9ec89626e08989e0688e73d1408d3a (patch)
tree2351a8f2b6b81eb48a6f5f4dd068a9a13d117fb1 /src/actorsprite.cpp
parent7be91e6213aadb0405bdd2fa3a9210598b254041 (diff)
downloadmanaplus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.gz
manaplus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.bz2
manaplus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.xz
manaplus-05ea95733e9ec89626e08989e0688e73d1408d3a.zip
Add floor items attribute for drawing floor items.
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r--src/actorsprite.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 3af80ef0d..cb01a2118 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -300,7 +300,7 @@ void ActorSprite::handleStatusEffect(StatusEffect *effect, int effectId)
}
void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
- bool forceDisplay)
+ bool forceDisplay, int imageType)
{
clear();
@@ -324,7 +324,17 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
else
{
ResourceManager *resman = ResourceManager::getInstance();
- std::string imagePath = "graphics/items/" + display.image;
+ std::string imagePath;
+ switch (imageType)
+ {
+ case 0:
+ default:
+ imagePath = "graphics/items/" + display.image;
+ break;
+ case 1:
+ imagePath = "graphics/items/" + display.floor;
+ break;
+ }
Image *img = resman->getImage(imagePath);
if (!img)