(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY

This commit is contained in:
tron
2005-06-25 06:15:43 +00:00
parent cea090af09
commit 61f6f07edd
24 changed files with 65 additions and 61 deletions

View File

@@ -518,7 +518,7 @@ int32 CmdBuildLongRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (p1 > MapSize()) return CMD_ERROR;
start_tile = p1;
end_tile = TILE_FROM_XY(x, y);
end_tile = TileVirtXY(x, y);
/* Only drag in X or Y direction dictated by the direction variable */
if (!HASBIT(p2, 2) && TileY(start_tile) != TileY(end_tile)) return CMD_ERROR; // x-axis
@@ -572,7 +572,7 @@ int32 CmdRemoveLongRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (p1 > MapSize()) return CMD_ERROR;
start_tile = p1;
end_tile = TILE_FROM_XY(x, y);
end_tile = TileVirtXY(x, y);
/* Only drag in X or Y direction dictated by the direction variable */
if (!HASBIT(p2, 2) && TileY(start_tile) != TileY(end_tile)) return CMD_ERROR; // x-axis