summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-04 09:42:47 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-04 09:42:47 +0000
commitca49b1e997245a96694ac5bab8d50e09f653ccc1 (patch)
tree6f13ababab75bf8df4f969ba1112ba5ae688ebdd /src
parent0645454aaa08c1e324cb119639f916a5679c1c3a (diff)
downloadopenttd-ca49b1e997245a96694ac5bab8d50e09f653ccc1.tar.xz
(svn r10432) -Codechange: use existing function instead of data duplication
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index dd852bb1f..0ccaa1996 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1641,12 +1641,6 @@ static void SetSignalsAfterProc(TrackPathFinder *tpf)
}
}
-static const DiagDirection _dir_from_track[14] = {
- DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_NE,
- DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE,
-};
-
-
static void ChangeSignalStates(SetSignalsData *ssd)
{
int i;
@@ -1692,7 +1686,7 @@ make_red:
if (IsPresignalExit(tile, track)) {
if (ssd->cur_stack != NUM_SSD_STACK) {
ssd->next_tile[ssd->cur_stack] = tile;
- ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
+ ssd->next_dir[ssd->cur_stack] = TrackdirToExitdir(ssd->bit[i]);
ssd->cur_stack++;
} else {
DEBUG(misc, 0, "NUM_SSD_STACK too small"); /// @todo WTF is this???