summaryrefslogtreecommitdiff
path: root/src/rev.cpp.in
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-21 18:57:45 +0000
committerrubidium <rubidium@openttd.org>2011-08-21 18:57:45 +0000
commitf6b0561cd86f363c93b64817f26e3ed7f5b1b688 (patch)
tree07d1a5705f1a2c9a620b49650baec53cd84fba27 /src/rev.cpp.in
parent786ae457f1555ed4da8926e9d796f6d88f54398a (diff)
downloadopenttd-f6b0561cd86f363c93b64817f26e3ed7f5b1b688.tar.xz
(svn r22805) -Codechange: move use of magic number for version checking to more logical location
Diffstat (limited to 'src/rev.cpp.in')
-rw-r--r--src/rev.cpp.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rev.cpp.in b/src/rev.cpp.in
index 6eb90dc4a..3ce64b6de 100644
--- a/src/rev.cpp.in
+++ b/src/rev.cpp.in
@@ -10,9 +10,19 @@
/** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
#include "stdafx.h"
+#include "core/bitmath_func.hpp"
#include "rev.h"
/**
+ * Is this version of OpenTTD a release version?
+ * @return True if it is a release version.
+ */
+bool IsReleasedVersion()
+{
+ return HasBit(_openttd_newgrf_version, 19);
+}
+
+/**
* The text version of OpenTTD's revision.
* This will be either "<major>.<minor>.<build>[-RC<rc>]",
* "r<revision number>[M][-<branch>]" or "norev000".