The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Typedefs | Functions | Variables
default_map_generator_job.cpp File Reference

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

#include "global.hpp"
#include "gettext.hpp"
#include "language.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "map_generator.hpp"
#include "default_map_generator_job.hpp"
#include "pathfind/pathfind.hpp"
#include "pathutils.hpp"
#include "util.hpp"
#include "wml_exception.hpp"
#include "formula/string_utils.hpp"
#include "utils/context_free_grammar_generator.hpp"
#include "utils/markov_generator.hpp"
#include <SDL.h>
#include "seed_rng.hpp"
Include dependency graph for default_map_generator_job.cpp:

Go to the source code of this file.

Macros

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

Typedefs

typedef std::vector
< std::vector< int > > 
height_map
 
typedef t_translation::t_map terrain_map
 
typedef map_location location
 
typedef std::map
< t_translation::t_terrain,
t_translation::t_list
tcode_list_cache
 

Functions

static std::string output_map (const terrain_map &terrain, t_translation::tstarting_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, size_t min_distance, const std::vector< map_location > &other_castles, int highest_ranking)
 
static map_location place_village (const t_translation::t_map &map, const size_t x, const size_t y, const 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::t_match &tile_types, const terrain_map &terrain, unsigned width, unsigned height, size_t label_count, std::map< map_location, std::string > *labels, const std::string &full_name)
 

Variables

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 ERR_NG   LOG_STREAM(err, log_mapgen)
#define LOG_NG   LOG_STREAM(info, log_mapgen)

Typedef Documentation

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

Definition at line 55 of file default_map_generator_job.cpp.

typedef GLuint GLint * location

Definition at line 57 of file default_map_generator_job.cpp.

Definition at line 545 of file default_map_generator_job.cpp.

Definition at line 56 of file default_map_generator_job.cpp.

Function Documentation

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

Function which, given the map will output it in a valid format.

Definition at line 342 of file default_map_generator_job.cpp.

References gamemap::default_border, pos, t_translation::write_game_map(), t_translation::coordinate::x, and t_translation::coordinate::y.

Referenced by default_map_generator_job::default_generate_map().

static map_location place_village ( const t_translation::t_map map,
const size_t  x,
const size_t  y,
const size_t  radius,
const config cfg,
tcode_list_cache adj_liked_cache 
)
static
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,
size_t  min_distance,
const std::vector< map_location > &  other_castles,
int  highest_ranking 
)
static

Definition at line 480 of file default_map_generator_job.cpp.

References c, distance_between(), and i.

Referenced by default_map_generator_job::default_generate_map().

Variable Documentation

lg::log_domain log_mapgen("mapgen")
static