X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbattle%2Fstates%2FPerformAttacks.h;h=37328dc89db6e01700a94855ac2aa6c9c95c9091;hb=b7b7078d04007d5b86ab160288f88b57d76ea408;hp=ab1552595bca018ae5694b593aaf93c56e5f07c7;hpb=4309d259becd96ead792678257e910c03a6b4a3d;p=l2e.git diff --git a/src/battle/states/PerformAttacks.h b/src/battle/states/PerformAttacks.h index ab15525..37328dc 100644 --- a/src/battle/states/PerformAttacks.h +++ b/src/battle/states/PerformAttacks.h @@ -1,6 +1,12 @@ #ifndef BATTLE_PERFORMATTACKS_H_ #define BATTLE_PERFORMATTACKS_H_ +namespace battle { + class Battle; + class BattleState; + class TargetSelection; +} + #include "../../app/State.h" #include "../NumberAnimation.h" @@ -9,17 +15,14 @@ #include -namespace battle { -class BattleState; -class TargetSelection; +namespace battle { class PerformAttacks : public app::State { public: - explicit PerformAttacks(BattleState *battle) - : battle(battle), moveAnimation(0), targetAnimation(0), titleBarText(0), cursor(-1) { } + PerformAttacks(Battle *battle, BattleState *parent); public: virtual void HandleEvents(const app::Input &); @@ -42,12 +45,13 @@ private: private: void AddNumberAnimations(const TargetSelection &); - void RenderTitleBar(SDL_Surface *screen, const math::Vector &offset) const; - void RenderNumbers(SDL_Surface *screen, const math::Vector &offset) const; - void RenderTargetAnimation(SDL_Surface *screen, const math::Vector &offset) const; + void RenderTitleBar(SDL_Surface *screen) const; + void RenderNumbers(SDL_Surface *screen) const; + void RenderTargetAnimation(SDL_Surface *screen) const; private: - BattleState *battle; + Battle *battle; + BattleState *parent; graphics::AnimationRunner moveAnimation; graphics::AnimationRunner targetAnimation; const char *titleBarText; @@ -55,6 +59,9 @@ private: app::Timer targetAnimationTimer; std::vector numberAnimation; std::vector > numberPosition; + math::Vector framePosition; + math::Vector frameSize; + math::Vector textPosition; int cursor; };