aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Config.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-01 15:05:28 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-01 15:05:28 +0100
commit5981ab2262a98b80a1339f86a6b71093576a9b35 (patch)
tree325ff71fc2482a6960656f0ced80db874945a938 /src/crepe/api/Config.h
parent4d6d5a6ff5366877cbc7b8e24110b56a332a7353 (diff)
parent647eb8e318f1ed1e3ec18505ea4df57025e6ffd5 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/gameloop
Diffstat (limited to 'src/crepe/api/Config.h')
-rw-r--r--src/crepe/api/Config.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/crepe/api/Config.h b/src/crepe/api/Config.h
index 13eabd1..225e9b9 100644
--- a/src/crepe/api/Config.h
+++ b/src/crepe/api/Config.h
@@ -1,6 +1,8 @@
#pragma once
#include "../util/Log.h"
+#include "types.h"
+#include <string>
namespace crepe {
@@ -11,19 +13,18 @@ namespace crepe {
* modified *before* execution is handed over from the game programmer to the engine (i.e. the
* main loop is started).
*/
-class Config {
+class Config final {
public:
//! Retrieve handle to global Config instance
static Config & get_instance();
private:
Config() = default;
-
- // singleton
- Config(const Config &) = delete;
- Config(Config &&) = delete;
- Config & operator=(const Config &) = delete;
- Config & operator=(Config &&) = delete;
+ ~Config() = default;
+ Config(const Config &) = default;
+ Config(Config &&) = default;
+ Config & operator=(const Config &) = default;
+ Config & operator=(Config &&) = default;
public:
//! Logging-related settings
@@ -63,6 +64,14 @@ public:
double gravity = 1;
} physics;
+ //! default window settings
+ struct {
+ //TODO make this constexpr because this will never change
+ ivec2 default_size = {1080, 720};
+ std::string window_title = "Jetpack joyride clone";
+
+ } window_settings;
+
//! Asset loading options
struct {
/**