diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-10-15 07:22:29 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-10-15 07:22:29 -0600 |
commit | 59657fcbfa88a8f7a15bf4350f8addf399e20bda (patch) | |
tree | e5a9a856dc80bd55427380383a5953b75c874b4a /src/item.cpp | |
parent | 2f55dd130c886376a45c9d0054dbd987cc055155 (diff) | |
download | mana-59657fcbfa88a8f7a15bf4350f8addf399e20bda.tar.gz mana-59657fcbfa88a8f7a15bf4350f8addf399e20bda.tar.bz2 mana-59657fcbfa88a8f7a15bf4350f8addf399e20bda.tar.xz mana-59657fcbfa88a8f7a15bf4350f8addf399e20bda.zip |
Make sure item icons in the invy are full opacity
Diffstat (limited to 'src/item.cpp')
-rw-r--r-- | src/item.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/item.cpp b/src/item.cpp index 46905e5c..120a4044 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -27,6 +27,7 @@ Item::Item(int id, int quantity, bool equipment, bool equipped): mImage(0), + mDrawImage(0), mQuantity(quantity), mEquipment(equipment), mEquipped(equipped), mInEquipment(false) { @@ -50,10 +51,17 @@ void Item::setId(int id) if (mImage) mImage->decRef(); + if (mDrawImage) + mDrawImage->decRef(); + ResourceManager *resman = ResourceManager::getInstance(); std::string imagePath = "graphics/items/" + getInfo().getImageName(); mImage = resman->getImage(imagePath); + mDrawImage = resman->getImage(imagePath); if (!mImage) mImage = resman->getImage("graphics/gui/unknown-item.png"); + + if (!mDrawImage) + mDrawImage = resman->getImage("graphics/gui/unknown-item.png"); } |