X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FPerformAttacks.h;h=37328dc89db6e01700a94855ac2aa6c9c95c9091;hb=9a7ac49b7e3b7cd4a09b016ceec116830a3458f9;hp=adbf3ba8f7e84b80399dd3b5ad4a7e34bd7c9d04;hpb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;p=l2e.git diff --git a/src/battle/states/PerformAttacks.h b/src/battle/states/PerformAttacks.h index adbf3ba..37328dc 100644 --- a/src/battle/states/PerformAttacks.h +++ b/src/battle/states/PerformAttacks.h @@ -1,13 +1,12 @@ -/* - * PerformAttacks.h - * - * Created on: Aug 10, 2012 - * Author: holy - */ - #ifndef BATTLE_PERFORMATTACKS_H_ #define BATTLE_PERFORMATTACKS_H_ +namespace battle { + class Battle; + class BattleState; + class TargetSelection; +} + #include "../../app/State.h" #include "../NumberAnimation.h" @@ -16,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 &); @@ -49,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; @@ -62,10 +59,13 @@ private: app::Timer targetAnimationTimer; std::vector numberAnimation; std::vector > numberPosition; + math::Vector framePosition; + math::Vector frameSize; + math::Vector textPosition; int cursor; }; } -#endif /* BATTLE_PERFORMATTACKS_H_ */ +#endif