SiegeInfo.h 720 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * SiegeInfo.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. #include "../GameConstants.h"
  12. //only for use in BattleInfo
  13. struct DLL_LINKAGE SiegeInfo
  14. {
  15. std::array<si8, EWallPart::PARTS_COUNT> wallState;
  16. EGateState gateState;
  17. SiegeInfo();
  18. // return EWallState decreased by value of damage points
  19. static EWallState::EWallState applyDamage(EWallState::EWallState state, unsigned int value);
  20. template <typename Handler> void serialize(Handler &h, const int version)
  21. {
  22. h & wallState;
  23. h & gateState;
  24. }
  25. };