TurnTimerInfo.h 881 B

1234567891011121314151617181920212223242526272829303132333435
  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 isEnabled() const;
  19. bool isBattleEnabled() const;
  20. template <typename Handler>
  21. void serialize(Handler &h, const int version)
  22. {
  23. h & turnTimer;
  24. h & baseTimer;
  25. h & battleTimer;
  26. h & creatureTimer;
  27. }
  28. };
  29. VCMI_LIB_NAMESPACE_END