summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-25 16:44:57 +0000
committertron <tron@openttd.org>2005-06-25 16:44:57 +0000
commitbec5e4fb4cc475596e1f22db9232e2bd9a190d89 (patch)
treeed8629cbd76a9334fd657971f55ef5cb63c9915f /rail_cmd.c
parent61f6f07edd837728d72e83daa0a4b8893ec77307 (diff)
downloadopenttd-bec5e4fb4cc475596e1f22db9232e2bd9a190d89.tar.xz
(svn r2487) Replace TILE_XY by TileXY/TileDiffXY
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 7b65f655c..0d36421b5 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1891,30 +1891,30 @@ static void TileLoop_Track(TileIndex tile)
owner = GetTileOwner(tile);
if ( (!(rail&(TRACK_BIT_DIAG2|TRACK_BIT_UPPER|TRACK_BIT_LEFT)) && (rail&TRACK_BIT_DIAG1)) || rail==(TRACK_BIT_LOWER|TRACK_BIT_RIGHT)) {
- if (!IsTileType(tile + TILE_XY(0,-1), MP_RAILWAY) ||
- !IsTileOwner(tile + TILE_XY(0, -1), owner) ||
- (_map5[tile + TILE_XY(0,-1)]==TRACK_BIT_UPPER || _map5[tile + TILE_XY(0,-1)]==TRACK_BIT_LEFT))
+ if (!IsTileType(tile + TileDiffXY(0, -1), MP_RAILWAY) ||
+ !IsTileOwner(tile + TileDiffXY(0, -1), owner) ||
+ (_map5[tile + TileDiffXY(0, -1)] == TRACK_BIT_UPPER || _map5[tile + TileDiffXY(0, -1)] == TRACK_BIT_LEFT))
a2 = RAIL_GROUND_FENCE_NW;
}
if ( (!(rail&(TRACK_BIT_DIAG2|TRACK_BIT_LOWER|TRACK_BIT_RIGHT)) && (rail&TRACK_BIT_DIAG1)) || rail==(TRACK_BIT_UPPER|TRACK_BIT_LEFT)) {
- if (!IsTileType(tile + TILE_XY(0,1), MP_RAILWAY) ||
- !IsTileOwner(tile + TILE_XY(0, 1), owner) ||
- (_map5[tile + TILE_XY(0,1)]==TRACK_BIT_LOWER || _map5[tile + TILE_XY(0,1)]==TRACK_BIT_RIGHT))
+ if (!IsTileType(tile + TileDiffXY(0, 1), MP_RAILWAY) ||
+ !IsTileOwner(tile + TileDiffXY(0, 1), owner) ||
+ (_map5[tile + TileDiffXY(0, 1)] == TRACK_BIT_LOWER || _map5[tile + TileDiffXY(0, 1)] == TRACK_BIT_RIGHT))
a2 = (a2 == RAIL_GROUND_FENCE_NW) ? RAIL_GROUND_FENCE_SENW : RAIL_GROUND_FENCE_SE;
}
if ( (!(rail&(TRACK_BIT_DIAG1|TRACK_BIT_UPPER|TRACK_BIT_RIGHT)) && (rail&TRACK_BIT_DIAG2)) || rail==(TRACK_BIT_LOWER|TRACK_BIT_LEFT)) {
- if (!IsTileType(tile + TILE_XY(-1,0), MP_RAILWAY) ||
- !IsTileOwner(tile + TILE_XY(-1, 0), owner) ||
- (_map5[tile + TILE_XY(-1,0)]==TRACK_BIT_UPPER || _map5[tile + TILE_XY(-1,0)]==TRACK_BIT_RIGHT))
+ if (!IsTileType(tile + TileDiffXY(-1, 0), MP_RAILWAY) ||
+ !IsTileOwner(tile + TileDiffXY(-1, 0), owner) ||
+ (_map5[tile + TileDiffXY(-1, 0)] == TRACK_BIT_UPPER || _map5[tile + TileDiffXY(-1, 0)] == TRACK_BIT_RIGHT))
a2 = RAIL_GROUND_FENCE_NE;
}
if ( (!(rail&(TRACK_BIT_DIAG1|TRACK_BIT_LOWER|TRACK_BIT_LEFT)) && (rail&TRACK_BIT_DIAG2)) || rail==(TRACK_BIT_UPPER|TRACK_BIT_RIGHT)) {
- if (!IsTileType(tile + TILE_XY(1,0), MP_RAILWAY) ||
- !IsTileOwner(tile + TILE_XY(1, 0), owner) ||
- (_map5[tile + TILE_XY(1,0)]==TRACK_BIT_LOWER || _map5[tile + TILE_XY(1,0)]==TRACK_BIT_LEFT))
+ if (!IsTileType(tile + TileDiffXY(1, 0), MP_RAILWAY) ||
+ !IsTileOwner(tile + TileDiffXY(1, 0), owner) ||
+ (_map5[tile + TileDiffXY(1, 0)] == TRACK_BIT_LOWER || _map5[tile + TileDiffXY(1, 0)] == TRACK_BIT_LEFT))
a2 = (a2 == RAIL_GROUND_FENCE_NE) ? RAIL_GROUND_FENCE_NESW : RAIL_GROUND_FENCE_SW;
}
}