]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/PartyLayout.h
merged Point into Vector
[l2e.git] / src / battle / PartyLayout.h
index 684413964d096b77b352f5e31840d97acc47c65e..1d72aa8ad483bc8fadeafc6cf62a16d41fea5971 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef BATTLE_PARTYLAYOUT_H_
 #define BATTLE_PARTYLAYOUT_H_
 
-#include "../geometry/Point.h"
+#include "../geometry/Vector.h"
 
 #include <cassert>
 #include <vector>
@@ -22,34 +22,34 @@ public:
        PartyLayout() { }
 
 public:
-       std::vector<geometry::Point<Uint8> >::size_type NumPositions() const { return positions.size(); }
+       std::vector<geometry::Vector<Uint8> >::size_type NumPositions() const { return positions.size(); }
        template<class U>
-       void CalculatePositions(U width, U height, std::vector<geometry::Point<U> > &dest) const {
+       void CalculatePositions(U width, U height, std::vector<geometry::Vector<U> > &dest) const {
                dest.clear();
                dest.reserve(positions.size());
-               for (std::vector<geometry::Point<Uint8> >::const_iterator i(positions.begin()), end(positions.end()); i != end; ++i) {
-                       dest.push_back(geometry::Point<U>(
+               for (std::vector<geometry::Vector<Uint8> >::const_iterator i(positions.begin()), end(positions.end()); i != end; ++i) {
+                       dest.push_back(geometry::Vector<U>(
                                        i->X() * width / 255,
                                        i->Y() * height / 223
                                        ));
                }
        }
        template<class U>
-       geometry::Point<U> CalculatePosition(std::vector<geometry::Point<Uint8> >::size_type index, U width, U height) const {
+       geometry::Vector<U> CalculatePosition(std::vector<geometry::Vector<Uint8> >::size_type index, U width, U height) const {
                assert(index >= 0 && index < positions.size());
-               return geometry::Point<U>(
+               return geometry::Vector<U>(
                                positions[index].X() * width / 255,
                                positions[index].Y() * height / 223
                                );
        }
 
 public:
-       void AddPosition(const geometry::Point<Uint8> &p) {
+       void AddPosition(const geometry::Vector<Uint8> &p) {
                positions.push_back(p);
        }
 
 private:
-       std::vector<geometry::Point<Uint8> > positions;
+       std::vector<geometry::Vector<Uint8> > positions;
 
 };