diff options
author | frosch <frosch@openttd.org> | 2011-05-29 08:56:05 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-29 08:56:05 +0000 |
commit | 8f921c8747d2a59b4c8e4ee4df441a81bbf17a7e (patch) | |
tree | d8cc57ca8f3123f1b5f1dfc90f3303cee875b707 | |
parent | c904e7ede5485ebe19ce2544e4b830fad16b95b4 (diff) | |
download | openttd-8f921c8747d2a59b4c8e4ee4df441a81bbf17a7e.tar.xz |
(svn r22516) -Codechange: Replace some magic numbers with the appropiate enum values. (Eddi)
-rw-r--r-- | src/road_cmd.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 57e322237..79f830fd1 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1473,8 +1473,23 @@ static bool ClickTile_Road(TileIndex tile) } /* Converts RoadBits to TrackBits */ -static const byte _road_trackbits[16] = { - 0x0, 0x0, 0x0, 0x10, 0x0, 0x2, 0x8, 0x1A, 0x0, 0x4, 0x1, 0x15, 0x20, 0x26, 0x29, 0x3F, +static const TrackBits _road_trackbits[16] = { + TRACK_BIT_NONE, // ROAD_NONE + TRACK_BIT_NONE, // ROAD_NW + TRACK_BIT_NONE, // ROAD_SW + TRACK_BIT_LEFT, // ROAD_W + TRACK_BIT_NONE, // ROAD_SE + TRACK_BIT_Y, // ROAD_Y + TRACK_BIT_LOWER, // ROAD_S + TRACK_BIT_LEFT | TRACK_BIT_LOWER | TRACK_BIT_Y, // ROAD_Y | ROAD_SW + TRACK_BIT_NONE, // ROAD_NE + TRACK_BIT_UPPER, // ROAD_N + TRACK_BIT_X, // ROAD_X + TRACK_BIT_LEFT | TRACK_BIT_UPPER | TRACK_BIT_X, // ROAD_X | ROAD_NW + TRACK_BIT_RIGHT, // ROAD_E + TRACK_BIT_RIGHT | TRACK_BIT_UPPER | TRACK_BIT_Y, // ROAD_Y | ROAD_NE + TRACK_BIT_RIGHT | TRACK_BIT_LOWER | TRACK_BIT_X, // ROAD_X | ROAD_SE + TRACK_BIT_ALL, // ROAD_ALL }; static TrackStatus GetTileTrackStatus_Road(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side) |