blob: a57fdbe9a2a9724c3d80bf82f77b989b7ad44542 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
};
|