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/>.
8 /** @file subsidy_func.h Functions related to subsidies. */
10 #ifndef SUBSIDY_FUNC_H
11 #define SUBSIDY_FUNC_H
13 #include "core/geometry_type.hpp"
14 #include "station_type.h"
15 #include "company_type.h"
16 #include "cargo_type.h"
17 #include "news_type.h"
18 #include "subsidy_base.h"
20 std::pair
<NewsReferenceType
, NewsReferenceType
> SetupSubsidyDecodeParam(const struct Subsidy
*s
, SubsidyDecodeParamType mode
, uint parameter_offset
= 0);
21 void DeleteSubsidyWith(SourceType type
, SourceID index
);
22 bool CheckSubsidised(CargoID cargo_type
, CompanyID company
, SourceType src_type
, SourceID src
, const Station
*st
);
23 void RebuildSubsidisedSourceAndDestinationCache();
25 #endif /* SUBSIDY_FUNC_H */