diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-21 22:12:51 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-21 22:12:51 +0200 |
commit | 05ea95733e9ec89626e08989e0688e73d1408d3a (patch) | |
tree | 2351a8f2b6b81eb48a6f5f4dd068a9a13d117fb1 /src/actorsprite.cpp | |
parent | 7be91e6213aadb0405bdd2fa3a9210598b254041 (diff) | |
download | plus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.gz plus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.bz2 plus-05ea95733e9ec89626e08989e0688e73d1408d3a.tar.xz plus-05ea95733e9ec89626e08989e0688e73d1408d3a.zip |
Add floor items attribute for drawing floor items.
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r-- | src/actorsprite.cpp | 14 |
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) |