BattleLayout.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * BattleLayout.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 "BattleHex.h"
  12. #include "BattleSide.h"
  13. #include "../constants/NumericConstants.h"
  14. #include "../constants/Enumerations.h"
  15. VCMI_LIB_NAMESPACE_BEGIN
  16. class CArmedInstance;
  17. class IGameInfoCallback;
  18. struct DLL_EXPORT BattleLayout
  19. {
  20. using UnitsArrayType = BattleSideArray<std::array<BattleHex, GameConstants::ARMY_SIZE>>;
  21. using MachinesArrayType = BattleSideArray<std::array<BattleHex, 4>>;
  22. using CommanderArrayType = BattleSideArray<BattleHex>;
  23. UnitsArrayType units;
  24. MachinesArrayType warMachines;
  25. CommanderArrayType commanders;
  26. bool tacticsAllowed = false;
  27. bool obstaclesAllowed = false;
  28. static BattleLayout createDefaultLayout(const IGameInfoCallback & gameInfo, const CArmedInstance * attacker, const CArmedInstance * defender);
  29. static BattleLayout createLayout(const IGameInfoCallback & gameInfo, const std::string & layoutName, const CArmedInstance * attacker, const CArmedInstance * defender);
  30. };
  31. VCMI_LIB_NAMESPACE_END