add mapgen debug info.
This commit is contained in:
parent
78ab1faeaa
commit
ce66df1285
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
static lg::log_domain log_mapgen("mapgen");
|
||||
#define ERR_NG LOG_STREAM(err, log_mapgen)
|
||||
#define LOG_NG LOG_STREAM(info, log_mapgen)
|
||||
#define DBG_NG LOG_STREAM(debug, log_mapgen)
|
||||
|
||||
typedef std::vector<std::vector<int>> height_map;
|
||||
typedef t_translation::ter_map terrain_map;
|
||||
|
@ -285,6 +286,7 @@ height_map default_map_generator_job::generate_height_map(size_t width, size_t h
|
|||
}
|
||||
}
|
||||
|
||||
DBG_NG << iterations << " iterations\n";
|
||||
for(size_t i = 0; i != iterations; ++i) {
|
||||
|
||||
// (x1,y1) is the location of the hill,
|
||||
|
@ -312,6 +314,7 @@ height_map default_map_generator_job::generate_height_map(size_t width, size_t h
|
|||
}
|
||||
|
||||
const int radius = rng_()%hill_size + 1;
|
||||
DBG_NG << "placing hill at " << x1 << "," << y1 << " radius=" << radius << " is_valley=" << is_valley << "\n";
|
||||
|
||||
const int min_x = x1 - radius > 0 ? x1 - radius : 0;
|
||||
const int max_x = x1 + radius < static_cast<long>(res.size()) ? x1 + radius : res.size();
|
||||
|
|
Loading…
Add table
Reference in a new issue