Functions.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Functions.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 <boost/heap/priority_queue.hpp> //A*
  13. class RmgMap;
  14. class ObjectManager;
  15. class ObjectTemplate;
  16. class CMapGenerator;
  17. class rmgException : public std::exception
  18. {
  19. std::string msg;
  20. public:
  21. explicit rmgException(const std::string& _Message) : msg(_Message)
  22. {
  23. }
  24. virtual ~rmgException() throw ()
  25. {
  26. };
  27. const char *what() const throw () override
  28. {
  29. return msg.c_str();
  30. }
  31. };
  32. rmg::Tileset collectDistantTiles(const Zone & zone, int distance);
  33. void createBorder(RmgMap & gen, Zone & zone);
  34. void paintZoneTerrain(const Zone & zone, CRandomGenerator & generator, RmgMap & map, TTerrainId terrainType);
  35. void initTerrainType(Zone & zone, CMapGenerator & gen);
  36. int chooseRandomAppearance(CRandomGenerator & generator, si32 ObjID, TTerrainId terrain);