X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FPerformAttacks.h;h=37328dc89db6e01700a94855ac2aa6c9c95c9091;hb=087783315ac5955c17bb3b051c9351f321653df6;hp=06ce1b89cd93329719988b561b272fcf1c6982e9;hpb=5ca18f73987fb3935ab34654cbbecf5eca4704cb;p=l2e.git diff --git a/src/battle/states/PerformAttacks.h b/src/battle/states/PerformAttacks.h index 06ce1b8..37328dc 100644 --- a/src/battle/states/PerformAttacks.h +++ b/src/battle/states/PerformAttacks.h @@ -1,34 +1,32 @@ -/* - * 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 "../BattleState.h" #include "../NumberAnimation.h" -#include "../../geometry/Vector.h" +#include "../../math/Vector.h" #include "../../graphics/Animation.h" #include + 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 &); - virtual void UpdateWorld(float deltaT); + virtual void UpdateWorld(Uint32 deltaT); virtual void Render(SDL_Surface *); private: @@ -47,23 +45,27 @@ private: private: void AddNumberAnimations(const TargetSelection &); - void RenderTitleBar(SDL_Surface *screen, const geometry::Vector &offset) const; - void RenderNumbers(SDL_Surface *screen, const geometry::Vector &offset) const; - void RenderTargetAnimation(SDL_Surface *screen, const geometry::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; app::Timer titleBarTimer; app::Timer targetAnimationTimer; std::vector numberAnimation; - std::vector > numberPosition; + std::vector > numberPosition; + math::Vector framePosition; + math::Vector frameSize; + math::Vector textPosition; int cursor; }; } -#endif /* BATTLE_PERFORMATTACKS_H_ */ +#endif