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