4 * Created on: Aug 9, 2012
8 #ifndef COMMON_INVENTORY_H_
9 #define COMMON_INVENTORY_H_
23 bool Add(const Item *, int count = 1);
24 void Remove(const Item *, int count = 1);
26 int MaxItems() const { return 96; }
28 const Item *ItemAt(int offset) const { return entries[offset].item; }
29 int ItemCountAt(int offset) const { return entries[offset].count; }
33 Entry() : item(0), count(0) { }
39 Entry *FindItem(const Item *);
40 const Entry *FindItem(const Item *) const;
41 bool SloteFree(int offset) const;
50 #endif /* COMMON_INVENTORY_H_ */