]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/AttackAnimation.h
alternate approach to battle animation
[l2e.git] / src / battle / AttackAnimation.h
diff --git a/src/battle/AttackAnimation.h b/src/battle/AttackAnimation.h
deleted file mode 100644 (file)
index 48b1a5d..0000000
+++ /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 <vector>
-#include <SDL.h>
-
-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<int> &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<Code> text;
-       app::Timer<Uint32> timer;
-       struct AnimationMemo {
-               graphics::Animation *animation;
-               geometry::Point<int> position;
-       };
-       std::vector<AnimationMemo> animations;
-       std::vector<graphics::Animation *> foreignAnimations;
-       int cursor;
-
-};
-
-}
-
-#endif /* BATTLE_ATTACKANIMATION_H_ */