4 * Created on: Aug 5, 2012
8 #ifndef BATTLE_PARTYLAYOUT_H_
9 #define BATTLE_PARTYLAYOUT_H_
11 #include "../geometry/Vector.h"
25 std::vector<geometry::Vector<Uint8> >::size_type NumPositions() const { return positions.size(); }
27 void CalculatePositions(U width, U height, std::vector<geometry::Vector<U> > &dest) const {
29 dest.reserve(positions.size());
30 for (std::vector<geometry::Vector<Uint8> >::const_iterator i(positions.begin()), end(positions.end()); i != end; ++i) {
31 dest.push_back(geometry::Vector<U>(
38 geometry::Vector<U> CalculatePosition(std::vector<geometry::Vector<Uint8> >::size_type index, U width, U height) const {
39 assert(index >= 0 && index < positions.size());
40 return geometry::Vector<U>(
41 positions[index].X() * width / 255,
42 positions[index].Y() * height / 223
47 void AddPosition(const geometry::Vector<Uint8> &p) {
48 positions.push_back(p);
52 std::vector<geometry::Vector<Uint8> > positions;
58 #endif /* BATTLE_PARTYLAYOUT_H_ */