Merge branch 'dev' into pathfinding-update

This commit is contained in:
MihailRis 2026-11-01 18:37:28 +03:00
commit 98cd85f4f6
16 changed files with 124 additions and 17 deletions

View file

@ -7,6 +7,11 @@
inline constexpr int ENGINE_VERSION_MAJOR = 0;
inline constexpr int ENGINE_VERSION_MINOR = 33;
#ifdef VC_VERSION_PATCH
inline constexpr int ENGINE_VERSION_PATCH = VC_VERSION_PATCH;
#else
inline constexpr int ENGINE_VERSION_PATCH = 0;
#endif
#ifdef NDEBUG
inline constexpr bool ENGINE_DEBUG_BUILD = false;
@ -14,7 +19,13 @@ inline constexpr bool ENGINE_DEBUG_BUILD = false;
inline constexpr bool ENGINE_DEBUG_BUILD = true;
#endif // NDEBUG
inline const std::string ENGINE_VERSION_STRING = "0.33";
inline const std::string ENGINE_VERSION_STRING =
std::to_string(ENGINE_VERSION_MAJOR) + "." +
std::to_string(ENGINE_VERSION_MINOR)
#ifdef VC_VERSION_PATCH
+ "." + std::to_string(ENGINE_VERSION_PATCH)
#endif
;
inline constexpr uint MAX_SUBPROCESSES = 1;
inline constexpr uint MAX_SUBPROCESS_DEPTH = 2;

View file

@ -42,8 +42,7 @@ WindowControl::Result WindowControl::initialize() {
#endif
title += "VoxelCore v";
if (buildName.empty()) {
title += std::to_string(ENGINE_VERSION_MAJOR) + "." +
std::to_string(ENGINE_VERSION_MINOR);
title += ENGINE_VERSION_STRING;
} else {
title += buildName;
}

View file

@ -328,10 +328,15 @@ static int l_delete_world(lua::State* L) {
}
/// @brief Get engine version
/// @return major, minor
/// @return major, minor, [patch]
static int l_get_version(lua::State* L) {
return lua::pushvec_stack(
L, glm::vec2(ENGINE_VERSION_MAJOR, ENGINE_VERSION_MINOR)
L,
#ifdef VC_VERSION_PATCH
glm::vec3(ENGINE_VERSION_MAJOR, ENGINE_VERSION_MINOR, ENGINE_VERSION_PATCH)
#else
glm::vec2(ENGINE_VERSION_MAJOR, ENGINE_VERSION_MINOR)
#endif
);
}