diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-15 23:44:01 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-15 23:44:01 +0000 |
commit | 0e925e97554aae573e895afa4e3d8450f01df342 (patch) | |
tree | bbc30319410aecb9fec7c005e667cd7fb628bb17 /src/resources/itemdb.cpp | |
parent | ffa0fae492d954c0aed35a0acbd7b856778d7328 (diff) | |
download | mana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.gz mana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.bz2 mana-client-0e925e97554aae573e895afa4e3d8450f01df342.tar.xz mana-client-0e925e97554aae573e895afa4e3d8450f01df342.zip |
Moved item icon from ItemInfo class to the Item class, so that it can be loaded
on demand. Results in faster startup time and reduced memory usage.
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index a83da342..ff537bc3 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -65,7 +65,7 @@ void ItemDB::load() mUnknown = new ItemInfo(); mUnknown->setName("Unknown item"); - mUnknown->setImage(""); + mUnknown->setImageName(""); mUnknown->setSprite("error.xml", 0); mUnknown->setSprite("error.xml", 1); @@ -118,7 +118,7 @@ void ItemDB::load() int weaponType = XML::getProperty(node, "weapon_type", 0); ItemInfo *itemInfo = new ItemInfo; - itemInfo->setImage(image); + itemInfo->setImageName(image); itemInfo->setName(name.empty() ? "Unnamed" : name); itemInfo->setDescription(description); itemInfo->setType(type); |