summaryrefslogtreecommitdiff
path: root/src/equipment.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-15 23:44:01 +0000
commit0e925e97554aae573e895afa4e3d8450f01df342 (patch)
treebbc30319410aecb9fec7c005e667cd7fb628bb17 /src/equipment.h
parentffa0fae492d954c0aed35a0acbd7b856778d7328 (diff)
downloadmana-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/equipment.h')
-rw-r--r--src/equipment.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/equipment.h b/src/equipment.h
index f820dcf0..7a0c8238 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -26,14 +26,20 @@
#define EQUIPMENT_SIZE 11
+class Item;
+
class Equipment
{
public:
/**
* Constructor.
*/
- Equipment()
- { clear(); }
+ Equipment();
+
+ /**
+ * Destructor.
+ */
+ ~Equipment();
/**
* Clears equipment.
@@ -43,17 +49,16 @@ class Equipment
/**
* Get equipment at the given slot.
*/
- int getEquipment(int index)
+ Item* getEquipment(int index)
{ return mEquipment[index]; }
/**
* Set equipment at the given slot.
*/
- void setEquipment(int index, int id)
- { mEquipment[index] = id; }
+ void setEquipment(int index, int id);
private:
- int mEquipment[EQUIPMENT_SIZE];
+ Item* mEquipment[EQUIPMENT_SIZE];
};
#endif