X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FSmallHeroTag.cpp;h=265f230642e58d36e3b53c78be83863221c65067;hb=60e0fe29ce6cd033edc78b181d9d07fa72c11172;hp=0bc160a33b4078f35465db81700408cf94a08a96;hpb=0542849dfccfec1ce1477265fa0fee2401a8fb23;p=l2e.git diff --git a/src/battle/SmallHeroTag.cpp b/src/battle/SmallHeroTag.cpp index 0bc160a..265f230 100644 --- a/src/battle/SmallHeroTag.cpp +++ b/src/battle/SmallHeroTag.cpp @@ -1,10 +1,3 @@ -/* - * SmallHeroTag.cpp - * - * Created on: Aug 11, 2012 - * Author: holy - */ - #include "SmallHeroTag.h" #include "BattleState.h" @@ -20,7 +13,7 @@ using graphics::Sprite; namespace battle { -void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, geometry::Vector position) const { +void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, const geometry::Vector &position) const { const Resources &r(battle->Res()); const Frame *frame((index == battle->MaxHeroes() - 1) ? r.lastSmallHeroTagFrame : r.smallHeroTagFrame); const Font *font(r.normalFont); @@ -32,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());