OpenTTD Source: src/saveload/compat/company_sl_compat.h Source File

OpenTTD Source 13.1

company_sl_compat.h
Go to the documentation of this file.
1 /*
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/>.
6 */
7
10 #ifndef SAVELOAD_COMPAT_COMPANY_H
11 #define SAVELOAD_COMPAT_COMPANY_H
12
13 #include "../saveload.h"
14
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),
22 };
23
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),
32
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),
38
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),
44
45 SLC_NULL(2, SL_MIN_VERSION, SLV_69),
46 SLC_NULL(4, SLV_69, SLV_107),
47
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),
51
52 SLC_NULL(64, SLV_2, SLV_107),
53 SLC_VAR("buildrec"),
54 };
55
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),
70 };
71
73 const SaveLoadCompat _company_economy_compat[] = {
74 SLC_VAR("income"),
75 SLC_VAR("expenses"),
76 SLC_VAR("company_value"),
77 SLC_VAR("delivered_cargo[NUM_CARGO - 1]"),
78 SLC_VAR("delivered_cargo"),
79 SLC_VAR("performance_history"),
80 };
81
83 const SaveLoadCompat _company_liveries_compat[] = {
84 SLC_VAR("in_use"),
85 SLC_VAR("colour1"),
86 SLC_VAR("colour2"),
87 };
88
90 const SaveLoadCompat _company_sl_compat[] = {
91 SLC_VAR("name_2"),
92 SLC_VAR("name_1"),
93 SLC_VAR("name"),
94 SLC_VAR("president_name_1"),
95 SLC_VAR("president_name_2"),
96 SLC_VAR("president_name"),
97 SLC_VAR("face"),
98 SLC_VAR("money"),
99 SLC_VAR("current_loan"),
100 SLC_VAR("colour"),
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_VAR("share_owners"),
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"),
116 SLC_VAR("is_ai"),
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"),
122 SLC_VAR("settings"),
123 SLC_VAR("old_ai"),
124 SLC_VAR("cur_economy"),
125 SLC_VAR("old_economy"),
126 SLC_VAR("liveries"),
127 };
128
129 #endif /* SAVELOAD_COMPAT_COMPANY_H */
SLV_69
@ SLV_69
69 10319
Definition: saveload.h:129
SLV_144
@ SLV_144
144 20334
Definition: saveload.h:219
SLC_VAR
#define SLC_VAR(name)
Field name where the real SaveLoad can be located.
Definition: saveload.h:1011
SL_MIN_VERSION
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:35
SLV_112
@ SLV_112
112 15290
Definition: saveload.h:181
SLV_100
@ SLV_100
100 13952
Definition: saveload.h:167
_company_liveries_compat
const SaveLoadCompat _company_liveries_compat[]
Original field order for SlCompanyLiveries.
Definition: company_sl_compat.h:83
_company_old_ai_buildrec_compat
const SaveLoadCompat _company_old_ai_buildrec_compat[]
Original field order for SlCompanyOldAIBuildRec.
Definition: company_sl_compat.h:16
SLV_94
@ SLV_94
94 12816
Definition: saveload.h:159
SLV_170
@ SLV_170
170 23826
Definition: saveload.h:251
SLV_107
@ SLV_107
107 15027
Definition: saveload.h:175
SLV_2
@ SLV_2
2.0 0.3.0 2.1 0.3.1, 0.3.2
Definition: saveload.h:38
_company_old_ai_compat
const SaveLoadCompat _company_old_ai_compat[]
Original field order for SlCompanyOldAI.
Definition: company_sl_compat.h:25
SLV_16
@ SLV_16
16.0 2817 16.1 3155
Definition: saveload.h:64
SLC_NULL
#define SLC_NULL(length, from, to)
Empty space in every savegame version.
Definition: saveload.h:1019
SaveLoadCompat
SaveLoad information for backwards compatibility.
Definition: saveload.h:680
_company_sl_compat
const SaveLoadCompat _company_sl_compat[]
Original field order for company_desc.
Definition: company_sl_compat.h:90
SLV_6
@ SLV_6
6.0 1721 6.1 1768
Definition: saveload.h:50
_company_settings_compat
const SaveLoadCompat _company_settings_compat[]
Original field order for SlCompanySettings.
Definition: company_sl_compat.h:57
SLV_19
@ SLV_19
19 3396
Definition: saveload.h:69
SLV_58
@ SLV_58
58 9762
Definition: saveload.h:116
SLV_4
@ SLV_4
4.0 1 4.1 122 0.3.3, 0.3.4 4.2 1222 0.3.5 4.3 1417 4.4 1426
Definition: saveload.h:41
_company_economy_compat
const SaveLoadCompat _company_economy_compat[]
Original field order for SlCompanyEconomy.
Definition: company_sl_compat.h:73
SLV_13
@ SLV_13
13.1 2080 0.4.0, 0.4.0.1
Definition: saveload.h:60