mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Random map generator refactoring (#762)
random map generator refactoring and improvements
This commit is contained in:
committed by
Andrii Danylchenko
parent
804f1bf3f2
commit
4bd0ff680a
48
lib/rmg/Functions.h
Normal file
48
lib/rmg/Functions.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Functions.h, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Zone.h"
|
||||
#include <boost/heap/priority_queue.hpp> //A*
|
||||
|
||||
class RmgMap;
|
||||
class ObjectManager;
|
||||
class ObjectTemplate;
|
||||
class CMapGenerator;
|
||||
|
||||
class rmgException : public std::exception
|
||||
{
|
||||
std::string msg;
|
||||
public:
|
||||
explicit rmgException(const std::string& _Message) : msg(_Message)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~rmgException() throw ()
|
||||
{
|
||||
};
|
||||
|
||||
const char *what() const throw () override
|
||||
{
|
||||
return msg.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
rmg::Tileset collectDistantTiles(const Zone & zone, int distance);
|
||||
|
||||
void createBorder(RmgMap & gen, Zone & zone);
|
||||
|
||||
void paintZoneTerrain(const Zone & zone, CRandomGenerator & generator, RmgMap & map, const Terrain & terrainType);
|
||||
|
||||
void initTerrainType(Zone & zone, CMapGenerator & gen);
|
||||
|
||||
int chooseRandomAppearance(CRandomGenerator & generator, si32 ObjID, const Terrain & terrain);
|
||||
|
||||
Reference in New Issue
Block a user