summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-03 11:06:21 +0000
committertron <tron@openttd.org>2004-11-03 11:06:21 +0000
commitfe1ccdf834ba585aeb8cbef3f4119bb8d0afd67a (patch)
tree7fed2f84e980d9b08e6268dff58ee26cfddc0ea9
parent2eb00c0bd342bfa2373d21e06bf88dfcc7df35f5 (diff)
downloadopenttd-fe1ccdf834ba585aeb8cbef3f4119bb8d0afd67a.tar.xz
(svn r500) -Fix: Some bridge part isn't displayed transparent in transparent mode
-Fix: If bridge has no pillars cursor arrow is displayed in transparent mode
-rw-r--r--tunnelbridge_cmd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 84479a70f..c8009d662 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -934,11 +934,12 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
// (necessary for cantilever bridges)
image = b[12 + (ti->map5&0x01)];
piece = _map2[ti->tile]&0xF;
- if( image!=0 && piece!=0 )
- DrawGroundSpriteAt(image, x,y, z);
+ if (image != 0 && piece != 0) {
+ if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
+ DrawGroundSpriteAt(image, x, y, z);
+ }
image = b[(ti->map5&0x01)*6 + piece];
- if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
if (image != 0) {
int back_height, front_height, i=z;
@@ -951,6 +952,8 @@ static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
{2,4,8,1, 11,16,9,0},
};
+ if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
+
p = _tileh_bits[(image & 1) * 2 + (ti->map5&0x01)];
front_height = ti->z + ((ti->tileh & p[0])?8:0);
back_height = ti->z + ((ti->tileh & p[1])?8:0);