]> git.localhorst.tv Git - l2e.git/blob - src/common/TargetingMode.h
removed stupid file headers that eclipse put in
[l2e.git] / src / common / TargetingMode.h
1 #ifndef COMMON_TARGETINGMODE_H_
2 #define COMMON_TARGETINGMODE_H_
3
4 #include <SDL.h>
5
6 namespace common {
7
8 class TargetingMode {
9
10 public:
11         static const int TYPE_ID = 306;
12
13 public:
14         TargetingMode() : mode(0), ally(true) { }
15
16 public:
17         bool TargetsEnemy() const { return !ally; }
18         bool TargetsAlly() const { return ally; }
19         bool TargetsAll() const { return mode == ALL; }
20         bool TargetsMultiple() const { return mode == MULTIPLE; }
21         bool TargetsSingle() const { return mode == SINGLE; }
22
23         void TargetAll() { mode = ALL; }
24         void TargetMultiple() { mode = MULTIPLE; }
25         void TargetSingle() { mode = SINGLE; }
26         void TargetAlly() { ally = true; }
27         void TargetEnemy() { ally = false; }
28
29         static void CreateTypeDescription();
30         static void Construct(void *);
31
32 private:
33         enum {
34                 ALL = 0,
35                 MULTIPLE = 1,
36                 SINGLE = 2,
37         };
38         int mode;
39         bool ally;
40
41 };
42
43 }
44
45 #endif /* COMMON_TARGETINGMODE_H_ */