#include <mapgen_dialog.hpp>
Public Member Functions | |
default_map_generator (const config *game_config) | |
bool | allow_user_config () const |
Returns true iff the map generator has an interactive screen, which allows the user to modify how the generator behaves. | |
void | user_config (display &disp) |
Display the interactive screen, which allows the user to modify how the generator behaves. | |
std::string | name () const |
Returns a string identifying the generator by name. | |
std::string | create_map (const std::vector< std::string > &args) |
Creates a new map and returns it. | |
config | create_scenario (const std::vector< std::string > &args) |
Private Member Functions | |
std::string | generate_map (const std::vector< std::string > &args, std::map< gamemap::location, std::string > *labels=NULL) |
Private Attributes | |
size_t | default_width_ |
size_t | default_height_ |
size_t | width_ |
size_t | height_ |
size_t | island_size_ |
size_t | iterations_ |
size_t | hill_size_ |
size_t | max_lakes_ |
size_t | nvillages_ |
size_t | castle_size_ |
size_t | nplayers_ |
bool | link_castles_ |
config | cfg_ |
Definition at line 21 of file mapgen_dialog.hpp.
default_map_generator::default_map_generator | ( | const config * | game_config | ) |
Definition at line 41 of file mapgen_dialog.cpp.
References castle_size_, cfg_, default_height_, default_width_, height_, hill_size_, island_size_, iterations_, max_lakes_, nplayers_, nvillages_, and width_.
bool default_map_generator::allow_user_config | ( | ) | const [virtual] |
Returns true iff the map generator has an interactive screen, which allows the user to modify how the generator behaves.
Implements map_generator.
Definition at line 89 of file mapgen_dialog.cpp.
void default_map_generator::user_config | ( | display & | disp | ) | [virtual] |
Display the interactive screen, which allows the user to modify how the generator behaves.
(This function will not be called if allow_user_config() returns false).
Implements map_generator.
Definition at line 91 of file mapgen_dialog.cpp.
References _, castle_size_, gui::button::checked(), gui::dialog_frame::default_style, display::delay(), cursor::draw(), gui::dialog_frame::draw(), font::draw_text(), CVideo::getx(), CVideo::gety(), height_, hill_size_, island_size_, iterations_, gui::dialog_frame::layout(), link_castles_, max_coastal, max_height, max_island, gamemap::MAX_PLAYERS, N_, font::NORMAL_COLOUR, nplayers_, nvillages_, gui::button::pressed(), events::pump(), events::raise_draw_event(), events::raise_process_event(), surface_restorer::restore(), screen, screen_area(), gui::button::set_check(), gui::widget::set_dirty(), gui::widget::set_location(), gui::slider::set_location(), gui::slider::set_max(), gui::slider::set_min(), gui::slider::set_value(), font::SIZE_NORMAL, gui::button::TYPE_CHECK, display::update_display(), update_rect(), gui::slider::value(), display::video(), and width_.
std::string default_map_generator::name | ( | ) | const [virtual] |
Returns a string identifying the generator by name.
The name should not contain spaces.
Implements map_generator.
Definition at line 322 of file mapgen_dialog.cpp.
std::string default_map_generator::create_map | ( | const std::vector< std::string > & | args | ) | [virtual] |
Creates a new map and returns it.
args may contain arguments to the map generator.
Implements map_generator.
Definition at line 324 of file mapgen_dialog.cpp.
References generate_map().
config default_map_generator::create_scenario | ( | const std::vector< std::string > & | args | ) | [virtual] |
Reimplemented from map_generator.
Definition at line 378 of file mapgen_dialog.cpp.
References config::add_child(), cfg_, config::child(), DBG_NG, generate_map(), height_, labels, and width_.
std::string default_map_generator::generate_map | ( | const std::vector< std::string > & | args, | |
std::map< gamemap::location, std::string > * | labels = NULL | |||
) | [private] |
Definition at line 329 of file mapgen_dialog.cpp.
References castle_size_, cfg_, DBG_NG, default_generate_map(), default_height_, default_width_, height_, hill_size_, is_odd(), island_size_, iterations_, link_castles_, map, max_coastal, max_island, max_lakes_, nplayers_, nvillages_, and width_.
Referenced by create_map(), and create_scenario().
size_t default_map_generator::default_width_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), and generate_map().
size_t default_map_generator::default_height_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), and generate_map().
size_t default_map_generator::width_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by create_scenario(), default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::height_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by create_scenario(), default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::island_size_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::iterations_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::hill_size_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::max_lakes_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), and generate_map().
size_t default_map_generator::nvillages_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::castle_size_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
size_t default_map_generator::nplayers_ [private] |
Definition at line 38 of file mapgen_dialog.hpp.
Referenced by default_map_generator(), generate_map(), and user_config().
bool default_map_generator::link_castles_ [private] |
config default_map_generator::cfg_ [private] |
Definition at line 40 of file mapgen_dialog.hpp.
Referenced by create_scenario(), default_map_generator(), and generate_map().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |