X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=c8a6fb56720e6950fb0a7bc10097cdcbdf47e62e;hb=bd6bd2c875f4b6baef913e5315aa9f7e7cd7da7a;hp=0b0e64e46681c26d167c5214e2d8193c256ca0eb;hpb=cb959294a8271969ddfe411471d7f04e82c4788a;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index 0b0e64e..c8a6fb5 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -1,14 +1,10 @@ #ifndef BLANK_APP_HPP_ #define BLANK_APP_HPP_ -#include -#include - #include "camera.hpp" #include "controller.hpp" -#include "hud.hpp" #include "init.hpp" -#include "model.hpp" +#include "interface.hpp" #include "shader.hpp" #include "world.hpp" @@ -18,18 +14,28 @@ namespace blank { class Application { public: - Application(); + explicit Application(unsigned int seed); 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; @@ -40,21 +46,13 @@ private: DirectionalLighting program; Camera cam; - HUD hud; World world; - FPSController controller; + Interface interface; - OutlineModel outline; - bool outline_visible; - glm::mat4 outline_transform; + RandomWalk test_controller; bool running; - bool place, remove, pick; - - int remove_id; - int place_id; - }; }