elrail_func.h

Go to the documentation of this file.
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 "tile_cmd.h"
00017 #include "transparency.h"
00018 
00023 static inline bool HasCatenary(RailType rt)
00024 {
00025   return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
00026 }
00027 
00032 static inline bool HasCatenaryDrawn(RailType rt)
00033 {
00034   return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
00035 }
00036 
00037 void DrawCatenary(const TileInfo *ti);
00038 void DrawCatenaryOnTunnel(const TileInfo *ti);
00039 void DrawCatenaryOnBridge(const TileInfo *ti);
00040 
00041 bool SettingsDisableElrail(int32 p1); 
00042 
00043 #endif /* ELRAIL_FUNC_H */

Generated on Sun May 8 07:30:11 2011 for OpenTTD by  doxygen 1.6.1