diff options
author | Patric Stout <truebrain@openttd.org> | 2021-08-14 18:28:35 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-08-15 12:28:51 +0200 |
commit | eca73a810c19ed5cfb3f24cb5560d0735e19ea00 (patch) | |
tree | 19fd84b2bd77beca620287fbd8a8aa7d57962250 /src | |
parent | ee333a954934fee206a65795670d15150178c0f3 (diff) | |
download | openttd-eca73a810c19ed5cfb3f24cb5560d0735e19ea00.tar.xz |
Change: rebrand 1.12.0 to 12.0
One question that keeps popping up: "when do we release 2.0?".
NewGRF will force that at least 1.16 will be 2.0, but to not wait
for this, let's drop the "1." and be for ever done with that
conversation.
We are following in the footstep of giants here.
Diffstat (limited to 'src')
-rw-r--r-- | src/ai/ai_info.cpp | 2 | ||||
-rw-r--r-- | src/game/game_info.cpp | 2 | ||||
-rw-r--r-- | src/os/windows/ottdres.rc.in | 4 | ||||
-rw-r--r-- | src/rev.cpp.in | 11 | ||||
-rw-r--r-- | src/script/api/ai_changelog.hpp | 2 | ||||
-rw-r--r-- | src/script/api/game_changelog.hpp | 2 | ||||
-rw-r--r-- | src/script/api/script_controller.hpp | 15 |
7 files changed, 25 insertions, 13 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index 10d34ea58..17ad01257 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -25,7 +25,7 @@ */ static bool CheckAPIVersion(const char *api_version) { - static const std::set<std::string> versions = { "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "1.12" }; + static const std::set<std::string> versions = { "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12" }; return versions.find(api_version) != versions.end(); } diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp index 60b4d0dcc..98818e8dd 100644 --- a/src/game/game_info.cpp +++ b/src/game/game_info.cpp @@ -23,7 +23,7 @@ */ static bool CheckAPIVersion(const char *api_version) { - static const std::set<std::string> versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "1.12" }; + static const std::set<std::string> versions = { "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12" }; return versions.find(api_version) != versions.end(); } diff --git a/src/os/windows/ottdres.rc.in b/src/os/windows/ottdres.rc.in index 31309382c..279389a04 100644 --- a/src/os/windows/ottdres.rc.in +++ b/src/os/windows/ottdres.rc.in @@ -77,8 +77,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION ${REV_MAJOR},${REV_MINOR},${REV_BUILD},${REV_ISODATE} - PRODUCTVERSION ${REV_MAJOR},${REV_MINOR},${REV_BUILD},${REV_ISODATE} + FILEVERSION ${REV_MAJOR},${REV_MINOR},0,${REV_ISODATE} + PRODUCTVERSION ${REV_MAJOR},${REV_MINOR},0,${REV_ISODATE} FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L diff --git a/src/rev.cpp.in b/src/rev.cpp.in index 3939ca5a0..337519ee2 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -75,14 +75,17 @@ const byte _openttd_revision_tagged = ${REV_ISTAG}; /** * The NewGRF revision of OTTD: * bits meaning. - * 28-31 major version - * 24-27 minor version - * 20-23 build + * 24-31 major version + 16 + * 20-23 minor version * 19 1 if it is a release, 0 if it is not. * 0-18 used to be the SVN revision, now just last revision before switch to git * * The 19th bit is there so the development/betas/alpha, etc. leading to a * final release will always have a lower version number than the released * version, thus making comparisons on specific revisions easy. + * + * The + 16 for the major version is because we went from 1.11.0 to 12.0, dropping + * the "patch" part of the version. To make sure "1.11.0" is smaller than "12.0", we + * have to adjust the major by 16. */ -const uint32 _openttd_newgrf_version = ${REV_MAJOR} << 28 | ${REV_MINOR} << 24 | ${REV_BUILD} << 20 | ${REV_ISSTABLETAG} << 19 | 28004; +const uint32 _openttd_newgrf_version = (${REV_MAJOR} + 16) << 24 | ${REV_MINOR} << 20 | ${REV_ISSTABLETAG} << 19 | 28004; diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 6e3283820..e5699a7d4 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -13,7 +13,7 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * - * \b 1.12.0 + * \b 12.0 * * This version is not yet released. The following changes are not set in stone yet. * diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index 5d214efb1..d3efea919 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -13,7 +13,7 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * - * \b 1.12.0 + * \b 12.0 * * This version is not yet released. The following changes are not set in stone yet. * diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp index 992a9ebf2..d0bb129e9 100644 --- a/src/script/api/script_controller.hpp +++ b/src/script/api/script_controller.hpp @@ -135,11 +135,20 @@ public: /** * Get the OpenTTD version of this executable. The version is formatted * with the bits having the following meaning: - * 28-31 major version - * 24-27 minor version - * 20-23 build + * 24-31 major version + 16. + * 20-23 minor version. * 19 1 if it is a release, 0 if it is not. * 0-18 revision number; 0 when the revision is unknown. + * You have to subtract 16 from the major version to get the correct + * value. + * + * Prior to OpenTTD 12, the bits have the following meaning: + * 28-31 major version. + * 24-27 minor version. + * 20-23 build. + * 19 1 if it is a release, 0 if it is not. + * 0-18 revision number; 0 when the revision is unknown. + * * @return The version in newgrf format. */ static uint GetVersion(); |