X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FApplication.hpp;h=973234916a3afa541c2f2e41a544ef455e340521;hb=79bff420037f150bd6efd2eef08bd06afafeb068;hp=ea7421161b9031e45aa9f54d78bff38c5be6db73;hpb=55dbd6b35a39888f245e247d2e140f141f918178;p=blank.git diff --git a/src/app/Application.hpp b/src/app/Application.hpp index ea74211..9732349 100644 --- a/src/app/Application.hpp +++ b/src/app/Application.hpp @@ -2,12 +2,10 @@ #define BLANK_APP_APPLICATION_HPP_ #include "Assets.hpp" -#include "init.hpp" -#include "RandomWalk.hpp" -#include "../graphics/BlendedSprite.hpp" -#include "../graphics/BlockLighting.hpp" -#include "../graphics/Camera.hpp" -#include "../graphics/DirectionalLighting.hpp" +#include "FrameCounter.hpp" +#include "../ai/Spawner.hpp" +#include "../audio/Audio.hpp" +#include "../graphics/Viewport.hpp" #include "../ui/Interface.hpp" #include "../world/World.hpp" @@ -16,6 +14,8 @@ namespace blank { +class Window; + class Application { public: @@ -28,7 +28,8 @@ public: World::Config world = World::Config(); }; - explicit Application(const Config &); + Application(Window &, const Config &); + ~Application(); Application(const Application &) = delete; Application &operator =(const Application &) = delete; @@ -53,27 +54,17 @@ public: /// push the current state to display void Render(); - static Entity &MakeTestEntity(World &); - private: - InitSDL init_sdl; - InitIMG init_img; - InitTTF init_ttf; - InitGL init_gl; - Window window; - GLContext ctx; - InitGLEW init_glew; + Window &window; + Viewport viewport; Assets assets; + Audio audio; + FrameCounter counter; - BlockLighting chunk_prog; - DirectionalLighting entity_prog; - BlendedSprite sprite_prog; - - Camera cam; World world; Interface interface; - RandomWalk test_controller; + Spawner spawner; bool running;