summaryrefslogtreecommitdiff
path: root/depot.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-05 07:20:26 +0000
committertron <tron@openttd.org>2005-10-05 07:20:26 +0000
commitae4a1f3675bab50b93e443dcca07fd297fcdc58d (patch)
tree8281c38dbbb38386dacf57d352e00b62be0edc77 /depot.h
parent102cf2615f8ffb4e260680a5f2b3b7d9f2a7a130 (diff)
downloadopenttd-ae4a1f3675bab50b93e443dcca07fd297fcdc58d.tar.xz
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
Diffstat (limited to 'depot.h')
-rw-r--r--depot.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/depot.h b/depot.h
index 28d0f4a4c..85ef54d9d 100644
--- a/depot.h
+++ b/depot.h
@@ -104,10 +104,10 @@ static inline DiagDirection GetDepotDirection(TileIndex tile, TransportType type
case TRANSPORT_RAIL:
case TRANSPORT_ROAD:
/* Rail and road store a diagonal direction in bits 0 and 1 */
- return (DiagDirection)(_m[tile].m5 & 3);
+ return (DiagDirection)GB(_m[tile].m5, 0, 2);
case TRANSPORT_WATER:
/* Water is stubborn, it stores the directions in a different order. */
- switch (_m[tile].m5 & 3) {
+ switch (GB(_m[tile].m5, 0, 2)) {
case 0: return DIAGDIR_NE;
case 1: return DIAGDIR_SW;
case 2: return DIAGDIR_NW;