summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-03 09:07:21 +0000
committercelestar <celestar@openttd.org>2006-04-03 09:07:21 +0000
commitcc87f682b9cd9c25ee58cec1b63792e4ef786aa9 (patch)
treee106242c0ac31fc61254791e0f6fcfe95db2baad /tunnelbridge_cmd.c
parent3aa1e38be6e0a3c01346fe4db1bb92b148d0f2a9 (diff)
downloadopenttd-cc87f682b9cd9c25ee58cec1b63792e4ef786aa9.tar.xz
(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 612a24821..9d9001515 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -214,8 +214,8 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
transport = TRANSPORT_RAIL;
}
- sx = TileX(p1) * 16;
- sy = TileY(p1) * 16;
+ sx = TileX(p1) * TILE_SIZE;
+ sy = TileY(p1) * TILE_SIZE;
/* check if valid, and make sure that (x,y) are smaller than (sx,sy) */
if (x == sx) {
@@ -236,7 +236,7 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
/* set and test bridge length, availability */
- bridge_len = ((sx + sy - x - y) >> 4) - 1;
+ bridge_len = ((sx + sy - x - y) / TILE_SIZE) - 1;
if (!CheckBridge_Stuff(bridge_type, bridge_len)) return_cmd_error(STR_5015_CAN_T_BUILD_BRIDGE_HERE);
/* retrieve landscape height and ensure it's on land */