X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHeroTag.cpp;h=f94581b698a957b04e30e9625f385f5689a787d4;hb=7252571fb926a187c4c40e8f4eec718f16d63ffa;hp=228bfda4aef5e654a368c8c1634460f4ca890541;hpb=c68b073db752dcdcf8c900efba7d8a5da091751c;p=l2e.git diff --git a/src/battle/HeroTag.cpp b/src/battle/HeroTag.cpp index 228bfda..f94581b 100644 --- a/src/battle/HeroTag.cpp +++ b/src/battle/HeroTag.cpp @@ -11,14 +11,12 @@ #include "BattleState.h" #include "Hero.h" #include "Resources.h" -#include "../geometry/operators.h" #include "../geometry/Vector.h" #include "../graphics/Font.h" #include "../graphics/Frame.h" #include "../graphics/Gauge.h" #include "../graphics/Sprite.h" -using geometry::Point; using geometry::Vector; using graphics::Frame; @@ -28,12 +26,12 @@ const graphics::Sprite *HeroTag::HeroSprite() const { return battle->HeroAt(index).Sprite(); } -void HeroTag::Render(SDL_Surface *screen, int width, int height, Point position, bool active) const { +void HeroTag::Render(SDL_Surface *screen, int width, int height, const Vector &position, bool active) const { const Resources &r(battle->Res()); // frame const Frame *frame(active ? r.activeHeroTagFrame : r.heroTagFrame); - Vector frameOffset(frame->BorderWidth(), frame->BorderHeight()); + Vector frameOffset(frame->BorderSize()); Vector alignOffset((index % 2) ? 4 * r.heroTagFont->CharWidth() : 0, 0); frame->Draw(screen, position, width, height);