-/*
- * 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 {
return battle->HeroAt(index).Sprite();
}
-void HeroTag::Render(SDL_Surface *screen, int width, int height, Vector<int> position, bool active) const {
+void HeroTag::Render(SDL_Surface *screen, int width, int height, const Vector<int> &position, bool active) const {
const Resources &r(battle->Res());
// frame
const Frame *frame(active ? r.activeHeroTagFrame : r.heroTagFrame);
- Vector<int> frameOffset(frame->BorderWidth(), frame->BorderHeight());
+ Vector<int> frameOffset(frame->BorderSize());
Vector<int> alignOffset((index % 2) ? 4 * r.heroTagFont->CharWidth() : 0, 0);
frame->Draw(screen, position, width, height);