]> git.localhorst.tv Git - l2e.git/blob - src/battle/PartyLayout.h
f5cd03d924e496ce867a1369c49b1fbfaaec2622
[l2e.git] / src / battle / PartyLayout.h
1 #ifndef BATTLE_PARTYLAYOUT_H_
2 #define BATTLE_PARTYLAYOUT_H_
3
4 #include "../geometry/Vector.h"
5
6 #include <cassert>
7 #include <vector>
8 #include <SDL.h>
9
10 namespace battle {
11
12 class PartyLayout {
13
14         public:
15                 static const int TYPE_ID = 203;
16
17 public:
18         PartyLayout() : positions(0), numPositions(0) { }
19
20 public:
21         std::vector<geometry::Vector<int> >::size_type NumPositions() const { return numPositions; }
22         void CalculatePositions(int width, int height, std::vector<geometry::Vector<int> > &dest) const;
23         geometry::Vector<int> CalculatePosition(int index, int width, int height) const;
24
25 public:
26         void SetPositions(const geometry::Vector<int> *p, int num) {
27                 positions = p;
28                 numPositions = num;
29         }
30
31         static void CreateTypeDescription();
32         static void Construct(void *);
33
34 private:
35         const geometry::Vector<int> *positions;
36         int numPositions;
37
38 };
39
40 }
41
42 #endif /* BATTLE_PARTYLAYOUT_H_ */