00001 /* $Id$ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * 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. 00006 * 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. 00007 * 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/>. 00008 */ 00009 00012 #ifndef ELRAIL_FUNC_H 00013 #define ELRAIL_FUNC_H 00014 00015 #include "rail.h" 00016 #include "transparency.h" 00017 #include "tile_cmd.h" 00018 #include "settings_type.h" 00019 00024 static inline bool HasCatenary(RailType rt) 00025 { 00026 return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY); 00027 } 00028 00033 static inline bool HasCatenaryDrawn(RailType rt) 00034 { 00035 return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails; 00036 } 00037 00043 void DrawCatenary(const TileInfo *ti); 00044 void DrawCatenaryOnTunnel(const TileInfo *ti); 00045 void DrawCatenaryOnBridge(const TileInfo *ti); 00046 00047 bool SettingsDisableElrail(int32 p1); 00048 00049 #endif /* ELRAIL_FUNC_H */