OpenTTD Source  20241108-master-g80f628063a
vehicle_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_VEHICLE_H
11 #define SAVELOAD_COMPAT_VEHICLE_H
12 
13 #include "../saveload.h"
14 
17  SLC_VAR("subtype"),
18  SLC_VAR("next"),
19  SLC_VAR("name"),
20  SLC_VAR("unitnumber"),
21  SLC_VAR("owner"),
22  SLC_VAR("tile"),
23  SLC_VAR("dest_tile"),
24  SLC_VAR("x_pos"),
25  SLC_VAR("y_pos"),
26  SLC_VAR("z_pos"),
27  SLC_VAR("direction"),
29  SLC_VAR("spritenum"),
31  SLC_VAR("engine_type"),
33  SLC_VAR("cur_speed"),
34  SLC_VAR("subspeed"),
35  SLC_VAR("acceleration"),
36  SLC_VAR("motion_counter"),
37  SLC_VAR("progress"),
38  SLC_VAR("vehstatus"),
39  SLC_VAR("last_station_visited"),
40  SLC_VAR("last_loading_station"),
41  SLC_VAR("cargo_type"),
42  SLC_VAR("cargo_subtype"),
43  SLC_VAR("cargo_days"),
44  SLC_VAR("cargo_source"),
45  SLC_VAR("cargo_source_xy"),
46  SLC_VAR("cargo_cap"),
47  SLC_VAR("refit_cap"),
48  SLC_VAR("cargo_count"),
49  SLC_VAR("cargo.packets"),
50  SLC_VAR("cargo.action_counts"),
51  SLC_VAR("cargo_age_counter"),
52  SLC_VAR("day_counter"),
53  SLC_VAR("tick_counter"),
54  SLC_VAR("running_ticks"),
55  SLC_VAR("cur_implicit_order_index"),
56  SLC_VAR("cur_real_order_index"),
58  SLC_VAR("current_order.type"),
59  SLC_VAR("current_order.flags"),
60  SLC_VAR("current_order.dest"),
61  SLC_VAR("current_order.refit_cargo"),
62  SLC_NULL(1, SLV_36, SLV_182),
63  SLC_VAR("current_order.wait_time"),
64  SLC_VAR("current_order.travel_time"),
65  SLC_VAR("current_order.max_speed"),
66  SLC_VAR("timetable_start"),
67  SLC_VAR("orders"),
68  SLC_VAR("age"),
69  SLC_VAR("max_age"),
70  SLC_VAR("date_of_last_service"),
71  SLC_VAR("service_interval"),
72  SLC_VAR("reliability"),
73  SLC_VAR("reliability_spd_dec"),
74  SLC_VAR("breakdown_ctr"),
75  SLC_VAR("breakdown_delay"),
76  SLC_VAR("breakdowns_since_last_service"),
77  SLC_VAR("breakdown_chance"),
78  SLC_VAR("build_year"),
79  SLC_VAR("load_unload_ticks"),
80  SLC_VAR("cargo_paid_for"),
81  SLC_VAR("vehicle_flags"),
82  SLC_VAR("profit_this_year"),
83  SLC_VAR("profit_last_year"),
84  SLC_VAR("cargo_feeder_share"),
85  SLC_NULL(4, SLV_51, SLV_68),
86  SLC_VAR("value"),
87  SLC_VAR("random_bits"),
88  SLC_VAR("waiting_triggers"),
89  SLC_VAR("next_shared"),
90  SLC_NULL(2, SLV_2, SLV_69),
91  SLC_NULL(4, SLV_69, SLV_101),
92  SLC_VAR("group_id"),
93  SLC_VAR("current_order_time"),
94  SLC_VAR("lateness_counter"),
95  SLC_NULL(10, SLV_2, SLV_144),
96 };
97 
100  SLC_VAR("common"),
101  SLC_VAR("crash_anim_pos"),
102  SLC_VAR("force_proceed"),
103  SLC_VAR("railtype"),
104  SLC_VAR("track"),
105  SLC_VAR("flags"),
106  SLC_NULL(2, SLV_2, SLV_60),
107  SLC_VAR("wait_counter"),
108  SLC_NULL(2, SLV_2, SLV_20),
109  SLC_VAR("gv_flags"),
110  SLC_NULL(11, SLV_2, SLV_144),
111 };
112 
115  SLC_VAR("common"),
116  SLC_VAR("state"),
117  SLC_VAR("frame"),
118  SLC_VAR("blocked_ctr"),
119  SLC_VAR("overtaking"),
120  SLC_VAR("overtaking_ctr"),
121  SLC_VAR("crashed_ctr"),
122  SLC_VAR("reverse_ctr"),
123  SLC_VAR("path.td"),
124  SLC_VAR("path.tile"),
125  SLC_NULL(2, SLV_6, SLV_69),
126  SLC_VAR("gv_flags"),
127  SLC_NULL(4, SLV_69, SLV_131),
128  SLC_NULL(2, SLV_6, SLV_131),
129  SLC_NULL(16, SLV_2, SLV_144),
130 };
131 
134  SLC_VAR("common"),
135  SLC_VAR("state"),
136  SLC_VAR("path"),
137  SLC_VAR("rotation"),
138  SLC_NULL(16, SLV_2, SLV_144),
139 };
140 
143  SLC_VAR("common"),
144  SLC_VAR("crashed_counter"),
145  SLC_VAR("pos"),
146  SLC_VAR("targetairport"),
147  SLC_VAR("state"),
148  SLC_VAR("previous_pos"),
149  SLC_VAR("last_direction"),
150  SLC_VAR("number_consecutive_turns"),
151  SLC_VAR("turn_counter"),
152  SLC_VAR("flags"),
153  SLC_NULL(13, SLV_2, SLV_144),
154 };
155 
158  SLC_VAR("subtype"),
159  SLC_VAR("tile"),
160  SLC_VAR("x_pos"),
161  SLC_VAR("y_pos"),
162  SLC_VAR("z_pos"),
163  SLC_VAR("sprite_cache.sprite_seq.seq[0].sprite"),
165  SLC_VAR("progress"),
166  SLC_VAR("vehstatus"),
167  SLC_VAR("animation_state"),
168  SLC_VAR("animation_substate"),
169  SLC_VAR("spritenum"),
170  SLC_NULL(15, SLV_2, SLV_144),
171 };
172 
175  SLC_VAR("next"),
176  SLC_VAR("subtype"),
177  SLC_VAR("tile"),
178  SLC_VAR("dest_tile"),
179  SLC_VAR("x_pos"),
180  SLC_VAR("y_pos"),
181  SLC_VAR("z_pos"),
182  SLC_VAR("direction"),
184  SLC_VAR("owner"),
185  SLC_VAR("vehstatus"),
186  SLC_VAR("current_order.dest"),
187  SLC_VAR("sprite_cache.sprite_seq.seq[0].sprite"),
188  SLC_VAR("age"),
189  SLC_VAR("tick_counter"),
190  SLC_VAR("image_override"),
191  SLC_VAR("big_ufo_destroyer_target"),
192  SLC_VAR("flags"),
193  SLC_NULL(16, SLV_2, SLV_144),
194 };
195 
198  SLC_VAR("type"),
199  SLC_VAR("train"),
200  SLC_VAR("roadveh"),
201  SLC_VAR("ship"),
202  SLC_VAR("aircraft"),
203  SLC_VAR("effect"),
204  SLC_VAR("disaster"),
205 };
206 
207 #endif /* SAVELOAD_COMPAT_VEHICLE_H */
#define SLC_VAR(name)
Field name where the real SaveLoad can be located.
Definition: saveload.h:1211
#define SLC_NULL(length, from, to)
Empty space in every savegame version.
Definition: saveload.h:1219
@ SLV_69
69 10319
Definition: saveload.h:125
@ SLV_182
182 25115 FS#5492, r25259, r25296 Goal status
Definition: saveload.h:261
@ SLV_36
36 6624
Definition: saveload.h:86
@ SLV_6
6.0 1721 6.1 1768
Definition: saveload.h:46
@ SLV_60
60 9874
Definition: saveload.h:115
@ SLV_131
131 18481
Definition: saveload.h:200
@ SL_MIN_VERSION
First savegame version.
Definition: saveload.h:31
@ SLV_51
51 8978
Definition: saveload.h:104
@ SLV_68
68 10266
Definition: saveload.h:124
@ SLV_20
20 3403
Definition: saveload.h:67
@ SLV_144
144 20334
Definition: saveload.h:215
@ SLV_2
2.0 0.3.0 2.1 0.3.1, 0.3.2
Definition: saveload.h:34
@ SLV_152
152 21171
Definition: saveload.h:225
@ SLV_105
105 14803
Definition: saveload.h:169
@ SLV_58
58 9762
Definition: saveload.h:112
@ SLV_101
101 14233
Definition: saveload.h:164
@ SLV_59
59 9779
Definition: saveload.h:113
SaveLoad information for backwards compatibility.
Definition: saveload.h:731
const SaveLoadCompat _vehicle_train_sl_compat[]
Original field order for SlVehicleTrain.
const SaveLoadCompat _vehicle_disaster_sl_compat[]
Original field order for SlVehicleDisaster.
const SaveLoadCompat _vehicle_effect_sl_compat[]
Original field order for SlVehicleEffect.
const SaveLoadCompat _vehicle_ship_sl_compat[]
Original field order for SlVehicleShip.
const SaveLoadCompat _vehicle_sl_compat[]
Original field order for vehicle_desc.
const SaveLoadCompat _vehicle_roadveh_sl_compat[]
Original field order for SlVehicleRoadVeh.
const SaveLoadCompat _vehicle_common_sl_compat[]
Original field order for SlVehicleCommon.
const SaveLoadCompat _vehicle_aircraft_sl_compat[]
Original field order for SlVehicleAircraft.