summaryrefslogtreecommitdiff
path: root/rail.c
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-07-04 14:58:55 +0000
committerhackykid <hackykid@openttd.org>2005-07-04 14:58:55 +0000
commit60ddaf95f0b52a09fad18ea05b2b9db4509d0511 (patch)
treec0f8f7ba8535ff0f5e9fd8581b36c737ac10e0b1 /rail.c
parentb872cf7f7bd6fdcc8b09903130cb961c004ad5de (diff)
downloadopenttd-60ddaf95f0b52a09fad18ea05b2b9db4509d0511.tar.xz
(svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
- Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings. - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
Diffstat (limited to 'rail.c')
-rw-r--r--rail.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rail.c b/rail.c
index 670b8345b..ecd6be937 100644
--- a/rail.c
+++ b/rail.c
@@ -75,6 +75,15 @@ const Trackdir _track_exitdir_to_trackdir[][DIAGDIR_END] = {
{TRACKDIR_RIGHT_N, TRACKDIR_RIGHT_S, INVALID_TRACKDIR, INVALID_TRACKDIR}
};
+const Trackdir _track_enterdir_to_trackdir[][DIAGDIR_END] = { // TODO: replace magic with enums
+ {TRACKDIR_DIAG1_NE, INVALID_TRACKDIR, TRACKDIR_DIAG1_SW, INVALID_TRACKDIR},
+ {INVALID_TRACKDIR, TRACKDIR_DIAG2_SE, INVALID_TRACKDIR, TRACKDIR_DIAG2_NW},
+ {INVALID_TRACKDIR, TRACKDIR_UPPER_E, TRACKDIR_UPPER_W, INVALID_TRACKDIR},
+ {TRACKDIR_LOWER_E, INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_LOWER_W},
+ {TRACKDIR_LEFT_N, TRACKDIR_LEFT_S, INVALID_TRACKDIR, INVALID_TRACKDIR},
+ {INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_RIGHT_S, TRACKDIR_RIGHT_N}
+};
+
const Trackdir _track_direction_to_trackdir[][DIR_END] = {
{INVALID_TRACKDIR, TRACKDIR_DIAG1_NE, INVALID_TRACKDIR, INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_DIAG1_SW, INVALID_TRACKDIR, INVALID_TRACKDIR},
{INVALID_TRACKDIR, INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_DIAG2_SE, INVALID_TRACKDIR, INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_DIAG2_NW},