OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

elrail_func.h
Go to the documentation of this file.
1 /* $Id: elrail_func.h 21845 2011-01-18 22:31:06Z rubidium $ */
2
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 */
9
12 #ifndef ELRAIL_FUNC_H
13 #define ELRAIL_FUNC_H
14
15 #include "rail.h"
16 #include "tile_cmd.h"
17 #include "transparency.h"
18
23 static inline bool HasCatenary(RailType rt)
24 {
25 return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
26 }
27
32 static inline bool HasCatenaryDrawn(RailType rt)
33 {
34 return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
35 }
36
37 void DrawCatenary(const TileInfo *ti);
38 void DrawCatenaryOnTunnel(const TileInfo *ti);
39 void DrawCatenaryOnBridge(const TileInfo *ti);
40
41 bool SettingsDisableElrail(int32 p1);
42
43 #endif /* ELRAIL_FUNC_H */