]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackTypeMenu.cpp
removed stupid file headers that eclipse put in
[l2e.git] / src / battle / AttackTypeMenu.cpp
1 #include "AttackTypeMenu.h"
2
3 #include "../geometry/Vector.h"
4 #include "../graphics/Sprite.h"
5
6 using geometry::Vector;
7
8 namespace battle {
9
10 void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Vector<int> &position) {
11         const Vector<int> &swordOffset(IconSize());
12         const Vector<int> magicOffset(IconWidth(), 0);
13         const Vector<int> defendOffset(2 * IconWidth(), IconHeight());
14         const Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
15         const Vector<int> itemOffset(0, IconHeight());
16
17         icons->Draw(screen, position + swordOffset, AttackChoice::SWORD, (selected == AttackChoice::SWORD) ? 1 : 0);
18         icons->Draw(screen, position + magicOffset, AttackChoice::MAGIC, (selected == AttackChoice::MAGIC) ? 1 : 0);
19         icons->Draw(screen, position + defendOffset, AttackChoice::DEFEND, (selected == AttackChoice::DEFEND) ? 1 : 0);
20         icons->Draw(screen, position + ikariOffset, AttackChoice::IKARI, (selected == AttackChoice::IKARI) ? 1 : 0);
21         icons->Draw(screen, position + itemOffset, AttackChoice::ITEM, (selected == AttackChoice::ITEM) ? 1 : 0);
22 }
23
24 }