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

OpenTTD Source 15.0-RC2

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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#include "../stdafx.h"
11
12#include "saveload.h"
13#include "newgrf_sl.h"
14
15#include "../safeguards.h"
16
17 struct APIDChunkHandler : NewGRFMappingChunkHandler {
18 APIDChunkHandler() : NewGRFMappingChunkHandler('APID', _airport_mngr) {}
19};
20
21 struct ATIDChunkHandler : NewGRFMappingChunkHandler {
22 ATIDChunkHandler() : NewGRFMappingChunkHandler('ATID', _airporttile_mngr) {}
23};
24
25static const ATIDChunkHandler ATID;
26static const APIDChunkHandler APID;
27static const ChunkHandlerRef airport_chunk_handlers[] = {
28 ATID,
29 APID,
30};
31
32extern const ChunkHandlerTable _airport_chunk_handlers(airport_chunk_handlers);
newgrf_sl.h
Code handling saving and loading of NewGRF mappings.
saveload.h
Functions/types related to saving and loading games.
ChunkHandlerRef
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
Definition saveload.h:524
ChunkHandlerTable
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
Definition saveload.h:527
APIDChunkHandler
Definition airport_sl.cpp:17
ATIDChunkHandler
Definition airport_sl.cpp:21
NewGRFMappingChunkHandler
Definition newgrf_sl.h:16