summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-02-14 11:53:39 +0000
committercelestar <celestar@openttd.org>2007-02-14 11:53:39 +0000
commitbde06e75b42c469247ee3afbd8078713402707de (patch)
tree5cebc76c7639e1dcf5e6ca5716240cb6277da593 /src/tunnelbridge_cmd.cpp
parenta374caf51d9bce8eb26043f10d02db865d1a534e (diff)
downloadopenttd-bde06e75b42c469247ee3afbd8078713402707de.tar.xz
(svn r8732) -Codechange/Fix(r8705): Turned the bit-handling macros into template functions. Fixes a problem with MSVC and 64-bit shifts.
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 12d2bb109..c370f0735 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -77,7 +77,7 @@ int CalcBridgeLenCostFactor(int x)
}
#define M(x) (1 << (x))
-enum {
+typedef enum BridgeFoundations{
// foundation, whole tile is leveled up --> 3 corners raised
BRIDGE_FULL_LEVELED_FOUNDATION = M(SLOPE_WSE) | M(SLOPE_NWS) | M(SLOPE_ENW) | M(SLOPE_SEN),
// foundation, tile is partly leveled up --> 1 corner raised
@@ -85,7 +85,7 @@ enum {
// no foundations (X,Y direction)
BRIDGE_NO_FOUNDATION = M(SLOPE_FLAT) | M(SLOPE_SW) | M(SLOPE_SE) | M(SLOPE_NW) | M(SLOPE_NE),
BRIDGE_HORZ_RAMP = (BRIDGE_PARTLY_LEVELED_FOUNDATION | BRIDGE_NO_FOUNDATION) & ~M(SLOPE_FLAT)
-};
+} BridgeFoundataion;
#undef M
static inline const PalSpriteID *GetBridgeSpriteTable(int index, byte table)