aboutsummaryrefslogtreecommitdiffstats
path: root/include/mob.hpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-04-28 10:46:38 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-04-28 10:46:38 -0400
commit68cb663a370747c325eeeeea66cca86803e4b8e5 (patch)
treeb82b7b8d77ff2a3439e99d11589bbf1a3ef1f07c /include/mob.hpp
parent2e026aff928b30267a39ef6fdeec3e43e9f106e6 (diff)
parent174bcd3a415c21fc2c59a3af1b6333faa78b37d0 (diff)
New inventory system
Diffstat (limited to 'include/mob.hpp')
-rw-r--r--include/mob.hpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/include/mob.hpp b/include/mob.hpp
new file mode 100644
index 0000000..9f006b9
--- /dev/null
+++ b/include/mob.hpp
@@ -0,0 +1,88 @@
+#ifndef MOB_H_
+#define MOB_H_
+
+#include <common.hpp>
+#include <entities.hpp>
+#include <gametime.hpp>
+#include <ui.hpp>
+
+// local library headers
+#include <tinyxml2.h>
+using namespace tinyxml2;
+
+extern Player *player;
+extern std::string currentXML;
+
+class Mob : public Entity {
+protected:
+ unsigned int actCounter;
+ unsigned int actCounterInitial;
+public:
+ bool aggressive;
+ std::string heyid;
+
+ ~Mob(void);
+
+ void wander(void);
+ virtual void act(void) =0;
+ virtual bool bindTex(void) =0;
+ virtual void createFromXML(const XMLElement *e) =0;
+};
+
+constexpr Mob *Mobp(Entity *e) {
+ return (Mob *)e;
+}
+
+class Page : public Mob {
+private:
+ std::string pageTexPath;
+public:
+ Page(void);
+
+ void act(void);
+ bool bindTex(void);
+ void createFromXML(const XMLElement *e);
+};
+
+class Door : public Mob {
+public:
+ Door(void);
+
+ void act(void);
+ bool bindTex(void);
+ void createFromXML(const XMLElement *e);
+};
+
+class Rabbit : public Mob {
+public:
+ Rabbit(void);
+
+ void act(void);
+ bool bindTex(void);
+ void createFromXML(const XMLElement *e);
+};
+
+class Bird : public Mob {
+private:
+ float initialY;
+public:
+ Bird(void);
+
+ void act(void);
+ bool bindTex(void);
+ void createFromXML(const XMLElement *e);
+};
+
+class Trigger : public Mob {
+private:
+ std::string id;
+ bool triggered;
+public:
+ Trigger(void);
+
+ void act(void);
+ bool bindTex(void);
+ void createFromXML(const XMLElement *e);
+};
+
+#endif // MOB_H_