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>2012-04-22 19:48:27 +0000
committerStijn Buys <ingar@osirion.org>2012-04-22 19:48:27 +0000
commit8f124fabdfd6761cefbcc2c4120ba325692f5d0b (patch)
tree21d38bdc6088654802d736dcb905429c42bd591a /src/core/slots.h
parentd1931b1ebbe79cbd0f41290acbf9cb6d4c462878 (diff)
Initial support for per-entity weapon slots.
Diffstat (limited to 'src/core/slots.h')
-rw-r--r--src/core/slots.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/core/slots.h b/src/core/slots.h
index ef1af77..6bb09f1 100644
--- a/src/core/slots.h
+++ b/src/core/slots.h
@@ -7,13 +7,47 @@
#ifndef __INCLUDED_CORE_SLOTS_H__
#define __INCLUDED_CORE_SLOTS_H__
+#include <vector>
+
+#include "model/model.h"
+#include "core/slot.h"
+
namespace core
{
+/**
+ * @brief a collection of entity equipment and weapon slots
+ * */
class Slots {
public:
Slots();
~Slots();
+
+ typedef std::vector<Slot *> Container;
+
+ typedef Container::iterator iterator;
+
+ /**
+ * @brief initialize slots collection from model properties
+ * */
+ void load(model::Model *model);
+
+ /**
+ * @brief remove all slots
+ * */
+ void clear();
+
+ inline iterator begin() {
+ return slots_container.begin();
+ }
+
+ inline iterator end() {
+ return slots_container.end();
+ }
+
+private:
+ Container slots_container;
+
};
} // namespace core