The Battle for Wesnoth  1.19.0+dev
Macros | Typedefs | Functions | Variables
default_map_generator_job.cpp File Reference

Map-generator, with standalone testprogram. More...

#include "generators/default_map_generator_job.hpp"
#include "serialization/string_utils.hpp"
#include "game_config_manager.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "generators/map_generator.hpp"
#include "pathfind/pathfind.hpp"
#include "pathutils.hpp"
#include "utils/name_generator_factory.hpp"
#include "seed_rng.hpp"
#include "wml_exception.hpp"
#include <SDL2/SDL_timer.h>
Include dependency graph for default_map_generator_job.cpp:

Go to the source code of this file.


#define ERR_NG   LOG_STREAM(err, log_mapgen)
#define LOG_NG   LOG_STREAM(info, log_mapgen)
#define DBG_NG   LOG_STREAM(debug, log_mapgen)


typedef std::vector< std::vector< int > > height_map
typedef t_translation::ter_map terrain_map
typedef std::map< t_translation::terrain_code, t_translation::ter_listtcode_list_cache


static std::string output_map (const terrain_map &terrain, t_translation::starting_positions &starting_positions)
 Function which, given the map will output it in a valid format. More...
static int rank_castle_location (int x, int y, const is_valid_terrain &valid_terrain, int min_x, int max_x, int min_y, int max_y, std::size_t min_distance, const std::vector< map_location > &other_castles, int highest_ranking)
static map_location place_village (const t_translation::ter_map &map, const std::size_t x, const std::size_t y, const std::size_t radius, const config &cfg, tcode_list_cache &adj_liked_cache)
static void flood_name (const map_location &start, const std::string &name, std::map< map_location, std::string > &tile_names, const t_translation::ter_match &tile_types, const terrain_map &terrain, unsigned width, unsigned height, std::size_t label_count, std::map< map_location, std::string > *labels, const std::string &full_name)


static lg::log_domain log_mapgen ("mapgen")

Detailed Description

Map-generator, with standalone testprogram.

Definition in file default_map_generator_job.cpp.

Macro Definition Documentation


#define DBG_NG   LOG_STREAM(debug, log_mapgen)

Definition at line 39 of file default_map_generator_job.cpp.


#define ERR_NG   LOG_STREAM(err, log_mapgen)

Definition at line 37 of file default_map_generator_job.cpp.


#define LOG_NG   LOG_STREAM(info, log_mapgen)

Definition at line 38 of file default_map_generator_job.cpp.

Typedef Documentation

◆ height_map

typedef std::vector<std::vector<int> > height_map

Definition at line 41 of file default_map_generator_job.cpp.

◆ tcode_list_cache

Definition at line 610 of file default_map_generator_job.cpp.

◆ terrain_map

Definition at line 42 of file default_map_generator_job.cpp.

Function Documentation

◆ flood_name()

static void flood_name ( const map_location start,
const std::string &  name,
std::map< map_location, std::string > &  tile_names,
const t_translation::ter_match tile_types,
const terrain_map terrain,
unsigned  width,
unsigned  height,
std::size_t  label_count,
std::map< map_location, std::string > *  labels,
const std::string &  full_name 

◆ output_map()

static std::string output_map ( const terrain_map terrain,
t_translation::starting_positions starting_positions 

◆ place_village()

static map_location place_village ( const t_translation::ter_map map,
const std::size_t  x,
const std::size_t  y,
const std::size_t  radius,
const config cfg,
tcode_list_cache adj_liked_cache 

◆ rank_castle_location()

static int rank_castle_location ( int  x,
int  y,
const is_valid_terrain &  valid_terrain,
int  min_x,
int  max_x,
int  min_y,
int  max_y,
std::size_t  min_distance,
const std::vector< map_location > &  other_castles,
int  highest_ranking 

Definition at line 548 of file default_map_generator_job.cpp.

References c, distance_between(), and i.

Referenced by default_map_generator_job::default_generate_map().

Variable Documentation

◆ log_mapgen

lg::log_domain log_mapgen("mapgen") ( "mapgen"  )