Merge branch 'master' into jgrpp

# Conflicts:
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj.filters
#	src/base_consist.h
#	src/company_base.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/station_sl.cpp
#	src/settings.cpp
#	src/signs_base.h
#	src/string.cpp
#	src/string_func.h
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/null_v.cpp
This commit is contained in:
Jonathan G Rennison
2020-05-21 20:19:57 +01:00
162 changed files with 2519 additions and 1448 deletions

View File

@@ -16,6 +16,7 @@
#include "tile_type.h"
#include "settings_type.h"
#include "group.h"
#include <string>
/** Statistics about the economy. */
struct CompanyEconomyEntry {
@@ -56,11 +57,11 @@ extern CompanyPool _company_pool;
struct CompanyProperties {
uint32 name_2; ///< Parameter of #name_1.
StringID name_1; ///< Name of the company if the user did not change it.
char *name; ///< Name of the company if the user changed it.
std::string name; ///< Name of the company if the user changed it.
StringID president_name_1; ///< Name of the president if the user did not change it.
uint32 president_name_2; ///< Parameter of #president_name_1
char *president_name; ///< Name of the president if the user changed it.
std::string president_name; ///< Name of the president if the user changed it.
CompanyManagerFace face; ///< Face description of the president.
@@ -102,17 +103,11 @@ struct CompanyProperties {
// TODO: Change some of these member variables to use relevant INVALID_xxx constants
CompanyProperties()
: name_2(0), name_1(0), name(nullptr), president_name_1(0), president_name_2(0), president_name(nullptr),
: name_2(0), name_1(0), president_name_1(0), president_name_2(0),
face(0), money(0), money_fraction(0), current_loan(0), colour(0), block_preview(0),
location_of_HQ(0), last_build_coordinate(0), share_owners(), inaugurated_year(0),
months_of_bankruptcy(0), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0),
terraform_limit(0), clear_limit(0), tree_limit(0), purchase_land_limit(0), is_ai(false) {}
~CompanyProperties()
{
free(this->name);
free(this->president_name);
}
};
struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties {