summaryrefslogtreecommitdiff
path: root/src/roadveh.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-06 15:39:34 +0000
committerrubidium <rubidium@openttd.org>2009-02-06 15:39:34 +0000
commit7215e287743f12b315e9e14b9401195a360a262a (patch)
tree99d295f1c8fd70a19dab1c3e2d3b4dd143f4df0f /src/roadveh.h
parentcd0edc920181884cef4508db68571393f93f3de8 (diff)
downloadopenttd-7215e287743f12b315e9e14b9401195a360a262a.tar.xz
(svn r15374) -Codechange: remove a magic constant.
Diffstat (limited to 'src/roadveh.h')
-rw-r--r--src/roadveh.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index 5e1b7f455..31f8e49a8 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -10,6 +10,26 @@
#include "engine_base.h"
#include "economy_func.h"
+/** State information about the Road Vehicle controller */
+enum {
+ RDE_NEXT_TILE = 0x80, ///< We should enter the next tile
+ RDE_TURNED = 0x40, ///< We just finished turning
+
+ /* Start frames for when a vehicle enters a tile/changes its state.
+ * The start frame is different for vehicles that turned around or
+ * are leaving the depot as the do not start at the edge of the tile.
+ * For trams there are a few different start frames as there are two
+ * places where trams can turn. */
+ RVC_DEFAULT_START_FRAME = 0,
+ RVC_TURN_AROUND_START_FRAME = 1,
+ RVC_DEPOT_START_FRAME = 6,
+ RVC_START_FRAME_AFTER_LONG_TRAM = 21,
+ RVC_TURN_AROUND_START_FRAME_SHORT_TRAM = 16,
+ /* Stop frame for a vehicle in a drive-through stop */
+ RVC_DRIVE_THROUGH_STOP_FRAME = 7,
+ RVC_DEPOT_STOP_FRAME = 11,
+};
+
enum RoadVehicleSubType {
RVST_FRONT,
RVST_ARTIC_PART,