]> git.localhorst.tv Git - gong.git/blob - src/app/Application.hpp
code, assets, and other stuff stolen from blank
[gong.git] / src / app / Application.hpp
1 #ifndef GONG_APP_APPLICATION_HPP_
2 #define GONG_APP_APPLICATION_HPP_
3
4 #include "HeadlessApplication.hpp"
5
6 #include <SDL.h>
7
8
9 namespace gong {
10 namespace app {
11
12 class Environment;
13
14
15 class Application
16 : public HeadlessApplication {
17
18 public:
19         explicit Application(Environment &);
20         ~Application();
21
22         Application(const Application &) = delete;
23         Application &operator =(const Application &) = delete;
24
25         void Loop(int dt) override;
26
27         /// process all events in SDL's queue
28         void HandleEvents();
29         void Handle(const SDL_Event &);
30         void Handle(const SDL_WindowEvent &);
31         /// integrate to the next step with dt milliseconds passed
32         void Update(int dt);
33         /// push the current state to display
34         void Render();
35
36 private:
37         Environment &env;
38
39 };
40
41 }
42 }
43
44 #endif