diff options
author | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
commit | 524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a (patch) | |
tree | 80b15078ff5a1c09815ccb23f4c9e7629774dae4 /tunnelbridge_cmd.c | |
parent | b34de09e627fc5f8d7579c96c8b4290593c1dd32 (diff) | |
download | openttd-524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a.tar.xz |
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index d5b1fea4d..6ad1f79f7 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -813,7 +813,7 @@ static int32 DoClearBridge(TileIndex tile, uint32 flags) static const uint16 _new_data_table[] = {0x1002, 0x1001, 0x2005, 0x200A, 0, 0, 0, 0}; new_data = _new_data_table[((m5 & 0x18) >> 2) | (m5&1)]; } else { - if (!(m5 & 0x18)) goto clear_it; + if (GB(m5, 3, 2) == 0) goto clear_it; new_data = (GetTileSlope(c, NULL) == 0) ? 0x6000 : 0x6001; } @@ -1398,14 +1398,14 @@ static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode if ((m5 & 0xF0) == 0) { /* This is a tunnel */ - if (((m5 & 0xCU) >> 2) == mode) { + if (GB(m5, 2, 2) == mode) { /* Tranport in the tunnel is compatible */ return m5&1 ? 0x202 : 0x101; } } else if (m5 & 0x80) { /* This is a bridge */ result = 0; - if (((m5 & 0x6U) >> 1) == mode) { + if (GB(m5, 1, 2) == mode) { /* Transport over the bridge is compatible */ result = m5&1 ? 0x202 : 0x101; } @@ -1421,7 +1421,7 @@ static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode return result; } else { /* Transport underneath */ - if ((m5 & 0x18U) >> 3 != mode) + if (GB(m5, 3, 2) != mode) /* Incompatible transport underneath */ return result; } |