OpenTTD Source: src/saveload/airport_sl.cpp Source File

OpenTTD Source 1.11.0-RC1

airport_sl.cpp
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 #include "../stdafx.h"
11
12 #include "saveload.h"
13 #include "newgrf_sl.h"
14
15 #include "../safeguards.h"
16
17 static void Save_APID()
18 {
19 Save_NewGRFMapping(_airport_mngr);
20 }
21
22 static void Load_APID()
23 {
24 Load_NewGRFMapping(_airport_mngr);
25 }
26
27 static void Save_ATID()
28 {
29 Save_NewGRFMapping(_airporttile_mngr);
30 }
31
32 static void Load_ATID()
33 {
34 Load_NewGRFMapping(_airporttile_mngr);
35 }
36
37 extern const ChunkHandler _airport_chunk_handlers[] = {
38 { 'ATID', Save_ATID, Load_ATID, nullptr, nullptr, CH_ARRAY },
39 { 'APID', Save_APID, Load_APID, nullptr, nullptr, CH_ARRAY | CH_LAST },
40 };
CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
saveload.h
ChunkHandler
Handlers and description of chunk.
Definition: saveload.h:379
Load_NewGRFMapping
void Load_NewGRFMapping(OverrideManagerBase &mapping)
Load a GRF ID + local id -> OpenTTD's id mapping.
Definition: newgrf_sl.cpp:42
newgrf_sl.h
Save_NewGRFMapping
void Save_NewGRFMapping(const OverrideManagerBase &mapping)
Save a GRF ID + local id -> OpenTTD's id mapping.
Definition: newgrf_sl.cpp:30