summaryrefslogtreecommitdiff
path: root/src/company_base.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-09 20:04:53 +0200
committerPatric Stout <github@truebrain.nl>2021-06-14 21:58:05 +0200
commitaf43fc3d62cbeccd0cde3280b273e83889a0697c (patch)
treeb01c6068c674de2301153bc14b53eb0a7a168bfb /src/company_base.h
parent0bb1d2fa8eaeb72213909100331c5c28e6decc9f (diff)
downloadopenttd-af43fc3d62cbeccd0cde3280b273e83889a0697c.tar.xz
Codechange: use SLE_STRUCT(LIST) for Company chunks
Diffstat (limited to 'src/company_base.h')
-rw-r--r--src/company_base.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/company_base.h b/src/company_base.h
index e21bf9bf3..065931c6c 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -98,28 +98,30 @@ struct CompanyProperties {
CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters.
byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy.
+ Livery livery[LS_END];
+
+ EngineRenewList engine_renew_list; ///< Engine renewals of this company.
+ CompanySettings settings; ///< settings specific for each company
+
// TODO: Change some of these member variables to use relevant INVALID_xxx constants
CompanyProperties()
: 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), is_ai(false) {}
+ terraform_limit(0), clear_limit(0), tree_limit(0), is_ai(false), engine_renew_list(nullptr) {}
};
-struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties {
+struct Company : CompanyProperties, CompanyPool::PoolItem<&_company_pool> {
Company(uint16 name_1 = 0, bool is_ai = false);
~Company();
- Livery livery[LS_END];
RailTypes avail_railtypes; ///< Rail types available to this company.
RoadTypes avail_roadtypes; ///< Road types available to this company.
class AIInstance *ai_instance;
class AIInfo *ai_info;
- EngineRenewList engine_renew_list; ///< Engine renewals of this company.
- CompanySettings settings; ///< settings specific for each company
GroupStatistics group_all[VEH_COMPANY_END]; ///< NOSAVE: Statistics for the ALL_GROUP group.
GroupStatistics group_default[VEH_COMPANY_END]; ///< NOSAVE: Statistics for the DEFAULT_GROUP group.