diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
commit | da05d9dd98315378bdded216184294f376643191 (patch) | |
tree | ffc4b984c73c3bb68d26a1df6481634254075744 /src/item.cpp | |
parent | ec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff) | |
download | plus-da05d9dd98315378bdded216184294f376643191.tar.gz plus-da05d9dd98315378bdded216184294f376643191.tar.bz2 plus-da05d9dd98315378bdded216184294f376643191.tar.xz plus-da05d9dd98315378bdded216184294f376643191.zip |
Use resource manager as global variable.
Diffstat (limited to 'src/item.cpp')
-rw-r--r-- | src/item.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/item.cpp b/src/item.cpp index 50ccf374a..9a534cfad 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -93,14 +93,13 @@ void Item::setId(const int id, if (mImage) mImage->decRef(); - ResourceManager *const resman = ResourceManager::getInstance(); const ItemInfo &info = getInfo(); mTags = info.getTags(); const std::string dye = combineDye2(paths.getStringValue( "itemIcons").append(info.getDisplay().image), info.getDyeIconColorsString(color)); - mImage = resman->getImage(dye); + mImage = resourceManager->getImage(dye); if (!mImage) { @@ -120,9 +119,8 @@ bool Item::isHaveTag(const int tagId) const Image *Item::getImage(const int id, const ItemColor color) { - ResourceManager *const resman = ResourceManager::getInstance(); const ItemInfo &info = ItemDB::get(id); - Image *image = resman->getImage(combineDye2(paths.getStringValue( + Image *image = resourceManager->getImage(combineDye2(paths.getStringValue( "itemIcons").append(info.getDisplay().image), info.getDyeIconColorsString(color))); |