4 * Created on: Aug 6, 2012
11 #include "../geometry/operators.h"
12 #include "../geometry/Vector.h"
13 #include "../graphics/Frame.h"
14 #include "../graphics/Sprite.h"
16 using geometry::Point;
17 using geometry::Vector;
21 void HeroTag::Render(SDL_Surface *screen, int width, int height, Point<int> position, bool active) const {
23 activeFrame->Draw(screen, position, width, height);
25 frame->Draw(screen, position, width, height);
28 Vector<int> heroOffset(
29 (align == LEFT) ? 3 : width - hero->Sprite()->Width() - 3,
30 height - hero->Sprite()->Height() - 3);
31 hero->Sprite()->Draw(screen, position + heroOffset, 0, hero->Health() > 0 ? 0 : 2);