X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackAnimation.h;fp=src%2Fbattle%2FAttackAnimation.h;h=0000000000000000000000000000000000000000;hb=00b557a47e47d9410730d47d436f6158a3fb79f5;hp=48b1a5d65cfc590a3de0bdce16417c75162f0c02;hpb=8456b7dac2051bfd2b507a39854c1428eb4d91cd;p=l2e.git diff --git a/src/battle/AttackAnimation.h b/src/battle/AttackAnimation.h deleted file mode 100644 index 48b1a5d..0000000 --- a/src/battle/AttackAnimation.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * AttackAnimation.h - * - * Created on: Aug 13, 2012 - * Author: holy - */ - -#ifndef BATTLE_ATTACKANIMATION_H_ -#define BATTLE_ATTACKANIMATION_H_ - -#include "../app/Timer.h" -#include "../geometry/Point.h" -#include "../geometry/Vector.h" - -#include -#include - -namespace app { class State; } -namespace graphics { class Animation; } - -namespace battle { - -class BattleState; - -class AttackAnimation { - -public: - AttackAnimation() : battle(0), state(0), cursor(0) { } - ~AttackAnimation(); - -public: - void StartTimer(int ms); - void PlayAttackAnimation(); - void PlaySpellAnimation(); - void PlayTargetAnimation(graphics::Animation *); - void PlayFullscreenAnimation(graphics::Animation *); - void WaitForTimer(); - void WaitForAnimations(); - -public: - void Start(BattleState *, app::State *); - void Update(); - bool Running() const; - bool Finished() const; - void Render(SDL_Surface *screen, const geometry::Vector &offset) const; - -private: - bool ExecuteCommand(); - bool ExecuteStartTimer(); - bool ExecuteAttackAnimation(); - bool ExecuteSpellAnimation(); - bool ExecuteTargetAnimation(); - bool ExecuteFullscreenAnimation(); - bool ExecuteWaitTimer(); - bool ExecuteWaitAnimations(); - -private: - enum Command { - NOOP, - START_TIMER, - ATTACK_ANIMATION, - SPELL_ANIMATION, - TARGET_ANIMATION, - FULLSCREEN_ANIMATION, - WAIT_TIMER, - WAIT_ANIMATIONS, - }; - union Code { - Code(Command c) : command(c) { } - Code(int n) : number(n) { } - Code(void *p) : ptr(p) { } - Command command; - int number; - void *ptr; - }; - BattleState *battle; - app::State *state; - std::vector text; - app::Timer timer; - struct AnimationMemo { - graphics::Animation *animation; - geometry::Point position; - }; - std::vector animations; - std::vector foreignAnimations; - int cursor; - -}; - -} - -#endif /* BATTLE_ATTACKANIMATION_H_ */