aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/app.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/app.hpp')
-rw-r--r--src/engine/app.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/engine/app.hpp b/src/engine/app.hpp
new file mode 100644
index 0000000..a57fdbe
--- /dev/null
+++ b/src/engine/app.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include <SDL3/SDL.h>
+
+struct AppConfig {
+ const char* title = "Forts Clone";
+ int window_width = 1280;
+ int window_height = 720;
+};
+
+class App {
+public:
+ explicit App(const AppConfig& cfg = {});
+ ~App();
+
+ App(const App&) = delete;
+ App& operator=(const App&) = delete;
+
+ void run();
+
+private:
+ void update(float dt);
+ void render();
+
+ SDL_Window* window_ = nullptr;
+ AppConfig config_;
+ bool running_ = true;
+ uint64_t last_tick_ = 0;
+};