Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
committerStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
commitf33257521bf80dcef8575c4fc3ddaf4a40ff588a (patch)
tree5e3a112e814478ba3ab624e0867761654a5ea0a4 /src/core/item.h
parent5b94df1df2707b36401d91d80b92d0e4cdfd2277 (diff)
fixed a few widget order problems, changed map targetting behaviour
Diffstat (limited to 'src/core/item.h')
-rw-r--r--src/core/item.h43
1 files changed, 33 insertions, 10 deletions
diff --git a/src/core/item.h b/src/core/item.h
index 68b6876..d390c2d 100644
--- a/src/core/item.h
+++ b/src/core/item.h
@@ -11,22 +11,45 @@
namespace core {
-class Item
+/**
+ * @brief a class of items
+ * Examples are armor, cannons, commodities...
+ */
+class ItemClass
{
public:
- Item(const unsigned int itemclass, const unsigned int itemtype, const char *infolabel);
- ~Item();
+ ItemClass(const char *label);
- inline const unsigned int itemclass() const { return item_class; }
- inline const unsigned int itemtype() const { return item_type; }
-
+ inline const std::string &label() { return itemclass_label; }
+
+ inline const std::string &name() { return itemclass_name; }
+
+private:
+ std::string itemclass_label;
+ std::string itemclass_name;
+};
+
+/**
+ * @brief a specific type of item in the game
+ * Examples are tritanium hull armor, ion cannon, gems
+ */
+class ItemType
+{
+public:
+ ItemType(const char *label);
+
+ inline const std::string &label() { return itemtype_label; }
+
+ inline const std::string &name() { return itemtype_name; }
+
+ inline const float base_price() { return itemtype_baseprice; }
private:
- unsigned int item_class;
- unsigned int item_type;
- float item_amount;
+ std::string itemtype_label;
+ std::string itemtype_name;
- std::string item_infolabel;
+ ItemClass *itemtype_class;
+ float itemtype_baseprice;
};
}