]> git.localhorst.tv Git - blank.git/blobdiff - src/world/World.hpp
load block types from data file
[blank.git] / src / world / World.hpp
index 6bd8128dc9fb41073748952702ee071546306369..2fd312c7ce39efb990ed2be07b16f0ce6b7313a8 100644 (file)
@@ -6,7 +6,6 @@
 #include "Entity.hpp"
 #include "Generator.hpp"
 #include "../graphics/ArrayTexture.hpp"
-#include "../model/shapes.hpp"
 
 #include <list>
 #include <vector>
@@ -37,7 +36,7 @@ public:
                ChunkLoader::Config load = ChunkLoader::Config();
        };
 
-       World(const Assets &, const Config &);
+       World(const Assets &, const Config &, const WorldSave &);
 
        bool Intersection(
                const Ray &,
@@ -50,7 +49,7 @@ public:
        bool Intersection(const Entity &e, std::vector<WorldCollision> &);
        void Resolve(Entity &e, std::vector<WorldCollision> &);
 
-       BlockTypeRegistry &BlockTypes() noexcept { return blockType; }
+       BlockTypeRegistry &BlockTypes() noexcept { return block_type; }
        ChunkLoader &Loader() noexcept { return chunks; }
 
        Entity &Player() { return *player; }
@@ -64,10 +63,7 @@ public:
        void Render(Viewport &);
 
 private:
-       BlockTypeRegistry blockType;
-       CuboidShape blockShape;
-       StairShape stairShape;
-       CuboidShape slabShape;
+       BlockTypeRegistry block_type;
 
        ArrayTexture block_tex;