Cleaned up map generator code
This commit is contained in:
parent
a8c3bac31f
commit
ee8ff792b5
2 changed files with 614 additions and 642 deletions
File diff suppressed because it is too large
Load diff
|
@ -18,7 +18,6 @@
|
|||
#define DEFAULT_MAP_GENERATOR_JOB_HPP_INCLUDED
|
||||
|
||||
class config;
|
||||
class unit_race;
|
||||
|
||||
#include "util.hpp"
|
||||
#include "map/location.hpp"
|
||||
|
@ -39,23 +38,23 @@ public:
|
|||
|
||||
/** Generate the map. */
|
||||
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);
|
||||
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);
|
||||
private:
|
||||
typedef std::vector<std::vector<int> > height_map;
|
||||
typedef t_translation::t_map terrain_map;
|
||||
|
||||
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);
|
||||
terrain_map& terrain, int x, int y, std::vector<map_location>& river,
|
||||
std::set<map_location>& seen_locations, int river_uphill);
|
||||
|
||||
std::vector<map_location> generate_river(const height_map& heights, terrain_map& terrain, int x, int y, int river_uphill);
|
||||
|
||||
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);
|
||||
size_t iterations, size_t hill_size,
|
||||
size_t island_size, size_t island_off_center);
|
||||
|
||||
bool generate_lake(t_translation::t_map& terrain, int x, int y, int lake_fall_off, std::set<map_location>& locs_touched);
|
||||
map_location random_point_at_side(size_t width, size_t height);
|
||||
|
|
Loading…
Add table
Reference in a new issue