Changeset - r28789:24310860216b
[Not reviewed]
master
0 12 2
Rubidium - 10 months ago 2024-02-18 16:38:26
rubidium@openttd.org
Codechange: We are heading to 15
14 files changed with 30 insertions and 8 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.16)
 

	
 
if(NOT BINARY_NAME)
 
    set(BINARY_NAME openttd)
 
endif()
 

	
 
project(${BINARY_NAME}
 
    VERSION 14.0
 
    VERSION 15.0
 
    LANGUAGES CXX
 
)
 

	
 
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
 
    message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the build directory. You may need to delete \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" first.")
 
endif()
bin/ai/CMakeLists.txt
Show inline comments
 
@@ -12,12 +12,13 @@ set(AI_COMPAT_SOURCE_FILES
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.9.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
 
)
 

	
 
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
 
    string(REPLACE "${CMAKE_SOURCE_DIR}/bin/" "" AI_COMPAT_SOURCE_FILE_NAME "${AI_COMPAT_SOURCE_FILE}")
 
    string(CONCAT AI_COMPAT_BINARY_FILE "${CMAKE_BINARY_DIR}/" "${AI_COMPAT_SOURCE_FILE_NAME}")
 

	
bin/ai/compat_14.nut
Show inline comments
 
/*
 
 * This file is part of OpenTTD.
 
 * 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.
 
 * 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.
 
 * 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/>.
 
 */
 

	
 
AILog.Info("14 API compatibility in effect.");
bin/ai/compat_15.nut
Show inline comments
 
new file 100644
 
/*
 
 * This file is part of OpenTTD.
 
 * 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.
 
 * 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.
 
 * 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/>.
 
 */
bin/game/CMakeLists.txt
Show inline comments
 
@@ -9,12 +9,13 @@ set(GS_COMPAT_SOURCE_FILES
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.9.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
 
	${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
 
)
 

	
 
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
 
    string(REPLACE "${CMAKE_SOURCE_DIR}/bin/" "" GS_COMPAT_SOURCE_FILE_NAME "${GS_COMPAT_SOURCE_FILE}")
 
    string(CONCAT GS_COMPAT_BINARY_FILE "${CMAKE_BINARY_DIR}/" "${GS_COMPAT_SOURCE_FILE_NAME}")
 

	
bin/game/compat_14.nut
Show inline comments
 
/*
 
 * This file is part of OpenTTD.
 
 * 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.
 
 * 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.
 
 * 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/>.
 
 */
 

	
 
GSLog.Info("14 API compatibility in effect.");
bin/game/compat_15.nut
Show inline comments
 
new file 100644
 
/*
 
 * This file is part of OpenTTD.
 
 * 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.
 
 * 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.
 
 * 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/>.
 
 */
regression/regression/info.nut
Show inline comments
 
class Regression extends AIInfo {
 
	function GetAuthor()      { return "OpenTTD NoAI Developers Team"; }
 
	function GetName()        { return "Regression"; }
 
	function GetShortName()   { return "REGR"; }
 
	function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
 
	function GetVersion()     { return 1; }
 
	function GetAPIVersion()  { return "14"; }
 
	function GetAPIVersion()  { return "15"; }
 
	function GetDate()        { return "2007-03-18"; }
 
	function CreateInstance() { return "Regression"; }
 
	function UseAsRandomAI()  { return false; }
 
}
 

	
 
RegisterAI(Regression());
regression/stationlist/info.nut
Show inline comments
 
class StationList extends AIInfo {
 
	function GetAuthor()      { return "OpenTTD NoAI Developers Team"; }
 
	function GetName()        { return "StationList"; }
 
	function GetShortName()   { return "REGS"; }
 
	function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; }
 
	function GetVersion()     { return 1; }
 
	function GetAPIVersion()  { return "14"; }
 
	function GetAPIVersion()  { return "15"; }
 
	function GetDate()        { return "2007-03-18"; }
 
	function CreateInstance() { return "StationList"; }
 
	function UseAsRandomAI()  { return false; }
 
}
 

	
 
