]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackTypeMenu.cpp
switched some (x,y) and (w,h) pairs to vectors
[l2e.git] / src / battle / AttackTypeMenu.cpp
index b18c5221021aca9c32b8618a74b1e0abba78e308..f9786fb2c2405d1da0311e4038d9d93975cf6ca4 100644 (file)
@@ -15,11 +15,11 @@ using geometry::Vector;
 namespace battle {
 
 void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Vector<int> &position) {
-       Vector<int> swordOffset(IconWidth(), IconHeight());
-       Vector<int> magicOffset(IconWidth(), 0);
-       Vector<int> defendOffset(2 * IconWidth(), IconHeight());
-       Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
-       Vector<int> itemOffset(0, IconHeight());
+       const Vector<int> &swordOffset(IconSize());
+       const Vector<int> magicOffset(IconWidth(), 0);
+       const Vector<int> defendOffset(2 * IconWidth(), IconHeight());
+       const Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
+       const Vector<int> itemOffset(0, IconHeight());
 
        icons->Draw(screen, position + swordOffset, AttackChoice::SWORD, (selected == AttackChoice::SWORD) ? 1 : 0);
        icons->Draw(screen, position + magicOffset, AttackChoice::MAGIC, (selected == AttackChoice::MAGIC) ? 1 : 0);