CMovementAnimation.h 896 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "CBattleStackAnimation.h"
  3. class CBattleInterface;
  4. class CStack;
  5. /*
  6. * CMovementAnimation.h, part of VCMI engine
  7. *
  8. * Authors: listed in file AUTHORS in main folder
  9. *
  10. * License: GNU General Public License v2.0 or later
  11. * Full text of license available in license.txt file, in main folder
  12. *
  13. */
  14. /// Move animation of a creature
  15. class CMovementAnimation : public CBattleStackAnimation
  16. {
  17. private:
  18. std::vector<SBattleHex> destTiles; //destination
  19. SBattleHex nextHex;
  20. ui32 nextPos;
  21. int distance;
  22. double stepX, stepY; //how far stack is moved in one frame
  23. double posX, posY;
  24. int steps, whichStep;
  25. int curStackPos; //position of stack before move
  26. public:
  27. bool init();
  28. void nextFrame();
  29. void endAnim();
  30. CMovementAnimation(CBattleInterface *_owner, const CStack *_stack, std::vector<SBattleHex> _destTiles, int _distance);
  31. };