summaryrefslogtreecommitdiff
path: root/src/saveload/compat/station_sl_compat.h
blob: 1c24a8d5d92204aa225c0e1e797d3d27a72b6546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/*
 * 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/>.
 */

/** @file station_sl_compat.h Loading of station chunks before table headers were added. */

#ifndef SAVELOAD_COMPAT_STATION_H
#define SAVELOAD_COMPAT_STATION_H

#include "../saveload.h"

/** Original field order for _roadstop_desc. */
const SaveLoadCompat _roadstop_sl_compat[] = {
	SLC_VAR("xy"),
	SLC_NULL(1, SL_MIN_VERSION, SLV_45),
	SLC_VAR("status"),
	SLC_NULL(4, SL_MIN_VERSION, SLV_9),
	SLC_NULL(2, SL_MIN_VERSION, SLV_45),
	SLC_NULL(1, SL_MIN_VERSION, SLV_26),
	SLC_VAR("next"),
	SLC_NULL(2, SL_MIN_VERSION, SLV_45),
	SLC_NULL(4, SL_MIN_VERSION, SLV_25),
	SLC_NULL(1, SLV_25, SLV_26),
};

/** Original field order for SlStationSpecList. */
const SaveLoadCompat _station_spec_list_sl_compat[] = {
	SLC_VAR("grfid"),
	SLC_VAR("localidx"),
};

/** Original field order for SlStationCargo. */
const SaveLoadCompat _station_cargo_sl_compat[] = {
	SLC_VAR("first"),
	SLC_VAR("second"),
};

/** Original field order for SlStationFlow. */
const SaveLoadCompat _station_flow_sl_compat[] = {
	SLC_VAR("source"),
	SLC_VAR("via"),
	SLC_VAR("share"),
	SLC_VAR("restricted"),
};

/** Original field order for SlStationGoods. */
const SaveLoadCompat _station_goods_sl_compat[] = {
	SLC_VAR("waiting_acceptance"),
	SLC_VAR("status"),
	SLC_NULL(2, SLV_51, SLV_68),
	SLC_VAR("time_since_pickup"),
	SLC_VAR("rating"),
	SLC_VAR("cargo_source"),
	SLC_VAR("cargo_source_xy"),
	SLC_VAR("cargo_days"),
	SLC_VAR("last_speed"),
	SLC_VAR("last_age"),
	SLC_VAR("cargo_feeder_share"),
	SLC_VAR("amount_fract"),
	SLC_VAR("packets"),
	SLC_VAR("old_num_dests"),
	SLC_VAR("cargo.reserved_count"),
	SLC_VAR("link_graph"),
	SLC_VAR("node"),
	SLC_VAR("old_num_flows"),
	SLC_VAR("max_waiting_cargo"),
	SLC_VAR("flow"),
	SLC_VAR("cargo"),
};

/** Original field order for SlStationBase. */
const SaveLoadCompat _station_base_sl_compat[] = {
	SLC_VAR("xy"),
	SLC_VAR("town"),
	SLC_VAR("string_id"),
	SLC_VAR("name"),
	SLC_VAR("delete_ctr"),
	SLC_VAR("owner"),
	SLC_VAR("facilities"),
	SLC_VAR("build_date"),
	SLC_VAR("random_bits"),
	SLC_VAR("waiting_triggers"),
	SLC_VAR("num_specs"),
};

/** Original field order for SlStationNormal. */
const SaveLoadCompat _station_normal_sl_compat[] = {
	SLC_VAR("base"),
	SLC_VAR("train_station.tile"),
	SLC_VAR("train_station.w"),
	SLC_VAR("train_station.h"),
	SLC_VAR("bus_stops"),
	SLC_VAR("truck_stops"),
	SLC_NULL(4, SL_MIN_VERSION, SLV_MULTITILE_DOCKS),
	SLC_VAR("ship_station.tile"),
	SLC_VAR("ship_station.w"),
	SLC_VAR("ship_station.h"),
	SLC_VAR("docking_station.tile"),
	SLC_VAR("docking_station.w"),
	SLC_VAR("docking_station.h"),
	SLC_VAR("airport.tile"),
	SLC_VAR("airport.w"),
	SLC_VAR("airport.h"),
	SLC_VAR("airport.type"),
	SLC_VAR("airport.layout"),
	SLC_VAR("airport.flags"),
	SLC_VAR("airport.rotation"),
	SLC_VAR("storage"),
	SLC_VAR("airport.psa"),
	SLC_VAR("indtype"),
	SLC_VAR("time_since_load"),
	SLC_VAR("time_since_unload"),
	SLC_VAR("last_vehicle_type"),
	SLC_VAR("had_vehicle_of_type"),
	SLC_VAR("loading_vehicles"),
	SLC_VAR("always_accepted"),
	SLC_VAR("goods"),
};

/** Original field order for SlStationWaypoint. */
const SaveLoadCompat _station_waypoint_sl_compat[] = {
	SLC_VAR("base"),
	SLC_VAR("town_cn"),
	SLC_VAR("train_station.tile"),
	SLC_VAR("train_station.w"),
	SLC_VAR("train_station.h"),
};

/** Original field order for _station_desc. */
const SaveLoadCompat _station_sl_compat[] = {
	SLC_VAR("facilities"),
	SLC_VAR("normal"),
	SLC_VAR("waypoint"),
	SLC_VAR("speclist"),
};

/** Original field order for _old_station_desc. */
const SaveLoadCompat _old_station_sl_compat[] = {
	SLC_VAR("xy"),
	SLC_NULL(4, SL_MIN_VERSION, SLV_6),
	SLC_VAR("train_station.tile"),
	SLC_VAR("airport.tile"),
	SLC_NULL(2, SL_MIN_VERSION, SLV_6),
	SLC_NULL(4, SLV_6, SLV_MULTITILE_DOCKS),
	SLC_VAR("town"),
	SLC_VAR("train_station.w"),
	SLC_VAR("train_station.h"),
	SLC_NULL(1, SL_MIN_VERSION, SLV_4),
	SLC_VAR("string_id"),
	SLC_VAR("name"),
	SLC_VAR("indtype"),
	SLC_VAR("had_vehicle_of_type"),
	SLC_VAR("time_since_load"),
	SLC_VAR("time_since_unload"),
	SLC_VAR("delete_ctr"),
	SLC_VAR("owner"),
	SLC_VAR("facilities"),
	SLC_VAR("airport.type"),
	SLC_NULL(2, SL_MIN_VERSION, SLV_6),
	SLC_NULL(1, SL_MIN_VERSION, SLV_5),
	SLC_VAR("airport.flags"),
	SLC_NULL(2, SL_MIN_VERSION, SLV_26),
	SLC_VAR("last_vehicle_type"),
	SLC_NULL(2, SLV_3, SLV_26),
	SLC_VAR("build_date"),
	SLC_VAR("bus_stops"),
	SLC_VAR("truck_stops"),
	SLC_VAR("random_bits"),
	SLC_VAR("waiting_triggers"),
	SLC_VAR("num_specs"),
	SLC_VAR("loading_vehicles"),
	SLC_NULL(32, SLV_2, SL_MAX_VERSION),
	SLC_VAR("goods"),
	SLC_VAR("speclist"),

};

#endif /* SAVELOAD_COMPAT_STATION_H */