From 6fcfc7e272bbf4bcccc45a876cdd2769b3b72fd7 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 27 Nov 2023 16:07:53 +0300 Subject: [PATCH] Added version info --- src/constants.h | 6 ++++++ src/settings.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/constants.h b/src/constants.h index 988ce2fb..49a97749 100644 --- a/src/constants.h +++ b/src/constants.h @@ -4,6 +4,12 @@ #include #include "typedefs.h" +#define ENGINE_VERSION_MAJOR 0 +#define ENGINE_VERSION_MINOR 15 +#define STR_(x) #x +#define STR(x) STR_(x) +#define ENGINE_VERSION STR(ENGINE_VERSION_MAJOR) "." STR(ENGINE_VERSION_MINOR) + #define CHUNK_W 16 #define CHUNK_H 256 #define CHUNK_D 16 diff --git a/src/settings.h b/src/settings.h index b4c39ba8..9208f36e 100644 --- a/src/settings.h +++ b/src/settings.h @@ -3,6 +3,7 @@ #include +#include "constants.h" #include "typedefs.h" struct DisplaySettings { @@ -17,7 +18,7 @@ struct DisplaySettings { /* GLFW swap interval value, 0 - unlimited fps, 1 - vsync*/ int swapInterval = 1; /* Window title */ - const char* title = "VoxelEngine-Cpp v0.14"; + const char* title = "VoxelEngine-Cpp v" ENGINE_VERSION; }; struct ChunksSettings {