X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackTypeMenu.cpp;h=952bf8122e8d06900257f34791d50c49a4c02894;hb=dc275497c592669dda75645604a9b35d32f63e90;hp=2ec7a1f129b26bbe25eadf47232d014023fc8cdd;hpb=4d0a650b178d81387caa36953ed06cc5d6c28213;p=l2e.git diff --git a/src/battle/AttackTypeMenu.cpp b/src/battle/AttackTypeMenu.cpp index 2ec7a1f..952bf81 100644 --- a/src/battle/AttackTypeMenu.cpp +++ b/src/battle/AttackTypeMenu.cpp @@ -1,27 +1,18 @@ -/* - * AttackTypeMenu.cpp - * - * Created on: Aug 6, 2012 - * Author: holy - */ - #include "AttackTypeMenu.h" -#include "../geometry/operators.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include "../graphics/Sprite.h" -using geometry::Point; -using geometry::Vector; +using math::Vector; namespace battle { -void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Point &position) { - Vector swordOffset(IconWidth(), IconHeight()); - Vector magicOffset(IconWidth(), 0); - Vector defendOffset(2 * IconWidth(), IconHeight()); - Vector ikariOffset(IconWidth(), 2 * IconHeight()); - Vector itemOffset(0, IconHeight()); +void AttackTypeMenu::Render(SDL_Surface *screen, const math::Vector &position) { + const Vector &swordOffset(IconSize()); + const Vector magicOffset(IconWidth(), 0); + const Vector defendOffset(2 * IconWidth(), IconHeight()); + const Vector ikariOffset(IconWidth(), 2 * IconHeight()); + const Vector 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);