diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-05-02 14:43:40 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-05-06 22:21:57 -0600 |
commit | 9baedc27191c82bbf1fedee2a7e738bc5b267c0e (patch) | |
tree | f0986c6839d1e79b402d5d4ec36e4994741955ea /src/item.cpp | |
parent | 844e9a7a72faca6a212e788a3adc45e17f41dca6 (diff) | |
download | mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.gz mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.bz2 mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.xz mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.zip |
Add support for floor item sprites
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite;
CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common
functionailty into new base classes which will make other Mantis tickets easier to do.
Also allows monsters to use particle effects.
Reviewed-by: Bertram
Diffstat (limited to 'src/item.cpp')
-rw-r--r-- | src/item.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/item.cpp b/src/item.cpp index 79ccd2c3..19bb7c23 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -57,7 +57,8 @@ void Item::setId(int id) mDrawImage->decRef(); ResourceManager *resman = ResourceManager::getInstance(); - std::string imagePath = "graphics/items/" + getInfo().getImageName(); + SpriteDisplay display = getInfo().getDisplay(); + std::string imagePath = "graphics/items/" + display.image; mImage = resman->getImage(imagePath); mDrawImage = resman->getImage(imagePath); |