Add: INR currency (#8136)
[openttd-github.git] / src / rev.cpp.in
blob3f5b126dc1a23f0ccf69228fb8d7534b4ac277fe
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
10 #include "stdafx.h"
11 #include "core/bitmath_func.hpp"
12 #include "rev.h"
14 #include "safeguards.h"
16 /**
17 * Is this version of OpenTTD a release version?
18 * @return True if it is a release version.
20 bool IsReleasedVersion()
22 return HasBit(_openttd_newgrf_version, 19);
25 /**
26 * The text version of OpenTTD's revision.
27 * This will be either
28 * - "<tag>", like "<major>.<minor>.<build>[-RC<rc>]",
29 * - "<commitdate>-g<shorthash><modified>" in "master",
30 * - "<commitdate>-<branch>-g<shorthash><modified>" in other branches, or
31 * - "norev000", if the version is unknown.
33 * The major, minor and build are the numbers that describe releases of
34 * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates.
36 * <modified> shows a "M", if the binary is made from modified source code.
38 const char _openttd_revision[] = "!!VERSION!!";
40 /**
41 * The text version of OpenTTD's build date.
42 * Updating the build date in this file is the safest as it generally gets
43 * updated for each revision in contrary to most other files that only see
44 * updates when they are actually changed themselves.
46 const char _openttd_build_date[] = __DATE__ " " __TIME__;
48 /**
49 * The git revision hash of this version.
51 const char _openttd_revision_hash[] = "!!GITHASH!!";
53 /**
54 * The year of this version.
56 const char _openttd_revision_year[] = "!!YEAR!!";
58 /**
59 * Let us know if current build was modified. This detection
60 * works even in the case when revision string is overridden by
61 * --revision argument.
62 * Value 0 means no modification, 1 is for unknown state
63 * (compiling from sources without any version control software)
64 * and 2 is for modified revision.
66 const byte _openttd_revision_modified = !!MODIFIED!!;
68 /**
69 * Indicate whether this is a tagged version.
70 * If this is non-0, then _openttd_revision is the name of the tag,
71 * and the version is likely a beta, release candidate, or real release.
73 const byte _openttd_revision_tagged = !!ISTAG!!;
75 /**
76 * The NewGRF revision of OTTD:
77 * bits meaning.
78 * 28-31 major version
79 * 24-27 minor version
80 * 20-23 build
81 * 19 1 if it is a release, 0 if it is not.
82 * 0-18 used to be the SVN revision, now just last revision before switch to git
84 * The 19th bit is there so the development/betas/alpha, etc. leading to a
85 * final release will always have a lower version number than the released
86 * version, thus making comparisons on specific revisions easy.
88 const uint32 _openttd_newgrf_version = 1 << 28 | 11 << 24 | 0 << 20 | !!ISSTABLETAG!! << 19 | 28004;