Functions.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. VCMI_LIB_NAMESPACE_BEGIN
  14. class RmgMap;
  15. class ObjectManager;
  16. class ObjectTemplate;
  17. class CMapGenerator;
  18. class CRandomGenerator;
  19. class rmgException : public std::exception
  20. {
  21. std::string msg;
  22. public:
  23. explicit rmgException(const std::string& _Message) : msg(_Message)
  24. {
  25. }
  26. virtual ~rmgException() throw ()
  27. {
  28. };
  29. const char *what() const throw () override
  30. {
  31. return msg.c_str();
  32. }
  33. };
  34. rmg::Tileset collectDistantTiles(const Zone & zone, int distance);
  35. void createBorder(RmgMap & gen, Zone & zone);
  36. void paintZoneTerrain(const Zone & zone, CRandomGenerator & generator, std::shared_ptr<MapProxy> mapProxy, TerrainId terrainType);
  37. void initTerrainType(Zone & zone, CMapGenerator & gen);
  38. int chooseRandomAppearance(CRandomGenerator & generator, si32 ObjID, TerrainId terrain);
  39. VCMI_LIB_NAMESPACE_END