Classes | |
struct | chamber |
struct | passage |
Public Member Functions | |
cave_map_generator_job (const cave_map_generator ¶ms, boost::optional< boost::uint32_t > randomseed=boost::none) | |
void | generate_chambers () |
void | build_chamber (map_location loc, std::set< map_location > &locs, size_t size, size_t jagged) |
void | place_chamber (const chamber &c) |
void | place_passage (const passage &p) |
void | set_terrain (map_location loc, const t_translation::t_terrain &t) |
void | place_castle (int starting_position, const map_location &loc) |
size_t | translate_x (size_t x) const |
size_t | translate_y (size_t y) const |
Public Attributes | |
const cave_map_generator & | params |
bool | flipx_ |
bool | flipy_ |
t_translation::t_map | map_ |
t_translation::tstarting_positions | starting_positions_ |
std::map< std::string, size_t > | chamber_ids_ |
std::vector< chamber > | chambers_ |
std::vector< passage > | passages_ |
config | res_ |
boost::random::mt19937 | rng_ |
Definition at line 41 of file cave_map_generator.hpp.
cave_map_generator::cave_map_generator_job::cave_map_generator_job | ( | const cave_map_generator & | params, |
boost::optional< boost::uint32_t > | randomseed = boost::none |
||
) |
Definition at line 87 of file cave_map_generator.cpp.
References c, chambers_, flipx_, flipy_, generate_chambers(), int(), LOG_NG, map_, seed_rng::next_seed(), passages_, place_chamber(), place_passage(), res_, rng_, starting_positions_, and t_translation::write_game_map().
void cave_map_generator::cave_map_generator_job::build_chamber | ( | map_location | loc, |
std::set< map_location > & | locs, | ||
size_t | size, | ||
size_t | jagged | ||
) |
Definition at line 124 of file cave_map_generator.cpp.
References get_adjacent_tiles().
void cave_map_generator::cave_map_generator_job::generate_chambers | ( | ) |
Definition at line 140 of file cave_map_generator.cpp.
References cave_map_generator::cave_map_generator_job::chamber::center, config::child_range(), int(), cave_map_generator::cave_map_generator_job::chamber::items, mp_ui_alerts::items, itor, cave_map_generator::cave_map_generator_job::chamber::locs, and utils::split().
Referenced by cave_map_generator_job().
void cave_map_generator::cave_map_generator_job::place_castle | ( | int | starting_position, |
const map_location & | loc | ||
) |
Definition at line 340 of file cave_map_generator.cpp.
References gamemap::default_border, get_adjacent_tiles(), map_location::x, and map_location::y.
Definition at line 205 of file cave_map_generator.cpp.
References config::add_child(), config::all_children_range(), config::child(), i, cave_map_generator::cave_map_generator_job::chamber::items, and cave_map_generator::cave_map_generator_job::chamber::locs.
Referenced by cave_map_generator_job().
Definition at line 297 of file cave_map_generator.cpp.
References pathfind::a_star_search(), cave_map_generator::cave_map_generator_job::passage::cfg, cave_map_generator::cave_map_generator_job::passage::dst, i, map_, cave_map_generator::cave_map_generator_job::passage::src, and pathfind::plain_route::steps.
Referenced by cave_map_generator_job().
void cave_map_generator::cave_map_generator_job::set_terrain | ( | map_location | loc, |
const t_translation::t_terrain & | t | ||
) |
Definition at line 324 of file cave_map_generator.cpp.
References gamemap::default_border, map_, map_location::x, and map_location::y.
size_t cave_map_generator::cave_map_generator_job::translate_x | ( | size_t | x | ) | const |
Definition at line 57 of file cave_map_generator.cpp.
References flipx_.
size_t cave_map_generator::cave_map_generator_job::translate_y | ( | size_t | y | ) | const |
Definition at line 66 of file cave_map_generator.cpp.
std::map<std::string,size_t> cave_map_generator::cave_map_generator_job::chamber_ids_ |
Definition at line 85 of file cave_map_generator.hpp.
std::vector<chamber> cave_map_generator::cave_map_generator_job::chambers_ |
Definition at line 86 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().
bool cave_map_generator::cave_map_generator_job::flipx_ |
Definition at line 81 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job(), and translate_x().
bool cave_map_generator::cave_map_generator_job::flipy_ |
Definition at line 81 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().
t_translation::t_map cave_map_generator::cave_map_generator_job::map_ |
Definition at line 83 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().
const cave_map_generator& cave_map_generator::cave_map_generator_job::params |
Definition at line 80 of file cave_map_generator.hpp.
std::vector<passage> cave_map_generator::cave_map_generator_job::passages_ |
Definition at line 87 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().
config cave_map_generator::cave_map_generator_job::res_ |
Definition at line 88 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job(), and cave_map_generator::create_scenario().
boost::random::mt19937 cave_map_generator::cave_map_generator_job::rng_ |
Definition at line 89 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().
t_translation::tstarting_positions cave_map_generator::cave_map_generator_job::starting_positions_ |
Definition at line 84 of file cave_map_generator.hpp.
Referenced by cave_map_generator_job().