Rearrange storage of reserved tracks for railway tiles
[openttd/fttd.git] / src / rev.cpp.in
blobcd22a4a8cf34c8b0e526e1d144ca530d90e22271
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
12 #include "stdafx.h"
13 #include "core/bitmath_func.hpp"
14 #include "rev.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 "<major>.<minor>.<build>[-RC<rc>]",
28 * "r<revision number>[M][-<branch>]" or "norev000".
30 * The major, minor and build are the numbers that describe releases of
31 * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates.
33 * The revision number is fairly straight forward. The M is to show that
34 * the binary is made from modified source code. The branch shows the
35 * branch the revision is of and will not be there when it is trunk.
37 * norev000 is for non-releases that are made on systems without
38 * subversion or sources that are not a checkout of subversion.
40 const char _openttd_revision[] = "!!VERSION!!";
42 /**
43 * The text version of OpenTTD's build date.
44 * Updating the build date in this file is the safest as it generally gets
45 * updated for each revision in contrary to most other files that only see
46 * updates when they are actually changed themselves.
48 const char _openttd_build_date[] = __DATE__ " " __TIME__;
50 /**
51 * Let us know if current build was modified. This detection
52 * works even in the case when revision string is overridden by
53 * --revision argument.
54 * Value 0 means no modification, 1 is for unknown state
55 * (compiling from sources without any version control software)
56 * and 2 is for modified revision.
58 const byte _openttd_revision_modified = !!MODIFIED!!;
60 /**
61 * The NewGRF revision of OTTD:
62 * bits meaning.
63 * 28-31 major version
64 * 24-27 minor version
65 * 20-23 build
66 * 19 1 if it is a release, 0 if it is not.
67 * 0-18 revision number; 0 for releases and when the revision is unknown.
69 * The 19th bit is there so the development/betas/alpha, etc. leading to a
70 * final release will always have a lower version number than the released
71 * version, thus making comparisons on specific revisions easy.
73 const uint32 _openttd_newgrf_version = 1 << 28 | 4 << 24 | 0 << 20 | 0 << 19 | (!!REVISION!! & ((1 << 19) - 1));
75 #ifdef __MORPHOS__
76 /**
77 * Variable used by MorphOS to show the version.
79 extern const char morphos_versions_tag[] = "$VER: OpenTTD !!VERSION!! (!!DATE!!) OpenTTD Team [MorphOS, PowerPC]";
80 #endif