]> git.localhorst.tv Git - blank.git/blobdiff - src/io/WorldSave.hpp
gcc 4.8.5/centos compatibility
[blank.git] / src / io / WorldSave.hpp
index 4095016a10c442df04ac19fcc078e7a6552ffee8..12a56b029fcd5e60220417c359e3989e17e627d0 100644 (file)
@@ -2,6 +2,7 @@
 #define BLANK_IO_WORLDSAVE_HPP_
 
 #include "../world/Chunk.hpp"
+#include "../world/Generator.hpp"
 #include "../world/World.hpp"
 
 #include <memory>
@@ -10,6 +11,8 @@
 
 namespace blank {
 
+class Player;
+
 class WorldSave {
 
 public:
@@ -20,17 +23,26 @@ public:
        bool Exists() const noexcept;
        void Read(World::Config &) const;
        void Write(const World::Config &) const;
+       void Read(Generator::Config &) const;
+       void Write(const Generator::Config &) const;
+
+       // player
+       bool Exists(const Player &) const;
+       void Read(Player &) const;
+       void Write(const Player &) const;
+       std::string PlayerPath(const Player &) const;
 
        // single chunk
-       bool Exists(const Chunk::Pos &) const noexcept;
+       bool Exists(const ExactLocation::Coarse &) const noexcept;
        void Read(Chunk &) const;
        void Write(Chunk &) const;
-
-       const char *ChunkPath(const Chunk::Pos &) const;
+       const char *ChunkPath(const ExactLocation::Coarse &) const;
 
 private:
        std::string root_path;
-       std::string conf_path;
+       std::string world_conf_path;
+       std::string gen_conf_path;
+       std::string player_path;
        std::string chunk_path;
        std::size_t chunk_bufsiz;
        std::unique_ptr<char[]> chunk_buf;