blob: 00cd396711841759a34636ff9e3754eb0c4ce0c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#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;
bool ridable;
public:
Entity *rider;
bool aggressive;
std::string heyid;
Mob(void);
~Mob(void);
void wander(void);
void ride(Entity *e);
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 cId, cValue;
std::string pageTexPath;
GLuint pageTexture;
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 Cat : public Mob {
public:
Cat(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_
|