X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FPartyLayout.h;h=684413964d096b77b352f5e31840d97acc47c65e;hb=b53c2ec2621ccc654e819cb203dc26e0a482bd41;hp=d16f2bdd6eb678212b60e1c098cdbdc3b2777f87;hpb=d1df71f636f14fe2cb5b44b173e3d30bdc73521e;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) {