diff options
author | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-07 17:02:43 +0000 |
commit | 7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4 (patch) | |
tree | e4137b60a824b45ce09f668d58520e36dba10256 /tunnelbridge_cmd.c | |
parent | f5c33e50733c46cee14e84ade6da0c171d96064b (diff) | |
download | openttd-7ca6b2b8b0d6f66966fa2ff01e3e9961314dfcc4.tar.xz |
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 4a373d9ab..06d398ffa 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -134,10 +134,10 @@ static uint32 CheckBridgeSlope(uint direction, uint tileh, bool is_start_tile) uint32 GetBridgeLength(TileIndex begin, TileIndex end) { int x1, y1, x2, y2; // coordinates of starting and end tiles - x1 = GET_TILE_X(begin); - y1 = GET_TILE_Y(begin); - x2 = GET_TILE_X(end); - y2 = GET_TILE_Y(end); + x1 = TileX(begin); + y1 = TileY(begin); + x2 = TileX(end); + y2 = TileY(end); return abs((x2 + y2 - x1 - y1)) - 1; } @@ -190,8 +190,8 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2) rail_or_road = 0; } - sx = GET_TILE_X(p1) * 16; - sy = GET_TILE_Y(p1) * 16; + sx = TileX(p1) * 16; + sy = TileY(p1) * 16; direction = 0; |