X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FPartyLayout.h;fp=src%2Fbattle%2FPartyLayout.h;h=684413964d096b77b352f5e31840d97acc47c65e;hb=cded7d136b41e22f363ec702f2288491c0006e3a;hp=d16f2bdd6eb678212b60e1c098cdbdc3b2777f87;hpb=f6e55f72530b2d01fbbe8f5745f830d17231c2c4;p=l2e.git diff --git a/src/battle/PartyLayout.h b/src/battle/PartyLayout.h index d16f2bd..6844139 100644 --- a/src/battle/PartyLayout.h +++ b/src/battle/PartyLayout.h @@ -10,6 +10,7 @@ #include "../geometry/Point.h" +#include #include #include @@ -33,6 +34,14 @@ public: )); } } + template + geometry::Point CalculatePosition(std::vector >::size_type index, U width, U height) const { + assert(index >= 0 && index < positions.size()); + return geometry::Point( + positions[index].X() * width / 255, + positions[index].Y() * height / 223 + ); + } public: void AddPosition(const geometry::Point &p) {