]> git.localhorst.tv Git - blank.git/blobdiff - src/app/Application.hpp
some experiments with sound
[blank.git] / src / app / Application.hpp
index 99f0dc4fbad0b168249c20e18fc97797a19524ad..636b82e85899c389a7f69437a001495b638ec428 100644 (file)
@@ -1,14 +1,17 @@
 #ifndef BLANK_APP_APPLICATION_HPP_
 #define BLANK_APP_APPLICATION_HPP_
 
+#include "Assets.hpp"
+#include "FrameCounter.hpp"
 #include "init.hpp"
 #include "RandomWalk.hpp"
-#include "../graphics/BlockLighting.hpp"
-#include "../graphics/Camera.hpp"
-#include "../graphics/DirectionalLighting.hpp"
+#include "../audio/Audio.hpp"
+#include "../graphics/Viewport.hpp"
 #include "../ui/Interface.hpp"
 #include "../world/World.hpp"
 
+#include <SDL.h>
+
 
 namespace blank {
 
@@ -25,6 +28,7 @@ public:
        };
 
        explicit Application(const Config &);
+       ~Application();
 
        Application(const Application &) = delete;
        Application &operator =(const Application &) = delete;
@@ -43,6 +47,7 @@ public:
 
        /// process all events in SDL's queue
        void HandleEvents();
+       void Handle(const SDL_WindowEvent &);
        /// integrate to the next step with dt milliseconds passed
        void Update(int dt);
        /// push the current state to display
@@ -51,16 +56,12 @@ public:
        static Entity &MakeTestEntity(World &);
 
 private:
-       InitSDL init_sdl;
-       InitIMG init_img;
-       InitGL init_gl;
-       Window window;
-       GLContext ctx;
-       InitGLEW init_glew;
-       BlockLighting chunk_prog;
-       DirectionalLighting entity_prog;
-
-       Camera cam;
+       Init init;
+       Viewport viewport;
+       Assets assets;
+       Audio audio;
+       FrameCounter counter;
+
        World world;
        Interface interface;