diff options
Diffstat (limited to 'src/common/version.hpp')
-rw-r--r-- | src/common/version.hpp | 47 |
1 files changed, 8 insertions, 39 deletions
diff --git a/src/common/version.hpp b/src/common/version.hpp index 30c619c..e34ec50 100644 --- a/src/common/version.hpp +++ b/src/common/version.hpp @@ -1,14 +1,7 @@ -#ifndef VERSION_HPP -#define VERSION_HPP +#ifndef TMWA_COMMON_VERSION_HPP +#define TMWA_COMMON_VERSION_HPP -// TODO generate this from ./configure -// Actually, it should be done from the Makefile -// it should be possible to use a ./config.status for a long time - -# define TMWA_VERSION_MAJOR 13 -# define TMWA_VERSION_MINOR 9 -# define TMWA_VERSION_PATCH 29 -# define TMWA_DEVELOP_FLAG 1 +# include <cstdint> // TODO make these bitwise enums # define TMWA_FLAG_REGISTRATION 0x01 @@ -18,9 +11,6 @@ # define TMWA_SERVER_INTER 0x04 # define TMWA_SERVER_MAP 0x08 -# define TMWA_VENDOR "Vanilla" -# define TMWA_VENDOR_VERSION 0 - struct Version { uint8_t major; @@ -33,31 +23,10 @@ struct Version uint16_t vend; // can't add vendor name yet }; -static_assert(sizeof(Version) == 8, "this is send over the network, can't change"); - -constexpr Version CURRENT_LOGIN_SERVER_VERSION = -{ - TMWA_VERSION_MAJOR, TMWA_VERSION_MINOR, TMWA_VERSION_PATCH, - TMWA_DEVELOP_FLAG, +static_assert(sizeof(Version) == 8, "this is sent over the network, can't change"); - 0, TMWA_SERVER_LOGIN, - TMWA_VENDOR_VERSION, -}; -constexpr Version CURRENT_CHAR_SERVER_VERSION = -{ - TMWA_VERSION_MAJOR, TMWA_VERSION_MINOR, TMWA_VERSION_PATCH, - TMWA_DEVELOP_FLAG, - - 0, TMWA_SERVER_CHAR | TMWA_SERVER_INTER, - TMWA_VENDOR_VERSION, -}; -constexpr Version CURRENT_MAP_SERVER_VERSION = -{ - TMWA_VERSION_MAJOR, TMWA_VERSION_MINOR, TMWA_VERSION_PATCH, - TMWA_DEVELOP_FLAG, - - 0, TMWA_SERVER_MAP, - TMWA_VENDOR_VERSION, -}; +extern Version CURRENT_LOGIN_SERVER_VERSION; +extern Version CURRENT_CHAR_SERVER_VERSION; +extern Version CURRENT_MAP_SERVER_VERSION; -#endif // VERSION_HPP +#endif // TMWA_COMMON_VERSION_HPP |