X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHeroTag.cpp;h=6dc5e86fa11d261063def6720f0bd6b82ed73e59;hb=0b11a24a8b08c49d6e4301573602fb6d01e7a8c8;hp=7938250910aa284a2f2f9946c9f685be5914088c;hpb=0542849dfccfec1ce1477265fa0fee2401a8fb23;p=l2e.git diff --git a/src/battle/HeroTag.cpp b/src/battle/HeroTag.cpp index 7938250..6dc5e86 100644 --- a/src/battle/HeroTag.cpp +++ b/src/battle/HeroTag.cpp @@ -1,23 +1,16 @@ -/* - * HeroTag.cpp - * - * Created on: Aug 6, 2012 - * Author: holy - */ - #include "HeroTag.h" #include "AttackChoice.h" #include "BattleState.h" #include "Hero.h" #include "Resources.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include "../graphics/Font.h" #include "../graphics/Frame.h" #include "../graphics/Gauge.h" #include "../graphics/Sprite.h" -using geometry::Vector; +using math::Vector; using graphics::Frame; namespace battle { @@ -26,12 +19,12 @@ const graphics::Sprite *HeroTag::HeroSprite() const { return battle->HeroAt(index).Sprite(); } -void HeroTag::Render(SDL_Surface *screen, int width, int height, Vector 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);