CBattleStackAnimation.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "CBattleAnimation.h"
  3. #include "../../lib/SHexField.h"
  4. class CStack;
  5. class CBattleInterface;
  6. class CCreatureAnimation;
  7. /*
  8. * CBattleStackAnimation.h, part of VCMI engine
  9. *
  10. * Authors: listed in file AUTHORS in main folder
  11. *
  12. * License: GNU General Public License v2.0 or later
  13. * Full text of license available in license.txt file, in main folder
  14. *
  15. */
  16. /// Sub-class which is responsible for managing the battle stack animation.
  17. class CBattleStackAnimation : public CBattleAnimation
  18. {
  19. public:
  20. const CStack * stack; //id of stack whose animation it is
  21. CBattleStackAnimation(CBattleInterface * _owner, const CStack * _stack);
  22. static bool isToReverseHlp(SHexField hexFrom, SHexField hexTo, bool curDir); //helper for isToReverse
  23. static bool isToReverse(SHexField hexFrom, SHexField hexTo, bool curDir /*if true, creature is in attacker's direction*/, bool toDoubleWide, bool toDir); //determines if creature should be reversed (it stands on hexFrom and should 'see' hexTo)
  24. CCreatureAnimation *myAnim(); //animation for our stack
  25. };