diff options
Diffstat (limited to 'core/version.h')
-rw-r--r-- | core/version.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/version.h b/core/version.h index 46eecf6125..05fec9d0a6 100644 --- a/core/version.h +++ b/core/version.h @@ -41,9 +41,14 @@ #ifdef VERSION_PATCH // Example: "3.1.4" #define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH) +// Version number encoded as hexadecimal int with one byte for each number, +// for easy comparison from code. +// Example: 3.1.4 will be 0x030104, making comparison easy from script. +#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR + VERSION_PATCH #else // Example: "3.1" #define VERSION_NUMBER "" VERSION_BRANCH +#define VERSION_HEX 0x10000 * VERSION_MAJOR + 0x100 * VERSION_MINOR #endif // VERSION_PATCH // Describes the full configuration of that Godot version, including the version number, |