17 #ifndef DEFAULT_MAP_GENERATOR_JOB_HPP_INCLUDED
18 #define DEFAULT_MAP_GENERATOR_JOB_HPP_INCLUDED
29 #include <boost/random.hpp>
30 #include <boost/cstdint.hpp>
31 #include <boost/smart_ptr/shared_ptr.hpp>
42 size_t iterations,
size_t hill_size,
43 size_t max_lakes,
size_t nvillages,
size_t castle_size,
size_t nplayers,
44 bool roads_between_castles, std::map<map_location,std::string>* labels,
52 terrain_map&
terrain,
int x,
int y, std::vector<map_location>& river,
53 std::set<map_location>& seen_locations,
int river_uphill);
55 std::vector<map_location>
generate_river(
const height_map& heights, terrain_map&
terrain,
int x,
int y,
int river_uphill);
58 size_t iterations,
size_t hill_size,
59 size_t island_size,
size_t island_off_center);
67 boost::random::mt19937
rng_;
std::string default_generate_map(size_t width, size_t height, size_t island_size, size_t island_off_center, size_t iterations, size_t hill_size, size_t max_lakes, size_t nvillages, size_t castle_size, size_t nplayers, bool roads_between_castles, std::map< map_location, std::string > *labels, const config &cfg)
Generate the map.
std::vector< map_location > generate_river(const height_map &heights, terrain_map &terrain, int x, int y, int river_uphill)
t_translation::t_map terrain_map
boost::random::mt19937 rng_
GLint GLint GLint GLint GLint GLint y
bool generate_river_internal(const height_map &heights, terrain_map &terrain, int x, int y, std::vector< map_location > &river, std::set< map_location > &seen_locations, int river_uphill)
std::vector< std::vector< t_terrain > > t_map
map_location random_point_at_side(size_t width, size_t height)
Returns a random tile at one of the borders of a map that is of the given dimensions.
std::map< std::string, t_string > string_map
std::string base_name(const std::string &file)
Returns the base filename of a file, with directory name stripped.
static const ::config * terrain
The terrain used to create the cache.
Templates and utility-routines for strings and numbers.
Encapsulates the map of the game.
default_map_generator_job()
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
bool generate_lake(t_translation::t_map &terrain, int x, int y, int lake_fall_off, std::set< map_location > &locs_touched)
Generate a lake.
height_map generate_height_map(size_t width, size_t height, size_t iterations, size_t hill_size, size_t island_size, size_t island_off_center)
Generate a height-map.
GLint GLint GLint GLint GLint GLint GLsizei width
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
std::vector< std::vector< int > > height_map
std::string generate_name(boost::shared_ptr< name_generator > &name_generator, const std::string &id, std::string *base_name=nullptr, utils::string_map *additional_symbols=nullptr)