summaryrefslogtreecommitdiff
path: root/src/bridge.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-07-15 00:34:34 +0000
committerbelugas <belugas@openttd.org>2008-07-15 00:34:34 +0000
commitba53aa91a1127c7f28fb25c8b2253eb6e271e76a (patch)
tree13fc42d12473d2e71111c2e64a2e2d34b92b7698 /src/bridge.h
parent2e68b35106a8e9e29372594c75b37172d90c434f (diff)
downloadopenttd-ba53aa91a1127c7f28fb25c8b2253eb6e271e76a.tar.xz
(svn r13705) -Codechange: Define and use BridgePieces enum, which will remove a few more magic numbers
Diffstat (limited to 'src/bridge.h')
-rw-r--r--src/bridge.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/bridge.h b/src/bridge.h
index 648d54dde..b037316d8 100644
--- a/src/bridge.h
+++ b/src/bridge.h
@@ -9,6 +9,23 @@
#include "direction_type.h"
#include "tile_cmd.h"
+/** This enum is related to the definition of bridge pieces,
+ * which is used to determine the proper sprite table to use
+ * while drawing a given bridge part.
+ */
+enum BridgePieces {
+ BRIDGE_PIECE_NORTH = 0,
+ BRIDGE_PIECE_SOUTH,
+ BRIDGE_PIECE_INNER_NORTH,
+ BRIDGE_PIECE_INNER_SOUTH,
+ BRIDGE_PIECE_MIDDLE_ODD,
+ BRIDGE_PIECE_MIDDLE_EVEN,
+ BRIDGE_PIECE_HEAD,
+ BRIDGE_PIECE_INVALID,
+};
+
+DECLARE_POSTFIX_INCREMENT(BridgePieces);
+
enum {
MAX_BRIDGES = 13
};