]> git.localhorst.tv Git - blobs.git/blobdiff - src/app/Application.hpp
switch creatures with left click
[blobs.git] / src / app / Application.hpp
index 4ed4b769d916d4f043928d3364ca8b49ff8a8808..1ae7b6f12eb8b607050262ecd597cfa891d47536 100644 (file)
@@ -5,14 +5,18 @@
 
 
 namespace blobs {
+namespace graphics {
+       class Viewport;
+}
 namespace app {
 
 class State;
+class Window;
 
 class Application {
 
 public:
-       Application();
+       Application(Window &, graphics::Viewport &);
        ~Application();
 
        Application(const Application &) = delete;
@@ -28,6 +32,12 @@ public:
        State &GetState();
        bool HasState() const noexcept;
 
+       Window &GetWindow() noexcept { return window; }
+       const Window &GetWindow() const noexcept { return window; }
+
+       graphics::Viewport &GetViewport() noexcept { return viewport; }
+       const graphics::Viewport &GetViewport() const noexcept { return viewport; }
+
        /// Loop until states is empty.
        void Run();
        /// Evaluate a single frame of dt milliseconds.
@@ -36,6 +46,8 @@ public:
        void HandleEvents();
 
 private:
+       Window &window;
+       graphics::Viewport &viewport;
        std::stack<State *> states;
 
 };