src/elrail_func.h
author translators
Sun, 30 Nov 2008 18:46:32 +0000
changeset 10395 6fe57f7c5d8d
parent 9413 7042a8ec3fa8
permissions -rw-r--r--
(svn r14646) -Update: WebTranslator2 update to 2008-11-30 18:46:24
esperanto - 4 fixed by Athaba (4)
finnish - 1 changed by SuomiPoika (1)
indonesian - 16 fixed, 4 changed by fanioz (20)
korean - 1 fixed by dlunch (1)
lithuanian - 57 fixed, 20 changed by Enternald (77)
macedonian - 140 fixed, 1 changed by simonkoco (34), zharko (107)
persian - 21 fixed by ali sattari (21)
serbian - 5 fixed by dejac (5)
/* $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);

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

#endif /* ELRAIL_FUNC_H */