summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 14:14:34 +0300
commitda05d9dd98315378bdded216184294f376643191 (patch)
treeffc4b984c73c3bb68d26a1df6481634254075744 /src/item.cpp
parentec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff)
downloadmv-da05d9dd98315378bdded216184294f376643191.tar.gz
mv-da05d9dd98315378bdded216184294f376643191.tar.bz2
mv-da05d9dd98315378bdded216184294f376643191.tar.xz
mv-da05d9dd98315378bdded216184294f376643191.zip
Use resource manager as global variable.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp6
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)));