author | glx |
Mon, 26 May 2008 17:40:33 +0000 | |
branch | noai |
changeset 10718 | 7e9d9e40e16f |
parent 10715 | 6bdf79ffb022 |
child 10775 | 7061477bfbcf |
permissions | -rw-r--r-- |
10513 | 1 |
/* $Id$ */ |
2 |
||
3 |
/** @file elrail_func.h header file for electrified rail specific functions */ |
|
4 |
||
5 |
#ifndef ELRAIL_FUNC_H |
|
6 |
#define ELRAIL_FUNC_H |
|
7 |
||
8 |
#include "rail.h" |
|
9 |
#include "transparency.h" |
|
10 |
#include "tile_cmd.h" |
|
11 |
#include "settings_type.h" |
|
12 |
||
13 |
/** |
|
14 |
* Test if a rail type has catenary |
|
15 |
* @param rt Rail type to test |
|
16 |
*/ |
|
17 |
static inline bool HasCatenary(RailType rt) |
|
18 |
{ |
|
19 |
return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY); |
|
20 |
} |
|
21 |
||
22 |
/** |
|
23 |
* Test if we should draw rail catenary |
|
24 |
* @param rt Rail type to test |
|
25 |
*/ |
|
26 |
static inline bool HasCatenaryDrawn(RailType rt) |
|
27 |
{ |
|
10715
6bdf79ffb022
(svn r13265) [NoAI] -Sync with trunk r13185:13264.
rubidium
parents:
10513
diff
changeset
|
28 |
return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings.vehicle.disable_elrails; |
10513 | 29 |
} |
30 |
||
31 |
/** |
|
32 |
* Draws overhead wires and pylons for electric railways. |
|
33 |
* @param ti The TileInfo struct of the tile being drawn |
|
34 |
* @see DrawCatenaryRailway |
|
35 |
*/ |
|
36 |
void DrawCatenary(const TileInfo *ti); |
|
37 |
void DrawCatenaryOnTunnel(const TileInfo *ti); |
|
38 |
void DrawCatenaryOnBridge(const TileInfo *ti); |
|
39 |
||
10715
6bdf79ffb022
(svn r13265) [NoAI] -Sync with trunk r13185:13264.
rubidium
parents:
10513
diff
changeset
|
40 |
int32 SettingsDisableElrail(int32 p1); ///< _settings.disable_elrail callback |
10513 | 41 |
|
42 |
#endif /* ELRAIL_FUNC_H */ |