src/rev.cpp.in
author rubidium
Sat, 22 Mar 2008 19:54:50 +0000
changeset 8721 43aa1b72bd4f
parent 7780 12ef69de4e60
child 9085 8b3897a75aed
permissions -rw-r--r--
(svn r12396) -Codechange: change a few things to reflect that we aren't aiming for 0.6 anymore in trunk.
7780
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     1
/* $Id$ */
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     2
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     3
/** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     4
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     5
#include "stdafx.h"
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     6
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     7
/**
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     8
 * The text version of OpenTTD's revision.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
     9
 * This will be either "<major>.<minor>.<build>[-RC<rc>]",
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    10
 * "r<revision number>[M][-<branch>]" or "norev000".
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    11
 *
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    12
 * The major, minor and build are the numbers that describe releases of
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    13
 * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    14
 *
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    15
 * The revision number is fairly straight forward. The M is to show that
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    16
 * the binary is made from modified source code. The branch shows the
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    17
 * branch the revision is of and will not be there when it is trunk.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    18
 *
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    19
 * norev000 is for non-releases that are made on systems without
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    20
 * subversion or sources that are not a checkout of subversion.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    21
 */
7564
fa54ab680589 (svn r11089) -Codechange: add revision detection to MSVC.
rubidium
parents:
diff changeset
    22
extern const char _openttd_revision[] = "@@VERSION@@";
7780
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    23
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    24
/**
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    25
 * The NewGRF revision of OTTD:
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    26
 * bits  meaning.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    27
 * 28-31 major version
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    28
 * 24-27 minor version
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    29
 * 20-23 build
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    30
 *    19 1 if it is a release, 0 if it is not.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    31
 *  0-18 revision number; 0 for releases and when the revision is unknown.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    32
 *
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    33
 * The 19th bit is there so the development/betas/alpha, etc. leading to a
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    34
 * final release will always have a lower version number than the released
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    35
 * version, thus making comparisions on specific revisions easy.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    36
 */
8721
43aa1b72bd4f (svn r12396) -Codechange: change a few things to reflect that we aren't aiming for 0.6 anymore in trunk.
rubidium
parents: 7780
diff changeset
    37
uint32 _openttd_newgrf_version = 0 << 28 | 7 << 24 | 0 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1));
7780
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    38
7564
fa54ab680589 (svn r11089) -Codechange: add revision detection to MSVC.
rubidium
parents:
diff changeset
    39
#ifdef __MORPHOS__
7780
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    40
/**
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    41
 * Variable used by MorphOS to show the version.
12ef69de4e60 (svn r11330) -Add: OTTD version checking for NewGRFs. This allows NewGRFs to do something different for different versions of OpenTTD, like disabling it for too low versions or loading different graphics.
rubidium
parents: 7564
diff changeset
    42
 */
7564
fa54ab680589 (svn r11089) -Codechange: add revision detection to MSVC.
rubidium
parents:
diff changeset
    43
extern const char morphos_versions_tag[] = "\\0$VER: OpenTTD @@VERSION@@ (@@DATE@@)  OpenTTD Team [MorphOS, PowerPC]";
fa54ab680589 (svn r11089) -Codechange: add revision detection to MSVC.
rubidium
parents:
diff changeset
    44
#endif