diff options
author | Morxemplum <morxemplum+github@gmail.com> | 2020-10-01 15:16:23 -0700 |
---|---|---|
committer | Morxemplum <morxemplum+github@gmail.com> | 2020-10-01 15:16:23 -0700 |
commit | 7b1228290808fb17f6760cd7d8bdc11f1db4f7b7 (patch) | |
tree | 5bf86deb2c2c6b52818973009e86e8f621d8395d | |
parent | 569c07ea5467651ce300ebb19d7b35c326c8c5c6 (diff) |
getVersion's definition is now in the headermajor_minor_micro
-rw-r--r-- | include/SSVOpenHexagon/Global/Config.hpp | 8 | ||||
-rw-r--r-- | src/SSVOpenHexagon/Core/HGScripting.cpp | 4 | ||||
-rw-r--r-- | src/SSVOpenHexagon/Global/Config.cpp | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/include/SSVOpenHexagon/Global/Config.hpp b/include/SSVOpenHexagon/Global/Config.hpp index ceebb08d..944519a2 100644 --- a/include/SSVOpenHexagon/Global/Config.hpp +++ b/include/SSVOpenHexagon/Global/Config.hpp @@ -97,8 +97,6 @@ void setSaveLocalBestReplayToFile(bool mX); [[nodiscard]] bool getVsync(); [[nodiscard]] bool getAutoZoomFactor(); [[nodiscard]] bool getFullscreen(); -[[nodiscard, gnu::const]] constexpr GameVersion getVersion(); -[[nodiscard, gnu::const]] const std::string& getVersionString(); [[nodiscard]] bool getWindowedAutoResolution(); [[nodiscard]] bool getFullscreenAutoResolution(); [[nodiscard]] unsigned int getFullscreenWidth(); @@ -110,6 +108,12 @@ void setSaveLocalBestReplayToFile(bool mX); [[nodiscard]] bool getShowMessages(); [[nodiscard]] bool getRotateToStart(); +[[nodiscard, gnu::const]] constexpr GameVersion getVersion() +{ + return GAME_VERSION; +} +[[nodiscard, gnu::const]] const std::string& getVersionString(); + [[nodiscard]] bool getDebug(); [[nodiscard]] bool getPulse(); [[nodiscard]] bool getBeatPulse(); diff --git a/src/SSVOpenHexagon/Core/HGScripting.cpp b/src/SSVOpenHexagon/Core/HGScripting.cpp index 4b412467..f66c30bb 100644 --- a/src/SSVOpenHexagon/Core/HGScripting.cpp +++ b/src/SSVOpenHexagon/Core/HGScripting.cpp @@ -231,11 +231,11 @@ void HexagonGame::initLua_Utils() .doc("Returns the major of the current version of the game"); addLuaFn("u_getVersionMinor", // - [this] { return Config::getVersion().major; }) + [this] { return Config::getVersion().minor; }) .doc("Returns the minor of the current version of the game"); addLuaFn("u_getVersionMicro", // - [this] { return Config::getVersion().major; }) + [this] { return Config::getVersion().micro; }) .doc("Returns the micro of the current version of the game"); addLuaFn("u_getVersionString", // diff --git a/src/SSVOpenHexagon/Global/Config.cpp b/src/SSVOpenHexagon/Global/Config.cpp index 73a1b09a..9cb30f91 100644 --- a/src/SSVOpenHexagon/Global/Config.cpp +++ b/src/SSVOpenHexagon/Global/Config.cpp @@ -646,11 +646,6 @@ void setSaveLocalBestReplayToFile(bool mX) return fullscreen(); } -[[nodiscard, gnu::const]] constexpr GameVersion getVersion() -{ - return GAME_VERSION; -} - [[nodiscard, gnu::const]] const std::string& getVersionString() { static std::string result{ |