The Battle for Wesnoth  1.15.0-dev
default_map_generator.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2018 by David White <dave@whitevine.net>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 #include "config.hpp"
19 
21  generator_data(const config& cfg);
22 
23  int width;
24  int height;
27  int nplayers;
28  int nvillages;
30  int hill_size;
34  int max_lakes;
37 };
38 
40 {
41 public:
43 
44  bool allow_user_config() const override;
45  void user_config() override;
46 
47  std::string name() const override;
48 
49  std::string config_name() const override;
50 
51  std::string create_map(boost::optional<uint32_t> randomseed) override;
52  config create_scenario(boost::optional<uint32_t> randomseed) override;
53 
54 private:
55  std::string generate_map(std::map<map_location,std::string>* labels, boost::optional<uint32_t> randomseed);
56 
58 
60 };
generator_data(const config &cfg)
Definitions for the interface to Wesnoth Markup Language (WML).
const t_string name
Game configuration data as global variables.
Definition: build_info.cpp:46
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:68