X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FHeroTag.h;h=5f122cf5d5b77fd24eb3f1f5e3a0d9502ad46681;hb=cec6ebf5e666a15ffe27b0f09f9b268e2cfcdf9b;hp=542b8c1b34190d1d53e2b2d5e92848d6ec252162;hpb=ca31ddeab37eebaa2de5e5b1c94974fac06d418b;p=l2e.git diff --git a/src/battle/HeroTag.h b/src/battle/HeroTag.h index 542b8c1..5f122cf 100644 --- a/src/battle/HeroTag.h +++ b/src/battle/HeroTag.h @@ -8,7 +8,9 @@ #ifndef BATTLE_HEROTAG_H_ #define BATTLE_HEROTAG_H_ +#include "Hero.h" #include "../geometry/Point.h" +#include "../geometry/Vector.h" #include @@ -22,7 +24,7 @@ namespace graphics { namespace battle { class AttackChoice; -class Hero; +struct Resources; class HeroTag { @@ -33,23 +35,21 @@ public: }; public: - HeroTag(const Hero *hero, const AttackChoice *choice, const graphics::Frame *frame, const graphics::Frame *activeFrame, const graphics::Gauge *healthGauge, const graphics::Gauge *manaGauge, const graphics::Gauge *ikariGauge, const graphics::Sprite *sprites, const graphics::Font *font, Alignment align) - : hero(hero), choice(choice), frame(frame), activeFrame(activeFrame), healthGauge(healthGauge), manaGauge(manaGauge), ikariGauge(ikariGauge), sprites(sprites), font(font), align(align) { } + HeroTag() : hero(0), choice(0), res(0), align(LEFT) { }; + HeroTag(const Hero *hero, const AttackChoice *choice, const Resources *res, Alignment align) + : hero(hero), choice(choice), res(res), align(align) { } ~HeroTag() { } public: + const graphics::Sprite *HeroSprite() const { return hero->Sprite(); } + geometry::Vector HeroOffset() const; + void Render(SDL_Surface *screen, int width, int height, geometry::Point position, bool active) const; private: const Hero *hero; const AttackChoice *choice; - const graphics::Frame *frame; - const graphics::Frame *activeFrame; - const graphics::Gauge *healthGauge; - const graphics::Gauge *manaGauge; - const graphics::Gauge *ikariGauge; - const graphics::Sprite *sprites; - const graphics::Font *font; + const Resources *res; Alignment align; };