TurnTimerInfo.h 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * TurnTimerInfo.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. struct DLL_LINKAGE TurnTimerInfo
  13. {
  14. int turnTimer = 0; //in ms, counts down when player is making his turn on adventure map
  15. int baseTimer = 0; //in ms, counts down only when turn timer runs out
  16. int battleTimer = 0; //in ms, counts down during battles when creature timer runs out
  17. int creatureTimer = 0; //in ms, counts down when player is choosing action in battle
  18. bool isActive = false; //is being counting down
  19. bool isBattle = false; //indicator for current timer mode
  20. bool isEnabled() const;
  21. bool isBattleEnabled() const;
  22. template <typename Handler>
  23. void serialize(Handler &h, const int version)
  24. {
  25. h & turnTimer;
  26. h & baseTimer;
  27. h & battleTimer;
  28. h & creatureTimer;
  29. h & isActive;
  30. h & isBattle;
  31. }
  32. };
  33. VCMI_LIB_NAMESPACE_END