(svn r27953) -Cleanup: Adjust other languages for r27952
[openttd.git] / src / elrail_func.h
blob5cdae20c54365fd753ff176f16425ab04f8e338e
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 elrail_func.h header file for electrified rail specific functions */
12 #ifndef ELRAIL_FUNC_H
13 #define ELRAIL_FUNC_H
15 #include "rail.h"
16 #include "tile_cmd.h"
17 #include "transparency.h"
19 /**
20 * Test if a rail type has catenary
21 * @param rt Rail type to test
23 static inline bool HasRailCatenary(RailType rt)
25 return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
28 /**
29 * Test if we should draw rail catenary
30 * @param rt Rail type to test
32 static inline bool HasRailCatenaryDrawn(RailType rt)
34 return HasRailCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
37 void DrawRailCatenary(const TileInfo *ti);
38 void DrawRailCatenaryOnTunnel(const TileInfo *ti);
39 void DrawRailCatenaryOnBridge(const TileInfo *ti);
41 bool SettingsDisableElrail(int32 p1); ///< _settings_game.disable_elrail callback
43 #endif /* ELRAIL_FUNC_H */