]> git.localhorst.tv Git - l2e.git/blob - src/battle/AttackTypeMenu.cpp
added battle move menu
[l2e.git] / src / battle / AttackTypeMenu.cpp
1 /*
2  * AttackTypeMenu.cpp
3  *
4  *  Created on: Aug 6, 2012
5  *      Author: holy
6  */
7
8 #include "AttackTypeMenu.h"
9
10 #include "../geometry/operators.h"
11 #include "../geometry/Vector.h"
12 #include "../graphics/Sprite.h"
13
14 using geometry::Point;
15 using geometry::Vector;
16
17 namespace battle {
18
19 void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Point<int> &position) {
20         Vector<int> swordOffset(IconWidth(), IconHeight());
21         Vector<int> magicOffset(IconWidth(), 0);
22         Vector<int> defendOffset(2 * IconWidth(), IconHeight());
23         Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
24         Vector<int> itemOffset(0, IconHeight());
25
26         icons->Draw(screen, position + swordOffset, SWORD, (selected == SWORD) ? 1 : 0);
27         icons->Draw(screen, position + magicOffset, MAGIC, (selected == MAGIC) ? 1 : 0);
28         icons->Draw(screen, position + defendOffset, DEFEND, (selected == DEFEND) ? 1 : 0);
29         icons->Draw(screen, position + ikariOffset, IKARI, (selected == IKARI) ? 1 : 0);
30         icons->Draw(screen, position + itemOffset, ITEM, (selected == ITEM) ? 1 : 0);
31 }
32
33 }