summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-06-12 09:06:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-06-12 09:06:01 +0000
commit2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258 (patch)
tree8d256ac1a38932aaf0db7b55ed178e4212616555 /src/resources/iteminfo.h
parenteb019ab915998a3ec247b33dad4b23f763d7a29a (diff)
downloadMana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.gz
Mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.bz2
Mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.xz
Mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.zip
Merged revisions 3738 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3738 | b_lindeijer | 2007-11-16 00:44:01 +0100 (Fri, 16 Nov 2007) | 3 lines 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/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 2726a012..680c8d61 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -30,8 +30,6 @@
#include "spritedef.h"
-class Image;
-
enum EquipmentSoundEvent
{
EQUIP_EVENT_STRIKE,
@@ -49,7 +47,6 @@ class ItemInfo
* Constructor.
*/
ItemInfo():
- mImage(NULL),
mType(0),
mWeight(0),
mView(0),
@@ -57,21 +54,17 @@ class ItemInfo
{
}
- /**
- * Destructor.
- */
- ~ItemInfo();
-
void setName(const std::string &name)
{ mName = name; }
const std::string& getName() const
{ return mName; }
- void setImage(const std::string &image);
+ void setImageName(const std::string &imageName)
+ { mImageName = imageName; }
- Image* getImage() const
- { return mImage; }
+ const std::string& getImageName() const
+ { return mImageName; }
void setDescription(const std::string &description)
{ mDescription = description; }
@@ -116,13 +109,6 @@ class ItemInfo
protected:
std::string mImageName; /**< The filename of the icon image. */
-
- /* TODO (BL): I do not think the item info should keep a reference to
- * the item icon. It would probably be better if this was kept in the
- * Item class, so that the images can be lazily instantiated and also
- * unloaded when no longer used.
- */
- Image *mImage; /**< The loaded icon image. */
std::string mName;
std::string mDescription; /**< Short description. */
std::string mEffect; /**< Description of effects. */