parent
5bb72d7c89
commit
64067dde09
2 changed files with 18 additions and 7 deletions
|
@ -722,7 +722,7 @@ void display::draw_fog_shroud_transition_images(const map_location& loc, image::
|
|||
enum VISIBILITY { FOG = 0, SHROUD = 1, CLEAR = 2 };
|
||||
std::array<VISIBILITY, 6> tiles;
|
||||
|
||||
const std::array<const std::string*, 2> image_prefix {&game_config::fog_prefix, &game_config::shroud_prefix};
|
||||
const std::array<const std::string*, 2> image_prefix {{&game_config::fog_prefix, &game_config::shroud_prefix}};
|
||||
|
||||
for(unsigned i = 0; i < tiles.size(); ++i) {
|
||||
if(shrouded(adjacent[i])) {
|
||||
|
|
|
@ -691,9 +691,9 @@ static void flood_name(const map_location& start, const std::string& name, std::
|
|||
std::string default_map_generator_job::default_generate_map(generator_data data, std::map<map_location,std::string>* labels, const config& cfg)
|
||||
{
|
||||
log_scope("map generation");
|
||||
|
||||
LOG_NG << "default_generate_map parameters"
|
||||
<< " width=" << data.width
|
||||
|
||||
LOG_NG << "default_generate_map parameters"
|
||||
<< " width=" << data.width
|
||||
<< " height=" << data.height
|
||||
<< " nplayers=" << data.nplayers
|
||||
<< " nvillages=" << data.nvillages
|
||||
|
@ -1153,9 +1153,20 @@ std::string default_map_generator_job::default_generate_map(generator_data data,
|
|||
starting_positions.insert(t_translation::starting_positions::value_type(std::to_string(player), coord));
|
||||
terrain[x][y] = t_translation::HUMAN_KEEP;
|
||||
|
||||
const std::array<std::array<int, 2>, 13> castle_array {{
|
||||
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}, {1, 0}, {0, 1}, {-1, 1},
|
||||
{-2, 1}, {-2, 0}, {-2, -1}, {-1, -2}, {0, -2}, {1, -2}
|
||||
static const std::array<std::array<int, 2>, 13> castle_array {{
|
||||
{{-1, 0}},
|
||||
{{-1, -1}},
|
||||
{{ 0, -1}},
|
||||
{{ 1, -1}},
|
||||
{{ 1, 0}},
|
||||
{{ 0, 1}},
|
||||
{{-1, 1}},
|
||||
{{-2, 1}},
|
||||
{{-2, 0}},
|
||||
{{-2, -1}},
|
||||
{{-1, -2}},
|
||||
{{ 0, -2}},
|
||||
{{ 1, -2}}
|
||||
}};
|
||||
|
||||
for(int i = 0; i < data.castle_size - 1; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue