]> git.localhorst.tv Git - blank.git/blobdiff - src/world.hpp
begun block lighting implementation
[blank.git] / src / world.hpp
index ccd743dd4f1321955410ef1e055f5354140bdb16..b5c4a29cc66688f9c7a10b0a9150c71122c37718 100644 (file)
@@ -8,6 +8,7 @@
 #include "shader.hpp"
 #include "shape.hpp"
 
+#include <list>
 #include <glm/glm.hpp>
 
 
@@ -28,8 +29,10 @@ public:
 
        BlockTypeRegistry &BlockTypes() { return blockType; }
 
-       Entity &Player() { return player; }
+       Entity &Player() { return *player; }
+       Entity &AddEntity() { entities.emplace_back(); return entities.back(); }
 
+       Chunk &PlayerChunk();
        Chunk &Next(const Chunk &to, const glm::tvec3<int> &dir);
 
        void Update(int dt);
@@ -45,7 +48,8 @@ private:
        Generator generate;
        ChunkLoader chunks;
 
-       Entity player;
+       Entity *player;
+       std::list<Entity> entities;
 
 };