X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FSmallHeroTag.cpp;h=1496d47f3c336c836069eb4158f1669f2f714315;hb=a3ba4dc677ad7c92eeb78b20b642241563605c9d;hp=7843cc0cba29c62e4884ae814ce3a8886718b20e;hpb=04b582180c8f86f50f08f5141a2514a1fcda3e01;p=l2e.git diff --git a/src/battle/SmallHeroTag.cpp b/src/battle/SmallHeroTag.cpp index 7843cc0..1496d47 100644 --- a/src/battle/SmallHeroTag.cpp +++ b/src/battle/SmallHeroTag.cpp @@ -1,28 +1,19 @@ -/* - * SmallHeroTag.cpp - * - * Created on: Aug 11, 2012 - * Author: holy - */ - #include "SmallHeroTag.h" #include "BattleState.h" -#include "../geometry/operators.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include "../graphics/Font.h" #include "../graphics/Frame.h" #include "../graphics/Gauge.h" -using geometry::Point; -using geometry::Vector; +using math::Vector; using graphics::Font; using graphics::Frame; using graphics::Sprite; namespace battle { -void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, geometry::Point position) const { +void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, const math::Vector &position) const { const Resources &r(battle->Res()); const Frame *frame((index == battle->MaxHeroes() - 1) ? r.lastSmallHeroTagFrame : r.smallHeroTagFrame); const Font *font(r.normalFont); @@ -34,7 +25,7 @@ void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, geometry:: const Hero &hero(battle->HeroAt(index)); int gaugeWidth(width - 2 * frame->BorderWidth() - labels->Width()); - Vector nameOffset(frame->BorderWidth(), frame->BorderHeight()); + Vector nameOffset(frame->BorderSize()); Vector hpLabelOffset(nameOffset.X(), nameOffset.Y() + font->CharHeight()); Vector mpLabelOffset(hpLabelOffset.X(), hpLabelOffset.Y() + font->CharHeight()); Vector ipLabelOffset(mpLabelOffset.X(), mpLabelOffset.Y() + font->CharHeight());