X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FAttackAnimation.h;h=48b1a5d65cfc590a3de0bdce16417c75162f0c02;hb=8456b7dac2051bfd2b507a39854c1428eb4d91cd;hp=a8ec014ecc43de3a3c003a75a10711b168d19d2d;hpb=c98665e575f49251dd9b123204063eefdc10e681;p=l2e.git diff --git a/src/battle/AttackAnimation.h b/src/battle/AttackAnimation.h index a8ec014..48b1a5d 100644 --- a/src/battle/AttackAnimation.h +++ b/src/battle/AttackAnimation.h @@ -29,37 +29,41 @@ public: ~AttackAnimation(); public: - void Wait(int ms); - void WaitForAnimation(); + 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 ExecuteWait(); - bool ExecuteWaitAnimation(); + bool ExecuteStartTimer(); bool ExecuteAttackAnimation(); bool ExecuteSpellAnimation(); bool ExecuteTargetAnimation(); bool ExecuteFullscreenAnimation(); + bool ExecuteWaitTimer(); + bool ExecuteWaitAnimations(); private: enum Command { - WAIT, - WAIT_ANIMATION, + NOOP, + START_TIMER, ATTACK_ANIMATION, SPELL_ANIMATION, TARGET_ANIMATION, FULLSCREEN_ANIMATION, + WAIT_TIMER, + WAIT_ANIMATIONS, }; union Code { Code(Command c) : command(c) { }