Files @ r11784:1f7706fe8337
Branch filter:

Location: cpp/openttd-patchpack/source/src/elrail_func.h

translators
(svn r16179) -Update: WebTranslator2 update to 2009-04-27 17:41:22
brazilian_portuguese - 24 fixed by tucalipe (24)
dutch - 10 fixed by habell (10)
estonian - 8 changed by kristjans (8)
hungarian - 10 fixed by IPG (10)
italian - 1 changed by lorenzodv (1)
malay - 22 fixed by Syed (22)
norwegian_bokmal - 1 fixed by khh (1)
polish - 336 fixed, 104 changed by konrad (440)
/* $Id$ */

/** @file elrail_func.h header file for electrified rail specific functions */

#ifndef ELRAIL_FUNC_H
#define ELRAIL_FUNC_H

#include "rail.h"
#include "transparency.h"
#include "tile_cmd.h"
#include "settings_type.h"

/**
 * Test if a rail type has catenary
 * @param rt Rail type to test
 */
static inline bool HasCatenary(RailType rt)
{
	return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
}

/**
 * Test if we should draw rail catenary
 * @param rt Rail type to test
 */
static inline bool HasCatenaryDrawn(RailType rt)
{
	return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
}

/**
 * Draws overhead wires and pylons for electric railways.
 * @param ti The TileInfo struct of the tile being drawn
 * @see DrawCatenaryRailway
 */
void DrawCatenary(const TileInfo *ti);
void DrawCatenaryOnTunnel(const TileInfo *ti);
void DrawCatenaryOnBridge(const TileInfo *ti);

bool SettingsDisableElrail(int32 p1); ///< _settings_game.disable_elrail callback

#endif /* ELRAIL_FUNC_H */