From 166e9864f97275b1539edd8e89b271105f2fa04a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 24 Dec 2006 00:05:26 +0000 Subject: Major rendering performance increase in software mode, by not using RLE compression on loaded images while most of the time, we're only drawing a small subimage of them. Also, don't try to draw an icon when it is not defined or failed to load properly. --- src/gui/shoplistbox.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/shoplistbox.cpp') diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index f5581323..4821067c 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -89,7 +89,11 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) if (mShopItems) { - graphics->drawImage(mShopItems->at(i).image, 1, y); + Image *icon = mShopItems->at(i).image; + if (icon) + { + graphics->drawImage(icon, 1, y); + } } graphics->drawText(mListModel->getElementAt(i), ITEM_ICON_SIZE + 5, y + (ITEM_ICON_SIZE - getFont()->getHeight()) / 2); -- cgit v1.2.3-70-g09d2