RegisterAI(StationList());
src/ai/ai_info.cpp
Show inline comments
 
@@ -21,13 +21,13 @@
 
/**
 
 * Check if the API version provided by the AI is supported.
 
 * @param api_version The API version as provided by the AI.
 
 */
 
static bool CheckAPIVersion(const std::string &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", "12", "13", "14" };
 
	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", "13", "14", "15" };
 
	return versions.find(api_version) != versions.end();
 
}
 

	
 
#if defined(_WIN32)
 
#undef GetClassName
 
#endif /* _WIN32 */
src/game/game_info.cpp
Show inline comments
 
@@ -19,13 +19,13 @@
 
/**
 
 * Check if the API version provided by the Game is supported.
 
 * @param api_version The API version as provided by the Game.
 
 */
 
static bool CheckAPIVersion(const std::string &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", "12", "13", "14" };
 
	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", "13", "14", "15" };
 
	return versions.find(api_version) != versions.end();
 
}
 

	
 
#if defined(_WIN32)
 
#undef GetClassName
 
#endif /* _WIN32 */
src/saveload/saveload.h
Show inline comments
 
@@ -373,13 +373,13 @@ enum SaveLoadVersion : uint16_t {
 
	SLV_CALENDAR_SUB_DATE_FRACT,            ///< 328  PR#11428 Add sub_date_fract to measure calendar days.
 
	SLV_SHIP_ACCELERATION,                  ///< 329  PR#10734 Start using Vehicle's acceleration field for ships too.
 

	
 
	SLV_MAX_LOAN_FOR_COMPANY,               ///< 330  PR#11224 Separate max loan for each company.
 
	SLV_DEPOT_UNBUNCHING,                   ///< 331  PR#11945 Allow unbunching shared order vehicles at a depot.
 
	SLV_AI_LOCAL_CONFIG,                    ///< 332  PR#12003 Config of running AI is stored inside Company.
 
	SLV_SCRIPT_RANDOMIZER,                  ///< 333  PR#12063 Save script randomizers.
 
	SLV_SCRIPT_RANDOMIZER,                  ///< 333  PR#12063 v14.0 Save script randomizers.
 

	
 
	SL_MAX_VERSION,                         ///< Highest possible saveload version
 
};
 

	
 
/** Save or load result codes. */
 
enum SaveOrLoadResult {
src/script/api/ai_changelog.hpp
Show inline comments
 
@@ -10,16 +10,18 @@
 
 *
 
 * Only new / renamed / deleted api functions will be listed here. A list of
 
 * bug fixes can be found in the normal changelog. Note that removed API
 
 * functions may still be available if you return an older API version
 
 * in GetAPIVersion() in info.nut.
 
 *
 
 * \b 14.0
 
 * \b 15.0
 
 *
 
 * This version is not yet released. The following changes are not set in stone yet.
 
 *
 
 * \b 14.0
 
 *
 
 * API additions:
 
 * \li AITimeMode
 
 * \li AITown::ROAD_LAYOUT_RANDOM
 
 * \li AIVehicle::IsPrimaryVehicle
 
 * \li AITileList_StationCoverage
 
 * \li AIAirport::GetAirportNumHelipads
src/script/api/game_changelog.hpp
Show inline comments
 
@@ -10,16 +10,18 @@
 
 *
 
 * Only new / renamed / deleted api functions will be listed here. A list of
 
 * bug fixes can be found in the normal changelog. Note that removed API
 
 * functions may still be available if you return an older API version
 
 * in GetAPIVersion() in info.nut.
 
 *
 
 * \b 14.0
 
 * \b 15.0
 
 *
 
 * This version is not yet released. The following changes are not set in stone yet.
 
 *
 
 * \b 14.0
 
 *
 
 * API additions:
 
 * \li GSIndustry::GetConstructionDate
 
 * \li GSAsyncMode
 
 * \li GSCompanyMode::IsValid
 
 * \li GSCompanyMode::IsDeity
 
 * \li GSTimeMode
0 comments (0 inline, 0 general)