summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-04-11 20:42:13 +0000
committerpeter1138 <peter1138@openttd.org>2007-04-11 20:42:13 +0000
commitf7a92a2f16ec59a3cfbe19144c7217e88f1a3e6f (patch)
tree24e29e07fba8fb2733394c510339f5c76241b89b /src
parent5d48b3c12296bd0bef7556f20f4967c96e26aa1f (diff)
downloadopenttd-f7a92a2f16ec59a3cfbe19144c7217e88f1a3e6f.tar.xz
(svn r9598) -Fix (r9563): brainfart? in elrail transparency. who knows...
Diffstat (limited to 'src')
-rw-r--r--src/elrail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index fcf8bedfe..6304842cf 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -271,7 +271,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
SpriteID img = pylons_normal[temp];
SpriteID pal = PAL_NONE;
- if (_transparent_opt & TO_BUILDINGS) {
+ if (HASBIT(_transparent_opt, TO_BUILDINGS)) {
SETBIT(img, PALETTE_MODIFIER_TRANSPARENT);
pal = PALETTE_TO_TRANSPARENT;
}
@@ -285,7 +285,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
}
/* Don't draw a wire under a low bridge */
- if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !(_transparent_opt & TO_BUILDINGS)) {
+ if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !HASBIT(_transparent_opt, TO_BUILDINGS)) {
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
if (height <= TilePixelHeight(ti->tile) + TILE_HEIGHT) return;