1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 18:09:09 +00:00

(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends

This commit is contained in:
tron
2006-03-06 20:28:28 +00:00
parent fc1e9c5a92
commit 2d3c28f2b3
10 changed files with 83 additions and 71 deletions

View File

@@ -3636,7 +3636,7 @@ pos_3:
if (IsLevelCrossing(tile)) goto is_rail_crossing;
if (GetRoadType(tile) == ROAD_DEPOT) {
uint dir;
DiagDirection dir;
// Check if there are any stations around.
if (IsTileType(tile + TileDiffXY(-1, 0), MP_STATION) &&
@@ -3664,7 +3664,7 @@ pos_3:
DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
DoCommandByTile(
TILE_MASK(tile + TileOffsByDir(dir)),
8 >> (dir ^ 2),
DiagDirToRoadBits(ReverseDiagDir(dir)),
0,
DC_EXEC,
CMD_REMOVE_ROAD);