#include "HeroTag.h"
+#include "AttackChoice.h"
#include "Hero.h"
#include "Resources.h"
#include "../geometry/operators.h"
// name
res->normalFont->DrawString(hero->Name(), screen, position + frameOffset + alignOffset, 5);
+ // attack icon
+ if (choice->GetType() != AttackChoice::UNDECIDED) {
+ Vector<int> attackIconOffset(labelX + res->heroTagLabels->Width(), frameOffset.Y() + 3 * res->heroTagFont->CharHeight());
+ res->attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, choice->GetType());
+ }
+
// hero
Vector<int> heroOffset(
(align == LEFT) ? yOffset : width - hero->Sprite()->Width() - yOffset,
graphics::Sprite *moveIcons;
graphics::Sprite *attackIcons;
+ graphics::Sprite *attackChoiceIcons;
graphics::Frame *heroTagFrame;
graphics::Frame *activeHeroTagFrame;
Resources()
: moveIcons(0)
, attackIcons(0)
+ , attackChoiceIcons(0)
, heroTagFrame(0)
, activeHeroTagFrame(0)
SDL_Surface *attackIconsImg(IMG_Load("test-data/attack-type-icons.png"));
Sprite attackIconsSprite(attackIconsImg, 32, 32);
battleRes.attackIcons = &attackIconsSprite;
+ SDL_Surface *attackChoiceIconsImg(IMG_Load("test-data/attack-choice-icons.png"));
+ Sprite attackChoiceIconsSprite(attackChoiceIconsImg, 16, 16);
+ battleRes.attackChoiceIcons = &attackChoiceIconsSprite;
SDL_Surface *moveIconsImg(IMG_Load("test-data/move-icons.png"));
Sprite moveIconsSprite(moveIconsImg, 32, 32);
battleRes.moveIcons = &moveIconsSprite;