]> git.localhorst.tv Git - blank.git/blobdiff - src/app.hpp
random walk test controller
[blank.git] / src / app.hpp
index 28c7536e440ec781926eb7af2b8a8099e4bfe6ed..413b6f19869430f22b665d690d4d8a67cd0ff50d 100644 (file)
@@ -1,13 +1,10 @@
 #ifndef BLANK_APP_HPP_
 #define BLANK_APP_HPP_
 
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-
 #include "camera.hpp"
 #include "controller.hpp"
 #include "init.hpp"
-#include "model.hpp"
+#include "interface.hpp"
 #include "shader.hpp"
 #include "world.hpp"
 
@@ -22,13 +19,23 @@ public:
        Application(const Application &) = delete;
        Application &operator =(const Application &) = delete;
 
+       /// run until user quits
        void Run();
        void Loop(int dt);
 
+       /// run for n frames
+       void RunN(size_t n);
+       /// run for t milliseconds
+       void RunT(size_t t);
+       /// run for n frames, assuming t milliseconds for each
+       void RunS(size_t n, size_t t);
+
        void HandleEvents();
        void Update(int dt);
        void Render();
 
+       static Entity &MakeTestEntity(World &);
+
 private:
        InitSDL init_sdl;
        InitIMG init_img;
@@ -36,41 +43,16 @@ private:
        Window window;
        GLContext ctx;
        InitGLEW init_glew;
-       Program program;
-
-       float move_velocity;
-       float pitch_sensitivity;
-       float yaw_sensitivity;
-
-       BlockTypeRegistry blockType;
+       DirectionalLighting program;
 
        Camera cam;
-       Chunk chunk;
-       OutlineModel outline;
+       World world;
+       Interface interface;
 
-       bool outline_visible;
-       glm::mat4 outline_transform;
-
-       glm::vec3 light_position;
-       glm::vec3 light_color;
-       float light_power;
-
-       GLuint m_handle;
-       GLuint v_handle;
-       GLuint mv_handle;
-       GLuint mvp_handle;
-       GLuint light_position_handle;
-       GLuint light_color_handle;
-       GLuint light_power_handle;
+       RandomWalk test_controller;
 
        bool running;
 
-       bool front, back, left, right, up, down;
-       bool place, remove, pick;
-
-       int remove_id;
-       int place_id;
-
 };
 
 }