2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
8 /** @file company_sl_compat.h Loading of company chunks before table headers were added. */
10 #ifndef SAVELOAD_COMPAT_COMPANY_H
11 #define SAVELOAD_COMPAT_COMPANY_H
13 #include "../saveload.h"
15 /** Original field order for SlCompanyOldAIBuildRec. */
16 const SaveLoadCompat _company_old_ai_buildrec_compat
[] = {
17 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
18 SLC_NULL(4, SLV_6
, SLV_107
),
19 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
20 SLC_NULL(4, SLV_6
, SLV_107
),
21 SLC_NULL(8, SL_MIN_VERSION
, SLV_107
),
24 /** Original field order for SlCompanyOldAI. */
25 const SaveLoadCompat _company_old_ai_compat
[] = {
26 SLC_NULL(2, SL_MIN_VERSION
, SLV_107
),
27 SLC_NULL(2, SL_MIN_VERSION
, SLV_13
),
28 SLC_NULL(4, SLV_13
, SLV_107
),
29 SLC_NULL(8, SL_MIN_VERSION
, SLV_107
),
30 SLC_VAR("num_build_rec"),
31 SLC_NULL(3, SL_MIN_VERSION
, SLV_107
),
33 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
34 SLC_NULL(4, SLV_6
, SLV_107
),
35 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
36 SLC_NULL(4, SLV_6
, SLV_107
),
37 SLC_NULL(2, SL_MIN_VERSION
, SLV_107
),
39 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
40 SLC_NULL(4, SLV_6
, SLV_107
),
41 SLC_NULL(2, SL_MIN_VERSION
, SLV_6
),
42 SLC_NULL(4, SLV_6
, SLV_107
),
43 SLC_NULL(2, SL_MIN_VERSION
, SLV_107
),
45 SLC_NULL(2, SL_MIN_VERSION
, SLV_69
),
46 SLC_NULL(4, SLV_69
, SLV_107
),
48 SLC_NULL(18, SL_MIN_VERSION
, SLV_107
),
49 SLC_NULL(20, SL_MIN_VERSION
, SLV_107
),
50 SLC_NULL(32, SL_MIN_VERSION
, SLV_107
),
52 SLC_NULL(64, SLV_2
, SLV_107
),
56 /** Original field order for SlCompanySettings. */
57 const SaveLoadCompat _company_settings_compat
[] = {
58 SLC_NULL(512, SLV_16
, SLV_19
),
59 SLC_VAR("engine_renew_list"),
60 SLC_VAR("settings.engine_renew"),
61 SLC_VAR("settings.engine_renew_months"),
62 SLC_VAR("settings.engine_renew_money"),
63 SLC_VAR("settings.renew_keep_length"),
64 SLC_VAR("settings.vehicle.servint_ispercent"),
65 SLC_VAR("settings.vehicle.servint_trains"),
66 SLC_VAR("settings.vehicle.servint_roadveh"),
67 SLC_VAR("settings.vehicle.servint_aircraft"),
68 SLC_VAR("settings.vehicle.servint_ships"),
69 SLC_NULL(63, SLV_2
, SLV_144
),
72 /** Original field order for SlCompanyEconomy. */
73 const SaveLoadCompat _company_economy_compat
[] = {
76 SLC_VAR("company_value"),
77 SLC_VAR("delivered_cargo[NUM_CARGO - 1]"),
78 SLC_VAR("delivered_cargo"),
79 SLC_VAR("performance_history"),
82 /** Original field order for SlCompanyLiveries. */
83 const SaveLoadCompat _company_liveries_compat
[] = {
89 /** Original field order for company_desc. */
90 const SaveLoadCompat _company_sl_compat
[] = {
94 SLC_VAR("president_name_1"),
95 SLC_VAR("president_name_2"),
96 SLC_VAR("president_name"),
99 SLC_VAR("current_loan"),
101 SLC_VAR("money_fraction"),
102 SLC_NULL(1, SL_MIN_VERSION
, SLV_58
),
103 SLC_VAR("block_preview"),
104 SLC_NULL(2, SL_MIN_VERSION
, SLV_94
),
105 SLC_NULL(4, SLV_94
, SLV_170
),
106 SLC_VAR("location_of_HQ"),
107 SLC_VAR("last_build_coordinate"),
108 SLC_VAR("inaugurated_year"),
109 SLC_NULL(4, SL_MIN_VERSION
, SLV_TABLE_CHUNKS
),
110 SLC_VAR("num_valid_stat_ent"),
111 SLC_VAR("months_of_bankruptcy"),
112 SLC_VAR("bankrupt_asked"),
113 SLC_VAR("bankrupt_timeout"),
114 SLC_VAR("bankrupt_value"),
115 SLC_VAR("yearly_expenses"),
117 SLC_NULL(1, SLV_107
, SLV_112
),
118 SLC_NULL(1, SLV_4
, SLV_100
),
119 SLC_VAR("terraform_limit"),
120 SLC_VAR("clear_limit"),
121 SLC_VAR("tree_limit"),
124 SLC_VAR("cur_economy"),
125 SLC_VAR("old_economy"),
129 #endif /* SAVELOAD_COMPAT_COMPANY_H */