(svn r27707) -Fix: Make the result of NewGRF's CARGO_NAME string code reliably print...
[openttd.git] / src / subsidy_type.h
blob83c33a00a99cd94742e85bc13920792275423ed9
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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 */
10 /** @file subsidy_type.h basic types related to subsidies */
12 #ifndef SUBSIDY_TYPE_H
13 #define SUBSIDY_TYPE_H
15 #include "core/enum_type.hpp"
17 /** What part of a subsidy is something? */
18 enum PartOfSubsidy {
19 POS_NONE = 0, ///< nothing
20 POS_SRC = 1 << 0, ///< bit 0 set -> town/industry is source of subsidised path
21 POS_DST = 1 << 1, ///< bit 1 set -> town/industry is destination of subsidised path
23 /** Helper to store the PartOfSubsidy data in a single byte. */
24 typedef SimpleTinyEnumT<PartOfSubsidy, byte> PartOfSubsidyByte;
26 DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
28 typedef uint16 SubsidyID; ///< ID of a subsidy
29 struct Subsidy;
31 #endif /* SUBSIDY_TYPE_H */