diff options
Diffstat (limited to 'src/mapgen/mapgen.h')
-rw-r--r-- | src/mapgen/mapgen.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mapgen/mapgen.h b/src/mapgen/mapgen.h index ef5de6029..b61608039 100644 --- a/src/mapgen/mapgen.h +++ b/src/mapgen/mapgen.h @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "nodedef.h" #include "util/string.h" #include "util/container.h" +#include <utility> #define MAPGEN_DEFAULT MAPGEN_V7 #define MAPGEN_DEFAULT_NAME "v7" @@ -139,7 +140,6 @@ struct MapgenParams { s32 getSpawnRangeMax(); private: - void calcMapgenEdges(); bool m_mapgen_edges_calculated = false; }; @@ -329,3 +329,7 @@ protected: s16 dungeon_ymin; s16 dungeon_ymax; }; + +// Calculate exact edges of the outermost mapchunks that are within the set +// mapgen_limit. Returns the minimum and maximum edges in nodes in that order. +std::pair<s16, s16> get_mapgen_edges(s16 mapgen_limit, s16 chunksize); |