]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/Spawner.hpp
glm backwards compatibility
[blank.git] / src / ai / Spawner.hpp
index d4c0a57f2c6b345d5749c04aa81ef31a22a0b8ca..daa5f7873390b41de1d9be6db9f2f395d8b87fe3 100644 (file)
@@ -2,25 +2,26 @@
 #define BLANK_AI_SPAWNER_HPP_
 
 #include "../app/IntervalTimer.hpp"
-#include "../rand/GaloisLFSR.hpp"
+#include "../graphics/glm.hpp"
 
 #include <vector>
-#include <glm/glm.hpp>
 
 
 namespace blank {
 
-class Controller;
 class Entity;
-class Skeletons;
+class Model;
+class ModelRegistry;
 class World;
 
 class Spawner {
 
 public:
-       Spawner(World &, Skeletons &, std::uint64_t seed);
+       Spawner(World &, ModelRegistry &);
        ~Spawner();
 
+       void LimitModels(std::size_t begin, std::size_t end);
+
        void Update(int dt);
 
 private:
@@ -28,19 +29,22 @@ private:
        void TrySpawn();
        void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &);
 
+       Model &RandomModel() noexcept;
+
 private:
        World &world;
-       Skeletons &skeletons;
-       std::vector<Controller *> controllers;
+       ModelRegistry &models;
+       std::vector<Entity *> entities;
 
-       GaloisLFSR random;
-
-       IntervalTimer timer;
+       CoarseTimer timer;
        float despawn_range;
        float spawn_distance;
        unsigned int max_entities;
        int chunk_range;
 
+       std::size_t model_offset;
+       std::size_t model_length;
+
 };
 
 }