From 34857eabbcaea2344fe7912f96fbd7f854c37e1b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 2 Feb 2015 18:33:21 +0100 Subject: Add spawn coordinates --- src/Info.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Info.hpp') diff --git a/src/Info.hpp b/src/Info.hpp index 6f69c56..478e858 100644 --- a/src/Info.hpp +++ b/src/Info.hpp @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -39,8 +40,10 @@ private: std::set> regions; int minX, maxX, minZ, maxZ; + int32_t spawnX, spawnZ; + public: - Info() : minX(INT_MAX), maxX(INT_MIN), minZ(INT_MAX), maxZ(INT_MIN) {} + Info() : minX(INT_MAX), maxX(INT_MIN), minZ(INT_MAX), maxZ(INT_MIN), spawnX(0), spawnZ(0) {} void addRegion(int x, int z) { regions.insert(std::make_pair(x, z)); @@ -51,6 +54,10 @@ public: if (z > maxZ) maxZ = z; } + void setSpawn(const std::pair &v) { + std::tie(spawnX, spawnZ) = v; + } + void writeJSON(const char *filename); }; -- cgit v1.2.3