summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-18 18:41:56 +0000
committertron <tron@openttd.org>2005-01-18 18:41:56 +0000
commit31d6f87d80bb42c1fbb8841071937e6d86fe9e86 (patch)
tree0e41a8961f8378269224ee774e2ebd64fcf9e349 /tunnelbridge_cmd.c
parent64b08311b9539e3a805365155c396cec854dd5f5 (diff)
downloadopenttd-31d6f87d80bb42c1fbb8841071937e6d86fe9e86.tar.xz
(svn r1560) Introduce SetTileType() and SetTileHeight()
Replace direct references to _map_type_and_height with these
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 1adcd902a..72df2304f 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -338,8 +338,7 @@ not_valid_below:;
/* do middle part of bridge */
if (flags & DC_EXEC) {
_map5[ti.tile] = (byte)(m5 | direction | rail_or_road);
- _map_type_and_height[ti.tile] &= ~0xF0;
- _map_type_and_height[ti.tile] |= MP_TUNNELBRIDGE << 4;
+ SetTileType(ti.tile, MP_TUNNELBRIDGE);
//bridges pieces sequence (middle parts)
// bridge len 1: 0
@@ -783,8 +782,7 @@ static int32 DoClearBridge(uint tile, uint32 flags)
new_data = 0x6000;
}
- _map_type_and_height[c] &= 0x0F;
- _map_type_and_height[c] |= new_data >> 8;
+ SetTileType(c, new_data >> 12);
_map5[c] = (byte)new_data;
_map2[c] = 0;