2010-03-18 23:14:47 +00:00
|
|
|
/*
|
|
|
|
* 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 airport_sl.cpp Code handling saving and loading airport ids */
|
|
|
|
|
|
|
|
#include "../stdafx.h"
|
|
|
|
|
|
|
|
#include "saveload.h"
|
2010-08-11 18:57:48 +00:00
|
|
|
#include "newgrf_sl.h"
|
2010-03-18 23:14:47 +00:00
|
|
|
|
2014-04-23 20:13:33 +00:00
|
|
|
#include "../safeguards.h"
|
|
|
|
|
2010-03-18 23:14:47 +00:00
|
|
|
static void Save_APID()
|
|
|
|
{
|
2010-08-11 18:57:48 +00:00
|
|
|
Save_NewGRFMapping(_airport_mngr);
|
2010-03-18 23:14:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void Load_APID()
|
|
|
|
{
|
2010-08-11 18:57:48 +00:00
|
|
|
Load_NewGRFMapping(_airport_mngr);
|
2010-03-18 23:14:47 +00:00
|
|
|
}
|
|
|
|
|
2010-08-11 19:09:26 +00:00
|
|
|
static void Save_ATID()
|
|
|
|
{
|
|
|
|
Save_NewGRFMapping(_airporttile_mngr);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void Load_ATID()
|
|
|
|
{
|
|
|
|
Load_NewGRFMapping(_airporttile_mngr);
|
|
|
|
}
|
|
|
|
|
2010-03-18 23:14:47 +00:00
|
|
|
extern const ChunkHandler _airport_chunk_handlers[] = {
|
2019-04-10 21:07:06 +00:00
|
|
|
{ 'ATID', Save_ATID, Load_ATID, nullptr, nullptr, CH_ARRAY },
|
|
|
|
{ 'APID', Save_APID, Load_APID, nullptr, nullptr, CH_ARRAY | CH_LAST },
|
2010-03-18 23:14:47 +00:00
|
|
|
};
|