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
commit5b483718670e4175eebbe0971cdd17acfc3246a1 (patch)
tree13fc42d12473d2e71111c2e64a2e2d34b92b7698 /src/bridge.h
parent0f4d9a8e4928c8bd647734599b3eb8ec5720320a (diff)
downloadopenttd-5b483718670e4175eebbe0971cdd17acfc3246a1.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
};