X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld.hpp;h=6b6aaf09c9d260492a3125313a0f32eac2112314;hb=addf4eb6485a36d40096d87196ed786e6e16ab6d;hp=60ec6f4dbeca36c1b7364f4834ad3cec54a3e3b7;hpb=804bde3fc09e4317eef629861638a68bfad3e343;p=blank.git diff --git a/src/world.hpp b/src/world.hpp index 60ec6f4..6b6aaf0 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -3,7 +3,7 @@ #include "block.hpp" #include "chunk.hpp" -#include "controller.hpp" +#include "entity.hpp" #include "noise.hpp" #include "shader.hpp" #include "shape.hpp" @@ -32,11 +32,15 @@ public: BlockTypeRegistry &BlockTypes() { return blockType; } std::list &LoadedChunks() { return loaded; } - FPSController &Controller() { return player; } + Entity &Player() { return player; } + Chunk *ChunkLoaded(const glm::tvec3 &); + Chunk *ChunkQueued(const glm::tvec3 &); + Chunk *ChunkAvailable(const glm::tvec3 &); Chunk &Next(const Chunk &, const glm::vec3 &dir); void Update(int dt); + void CheckChunkGeneration(); void Render(DirectionalLighting &); @@ -52,7 +56,8 @@ private: SimplexNoise blockNoise; SimplexNoise colorNoise; - FPSController player; + Entity player; + glm::tvec3 player_chunk; std::list loaded; std::list to_generate;