ConnectionsPlacer.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * ConnectionsPlacer.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 "../Zone.h"
  12. #include "../RmgArea.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. class ConnectionsPlacer: public Modificator
  15. {
  16. public:
  17. MODIFICATOR(ConnectionsPlacer);
  18. void process() override;
  19. void init() override;
  20. void addConnection(const rmg::ZoneConnection& connection);
  21. void selfSideDirectConnection(const rmg::ZoneConnection & connection);
  22. void selfSideIndirectConnection(const rmg::ZoneConnection & connection);
  23. void otherSideConnection(const rmg::ZoneConnection & connection);
  24. void createBorder();
  25. bool shouldGenerateRoad(const rmg::ZoneConnection& connection) const;
  26. protected:
  27. void collectNeighbourZones();
  28. protected:
  29. std::vector<rmg::ZoneConnection> dConnections;
  30. std::vector<rmg::ZoneConnection> dCompleted;
  31. std::map<TRmgTemplateZoneId, rmg::Tileset> dNeighbourZones;
  32. };
  33. VCMI_LIB_NAMESPACE_END